﻿/* 看飛機 — 戶外烈日、單手；深色 OLED 預設，data-theme="light" 淺色 */
:root {
  --bg: #0b0e14;
  --card: #151a24;
  --card2: #1c2330;
  --card3: #232b3a;
  --chip-bg: #263042;
  --line: #232b3a;
  --line2: #2b3448;
  --faint: #3b4763;
  --dimmer: #566179;
  --dim: #97a3b6;
  --dim2: #97a3b6;
  --fg2: #a9b4c7;
  --fg: #e8edf5;
  --fg-bright: #e8edf5;
  --green: #4ade80;
  --on-green: #062514;
  --yellow: #fbbf24;
  --amber: #fbbf24;
  --red: #f87171;
  --orange: #fb923c;
  --blue: #7dd3fc;
  --star: #fbbf24;
  --warn-bg: #33270a;
  --warn-bg2: #3a2c08;
  --warn-line: #6b5310;
  --danger-bg: #3d1412;
  --danger-line: #7f2420;
  --overlay-92: rgba(11, 14, 20, 0.92);
  --overlay-82: rgba(11, 14, 20, 0.82);
  --overlay-60: rgba(11, 14, 20, 0.6);
  --backdrop: rgba(0, 0, 0, 0.6);
  --icon-shadow: rgba(0, 0, 0, 0.8);
  --hilite: rgba(255, 255, 255, 0.1);
  --green-soft: rgba(74, 222, 128, 0.25);
  --orange-soft: rgba(251, 146, 60, 0.16);
  --amber-soft: rgba(251, 191, 36, 0.14);
  --vf-bg: #000;
  --label-halo: #000;
}
:root[data-theme="light"] {
  --bg: #eef1f6;
  --card: #ffffff;
  --card2: #f3f5fa;
  --card3: #e9edf4;
  --chip-bg: #e5eaf2;
  --line: #d9e0ea;
  --line2: #c4cedd;
  --faint: #a9b5c7;
  --dimmer: #7c8aa0;
  --dim: #57667c;
  --dim2: #57667c;
  --fg2: #33445c;
  --fg: #16202e;
  --fg-bright: #0a1220;
  --green: #15803d;
  --on-green: #ffffff;
  --yellow: #b45309;
  --amber: #b45309;
  --red: #dc2626;
  --orange: #c2410c;
  --blue: #0369a1;
  --star: #d97706;
  --warn-bg: #fdf1d4;
  --warn-bg2: #fbe9bd;
  --warn-line: #e6a817;
  --danger-bg: #fde3e3;
  --danger-line: #ef7070;
  --overlay-92: rgba(255, 255, 255, 0.94);
  --overlay-82: rgba(255, 255, 255, 0.85);
  --overlay-60: rgba(255, 255, 255, 0.6);
  --backdrop: rgba(15, 23, 42, 0.4);
  --icon-shadow: rgba(255, 255, 255, 0.9);
  --hilite: rgba(0, 0, 0, 0.06);
  --green-soft: rgba(21, 128, 61, 0.16);
  --orange-soft: rgba(194, 65, 12, 0.13);
  --amber-soft: rgba(180, 83, 9, 0.14);
  --vf-bg: #ffffff;
  --label-halo: rgba(255, 255, 255, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  line-height: 1.45;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
.dim { color: var(--dim); }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px
           calc(env(safe-area-inset-bottom, 0px) + 76px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── 1. 跑道方向列 ─────────────────────────── */
#statusBar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.status-row.sub { margin-top: 4px; font-size: 0.85rem; color: var(--dim); }
.runway-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.runway-label { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.02em; }
.runway-source { font-size: 0.75rem; color: var(--dim); }
.conf-dots { display: inline-flex; gap: 3px; }
.conf-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); display: inline-block;
}
.conf-dots i.on { background: var(--green); }
.data-status { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.data-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.data-status[data-state="ok"] .dot { background: var(--green); }
.data-status[data-state="degraded"] .dot { background: var(--yellow); }
.data-status[data-state="lost"] .dot { background: var(--red); animation: blink 1s infinite; }
.data-status[data-state="degraded"] { color: var(--yellow); }
.data-status[data-state="lost"] { color: var(--red); }
@keyframes blink { 50% { opacity: 0.25; } }
.wind-info { font-variant-numeric: tabular-nums; }

/* ── 橫幅 ─────────────────────────────────── */
#banners { display: flex; flex-direction: column; gap: 8px; }
#banners:empty { display: none; }
.banner {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: var(--card2);
}
.banner .banner-actions { margin-left: auto; display: flex; gap: 8px; }
.banner button {
  padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 0.9rem;
  background: var(--hilite);
}
.banner-warn { background: var(--warn-bg2); border-color: var(--warn-line); color: var(--yellow); }
.banner-danger {
  background: var(--danger-bg); border-color: var(--danger-line); color: var(--red);
  font-size: 1.25rem; animation: pulse-bg 0.8s ease-in-out infinite;
}
@keyframes pulse-bg { 50% { filter: brightness(1.35); } }
.banner-info { color: var(--fg); }

/* ── 2. 主倒數卡 ───────────────────────────── */
.main-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 40dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 14px;
  position: relative;
  transition: background 0.3s, border-color 0.3s;
}
.main-empty .big { font-size: 1.35rem; font-weight: 700; }
.main-empty .dim { margin-top: 6px; font-size: 0.95rem; }
.main-content { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }

.phase-tag {
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--dim); text-transform: uppercase;
}
.main-eta {
  font-size: clamp(4.2rem, 26vw, 8.5rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--green);
}
.main-eta.range { font-size: clamp(2.4rem, 13vw, 4.5rem); }
.main-eta.lost { color: var(--dim); }
.main-hint {
  font-size: 1.5rem; font-weight: 900; color: var(--bg);
  background: var(--yellow); border-radius: 999px;
  padding: 6px 22px; animation: pulse-bg 0.7s infinite;
}
.main-flight {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  justify-content: center; margin-top: 8px;
}
.main-flight .cs { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.03em; }
.chip {
  font-size: 0.9rem; font-weight: 700; padding: 2px 9px; border-radius: 7px;
  background: var(--card2); border: 1px solid var(--line); color: var(--fg);
}
.chip.prop { color: var(--yellow); border-color: var(--warn-line); }
.reg { color: var(--dim); font-size: 1rem; }
.main-dir {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: 1.05rem; font-weight: 600;
}
.dir-arrow {
  width: 26px; height: 26px; fill: var(--green);
  transition: transform 0.8s ease;
}
/* imminent：卡片變色 */
.main-card[data-phase="imminent"] {
  background: var(--warn-bg);
  border-color: var(--yellow);
}
.main-card[data-phase="imminent"] .main-eta { color: var(--yellow); }
.main-card[data-phase="goaround"] { border-color: var(--red); }
.main-card[data-phase="goaround"] .main-eta { color: var(--red); }

