/* ══════════════════════════════════════════════════════
   红旗渠数字孪生 · 界面样式
   ══════════════════════════════════════════════════════ */
:root {
  --blood: #b03424;
  --blood-lt: #d4482f;
  --gold: #d9a441;
  --ink: #0c1216;
  --ink-2: #131c22;
  --ink-3: #1b262e;
  --line: rgba(214, 196, 160, 0.16);
  --line-2: rgba(214, 196, 160, 0.28);
  --txt: #ece5d6;
  --txt-2: #a89e8b;
  --txt-3: #6f685c;
  --ok: #4fbf8a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --r: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #05080b; color: var(--txt);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; cursor: grab; outline: none;
}
#scene.dragging { cursor: grabbing; }
#scene.locked { cursor: none; }

#crosshair {
  position: fixed; left: 50%; top: 50%; z-index: 35;
  width: 18px; height: 18px; transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#crosshair::before, #crosshair::after {
  content: ""; position: absolute; background: rgba(245, 237, 220, .82);
  box-shadow: 0 0 4px rgba(0, 0, 0, .8);
}
#crosshair::before { left: 8px; top: 1px; width: 1px; height: 16px; }
#crosshair::after { left: 1px; top: 8px; width: 16px; height: 1px; }
body.mode-fly #crosshair { opacity: .72; }
#nav-hud {
  position: fixed; right: 16px; bottom: 122px; z-index: 45;
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border-radius: 9px;
  background: rgba(8, 14, 18, .78); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 10.5px; letter-spacing: .03em;
  font-variant-numeric: tabular-nums; pointer-events: none;
  backdrop-filter: blur(10px);
}
#nav-hud b { color: var(--gold); font-size: 11px; letter-spacing: .1em; }

[hidden] { display: none !important; }

/* ──────── 加载屏 ──────── */
#loader {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 35%, #17222b 0%, #0a0f13 55%, #05080b 100%);
  transition: opacity .7s ease, visibility .7s;
}
#loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.ld-box { width: min(560px, 88vw); text-align: center; padding: 20px; }
.ld-mark svg { width: 84px; height: 84px; filter: drop-shadow(0 6px 18px rgba(200, 53, 43, .35)); }
.ld-box h1 {
  margin: 18px 0 6px; font-size: 30px; letter-spacing: .14em; font-weight: 700;
  color: #f2ebdc;
}
.ld-box h1 span { color: var(--blood-lt); }
.ld-sub { margin: 0 0 22px; color: var(--txt-2); font-size: 12.5px; letter-spacing: .22em; }
.ld-bar {
  height: 3px; background: rgba(217, 164, 65, .14); border-radius: 3px; overflow: hidden;
  margin: 0 0 12px;
}
.ld-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blood), var(--gold));
  transition: width .4s ease;
  box-shadow: 0 0 14px rgba(217, 164, 65, .55);
}
.ld-stage { margin: 0; color: var(--txt-2); font-size: 12.5px; min-height: 20px; }
.ld-fact {
  margin: 16px auto 20px; max-width: 460px; min-height: 46px;
  color: var(--txt-3); font-size: 12px; line-height: 1.75;
  border-left: 2px solid rgba(217, 164, 65, .3); padding-left: 12px; text-align: left;
}
.btn-main {
  padding: 12px 34px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--blood), var(--blood-lt));
  color: #fff8ee; font-size: 14.5px; font-weight: 600; letter-spacing: .1em;
  box-shadow: 0 10px 28px rgba(176, 52, 36, .42);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  font-family: inherit;
}
.btn-main:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(176, 52, 36, .55); }
.btn-main:disabled { opacity: .34; cursor: default; box-shadow: none; }
.ld-note { margin: 20px 0 0; color: #454f57; font-size: 10.5px; letter-spacing: .04em; }

/* ──────── WebGL 错误 ──────── */
#webgl-err {
  position: fixed; inset: 0; z-index: 950; display: grid; place-content: center;
  text-align: center; background: #0a0f13; padding: 30px;
}
#webgl-err h2 { color: var(--blood-lt); font-size: 20px; margin: 0 0 10px; }
#webgl-err p { color: var(--txt-2); margin: 0; }

