/* 태풍 경로 실시간 추적 — 위성 관제 콘솔
 *
 * 색은 기상위성 적외선 강조(BD) 곡선에서 가져왔다. 구름꼭대기가 차가울수록
 * 회색 → 청록 → 황 → 주홍 → 자홍으로 가는 그 램프가 화면의 강도 언어가 된다.
 * 지도에 깔리는 히마와리 영상이 실제로 그 색이라, UI와 위성이 같은 말을 한다.
 */

:root {
  --abyss:  #04060e;
  --deep:   #080d1a;
  --glass:  rgba(8, 13, 26, .82);
  --glass-2: rgba(14, 21, 40, .72);
  --ridge:  #1b2540;
  --ridge-2: #131c33;
  --ink:    #eaeffc;
  --haze:   #8494b6;
  --faint:  #56628a;

  /* 적외선 강조 램프 = 태풍 강도 */
  --bd-1: #2fe3d0;   /* 청록 — 약 */
  --bd-2: #ffc53d;   /* 황   — 중 */
  --bd-3: #ff6a3d;   /* 주홍 — 강 */
  --bd-4: #ff2e9a;   /* 자홍 — 매우 강·초강력 */

  --gale:  #ffc53d;
  --storm: #ff2e9a;

  --font-ui: 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-num: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: 14px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: var(--abyss);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 지도: 전면 ─────────────────────────────────────────── */
#map { position: fixed; inset: 0; background: var(--abyss); z-index: 0; }
.leaflet-container { background: var(--abyss); font-family: var(--font-ui); outline: none; }

/* 위성 적외선 타일 — 어두운 바다 위에서 구름만 살아나게 */
/* 회색(따뜻한 구름·맑은 하늘)은 눌러 어둡게, 차가운 구름꼭대기 색은 살린다 */
.sat-layer { filter: brightness(.78) saturate(1.55) contrast(1.14); }
/* Leaflet의 타일별 페이드인을 끈다. 재생할 때 타일이 제각각 밝아지면서
   화면이 누더기처럼 보인다 — 위성 프레임은 통째로 한 번에 갈려야 한다.
   (레이어 컨테이너 투명도는 JS가 따로 다루므로 여기서 건드리지 않는다) */
.sat-layer .leaflet-tile { opacity: 1 !important; transition: none !important; }

.leaflet-control-attribution {
  background: rgba(4, 6, 14, .8) !important;
  color: var(--faint) !important;
  font-size: 10px !important;
  font-family: var(--font-ui);
}
.leaflet-control-attribution a { color: var(--haze) !important; }
.leaflet-bar a {
  background: var(--glass); color: var(--ink);
  border-bottom-color: var(--ridge);
  backdrop-filter: blur(8px);
}
.leaflet-bar a:hover { background: #16203a; color: var(--bd-1); }
.leaflet-control-layers {
  background: var(--glass) !important;
  color: var(--ink);
  border: 1px solid var(--ridge) !important;
  border-radius: 10px !important;
  backdrop-filter: blur(10px);
}
.leaflet-control-layers-list { font-size: 12px; padding: 4px 2px; }
.leaflet-control-zoom { margin-top: 74px !important; }

/* ── HUD 격자 ───────────────────────────────────────────── */
.hud {
  position: fixed; inset: 0; z-index: 500;
  display: grid;
  grid-template-columns: 312px 1fr 372px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "top    top   top"
    "left   free  right"
    "bottom bottom bottom";
  gap: 12px;
  padding: 0 12px 12px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.panel {
  background: var(--glass);
  border: 1px solid var(--ridge);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  overflow: hidden auto;
}
/* 내용이 넘칠 때 '잘렸다'가 아니라 '더 있다'로 읽히도록 아래를 흐린다 */
.hud-left, .hud-right {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent 100%);
}
.hud-left:not(.overflowing), .hud-right:not(.overflowing) {
  -webkit-mask-image: none; mask-image: none;
}

.panel::-webkit-scrollbar { width: 7px; }
.panel::-webkit-scrollbar-thumb { background: #26314f; border-radius: 4px; }
.panel::-webkit-scrollbar-track { background: transparent; }

/* ── 상단 바 ────────────────────────────────────────────── */
.hud-top {
  grid-area: top;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  margin: 0 -12px;
  background: linear-gradient(180deg, rgba(4,6,14,.95) 0%, rgba(4,6,14,.78) 70%, transparent 100%);
  border-bottom: 1px solid var(--ridge-2);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-eye {
  width: 30px; height: 30px; position: relative; display: block;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255,46,154,.05), var(--bd-4) 35%, var(--bd-3) 55%, rgba(255,106,61,.05));
  animation: spin 5s linear infinite;
}
.brand-eye i {
  position: absolute; inset: 34%;
  border-radius: 50%; background: var(--abyss);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.85);
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.brand-text em {
  font-style: normal; font-size: 10.5px; color: var(--faint);
  letter-spacing: .2px; font-weight: 300;
}

/* 태풍 탭 — 여러 개 추적 중일 때의 전환 */
.storm-tabs { display: flex; gap: 8px; flex: 1 1 auto; overflow-x: auto; padding: 2px 0; }
.storm-tabs::-webkit-scrollbar { height: 0; }

.storm-tab {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--ridge);
  border-radius: 999px;
  background: rgba(10, 16, 31, .7);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .18s, background .18s;
  font-family: inherit; color: inherit;
}
.storm-tab:hover { border-color: #34456e; }
.storm-tab.active {
  border-color: var(--tab-color, var(--bd-4));
  background: rgba(255, 46, 154, .08);
  box-shadow: 0 0 0 1px var(--tab-color, var(--bd-4)) inset, 0 0 22px -8px var(--tab-color, var(--bd-4));
}
.storm-tab .tab-no { font-size: 11px; color: var(--haze); font-family: var(--font-num); }
.storm-tab .tab-name { font-size: 14px; font-weight: 600; letter-spacing: -.1px; }
.storm-tab .tab-metric {
  font-family: var(--font-num); font-size: 11px; color: var(--haze);
  padding-left: 9px; border-left: 1px solid var(--ridge);
}

.top-right { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.clock { font-family: var(--font-num); font-size: 19px; font-weight: 500; letter-spacing: -.5px; }
.clock i { font-style: normal; font-size: 10px; color: var(--faint); margin-left: 5px; }
.freshness { text-align: right; line-height: 1.35; }
.freshness-label { display: block; font-size: 10px; color: var(--faint); }
#updated-at { font-family: var(--font-num); font-size: 12px; color: var(--bd-1); }

.icon-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--ridge); border-radius: 9px;
  background: rgba(14, 21, 40, .8); color: var(--haze);
  font-size: 15px; cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--bd-1); border-color: var(--bd-1); }
