:root {
  --bg: #f4f2ee; --panel: #fff; --ink: #14181f; --dim: #5d6573; --line: #e2ded6; --accent: #e59a0b; --accent-ink: #1a1203; --road: #1d2430;
  --ok: #15803d; --bad: #b91c1c; --soft: #ece8e0; --radius: 18px; --shadow: 0 1px 2px rgba(20,24,31,.06), 0 10px 30px rgba(20,24,31,.08);
  --display: 'Space Grotesk', system-ui, sans-serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f131a; --panel: #171d27; --ink: #edf0f5; --dim: #9aa4b5; --line: #273041; --soft: #1f2734; --road: #0a0d12; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 21px/1 var(--display); text-decoration: none; letter-spacing: -.3px; }
.logo svg { width: 34px; height: 34px; }

.hero { background: var(--road); color: #f5f1e8; border-radius: 26px; padding: 30px; position: relative; overflow: hidden; margin-bottom: 22px; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 22px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 46px, transparent 46px 92px); opacity: .9; animation: road 1.4s linear infinite; }
@keyframes road { to { background-position: -92px 0; } }
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; } }
.hero h1 { font: 700 clamp(30px, 5vw, 48px)/1.05 var(--display); letter-spacing: -1.2px; margin: 0 0 8px; max-width: 760px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: #c9cfda; margin: 0 0 22px; max-width: 640px; }
form.make { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; padding-bottom: 26px; position: relative; z-index: 1; }
@media (max-width: 760px) { form.make { grid-template-columns: 1fr 1fr; } form.make .wide { grid-column: 1 / -1; } }
form.make label { font-size: 13px; color: #c9cfda; display: flex; flex-direction: column; gap: 4px; }
form.make input, form.make select, form.make textarea { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px; color: #fff; }
form.make select option { color: #111; }
form.make input:focus, form.make select:focus, form.make textarea:focus { outline: none; border-color: var(--accent); }
form.make .wide { grid-column: 1 / -1; }
.btn { border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.est { font-size: 13px; color: #c9cfda; align-self: center; }
.err { color: #fca5a5; font-weight: 600; }
.panel .err, main .err { color: var(--bad); }

h2 { font: 700 22px var(--display); margin: 24px 0 10px; letter-spacing: -.3px; }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding-bottom: 40px; }
.course { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.course:hover { border-color: var(--accent); }
.course strong { font: 700 17px/1.3 var(--display); }
.meta { color: var(--dim); font-size: 13.5px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--soft); }
.pill.ready { background: #bbf7d0; color: #14532d; } .pill.error { background: #fecaca; color: #7f1d1d; } .pill.work { background: #fde68a; color: #713f12; }
.bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--accent); }
.empty { color: var(--dim); }

/* course page */
.chead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 6px 0 14px; }
.chead h1 { font: 700 clamp(26px, 4vw, 38px)/1.1 var(--display); letter-spacing: -.8px; margin: 0 0 6px; }
.player { background: var(--road); color: #f5f1e8; border-radius: 24px; padding: 22px; margin-bottom: 18px; display: grid; gap: 14px; }
.player .now { font: 700 22px/1.25 var(--display); }
.player .sub { color: #aeb6c4; font-size: 14px; }
.player audio { width: 100%; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.big { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 30px; cursor: pointer; display: grid; place-items: center; }
.line { background: rgba(255,255,255,.07); border-radius: 14px; padding: 14px; font-size: 19px; line-height: 1.5; min-height: 70px; }
.line b { color: var(--accent); }
.eps { display: grid; gap: 10px; padding-bottom: 40px; }
.ep { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; }
.ep.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.ep .num { font: 700 22px var(--display); color: var(--dim); text-align: center; }
.ep.done .num { color: var(--ok); }
.ep h3 { margin: 0; font: 600 17px/1.3 var(--display); }
.ep .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .ep { grid-template-columns: 34px 1fr; } .ep .acts { grid-column: 1 / -1; justify-content: flex-start; } }
details.tx { grid-column: 1 / -1; } details.tx summary { cursor: pointer; color: var(--dim); font-size: 14px; }
details.tx p { margin: 6px 0; } details.tx b { color: var(--accent); }
.notice { background: #fef3c7; color: #78350f; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 6px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===================================================================== v2: app shell */
body { padding-bottom: env(safe-area-inset-bottom); }
header.top { padding-top: max(16px, env(safe-area-inset-top)); gap: 10px; }
.logo span { white-space: nowrap; }
@media (max-width: 420px) { .logo span { display: none; } }
.topnav { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: 14px; text-decoration: none; }
.chip.streak.lit { background: #fde68a; color: #713f12; }
.chip.lvl { background: var(--road); color: #f5f1e8; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; text-decoration: none; }
.avatar.big { width: 64px; height: 64px; font-size: 28px; }
.notice.bad { background: #fee2e2; color: #7f1d1d; }
.btn.danger, .danger { color: var(--bad) !important; }
.btn.light, .ghost.light { color: #f5f1e8; border-color: rgba(255,255,255,.25); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h2 { margin-top: 0; }
.panel label, .settings label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--dim); margin-bottom: 12px; }
.panel input, .panel select, .panel textarea { background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; }
label.check { flex-direction: row !important; align-items: flex-start; gap: 10px; color: inherit; }
label.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.kind { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.center { justify-content: center; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--road); color: #fff; padding: 12px 18px;
  border-radius: 12px; font-weight: 600; z-index: 99; transition: .25s; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { background: var(--bad); }
.modal { position: fixed; inset: 0; background: rgba(10,13,18,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal .panel { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.wide-btn { width: 100%; margin-bottom: 8px; justify-content: flex-start; }

/* home */
.resume { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin-bottom: 16px; }
@media (max-width: 700px) { .resume { grid-template-columns: 1fr; } }
.resume-btn { display: flex; align-items: center; gap: 18px; text-align: left; border: 0; cursor: pointer; background: var(--road); color: #f5f1e8; border-radius: 26px; padding: 22px;
  position: relative; overflow: hidden; min-height: 120px; }
.resume-btn::after { content: ''; position: absolute; left: 0; right: 0; bottom: 12px; height: 5px; background: repeating-linear-gradient(90deg, var(--accent) 0 40px, transparent 40px 80px); opacity: .8; animation: road 1.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .resume-btn::after { animation: none; } }
.play-ic { width: 76px; height: 76px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 32px; }
.rtxt { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .rtxt small { color: #aeb6c4; font-size: 14px; }
.rtxt strong { font: 700 clamp(20px, 3vw, 26px)/1.2 var(--display); }
.resume-empty { background: var(--road); color: #f5f1e8; border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.resume-empty strong { font: 700 28px/1.1 var(--display); } .resume-empty span { color: #c9cfda; }
.resume-side { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.big-drive { font-size: 19px; padding: 20px 28px; border-radius: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--dim); font-weight: 700; } .stat b { font: 700 20px var(--display); }
.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 900px) { .quick { grid-template-columns: repeat(3, 1fr); } }
.qk { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.qk span { font-size: 26px; } .qk:hover { border-color: var(--accent); }
.bar.thick { height: 12px; }

/* make */
.make-hero { padding-bottom: 8px; }
.modes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 18px; position: relative; z-index: 1; }
@media (max-width: 900px) { .modes { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .modes { grid-template-columns: repeat(2, 1fr); } }
.mode { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.15); border-radius: 14px; padding: 10px; color: #f5f1e8; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.mode span { font-size: 22px; } .mode small { color: #aeb6c4; font-size: 12px; line-height: 1.3; }
.mode.on { border-color: var(--accent); background: rgba(229,154,11,.15); }
form.make textarea { resize: vertical; }
form.make .check { color: #e5e7eb; font-size: 14px; }
.timing .tl { display: flex; border-radius: 10px; overflow: hidden; font-size: 12px; font-weight: 700; }
.timing .seg { padding: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timing .l { background: rgba(255,255,255,.12); color: #fff; } .timing .r { background: #f59e0b; color: #1a1203; } .timing .q { background: #22c55e; color: #052e16; }
.vcard { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: #fff; }

/* course path */
.path { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.path-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
ol.road { list-style: none; display: flex; gap: 0; padding: 14px 0 4px; margin: 0; overflow-x: auto; scrollbar-width: thin; }
ol.road li { flex: none; display: flex; align-items: center; }
ol.road li + li::before { content: ''; width: 26px; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.stop { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; padding: 0 2px; }
.stop .dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font: 700 18px var(--display); border: 3px solid transparent; }
.stop .lbl { font-size: 11px; color: var(--dim); white-space: nowrap; }
.stop.done .dot { background: var(--ok); color: #fff; } .stop.cur .dot { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(229,154,11,.25); }
.stop.wait { opacity: .5; cursor: default; } .stop.goal .dot { background: var(--road); }
.stop.goal.done .dot { background: var(--accent); }
.player .huge-ish { font-size: 18px; padding: 16px 22px; }
.controls.small { gap: 6px; }
.tx.light summary { color: #c9cfda; } .tx.light ol { margin: 6px 0; }
.inline-player { display: grid; gap: 10px; }
.qbox { background: rgba(255,255,255,.07); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.answers { display: grid; gap: 8px; }
.ans { text-align: left; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 16px; }
.player .ans { background: rgba(255,255,255,.06); color: #f5f1e8; border-color: rgba(255,255,255,.2); }
.ans b { color: var(--accent); margin-right: 6px; } .ans.right { background: #166534 !important; border-color: #22c55e; color: #fff; } .ans.wrong { background: #7f1d1d !important; color: #fff; }
.ans.idk { color: var(--dim); }
.askrow { display: flex; gap: 8px; } .askrow input { flex: 1; min-width: 0; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18); border-radius: 10px; padding: 10px; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 40px; }

/* celebrations */
.celebrate { position: fixed; inset: 0; display: grid; place-items: center; z-index: 80; background: rgba(10,13,18,.55); opacity: 0; transition: .25s; padding: 16px; }
.celebrate.show { opacity: 1; }
.celebrate.mini { background: none; pointer-events: none; align-items: start; padding-top: 18vh; } .celebrate.mini .xp-pop { font-size: 40px; }
.burst { display: grid; gap: 12px; justify-items: center; text-align: center; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .burst { animation: none; } }
.xp-pop { font: 800 56px var(--display); color: var(--accent); text-shadow: 0 4px 30px rgba(229,154,11,.5); }
.lvl-up { font: 800 34px var(--display); color: #fff; } .lvl-up small { display: block; font-size: 18px; color: #fde68a; }
.badge-pop { background: #fff; color: #111; border-radius: 999px; padding: 8px 16px; font-weight: 700; }

/* profile */
.profile { display: flex; gap: 16px; align-items: center; margin: 8px 0 16px; } .profile h1 { margin: 0; font: 700 28px var(--display); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; opacity: .55; }
.badge.on { opacity: 1; border-color: var(--accent); } .badge span { font-size: 26px; } .badge small { color: var(--dim); font-size: 12px; }
ul.certs { list-style: none; padding: 0; display: grid; gap: 8px; } ul.certs li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.degree .bar { margin: 8px 0 14px; }
details summary { cursor: pointer; padding: 8px 0; }
ol.board { padding-left: 22px; margin: 0; } ol.board li { padding: 6px 0; } ol.board li span { display: inline-block; min-width: 60%; } ol.board li.me { font-weight: 800; color: var(--accent); }
.code { font-family: ui-monospace, monospace; letter-spacing: 2px; }

/* auth */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: center; padding: 20px 0 60px; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; } }
.auth-hero svg { width: 64px; height: 64px; } .auth-hero h1 { font: 700 clamp(34px, 6vw, 52px)/1.05 var(--display); margin: 10px 0; letter-spacing: -1px; } .auth-hero h1 em { color: var(--accent); font-style: normal; }
.auth-hero p { color: var(--dim); font-size: 18px; }
.locked { text-align: center; padding: 40px 0; display: grid; gap: 14px; justify-items: center; } .lk-ic { font-size: 64px; }
.btn.huge { font-size: 22px; padding: 22px 30px; border-radius: 20px; min-width: 260px; }

/* certificate */
.diploma { background: #fffdf6; color: #1b1b1b; border: 10px double #b8860b; border-radius: 6px; padding: clamp(20px, 5vw, 50px); text-align: center; margin: 10px auto 18px; max-width: 820px;
  font-family: Georgia, 'Times New Roman', serif; box-shadow: var(--shadow); }
.diploma .seal svg { width: 64px; height: 64px; color: #1d2430; } .diploma .uni { font: 700 30px var(--display); letter-spacing: 1px; }
.diploma .kind { text-transform: uppercase; letter-spacing: 4px; color: #8a6d1d; margin: 6px 0 18px; font-size: 14px; }
.diploma .who { font-size: clamp(30px, 6vw, 46px); font-style: italic; border-bottom: 1px solid #b8860b; display: inline-block; padding: 0 20px 4px; margin: 4px 0 8px; }
.diploma .what { font-size: clamp(20px, 4vw, 28px); font-weight: 700; margin: 6px 0 12px; } .diploma .meta { color: #555; }
.diploma .sig { margin-top: 24px; display: inline-flex; flex-direction: column; border-top: 1px solid #999; padding-top: 6px; font-style: italic; } .diploma .sig small { font-style: normal; color: #666; }
.diploma .code { margin-top: 18px; font-size: 12px; color: #777; }
.diploma.deg { border-color: #1d2430; background: linear-gradient(#fffdf6, #fff7e0); }
@media print { header.top, .controls, .toast { display: none !important; } body { background: #fff; } .diploma { box-shadow: none; margin: 0 auto; } }
.hero.share { padding-bottom: 40px; } .panel.light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }

/* ===================================================================== Drive mode: car-first, glanceable, huge targets */
body.in-drive { background: #07090d; } body.in-drive header.top { display: none; } body.in-drive .wrap { max-width: none; padding: 0; }
.drive { min-height: 100vh; min-height: 100dvh; background: #07090d; color: #f5f1e8; display: flex; flex-direction: column; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); font-size: 20px; }
.d-top { display: flex; align-items: center; gap: 12px; }
.d-exit { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #1a2130; color: #fff; font-size: 24px; cursor: pointer; flex: none; }
.d-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; } .d-meta b { font: 700 22px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-meta span { color: #9aa4b5; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-chip { background: #1a2130; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 16px; white-space: nowrap; } .d-chip.on { background: var(--accent); color: #111; } .d-chip.big { font-size: 22px; padding: 12px 20px; }
.d-prog { height: 8px; background: #1a2130; border-radius: 99px; overflow: hidden; } .d-prog span { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.d-phase { color: var(--accent); font-weight: 700; font-size: 17px; text-align: center; }
.d-cap { min-height: 110px; text-align: center; font-size: clamp(20px, 3vw, 26px); line-height: 1.4; color: #e5e7eb; display: grid; place-items: center; padding: 0 6px; }
.drive.moving .d-cap { min-height: 40px; }
.d-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; justify-items: center; }
.d-play { width: min(42vw, 220px); height: min(42vw, 220px); border-radius: 50%; border: 0; background: var(--accent); color: #111; font-size: clamp(56px, 12vw, 84px); cursor: pointer;
  box-shadow: 0 0 0 10px rgba(229,154,11,.15); } .d-play.on { background: #f5f1e8; } .d-play:disabled { opacity: .5; }
.d-side { width: min(21vw, 120px); height: min(21vw, 120px); border-radius: 50%; border: 0; background: #1a2130; color: #fff; font-size: 38px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.d-side small { font-size: 15px; color: #9aa4b5; }
.d-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .d-row.small { grid-template-columns: 1fr; justify-items: center; }
.d-btn { min-height: 84px; border-radius: 22px; border: 0; background: #1a2130; color: #fff; font: 700 22px var(--sans); cursor: pointer; padding: 12px; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; }
.d-btn:disabled { opacity: .4; } .d-btn.wide { width: 100%; max-width: 420px; } .d-btn.big-next { background: var(--accent); color: #111; grid-column: 1 / -1; min-height: 110px; font-size: 28px; }
.d-btn.mood { flex-direction: column; min-height: 130px; } .d-btn.mood span { font-size: 44px; }
.d-tog { border: 2px solid #2a3344; background: none; color: #9aa4b5; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 17px; cursor: pointer; } .d-tog.on { border-color: var(--accent); color: var(--accent); }
.d-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; align-items: stretch; text-align: center; max-width: 720px; width: 100%; margin: 0 auto; }
.d-title { font: 700 clamp(30px, 5vw, 44px)/1.15 var(--display); }
.d-sub { color: #9aa4b5; font-size: 17px; text-align: center; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d-link { background: none; border: 0; color: #9aa4b5; font-size: 18px; text-decoration: underline; cursor: pointer; padding: 14px; }
.d-quiz { flex: 1; display: flex; flex-direction: column; gap: 14px; justify-content: center; max-width: 820px; width: 100%; margin: 0 auto; }
.d-q { font: 700 clamp(24px, 4vw, 34px)/1.25 var(--display); text-align: center; }
.d-answers { display: grid; gap: 12px; }
.d-ans { min-height: 92px; border-radius: 22px; border: 3px solid #2a3344; background: #121822; color: #fff; font-size: 22px; text-align: left; padding: 14px 20px; cursor: pointer; display: flex; gap: 16px; align-items: center; }
.d-ans b { width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center; font-size: 26px; }
.d-ans.right { border-color: #22c55e; background: #14532d; } .d-ans.wrong { border-color: #ef4444; background: #7f1d1d; } .d-ans.dim { opacity: .45; }
.d-score, .d-players { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (orientation: landscape) and (max-height: 520px) {   /* phone in a dash mount / car screen */
  .drive { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; align-content: start; }
  .d-top, .d-prog, .d-phase { grid-column: 1 / -1; } .d-cap { min-height: 0; } .d-play { width: 150px; height: 150px; font-size: 56px; } .d-side { width: 90px; height: 90px; }
  .d-quiz, .d-center { grid-column: 1 / -1; }
}