/* ── 3. 排隊清單 ───────────────────────────── */
.sec-title { font-size: 0.85rem; font-weight: 700; color: var(--dim); letter-spacing: 0.1em; margin: 2px 4px; }
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-empty { text-align: center; font-size: 0.9rem; padding: 8px; }
.queue-empty.off { display: none; }
.q-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.q-row.guided { opacity: 0.55; filter: grayscale(0.6); }
.q-pin {
  font-size: 1.5rem; line-height: 1; color: var(--line);
  padding: 4px 6px; min-width: 40px; min-height: 40px;
}
.q-pin.on { color: var(--star); }
.q-main { min-width: 0; }
.q-cs { font-size: 1.15rem; font-weight: 800; }
.q-sub { font-size: 0.85rem; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; }
.q-eta {
  text-align: right; font-variant-numeric: tabular-nums;
  font-size: 1.3rem; font-weight: 800; color: var(--green); white-space: nowrap;
}
.q-eta.range { font-size: 1rem; color: var(--fg); }
.q-phase {
  font-size: 0.75rem; font-weight: 700; padding: 1px 7px; border-radius: 6px;
  background: var(--card2); border: 1px solid var(--line); color: var(--dim);
}
.q-phase[data-phase="imminent"] { color: var(--bg); background: var(--yellow); border-color: var(--yellow); }
.q-phase[data-phase="final"] { color: var(--green); border-color: var(--green); }
.q-phase[data-phase="goaround"] { color: #fff; background: var(--red); border-color: var(--red); }

/* ── 4. 拍點列 ─────────────────────────────── */
.spot-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.spot-pick { text-align: left; display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.spot-pick-label { font-size: 0.72rem; color: var(--dim); letter-spacing: 0.1em; }
.spot-name { font-size: 1.1rem; font-weight: 800; }
.spot-name::after { content: " ▾"; color: var(--dim); font-size: 0.85rem; }
.spot-meta { font-size: 0.8rem; color: var(--dim); }
.gps-toggle {
  display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700;
  color: var(--dim); white-space: nowrap; cursor: pointer;
}
.gps-toggle input { width: 20px; height: 20px; accent-color: var(--green); }
.gps-toggle:has(input:checked) { color: var(--green); }

/* ── 底部列 ───────────────────────────────── */
.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px;
  justify-content: center;
  padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: var(--overlay-92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.bar-btn {
  flex: 1; max-width: 260px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: 800;
}
.bar-btn:active { background: var(--line); }

/* ── 頭頂通過 全螢幕接管 ────────────────────── */
.overhead-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--vf-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; text-align: center; padding: 24px;
}
.overhead-overlay[hidden] { display: none; }
.oh-title {
  font-size: clamp(2.6rem, 13vw, 5rem);
  font-weight: 900; color: var(--green);
  animation: pulse-bg 0.8s infinite;
}
.oh-flight { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: center; }
.oh-flight .cs { font-size: 2.2rem; font-weight: 800; }
.oh-hint { color: var(--dim); font-size: 1rem; }

/* ── Bottom sheets ────────────────────────── */
.sheet-back {
  position: fixed; inset: 0; z-index: 40;
  background: var(--backdrop);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  max-height: 75dvh;
  overflow-y: auto;
  padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.sheet-back[hidden], .sheet[hidden] { display: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sheet-head h3 { font-size: 1.15rem; }
.sheet-close, .sheet-danger {
  padding: 8px 14px; border-radius: 10px; font-weight: 700;
  background: var(--card2); border: 1px solid var(--line);
}
.sheet-danger { color: var(--red); border-color: var(--danger-line); }
.spot-list, .rec-list { display: flex; flex-direction: column; gap: 8px; }
.spot-item {
  width: 100%; text-align: left;
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px;
}
.spot-item.cur { border-color: var(--green); }
.spot-item .n { font-size: 1.05rem; font-weight: 800; }
.spot-item .d { font-size: 0.85rem; color: var(--dim); margin-top: 2px; }
.rec-item {
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.rec-item .t { color: var(--dim); font-size: 0.85rem; }
.rec-item .cs { font-weight: 800; }
.rec-item .m { color: var(--dim); font-size: 0.85rem; }
.rec-empty { text-align: center; padding: 12px; font-size: 0.9rem; }
.rec-empty.off { display: none; }

/* ── 取景模式 ─────────────────────────────── */
body.viewfinder { background: var(--vf-bg); }
body.viewfinder .hide-vf { display: none !important; }
body.viewfinder #app { padding: 0; max-width: none; }
body.viewfinder .main-card {
  position: fixed; inset: 0; z-index: 30;
  border: 0; border-radius: 0;
  background: var(--vf-bg) !important;
  min-height: 100dvh;
  justify-content: center;
}
body.viewfinder .main-eta { font-size: clamp(5rem, 34vw, 12rem); }
body.viewfinder .main-flight .cs { font-size: 2.2rem; }
.vf-exit-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  left: 0; right: 0;
  text-align: center; color: var(--dim); font-size: 0.9rem;
}

/* ── 桌面 RWD ─────────────────────────────── */
/* 桌面版：左欄地圖（黏著）＋右欄倒數與清單；所有區塊都要有格線落點，
   否則新加的區塊會掉進自動排版把版面打亂（2026-07-23 使用者回報） */
@media (min-width: 900px) {
  #app {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(400px, 1.1fr) minmax(400px, 1fr);
    grid-template-areas:
      "status  status"
      "loc     loc"
      "banners banners"
      "map     tabs"
      "map     main"
      "map     queue"
      "map     bestspot"
      "map     dep"
      "spot    queue2";
    grid-template-rows: auto auto auto auto auto auto auto auto 1fr;
    align-items: start;
    column-gap: 16px;
    padding-bottom: 90px;
  }
  #statusBar { grid-area: status; }
  #locRow { grid-area: loc; margin: 0; }
  #banners { grid-area: banners; }
  #mapSection {
    grid-area: map;
    margin: 0;
    height: calc(100dvh - 260px);
    min-height: 420px;
    max-height: 720px;
    position: sticky;
    top: 12px;
  }
  #tabRow { grid-area: tabs; margin: 0; }
  #mainCard { grid-area: main; min-height: 38vh; }
  #queueSection { grid-area: queue; }
  #bestSpotBar { grid-area: bestspot; }
  #depSection { grid-area: dep; }
  #spotBar { grid-area: spot; align-self: end; }
  /* 佔位：右欄底部延伸，避免內容短時左右高度失衡 */
  #app::after { content: ""; grid-area: queue2; }
  /* 收合按鈕在桌面版也要贏過 id 高度設定 */
  #mapSection.collapsed { height: 44px; min-height: 44px; }
}

/* ───────── 進場雷達地圖 ───────── */
.map-section {
  position: relative;
  /* 關鍵：把 Leaflet 內部的高 z-index（最高 ~800）關進自己的堆疊上下文，
     否則地圖會浮在拍點選單／頭頂接管等彈層之上（2026-07-23 實機截圖） */
  isolation: isolate;
  z-index: 0;
  margin: 0 12px 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: height .25s ease;
  height: 34vh;
  min-height: 180px;
}
.map-section.collapsed { height: 44px; min-height: 44px; }
.map-section.collapsed #mapView { pointer-events: none; }
#mapView { position: absolute; inset: 0; background: var(--bg); }
.map-toggle {
  position: absolute; right: 8px; top: 8px; z-index: 800;
  background: var(--overlay-82); color: var(--fg, var(--fg));
  border: 1px solid var(--line2); border-radius: 8px;
  padding: 4px 10px; font-size: .85rem;
}
.leaflet-container { background: var(--bg); font: inherit; }
.leaflet-control-attribution {
  background: var(--overlay-60) !important; color: var(--dimmer) !important; font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--dimmer) !important; }
.ac-icon { filter: drop-shadow(0 1px 2px var(--icon-shadow)); }
.ac-label {
  text-align: center; white-space: nowrap; pointer-events: none;
  text-shadow: 0 1px 3px var(--label-halo), 0 0 6px var(--label-halo);
}
.ac-label b { display: block; color: var(--fg); font-size: 11px; font-weight: 700; }
.ac-label i { display: block; color: var(--green); font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; }
.rw-label { color: var(--fg); font-size: 11px; font-weight: 800; text-align: center; text-shadow: 0 1px 3px var(--label-halo); }
.ring-label { color: var(--faint); font-size: 9px; text-align: center; }
.spot-marker { position: relative; }
.spot-dot {
  position: absolute; inset: 6px; border-radius: 50%;
  background: var(--green-soft); border: 2px solid var(--green);
}
.spot-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 11px; }