.icon-btn.busy { animation: spin 1s linear infinite; }

/* ── 좌: 계기판 ─────────────────────────────────────────── */
.hud-left { grid-area: left; align-self: start; max-height: 100%; }
.gauge { padding: 16px var(--pad) var(--pad); }

.gauge-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 15px; }

/* 등급 링 — 굵기·색이 강도를 그대로 말한다 */
.grade-ring {
  position: relative; flex: 0 0 auto;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
}
.grade-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,
    color-mix(in srgb, var(--grade) 6%, transparent),
    var(--grade) 40%, color-mix(in srgb, var(--grade) 6%, transparent));
  animation: spin 7s linear infinite;
}
.grade-ring::after {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--deep);
}
.grade-ring .eye {
  position: relative; z-index: 1;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--grade);
  box-shadow: 0 0 16px var(--grade);
}
.grade-ring.calm::before { animation-duration: 16s; }

.gauge-id { min-width: 0; }
.gauge-no { font-family: var(--font-num); font-size: 12px; color: var(--haze); }
.gauge-name {
  font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -.6px;
  margin: 1px 0 5px;
}
.gauge-grade {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
  color: var(--abyss); background: var(--grade);
}
.gauge-alias { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.5; }

.gauge-where {
  font-size: 12px; color: var(--haze); line-height: 1.55;
  padding: 9px 11px; margin-bottom: 12px;
  background: var(--glass-2); border-radius: 9px;
  border-left: 2px solid var(--grade);
}
.gauge-where b { color: var(--ink); font-weight: 500; }

