/* app.css — 歌航日誌 demo PWA
   視覺方向 v0.7：復古航電儀表 × デンモク點陣（Flight Plan 駕駛艙的「做到底」版）
   材質系統——同一個艙內有五種不同的東西，不再是同一種卡片：
     .bezel      儀表本體（內凹、四角螺絲、玻璃反光）
     .ann-col    annunciator 警示燈鍵列（方形、燈亮=模式）
     .statusline CDU 綠磷光狀態行
     .panel      設備架卡（flight strip 的架子）
     .placard    貼在艙壁的說明銘板（平面、鉚釘虛線）
   讀數材質：DotGothic16 點陣字＝「點歌機遙控器的 LED 面板」，全站唯一最亮層。
   字體：Martian Mono（微標籤）+ Shippori Mincho B1（品牌）+ DotGothic16（讀數）+ 系統 CJK（內文）。 */

:root {
  --ink-0: #09070a;
  --ink-1: #100b0e;
  --panel: #10161f;
  --panel-2: #151d28;
  --line: #232f3d;
  --line-soft: #1a2430;
  --metal-hi: rgba(255, 255, 255, .055);
  --text: #e9eff5;
  --dim: #93a5b6;
  --faint: #5d6e7e;
  --amber: #f5b942;
  --amber-hot: #ffd980;      /* 主讀數：全站最亮 */
  --amber-dim: #a97f24;
  --green: #6fd694;
  --phos: #8ef0b0;           /* CDU 磷光 */
  --red: #e0655f;
  --mono: 'Martian Mono', ui-monospace, monospace;
  --mincho: 'Shippori Mincho B1', serif;
  --dot: 'DotGothic16', 'Martian Mono', monospace;
  --cjk: 'PingFang TC', 'Hiragino Sans', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  /* 點陣顯示窗共用材質：掃描線 + 深玻璃 */
  --disp-bg: linear-gradient(rgba(255, 255, 255, .028), transparent 45%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px),
    #03060a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }

body {
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--cjk);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* 氛圍層：顆粒 + 暗角 + 艙內暖光（包廂的暗，但有琥珀儀表在燒）
   噪點加重且加了 mix-blend-mode：不是灑上去的濾鏡，是機殼霧面反光的顆粒感。 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .11;
  mix-blend-mode: overlay;
}
/* 細直紋：brushed-metal 機殼質感，只在低角度光下才看得出來的那種細節 */
.app::before {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: repeating-linear-gradient(91deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
  opacity: .5;
  mix-blend-mode: overlay;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 41; pointer-events: none;
  background:
    /* 艙內暖光：琥珀儀表往上打的環境反射，中心偏頭部儀表叢 */
    radial-gradient(60% 34% at 38% 30%, rgba(245, 185, 66, .05), transparent 65%),
    radial-gradient(120% 90% at 50% 12%, transparent 55%, rgba(0, 0, 0, .55));
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* 航圖格線（冷藍，圖表慣例）疊在暖艙底色上——冷格線 × 暖環境光才是儀表艙的真實對比 */
  background:
    linear-gradient(rgba(35, 48, 63, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 48, 63, .13) 1px, transparent 1px),
    linear-gradient(180deg, #171009 0%, var(--ink-1) 140px);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  position: relative;
}

/* ── header：艙頂銘板 ─────────────────────── */
header.brand {
  padding: 16px 18px 0;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #1a130a, rgba(16, 22, 31, 0));
}
.masthead { display: flex; align-items: flex-start; gap: 12px; }
.brand h1 {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: .14em;
  line-height: 1.15;
  color: var(--text);
}
.brand h1 .kou { color: var(--amber); text-shadow: 0 0 16px rgba(245, 185, 66, .45); }
.brand .sub {
  display: block; margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--faint);
  text-transform: uppercase;
  white-space: nowrap;
}
.flightno {
  margin-left: auto; text-align: right; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 5px;
  background: var(--disp-bg);
  padding: 5px 9px 3px;
}
.flightno .fl { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: .28em; color: var(--faint); }
.flightno .fno {
  font-family: var(--dot); font-size: 17px; letter-spacing: .08em;
  color: var(--amber-hot); text-shadow: 0 0 10px rgba(245, 185, 66, .6);
}
.brand .chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 3px;
  color: var(--dim); background: var(--ink-1);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.chip.demo .dot { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.chip-settings { font-size: 13px; padding: 4px 8px; margin-left: auto; }
.chip-settings:hover { color: var(--amber); }
/* 危險條紋：header 收邊的簽名細節 */
.hazard {
  height: 5px; margin-top: 12px; opacity: .5;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 7px, #10161f 7px 15px);
}

/* ── main ─────────────────────────────────── */
main { overflow-y: auto; padding: 16px 13px 28px; }
.view { display: none; }
.view.active { display: block; }

/* boot：面板逐一通電（沿用 v0.6 簽名動效） */
@keyframes boot {
  0% { opacity: 0; transform: translateY(10px); }
  60% { opacity: .4; }
  70% { opacity: .2; }
  100% { opacity: 1; transform: none; }
}
/* 點陣讀數 refresh 閃爍：每次重算都像 LED 面板刷新 */
@keyframes flick {
  0% { opacity: 0; }
  45% { opacity: .95; }
  55% { opacity: .35; }
  100% { opacity: 1; }
}
/* 指針從靜止位掃到讀數 */
@keyframes needleSwing {
  from { transform: rotate(-108deg); }
  to { transform: rotate(var(--angle)); }
}

/* ── 材質 1：設備架卡 .panel ───────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  padding: 13px 12px;
  margin-bottom: 13px;
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}

/* ── 材質 2：儀表本體 .bezel ───────────────── */
.bezel {
  position: relative;
  background: linear-gradient(180deg, #0e141d, #080c12);
  border: 1px solid #2a3644;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 var(--metal-hi),
    inset 0 -12px 26px rgba(0, 0, 0, .5),
    0 3px 10px rgba(0, 0, 0, .45);
  padding: 12px;
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}
/* 四角螺絲 */
.bezel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image:
    radial-gradient(circle 3px at 10px 10px, #43536655 0 1.4px, #0d131c 1.5px 2.7px, transparent 2.8px),
    radial-gradient(circle 3px at calc(100% - 10px) 10px, #43536655 0 1.4px, #0d131c 1.5px 2.7px, transparent 2.8px),
    radial-gradient(circle 3px at 10px calc(100% - 10px), #43536655 0 1.4px, #0d131c 1.5px 2.7px, transparent 2.8px),
    radial-gradient(circle 3px at calc(100% - 10px) calc(100% - 10px), #43536655 0 1.4px, #0d131c 1.5px 2.7px, transparent 2.8px);
}
.hero-bezel { margin-bottom: 13px; }

/* ── 材質 5：艙壁銘板 .placard ─────────────── */
.placard {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 13px;
  color: var(--dim);
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}

.panel-label, .bezel-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .24em;
  color: var(--faint); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.panel-label::after, .bezel-label::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.panel-label .zh, .bezel-label .zh { font-family: var(--cjk); font-size: 12px; letter-spacing: .3em; color: var(--dim); }
.dot-badge {
  font-family: var(--dot); font-size: 13px; color: var(--amber-hot);
  text-shadow: 0 0 8px rgba(245, 185, 66, .55);
  background: var(--disp-bg); border: 1px solid var(--line); border-radius: 3px;
  padding: 0 5px; letter-spacing: .1em;
}

/* ── 今日：儀表叢（左錶右燈，非對稱）────────── */
.cluster {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 10px;
  margin-bottom: 10px;
  align-items: stretch;
}

/* 嗓況弧形錶 */
.cond-bezel { display: grid; grid-template-rows: auto 1fr auto; }
.cond-gauge { display: block; width: 100%; height: auto; }
.cond-gauge .needle {
  animation: needleSwing .8s cubic-bezier(.3, 1.35, .45, 1) both;
  filter: drop-shadow(0 0 4px rgba(255, 217, 128, .55));
}
.cond-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 8px; }
.cond-btn {
  appearance: none; border: 1px solid var(--line); background: var(--ink-1);
  border-radius: 4px; padding: 6px 0; cursor: pointer; color: var(--faint);
  font-family: var(--dot); font-size: 14px;
  min-height: 34px;
  transition: border-color .15s, color .15s, transform .1s;
}
.cond-btn:hover { border-color: var(--faint); color: var(--dim); }
.cond-btn:active { transform: scale(.94); }
.cond-btn[aria-pressed="true"] {
  border-color: var(--amber); color: var(--amber-hot);
  background: linear-gradient(180deg, #241a06, #170f02);
  text-shadow: 0 0 8px rgba(245, 185, 66, .7);
}

/* ── 材質 3：annunciator 警示燈鍵列 ─────────── */
.ann-col {
  display: grid; grid-template-rows: auto repeat(5, 1fr); gap: 6px;
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}
.ann-btn {
  appearance: none; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  padding: 4px 9px; min-height: 36px;
  background: #0c1119; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--dim); font-family: var(--cjk); font-size: 13px;
  transition: border-color .15s, background .15s, color .15s;
}
.ann-btn .lamp {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
  background: #1c2733; border: 1px solid #26323f;
  transition: all .15s;
}
.ann-btn .code { margin-left: auto; font-family: var(--mono); font-size: 7px; letter-spacing: .14em; color: var(--faint); }
.ann-btn:hover { border-color: var(--faint); color: var(--text); }
.ann-btn:active { transform: translateY(1px); }
.ann-btn[aria-pressed="true"] {
  border-color: var(--amber-dim); color: var(--amber-hot); font-weight: 700;
  background: linear-gradient(180deg, #241a06, #170f02);
}
.ann-btn[aria-pressed="true"] .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 9px var(--amber); }
.ann-btn[aria-pressed="true"] .code { color: var(--amber-dim); }

/* ── 材質 4：CDU 磷光狀態行 ────────────────── */
.statusline {
  font-size: 12.5px; color: var(--phos);
  background: var(--disp-bg);
  border: 1px solid #14281c; border-radius: 4px;
  padding: 8px 12px 8px 30px; margin-bottom: 13px;
  position: relative;
  text-shadow: 0 0 8px rgba(142, 240, 176, .35);
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}
.statusline::before {
  content: '»'; position: absolute; left: 12px;
  font-family: var(--mono); color: var(--green);
}
.statusline b { color: var(--phos); font-weight: 700; }
.statusline::after {
  content: ''; display: inline-block; width: 7px; height: 13px;
  margin-left: 6px; vertical-align: -2px;
  background: var(--phos); opacity: .8;
  animation: cursorblink 1.1s steps(2) infinite;
}
@keyframes cursorblink { 50% { opacity: 0; } }

/* CAUTION 警示條 */
.caution {
  border: 1px solid var(--amber-dim);
  background:
    repeating-linear-gradient(-45deg, rgba(245, 185, 66, .13) 0 10px, transparent 10px 20px),
    rgba(245, 185, 66, .05);
  color: var(--amber);
  border-radius: 4px; padding: 10px 12px; margin-bottom: 12px;
  font-size: 13px; display: flex; gap: 10px; align-items: center;
}
.caution .tag { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; border: 1px solid var(--amber-dim); padding: 2px 6px; border-radius: 3px; flex-shrink: 0; animation: cautionblink 1.6s steps(2) infinite; }
@keyframes cautionblink { 50% { opacity: .45; } }

/* ── flight strip：紙條架（打孔、微斜、抽出）── */
.strips { display: grid; gap: 7px; }
.strip {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px; align-items: center;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 3px 8px 8px 3px;
  padding: 9px 10px 9px 20px;
  cursor: pointer;
  min-height: 60px;
  position: relative;
  transition: border-color .15s, background .15s, transform .18s;
  /* 架上打孔 */
  background-image:
    radial-gradient(circle 2.6px at 9px 30%, #04060a 0 2.2px, #202c39 2.3px 2.6px, transparent 2.7px),
    radial-gradient(circle 2.6px at 9px 70%, #04060a 0 2.2px, #202c39 2.3px 2.6px, transparent 2.7px);
}
/* 紙條插架不會完全對齊——打破機器感 */
.strips .strip:nth-child(odd) { transform: rotate(-.4deg); }
.strips .strip:nth-child(even) { transform: rotate(.35deg) translateX(2px); }
.strip:hover, .strip:focus-visible {
  background-color: var(--panel-2); border-color: var(--faint);
  transform: translateX(6px) rotate(0deg); /* 从架上抽出來看 */
}
.strip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.strip.t-solid { border-left-color: var(--green); }
.strip.t-est { border-left-color: var(--amber); }
.strip.t-exp { border-left-color: var(--faint); border-left-style: dashed; }

/* key 讀數窗：每張紙條上鑲一小塊 LED 面板 */
.strip .keybox {
  text-align: center;
  display: grid; gap: 2px; justify-items: center;
  background: var(--disp-bg);
  border: 1px solid #1c2836; border-radius: 4px;
  padding: 6px 3px 4px;
  animation: flick .35s both;
}
.strip.t-exp .keybox { border-style: dashed; }
.strip .keybox .k { font-family: var(--dot); font-size: 19px; letter-spacing: .02em; }
.strip.t-solid .keybox .k { color: var(--green); text-shadow: 0 0 9px rgba(111, 214, 148, .65); }
.strip.t-est .keybox .k { color: var(--amber-hot); text-shadow: 0 0 9px rgba(245, 185, 66, .6); }
.strip.t-exp .keybox .k { color: var(--faint); font-size: 15px; }
.strip .keybox .t { font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: var(--faint); }

.strip .meta { min-width: 0; }
.strip .title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .artist { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .why { font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.strip .tags { display: inline-flex; gap: 4px; margin-left: 6px; }
.strip .tags i { font-style: normal; font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }

.fav-btn {
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 17px; color: var(--faint); padding: 8px; min-width: 40px; min-height: 40px;
  transition: color .15s, transform .1s;
}
.fav-btn:active { transform: scale(1.25); }
.fav-btn.on { color: var(--amber); text-shadow: 0 0 10px rgba(245, 185, 66, .6); }

.rank {
  font-family: var(--mono); font-size: 10px; color: var(--amber-dim);
  letter-spacing: .1em;
}

.empty-hint {
  border: 1px dashed var(--line); border-radius: 6px; padding: 18px 14px;
  color: var(--faint); font-size: 13px; text-align: center;
}

/* ── 高度儀（音域對照）─────────────────────── */
.gauge-wrap {
  background: var(--disp-bg);
  border: 1px solid #1c2836; border-radius: 6px; padding: 10px 8px 4px;
}
.bezel .gauge-wrap { border-color: #16202c; }
.gauge-wrap svg { display: block; width: 100%; height: auto; }
.gauge-legend { display: flex; gap: 14px; padding: 6px 4px 4px; flex-wrap: wrap; }
.gauge-legend span { font-size: 10.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.gauge-legend i { width: 14px; height: 5px; border-radius: 2px; display: inline-block; }
.no-range {
  border: 1px dashed var(--line); border-radius: 6px; padding: 16px;
  text-align: center; color: var(--faint);
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
}

/* 巨大讀數時刻：舒服域寬度 */
.span-readout {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 12px;
  padding: 12px 4px 2px;
}
.span-readout .cap { margin-right: auto; font-size: 11.5px; color: var(--faint); }
.span-readout .dot-num {
  font-family: var(--dot); font-size: 58px; line-height: .9;
  color: var(--amber-hot);
  text-shadow: 0 0 22px rgba(245, 185, 66, .6), 0 0 4px rgba(255, 217, 128, .8);
  animation: flick .4s both;
}
.span-readout .unit {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em;
  color: var(--faint); line-height: 1.6; text-align: left;
}
.span-readout .unit .zh { display: block; font-family: var(--cjk); font-size: 10px; letter-spacing: .05em; color: var(--dim); }

/* ── key dial ─────────────────────────────── */
.dial { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; align-items: center; }
.dial button {
  appearance: none; cursor: pointer; min-height: 62px;
  background: linear-gradient(180deg, #151d28, #0c1119); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -4px 8px rgba(0, 0, 0, .4);
  font-family: var(--mono); font-size: 20px; font-weight: 700;
  transition: border-color .15s, transform .08s;
}
.dial button:hover { border-color: var(--amber); }
.dial button:active { transform: scale(.94); }
.dial button:disabled { opacity: .3; cursor: default; }
.dial .val {
  text-align: center;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 6px;
  padding: 7px 4px 5px;
}
.dial .val .num {
  font-family: var(--dot); font-size: 44px; line-height: 1;
  color: var(--amber-hot);
  text-shadow: 0 0 18px rgba(245, 185, 66, .65), 0 0 4px rgba(255, 217, 128, .9);
  animation: flick .35s both;
}
.dial .val .lbl { font-family: var(--mono); font-size: 8px; letter-spacing: .24em; color: var(--faint); margin-top: 3px; }
.dial-reset {
  margin-top: 8px; width: 100%;
  appearance: none; cursor: pointer; min-height: 40px;
  background: none; border: 1px dashed var(--line); border-radius: 6px;
  color: var(--dim); font-size: 12px; font-family: var(--cjk);
}
.dial-reset:hover { border-color: var(--amber); color: var(--amber); }

/* reasons */
.reasons { display: grid; gap: 6px; }
.reasons li {
  list-style: none; font-size: 13px; color: var(--dim);
  padding-left: 16px; position: relative;
}
.reasons li::before {
  content: '»'; position: absolute; left: 0; color: var(--amber);
  font-family: var(--mono); font-size: 11px;
}
.hint-line { margin-top: 8px; font-size: 12.5px; color: var(--amber); }

/* quick log：四顆迷你儀表按鍵 */
.qlog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qlog button {
  appearance: none; cursor: pointer; min-height: 64px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--dim); display: grid; justify-items: center; align-content: center; gap: 4px;
  padding: 8px 2px; font-size: 11px;
  transition: border-color .15s, color .15s, transform .08s;
}
.qlog button:hover { color: var(--text); }
.qlog [data-log="perfect"]:hover { border-color: var(--green); }
.qlog [data-log="ok"]:hover { border-color: var(--amber); }
.qlog [data-log="strained"]:hover { border-color: #e08a4a; }
.qlog [data-log="failed"]:hover { border-color: var(--red); }
.qlog button:active { transform: scale(.94); }
.qlog-note { margin-top: 8px; font-size: 11.5px; color: var(--faint); }

/* ── song sheet（詳情覆蓋層）────────────────── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 6, 9, .72);
  backdrop-filter: blur(3px);
  display: none;
}
.sheet-backdrop.open { display: block; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; z-index: 51; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  max-height: 88dvh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 200px);
  border: 1px solid #2a3644; border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: inset 0 1px 0 var(--metal-hi), 0 -12px 40px rgba(0, 0, 0, .5);
  padding: 10px 16px 34px;
  display: none;
}
.sheet.open { display: block; animation: sheetup .28s cubic-bezier(.2, .8, .3, 1); }
@keyframes sheetup { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet .grab { width: 42px; height: 4px; background: var(--line); border-radius: 4px; margin: 2px auto 12px; }
.sheet h2 { font-size: 20px; font-weight: 700; }
.sheet .artist { color: var(--faint); font-size: 13px; margin-bottom: 4px; }
.sheet section { margin-top: 16px; }
.sheet-close {
  position: sticky; top: 0; float: right;
  appearance: none; border: 1px solid var(--line); background: var(--ink-1);
  color: var(--dim); border-radius: 999px; width: 34px; height: 34px; cursor: pointer;
  font-size: 15px;
}

/* 番号：デンモク 點陣顯示窗 */
.reqnos { display: grid; gap: 6px; }
.reqno {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #1c2836; border-radius: 4px; padding: 8px 12px;
  background: var(--disp-bg);
}
.reqno .sys { font-size: 10px; color: var(--faint); font-family: var(--mono); letter-spacing: .12em; }
.reqno .no {
  font-family: var(--dot); font-size: 21px; letter-spacing: .28em;
  color: var(--amber-hot);
  text-shadow: 0 0 12px rgba(245, 185, 66, .6);
  animation: flick .35s both;
}
.reqno.none .no { color: var(--faint); font-size: 12px; letter-spacing: .04em; font-family: var(--cjk); text-shadow: none; }

/* history（黑盒子） */
.history { display: grid; gap: 6px; }
.history li {
  list-style: none; display: flex; gap: 10px; align-items: center;
  font-size: 12.5px; color: var(--dim);
  border-bottom: 1px dashed var(--line-soft); padding-bottom: 6px;
}
.history .d { font-family: var(--mono); font-size: 10px; color: var(--faint); flex-shrink: 0; }
.history .k { font-family: var(--dot); font-size: 14px; color: var(--amber); }
.history .hres { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.history .log-ico { flex-shrink: 0; }

/* ── profile view ─────────────────────────── */
.stepper-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.stepper-row .lab { font-size: 13.5px; }
.stepper-row .lab small { display: block; color: var(--faint); font-size: 11px; font-family: var(--mono); letter-spacing: .06em; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button {
  appearance: none; cursor: pointer; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 6px;
  background: linear-gradient(180deg, #151d28, #0c1119); color: var(--text);
  box-shadow: inset 0 1px 0 var(--metal-hi);
  font-family: var(--mono); font-size: 16px;
}
.stepper button:hover { border-color: var(--amber); }
.stepper .pv {
  font-family: var(--dot); font-size: 15px; color: var(--amber-hot);
  text-shadow: 0 0 8px rgba(245, 185, 66, .5);
  min-width: 100px; text-align: center;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 4px;
  padding: 6px 4px;
}
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  appearance: none; cursor: pointer; min-height: 40px; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--dim); font-size: 13px;
  transition: all .15s;
}
.seg button:hover { border-color: var(--faint); color: var(--text); }
.seg button[aria-pressed="true"] {
  border-color: var(--green); color: var(--phos);
  background: linear-gradient(180deg, #0a1f12, #061309);
  text-shadow: 0 0 8px rgba(142, 240, 176, .5);
}
.reset-demo {
  width: 100%; margin-top: 4px; appearance: none; cursor: pointer;
  border: 1px dashed var(--red); background: none; color: var(--red);
  border-radius: 4px; min-height: 44px; font-size: 13px;
}
.privacy-note { font-size: 11.5px; color: var(--faint); margin-top: 10px; }

/* ── bottom nav：艙底控制台 ─────────────────── */
nav.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #2a3644;
  background: linear-gradient(180deg, #171009, rgba(13, 10, 8, .94));
  box-shadow: inset 0 1px 0 var(--metal-hi);
  backdrop-filter: blur(8px);
  position: sticky; bottom: 0; z-index: 30;
}
nav.tabs button {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 11px 4px calc(10px + env(safe-area-inset-bottom, 0px));
  color: var(--faint); display: grid; justify-items: center; gap: 3px;
  min-height: 58px; position: relative;
}
nav.tabs button::before {
  content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 2px;
  border-radius: 0 0 2px 2px; background: transparent; transition: background .2s;
}
nav.tabs button .zh { font-size: 13px; font-weight: 600; }
nav.tabs button .en { font-family: var(--mono); font-size: 8px; letter-spacing: .22em; }
nav.tabs button[aria-pressed="true"] { color: var(--amber); }
nav.tabs button[aria-pressed="true"]::before { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
nav.tabs button[aria-pressed="true"] .zh { text-shadow: 0 0 12px rgba(245, 185, 66, .5); }

/* toast：磷光 annunciator */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: #07130b; color: var(--phos); font-weight: 700; font-size: 13px;
  border: 1px solid var(--green);
  border-radius: 4px; padding: 9px 18px;
  text-shadow: 0 0 8px rgba(142, 240, 176, .6);
  box-shadow: 0 0 24px rgba(111, 214, 148, .3), inset 0 0 12px rgba(111, 214, 148, .08);
  animation: toastin 1.8s ease both;
  pointer-events: none;
}
@keyframes toastin {
  0% { opacity: 0; transform: translate(-50%, 12px); }
  12%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 2px;
}

/* ── 登艙簡報（PRE-FLIGHT BRIEFING）──────────
   首次啟動 onboarding 覆蓋層。材質紀律：對話框=bezel、進度=annunciator 燈、
   說明示例直接借用艙內元件（弧形錶/高度儀/strip 左緣色語），不另起風格。 */
.brf-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background:
    radial-gradient(90% 70% at 50% 20%, rgba(245, 185, 66, .04), transparent 60%),
    rgba(4, 5, 8, .88);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: fadein .25s ease;
}
.brf-dialog {
  width: min(420px, 100%);
  max-height: 92dvh; overflow-y: auto;
  padding: 16px 16px 14px;
  animation: brf-in .4s cubic-bezier(.2, .8, .3, 1) both;
  outline: none;
}
@keyframes brf-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.brf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.brf-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  color: var(--faint); text-transform: uppercase;
}
.brf-label .zh { font-family: var(--cjk); font-size: 12px; letter-spacing: .3em; color: var(--dim); }
.brf-lamps { margin-left: auto; display: flex; gap: 6px; }
.brf-lamp {
  width: 9px; height: 9px; border-radius: 2px;
  background: #1c2733; border: 1px solid #26323f;
  transition: all .2s;
}
.brf-lamp.done { background: var(--amber-dim); border-color: var(--amber-dim); }
.brf-lamp.now { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px var(--amber); animation: cautionblink 1.6s steps(2) infinite; }

.brf-body { animation: flick .35s both; }
.brf-visual {
  background: var(--disp-bg);
  border: 1px solid #1c2836; border-radius: 6px;
  padding: 14px 12px; margin-bottom: 14px;
  min-height: 120px;
  display: grid; place-items: center; gap: 10px;
}
.brf-title {
  font-size: 17.5px; font-weight: 700; margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 9px;
}
.brf-title .c {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .2em;
  color: var(--amber-dim); border: 1px solid var(--amber-dim);
  border-radius: 3px; padding: 2px 6px; flex-shrink: 0; transform: translateY(-2px);
}
.brf-text { font-size: 13.5px; color: var(--dim); line-height: 1.7; }
.brf-text b { color: var(--text); }
.brf-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 16px; }
.brf-skip {
  appearance: none; cursor: pointer; min-height: 46px; padding: 0 14px;
  background: none; border: 1px dashed var(--line); border-radius: 6px;
  color: var(--faint); font-size: 12.5px; font-family: var(--cjk);
  transition: border-color .15s, color .15s;
}
.brf-skip:hover { border-color: var(--faint); color: var(--dim); }
.brf-next {
  appearance: none; cursor: pointer; min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #241a06, #170f02);
  border: 1px solid var(--amber-dim); border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -4px 8px rgba(0, 0, 0, .4);
  color: var(--amber-hot); font-size: 14.5px; font-weight: 700; font-family: var(--cjk);
  text-shadow: 0 0 10px rgba(245, 185, 66, .5);
  transition: border-color .15s, transform .08s;
}
.brf-next:hover { border-color: var(--amber); }
.brf-next:active { transform: scale(.97); }
.brf-next .en { font-family: var(--mono); font-size: 8px; letter-spacing: .24em; color: var(--amber-dim); font-weight: 400; }

/* 簡報內的視覺示例 */
.brf-wordmark { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 8px 0; }
.brf-title-jp { font-family: var(--mincho); font-weight: 700; font-size: 34px; letter-spacing: .14em; }
.brf-title-jp .kou { color: var(--amber); text-shadow: 0 0 18px rgba(245, 185, 66, .5); }
.brf-title-sub { font-family: var(--mono); font-size: 7.5px; letter-spacing: .22em; color: var(--faint); }
.brf-flightno {
  border: 1px solid var(--line); border-radius: 5px; background: var(--ink-1);
  padding: 4px 10px 3px; display: inline-grid; justify-items: center;
}
.brf-flightno .fl { font-family: var(--mono); font-size: 6.5px; letter-spacing: .28em; color: var(--faint); }
.brf-flightno .fno { font-family: var(--dot); font-size: 15px; color: var(--amber-hot); text-shadow: 0 0 9px rgba(245, 185, 66, .6); }
.brf-gauge { width: 100%; }
.brf-gauge .cond-gauge { max-width: 210px; margin: 0 auto; display: block; }
.brf-gauge .gauge-wrap { background: none; border: none; padding: 0; }
.brf-annrow { display: grid; gap: 6px; width: 100%; max-width: 250px; }
.brf-ann {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 3px;
  background: #0c1119; color: var(--dim); font-size: 12.5px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
}
.brf-ann .lamp { width: 8px; height: 8px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; }
.brf-ann em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 7px; letter-spacing: .14em; color: var(--faint); }
.brf-ann.on { border-color: var(--amber-dim); color: var(--amber-hot); background: linear-gradient(180deg, #241a06, #170f02); }
.brf-ann.on .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px var(--amber); }
.brf-caution {
  width: 100%; max-width: 250px;
  border: 1px solid var(--amber-dim); border-radius: 4px;
  background: repeating-linear-gradient(-45deg, rgba(245, 185, 66, .12) 0 9px, transparent 9px 18px);
  color: var(--amber); font-size: 11px; padding: 7px 9px;
  display: flex; gap: 8px; align-items: center;
}
.brf-caution .tag { font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; border: 1px solid var(--amber-dim); padding: 1px 5px; border-radius: 3px; flex-shrink: 0; }
.brf-strips { display: grid; gap: 7px; width: 100%; }
.brf-strip {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-1); border: 1px solid var(--line);
  border-left-width: 3px; border-radius: 3px 8px 8px 3px;
  padding: 7px 10px;
}
.brf-strip.t-solid { border-left-color: var(--green); }
.brf-strip.t-est { border-left-color: var(--amber); }
.brf-strip.t-exp { border-left-color: var(--faint); border-left-style: dashed; }
.brf-strip .kb {
  display: grid; justify-items: center; gap: 1px;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 4px;
  padding: 4px 8px 3px; flex-shrink: 0; min-width: 44px;
}
.brf-strip .kb b { font-family: var(--dot); font-size: 15px; font-weight: 400; }
.brf-strip.t-solid .kb b { color: var(--green); text-shadow: 0 0 8px rgba(111, 214, 148, .6); }
.brf-strip.t-est .kb b { color: var(--amber-hot); text-shadow: 0 0 8px rgba(245, 185, 66, .55); }
.brf-strip.t-exp .kb b { color: var(--faint); }
.brf-strip.t-exp .kb { border-style: dashed; }
.brf-strip .kb i { font-style: normal; font-family: var(--cjk); font-size: 8.5px; color: var(--faint); }
.brf-strip .tt { font-size: 12px; color: var(--dim); }
.brf-logrow { display: flex; gap: 16px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .brf-backdrop, .brf-dialog, .brf-body { animation: none; }
  .brf-lamp.now { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .bezel, .placard, .ann-col, .statusline { animation: none; }
  .cond-gauge .needle { animation: none; transform: rotate(var(--angle)); }
  .strip .keybox, .dial .val .num, .span-readout .dot-num, .reqno .no { animation: none; }
  .caution .tag, .statusline::after { animation: none; }
}

@media (min-width: 560px) {
  body { padding: 0 12px; }
  .app { box-shadow: 0 0 80px rgba(0, 0, 0, .6); }
}

/* ════ v0.9「整備棚與模擬室」新增 ════════════════
   材質紀律沿用五系統；本輪新增一個「概念型變體」：
   .blueprint ＝ placard 的藍圖版——尚未建造的裝備用青色施工圖呈現，
   與現役儀表（琥珀 LED）在材質上一眼區分＝誠實度的視覺化。 */

:root {
  --bp: #7cc7e8;        /* 藍圖青：只給「概念/未建造」用，不進現役儀表 */
  --bp-dim: #4a7d99;
}

/* ── 歌本檢索台 ─────────────────────────────── */
.rep-head { position: relative; flex-wrap: wrap; row-gap: 8px; }
.rep-head .zh { white-space: nowrap; }
.rep-head::after { min-width: 6px; }
.rep-playlist-btn {
  margin-left: auto; appearance: none; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 3px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--dim); font-family: var(--cjk); font-size: 12px; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.rep-playlist-btn:hover { border-color: var(--amber-dim); color: var(--amber); }
.rep-playlist-btn .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--faint); font-weight: 400; }
.rep-to-playlist {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 3px; margin-left: 4px;
  background: none; border: 1px dashed var(--amber-dim); color: var(--amber-dim);
  font-family: var(--cjk); font-size: 11px; transition: border-color .15s, color .15s;
}
.rep-to-playlist:hover { border-color: var(--amber); color: var(--amber); }
.newstrip-btn {
  margin-left: auto; appearance: none; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 3px;
  background: linear-gradient(180deg, #241a06, #170f02);
  border: 1px solid var(--amber-dim);
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--amber-hot); font-family: var(--cjk); font-size: 12px; font-weight: 700;
  letter-spacing: .05em; text-shadow: 0 0 8px rgba(245, 185, 66, .5);
  transition: border-color .15s, transform .08s;
}
.newstrip-btn:hover { border-color: var(--amber); }
.newstrip-btn:active { transform: translateY(1px); }
.newstrip-btn .lamp {
  width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0;
  background: var(--amber); border: 1px solid var(--amber); box-shadow: 0 0 7px var(--amber);
}
.newstrip-btn .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--amber-dim); font-weight: 400; }

.rep-console { display: grid; gap: 8px; margin-bottom: 12px; }
.rep-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--disp-bg);
  border: 1px solid #14281c; border-radius: 4px;
  padding: 2px 10px;
}
.rep-search .pr { font-family: var(--mono); color: var(--green); font-size: 13px; }
.rep-search input {
  flex: 1; appearance: none; background: none; border: none; outline: none;
  color: var(--phos); font-family: var(--cjk); font-size: 14px;
  padding: 8px 0; min-width: 0;
  text-shadow: 0 0 8px rgba(142, 240, 176, .3);
  caret-color: var(--phos);
}
.rep-search input::placeholder { color: var(--faint); text-shadow: none; }
.rep-search input::-webkit-search-cancel-button { display: none; }
.rep-clear {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--faint); font-size: 12px; padding: 6px;
}
.rep-clear:hover { color: var(--dim); }

.rep-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rep-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }

/* 標籤 chip（檢索台 / sheet / 表單共用） */
.tag-chip {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 3px; background: var(--ink-1);
  color: var(--dim); font-family: var(--cjk); font-size: 11.5px;
  padding: 4px 9px; min-height: 28px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: border-color .15s, color .15s, background .15s;
}
.tag-chip:hover { border-color: var(--faint); color: var(--text); }
.tag-chip.on {
  border-color: var(--amber-dim); color: var(--amber-hot);
  background: linear-gradient(180deg, #241a06, #170f02);
}
.tag-chip .x { font-size: 9px; color: var(--amber-dim); }
.tag-chip.add { border-style: dashed; color: var(--faint); min-width: 34px; justify-content: center; }
.tag-chip.add.on { border-color: var(--amber); color: var(--amber); background: none; }
.tag-chip.tier.t-solid.on { border-color: var(--green); color: var(--phos); background: linear-gradient(180deg, #0a1f12, #061309); }
.tag-chip.tier.t-est.on { border-color: var(--amber-dim); }
.tag-chip.tier.t-exp.on { border-color: var(--faint); color: var(--text); background: var(--panel-2); border-style: dashed; }
.tag-chip.tech .en { font-family: var(--mono); font-size: 6.5px; letter-spacing: .12em; color: var(--faint); }

.rep-sort { display: flex; align-items: center; gap: 5px; }
.rep-sort-lab { font-family: var(--mono); font-size: 7.5px; letter-spacing: .2em; color: var(--faint); margin-right: 3px; }
.rep-sort button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--faint); font-size: 11px; font-family: var(--cjk);
  padding: 4px 9px; min-height: 28px;
  transition: all .15s;
}
.rep-sort button:hover { color: var(--dim); border-color: var(--faint); }
.rep-sort button[aria-pressed="true"] {
  border-color: var(--green); color: var(--phos);
  background: linear-gradient(180deg, #0a1f12, #061309);
}

.strip .tags i.mine { color: var(--amber-dim); border-color: var(--amber-dim); border-style: dashed; }
.strip.flash { animation: stripflash 1.6s ease both; }
@keyframes stripflash {
  0%, 40% { border-color: var(--amber); background-color: #241a06; }
  100% { border-color: var(--line); }
}

/* ── sheet：修訂鍵 / 標籤互動 / 技巧筆記 ────── */
.amend-btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 8px 0 2px;
  padding: 5px 10px; border-radius: 3px;
  background: #0c1119; border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--dim); font-family: var(--cjk); font-size: 12px;
  transition: border-color .15s, color .15s;
}
.amend-btn:hover { border-color: var(--amber-dim); color: var(--amber-hot); }
.amend-btn .lamp { width: 7px; height: 7px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; }
.amend-btn:hover .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 7px var(--amber); }
.amend-btn .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--faint); }

.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker {
  margin-top: 10px; padding: 10px;
  border: 1px dashed var(--line); border-radius: 6px;
  display: grid; gap: 10px;
}
.tag-free { display: flex; gap: 6px; }
.tag-free input {
  flex: 1; min-width: 0; appearance: none;
  background: var(--ink-1); border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); font-family: var(--cjk); font-size: 13px;
  padding: 8px 10px; outline: none;
}
.tag-free input:focus { border-color: var(--amber-dim); }
.tag-add {
  appearance: none; cursor: pointer; width: 38px;
  border: 1px solid var(--line); border-radius: 4px; background: #0c1119;
  color: var(--dim); font-size: 15px;
}
.tag-add:hover { border-color: var(--amber-dim); color: var(--amber); }

.tech-draft {
  border: 1px dashed var(--faint); border-radius: 6px;
  padding: 10px 11px; display: grid; gap: 9px;
}
.tech-draft-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--faint);
}
.tech-draft-head .tag {
  font-family: var(--mono); font-size: 8px; letter-spacing: .16em;
  border: 1px dashed var(--faint); border-radius: 3px; padding: 2px 6px;
  color: var(--dim); flex-shrink: 0;
}
.tech-tip { font-size: 12.5px; color: var(--dim); line-height: 1.65; }
.linklike {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--amber); font-size: 12px; font-family: var(--cjk);
  text-decoration: underline dotted; padding: 4px;
}