/* ───────── 模式分頁＋篩選 chips ───────── */
.tab-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 0 12px 10px;
}
.seg {
  display: inline-flex; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: var(--dim);
  padding: 7px 16px; border-radius: 999px; font-size: .95rem; font-weight: 600;
  white-space: nowrap;
}
.seg.small button { padding: 6px 11px; font-size: .82rem; }
.seg button.active { background: var(--chip-bg); color: var(--fg); }
#modeTabs button.active { background: var(--green, var(--green)); color: var(--on-green); }

/* ───────── 主卡上緣 chips ───────── */
.main-top { display: flex; align-items: center; gap: 8px; }
.now-chip {
  background: var(--chip-bg); color: var(--fg2); font-size: .78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .1em;
}
.rw-chip {
  background: var(--orange-soft); color: var(--orange); font-size: .78rem; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}

/* ───────── 清單：分鐘大字開頭（仿鐵道雷達） ───────── */
.q-eta-min {
  min-width: 56px; text-align: center; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.q-eta-min .n { display: block; font-size: 1.5rem; font-weight: 800; color: var(--fg); }
.q-eta-min .u { display: block; font-size: .7rem; color: var(--dim); }
.q-eta-min.t2 .n { color: var(--green, var(--green)); }
.dimmer { color: var(--dimmer); font-size: .82rem; }
.dep-status { font-weight: 800; color: var(--orange); }
.wb-chip, .chip.wb {
  background: var(--amber-soft); color: var(--amber); font-weight: 800;
  font-size: .72rem; padding: 2px 8px; border-radius: 999px;
}
.spot-group {
  list-style: none; color: var(--dimmer); font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; padding: 10px 4px 4px;
}
.sched-time { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.sched-time .n { display: block; font-size: 1.15rem; font-weight: 800; color: var(--fg2); }
.sched-time .u { display: block; font-size: .68rem; color: var(--dimmer); }
.sched-status-delay { color: var(--amber); }
.sched-status-cancel { color: var(--red); }

/* ───────── 白話資訊（航空公司＋機型＝主角，編號降級） ───────── */
.main-headline {
  font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  font-weight: 800; color: var(--fg);
  margin-top: 2px;
}
.main-badges { display: flex; gap: 8px; }
.main-badges:empty { display: none; }
.main-origin {
  font-size: 1.05rem; font-weight: 700; color: var(--fg2);
}
.main-flight.codes { margin-top: 2px; opacity: 0.72; }
.main-flight.codes .cs { font-size: 1.05rem; font-weight: 700; color: var(--dim); letter-spacing: 0.04em; }
.main-flight.codes .chip { font-size: 0.78rem; padding: 1px 7px; }
.main-flight.codes .reg { font-size: 0.85rem; }
.q-al { color: var(--fg2); font-weight: 700; }
.q-org { color: var(--fg2); }

/* ───────── 首頁：表定序列＋現在最佳拍點 ───────── */
.q-later { opacity: 0.85; }
.q-later .sched-time .n { font-size: 1.05rem; color: var(--fg2); }
#nextSchedList { margin-top: 8px; }
#nextSchedList:empty { display: none; }
.best-spot {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.best-spot .bs-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.best-spot .bs-label { font-size: .75rem; font-weight: 700; color: var(--dim); letter-spacing: .1em; }
.best-spot .bs-name { font-size: 1.1rem; font-weight: 800; }
.best-spot .bs-why { font-size: .85rem; color: var(--fg2); }
.best-spot .bs-go {
  margin-left: auto; flex: none;
  background: var(--green); color: var(--on-green);
  font-weight: 800; padding: 8px 16px; border-radius: 999px;
}

/* ───────── 今天值得去嗎（brief） ───────── */
#briefSection { display: flex; flex-direction: column; gap: 10px; }
.brief-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.brief-head { font-size: .85rem; font-weight: 700; color: var(--dim); letter-spacing: .12em; }
.brief-gold {
  font-size: clamp(1.9rem, 9vw, 2.6rem); font-weight: 800;
  color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.brief-gold-sub { font-size: 1.02rem; font-weight: 700; color: var(--fg2); }
.brief-cond { margin-top: 6px; font-size: .92rem; color: var(--dim); display: flex; flex-direction: column; gap: 3px; }
.brief-note { padding: 4px 6px; }
.brief-note a { color: var(--dimmer); }
.light-front { color: var(--green); }
.light-side { color: var(--amber); }
.light-back { color: var(--red); }
.light-night { color: var(--dimmer); }
#briefSection .sched-time .n { font-size: 1.02rem; }

/* ───────── 定位列（機場切換＋拍點＋GPS，置頂） ───────── */
.loc-row {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px; flex-wrap: wrap;
}
.loc-row .gps-toggle { margin-left: auto; }
.spot-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  font-weight: 700; max-width: 46vw;
}
.spot-chip .spot-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .95rem;
}
.spot-chip .caret { color: var(--dim); font-size: .8rem; }
.status-right { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  font-size: 1rem; line-height: 1; padding: 4px 6px;
  border-radius: 8px; background: var(--card2); border: 1px solid var(--line);
}

/* hidden 屬性永遠贏過任何 display 規則（.main-content 曾因 display:flex 蓋掉 hidden 造成空狀態與舊倒數疊影） */
[hidden] { display: none !important; }