/* 수치 격자 — 숫자는 모노, 라벨은 작게 */
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ridge-2);
  border: 1px solid var(--ridge-2); border-radius: 10px; overflow: hidden; }
.readout { background: rgba(9, 14, 27, .85); padding: 9px 11px; }
.readout .k { font-size: 10px; color: var(--faint); letter-spacing: .2px; }
.readout .v {
  font-family: var(--font-num); font-size: 19px; font-weight: 500;
  letter-spacing: -.7px; margin-top: 2px;
}
.readout .v u { text-decoration: none; font-size: 10.5px; color: var(--haze); margin-left: 3px; }
.readout.wide { grid-column: 1 / -1; }
.readout.accent .v { color: var(--grade); }

.approach {
  margin-top: 12px; padding: 11px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,46,154,.09), rgba(255,106,61,.04));
  border: 1px solid rgba(255,46,154,.22);
}
.approach h3 { margin: 0 0 6px; font-size: 11px; font-weight: 600; color: var(--bd-4); letter-spacing: .3px; }
.approach dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.approach dt { color: var(--faint); }
.approach dd { margin: 0; text-align: right; }
.approach dd b { font-family: var(--font-num); font-size: 14px; color: var(--ink); font-weight: 500; }
.approach dd i { font-style: normal; display: block; font-size: 10.5px; color: var(--haze); }
.approach.far { background: var(--glass-2); border-color: var(--ridge); }
.approach.far h3 { color: var(--haze); }

/* ── 우: 레이어·비교·상태 ───────────────────────────────── */
.hud-right { grid-area: right; align-self: start; max-height: 100%; }
.pane { padding: 13px var(--pad); border-bottom: 1px solid var(--ridge-2); }
.pane:last-child { border-bottom: none; }
.pane-title {
  margin: 0 0 10px; font-size: 10.5px; font-weight: 600;
  color: var(--haze); letter-spacing: 1.1px; text-transform: uppercase;
}

.agency-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.agency-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  border: 1px solid var(--ridge);
  background: rgba(9, 14, 27, .8);
  color: var(--faint); font-size: 11.5px; font-family: inherit;
  cursor: pointer; transition: .15s; user-select: none;
}
.agency-chip .swatch { width: 16px; height: 3px; border-radius: 2px; background: currentColor; }
.agency-chip.on { color: var(--ink); border-color: color-mix(in srgb, var(--agency) 55%, transparent); }
.agency-chip.on .swatch { background: var(--agency); box-shadow: 0 0 10px var(--agency); }
.agency-chip.off { opacity: .5; }
.agency-chip.off .swatch { background: var(--faint); }
.agency-chip.dead { opacity: .28; cursor: not-allowed; }
.agency-chip.dead .swatch { background: var(--faint); }

.switch {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 0; font-size: 12px; color: var(--haze); cursor: pointer;
}
.switch input { accent-color: var(--bd-1); width: 14px; height: 14px; cursor: pointer; }
.switch:hover { color: var(--ink); }

.slider-row {
  display: flex; align-items: center; gap: 9px;
  padding: 2px 0 8px 23px; font-size: 10.5px; color: var(--faint);
}
.slider-row input[type=range] { flex: 1 1 auto; accent-color: var(--bd-3); height: 3px; cursor: pointer; }