/* ── 表單覆蓋層（NEW STRIP / AMEND）─────────── */
.form-backdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(4, 6, 9, .78);
  backdrop-filter: blur(3px);
  display: grid; place-items: end center;
  animation: fadein .2s ease;
}
.form-sheet {
  width: min(480px, 100%);
  max-height: 92dvh; overflow-y: auto;
  border-radius: 16px 16px 0 0;
  border-bottom: none;
  padding: 14px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  animation: sheetup .28s cubic-bezier(.2, .8, .3, 1);
}
.form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.form-close { position: static; float: none; }
.form-song { font-size: 17px; font-weight: 700; margin: -4px 0 12px; }
.form-song span { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }

/* INOP：航空慣例——未裝/停用設備貼 INOP 標籤。誠實邊界的視覺化本體 */
.inop {
  display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 9px;
  border: 1px dashed var(--line); border-radius: 4px;
  padding: 10px 11px; margin-bottom: 14px;
  color: var(--faint); font-size: 11.5px; line-height: 1.6;
}
.inop-lamp { width: 8px; height: 8px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; margin-top: 4px; }
.inop-tag {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  border: 1px solid var(--faint); border-radius: 2px; padding: 2px 6px;
  color: var(--dim); margin-top: 1px;
  background: repeating-linear-gradient(-45deg, rgba(93, 110, 126, .12) 0 6px, transparent 6px 12px);
}
.inop-txt b { color: var(--dim); font-weight: 600; }