/* ──────── 顶栏 ──────── */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(5, 8, 11, .90) 0%, rgba(5, 8, 11, .55) 62%, transparent 100%);
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-ic { width: 30px; height: 30px; flex: none; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-tx b { font-size: 14.5px; letter-spacing: .06em; color: #f4eee1; }
.brand-tx span { font-size: 10.5px; color: var(--txt-3); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modes {
  display: flex; gap: 3px; margin-left: auto;
  background: rgba(19, 28, 34, .82); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px; backdrop-filter: blur(14px);
}
.mode-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--txt-2);
  font-size: 12.5px; font-family: inherit; letter-spacing: .04em;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.mode-btn svg { width: 16px; height: 16px; flex: none; }
.mode-btn:hover { color: var(--txt); background: rgba(255, 255, 255, .045); }
.mode-btn.active {
  background: linear-gradient(135deg, rgba(176, 52, 36, .92), rgba(212, 72, 47, .82));
  color: #fff6ec; box-shadow: 0 4px 14px rgba(176, 52, 36, .34);
}

.top-right { display: flex; gap: 6px; }
.tb-btn {
  display: flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px; border-radius: 8px; cursor: pointer;
  background: rgba(19, 28, 34, .82); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 12px; font-family: inherit;
  backdrop-filter: blur(14px);
  transition: color .18s, border-color .18s, background .18s;
}
.tb-btn svg { width: 16px; height: 16px; }
.tb-btn:hover { color: var(--txt); border-color: var(--line-2); background: rgba(27, 38, 46, .92); }
.tb-btn.on { color: var(--blood-lt); border-color: rgba(212, 72, 47, .5); }
#btn-rec.on { color: #ff5a4a; animation: recblink 1.2s infinite; }
@keyframes recblink { 50% { opacity: .38; } }

/* ──────── 面板通用 ──────── */
.panel {
  background: rgba(11, 17, 21, .90);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: var(--shadow);
}

/* ──────── 左侧地标 ──────── */
#sites-panel {
  position: fixed; top: 62px; left: 16px; width: 268px; z-index: 55;
  display: flex; flex-direction: column; max-height: calc(100vh - 210px);
  overflow: hidden;
}
.panel-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 9px 14px; border-bottom: 1px solid var(--line);
}
.panel-hd h3 { margin: 0; font-size: 13px; letter-spacing: .1em; color: #e8dfcc; font-weight: 600; }
.hd-note { margin-left: auto; font-size: 10.5px; color: var(--txt-3); }
.panel-collapse {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
  background: rgba(255,255,255,.035); color: var(--txt-2);
}
.panel-collapse:hover { color: #fff; border-color: var(--line-2); background: rgba(255,255,255,.08); }
.panel-collapse svg { width: 15px; height: 15px; transition: transform .2s; }
#sites-panel.collapsed .panel-collapse svg { transform: rotate(180deg); }
.site-list { overflow-y: auto; padding: 6px; flex: 1; }
.site-list::-webkit-scrollbar { width: 4px; }
.site-list::-webkit-scrollbar-thumb { background: rgba(217, 164, 65, .22); border-radius: 2px; }
.site-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; cursor: pointer; text-align: left;
  color: var(--txt-2); font-family: inherit; font-size: 12.5px;
  transition: background .16s, border-color .16s, color .16s;
}
.site-item:hover { background: rgba(255, 255, 255, .04); color: var(--txt); }
.site-item.active { background: rgba(176, 52, 36, .15); border-color: rgba(212, 72, 47, .42); color: #f6efe2; }
.site-item.active .site-dot { transform: scale(1.18); background: #ff1744; }
.site-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #e53935; border: 1px solid #ff8a80;
  box-shadow: 0 0 0 3px rgba(229,57,53,.16), 0 0 10px rgba(229,57,53,.45);
  animation: sitePulse 2.2s ease-in-out infinite;
}
@keyframes sitePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(229,57,53,.14), 0 0 8px rgba(229,57,53,.35); }
  50% { box-shadow: 0 0 0 6px rgba(229,57,53,.04), 0 0 14px rgba(229,57,53,.62); }
}
.site-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.site-tx b { font-size: 12.5px; font-weight: 600; }
.site-tx span { font-size: 10px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-km { margin-left: auto; font-size: 10px; color: var(--txt-3); font-variant-numeric: tabular-nums; flex: none; }
.panel-ft {
  padding: 8px 13px; border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--txt-3); letter-spacing: .03em;
}