.source-status { display: flex; flex-direction: column; gap: 6px; }
.status-row { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; }
.led { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; transform: translateY(-2px); }
.led-ok { background: var(--bd-1); box-shadow: 0 0 7px var(--bd-1); }
.led-empty { background: #3b4767; }
.led-skipped { background: var(--bd-2); }
.led-error { background: var(--bd-4); box-shadow: 0 0 7px var(--bd-4); }
.status-name { flex: 0 0 92px; color: var(--ink); }
.status-msg {
  flex: 1 1 auto; color: var(--faint); font-size: 10.5px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.compare-wrap { overflow-x: auto; }
.compare-wrap::-webkit-scrollbar { height: 6px; }
.compare-wrap::-webkit-scrollbar-thumb { background: #26314f; border-radius: 3px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 11px; }
table.compare th, table.compare td {
  padding: 6px 5px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--ridge-2);
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}
table.compare th { color: var(--faint); font-weight: 400; font-size: 10px; letter-spacing: .3px; }
table.compare td:first-child, table.compare th:first-child { text-align: left; font-family: var(--font-ui); }
.src-tag { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.src-tag i { width: 10px; height: 3px; border-radius: 2px; flex: 0 0 auto; }
.src-when { display: block; font-size: 9.5px; color: var(--faint); padding-left: 16px; }
.cell-sub { display: block; font-size: 9.5px; color: var(--faint); }
.cell-off { color: var(--faint); }

.note { margin: 10px 0 0; font-size: 10px; line-height: 1.6; color: var(--faint); }

/* ── 과거 재생 ──────────────────────────────────────────── */
/* 과거 상태를 현재로 오해하면 상황판에서 치명적이다 — 눈에 띄게 표시한다. */
.replay-badge {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 197, 61, .12);
  border: 1px solid rgba(255, 197, 61, .5);
  color: var(--bd-2);
  font-size: 12px; white-space: nowrap;
}
.replay-badge[hidden] { display: none; }
.replay-badge b { font-family: var(--font-num); font-weight: 500; color: #fff; }
.replay-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--bd-2);
  box-shadow: 0 0 8px var(--bd-2);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }
.replay-exit {
  border: 1px solid rgba(255, 197, 61, .55); border-radius: 999px;
  background: transparent; color: var(--bd-2);
  font-family: inherit; font-size: 11px; padding: 2px 9px; cursor: pointer;
}
.replay-exit:hover { background: rgba(255, 197, 61, .18); }

.replay-controls { display: flex; align-items: center; gap: 5px; }
.rp-btn {
  min-width: 28px; height: 26px; padding: 0 7px;
  border: 1px solid var(--ridge); border-radius: 7px;
  background: rgba(14, 21, 40, .8); color: var(--haze);
  font-family: inherit; font-size: 11px; cursor: pointer; transition: .15s;
}
.rp-btn:hover { color: var(--ink); border-color: #35486f; }
.rp-btn:disabled { opacity: .35; cursor: default; }
.rp-play { min-width: 66px; color: var(--ink); border-color: #35486f; }
.rp-play.playing { color: var(--bd-2); border-color: var(--bd-2); }
.rp-speed { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--faint); }
.rp-speed select {
  background: rgba(14, 21, 40, .9); color: var(--haze);
  border: 1px solid var(--ridge); border-radius: 6px;
  font-family: inherit; font-size: 10.5px; padding: 2px 4px;
}
.rp-hint { font-size: 10px; color: var(--faint); margin-left: 4px; }

.tl-hit { cursor: ew-resize; touch-action: none; }
.tl-head-line { stroke: var(--bd-2); stroke-width: 1.2; }
.tl-head-dot { stroke: #04060e; stroke-width: 1.5; }
.tl-head-text {
  fill: var(--bd-2); font-size: 10px; font-family: var(--font-num);
}

/* ── 하단: 강도 타임라인 ────────────────────────────────── */
.hud-bottom { grid-area: bottom; padding: 10px 16px 12px; }
.timeline-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 4px; flex-wrap: wrap;
}
.timeline-head .timeline-legend { margin-left: auto; }
.timeline-head .pane-title { margin: 0; }
.timeline-legend { display: flex; gap: 14px; font-size: 10px; color: var(--faint); }
.timeline-legend span { display: flex; align-items: center; gap: 5px; }
.timeline-legend i { width: 12px; height: 2px; border-radius: 1px; }
.timeline { width: 100%; height: 104px; }
.timeline svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tl-axis { stroke: var(--ridge-2); stroke-width: 1; }
.tl-tick { fill: var(--faint); font-size: 9.5px; font-family: var(--font-num); }
.tl-label { fill: var(--haze); font-size: 10px; font-family: var(--font-ui); }
.tl-now { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; opacity: .55; }
.tl-peak { fill: var(--bd-4); font-size: 10px; font-family: var(--font-num); }

.map-note {
  position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%);
  padding: 6px 13px; border-radius: 999px;
  background: rgba(4, 6, 14, .84); border: 1px solid var(--ridge);
  font-size: 10.5px; color: var(--haze);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.map-note.show { opacity: 1; }

/* ── 지도 위 요소 ───────────────────────────────────────── */
.eye-marker { position: relative; }
.eye-spiral {
  position: absolute; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    color-mix(in srgb, var(--grade) 3%, transparent),
    var(--grade) 42%,
    color-mix(in srgb, var(--grade) 3%, transparent));
  animation: spin 3.4s linear infinite;
}
.eye-core {
  position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px #fff, 0 0 26px var(--grade);
}
.eye-pulse {
  position: absolute; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; border: 1.5px solid var(--grade);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(.55); opacity: .85; }
  100% { transform: scale(2.6); opacity: 0; }
}
.eye-name {
  position: absolute; left: 26px; top: -9px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  text-shadow: 0 0 5px #000, 0 0 12px #000, 0 1px 2px #000;
}