.fld { display: block; margin-bottom: 14px; }
.fld-lab {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; color: var(--dim); margin-bottom: 7px;
}
.fld-lab em { font-style: normal; font-size: 10px; color: var(--faint); }
.fld-lab .req { color: var(--amber); border: 1px solid var(--amber-dim); border-radius: 3px; padding: 1px 5px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.fld-input {
  width: 100%; appearance: none;
  background: var(--ink-1); border: 1px solid var(--line); border-radius: 5px;
  color: var(--text); font-family: var(--cjk); font-size: 15px;
  padding: 11px 12px; outline: none;
  transition: border-color .15s;
}
.fld-input:focus { border-color: var(--amber-dim); box-shadow: 0 0 0 1px rgba(245, 185, 66, .18); }
.fld-input::placeholder { color: var(--faint); }
.fld-reqno {
  font-family: var(--dot); font-size: 18px; letter-spacing: .22em;
  background: var(--disp-bg); border-color: #1c2836; color: var(--amber-hot);
  text-shadow: 0 0 9px rgba(245, 185, 66, .5);
}
.fld-reqno::placeholder { font-family: var(--cjk); font-size: 13px; letter-spacing: 0; text-shadow: none; }
.fld-diff { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fld-sys { display: grid; grid-template-columns: 76px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.fld-sys span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--faint); }
.fld-range { display: grid; gap: 10px; }
.range-steppers { display: grid; gap: 8px; }
.form-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 18px; }
.form-save:disabled { opacity: .4; cursor: default; }
.seg-lang button { flex: 1; }