#sites-panel.collapsed { width: 54px; }
#sites-panel.collapsed .panel-hd { justify-content: center; padding: 9px 0; }
#sites-panel.collapsed .panel-hd h3,
#sites-panel.collapsed .hd-note,
#sites-panel.collapsed .site-tx,
#sites-panel.collapsed .site-km,
#sites-panel.collapsed .panel-ft { display: none; }
#sites-panel.collapsed .site-list { padding: 6px 0; }
#sites-panel.collapsed .site-item { justify-content: center; padding: 11px 0; }
#sites-panel.collapsed .site-dot { width: 11px; height: 11px; }

#panel-backdrop {
  position: fixed; inset: 0; z-index: 54;
  background: rgba(2, 6, 9, .56); backdrop-filter: blur(2px);
}

/* ──────── 右侧信息卡 ──────── */
#info-card {
  position: fixed; top: 62px; right: 16px; width: 372px; z-index: 58;
  max-height: calc(100vh - 208px); display: flex; flex-direction: column;
  overflow: hidden;
  animation: cardIn .32s cubic-bezier(.2, .8, .3, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateX(24px) scale(.97); } }
.card-x {
  position: absolute; top: 9px; right: 9px; z-index: 3;
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(6, 10, 13, .72); color: #d8d0c0;
  backdrop-filter: blur(8px);
  transition: background .18s, color .18s;
}
.card-x svg { width: 15px; height: 15px; }
.card-x:hover { background: var(--blood); color: #fff; }

.card-hero { position: relative; height: 152px; flex: none; overflow: hidden; }
.card-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 13, .12) 0%, rgba(6, 10, 13, .30) 46%, rgba(11, 17, 21, .97) 100%);
}
.hero-tx { position: absolute; left: 14px; right: 44px; bottom: 9px; }
.hero-sub { display: block; font-size: 10.5px; color: var(--gold); letter-spacing: .08em; margin-bottom: 2px; }
.hero-tx h2 { margin: 0; font-size: 19px; letter-spacing: .04em; color: #f7f1e4; font-weight: 700; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }

.card-body { padding: 12px 14px 14px; overflow-y: auto; flex: 1; }
.card-body::-webkit-scrollbar { width: 4px; }
.card-body::-webkit-scrollbar-thumb { background: rgba(217, 164, 65, .22); border-radius: 2px; }

.stats { display: grid; grid-template-columns: 1fr; gap: 1px; margin-bottom: 12px; border-radius: 8px; overflow: hidden; }
.stat-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 5px 9px; background: rgba(255, 255, 255, .028);
  font-size: 11.5px;
}
.stat-row:nth-child(odd) { background: rgba(255, 255, 255, .052); }
.stat-row dt { color: var(--txt-3); flex: none; }
.stat-row dd { margin: 0; color: #ded5c2; text-align: right; font-variant-numeric: tabular-nums; }

.para { font-size: 12.5px; line-height: 1.82; color: #c9c0ae; margin-bottom: 12px; }
.para p { margin: 0 0 9px; }
.para p:last-child { margin-bottom: 0; }

.principle {
  border-left: 2px solid var(--gold); padding: 8px 0 8px 11px;
  background: linear-gradient(90deg, rgba(217, 164, 65, .07), transparent);
  border-radius: 0 6px 6px 0; margin-bottom: 12px;
}
.principle b { display: block; font-size: 11px; color: var(--gold); letter-spacing: .09em; margin-bottom: 4px; }
.principle p { margin: 0; font-size: 12px; line-height: 1.75; color: #bdb4a2; }

.card-acts { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.btn-sm {
  flex: 1; min-width: 96px; padding: 7px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(212, 72, 47, .42);
  background: rgba(176, 52, 36, .16); color: #f0e7d6;
  font-size: 11.5px; font-family: inherit; letter-spacing: .04em;
  transition: background .18s, border-color .18s, color .18s;
}
.btn-sm:hover { background: rgba(176, 52, 36, .34); border-color: var(--blood-lt); }
.btn-sm.ghost {
  border-color: var(--line); background: rgba(255, 255, 255, .035); color: var(--txt-2);
}
.btn-sm.ghost:hover { background: rgba(255, 255, 255, .08); color: var(--txt); }

.gallery { display: grid; gap: 8px; }
.gal-item { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gal-item img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.gal-cap { padding: 5px 8px; font-size: 10px; color: var(--txt-3); line-height: 1.5; background: rgba(0, 0, 0, .3); }

/* ──────── 时间条 ──────── */
#timebar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 46px; z-index: 58;
  display: flex; align-items: center; gap: 12px;
  width: min(760px, calc(100vw - 32px));
  padding: 10px 14px;
  background: rgba(11, 17, 21, .90); border: 1px solid var(--line);
  border-radius: 14px; backdrop-filter: blur(20px) saturate(130%);
  box-shadow: var(--shadow);
}
.tb-play {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .045); color: var(--txt-2);
  transition: background .18s, color .18s, border-color .18s;
}
.tb-play svg { width: 15px; height: 15px; }
.tb-play:hover { background: rgba(176, 52, 36, .28); color: #fff; border-color: var(--blood-lt); }
.tb-play.on { color: var(--gold); border-color: rgba(217, 164, 65, .55); }

.tb-main { flex: 1; min-width: 0; }
.tb-row { display: flex; align-items: center; gap: 9px; }
.tb-label { font-size: 10.5px; color: var(--txt-3); letter-spacing: .1em; flex: none; }
.tb-clock {
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--gold);
  letter-spacing: .05em; flex: none; width: 46px; text-align: right; font-weight: 600;
}

#tb-range {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 6px; border-radius: 3px; outline: none; cursor: pointer;
  background: linear-gradient(90deg,
    #0a1020 0%, #0e1a2c 16%, #2a3a56 22%, #8a5a4a 27%,
    #d08a58 30%, #7ba8d8 38%, #a8cbe8 50%, #7ba8d8 62%,
    #d08a58 70%, #8a5a4a 73%, #2a3a56 78%, #0e1a2c 84%, #0a1020 100%);
}
#tb-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e0, #e8a83a 62%, #b03424);
  border: 1.5px solid rgba(6, 10, 13, .85);
  box-shadow: 0 0 12px rgba(232, 168, 58, .85), 0 1px 4px rgba(0, 0, 0, .5);
  cursor: grab;
}
#tb-range::-webkit-slider-thumb:active { cursor: grabbing; }
#tb-range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e0, #e8a83a 62%, #b03424);
  border: 1.5px solid rgba(6, 10, 13, .85); cursor: grab;
}

.tb-track-marks {
  display: flex; justify-content: space-between;
  margin-top: 3px; padding: 0 2px;
  font-size: 9px; color: #525a60; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.tb-track-marks span { transform: translateX(-50%); }
.tb-track-marks span:first-child { transform: none; }
.tb-track-marks span:last-child { transform: translateX(-100%); }

.tb-side { display: flex; flex-direction: column; gap: 3px; flex: none; align-items: flex-end; }
.tb-sun { font-size: 10px; color: var(--txt-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-date {
  padding: 3px 7px; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 10.5px; font-family: inherit;
  outline: none;
}
.tb-date:hover { color: var(--txt); border-color: var(--line-2); }

/* ──────── 底部提示 ──────── */
#hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 40;
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  font-size: 10.5px; color: #5c6469;
  pointer-events: none; padding: 0 16px;
}
#hint span { white-space: nowrap; }
#hint kbd {
  display: inline-block; padding: 1px 5px; margin-right: 3px;
  border-radius: 4px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  font-family: inherit; font-size: 9.5px; color: #8d959b;
}

/* ──────── 模态 ──────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 6, 8, .78); backdrop-filter: blur(6px);
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-box {
  position: relative; width: min(620px, 100%); max-height: 84vh; overflow-y: auto;
  background: rgba(11, 17, 21, .97); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px 24px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: modalUp .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalUp { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-box h2 { margin: 0 0 4px; font-size: 19px; color: #f4eee1; letter-spacing: .05em; }
.modal-box h3 { margin: 18px 0 8px; font-size: 13px; color: var(--gold); letter-spacing: .09em; }
.modal-box p { margin: 0 0 9px; font-size: 12.5px; line-height: 1.85; color: #c2b9a8; }
.modal-box kbd {
  display: inline-block; padding: 1px 6px; margin: 0 2px;
  border-radius: 4px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .11);
  font-family: inherit; font-size: 11px; color: #ddd4c2;
}
.kbd-list { display: grid; gap: 6px; margin: 8px 0 0; }
.kbd-row { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: #b6ad9c; }
.kbd-row > span:first-child { flex: none; width: 132px; color: var(--txt-2); }

/* ──────── Toast ──────── */
.toast {
  position: fixed; left: 50%; bottom: 118px; transform: translateX(-50%) translateY(8px);
  z-index: 300; padding: 9px 20px; border-radius: 999px;
  background: rgba(176, 52, 36, .94); color: #fff6ec;
  font-size: 12.5px; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .25s, transform .25s;
  pointer-events: none; max-width: calc(100vw - 40px);
  overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ──────── 响应式 ──────── */
@media (max-width: 1100px) {
  #sites-panel { width: 236px; }
  #info-card { width: 330px; }
}

@media (max-width: 860px) {
  #topbar { padding: 9px 11px; gap: 8px; flex-wrap: wrap; }
  .brand-tx span { display: none; }
  .modes { order: 3; margin-left: 0; width: 100%; justify-content: center; }
  .mode-btn { flex: 1; justify-content: center; padding: 6px 8px; font-size: 11.5px; }
  .mode-btn svg { width: 14px; height: 14px; }
  .top-right { margin-left: auto; }
  .tb-btn span { display: none; }
  .tb-btn { padding: 0 9px; }

  #sites-panel {
    top: 104px; bottom: 12px; left: 10px; right: auto;
    width: min(320px, 86vw); max-height: none;
    border-radius: 14px;
    transform: translateX(calc(-100% - 18px));
    transition: transform .3s cubic-bezier(.2,.8,.3,1);
  }
  #sites-panel.open { transform: translateX(0); }
  #sites-panel.collapsed { width: min(320px, 86vw); }
  #sites-panel.collapsed .panel-hd { justify-content: flex-start; padding: 10px 10px 9px 14px; }
  #sites-panel.collapsed .panel-hd h3,
  #sites-panel.collapsed .hd-note,
  #sites-panel.collapsed .panel-ft { display: block; }
  #sites-panel.collapsed .site-tx { display: flex; }
  #sites-panel.collapsed .site-km { display: block; }
  #sites-panel.collapsed .site-list { padding: 6px; }
  #sites-panel.collapsed .site-item { justify-content: flex-start; padding: 8px 9px; }
  #sites-panel.collapsed .panel-collapse svg { transform: rotate(0); }
  .panel-hd { cursor: pointer; }

  #info-card {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%;
    max-height: 66vh; border-radius: 14px 14px 0 0;
  }
  .card-hero { height: 118px; }

  #timebar {
    bottom: 42px; width: calc(100vw - 20px);
    padding: 8px 10px; gap: 8px; border-radius: 12px;
  }
  .tb-side { display: none; }
  #nav-hud { top: 112px; right: 10px; bottom: auto; font-size: 9.5px; }
  .tb-track-marks span:nth-child(even) { display: none; }
  #hint { display: none; }
  .card-acts .btn-sm { min-width: 0; }
}

@media (max-width: 520px) {
  .ld-box h1 { font-size: 24px; }
  .tb-clock { width: 40px; font-size: 12.5px; }
  .hero-tx h2 { font-size: 17px; }
}