.tau-node { border-radius: 50%; border: 1.5px solid rgba(4,6,14,.85); }
.tau-text {
  position: absolute; left: 13px; top: -4px;
  font-family: var(--font-num); font-size: 9.5px; font-weight: 500;
  white-space: nowrap; text-shadow: 0 0 4px #000, 0 0 9px #000;
}

/* 예보경로 — 진행 방향으로 흐른다 */
.track-forecast { stroke-dasharray: 9 7; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -16; } }

.leaflet-popup-content-wrapper {
  background: rgba(9, 14, 27, .95); color: var(--ink);
  border: 1px solid var(--ridge); border-radius: 10px;
  backdrop-filter: blur(10px);
}
.leaflet-popup-tip { background: rgba(9, 14, 27, .95); border: 1px solid var(--ridge); }
.leaflet-popup-content { margin: 11px 13px; font-size: 12px; line-height: 1.65; }
.leaflet-popup-close-button { color: var(--faint) !important; }
.pop-head {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--ridge-2);
}
.pop-src { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 5px; color: var(--abyss); }
.pop-kind { font-size: 12px; font-weight: 600; }
.pop-row { display: flex; justify-content: space-between; gap: 18px; }
.pop-row span { color: var(--faint); }
.pop-row b { font-family: var(--font-num); font-weight: 500; }

.leaflet-tooltip {
  background: rgba(4,6,14,.9); border: 1px solid var(--ridge); color: var(--haze);
  font-size: 10.5px; border-radius: 6px;
}
.leaflet-tooltip::before { display: none; }

.empty-msg { color: var(--faint); font-size: 12px; line-height: 1.7; padding: 14px; }

/* ── 접근성·반응형 ──────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--bd-1); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .brand-eye, .grade-ring::before, .eye-spiral, .icon-btn.busy, .replay-dot { animation: none; }
  .eye-pulse { display: none; }
  .track-forecast { animation: none; }
  * { transition: none !important; }
}

@media (max-width: 1440px) {
  .hud { grid-template-columns: 284px 1fr 340px; }
}

@media (max-width: 1180px) {
  .hud { grid-template-columns: 264px 1fr 306px; }
  .gauge-name { font-size: 22px; }
  .storm-tab .tab-metric { display: none; }
}

@media (max-width: 900px) {
  html, body { overflow: auto; }
  #map { position: sticky; top: 0; height: 54vh; min-height: 320px; }
  .hud {
    position: static; display: flex; flex-direction: column;
    padding: 0 10px 10px; gap: 10px;
  }
  .hud-top {
    position: sticky; top: 0; z-index: 20;
    flex-wrap: wrap; margin: 0 -10px; row-gap: 8px;
    /* 스크롤되는 내용 위에 고정되므로 그라디언트가 아니라 불투명 배경이어야 한다 */
    background: rgba(4, 6, 14, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ridge);
  }
  .replay-badge { order: 4; width: 100%; justify-content: space-between; }
  .storm-tabs { order: 3; width: 100%; }
  .replay-controls { width: 100%; }
  .rp-hint { display: none; }
  .top-right { margin-left: auto; }
  .hud-left, .hud-right, .hud-bottom { max-height: none; }
  .map-note { display: none; }
  .timeline { height: 92px; }
}
