:root { --bg:#0b0d10; --panel:#151a20; --panel2:#1d242c; --text:#f5f7fa; --muted:#9aa6b2; --accent:#ff4d2e; --good:#3ecf8e; --warn:#ffb020; --bad:#ff5c5c; --line:#2a333d; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--text); font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.top { position:sticky; top:0; z-index:5; display:flex; gap:8px; align-items:center; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background:var(--bg); border-bottom:1px solid var(--line); }
.brand { color:var(--text); font-weight:700; text-decoration:none; margin-right:auto; }
.badge { font-size:13px; padding:4px 8px; border-radius:999px; background:var(--warn); color:#111; }
.badge.muted { background:var(--panel2); color:var(--muted); }
main { padding:14px; max-width:720px; margin:0 auto; outline:none; }
h1 { font-size:24px; margin:4px 0 12px; } h2 { font-size:19px; margin:18px 0 8px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px; margin:10px 0; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.grow { flex:1; }
.muted { color:var(--muted); }
.small { font-size:14px; }
button, .btn { min-height:44px; min-width:44px; padding:10px 16px; border-radius:12px; border:1px solid var(--line); background:var(--panel2); color:var(--text); font:inherit; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button.primary, .btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; }
button.danger { color:var(--bad); }
button:disabled { opacity:.5; }
label { display:block; margin:10px 0 4px; color:var(--muted); font-size:15px; }
input, select, textarea { width:100%; min-height:44px; padding:10px 12px; border-radius:10px; border:1px solid var(--line); background:#0f1318; color:var(--text); font:inherit; }
textarea { min-height:90px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 10px; }
.list { list-style:none; padding:0; margin:0; }
.list li { padding:12px 0; border-bottom:1px solid var(--line); }
.list a { color:var(--text); }
.tag { font-size:12px; padding:2px 6px; border-radius:6px; background:var(--panel2); color:var(--muted); margin-left:6px; }
.tag.measured { color:var(--good); } .tag.unknown { color:var(--warn); }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--warn); margin-right:6px; } .dot.confirmed { background:var(--good); } .dot.rejected { background:var(--bad); }
/* Lane mode */
.lane .score { font-size:64px; font-weight:800; text-align:center; letter-spacing:1px; padding:8px 0; font-variant-numeric: tabular-nums; }
.lane .score.empty { color:var(--muted); }
.pad { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.pad button { min-height:64px; font-size:26px; font-weight:700; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.chips button { min-height:44px; padding:8px 12px; border-radius:999px; }
.chips button[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
.warn { color:var(--warn); }
.save { width:100%; min-height:64px; font-size:22px; margin-top:12px; }
.mic { font-size:18px; }
.mic.listening { background:var(--bad); border-color:var(--bad); }
/* Crew chief */
.chief-btn { position:fixed; right:14px; bottom:calc(14px + env(safe-area-inset-bottom)); z-index:10; background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; border-radius:999px; box-shadow:0 6px 20px #0008; }
.chief { position:fixed; inset:auto 0 0 0; max-height:85vh; z-index:20; background:var(--panel); border-top:1px solid var(--line); border-radius:18px 18px 0 0; padding:12px 14px calc(14px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; box-shadow:0 -10px 30px #000a; }
.chief header { display:flex; align-items:center; gap:8px; }
.chief .log { overflow:auto; flex:1; min-height:120px; padding:8px 0; }
.msg { padding:10px 12px; border-radius:12px; margin:6px 0; white-space:pre-wrap; }
.msg.you { background:var(--panel2); margin-left:15%; }
.msg.chief { background:#0f1318; border:1px solid var(--line); margin-right:8%; }
.msg.chief .line + .line { margin-top:4px; }
.msg.chief .line.general { color:var(--muted); }
.msg.chief .line.unverified::before { content:"Unverified note: "; font-weight:600; }
.msg.chief .line.app { font-style:italic; }
.msg.chief .gk-note { margin-top:6px; }
.msg .rate { margin-top:6px; display:flex; gap:6px; }
pre.preview { white-space:pre-wrap; word-break:break-word; background:#0f1318; border:1px solid var(--line); border-radius:10px; padding:10px; font-size:13px; max-height:30vh; overflow:auto; }
.toast { position:fixed; left:14px; right:14px; bottom:calc(80px + env(safe-area-inset-bottom)); z-index:30; background:var(--panel2); border:1px solid var(--line); border-radius:14px; padding:12px 14px; display:flex; gap:10px; align-items:center; }
.toast span { flex:1; }
@media (prefers-reduced-motion: no-preference) { .chief { transition: transform .15s ease-out; } }

/* Carried forward from an earlier run or session: greyed until confirmed (review fixes 10, 11). */
.carried { opacity: 0.6; font-style: italic; }
label.carried::after { content: " (carried forward)"; font-size: 0.85em; }
