:root {
  --bg: #0b0e13; --panel: #121820; --panel-hi: #1b212b; --line: #262d39;
  --text: #e6eaf0; --dim: #8a95a6; --accent: #19c3a6; --accent-dim: #115c52; --warn: #f0b43c; --bad: #f06262;
  --r: 14px; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overscroll-behavior: none; }
body { font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
#app { height: 100%; display: flex; flex-direction: column; padding-top: var(--safe-t); }
button, input { font: inherit; color: inherit; }
button { background: var(--panel-hi); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; min-height: 48px; cursor: pointer; touch-action: manipulation; }
button:active { background: var(--accent-dim); }
button.primary { background: var(--accent-dim); border-color: var(--accent); font-weight: 600; }
button[disabled] { opacity: .4; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.top h1 { font-size: 17px; margin: 0; flex: 1; letter-spacing: .2px; }
.top h1 b { color: var(--accent); }
.pill { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: var(--panel-hi); color: var(--dim); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.on { color: var(--accent); } .pill.warn { color: var(--warn); }
.iconbtn { min-height: 40px; width: 40px; padding: 0; font-size: 20px; line-height: 1; }
main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px; -webkit-overflow-scrolling: touch; }
.tabs { display: flex; border-top: 1px solid var(--line); background: var(--panel); padding-bottom: var(--safe-b); }
.tabs button { flex: 1; border: 0; border-radius: 0; background: none; color: var(--dim); min-height: 56px; font-size: 13px; }
.tabs button.on { color: var(--accent); }
.tabs button span { display: block; font-size: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.title { font-size: 22px; font-weight: 650; line-height: 1.2; margin: 0 0 4px; overflow-wrap: anywhere; }
.sub { color: var(--dim); margin: 0; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; align-items: center; }
.row.center { justify-content: center; }
.grow { flex: 1; }
.transport { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 12px; margin: 14px 0; }
.transport button { min-height: 72px; font-size: 26px; }
.transport button.big { background: var(--accent-dim); border-color: var(--accent); }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; height: 40px; background: none; accent-color: var(--accent); margin: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 8px 14px; border-radius: 99px; font-size: 14.5px; }
.chip.on { background: var(--accent-dim); border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 8px 0; min-height: 48px; }
.list { list-style: none; margin: 8px 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); min-height: 60px; cursor: pointer; }
.item:active { background: var(--panel-hi); }
.item .t { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--dim); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .txt { flex: 1; min-width: 0; }
.item .star { font-size: 22px; color: var(--dim); padding: 6px; }
.item .star.on { color: var(--warn); }
.item .bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; }
.item .bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 24px; color: var(--dim); font-size: 14px; }
.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 5; display: flex; flex-direction: column; padding-top: var(--safe-t); }
.sheet .body { flex: 1; overflow-y: auto; padding: 14px; }
.sheet .bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 28px 8px; }
.center-col img { width: 112px; height: 112px; border-radius: 26px; }
.steps { text-align: left; color: var(--dim); max-width: 420px; margin: 0; padding-left: 20px; }
.steps li { margin: 8px 0; } .steps b { color: var(--text); }
.hint { font-size: 13.5px; color: var(--dim); max-width: 420px; }
.err { color: var(--bad); }
video.scan { width: 100%; height: 100%; object-fit: cover; background: #000; }
.scanwrap { position: relative; flex: 1; }
.scanwrap::after { content: ""; position: absolute; inset: 18% 12%; border: 3px solid var(--accent); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); pointer-events: none; }
.menu { position: fixed; right: 10px; top: calc(var(--safe-t) + 54px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 4; min-width: 220px; overflow: hidden; }
.menu button { display: block; width: 100%; border: 0; border-radius: 0; text-align: left; border-bottom: 1px solid var(--line); background: var(--panel); }
.detail-meta { color: var(--dim); font-size: 14px; margin: 4px 0 12px; }
.plot { color: #c3cad6; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 76px); background: var(--panel-hi); border: 1px solid var(--line); padding: 10px 16px; border-radius: 99px; z-index: 9; font-size: 14px; }