/* ── 訓練室：音準儀 ─────────────────────────── */
.sim-intro { --d: 0s; }
.pt-bezel { margin-bottom: 13px; }
.pt-target {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.pt-target-lab { font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; color: var(--faint); line-height: 1.5; }
.pt-target-lab i { font-style: normal; font-family: var(--cjk); font-size: 10px; color: var(--dim); letter-spacing: .1em; }
.pt-target button {
  appearance: none; cursor: pointer; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 6px;
  background: linear-gradient(180deg, #151d28, #0c1119); color: var(--text);
  box-shadow: inset 0 1px 0 var(--metal-hi);
  font-family: var(--mono); font-size: 16px;
}
.pt-target button:hover { border-color: var(--amber); }
.pt-target-val {
  flex: 1; text-align: center;
  font-family: var(--dot); font-size: 17px; color: var(--amber-hot);
  text-shadow: 0 0 9px rgba(245, 185, 66, .5);
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 4px;
  padding: 9px 4px;
}
.pt-display {
  background: var(--disp-bg);
  border: 1px solid #1c2836; border-radius: 6px;
  padding: 12px 12px 8px; margin-bottom: 12px;
  opacity: .55; transition: opacity .3s;
}
.pt-display.live { opacity: 1; }
.pt-note-row { display: flex; align-items: baseline; justify-content: center; gap: 12px; min-height: 44px; }
.pt-note {
  font-family: var(--dot); font-size: 38px; line-height: 1;
  color: var(--phos); text-shadow: 0 0 16px rgba(142, 240, 176, .5);
}
.pt-cents { font-family: var(--mono); font-size: 12px; color: var(--dim); min-width: 46px; }
/* CDI：航向指示器——中線＝目標音，指針偏左＝唱低、偏右＝唱高 */
.pt-cdi {
  position: relative; height: 26px; margin: 8px 2px 2px;
  border-top: 1px solid #232f3d; border-bottom: 1px solid #232f3d;
}
.pt-dot { position: absolute; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #2a3644; }
.pt-center { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 1px; background: var(--faint); }
.pt-needle {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px;
  background: var(--amber); box-shadow: 0 0 8px rgba(245, 185, 66, .7);
  border-radius: 2px;
  transition: left .09s linear;
}
.pt-needle.ok { background: var(--green); box-shadow: 0 0 8px rgba(111, 214, 148, .7); }
.pt-cdi-lab { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7px; letter-spacing: .12em; color: var(--faint); padding: 5px 0 2px; }
.pt-cdi-lab :nth-child(2) { font-family: var(--cjk); font-size: 9px; color: var(--dim); }
.pt-foot { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.pt-mic {
  appearance: none; cursor: pointer; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: #0c1119; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--dim); font-family: var(--cjk); font-size: 13.5px; font-weight: 700;
  transition: all .15s;
}
.pt-mic .lamp { width: 8px; height: 8px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; }
.pt-mic:hover { border-color: var(--faint); color: var(--text); }
.pt-mic.on {
  border-color: var(--green); color: var(--phos);
  background: linear-gradient(180deg, #0a1f12, #061309);
  text-shadow: 0 0 8px rgba(142, 240, 176, .5);
}
.pt-mic.on .lamp { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px var(--green); animation: cautionblink 1.6s steps(2) infinite; }
.pt-steady { display: flex; align-items: baseline; gap: 8px; }
.pt-steady-num {
  font-family: var(--dot); font-size: 40px; line-height: .9;
  color: var(--amber-hot);
  text-shadow: 0 0 16px rgba(245, 185, 66, .55);
}
.pt-steady-lab { font-family: var(--mono); font-size: 7px; letter-spacing: .14em; color: var(--faint); line-height: 1.6; }
.pt-steady-lab i { font-style: normal; font-family: var(--cjk); font-size: 9.5px; color: var(--dim); letter-spacing: 0; }
.pt-msg { margin-top: 12px; }
.pt-msg.placard-tone { border: 1px dashed var(--line); border-radius: 4px; padding: 10px 12px; color: var(--dim); font-size: 12.5px; }
.pt-honest { margin-top: 12px; font-size: 11.5px; color: var(--faint); line-height: 1.65; }
.pt-honest b { color: var(--dim); }

/* ── 訓練室：技巧手冊 ───────────────────────── */
.tm-note { font-size: 12px; color: var(--dim); line-height: 1.65; margin-bottom: 12px; }
.tm-note b { color: var(--amber); font-weight: 600; }
.tm-group { margin-bottom: 14px; }
.tm-group-lab {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; color: var(--dim); font-weight: 600;
  margin-bottom: 7px;
}
.tm-group-lab .c {
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em;
  color: var(--amber-dim); border: 1px solid var(--amber-dim); border-radius: 3px; padding: 1px 5px;
}
.tm-group-lab .en { font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; color: var(--faint); }
.tm-card {
  border: 1px solid var(--line); border-radius: 4px;
  background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  margin-bottom: 6px;
  transition: border-color .2s;
}
.tm-card.hilite { border-color: var(--amber); box-shadow: 0 0 14px rgba(245, 185, 66, .25); }
.tm-card summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; min-height: 44px;
  color: var(--dim);
}
.tm-card summary::-webkit-details-marker { display: none; }
.tm-card summary:hover { color: var(--text); }
.tm-card summary .lamp {
  width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0;
  background: #1c2733; border: 1px solid #26323f; transition: all .15s;
}
.tm-card[open] summary .lamp { background: var(--green); border-color: var(--green); box-shadow: 0 0 7px var(--green); }
.tm-card[open] summary { color: var(--text); }
.tm-zh { font-size: 13.5px; font-weight: 600; }
.tm-en { font-family: var(--mono); font-size: 7px; letter-spacing: .16em; color: var(--faint); }
.tm-tier {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--cjk); font-size: 9.5px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px;
}
.tm-body { padding: 2px 13px 12px 28px; display: grid; gap: 8px; }
.tm-body p { font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.tm-k {
  display: inline-block; margin-right: 7px;
  font-size: 10px; color: var(--amber-dim); font-weight: 600;
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px;
  vertical-align: 1px;
}
.tm-warn .tm-k { color: var(--amber); border-color: var(--amber-dim); }

/* ── 訓練室：評分概念藍圖（材質＝尚未建造）──── */
.blueprint {
  position: relative;
  border: 1px dashed var(--bp-dim);
  border-radius: 4px;
  padding: 13px 12px;
  margin-bottom: 13px;
  background:
    linear-gradient(rgba(124, 199, 232, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 199, 232, .05) 1px, transparent 1px),
    rgba(10, 20, 28, .55);
  background-size: 18px 18px, 18px 18px, 100% 100%;
  color: var(--bp-dim);
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}
.bp-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.bp-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .24em;
  color: var(--bp-dim); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.bp-label .zh { font-family: var(--cjk); font-size: 12px; letter-spacing: .2em; color: var(--bp); }
.bp-stamp {
  flex-shrink: 0; text-align: center;
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em;
  color: var(--bp); border: 2px solid var(--bp);
  border-radius: 3px; padding: 4px 8px;
  transform: rotate(4deg); opacity: .85;
  line-height: 1.5;
}
.bp-intro { font-size: 12px; color: #6f93a8; line-height: 1.7; margin-bottom: 12px; }
.bp-intro b { color: var(--bp); font-weight: 600; }
.bp-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.bp-row { display: grid; grid-template-columns: 118px 1fr auto; gap: 10px; align-items: center; }
.bp-row .lab { font-family: var(--cjk); font-size: 10.5px; color: #6f93a8; letter-spacing: .02em; }
.bp-row .bar { height: 8px; border: 1px solid var(--bp-dim); border-radius: 2px; position: relative; }
.bp-row .bar i {
  position: absolute; inset: 1px auto 1px 1px; border-radius: 1px;
  background: repeating-linear-gradient(-45deg, rgba(124, 199, 232, .5) 0 4px, transparent 4px 8px);
}
.bp-row .val { font-family: var(--mono); font-size: 13px; color: var(--bp); display: flex; align-items: baseline; gap: 4px; }
.bp-row .val em, .bp-persona-head .val em { font-style: normal; font-family: var(--cjk); font-size: 8.5px; color: var(--bp-dim); border: 1px dashed var(--bp-dim); border-radius: 2px; padding: 0 3px; }
.bp-persona { border-top: 1px dashed var(--bp-dim); padding-top: 12px; display: grid; gap: 8px; }
.bp-persona-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; color: var(--bp); font-weight: 700;
}
.bp-persona-head .en { font-family: var(--mono); font-size: 7px; letter-spacing: .18em; color: var(--bp-dim); flex: 1; }
.bp-persona-head .val { font-family: var(--mono); font-size: 14px; display: flex; align-items: baseline; gap: 4px; }
.bp-persona svg { width: 100%; height: auto; display: block; }
.bp-line { fill: none; stroke-width: 1.5; }
.bp-line.ref { stroke: var(--bp-dim); stroke-dasharray: 4 3; }
.bp-line.you { stroke: var(--bp); }
.bp-zone { fill: rgba(124, 199, 232, .1); stroke: var(--bp-dim); stroke-dasharray: 3 3; }
.bp-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: #6f93a8; }
.bp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bp-legend i { width: 14px; height: 0; display: inline-block; }
.bp-legend i.ref { border-top: 1.5px dashed var(--bp-dim); }
.bp-legend i.you { border-top: 1.5px solid var(--bp); }
.bp-legend i.zone { width: 12px; height: 9px; background: rgba(124, 199, 232, .12); border: 1px dashed var(--bp-dim); }
.bp-copy { font-size: 12px; color: #6f93a8; line-height: 1.7; }
.bp-copy b { color: var(--bp); font-weight: 600; }
.bp-foot {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--bp-dim);
  font-size: 11px; color: var(--bp-dim); line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .blueprint { animation: none; }
  .strip.flash { animation: none; }
  .pt-needle { transition: none; }
  .pt-mic.on .lamp { animation: none; }
}

/* ════ v0.9.1「方向、系統與誠實對照」新增 ════════
   靶①嗓況方向追問｜靶②系統管理與切換｜靶③④音域教學層＋引導自測｜靶⑤裝備清單。
   維持材質五系統：新畫面全部落在既有材質語彙內（bezel/panel/placard/blueprint），
   不新增第六種卡片。 */

/* ── 靶①：嗓況方向追問（rating ≤ 3 才出現）───── */
.cond-dir {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 9px; padding-top: 9px;
  border-top: 1px dashed var(--line-soft);
}
.cond-dir-lab {
  font-family: var(--mono); font-size: 8px; letter-spacing: .14em;
  color: var(--faint); flex-shrink: 0;
}
.cond-dir-btn {
  appearance: none; cursor: pointer;
  font-family: var(--cjk); font-size: 11.5px;
  padding: 4px 8px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--ink-1); color: var(--dim);
  transition: border-color .15s, color .15s;
}
.cond-dir-btn:hover { border-color: var(--faint); color: var(--text); }
.cond-dir-btn[aria-pressed="true"] {
  border-color: var(--amber); color: var(--amber-hot);
  background: linear-gradient(180deg, #241b09, #170f04);
  box-shadow: 0 0 8px rgba(245, 185, 66, .18);
}

/* ── 靶②：頂部作用系統徽章＋切換 popover ─────── */
.brand .chips { position: relative; }
button.chip { appearance: none; cursor: pointer; transition: border-color .15s; }
button.chip:hover { border-color: var(--faint); color: var(--text); }
.chip-sys .caret { color: var(--faint); font-size: 8px; }
.sys-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
  min-width: 190px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .55), inset 0 1px 0 var(--metal-hi);
  padding: 6px;
}
.sys-pop [data-sys] {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: 8px 9px; color: var(--dim);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
}
.sys-pop [data-sys]:hover { border-color: var(--line); color: var(--text); }
.sys-pop [data-sys] .lamp {
  width: 7px; height: 7px; border-radius: 50%;
  background: #1c2733; border: 1px solid #2a3644;
}
.sys-pop [data-sys][aria-selected="true"] { color: var(--amber-hot); }
.sys-pop [data-sys][aria-selected="true"] .lamp {
  background: var(--amber); border-color: var(--amber); box-shadow: 0 0 7px var(--amber);
}
.sys-pop-note {
  border-top: 1px dashed var(--line-soft); margin-top: 4px;
  padding: 7px 9px 3px; font-size: 10.5px; color: var(--faint);
}

/* ── 靶②：SYSTEMS 面板（追蹤 × 作用中）───────── */
.sys-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch;
  margin-bottom: 7px;
}
.sys-track {
  appearance: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 5px;
  background: linear-gradient(180deg, #131a25, #0b1017);
  box-shadow: inset 0 1px 0 var(--metal-hi);
  padding: 9px 11px; color: var(--faint);
  font-family: var(--cjk); font-size: 13px;
}
.sys-track .lamp {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
  background: #1c2733; border: 1px solid #26323f;
}
.sys-track small { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; margin-left: auto; color: var(--faint); opacity: .75; }
.sys-track:hover { border-color: var(--faint); color: var(--dim); }
.sys-row.on .sys-track { color: var(--text); }
.sys-row.on .sys-track .lamp { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px var(--green); }
.sys-active {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 5px;
  background: var(--ink-1); color: var(--faint);
  font-family: var(--cjk); font-size: 11px; padding: 0 10px;
  transition: border-color .15s, color .15s;
}
.sys-active:not(:disabled):hover { border-color: var(--amber-dim); color: var(--dim); }
.sys-active:disabled { opacity: .35; cursor: default; }
.sys-active.on {
  border-color: var(--amber); color: var(--amber-hot);
  background: linear-gradient(180deg, #241b09, #170f04);
  box-shadow: 0 0 8px rgba(245, 185, 66, .18);
}
.sys-live {
  font-style: normal; font-family: var(--mono); font-size: 7px; letter-spacing: .12em;
  color: var(--amber); border: 1px solid var(--amber-dim); border-radius: 2px;
  padding: 1px 4px; margin-left: 6px; vertical-align: 1px;
}
.reqno.live { border-color: var(--amber-dim); }

/* ── 靶③：音域教學層 HOW TO READ ─────────────── */
.howto-row {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  font-size: 12.5px; line-height: 1.7; margin-bottom: 9px;
}
.howto-row b { color: var(--text); font-weight: 600; }
.howto-row .sw { width: 26px; height: 14px; border-radius: 3px; margin-top: 4px; }
.sw.comfort { background: rgba(111, 214, 148, .18); border: 1px solid rgba(111, 214, 148, .7); }
.sw.absolute { background: none; border: 1px dashed var(--faint); }
.sw.falsetto { background: none; border: none; border-left: 2px dashed var(--amber); width: 13px; margin-left: 13px; }
.howto-src {
  border-top: 1px dashed var(--line-soft); margin-top: 11px; padding-top: 11px;
  font-size: 12.5px; line-height: 1.75;
}
.howto-src b { color: var(--text); font-weight: 600; }
.howto-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 9px; }

/* ── 靶④：引導自測 wizard ────────────────────── */
.wiz-sub { font-size: 13px; color: var(--dim); line-height: 1.7; margin-bottom: 14px; }
.wiz-sub b { color: var(--text); font-weight: 600; }
.wiz-opts { display: grid; gap: 9px; }
.wiz-opt {
  appearance: none; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 6px;
  background: linear-gradient(180deg, #131a25, #0b1017);
  box-shadow: inset 0 1px 0 var(--metal-hi);
  padding: 12px 13px; color: var(--text);
  font-family: var(--cjk); font-size: 14.5px;
  transition: border-color .15s;
}
.wiz-opt b { display: block; font-weight: 600; }
.wiz-opt span { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.wiz-opt:hover { border-color: var(--faint); }
.wiz-opt.hot { border-color: var(--amber-dim); }
.wiz-opt.hot:hover { border-color: var(--amber); }
.wiz-note-disp {
  text-align: center; padding: 14px 10px;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 6px;
  margin-bottom: 12px;
}
.wiz-phase {
  display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .2em;
  color: var(--faint); margin-bottom: 4px;
}
.wiz-note {
  display: block; font-family: var(--dot); font-size: 34px; line-height: 1.15;
  color: var(--amber-hot); text-shadow: 0 0 14px rgba(245, 185, 66, .55);
  animation: flick .18s ease-out;
}
.wiz-play { margin: 8px auto 0; }
.wiz-judge { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.wiz-judge button {
  appearance: none; cursor: pointer;
  border-radius: 6px; padding: 13px 8px;
  font-family: var(--cjk); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  transition: transform .1s, border-color .15s;
}
.wiz-judge button:active { transform: scale(.97); }
.wiz-judge small { display: block; font-size: 10px; font-weight: 400; margin-top: 3px; opacity: .8; }
.wiz-ok { border: 1px solid rgba(111, 214, 148, .55); background: linear-gradient(180deg, #0a1f12, #061309); color: var(--phos); }
.wiz-ok:hover { border-color: var(--green); }
.wiz-hard { border: 1px solid var(--amber-dim); background: linear-gradient(180deg, #241b09, #170f04); color: var(--amber-hot); }
.wiz-hard:hover { border-color: var(--amber); }
.wiz-hint { font-size: 10.5px; color: var(--faint); align-self: center; line-height: 1.5; }
.wiz-gauge { margin-bottom: 10px; }
.wiz-diff {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--dim); margin-bottom: 6px;
}
.wiz-diff b { font-family: var(--mono); font-size: 11.5px; color: var(--faint); font-weight: 400; }
.wiz-diff .arr { color: var(--faint); }
.wiz-diff .new { color: var(--amber-hot); font-weight: 700; }

/* ── 靶⑤：裝備清單 EQUIPMENT LIST ────────────── */
.eq-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 6, 9, .82);
  backdrop-filter: blur(3px);
  display: grid; place-items: start center;
  animation: fadein .2s ease;
  overflow-y: auto; padding: 14px 10px;
}
.eq-page {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: inset 0 1px 0 var(--metal-hi), 0 10px 30px rgba(0, 0, 0, .5);
  padding: 15px 15px 18px;
  height: fit-content;
}
.eq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.eq-close { position: static; float: none; flex-shrink: 0; }
.eq-title { font-family: var(--mincho); font-size: 19px; color: var(--text); margin-top: 6px; }
.eq-intro { font-size: 12.5px; color: var(--dim); line-height: 1.75; margin-bottom: 12px; }
.eq-intro b { color: var(--text); font-weight: 600; }
.eq-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
  border: 1px dashed var(--line); border-radius: 4px;
  padding: 10px 11px; margin-bottom: 14px;
}
.eq-legend .lg { display: grid; grid-template-columns: auto auto 1fr; gap: 7px; align-items: baseline; font-size: 11.5px; color: var(--dim); }
.eq-legend .lg small { color: var(--faint); font-size: 10px; }
.eq-legend .lg i, .eq-group-lab i, .eq-mark { font-style: normal; font-family: var(--mono); }
.eq-group { margin-bottom: 14px; }
.eq-group-lab {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--cjk); font-size: 12px; letter-spacing: .2em;
  margin-bottom: 7px;
}
.eq-group-lab::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.eq-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start;
  border: 1px solid var(--line-soft); border-radius: 5px;
  padding: 9px 11px; margin-bottom: 6px;
  background: var(--ink-1);
}
.eq-mark { font-size: 13px; margin-top: 1px; }
.eq-name { font-size: 13.5px; color: var(--text); font-weight: 600; }
.eq-why { font-size: 11.5px; color: var(--faint); line-height: 1.65; margin-top: 2px; }
.eq-why-tag {
  font-style: normal; font-family: var(--cjk); font-size: 9px;
  border: 1px solid var(--line); border-radius: 2px;
  padding: 1px 5px; margin-left: 7px; color: var(--faint); vertical-align: 1px;
}
.eq-owner {
  font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
  color: var(--dim); border: 1px solid var(--line); border-radius: 3px;
  padding: 3px 6px; white-space: nowrap; margin-top: 2px;
}
/* 狀態著色：mark 顏色＋左緣一絲狀態光 */
.st-real .eq-mark, .eq-legend .st-real i, .eq-group-lab.st-real { color: var(--green); }
.st-seed .eq-mark, .eq-legend .st-seed i, .eq-group-lab.st-seed { color: var(--amber); }
.st-inop .eq-mark, .eq-legend .st-inop i, .eq-group-lab.st-inop { color: var(--faint); }
.st-concept .eq-mark, .eq-legend .st-concept i, .eq-group-lab.st-concept { color: var(--bp); }
.st-nogo .eq-mark, .eq-legend .st-nogo i, .eq-group-lab.st-nogo { color: var(--red); }
.eq-row.st-real { border-left: 2px solid rgba(111, 214, 148, .5); }
.eq-row.st-seed { border-left: 2px solid rgba(245, 185, 66, .45); }
.eq-row.st-inop { border-left: 2px dashed var(--line); }
.eq-row.st-concept { border-left: 2px dashed var(--bp-dim); }
.eq-row.st-nogo { border-left: 2px solid rgba(224, 101, 95, .55); }
.eq-foot { font-size: 11px; color: var(--faint); line-height: 1.7; border-top: 1px dashed var(--line-soft); padding-top: 10px; }
.eq-concept { margin-top: 8px; }
.eq-concept summary {
  cursor: pointer; list-style: none;
  font-size: 11.5px; color: var(--bp);
  text-decoration: underline dotted;
}
.eq-concept summary::-webkit-details-marker { display: none; }
.eq-concept .blueprint { margin-top: 8px; animation: none; }

/* ── PLAYLIST 歌單（v0.9.10，KTV_DATA_MODEL.md §12）── */
.pl-new-row { display: flex; gap: 8px; margin-bottom: 14px; }
.pl-new-btn {
  flex: 1; appearance: none; cursor: pointer; padding: 10px 8px; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-family: var(--cjk); font-size: 12.5px; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.pl-new-btn:hover { border-color: var(--amber-dim); color: var(--amber); }
.pl-list { display: grid; gap: 8px; }
.pl-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 2px solid var(--line);
  cursor: pointer; transition: border-color .15s;
}
.pl-row:hover { border-left-color: var(--amber-dim); }
.pl-row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.pl-row-name { font-size: 13.5px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row-purpose { font-size: 10.5px; color: var(--faint); flex-shrink: 0; }
.pl-row-count { font-family: var(--mono); font-size: 11px; color: var(--faint); flex-shrink: 0; }
.pl-row-del {
  appearance: none; cursor: pointer; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 3px; border: 1px solid var(--line);
  background: none; color: var(--faint); font-size: 12px;
}
.pl-row-del:hover { border-color: var(--red); color: var(--red); }

.pl-back {
  appearance: none; cursor: pointer; background: none; border: none;
  color: var(--dim); font-family: var(--cjk); font-size: 12.5px; padding: 4px 0;
}
.pl-back:hover { color: var(--amber); }
.pl-purpose-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.pl-built-from {
  font-size: 11.5px; color: var(--faint); margin-bottom: 12px; line-height: 1.7;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.pl-built-from i { font-style: normal; color: var(--dim); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }
.pl-refresh-tag {
  appearance: none; cursor: pointer; background: none; border: 1px solid var(--line-soft); border-radius: 3px;
  color: var(--amber-dim); font-family: var(--mono); font-size: 10.5px; padding: 2px 7px; margin-left: auto;
}
.pl-refresh-tag:hover { border-color: var(--amber); color: var(--amber); }

.pl-items-panel { margin-bottom: 14px; }
.pl-items { display: grid; gap: 5px; margin-bottom: 6px; }
.pl-item-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 2px solid var(--line-soft);
  transition: opacity .15s, border-color .15s;
}
.pl-item-row.dragging { opacity: .4; }
.pl-item-row.drag-over { border-left-color: var(--amber); }
.pl-drag-handle { cursor: grab; color: var(--faint); font-size: 13px; flex-shrink: 0; }
.pl-item-row .ord { font-family: var(--mono); font-size: 9px; color: var(--faint); flex-shrink: 0; }
.pl-item-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-item-meta .tt { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item-meta i { font-style: normal; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-key-stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pl-key-stepper button {
  appearance: none; cursor: pointer; width: 20px; height: 20px; border-radius: 3px;
  background: none; border: 1px solid var(--line); color: var(--dim); font-size: 11px; line-height: 1;
}
.pl-key-stepper button:hover { border-color: var(--amber-dim); color: var(--amber); }
.pl-key-v { font-family: var(--mono); font-size: 11px; color: var(--text); min-width: 26px; text-align: center; }
.pl-move-btns { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.pl-move-btns button {
  appearance: none; cursor: pointer; width: 18px; height: 14px; border-radius: 2px;
  background: none; border: 1px solid var(--line-soft); color: var(--faint); font-size: 7px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.pl-move-btns button:hover:not(:disabled) { border-color: var(--amber-dim); color: var(--amber); }
.pl-move-btns button:disabled { opacity: .3; cursor: default; }
.pl-item-del {
  appearance: none; cursor: pointer; flex-shrink: 0; width: 22px; height: 22px; border-radius: 3px;
  background: none; border: 1px solid var(--line); color: var(--faint); font-size: 11px;
}
.pl-item-del:hover { border-color: var(--red); color: var(--red); }
.pl-drag-hint { font-size: 10.5px; color: var(--faint); text-align: center; margin-bottom: 8px; }
.pl-add-btn {
  width: 100%; appearance: none; cursor: pointer; padding: 8px; border-radius: 4px;
  background: none; border: 1px dashed var(--line); color: var(--dim);
  font-family: var(--cjk); font-size: 12px; transition: border-color .15s, color .15s;
}
.pl-add-btn:hover { border-color: var(--amber-dim); color: var(--amber); }

.pl-delete-playlist {
  width: 100%; appearance: none; cursor: pointer; padding: 9px; border-radius: 4px; margin-top: 6px;
  background: none; border: 1px dashed var(--red); color: var(--red);
  font-family: var(--cjk); font-size: 12px; opacity: .8;
}
.pl-delete-playlist:hover { opacity: 1; }

.pl-build-tags { margin: 12px 0; }
.pl-build-preview { font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }
.pl-build-preview b { color: var(--amber); font-family: var(--mono); }
.pl-cta {
  width: 100%; appearance: none; cursor: pointer; padding: 12px; border-radius: 5px;
  background: linear-gradient(180deg, #241a06, #170f02); border: 1px solid var(--amber-dim);
  color: var(--amber-hot); font-family: var(--cjk); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pl-cta:disabled { opacity: .35; cursor: default; }
.pl-cta:not(:disabled):hover { border-color: var(--amber); }

/* ── IMPORT 批次匯入＋審核收件匣（v0.9.11，DATA_IMPORT_STRATEGY.md §2.3/§2.6）── */
.imp-page { max-width: 560px; }
.imp-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.imp-tabs button {
  flex: 1; appearance: none; cursor: pointer; padding: 9px 6px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--ink-1);
  color: var(--faint); font-family: var(--cjk); font-size: 12.5px;
}
.imp-tabs button .code { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: .16em; margin-top: 2px; }
.imp-tabs button[aria-selected="true"] { border-color: var(--amber-dim); color: var(--amber-hot); background: linear-gradient(180deg, #241a06, #170f02); }
.imp-queue-paste:disabled, .imp-queue-manual:disabled { opacity: .4; cursor: default; }
.imp-preview-count { font-size: 12px; color: var(--dim); margin: -4px 0 14px; }
.imp-preview-count b { color: var(--amber); font-family: var(--mono); }
.imp-range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.imp-match-results { margin-top: 6px; }
.rep-import-btn {
  appearance: none; cursor: pointer; margin-left: 6px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--ink-1);
  color: var(--dim); font-family: var(--cjk); font-size: 11.5px; padding: 5px 9px;
  display: inline-flex; align-items: center; gap: 5px;
}
.rep-import-btn:hover { border-color: var(--amber-dim); color: var(--amber); }
.rep-import-btn .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--faint); font-weight: 400; }

.rq-batch-row { margin-bottom: 14px; }
.rq-batch-accept {
  width: 100%; appearance: none; cursor: pointer; padding: 11px; border-radius: 5px;
  background: linear-gradient(180deg, #241a06, #170f02); border: 1px solid var(--amber-dim);
  color: var(--amber-hot); font-family: var(--cjk); font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.rq-batch-accept:disabled { opacity: .35; cursor: default; }
.rq-batch-accept:not(:disabled):hover { border-color: var(--amber); }
.rq-list { display: grid; gap: 4px; }
.rq-item {
  border: 1px solid var(--line-soft); border-radius: 5px;
  padding: 10px 11px; margin-bottom: 8px;
  background: var(--ink-1);
}
.rq-item.t-solid { border-left: 2px solid rgba(111, 214, 148, .5); }
.rq-item.t-est { border-left: 2px solid rgba(245, 185, 66, .45); }
.rq-item.t-exp { border-left: 2px dashed var(--line); }
.rq-frag { font-size: 10.5px; color: var(--faint); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-candidate .tt { font-size: 14px; color: var(--text); font-weight: 600; }
.rq-candidate i { font-style: normal; font-size: 11.5px; color: var(--dim); margin-left: 8px; }
.rq-bits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.rq-bits span {
  font-family: var(--mono); font-size: 9.5px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px;
}
.rq-edit-flds { display: grid; gap: 8px; margin-bottom: 4px; }
.rq-tier { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--faint); margin-top: 6px; }
.rq-match { font-size: 11px; color: var(--dim); margin-top: 6px; }
.rq-match b { color: var(--text); }
.rq-match i { font-style: normal; color: var(--faint); margin-left: 4px; }
.rq-conflicts { border: 1px dashed var(--amber-dim); border-radius: 4px; padding: 8px 9px; margin-top: 8px; }
.rq-conflict-lab { font-size: 11px; color: var(--amber-hot); margin-bottom: 6px; }
.rq-conflict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 5px; }
.rq-conflict:last-child { margin-bottom: 0; }
.rq-conflict-name { font-size: 10.5px; color: var(--faint); min-width: 44px; }
.rq-conflict button {
  appearance: none; cursor: pointer; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel-2); color: var(--dim); font-family: var(--cjk); font-size: 10.5px; padding: 4px 7px;
}
.rq-conflict button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber-hot); background: linear-gradient(180deg, #241a06, #170f02); }
.rq-actions { display: flex; gap: 8px; margin-top: 9px; }
.rq-actions button {
  appearance: none; cursor: pointer; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-2); color: var(--dim); font-family: var(--cjk); font-size: 11.5px; padding: 6px 10px;
}
.rq-accept:hover { border-color: var(--green); color: var(--phos); }
.rq-edit-toggle:hover { border-color: var(--amber-dim); color: var(--amber); }
.rq-reject:hover { border-color: var(--red); color: var(--red); }

/* 匯入概念示意：檔案投入口（藍圖線稿＋不存在的檔案）*/
.bp-drop {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  border: 2px dashed var(--bp-dim); border-radius: 6px;
  padding: 18px 12px; margin: 12px 0;
  background: repeating-linear-gradient(-45deg, rgba(124, 199, 232, .04) 0 8px, transparent 8px 16px);
}
.bp-drop-ico { font-size: 20px; color: var(--bp-dim); }
.bp-drop-txt { font-size: 12.5px; color: var(--bp); }
.bp-drop-txt em { display: block; font-style: normal; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: var(--bp-dim); margin-top: 2px; }
.bp-drop-x {
  font-size: 11px; color: var(--red);
  border: 1px solid rgba(224, 101, 95, .5); border-radius: 3px;
  padding: 2px 8px; margin-top: 3px;
  background: rgba(224, 101, 95, .07);
}

@media (prefers-reduced-motion: reduce) {
  .wiz-note { animation: none; }
}

/* ═══ v0.9.2 可拖動高度儀（SIM 試算層）══════════════════════════
   語彙紀律：警示全部接既有系統——CAUTION 琥珀閃爍（cautionblink）＝滑出安全區、
   磷光綠＝域內、虛線邊框＝「試算中未套用」（探索檔的視覺延伸）。不發明第四套。 */

/* 拖曳熱區：pan-y＝垂直手勢還給瀏覽器捲 sheet，水平拖曳才是我們的 */
.gauge-wrap { user-select: none; -webkit-user-select: none; }
.gauge-hit { cursor: grab; touch-action: pan-y; outline: none; }
.gauge-hit:focus-visible { stroke: var(--amber-dim); stroke-width: 1; stroke-dasharray: 4 4; }
.gauge-wrap.dragging .gauge-hit { cursor: grabbing; }
.gauge-legend .drag-hint { color: var(--amber-dim); margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }

/* 狀態行：LED 讀數窗（點陣）＋燈語 tag＋人話——拖曳中即時跳字
   .caution 撞名是故意留用：既有斜紋警示材質直接上身（語彙零新增）。
   但拖曳中 CLEAR↔CAUTION 反覆切換——鎖 min-height＋壓扁 padding，儀表下緣不跳動 */
.gauge-status {
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; margin: 2px 4px 0; font-size: 12px; color: var(--dim);
}
.gauge-status.caution {
  padding: 5px 9px; margin: 2px 4px 0; margin-bottom: 0;
  font-size: 12px; border-radius: 6px;
}
.gauge-status .gs-k {
  font-family: var(--dot); font-size: 15px; color: var(--phos);
  background: var(--disp-bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 7px; min-width: 40px; text-align: center; flex-shrink: 0;
}
.gauge-status .gs-tag {
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em;
  border: 1px solid rgba(111, 214, 148, .5); border-radius: 3px;
  padding: 1px 5px; color: var(--green); flex-shrink: 0;
}
.gauge-status .gs-text { flex: 1; line-height: 1.35; }
.gauge-status.caution .gs-k { color: var(--amber-hot); }
.gauge-status.caution .gs-tag {
  color: var(--amber); border-color: var(--amber-dim);
  animation: cautionblink 1.6s steps(2) infinite;
}
.gauge-status.caution .gs-text { color: var(--amber); }

/* SIM 試算列：虛線框＝還沒套用（探索語彙）；套用/捨棄分離＝拖完不默默生效 */
.sim-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 9px 10px;
  border: 1px dashed var(--amber-dim); border-radius: 8px;
  background: rgba(245, 185, 66, .05);
}
.sim-chip {
  display: grid; justify-items: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: var(--amber); border: 1px dashed var(--amber-dim);
  padding: 3px 6px 2px; border-radius: 3px; flex-shrink: 0;
}
.sim-chip small { font-family: var(--cjk); font-size: 9px; letter-spacing: .1em; color: var(--amber-dim); }
.sim-readout { flex: 1; font-family: var(--dot); font-size: 16px; color: var(--faint); }
.sim-readout .arr { margin: 0 7px; color: var(--faint); font-family: var(--cjk); font-size: 12px; }
.sim-readout b { color: var(--amber-hot); font-weight: normal; text-shadow: 0 0 8px rgba(245, 185, 66, .5); }
.sim-apply {
  font-family: var(--cjk); font-size: 12.5px; padding: 8px 12px; border-radius: 7px;
  border: 1px solid var(--amber); background: rgba(245, 185, 66, .12);
  color: var(--amber-hot); cursor: pointer; flex-shrink: 0;
}
.sim-apply:hover { background: rgba(245, 185, 66, .22); }
.sim-apply:active { transform: scale(.96); }
.sim-discard {
  font-family: var(--cjk); font-size: 12px; padding: 8px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: none; color: var(--faint); cursor: pointer; flex-shrink: 0;
}
.sim-discard:hover { border-color: var(--faint); color: var(--dim); }
.sim-note { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .gauge-status.caution .gs-tag { animation: none; }
}

/* ════ v0.9.5 模擬場次 SIM RIDE(Session Mode 示意版)═══════════════
   材質紀律:整個場次覆蓋層穿 v0.9.2 立下的 SIM 語彙(琥珀虛線=模擬中、未寫入),
   常駐銘板沿用真飛行模擬器的法定標示語彙(FOR SIMULATION ONLY)。
   艙內元件全部落在既有材質(bezel/panel/disp-bg/annunciator),不新增第六種卡片。 */

/* ── 今日分頁入口:SIM 材質的登艙鍵 ── */
.ssn-entry {
  appearance: none; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 12px;
  border: 1px dashed var(--amber-dim); border-radius: 8px;
  background:
    repeating-linear-gradient(-45deg, rgba(245, 185, 66, .045) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #1a1408, #120d04);
  box-shadow: inset 0 1px 0 var(--metal-hi);
  padding: 12px 14px; margin-bottom: 13px;
  color: var(--text); text-align: left;
  font-family: var(--cjk);
  transition: border-color .15s, transform .08s;
  animation: boot .55s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: var(--d, 0s);
}
.ssn-entry:hover { border-color: var(--amber); }
.ssn-entry:active { transform: scale(.985); }
.ssn-entry .sim-chip { align-self: flex-start; margin-top: 2px; }
.ssn-entry-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ssn-entry-txt b { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.ssn-entry-txt b .code { font-family: var(--mono); font-size: 7px; letter-spacing: .2em; color: var(--amber-dim); font-weight: 400; }
.ssn-entry-txt .sub { font-size: 11.5px; color: var(--faint); }
.ssn-entry .go {
  font-family: var(--mono); font-size: 17px; color: var(--amber);
  text-shadow: 0 0 10px rgba(245, 185, 66, .5);
}

/* ── 真場次登艙鍵：同一套材質換成實線＋綠（全站「真的」的顏色語彙）── */
.ssn-entry.real {
  border: 1px solid rgba(111, 214, 148, .35);
  background:
    repeating-linear-gradient(-45deg, rgba(111, 214, 148, .04) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #0e1a12, #0a1410);
}
.ssn-entry.real:hover { border-color: var(--green); }
.ssn-entry.real .go { color: var(--green); text-shadow: 0 0 10px rgba(111, 214, 148, .5); }
.ssn-entry.real .ssn-entry-txt b .code { color: var(--green); }
.real-chip {
  display: grid; justify-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--green); border: 1px solid rgba(111, 214, 148, .4);
  padding: 3px 6px 2px; border-radius: 3px; flex-shrink: 0;
  align-self: flex-start; margin-top: 2px;
}
.real-chip small { font-family: var(--cjk); font-size: 9px; letter-spacing: .1em; color: var(--green); opacity: .8; }

/* ── 覆蓋層殼 ── */
.ssn-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: #060409;
  overflow-y: auto;
  display: grid; justify-items: center;
  animation: fadein .2s ease;
}
.ssn-page {
  width: min(480px, 100%);
  min-height: 100dvh;
  border-left: 1px dashed var(--amber-dim);
  border-right: 1px dashed var(--amber-dim);
  background:
    linear-gradient(rgba(35, 48, 63, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 48, 63, .13) 1px, transparent 1px),
    linear-gradient(180deg, #171009 0%, var(--ink-1) 140px);
  background-size: 26px 26px, 26px 26px, 100% 100%;
}

/* 常駐誠實銘板:模擬器的 FOR SIMULATION ONLY 標示,sticky 不離開視野 */
.ssn-placard {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 7px 10px calc(7px + 0px);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  color: var(--amber);
  background:
    repeating-linear-gradient(-45deg, rgba(245, 185, 66, .1) 0 8px, transparent 8px 16px),
    rgba(18, 13, 4, .96);
  border-bottom: 1px dashed var(--amber-dim);
  backdrop-filter: blur(4px);
  text-align: center;
}
.ssn-placard .tag {
  font-size: 8px; letter-spacing: .2em; flex-shrink: 0;
  border: 1px dashed var(--amber-dim); border-radius: 3px; padding: 2px 6px;
  color: var(--amber-hot);
}
.ssn-body { padding: 13px 13px calc(26px + env(safe-area-inset-bottom, 0px)); }

/* ── 場次資訊儀表 ── */
.ssn-head { margin-bottom: 13px; }
.ssn-head-top { display: flex; align-items: flex-start; gap: 10px; }
.ssn-venue {
  flex: 1; font-family: var(--mincho); font-size: 19px; font-weight: 700;
  line-height: 1.3; color: var(--text);
}
.ssn-venue span {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .2em; color: var(--faint);
  margin-top: 2px;
}
.ssn-venue span i { font-style: normal; font-family: var(--cjk); font-size: 10px; letter-spacing: .08em; color: var(--dim); }
.ssn-close { position: static; float: none; flex-shrink: 0; }
.ssn-head-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch;
  margin-top: 10px;
}
.ssn-elapsed {
  display: grid; align-content: center; justify-items: start; gap: 2px;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 6px;
  padding: 8px 12px 6px;
}
.ssn-elapsed .lb { font-family: var(--mono); font-size: 7px; letter-spacing: .22em; color: var(--faint); }
.ssn-elapsed .lb i { font-style: normal; font-family: var(--cjk); font-size: 9px; letter-spacing: .1em; color: var(--dim); margin-left: 6px; }
.ssn-elapsed .v {
  font-family: var(--dot); font-size: 30px; line-height: 1;
  color: var(--amber-hot);
  text-shadow: 0 0 14px rgba(245, 185, 66, .55);
  font-variant-numeric: tabular-nums;
}
.ssn-wake {
  appearance: none; cursor: pointer; min-height: 56px;
  display: grid; justify-items: center; align-content: center; gap: 3px;
  background: #0c1119; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -3px 6px rgba(0, 0, 0, .4);
  color: var(--dim); font-family: var(--cjk); font-size: 11.5px; font-weight: 700;
  padding: 6px 12px;
  transition: all .15s;
}
.ssn-wake .lamp { width: 8px; height: 8px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; }
.ssn-wake .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--faint); font-weight: 400; }
.ssn-wake:not(:disabled):hover { border-color: var(--faint); color: var(--text); }
.ssn-wake.on {
  border-color: var(--green); color: var(--phos);
  background: linear-gradient(180deg, #0a1f12, #061309);
  text-shadow: 0 0 8px rgba(142, 240, 176, .5);
}
.ssn-wake.on .lamp { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px var(--green); }
.ssn-wake:disabled { opacity: .45; cursor: default; }
.ssn-wake .code.inop { color: var(--faint); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; background: repeating-linear-gradient(-45deg, rgba(93, 110, 126, .12) 0 5px, transparent 5px 10px); }

/* ── 現在唱(主角儀表)── */
.ssn-now { margin-bottom: 13px; }
.ssn-now-title {
  font-family: var(--mincho); font-size: 27px; font-weight: 700;
  line-height: 1.25; letter-spacing: .02em; color: var(--text);
  margin: 2px 0 1px;
}
.ssn-now-artist { font-size: 12.5px; color: var(--faint); margin-bottom: 11px; }
.ssn-reads { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; margin-bottom: 10px; }
.ssn-reads .rd {
  display: grid; gap: 3px; justify-items: center; text-align: center;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 6px;
  padding: 8px 6px 7px;
}
.ssn-reads .lb { font-family: var(--mono); font-size: 6.5px; letter-spacing: .18em; color: var(--faint); }
.ssn-reads .lb i { font-style: normal; font-family: var(--cjk); font-size: 9px; letter-spacing: .1em; color: var(--dim); margin-left: 5px; }
.ssn-reads .v {
  font-family: var(--dot); font-size: 36px; line-height: 1;
  color: var(--amber-hot);
  text-shadow: 0 0 16px rgba(245, 185, 66, .6), 0 0 4px rgba(255, 217, 128, .8);
  animation: flick .35s both;
}
.ssn-reads .v.no { letter-spacing: .14em; }
.ssn-reason { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.ssn-cta {
  appearance: none; cursor: pointer; width: 100%; min-height: 62px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, #241a06, #170f02);
  border: 1px solid var(--amber-dim); border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -5px 10px rgba(0, 0, 0, .4);
  color: var(--amber-hot); font-family: var(--cjk); font-size: 18px; font-weight: 700;
  text-shadow: 0 0 12px rgba(245, 185, 66, .5);
  transition: border-color .15s, transform .08s;
}
.ssn-cta:hover { border-color: var(--amber); }
.ssn-cta:active { transform: scale(.98); }
.ssn-cta .arr { font-family: var(--mono); }
.ssn-cta .en { font-family: var(--mono); font-size: 7.5px; letter-spacing: .2em; color: var(--amber-dim); font-weight: 400; }
.ssn-empty {
  border: 1px dashed var(--line); border-radius: 6px; padding: 14px;
  color: var(--faint); font-size: 12.5px; text-align: center;
}

/* ── 副駕駛 NEXT UP ── */
.ssn-copilot { margin-bottom: 13px; }
.ssn-plan { display: grid; gap: 5px; margin-bottom: 10px; }
.ssn-plan-row {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-soft); border-left: 3px solid var(--line);
  border-radius: 3px 6px 6px 3px; background: var(--ink-1);
  padding: 6px 9px; font-size: 12.5px; color: var(--dim);
}
.ssn-plan-row .kb, .ssn-pick .kb, .ssn-sung-row .kb {
  flex-shrink: 0; min-width: 38px; text-align: center;
  font-family: var(--dot); font-size: 14px; color: var(--amber);
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 4px;
  padding: 2px 5px;
}
.ssn-plan-row .tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssn-plan-row .ar { font-size: 10.5px; color: var(--faint); flex-shrink: 0; }
.ssn-intents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 9px; }
.ssn-intent {
  appearance: none; cursor: pointer; min-height: 34px;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--dim); font-family: var(--cjk); font-size: 12px;
  transition: all .15s;
}
.ssn-intent:hover { border-color: var(--faint); color: var(--text); }
.ssn-intent[aria-pressed="true"] {
  border-color: var(--amber-dim); color: var(--amber-hot);
  background: linear-gradient(180deg, #241a06, #170f02);
}
.ssn-pick {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--ink-1); padding: 8px 9px;
}
.ssn-pick .tt { flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.ssn-pick .tt i { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssn-swap {
  appearance: none; cursor: pointer; flex-shrink: 0;
  border: 1px solid var(--amber-dim); border-radius: 6px;
  background: rgba(245, 185, 66, .08); color: var(--amber-hot);
  font-family: var(--cjk); font-size: 12px; padding: 8px 11px; min-height: 40px;
}
.ssn-swap:hover { background: rgba(245, 185, 66, .16); }
.ssn-insert {
  appearance: none; cursor: pointer; width: 100%; margin-top: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed var(--line); border-radius: 6px; background: none;
  color: var(--dim); font-family: var(--cjk); font-size: 12.5px; min-height: 42px;
  transition: border-color .15s, color .15s;
}
.ssn-insert:hover { border-color: var(--amber-dim); color: var(--amber-hot); }
.ssn-insert .lamp { width: 7px; height: 7px; border-radius: 2px; background: #1c2733; border: 1px solid #26323f; }
.ssn-insert:hover .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 7px var(--amber); }
.ssn-insert .code { font-family: var(--mono); font-size: 6.5px; letter-spacing: .16em; color: var(--faint); }
.ssn-insert[aria-expanded="true"] { border-color: var(--amber-dim); color: var(--amber-hot); }
.ssn-insert-note {
  margin-top: 8px; padding: 10px 11px;
  border: 1px dashed var(--line); border-radius: 4px;
  font-size: 11.5px; color: var(--faint); line-height: 1.7;
}
.ssn-insert-note b { display: block; color: var(--dim); }

/* ── 本場已唱 ── */
.ssn-sung { display: grid; gap: 6px; }
.ssn-sung-row {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: 3px 8px 8px 3px; background: var(--ink-1);
  padding: 8px 10px; min-height: 46px;
}
.ssn-sung-row.pending { border-left: 3px dashed var(--faint); }
.ssn-sung-row .t { font-family: var(--mono); font-size: 9px; color: var(--faint); flex-shrink: 0; }
.ssn-sung-row .tt { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssn-sung-row .res { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ssn-sung-row .res i { font-style: normal; font-size: 10px; color: var(--dim); }
.ssn-sung-row .res.todo {
  font-size: 10px; color: var(--faint);
  border: 1px dashed var(--faint); border-radius: 3px; padding: 2px 7px;
}
.ssn-sung-note { margin-top: 9px; font-size: 11px; color: var(--faint); line-height: 1.65; }

/* ── Quick log 三步 ── */
.ssn-log-song { font-family: var(--mincho); font-size: 20px; font-weight: 700; margin: 2px 0 4px; }
.ssn-log-song span { font-family: var(--cjk); font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 9px; }
.ssn-step-lab {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 14px 0 8px;
}
.ssn-step-lab em { font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--faint); }
.ssn-qlog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ssn-qlog button {
  appearance: none; cursor: pointer; min-height: 88px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi), inset 0 -4px 8px rgba(0, 0, 0, .4);
  color: var(--dim); display: grid; justify-items: center; align-content: center; gap: 6px;
  padding: 8px 2px; font-size: 12.5px; font-family: var(--cjk); font-weight: 600;
  transition: border-color .15s, color .15s, transform .08s;
}
.ssn-qlog button:hover { color: var(--text); }
.ssn-qlog [data-lrate="perfect"]:hover { border-color: var(--green); }
.ssn-qlog [data-lrate="ok"]:hover { border-color: var(--amber); }
.ssn-qlog [data-lrate="strained"]:hover { border-color: #e08a4a; }
.ssn-qlog [data-lrate="failed"]:hover { border-color: var(--red); }
.ssn-qlog button:active { transform: scale(.95); }
.ssn-qlog button[aria-pressed="true"] {
  border-color: var(--amber); color: var(--amber-hot);
  background: linear-gradient(180deg, #241a06, #170f02);
  box-shadow: 0 0 12px rgba(245, 185, 66, .25), inset 0 1px 0 var(--metal-hi);
}
.ssn-strain {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 9px;
}
.ssn-strain .lb { font-size: 11.5px; color: var(--dim); flex-shrink: 0; }
.ssn-strain button {
  appearance: none; cursor: pointer; min-height: 34px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--ink-1);
  color: var(--dim); font-family: var(--cjk); font-size: 12px; padding: 4px 11px;
  transition: border-color .15s, color .15s;
}
.ssn-strain button:hover { border-color: var(--faint); color: var(--text); }
.ssn-strain button[aria-pressed="true"] {
  border-color: #e08a4a; color: #f0a76b;
  background: linear-gradient(180deg, #241206, #170a02);
}
.ssn-step3 { border-top: 1px dashed var(--line-soft); margin-top: 14px; }
.ssn-step3 .tag-chips { margin-bottom: 12px; }
.ssn-log-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.ssn-log-skip {
  appearance: none; cursor: pointer; min-height: 48px; padding: 0 14px;
  background: none; border: 1px dashed var(--line); border-radius: 6px;
  color: var(--faint); font-size: 12.5px; font-family: var(--cjk);
}
.ssn-log-skip:hover { border-color: var(--faint); color: var(--dim); }
.ssn-log-save {
  appearance: none; cursor: pointer; min-height: 48px;
  background: linear-gradient(180deg, #0a1f12, #061309);
  border: 1px solid var(--green); border-radius: 6px;
  color: var(--phos); font-size: 14.5px; font-weight: 700; font-family: var(--cjk);
  text-shadow: 0 0 8px rgba(142, 240, 176, .5);
}
.ssn-log-save:active { transform: scale(.98); }
.ssn-log-cancel {
  appearance: none; cursor: pointer; width: 100%; margin-top: 14px; min-height: 42px;
  background: none; border: 1px dashed var(--line); border-radius: 6px;
  color: var(--faint); font-size: 12px; font-family: var(--cjk);
}
.ssn-log-cancel:hover { border-color: var(--faint); color: var(--dim); }

/* ── 結束模擬 ── */
.ssn-exit {
  appearance: none; cursor: pointer; width: 100%; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: none; border: 1px dashed var(--amber-dim); border-radius: 6px;
  color: var(--amber); font-size: 13px; font-family: var(--cjk); font-weight: 700;
}
.ssn-exit:hover { border-color: var(--amber); }
.ssn-exit .en { font-family: var(--mono); font-size: 7px; letter-spacing: .18em; color: var(--amber-dim); font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .ssn-backdrop, .ssn-entry { animation: none; }
  .ssn-reads .v { animation: none; }
}

/* ── v0.9.6 全歌本地圖 RANGE ATLAS（方向 B 的另一半）───────────
   稜線縱斷面：Y＝海拔＝音高（與高度儀同座標系）、等高線＝音高格線本身。
   山影＝原 key 地形、亮色路線＝建議 key 落域——山不動，路線動。 */

/* 檢視切換：紙條 / 地圖（沿用 rep-sort 的按鍵材質，尺寸加大成主開關） */
.rep-view { display: flex; gap: 6px; padding: 10px 0 2px; }
.rep-view button {
  appearance: none; cursor: pointer; flex: 1;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--faint); font-size: 12.5px; font-family: var(--cjk);
  padding: 7px 10px; min-height: 34px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .15s;
}
.rep-view button .code { font-family: var(--mono); font-size: 7px; letter-spacing: .18em; }
.rep-view button:hover { color: var(--dim); border-color: var(--faint); }
.rep-view button[aria-pressed="true"] {
  border-color: var(--amber); color: var(--amber-hot);
  background: linear-gradient(180deg, #1f1608, #130d05);
  text-shadow: 0 0 8px rgba(245, 185, 66, .4);
}

.atlas { animation: fadeUp .3s both; }

/* 測繪率讀數 + 圖例 */
.atl-survey {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  padding: 10px 2px 8px;
}
.atl-survey .dot-num {
  font-family: var(--dot); font-size: 30px; line-height: .9;
  color: var(--amber-hot);
  text-shadow: 0 0 14px rgba(245, 185, 66, .55);
}
.atl-survey .dot-num small { font-size: 15px; color: var(--amber-dim); text-shadow: none; }
.atl-survey-lab { font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em; color: var(--faint); line-height: 1.6; }
.atl-survey-lab .zh { display: block; font-family: var(--cjk); font-size: 10px; letter-spacing: .04em; color: var(--dim); }
.atl-legend {
  margin-left: auto; display: flex; flex-wrap: wrap; gap: 3px 12px;
  font-size: 10px; color: var(--faint);
}
.atl-legend span { display: flex; align-items: center; gap: 5px; }
.atl-legend i { display: inline-block; }
.atl-legend .rt { width: 4px; height: 13px; border-radius: 2px; }
.atl-legend .rt-clear { background: var(--green); box-shadow: 0 0 5px rgba(111, 214, 148, .6); }
.atl-legend .rt-warn { background: var(--amber); box-shadow: 0 0 5px rgba(245, 185, 66, .6); }
.atl-legend .rt-est { background: repeating-linear-gradient(180deg, var(--amber) 0 3px, transparent 3px 5.5px); box-shadow: none; }
.atl-legend .mt { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid rgba(93, 110, 126, .45); }

/* 地圖本體：寬度超出就橫向捲（手機上的長山脈） */
.atl-scroll { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 4px; background: rgba(3, 6, 10, .55); }
.atl-scroll svg { display: block; min-width: 100%; } /* 歌少時的小圖撐滿容器置中；寬圖照樣橫捲 */
.atl-scroll [data-atlas-song]:focus-visible { outline: 1px dashed var(--amber); }

/* 未測繪領域托盤：稀疏不是空狀態，是地圖的常態邊緣 */
.atl-tray { margin-top: 10px; border: 1px dashed var(--line); border-radius: 4px; padding: 10px 12px; }
.atl-tray-lab {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .2em; color: var(--faint);
  margin-bottom: 8px;
}
.atl-tray-lab .zh { font-family: var(--cjk); font-size: 11px; letter-spacing: .2em; color: var(--dim); }
.atl-tray-n { margin-left: auto; font-family: var(--dot); font-size: 12px; color: var(--dim); }
.atl-tray-grp { margin: 8px 0; }
.atl-tray-grp .g { display: block; font-size: 10.5px; color: var(--dim); margin-bottom: 5px; }
.atl-tray-grp .g small { color: var(--faint); margin-left: 7px; font-size: 9.5px; }
.atl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.atl-chip {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--dim); font-size: 11px; font-family: var(--cjk);
  padding: 3px 8px; min-height: 26px;
  transition: all .15s;
}
.atl-chip:hover { color: var(--text); border-color: var(--faint); }
.atl-chip .t { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atl-tray-note, .atl-foot { font-size: 10.5px; color: var(--faint); line-height: 1.6; margin-top: 8px; }
.atl-foot { padding: 0 2px; }

/* ════ v0.9.7 登艙前準備 PRE-FLIGHT(§12 建飛行計畫示意版)═══════════
   同一個模擬艙覆蓋層的第一階段:銘板照常駐、材質照舊(bezel/panel/disp-bg/tag-chip),
   店名輸入走 CDU 磷光(與歌本檢索台同款),挑歌列=緊湊紙條的可按版。 */

.ssn-prep-head { margin-bottom: 13px; }
.ssn-fld { display: block; margin-top: 10px; }
.ssn-fld .lb {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 7px; letter-spacing: .22em; color: var(--faint);
}
.ssn-fld .lb i { font-style: normal; font-family: var(--cjk); font-size: 10px; letter-spacing: .08em; color: var(--dim); margin-left: 6px; }
.ssn-venue-input {
  width: 100%; appearance: none; outline: none;
  background: var(--disp-bg);
  border: 1px solid #14281c; border-radius: 4px;
  color: var(--phos); font-family: var(--cjk); font-size: 15px;
  padding: 10px 12px;
  text-shadow: 0 0 8px rgba(142, 240, 176, .3);
  caret-color: var(--phos);
  transition: border-color .15s;
}
.ssn-venue-input:focus { border-color: rgba(111, 214, 148, .55); }
.ssn-venue-input::placeholder { color: var(--faint); text-shadow: none; }
.ssn-venue-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ssn-prep-reads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ssn-prep-reads .rd {
  display: grid; gap: 3px; align-content: start;
  background: var(--disp-bg); border: 1px solid #1c2836; border-radius: 6px;
  padding: 8px 10px 7px;
}
.ssn-prep-reads .lb { font-family: var(--mono); font-size: 6.5px; letter-spacing: .18em; color: var(--faint); }
.ssn-prep-reads .lb i { font-style: normal; font-family: var(--cjk); font-size: 9px; letter-spacing: .1em; color: var(--dim); margin-left: 5px; }
.ssn-prep-reads .v {
  font-family: var(--dot); font-size: 22px; line-height: 1.1;
  color: var(--amber-hot); text-shadow: 0 0 12px rgba(245, 185, 66, .55);
}
.ssn-prep-reads .v.sys { font-size: 16px; letter-spacing: .06em; }
.ssn-prep-reads .v small { font-family: var(--mono); font-size: 10px; color: var(--faint); text-shadow: none; margin-left: 2px; }
.ssn-prep-reads .nt { font-size: 10px; color: var(--faint); line-height: 1.5; }

.ssn-prep-plan { margin-bottom: 13px; }
.ssn-pl-toggle {
  margin-left: auto; appearance: none; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  padding: 3px 8px; border-radius: 3px;
  background: none; border: 1px solid var(--line-soft);
  color: var(--amber-dim); font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em;
  transition: border-color .15s, color .15s;
}
.ssn-pl-toggle:hover { border-color: var(--amber); color: var(--amber); }
.ssn-pl-count { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-left: 6px; }
.ssn-plan-row.picked { border-left-color: var(--amber-dim); }
.ssn-plan-row .ord { font-family: var(--mono); font-size: 9px; color: var(--amber-dim); letter-spacing: .08em; flex-shrink: 0; }
.ssn-plan-x {
  appearance: none; cursor: pointer; flex-shrink: 0;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  width: 26px; height: 26px; color: var(--faint); font-size: 10px;
  transition: border-color .15s, color .15s;
}
.ssn-plan-x:hover { border-color: var(--red); color: var(--red); }
.ssn-prep-note { margin-top: 8px; font-size: 10.5px; color: var(--faint); }

.ssn-pick-list {
  display: grid; gap: 5px;
  max-height: 292px; overflow-y: auto;
  padding: 2px 2px 14px; margin: 0 -2px;
  /* 內部捲動的可視提示:底部一道漸暗 */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
}
.ssn-pick-row {
  appearance: none; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-soft); border-left: 3px solid var(--line);
  border-radius: 3px 6px 6px 3px; background: var(--ink-1);
  padding: 7px 10px; min-height: 46px;
  color: var(--dim); font-family: var(--cjk); font-size: 13px;
  transition: border-color .15s, background .15s;
}
.ssn-pick-row:hover { border-color: var(--faint); background: var(--panel-2); }
.ssn-pick-row .tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ssn-pick-row .tt i { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); }
.ssn-pick-row .mk {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px dashed var(--line); color: var(--faint); font-size: 12px;
  transition: all .15s;
}
.ssn-pick-row.on { border-left-color: var(--green); background: linear-gradient(180deg, #0a1a10, #071009); color: var(--phos); }
.ssn-pick-row.on .tt { color: var(--phos); }
.ssn-pick-row.on .mk { border: 1px solid var(--green); color: var(--green); box-shadow: 0 0 8px rgba(111, 214, 148, .35); }

.ssn-skip-prep {
  appearance: none; cursor: pointer; width: 100%; margin-top: 10px; min-height: 44px;
  background: none; border: 1px dashed var(--line); border-radius: 6px;
  color: var(--dim); font-size: 12.5px; font-family: var(--cjk);
  transition: border-color .15s, color .15s;
}
.ssn-skip-prep:hover { border-color: var(--amber-dim); color: var(--amber); }
.ssn-prep-honest { margin-top: 12px; font-size: 11px; color: var(--faint); line-height: 1.7; text-align: center; }

/* ── v0.9.7 追加：準備畫面就地切系統 + 挑歌搜尋 ─────────────────── */
.rd.sys-toggle {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s;
}
.rd.sys-toggle:hover { border-color: var(--amber-dim); }
.rd .nt { display: flex; align-items: center; gap: 4px; }
.rd .nt .car { color: var(--amber-dim); font-size: 9px; }
.ssn-sys-picker {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 8px; padding: 9px 10px;
  border: 1px dashed var(--line); border-radius: 6px;
  background: var(--ink-1);
}
.ssn-sys-opt {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 3px; background: #0c1119;
  box-shadow: inset 0 1px 0 var(--metal-hi);
  color: var(--dim); font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  padding: 5px 10px; min-height: 30px;
}
.ssn-sys-opt .lamp { width: 7px; height: 7px; border-radius: 50%; background: #1c2733; border: 1px solid #2a3644; }
.ssn-sys-opt:hover { border-color: var(--faint); color: var(--text); }
.ssn-sys-opt[aria-pressed="true"] { border-color: var(--amber-dim); color: var(--amber-hot); }
.ssn-sys-opt[aria-pressed="true"] .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 6px var(--amber); }
.ssn-sys-note { flex-basis: 100%; font-size: 10px; color: var(--faint); margin-top: 2px; }

.ssn-pick-search { margin: 2px 0 8px; }

/* ── IndexedDB 收尾：iTunes autocomplete（沿用既有表單材質） ── */
.itunes-results {
  display: grid; gap: 3px; margin-top: 5px; padding: 4px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--ink-1);
  max-height: 220px; overflow-y: auto;
}
.itunes-results[hidden] { display: none; }
.itunes-results button {
  appearance: none; cursor: pointer; text-align: left;
  border: 0; border-bottom: 1px solid var(--line-soft); background: transparent;
  color: var(--text); padding: 8px; font-family: var(--cjk);
}
.itunes-results button:last-child { border-bottom: 0; }
.itunes-results button:hover { background: var(--panel-2); }
.itunes-results b, .itunes-results span { display: block; }
.itunes-results span { margin-top: 2px; color: var(--faint); font-size: 10.5px; }
.form-delete { color: var(--red) !important; border-color: var(--red) !important; }

/* ════ v0.9.13 LOADSHEET 總負擔預覽（§12 完整版：高負擔歌數提示）═════
   飛行計畫的行前載重表：一格＝一首歌、順序＝演唱順序。
   材質語彙零新增——CLEAR 磷光綠（舒服域同款）、CAUTION 琥珀斜紋
   （.caution 警示條同款）、未測繪灰斜紋（INOP 同款）、EST 虛線框（推測語彙）。
   它是提示不是閘門：本區塊沒有任何 disabled/pointer-events 規則。 */

.loadsheet {
  margin-top: 10px; padding: 9px 11px 9px;
  border: 1px solid var(--line-soft); border-radius: 6px;
  background: var(--ink-1);
}
.ls-lab {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 7px; letter-spacing: .22em; color: var(--faint);
}
.ls-lab .zh { font-family: var(--cjk); font-size: 10px; letter-spacing: .08em; color: var(--dim); }
.ls-est {
  margin-left: auto; flex-shrink: 0;
  font-size: 6.5px; letter-spacing: .18em; color: var(--amber-dim);
  border: 1px dashed var(--amber-dim); border-radius: 3px; padding: 1px 5px;
}
.ls-strip { display: flex; gap: 3px; margin-top: 8px; height: 16px; }
.ls-cell { flex: 1; min-width: 6px; border-radius: 2px; }
.ls-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.ls-cell.ls-clear, .ls-sw.ls-clear {
  background: rgba(111, 214, 148, .45);
  border: 1px solid rgba(111, 214, 148, .75);
  box-shadow: 0 0 6px rgba(111, 214, 148, .22);
}
.ls-cell.ls-caution, .ls-sw.ls-caution {
  background: repeating-linear-gradient(-45deg, rgba(245, 185, 66, .5) 0 4px, rgba(245, 185, 66, .1) 4px 8px);
  border: 1px solid var(--amber-dim);
}
.ls-cell.ls-unknown, .ls-sw.ls-unknown {
  background: repeating-linear-gradient(-45deg, rgba(93, 110, 126, .28) 0 4px, transparent 4px 8px);
  border: 1px dashed var(--line);
}
.ls-counts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px;
  margin-top: 7px; font-size: 10px; color: var(--dim);
}
.ls-counts span { display: inline-flex; align-items: center; gap: 5px; }
.ls-order { margin-left: auto; font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: var(--faint); }
.ls-hint {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 8px; padding: 8px 9px;
  border: 1px solid var(--amber-dim); border-radius: 4px;
  background:
    repeating-linear-gradient(-45deg, rgba(245, 185, 66, .1) 0 9px, transparent 9px 18px),
    rgba(245, 185, 66, .04);
  color: var(--amber); font-size: 11.5px; line-height: 1.6;
}
.ls-hint .tag {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .18em;
  border: 1px solid var(--amber-dim); padding: 1px 5px; border-radius: 3px;
  flex-shrink: 0; margin-top: 2px;
  animation: cautionblink 1.6s steps(2) infinite;
}
.ls-note { margin-top: 7px; font-size: 10px; color: var(--faint); line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .ls-hint .tag { animation: none; }
}
