/* Saira, served from our own site (no request to Google). SIL Open Font License, see fonts/OFL-Saira.txt */
@font-face { font-family: 'Saira'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 50% 125%;
  src: url(../fonts/saira-latin-standard-normal.woff2) format('woff2-variations'), url(../fonts/saira-latin-standard-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Saira'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 50% 125%;
  src: url(../fonts/saira-latin-ext-standard-normal.woff2) format('woff2-variations'), url(../fonts/saira-latin-ext-standard-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
/* ===== Responsive scale =====
   Every size in this file is in rem. The root size grows smoothly with the screen: 16px on a phone held
   sideways (the design size, 932x430), 15px on small phones, ~20px on a laptop, ~24px on a 1080p
   monitor, ~30px on a 1440p monitor, at most 34px. Text never drops below ~12px. */
html { font-size: clamp(11px, min(0.86vw + 8px, 1.58vh + 9.2px, 3.72vh), 34px); }   /* 3.72vh: on short phone screens (browser bars) everything shrinks with the height */
:root {
  --ink: #141821; --muted: #4A5262; --yellow: #FFC400; --blue: #141821; --red: #E3263D; --green: #2FBF62;
  --panel: rgba(14,20,32,0.78); --card: #FFFFFF; --bg1: #141821; --bg2: #232A36;
  font-family: 'Saira', system-ui, sans-serif; font-stretch: 105%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg1); color: var(--ink); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 0.1875rem solid var(--yellow); outline-offset: 2px; }

#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; overflow-y: auto; background: linear-gradient(var(--bg1), var(--bg2) 70%); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.card { background: var(--card); border-radius: 1.25rem; padding: 1.125rem 1.25rem; box-shadow: 0 0.625rem 1.875rem rgba(20,40,80,0.18); }
.center-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 1.125rem; }
.card.onboard { width: min(35rem, 100%); text-align: center; display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; }
.card.narrow { width: min(32.5rem, 100%); padding: 0; overflow: hidden; }
.pad { padding: 0.875rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.padx { padding: 0 1.25rem; margin: 0 0 0.625rem; }
.brand { font-weight: 900; font-stretch: 125%; font-size: 1.625rem; letter-spacing: .5px; color: var(--blue); }
.brand.small { font-size: 1.25rem; color: #fff; }
h1, h2 { margin: 0; line-height: 1.1; }
h2 { font-size: 1.5rem; font-weight: 800; font-stretch: 112%; }
.huge { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 900; font-stretch: 118%; }
.lead { font-size: 1.0625rem; line-height: 1.4; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.8125rem; }
.light { color: #DCE8F7 !important; }
.eyebrow { font-size: 0.75rem; font-weight: 800; letter-spacing: .7px; color: var(--blue); margin: 0.875rem 0 0.375rem; text-transform: uppercase; }
.eyebrow.light { color: var(--yellow); margin-top: 0; }
.row { display: flex; gap: 0.625rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.row.wrap { justify-content: flex-start; }
.callout { background: #FFF4CC; border-radius: 0.75rem; padding: 0.625rem 0.75rem; font-weight: 700; margin: 0; }
.inapp { background: #FFF4CC; border-radius: 0.75rem; padding: 0.625rem 0.75rem; font-size: 0.875rem; margin: 0; text-align: left; }
.demo { background: #FFF4CC; border-radius: 0.625rem; padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 700; margin: 0; }
.okmsg { background: #E3F3E8; color: #1B6B33; border-radius: 0.625rem; padding: 0.625rem 0.75rem; margin: 0; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.875rem; padding: 0 1.125rem; border-radius: 0.875rem; border: 2px solid transparent; font-weight: 800; font-size: 0.9375rem; letter-spacing: .3px; }
.btn.big { min-height: 3.5rem; font-size: 1.1875rem; font-stretch: 118%; width: 100%; }
.btn.primary { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: #C9D2DF; color: var(--ink); }
.btn.ghostlight { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); color: #fff; }
.redtxt { color: #B31228 !important; }
.linkbtn { background: none; border: none; color: var(--blue); text-decoration: underline; padding: 0.25rem; font-weight: 600; }
.iconbtn { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; border: none; background: #EEF2F7; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.iconbtn.light { background: rgba(255,255,255,0.16); color: #fff; align-self: flex-start; }
.choices { display: flex; flex-direction: column; gap: 0.625rem; }
.choice { min-height: 3.375rem; border-radius: 0.875rem; border: 2px solid #D5DCE6; background: #F7F9FC; font-weight: 700; font-size: 1.0625rem; padding: 0 1rem; text-align: left; }
.choice:hover { border-color: var(--blue); }
.field { display: flex; flex-direction: column; gap: 0.375rem; text-align: left; font-weight: 600; font-size: 0.875rem; }
.field input, .field textarea { border: 2px solid #D5DCE6; border-radius: 0.75rem; padding: 0.75rem; font-size: 1rem; background: #fff; width: 100%; }
.ctrl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.625rem; text-align: left; }
.ctrl-list li { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; }
.ctrl-ico { width: 2.75rem; height: 2.75rem; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.stickico { background: radial-gradient(circle at 50% 40%, #fff 0 28%, #1E2A3A 30%); border: 0.1875rem solid #1E2A3A; }
.btnico { background: var(--yellow); color: var(--ink); }
.mirico { border-radius: 0.75rem; background: linear-gradient(#9CCBF2 50%, #85726C 50%); border: 0.25rem solid #1C2026; }

.topbar { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
.topbar h1 { font-size: 1.125rem; font-weight: 800; flex: 1; text-align: center; }
.topbar-spacer { width: 2.75rem; }
.page { max-width: 68.75rem; margin: 0 auto; padding-bottom: 1.5rem; }
.page > .topbar h1 { color: #fff; text-align: left; font-size: 1.375rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; padding: 0 1rem; }
.prose { margin: 0 1rem; }

/* split layouts (landscape) */
.split { min-height: 100%; display: flex; flex-wrap: wrap; }
.splitL { flex: 1 1 21.25rem; display: flex; flex-direction: column; }
.splitR { flex: 1 1 21.25rem; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.splitR > .card { width: 100%; max-width: 32.5rem; }
.split .topbar h1 { color: #fff; text-align: left; }
.split .splitL .pad .muted { color: var(--muted); }
.split .splitL h2 { color: var(--ink); }
.split .hero h2, .hero .pad { color: #fff; }
.hero .brand { color: var(--yellow); }
.hero { background: linear-gradient(160deg, #222833, #0B0E14); color: #fff; padding: 1.375rem; gap: 0.875rem; justify-content: center; }
.hero.fail { background: linear-gradient(160deg, #6E1422, #2B0D14); }
.hero.pay { background: linear-gradient(160deg, #0B0E14, #2A3140); }
.tasks { list-style: none; padding: 0; margin: 0 0 0.875rem; display: flex; flex-direction: column; gap: 0.625rem; }
.tasks li { display: flex; gap: 0.625rem; align-items: flex-start; font-weight: 600; font-size: 1rem; }
.num { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--blue); color: #fff; font-size: 0.8125rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- map ---------- */
.map { min-height: 100%; display: flex; flex-direction: column; }
.maphead { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; background: #1F5FB8; color: #fff; flex-wrap: wrap; }
.ready { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.875rem; }
.ready .bar { width: 6.875rem; height: 0.5625rem; background: rgba(255,255,255,0.25); border-radius: 0.5625rem; overflow: hidden; }
.ready .bar i { display: block; height: 100%; background: var(--yellow); }
.pill { display: inline-flex; align-items: center; gap: 0.25rem; background: rgba(255,255,255,0.16); border-radius: 62.4375rem; padding: 0.25rem 0.625rem; font-weight: 800; }
.mapnav { display: flex; gap: 0.375rem; margin-left: auto; flex-wrap: wrap; }
.navbtn { position: relative; display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 0.625rem; border-radius: 0.75rem; border: none; background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; font-size: 0.8125rem; }
.navbtn .badge { position: absolute; top: -0.375rem; right: -0.375rem; background: var(--yellow); color: var(--ink); border-radius: 62.4375rem; font-size: 0.6875rem; padding: 1px 0.375rem; }
.mapbody { flex: 1; padding: 0.75rem 1rem; }
.world { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.375rem; }
.plate { background: var(--yellow); border: 0.1875rem solid var(--ink); border-radius: 0.375rem; padding: 2px 0.75rem; font-weight: 900; font-stretch: 125%; font-size: 1.25rem; }
.path { position: relative; display: flex; flex-direction: column-reverse; gap: 0.625rem; max-width: 47.5rem; margin: 0 auto; }
.road { position: absolute; left: 50%; top: 0; bottom: 0; width: 3.5rem; margin-left: -1.75rem; background: #4A4E57; border-radius: 1.75rem; }
.road::after { content: ''; position: absolute; left: 1.625rem; top: 0.625rem; bottom: 0.625rem; width: 0.25rem; background: repeating-linear-gradient(#fff 0 0.875rem, transparent 0.875rem 1.75rem); }
.mrow { position: relative; display: grid; grid-template-columns: 1fr 6rem 1fr; align-items: center; gap: 0.75rem; }
.mcell:first-child { text-align: right; }
.mnode { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.node { width: 3.875rem; height: 3.875rem; border-radius: 50%; border: 0.25rem solid var(--blue); background: #fff; color: var(--blue); font-weight: 900; font-size: 1.5rem; display: inline-flex; align-items: center; justify-content: center; }
.node.current { width: 4.625rem; height: 4.625rem; background: var(--yellow); border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 0.5rem rgba(255,196,0,0.35); animation: pulse 1.6s infinite; }
.node.locked { background: #D5DAE1; border-color: #9AA2AE; color: #5B6370; }
.node.boss { border-radius: 0.875rem; width: 5rem; height: 4rem; background: var(--red); border-color: #fff; color: #fff; }
.node.boss.locked { background: #B7BEC9; }
.boss-txt { font-size: 0.8125rem; font-weight: 900; font-stretch: 120%; }
.nstars { display: flex; background: #fff; border-radius: 62.4375rem; padding: 1px 0.375rem; }
.nlabel { display: inline-flex; flex-direction: column; background: rgba(255,255,255,0.92); border-radius: 0.75rem; padding: 0.375rem 0.625rem; }
.nlabel strong { font-size: 1rem; } .nlabel span { font-size: 0.8125rem; color: var(--muted); }
.pro { font-style: normal; font-size: 0.6875rem; font-weight: 800; background: var(--ink); color: var(--yellow); border-radius: 0.375rem; padding: 1px 0.375rem; align-self: flex-start; margin-top: 2px; }
.mapfoot { position: sticky; bottom: 0; padding: 0.625rem 1rem 0.875rem; background: linear-gradient(transparent, rgba(207,230,248,0.95) 30%); display: flex; justify-content: center; }
.mapfoot .btn { max-width: 32.5rem; }
@keyframes pulse { 50% { box-shadow: 0 0 0 0.875rem rgba(255,196,0,0.15); } }

/* ---------- quiz / result ---------- */
.qprog { display: flex; gap: 0.375rem; }
.qprog i { flex: 1; height: 0.375rem; border-radius: 0.375rem; background: rgba(255,255,255,0.3); }
.qprog i.done { background: var(--green); } .qprog i.cur { background: var(--yellow); }
.qimg { margin: 0; position: relative; border-radius: 0.875rem; overflow: hidden; max-height: 34vh; }
.qimg img { width: 100%; display: block; object-fit: cover; max-height: 34vh; }
.qimg figcaption { position: absolute; left: 0.5rem; top: 0.5rem; background: var(--panel); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 0.5rem; }
.qtext { font-size: 1.375rem; line-height: 1.25; }
.opts { display: flex; flex-direction: column; gap: 0.625rem; }
.opt { display: flex; gap: 0.75rem; align-items: center; border: 2px solid #D5DCE6; border-radius: 0.875rem; padding: 0.75rem; font-weight: 600; min-height: 3rem; }
.opt input { width: 1.375rem; height: 1.375rem; accent-color: var(--blue); flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--blue); background: #FFF4CC; }
.opt.right { border-color: var(--green); background: #E3F3E8; }
.opt.wrong { border-color: var(--red); background: #FCE8EB; }
.opt.neutral { opacity: .6; }
.qfb { font-size: 0.9375rem; line-height: 1.4; min-height: 0; }
.okc { color: #1B7F3B; } .badc { color: #B31228; }
.bigstars { display: flex; gap: 0.375rem; align-items: flex-end; }
.bigstars svg:nth-child(2) { transform: translateY(-0.5rem); }
.bigstars.dark { justify-content: center; }
.rrows { list-style: none; padding: 0; margin: 0; }
.rrows li { display: flex; align-items: center; gap: 0.625rem; padding: 0.5625rem 0; border-bottom: 1px solid #EEF1F4; }
.rrows .lbl { flex: 1; font-weight: 600; }
.rrows .ok, .rrows .no { width: 1.625rem; height: 1.625rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.rrows .ok { background: #E3F3E8; color: #1B7F3B; } .rrows .no { background: #FCE8EB; color: #C8102E; }
.flist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.flist li { background: #FCE8EB; border-radius: 0.625rem; padding: 0.5rem 0.625rem; display: flex; flex-direction: column; font-size: 0.875rem; }
.skill { margin-bottom: 0.5rem; }
.skl { display: flex; justify-content: space-between; font-size: 0.875rem; font-weight: 600; }
.skill .bar { height: 0.5rem; background: #E3E7EC; border-radius: 0.5rem; overflow: hidden; }
.skill .bar i { display: block; height: 100%; background: var(--yellow); border-radius: 0.5rem; }
.vs { display: flex; align-items: center; gap: 0.875rem; background: rgba(255,255,255,0.12); border-radius: 0.875rem; padding: 0.625rem; }
.vs > div { display: flex; flex-direction: column; align-items: center; font-size: 0.8125rem; font-weight: 700; }
.vs strong { flex: 1; text-align: center; }

/* ---------- pay / misc ---------- */
.price { font-weight: 900; font-stretch: 125%; font-size: 3rem; color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 0.75rem 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.checks li { display: flex; gap: 0.5rem; align-items: center; font-weight: 600; } .checks svg { color: var(--green); }
.paybtns { display: flex; flex-direction: column; gap: 0.625rem; }
.okbig { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.okbig svg { width: 2.5rem; height: 2.5rem; }
.seg { display: inline-flex; background: #EEF2F7; border-radius: 0.75rem; padding: 0.1875rem; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 0 0.75rem; min-height: 2.5rem; border-radius: 0.625rem; font-weight: 700; font-size: 0.875rem; }
.seg button.on { background: var(--blue); color: #fff; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid #EEF1F4; flex-wrap: wrap; font-weight: 700; }
.danger { background: #FCE8EB; border-radius: 0.75rem; padding: 0.625rem; margin-top: 0.625rem; }
.danger p { margin: 0 0 0.5rem; font-weight: 600; }
details { border-bottom: 1px solid #EEF1F4; padding: 0.625rem 0; } summary { font-weight: 700; cursor: pointer; min-height: 2rem; } details p { margin: 0.5rem 0 0; color: var(--muted); }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); gap: 0.75rem; padding: 0 1rem; }
.topic { background: #fff; border: none; border-radius: 1rem; padding: 1.125rem; text-align: left; display: flex; flex-direction: column; gap: 0.25rem; box-shadow: 0 0.375rem 1.125rem rgba(20,40,80,0.12); min-height: 5.625rem; }
.topic b { font-size: 1.125rem; } .topic span { color: var(--muted); }
.topic.mix { background: var(--yellow); }
.streak { display: flex; align-items: center; gap: 0.625rem; color: #E3651D; } .streak b { font-size: 2.5rem; font-weight: 900; color: var(--ink); } .streak span { font-weight: 700; color: var(--muted); }
.pickcard { background: #FFF4CC; border-radius: 0.875rem; padding: 0.75rem; display: flex; flex-direction: column; }
.prof-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.avatar { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: #FFF4CC; color: var(--blue); display: flex; align-items: center; justify-content: center; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
.badgeitem { background: #EEF2F7; border-radius: 0.875rem; padding: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; font-size: 0.8125rem; font-weight: 700; color: #7A8292; }
.badgeitem.got { background: #FFF4CC; color: var(--ink); }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; gap: 0.625rem; align-items: center; padding: 0.375rem 0; border-bottom: 1px solid #EEF1F4; } .hist li span:first-child { flex: 1; font-weight: 600; }
.licence { border-radius: 1rem; background: linear-gradient(135deg, #FFE27A, #FFC400); padding: 0.75rem; border: 2px solid var(--ink); }
.lic-top { font-weight: 900; font-stretch: 120%; font-size: 0.875rem; }
.lic-body { display: flex; gap: 0.75rem; align-items: center; margin: 0.5rem 0; }
.lic-body > div:last-child { display: flex; flex-direction: column; font-size: 0.875rem; }
.lic-ph { width: 3.5rem; height: 4rem; border-radius: 0.625rem; background: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; }
.lic-note { font-size: 0.6875rem; font-weight: 700; }
.sharecard { width: min(27.5rem, 92vw); display: flex; flex-direction: column; gap: 0.75rem; }
.sharehead { background: linear-gradient(160deg, #222833, #0B0E14); color: #fff; border-radius: 0.875rem; padding: 1rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.sharehead p { margin: 0; }

/* ---------- overlay / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.modal { position: absolute; inset: 0; background: rgba(8,12,20,0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pausecard { width: min(22.5rem, 92vw); display: flex; flex-direction: column; gap: 0.625rem; text-align: center; }
.replay-tag { position: absolute; right: 1rem; top: 1rem; display: flex; gap: 0.5rem; font-weight: 800; font-size: 0.8125rem; }
.replay-tag span { background: var(--panel); color: #fff; border-radius: 0.5rem; padding: 0.375rem 0.625rem; }
.replay-tag .red { background: var(--red); }
.explain { position: absolute; left: 0; top: 0; bottom: 0; width: min(46vw, 30rem); background: #fff; padding: 1.125rem 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.ex-head { display: flex; gap: 0.625rem; align-items: flex-start; } .ex-head h2 { font-size: 1.375rem; }
.xdot { width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ex-grid { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem 0.625rem; margin: 0; font-size: 0.9375rem; line-height: 1.35; }
.ex-grid dt { font-size: 0.75rem; font-weight: 800; color: var(--blue); letter-spacing: .5px; padding-top: 2px; }
.ex-grid dd { margin: 0; }
.exam-warn { display: flex; gap: 0.5rem; align-items: center; background: #FCE8EB; color: #9E0C24; border-radius: 0.625rem; padding: 0.5rem 0.75rem; font-weight: 700; margin: 0; }
.explain .row { margin-top: auto; justify-content: stretch; } .explain .row .btn { flex: 1; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; color: #fff; --u: min(1vh, 0.56vw); }
.hud button, .hud .stick { pointer-events: auto; }
.panel { background: var(--panel); border-radius: 0.875rem; }
.h-mission { position: absolute; left: calc(var(--u) * 2.4); top: calc(var(--u) * 2.4); padding: 0.5rem 0.875rem; display: flex; flex-direction: column; max-width: 30vw; }
.h-mission .tag { font-size: 0.6875rem; font-weight: 800; color: var(--yellow); letter-spacing: .6px; }
.h-mission b { font-size: calc(var(--u) * 3.2); font-stretch: 112%; }
.h-mission .dist { font-size: 0.8125rem; color: #C9D2DF; }
.mirror { position: absolute; background: transparent; border: 0.375rem solid #1C2026; border-radius: 1.375rem; box-shadow: 0 0.25rem 0.875rem rgba(0,0,0,0.35); padding: 0; }
.mirror.rear { left: 50%; transform: translateX(-50%); top: calc(var(--u) * 1.6); width: calc(var(--u) * 52); height: calc(var(--u) * 14); }
.mirror.side { top: 29vh; width: calc(var(--u) * 32); height: calc(var(--u) * 17); }
.mirror.side.left { left: calc(var(--u) * 2.4); border-radius: 1.125rem 1.625rem 1.625rem 1.125rem; }
.mirror.side.right { right: calc(var(--u) * 2.4); border-radius: 1.625rem 1.125rem 1.125rem 1.625rem; }
.mirror.flash { border-color: var(--yellow); }
.hint { position: absolute; left: 50%; top: calc(var(--u) * 18); transform: translate(-50%, -0.5rem); background: var(--yellow); color: var(--ink); font-weight: 800; font-size: calc(var(--u) * 2.6); padding: 0.5rem 1rem; border-radius: 62.4375rem; display: flex; gap: 0.5rem; align-items: center; white-space: nowrap; opacity: 0; transition: opacity .25s, transform .25s; box-shadow: 0 0.375rem 1rem rgba(0,0,0,0.25); }
.hint.on { opacity: 1; transform: translate(-50%, 0); }
.h-top-right { position: absolute; right: calc(var(--u) * 2.4); top: calc(var(--u) * 2.4); display: flex; gap: 0.625rem; align-items: center; }
.faults { padding: 0.5rem 0.75rem; font-weight: 800; }
.limit { width: calc(var(--u) * 9); height: calc(var(--u) * 9); min-width: 3rem; min-height: 3rem; border-radius: 50%; background: #fff; border: 0.375rem solid #D7192E; color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 900; font-stretch: 125%; font-size: 1.25rem; }
.round-btn { width: 3rem; height: 3rem; border-radius: 50%; border: none; background: var(--panel); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.stick { position: absolute; left: calc(var(--u) * 4); bottom: calc(var(--u) * 4); width: calc(var(--u) * 30); height: calc(var(--u) * 30); min-width: 9.375rem; min-height: 9.375rem; border-radius: 50%; background: radial-gradient(circle, rgba(14,20,32,0.3), rgba(14,20,32,0.62)); border: 0.1875rem solid rgba(255,255,255,0.85); touch-action: none; }
.stick .sl { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.6875rem; font-weight: 800; white-space: nowrap; }
.stick .sl.up { top: 0.5rem; } .stick .sl.down { bottom: 0.5rem; }
.stick .sa { position: absolute; top: 50%; margin-top: -0.5rem; } .stick .sa.l { left: 0.625rem; } .stick .sa.r { right: 0.625rem; }
.knob { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; margin: -20% 0 0 -20%; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff, #E4E8EF 55%, #B9C0CC); box-shadow: 0 0.375rem 1rem rgba(0,0,0,0.45); pointer-events: none; }
.speedo { position: absolute; left: 50%; bottom: calc(var(--u) * 3); transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.25rem; }
.spd { display: flex; flex-direction: column; align-items: center; }
.spd b { font-size: calc(var(--u) * 7); line-height: .95; font-weight: 900; font-stretch: 125%; }
.spd b.over { color: #FF5A6E; }
.spd span { font-size: 0.75rem; font-weight: 700; color: #C9D2DF; }
.ind { color: #5B6678; } .ind.on { color: var(--green); animation: blinkind .8s steps(1) infinite; }
@keyframes blinkind { 50% { opacity: .25; } }
.actions { position: absolute; right: calc(var(--u) * 4); bottom: calc(var(--u) * 4); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.blinks { display: flex; gap: 0.875rem; }
.blink { width: calc(var(--u) * 12); height: calc(var(--u) * 12); min-width: 3.75rem; min-height: 3.75rem; border-radius: 50%; background: rgba(14,20,32,0.72); border: 0.1875rem solid rgba(255,255,255,0.6); color: #9AA6B8; display: inline-flex; align-items: center; justify-content: center; }
.blink.on { color: var(--green); border-color: var(--green); }
.shoulder { width: calc(var(--u) * 21); height: calc(var(--u) * 21); min-width: 6.5rem; min-height: 6.5rem; border-radius: 50%; background: var(--yellow); border: 0.25rem solid #fff; color: var(--ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: 0.75rem; line-height: 1.1; box-shadow: 0 0.375rem 1rem rgba(0,0,0,0.35); }
.shoulder:active, .blink:active { transform: scale(0.95); }
.hud.large .stick { transform: scale(1.18); transform-origin: bottom left; }
.hud.large .actions { transform: scale(1.15); transform-origin: bottom right; }
.stopflash { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--u) * 16); font-weight: 900; font-stretch: 125%; color: #fff; background: rgba(227,38,61,0.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.stopflash.on { opacity: 1; }

/* toast, consent, rotate */
.toast { position: fixed; left: 50%; top: 32vh; transform: translateX(-50%); z-index: 40; background: var(--panel); color: #fff; padding: 0.625rem 1.125rem; border-radius: 0.75rem; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 80vw; text-align: center; }
.toast.on { opacity: 1; } .toast.ok { background: rgba(27,127,59,0.92); } .toast.bad { background: rgba(200,16,46,0.92); }
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0.75rem; display: flex; justify-content: center; }
.consent-card { background: #fff; border-radius: 1rem; padding: 0.875rem 1rem; max-width: 40rem; box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.3); display: flex; flex-direction: column; gap: 0.5rem; }
.consent-card p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.consent-card .row { justify-content: flex-end; }
.rotate { position: fixed; inset: 0; z-index: 100; background: #0E1A2E; color: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0.625rem; text-align: center; padding: 1.5rem; }
.rotate b { font-size: 1.5rem; font-stretch: 115%; }
@media (orientation: portrait) and (pointer: coarse) { body:not(.portraitok) .rotate { display: flex; } }
.rotate { background: radial-gradient(120% 80% at 50% 35%, #1C2230, #0B0E14); }
.rotate svg { width: clamp(72px, 22vw, 120px); height: clamp(72px, 22vw, 120px); color: var(--signal-yellow, #FFC400); animation: turnphone 2.2s ease-in-out infinite; }
.rotate b { font-style: italic; text-transform: uppercase; letter-spacing: 0.5px; font-size: clamp(22px, 6.5vw, 30px); }
.rotate span { color: #B9C0CB; font-weight: 600; font-size: clamp(15px, 4.2vw, 19px); }
@keyframes turnphone { 0%, 25% { transform: rotate(0deg); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (max-height: 460px) {
  .card { padding: 0.75rem 0.875rem; } .pad { gap: 0.5rem; } .huge { font-size: 1.75rem; } .btn.big { min-height: 3rem; font-size: 1.0625rem; }
  .qimg, .qimg img { max-height: 30vh; } .qtext { font-size: 1.125rem; } .opt { padding: 0.5rem 0.625rem; min-height: 2.75rem; }
}
.sharecard { max-height: 94vh; overflow-y: auto; }
.sharehead h2 { font-size: 1.25rem; }
.hud.cockpit .mirror.rear::before { content: ''; position: absolute; left: 50%; top: -2.5rem; width: 0.875rem; height: 2.125rem; margin-left: -0.4375rem; background: #1C2026; border-radius: 0.25rem; }
.maphead { position: sticky; top: 0; z-index: 2; }
/* per-mission controls */
.hud.no-blink .blinks, .hud.no-blink .shoulder, .hud.no-blink .speedo .ind { display: none; }
.hud.steer-none .stick .sa, .hud.steer-R .stick .sa.l, .hud.steer-L .stick .sa.r { visibility: hidden; }
.hud.steer-R .stick .sa.r, .hud.steer-L .stick .sa.l, .x { color: var(--yellow); transform: scale(1.6); }
.stick.unlock { animation: unlock 0.6s ease-out 3; }
@keyframes unlock { 0% { box-shadow: 0 0 0 0 rgba(255,196,0,0.9); border-color: var(--yellow); } 100% { box-shadow: 0 0 0 1.375rem rgba(255,196,0,0); } }
.stick .sa { color: #fff; }
.hud.steer-R .stick .sa.r, .hud.steer-L .stick .sa.l { color: var(--yellow); }
/* pedals + steer button (replace analog stick) */
.pedals { position: absolute; left: calc(var(--u) * 4); bottom: calc(var(--u) * 4); display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.pedrow { display: flex; gap: 0.75rem; align-items: flex-end; }
.pedal { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; border: 0.25rem solid #fff; border-radius: 1.375rem; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 900; font-stretch: 118%; box-shadow: 0 0.375rem 1rem rgba(0,0,0,0.35); }
.pedal small { font-size: 0.6875rem; font-weight: 700; opacity: .8; }
.pedal.brake { width: calc(var(--u) * 24); height: calc(var(--u) * 20); min-width: 7.5rem; min-height: 6.25rem; background: #C8102E; color: #fff; font-size: 1.25rem; }
.pedal.gas { width: calc(var(--u) * 16); height: calc(var(--u) * 24); min-width: 5.25rem; min-height: 7.5rem; background: #1B7F3B; color: #fff; font-size: 1.0625rem; }
.pedal.held { transform: scale(0.94); filter: brightness(1.25); border-color: var(--yellow); }
.steerbtn { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; width: calc(var(--u) * 24); min-width: 7.5rem; height: 4rem; border-radius: 1.125rem; border: 0.25rem solid var(--ink); background: var(--yellow); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; font-weight: 900; font-stretch: 118%; font-size: 1.125rem; box-shadow: 0 0.375rem 1rem rgba(0,0,0,0.35); }
.steerbtn.left svg { transform: scaleX(-1); }
.steerbtn.held { transform: scale(0.94); background: #FFE066; }
.steerbtn.unlock { animation: unlock 0.6s ease-out 3; }
.hud.large .pedals { transform: scale(1.15); transform-origin: bottom left; }
.stickico { background: #C8102E; border-color: #fff; border-radius: 0.75rem; }
.hud > .pedal.gas { position: absolute; right: calc(var(--u) * 4); bottom: calc(var(--u) * 4); }
.speedo { left: auto; transform: none; right: calc(var(--u) * 4 + max(6.5rem, var(--u) * 21) + 1rem); bottom: calc(var(--u) * 4); }
.hud.no-blink .speedo { right: calc(var(--u) * 4 + max(5.25rem, var(--u) * 16) + 1rem); }

/* ===== v3 controls: car pedals + uniform right keys ===== */
.pedal { position: relative; background: linear-gradient(180deg, #B9C1CC, #6C7480 55%, #4A515B); border: none; padding: 0.4375rem; border-radius: 1rem 1rem 1.5rem 1.5rem;
  box-shadow: 0 0.5625rem 0 #22262C, 0 0.875rem 1.375rem rgba(0,0,0,0.45); transform: perspective(16.25rem) rotateX(16deg); transform-origin: 50% 100%; transition: transform .08s, box-shadow .08s; gap: 0; }
.pedal .rubber { position: absolute; inset: 0.4375rem; border-radius: 0.6875rem 0.6875rem 1.125rem 1.125rem; background: repeating-linear-gradient(180deg, #2E333B 0 0.5rem, #15181D 0.5rem 0.8125rem); box-shadow: inset 0 2px 0.375rem rgba(0,0,0,0.6); }
.pedal span { position: relative; z-index: 1; font-size: 0.8125rem; font-weight: 900; letter-spacing: .8px; color: #fff; background: rgba(0,0,0,0.55); border-radius: 0.5rem; padding: 0.1875rem 0.5625rem; border-top: 0.1875rem solid; }
.pedal.brake { width: calc(var(--u) * 27); height: calc(var(--u) * 19); min-width: 8.25rem; min-height: 5.75rem; background: linear-gradient(180deg, #B9C1CC, #6C7480 55%, #4A515B); color: #fff; font-size: 0.8125rem; }
.pedal.brake span { border-color: #FF2A3A; }
.pedal.gas { width: calc(var(--u) * 14); height: calc(var(--u) * 27); min-width: 4.5rem; min-height: 8.25rem; background: linear-gradient(180deg, #B9C1CC, #6C7480 55%, #4A515B); color: #fff; font-size: 0.8125rem; }
.pedal.gas span { border-color: #2FBF62; }
.pedal.held { transform: perspective(16.25rem) rotateX(30deg) translateY(0.375rem); box-shadow: 0 2px 0 #22262C, 0 0.25rem 0.5rem rgba(0,0,0,0.4); filter: none; border-color: transparent; }
.pedal.brake.held { box-shadow: 0 2px 0 #22262C, 0 0 1.5rem 0.25rem rgba(255,42,58,0.55); }
.pedal.gas.held { box-shadow: 0 2px 0 #22262C, 0 0 1.5rem 0.25rem rgba(47,191,98,0.5); }

.actions { flex-direction: row; align-items: flex-end; gap: 0.625rem; }
.key { width: calc(var(--u) * 15); height: calc(var(--u) * 15); min-width: 4.375rem; min-height: 4.375rem; border-radius: 1.25rem; background: rgba(14,20,32,0.78); border: 0.1875rem solid rgba(255,255,255,0.55);
  color: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; box-shadow: 0 0.375rem 0.875rem rgba(0,0,0,0.35); }
.key span { font-size: 0.625rem; font-weight: 800; letter-spacing: .5px; color: #C9D2DF; }
.key.blink { color: #C9D2DF; }
.key.blink.on { color: var(--green); border-color: var(--green); box-shadow: 0 0 1rem rgba(47,191,98,0.55); }
.key.blink.on span { color: var(--green); }
.key.shoulder { width: calc(var(--u) * 15); height: calc(var(--u) * 15); min-width: 4.375rem; min-height: 4.375rem; background: rgba(14,20,32,0.78); border: 0.1875rem solid var(--yellow); color: var(--yellow); font-size: 0.625rem; line-height: 1; }
.key.shoulder span { color: var(--yellow); }
.key:active { transform: scale(0.94); }

.steerbtn { width: calc(var(--u) * 27); min-width: 8.25rem; height: 3.875rem; border-radius: 1.25rem; border: 0.1875rem solid #fff; background: var(--yellow); box-shadow: 0 0.375rem 0.875rem rgba(0,0,0,0.35); }
.speedo { right: calc(var(--u) * 4); bottom: calc(var(--u) * 4 + max(4.375rem, var(--u) * 15) + 0.875rem); }
.hud.no-blink .speedo { right: calc(var(--u) * 4 + max(4.5rem, var(--u) * 14) + 1.125rem); bottom: calc(var(--u) * 4); }
.hud.no-blink .actions { display: none; }

/* ===== v4 HUD cleanup ===== */
.qbtn { position: absolute; left: calc(var(--u) * 2.4); top: calc(var(--u) * 2.4); pointer-events: auto; background: #0E1420; color: #fff; font-weight: 900; font-size: 1.5rem; border: 2px solid rgba(255,255,255,0.6); }
.h-mission { left: calc(var(--u) * 2.4 + 3.625rem); top: calc(var(--u) * 2.4); max-width: min(46vw, 23.75rem); opacity: 0; transform: translateY(-0.375rem); transition: opacity .25s, transform .25s; pointer-events: none; padding: 0.625rem 0.875rem; z-index: 3; background: rgba(14,20,32,0.92); }
.h-mission.on { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.qbtn.open { font-size: 1.125rem; }
.mtasks { margin: 0.375rem 0 0.25rem; padding-left: 1.125rem; font-size: 0.8125rem; line-height: 1.35; color: #E6ECF4; }
.speedo { left: 50%; right: auto; transform: translateX(-50%); bottom: 0.375rem; padding: 0.1875rem 0.875rem; gap: 0.625rem; border-radius: 0.75rem; flex-direction: row; }
.hud.no-blink .speedo { left: 50%; right: auto; bottom: 0.375rem; }
.speedo .spd { flex-direction: row; align-items: baseline; gap: 0.3125rem; }
.speedo .spd b { font-size: 1.625rem; line-height: 1.1; }
.speedo .spd span { font-size: 0.75rem; }
.speedo .ind svg, .speedo svg.ind { width: 1rem; height: 1rem; }
.pedal.brake.slow { box-shadow: 0 0.5625rem 0 #22262C, 0 0 1.125rem 0.1875rem rgba(255,170,0,0.6); }
.pedal.brake.slow::after { content: 'LANGSAM'; position: absolute; z-index: 2; top: 0.5rem; left: 50%; transform: translateX(-50%); background: #FFB000; color: #141821; font-size: 0.6875rem; font-weight: 900; padding: 2px 0.5rem; border-radius: 0.5rem; }

/* ===== v5: smaller pedal + slow-down bar ===== */
.pedal.brake { width: calc(var(--u) * 21); height: calc(var(--u) * 14); min-width: 6.5rem; min-height: 4.375rem; padding: 0.375rem; border-radius: 0.8125rem 0.8125rem 1.125rem 1.125rem; box-shadow: 0 0.375rem 0 #22262C, 0 0.625rem 1rem rgba(0,0,0,0.4); }
.pedal.gas { width: calc(var(--u) * 11); height: calc(var(--u) * 21); min-width: 3.625rem; min-height: 6.5rem; padding: 0.375rem; border-radius: 0.8125rem 0.8125rem 1.125rem 1.125rem; box-shadow: 0 0.375rem 0 #22262C, 0 0.625rem 1rem rgba(0,0,0,0.4); }
.pedal .rubber { inset: 0.375rem; border-radius: 0.5625rem 0.5625rem 0.875rem 0.875rem; background: repeating-linear-gradient(180deg, #2E333B 0 0.375rem, #15181D 0.375rem 0.625rem); }
.pedal span { font-size: 0.6875rem; padding: 2px 0.4375rem; border-top-width: 2px; }
.pedal.brake.slow::after { content: none; }
.pedal .pbar { position: absolute; left: 50%; bottom: -0.875rem; transform: translateX(-50%); width: 100%; height: 0.4375rem; border-radius: 0.375rem; background: rgba(14,20,32,0.7); overflow: hidden; display: none; }
.pedal .pbar::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: var(--bar, 0%); background: #FFB000; border-radius: 0.375rem; }
.pedal.brake.slow .pbar { display: block; }
.pedal.brake.slow { box-shadow: 0 0.375rem 0 #22262C, 0 0 0.875rem 2px rgba(255,176,0,0.55); }
.steerbtn { width: calc(var(--u) * 21); min-width: 6.5rem; height: 3.125rem; font-size: 0.9375rem; border-radius: 1rem; }
.steerbtn svg { width: 1.625rem; height: 1.625rem; }
.pedals { gap: 1.375rem; }
.pedal .pbar { bottom: auto; top: -0.9375rem; height: 0.5rem; }

/* ===== 3D map (Welt 1) ===== */
#mapwrap { position: fixed; inset: 0; z-index: 0; }
#mapwrap canvas { display: block; touch-action: none; cursor: grab; }
#mapwrap canvas.drag { cursor: grabbing; }
#mapwrap.fine canvas { cursor: none; }
#mring { position: fixed; left: 0; top: 0; width: 2.125rem; height: 2.125rem; margin: -1.0625rem 0 0 -1.0625rem; border: 1.5px solid rgba(20,24,33,.55); border-radius: 50%; pointer-events: none; transition: width .25s, height .25s, margin .25s, border-color .25s, background .25s; display: none; z-index: 5; }
#mapwrap.fine #mring { display: block; }
#mring.hot { width: 3.5rem; height: 3.5rem; margin: -1.75rem 0 0 -1.75rem; border-color: var(--yellow); background: rgba(255,196,0,.12); }
#mring.lock { border-color: #8A929E; }
#mtip { position: fixed; left: 0; top: 0; pointer-events: none; transform: translate(1.375rem,-50%); background: rgba(20,24,33,.88); color: #fff; border-radius: 0.625rem; padding: 0.375rem 0.625rem; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .2s; z-index: 6; }
#mtip small { display: block; font-weight: 600; color: #C9D2DF; font-size: 0.6875rem; }
#mtip.on { opacity: 1; }
.screen.over3d { background: transparent; pointer-events: none; overflow: hidden; }
.screen.over3d > * { pointer-events: auto; }
.m3head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem 1.625rem; background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,0)); flex-wrap: wrap; pointer-events: none; }
.m3head > * { pointer-events: auto; }
.m3head .brand.small { color: var(--ink); font-size: 1.125rem; }
.m3world { font-weight: 800; font-size: 0.75rem; letter-spacing: .6px; color: #4A5262; }
.m3head .ready { color: #4A5262; }
.m3head .ready .bar { background: rgba(20,24,33,.12); }
.m3head .pill { background: rgba(255,255,255,.85); color: var(--ink); }
.m3head .sp { flex: 1; }
.m3head .mapnav { margin-left: 0; }
.m3head .navbtn { background: rgba(255,255,255,.88); color: var(--ink); box-shadow: 0 0.25rem 0.75rem rgba(20,40,80,.12); }
.m3head .navbtn.karte { font-weight: 900; letter-spacing: .5px; padding: 0 0.875rem; }
.m3head .navbtn.karte.on { background: var(--ink); color: #fff; }
/* map header adapts to its own width (in rem, so it follows the responsive scale) */
.m3head { container-type: inline-size; }
.m3head .pill { white-space: nowrap; }
@container (max-width: 80rem) { .m3head .navbtn span { display: none; } .m3world { display: none; } }
@container (max-width: 60rem) { .m3head .ready > span { display: none; } .m3head .ready .bar { width: 3rem; } }
@container (max-width: 40rem) { .m3head .ready { display: none; } }
.m3head { flex-wrap: nowrap; }
.m3head .navbtn { min-width: 2.75rem; justify-content: center; }
.mmodal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(14,20,32,.28); backdrop-filter: blur(0.625rem); -webkit-backdrop-filter: blur(0.625rem); opacity: 0; pointer-events: none !important; transition: opacity .35s; z-index: 20; }
.mmodal.on { opacity: 1; pointer-events: auto !important; }
.mbox { width: min(51.25rem,100%); max-height: calc(100vh - 2rem); overflow: auto; background: #fff; border-radius: 1.375rem; box-shadow: 0 1.5rem 3.75rem rgba(14,20,32,.3); transform: translateY(1rem) scale(.98); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.mmodal.on .mbox { transform: none; }
.mhead { display: flex; align-items: center; gap: 0.875rem; padding: 1.125rem 1.25rem 0.625rem; }
.mhex { width: 3.625rem; height: 3.625rem; flex-shrink: 0; }
.mhead .eb { font-size: 0.6875rem; font-weight: 800; letter-spacing: .8px; color: #4A5262; text-transform: uppercase; }
.mhead h2 { margin: 2px 0 0; font-size: 1.5rem; font-weight: 900; font-stretch: 115%; line-height: 1.05; }
.mclose { margin-left: auto; align-self: flex-start; border: none; background: #EEF2F7; border-radius: 0.75rem; width: 2.5rem; height: 2.5rem; font: inherit; font-size: 1rem; }
.mbody { padding: 0.25rem 1.25rem 1.125rem; display: flex; flex-direction: column; gap: 0.75rem; }
.colL, .colR { display: flex; flex-direction: column; gap: 0.75rem; }
.colR { justify-content: flex-end; }
@media (min-width: 700px) { .mbody { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.125rem; } }
.rule { background: #F4F6F9; border-radius: 0.875rem; padding: 0.625rem 0.75rem; font-size: 0.875rem; line-height: 1.4; }
.rule b { display: block; font-size: 0.6875rem; letter-spacing: .7px; color: #4A5262; margin-bottom: 2px; }
.mbody .lbl { font-size: 0.6875rem; font-weight: 800; letter-spacing: .7px; color: #4A5262; margin-bottom: 0.25rem; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.steps li { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.875rem; font-weight: 600; }
.steps li i { font-style: normal; flex-shrink: 0; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.facts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.facts span { background: #F4F6F9; border-radius: 62.4375rem; padding: 0.3125rem 0.625rem; font-size: 0.75rem; font-weight: 700; color: #3A4250; }
.last { border-left: 0.25rem solid var(--red); background: #FDF0F2; border-radius: 0.625rem; padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
.last b { color: #B31228; }
.best { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 700; color: #4A5262; }
.best em { font-style: normal; color: var(--yellow); font-size: 1.125rem; letter-spacing: 2px; }
.lockmsg { display: flex; gap: 0.625rem; align-items: center; background: #F4F6F9; border-radius: 0.875rem; padding: 0.75rem; font-size: 0.875rem; font-weight: 600; }
.lockmsg .ic { font-size: 1.375rem; }
.mbody .go { border: 2px solid var(--ink); background: var(--yellow); border-radius: 0.875rem; min-height: 3.25rem; font: inherit; font-weight: 900; font-stretch: 115%; font-size: 1.125rem; width: 100%; }
.mbody .go.sec { background: #fff; }
@media (max-height: 500px) { .mhead { padding: 0.75rem 1rem 0.375rem; } .mhead h2 { font-size: 1.25rem; } .mhex { width: 2.875rem; height: 2.875rem; } .mbody { padding: 0.25rem 1rem 0.875rem; gap: 0.625rem; } .steps li, .rule { font-size: 0.8125rem; } .mbody .go { min-height: 2.875rem; font-size: 1rem; } }

/* ===== driver view (cockpit) ===== */
.hud.cockpit .speedo { display: none; }
.hud.cockpit .mirror.rear { left: 50%; right: auto; transform: translateX(-50%); top: calc(var(--u) * 3); border-radius: 1.625rem; border-width: 0.4375rem; width: calc(var(--u) * 48); height: calc(var(--u) * 13); }
.hud.cockpit .mirror.rear::before { top: -3rem; height: 2.625rem; width: 1rem; margin-left: -0.5rem; border-radius: 0.375rem; }
.hud.cockpit .h-top-right { top: auto; bottom: calc(var(--u) * 4 + max(4.375rem, var(--u) * 15) + 1rem); }
.viewbtn { height: 3rem; padding: 0 0.875rem; border-radius: 62.4375rem; border: 2px solid rgba(255,255,255,0.5); background: var(--panel); color: #fff; display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 900; font-size: 0.8125rem; letter-spacing: .6px; }

/* ===== analysis screen ===== */
.ana { position: relative; min-height: 100%; color: #fff; display: flex; flex-direction: column; padding: 0.875rem 1rem 0.75rem; gap: 0.625rem; overflow: hidden; }
.anabg { position: fixed; inset: -1.875rem; background: #0E1420 center/cover no-repeat; filter: blur(0.875rem) saturate(1.1) brightness(.45); z-index: -1; }
.ana.pass .anabg::after, .ana.fail .anabg::after { content: ''; position: absolute; inset: 0; }
.ana.pass .anabg::after { background: radial-gradient(circle at 50% 45%, rgba(47,191,98,.35), transparent 60%); }
.ana.fail .anabg::after { background: radial-gradient(circle at 50% 45%, rgba(227,38,61,.35), transparent 60%); }
.anagrid { flex: 1; display: grid; grid-template-columns: 1fr minmax(12.5rem, 0.8fr) 1fr; gap: 0.875rem; align-items: start; }
.apanel { background: rgba(10,14,22,.62); border: 1px solid rgba(255,255,255,.08); border-radius: 1rem; overflow: hidden; backdrop-filter: blur(0.25rem); }
.ahead { margin: 0; display: flex; align-items: center; gap: 0.625rem; padding: 0.5625rem 0.875rem; font-size: 1.1875rem; font-weight: 900; font-style: italic; font-stretch: 120%; letter-spacing: .5px; color: var(--ink);
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.08) 0 0.375rem, transparent 0.375rem 0.75rem), var(--yellow); clip-path: polygon(0 0, 100% 0, 100% 100%, 0.875rem 100%, 0 calc(100% - 0.875rem)); }
.ahic { width: 1.625rem; height: 1.625rem; border-radius: 50%; background: var(--ink); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; font-size: 0.9375rem; font-style: normal; }
.cks { list-style: none; margin: 0; padding: 0.375rem 0.5rem 0.5rem; display: flex; flex-direction: column; gap: 0.3125rem; }
.ck { display: flex; align-items: center; gap: 0.625rem; padding: 0.4375rem 0.625rem; border-radius: 0.625rem; background: rgba(255,255,255,.04); border: 1.5px solid transparent; }
.ck.good { border-color: rgba(255,196,0,.85); background: linear-gradient(90deg, rgba(255,196,0,.16), rgba(255,196,0,.04)); }
.ck.bad { border-color: rgba(227,38,61,.85); background: linear-gradient(90deg, rgba(227,38,61,.22), rgba(227,38,61,.05)); }
.ck.warn { border-color: rgba(255,150,0,.8); }
.ck.na { opacity: .55; }
.ckic { width: 1.625rem; height: 1.625rem; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; border: 0.1562rem solid currentColor; }
.ck.good .ckic { color: var(--yellow); } .ck.bad .ckic { color: #FF5A6E; } .ck.warn .ckic { color: #FFA000; } .ck.na .ckic { color: #8A93A2; }
.ckic svg { width: 0.875rem; height: 0.875rem; }
.cklbl { flex: 1; font-weight: 700; font-size: 0.875rem; line-height: 1.2; display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.ckpts { font-size: 1.375rem; font-weight: 900; font-style: italic; font-stretch: 118%; }
.ck.good .ckpts { color: var(--yellow); } .ck.bad .ckpts { color: #FF5A6E; } .ck.na .ckpts { font-size: 0.75rem; font-style: normal; color: #A9B1BE; }
.ck.bonus .cklbl { font-style: italic; color: #DCE3EC; }
.seebtn { border: none; background: #fff; color: var(--ink); border-radius: 62.4375rem; padding: 0.1875rem 0.625rem; font: inherit; font-size: 0.75rem; font-weight: 800; }
.acenter { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; padding-top: 0.25rem; }
.ribbon { background: #fff; color: var(--ink); font-weight: 900; font-style: italic; font-stretch: 120%; font-size: 1.375rem; padding: 0.25rem 1.375rem; transform: rotate(-4deg); box-shadow: 0 0.375rem 1.125rem rgba(0,0,0,.35); clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); }
.ana.fail .ribbon { background: var(--red); color: #fff; }
.ring { position: relative; width: min(11.25rem, 34vh); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rbg { fill: rgba(10,14,22,.55); stroke: rgba(255,255,255,.12); stroke-width: 12; }
.rfg { fill: none; stroke: var(--green); stroke-width: 12; stroke-linecap: round; animation: ringIn 1.2s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 0.5rem rgba(47,191,98,.7)); }
.ana.fail .rfg { stroke: #FF5A6E; filter: drop-shadow(0 0 0.5rem rgba(227,38,61,.7)); }
@keyframes ringIn { from { stroke-dashoffset: 465; } }
.rtxt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rtxt b { font-size: clamp(2.25rem, 9vh, 3.375rem); font-weight: 900; font-style: italic; font-stretch: 120%; line-height: 1; text-shadow: 0 0 1.125rem rgba(255,255,255,.35); }
.rtxt i { width: 56%; height: 2px; background: var(--yellow); margin: 0.25rem 0; }
.rtxt span { font-size: 1.375rem; font-weight: 900; font-style: italic; color: var(--yellow); }
.astars { display: flex; gap: 0.25rem; }
.aneed { margin: 0; font-size: 0.8125rem; font-weight: 700; color: #DCE3EC; text-align: center; max-width: 14.375rem; }
.aquiz { display: flex; align-items: center; gap: 0.5rem; background: rgba(10,14,22,.62); border-radius: 62.4375rem; padding: 0.3125rem 0.75rem; font-size: 0.8125rem; font-weight: 700; }
.aquiz b { color: #fff; } .aquiz span { color: var(--yellow); font-weight: 900; }
.abar { display: flex; align-items: center; justify-content: center; gap: 0.875rem; flex-wrap: wrap; }
.hexbtns { display: flex; gap: 0.625rem; }
.hexbtn { width: 4.75rem; height: 4.25rem; border: none; background: var(--ink); color: #fff; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: inset 0 0 0 0.1875rem var(--yellow); position: relative; }
.hexbtn span { font-size: 0.625rem; font-weight: 800; letter-spacing: .4px; }
.hexbtn svg { width: 1.5rem; height: 1.5rem; }
.hexbtn:hover { background: #222A38; }
.nextbtn { min-height: 3.25rem; font-size: 1.0625rem; font-stretch: 115%; padding: 0 1.5rem; }
.fullback { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); }
@media (max-width: 760px) { .anagrid { grid-template-columns: 1fr; } .acenter { order: -1; } }
@media (max-height: 470px) { .ck { padding: 0.3125rem 0.5rem; } .cklbl { font-size: 0.8125rem; } .ckpts { font-size: 1.125rem; } .ahead { font-size: 1rem; padding: 0.375rem 0.75rem; } .hexbtn { width: 4rem; height: 3.5rem; } .hexin > span { display: none; } }

.hexbtn { background: var(--yellow); box-shadow: none; padding: 0.1875rem; }
.hexin { width: 100%; height: 100%; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.hexbtn:hover .hexin { background: #222A38; }

/* brand: yellow / black / white */
.brand { color: var(--yellow); }
.card .brand, .consent-card .brand { color: var(--ink); }
.opt:has(input:checked) { border-color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--yellow); }
.btn.blue { background: var(--ink); color: #fff; }
.num { background: var(--ink); color: var(--yellow); }
.hero .eyebrow.light { color: var(--yellow); }
.split .hero .btn.primary { border-color: #fff; }
.m3head .brand.small { color: var(--ink); }
.screen > .page > p, .screen > .page > .muted, .page > .padx { color: #AEB6C2; }

/* permanent steering keys beside the brake (no pop-up hint) */
.steers { display: flex; gap: 0.625rem; align-items: flex-end; }
.sbtn { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; color: #fff; }
.sbtn.held { transform: scale(0.94); background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.sbtn.held span { color: var(--ink); }
.sbtn.denied { animation: sdeny 0.25s ease-out; }
@keyframes sdeny { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-0.25rem); } 70% { transform: translateX(0.25rem); } }

/* examiner speech bubble (Prüfungsfahrt) */
.exbub { position: absolute; left: 50%; top: calc(var(--u) * 15 + 3.375rem); transform: translate(-50%, -0.5rem); opacity: 0; transition: opacity .25s, transform .25s; background: var(--ink); color: #fff; border: 0.1875rem solid var(--yellow); border-radius: 1rem; padding: 0.5rem 1rem 0.625rem; max-width: min(78vw, 35rem); text-align: center; pointer-events: none; z-index: 6; box-shadow: 0 0.5rem 1.25rem rgba(0,0,0,.35); }
.exbub.on { opacity: 1; transform: translate(-50%, 0); }
.exbub b { display: block; font-size: 0.6875rem; letter-spacing: 1.5px; color: var(--yellow); text-transform: uppercase; }
.exbub span { font-size: 1.0625rem; font-weight: 800; line-height: 1.25; }
/* quiz: readable on the dark brand background */
.quiz .splitL .qtext { color: #FFFFFF; }
.quiz .splitL .muted { color: #B9C0CB; }

/* =====================================================================
   DESIGN SYSTEM v2 — liquid glass, calm yellow, Schilderblau
   (tokens and rules: FAHRPROBE Design System)
   ===================================================================== */
:root {
  --ink-950: #0B0E14; --ink-900: #141821; --ink-800: #1C2230; --ink-700: #283041; --ink-600: #3A4457; --ink-500: #6B7690; --ink-400: #8A93A6; --ink-300: #B9C0CB;
  --signal-yellow: #FFC400; --signal-yellow-hover: #FFD43B; --signal-yellow-pressed: #E5AD00; --signal-yellow-depth: #B88A00;
  --sign-blue: #2563EB; --sign-blue-hover: #2D6AEC; --sign-blue-pressed: #1D4FC4; --sign-blue-text: #6EA4FF; --sign-blue-depth: #163C96;
  --go-green: #2FBF62; --stop-red: #FF6B6B;
  --glass-fill: rgba(22,27,38,0.62); --glass-sheen: rgba(255,255,255,0.10); --glass-edge: rgba(255,255,255,0.18); --scrim: rgba(11,14,20,0.55);
  --shadow-glass: inset 0 1px 0 rgba(255,255,255,0.24), 0 1.125rem 2.5rem rgba(0,0,0,0.38);
  --glass-bg: linear-gradient(180deg, var(--glass-sheen), rgba(255,255,255,0.02) 45%), var(--glass-fill);
}
/* the town behind every menu */
body.mapbg #mapwrap { filter: blur(0.5rem) brightness(0.9) saturate(1.1); transform: scale(1.04); pointer-events: none; }
body.mapbg #mapwrap * { pointer-events: none !important; }
.screen { background: var(--scrim); color: #fff; }
.screen.over3d { background: transparent; }
/* glass surfaces */
.card, .consent-card, .mbox, .apanel, .topic, .pausecard { background: var(--glass-bg); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-glass); -webkit-backdrop-filter: blur(1.125rem) saturate(150%); backdrop-filter: blur(1.125rem) saturate(150%); color: #fff; border-radius: 1.25rem; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card, .consent-card, .mbox, .apanel, .topic, .pausecard { background: rgba(20,24,33,0.94); } }
.card h2, .card h3, .card b, .card strong, .card p, .card li, .card label, .card span { color: inherit; }
.card .muted, .card .lead, .consent-card p, .muted, .topic span, .mhead .eb { color: var(--ink-300); }
.screen .page > p.muted, .padx { color: var(--ink-300); }
/* headings */
.topbar h1, .page > .topbar h1, .split .topbar h1 { color: #fff; font-family: inherit; font-size: 1.625rem; font-weight: 900; font-style: italic; font-stretch: 118%; letter-spacing: 1px; text-transform: uppercase; text-align: left; }
.eyebrow, .eyebrow.light { display: flex; align-items: center; gap: 0.5625rem; color: #fff; font-size: 0.875rem; font-weight: 900; font-style: italic; letter-spacing: 1.4px; margin: 1rem 0 0.5rem; }
.eyebrow::before { content: ""; width: 0.3125rem; height: 1rem; background: var(--signal-yellow); transform: skewX(-14deg); border-radius: 1px; flex-shrink: 0; }
.card > .eyebrow:first-child, .card section > .eyebrow:first-child { margin-top: 2px; }
.split .splitL h2, .card h2, .qtext { color: #fff; }
.split.pay .hero, .split .hero { background: transparent; }
.huge { font-style: italic; font-weight: 900; font-stretch: 118%; }
/* buttons */
.btn { border-radius: 0.875rem; border: 1px solid transparent; font-weight: 800; transition: transform .08s, background .12s, box-shadow .12s, filter .12s; }
.btn:focus-visible, .choice:focus-visible, .iconbtn:focus-visible, .topic:focus-visible { outline: 0.1875rem solid var(--sign-blue-text); outline-offset: 2px; }
.btn.primary { color: var(--ink-900); border: 0; border-bottom: 0.1875rem solid var(--signal-yellow-depth); border-radius: 0.375rem; background: linear-gradient(180deg, var(--signal-yellow-hover), var(--signal-yellow) 60%); clip-path: polygon(0.625rem 0, 100% 0, calc(100% - 0.625rem) 100%, 0 100%); font-style: italic; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; padding: 0 1.75rem; }
.btn.primary:hover { background: var(--signal-yellow-hover); }
.btn.primary:active { background: var(--signal-yellow-pressed); border-bottom-width: 0; transform: translateY(2px); }
.btn.blue { color: #fff; border: 0; border-bottom: 0.1875rem solid var(--sign-blue-depth); background: linear-gradient(180deg, var(--sign-blue-hover), var(--sign-blue) 60%); font-weight: 900; }
.btn.blue:hover { background: var(--sign-blue-hover); }
.btn.blue:active { background: var(--sign-blue-pressed); border-bottom-width: 0; transform: translateY(2px); }
.btn.ghost, .btn.ghostlight, .btn.dark { color: #fff; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-edge); }
.btn.ghost:hover, .btn.ghostlight:hover, .btn.dark:hover { background: rgba(255,255,255,0.10); }
.btn.ghost:active, .btn.ghostlight:active, .btn.dark:active { background: rgba(255,255,255,0.16); transform: translateY(1px); }
.btn.red { background: #C9303F; color: #fff; border: 0; }
.btn:disabled { background: var(--ink-700); color: var(--ink-400); border-color: transparent; box-shadow: none; }
.btn.redtxt { color: var(--stop-red); }
.linkbtn { color: #fff; text-decoration: none; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-edge); border-radius: 0.625rem; min-height: 2.5rem; padding: 0 0.875rem; font-weight: 800; font-size: 0.875rem; }
.linkbtn:hover { background: rgba(255,255,255,0.10); }
.iconbtn, .iconbtn.light { width: 3.25rem; height: 2.875rem; border-radius: 0; background: linear-gradient(180deg, var(--ink-700), var(--ink-900)); color: var(--signal-yellow); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.iconbtn:hover { background: linear-gradient(180deg, var(--ink-600), var(--ink-800)); }
.iconbtn:active { transform: scale(.94); }
.topbar-spacer { width: 3.25rem; }
/* choices, fields, segmented */
.choice { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-edge); color: #fff; }
.choice:hover { background: rgba(255,255,255,0.10); border-color: var(--signal-yellow); }
.field { color: var(--ink-300); }
.field input, .field textarea { background: var(--ink-950); border: 1px solid var(--ink-500); color: #fff; border-radius: 0.75rem; }
.field input:focus, .field textarea:focus { outline: 0.1875rem solid var(--sign-blue-text); outline-offset: 1px; border-color: transparent; }
.seg { background: var(--ink-950); border: 1px solid rgba(255,255,255,0.06); border-radius: 0.875rem; padding: 0.25rem; gap: 0.25rem; }
.seg button { color: var(--ink-300); min-height: 2.75rem; border-radius: 0.625rem; font-weight: 800; font-size: 0.9375rem; padding: 0 1rem; }
.seg button:hover { color: #fff; }
.seg button.on { background: var(--ink-700); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -2px 0 var(--signal-yellow); }
.set { border-bottom: 1px solid rgba(255,255,255,0.08); min-height: 4rem; }
.set > span { font-size: 1rem; font-weight: 800; color: #fff; }
/* progress + badges */
.bar { background: var(--ink-700); border-radius: 62.4375rem; }
.bar i { background: var(--signal-yellow); border-radius: 62.4375rem; }
.skl span { color: var(--ink-300); } .skl b { color: #fff; }
.badgeitem { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: var(--ink-400); }
.badgeitem.got { background: rgba(255,196,0,0.12); border-color: rgba(255,196,0,0.5); color: #fff; }
.avatar { background: rgba(255,255,255,0.06); color: var(--ink-300); }
.pro { background: var(--signal-yellow); color: var(--ink-900); }
.hist li { border-color: rgba(255,255,255,0.08); }
.callout { background: rgba(37,99,235,0.18); border: 1px solid rgba(110,164,255,0.5); color: #fff; }
.okmsg { color: var(--go-green); }
.demo { background: rgba(255,196,0,0.12); color: #fff; border: 1px solid rgba(255,196,0,0.4); }
.inapp { color: var(--ink-300); }
.price { font-style: italic; font-weight: 900; color: #fff; }
.checks li { color: #fff; } .checks svg { color: var(--go-green); }
.streak { color: #fff; } .streak svg { color: var(--signal-yellow); }
.pickcard { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #fff; }
.pickcard span { color: var(--ink-300); }
details { border-color: rgba(255,255,255,0.1) !important; } summary { color: #fff; }
.prose { color: #fff; }
/* theory tiles */
.topic { min-height: 9.375rem; gap: 0.5rem; color: #fff; transition: transform .1s, border-color .12s; }
.topic:hover { border-color: rgba(255,196,0,0.7); }
.topic:active { transform: scale(.98); }
.topic b { font-size: 1.125rem; color: #fff; }
.topic .tsign { width: 3rem; height: 3rem; margin-bottom: 0.25rem; }
.topic.mix { background: linear-gradient(180deg, var(--signal-yellow-hover), var(--signal-yellow) 60%); color: var(--ink-900); border: 0; border-bottom: 0.1875rem solid var(--signal-yellow-depth); }
.topic.mix b, .topic.mix span { color: var(--ink-900); }
/* quiz */
.opt { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-edge); color: #fff; }
.opt:has(input:checked) { border-color: var(--signal-yellow); background: rgba(255,196,0,0.12); }
.opt.right { border-color: var(--go-green); background: rgba(47,191,98,0.16); }
.opt.wrong { border-color: var(--stop-red); background: rgba(255,107,107,0.14); }
.qfb { color: #fff; }
.qprog i { background: var(--ink-700); } .qprog i.done { background: var(--go-green); } .qprog i.cur { background: var(--signal-yellow); }
/* mission pop-up on the map */
.mmodal { background: rgba(11,14,20,0.35); }
.mhead h2 { color: #fff; font-style: italic; }
.mclose { background: rgba(255,255,255,0.08); color: #fff; }
.mbox .rule, .mbox .facts span, .mbox .last, .mbox .best, .mbox .lockmsg { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.1); }
.mbox .steps li { color: #fff; }
/* map header */
.m3head { background: linear-gradient(180deg, rgba(11,14,20,0.55), rgba(11,14,20,0)); }
.m3head .brand.small { color: #fff; font-style: italic; font-weight: 900; }
.m3head .ready { color: var(--ink-300); }
.m3head .ready .bar { background: rgba(255,255,255,0.15); }
.m3head .pill, .m3head .navbtn { background: var(--glass-bg); color: #fff; border: 1px solid var(--glass-edge); box-shadow: var(--shadow-glass); -webkit-backdrop-filter: blur(0.875rem); backdrop-filter: blur(0.875rem); }
.m3head .navbtn.karte.on { background: var(--signal-yellow); color: var(--ink-900); }
/* analysis panels: the striped bar is retired */
.ahead { background: none; clip-path: none; color: #fff; font-size: 1.0625rem; padding: 0.875rem 0.875rem 0.375rem; }
.ahead::before { content: ""; width: 0.3125rem; height: 1.125rem; background: var(--signal-yellow); transform: skewX(-14deg); border-radius: 1px; }
.ahic { display: none; }
/* consent + pause */
.consent-card { color: #fff; }
.consent { padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) calc(0.75rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)); }
.consent-card { animation: consentin 0.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes consentin { from { opacity: 0; transform: translateY(1.25rem); } }
@media (orientation: portrait) { body.titlebg .consent-card { animation-name: consentdown; } }
@keyframes consentdown { from { opacity: 0; transform: translateY(-1.25rem); } }
@media (prefers-reduced-motion: reduce) { .consent-card { animation: none; } }
.consent-card { width: 100%; max-width: 34rem; box-sizing: border-box; padding: 1.125rem 1.125rem 1rem; gap: 0.625rem; }
.consent-card strong { font-size: 1.0625rem; }
.consent-card p { font-size: 0.875rem; line-height: 1.5; }
.consent-card .clink { display: inline; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.consent-card { container-type: inline-size; }
.cbtns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.625rem; margin-top: 0.25rem; }
.cbtns .primary { order: -1; }
.cbtns .btn { width: 100%; min-height: 2.875rem; margin: 0; justify-content: center; text-align: center; white-space: nowrap; }
@container (min-width: 30rem) { .cbtns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cbtns .primary { order: 0; } }
/* on the welcome screen keep the title panel free */
body.titlebg .consent { justify-content: flex-end; }
body.titlebg .consent-card { max-width: min(26rem, 46vw); }
@media (orientation: portrait) {
  body.titlebg .consent { top: 0; bottom: auto; justify-content: center; padding-top: max(0.75rem, env(safe-area-inset-top)); }
  body.titlebg .consent-card { max-width: 34rem; }
}
.modal { background: rgba(11,14,20,0.5); }
/* title screen */
/* v2 fixes */
.card .brand, .consent-card .brand { color: var(--yellow, #FFC400); font-style: italic; }
/* quiz: counter + hint readable on glass */
.qcount { align-self: flex-start; display: inline-block; margin-top: 0.625rem; padding: 0.25rem 0.75rem; border-radius: 62.4375rem; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); color: #fff; font-size: 0.875rem; font-weight: 700; letter-spacing: .3px; }
.qcount b { color: var(--signal-yellow, #FFC400); font-weight: 900; }
.qmulti { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 0; color: #fff; font-size: 0.875rem; font-weight: 600; }
.qmulti span { flex-shrink: 0; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--sign-blue); color: #fff; font-size: 0.8125rem; font-weight: 900; font-style: italic; display: grid; place-items: center; }
.quiz .qtext { color: #fff; margin-top: 0.625rem; }
.opt span { color: #fff; }
.aquiz.open b { color: var(--signal-yellow, #FFC400); }
/* map: always-visible mission name tags */
#mtags { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.mtag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.25rem 0.625rem 0.25rem 0.5625rem; border-radius: 0.5625rem;
  background: rgba(20,24,33,0.86); border: 1px solid rgba(255,255,255,0.18); color: #fff; font: 800 0.7812rem/1.15 Saira, system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 0.25rem 0.75rem rgba(11,14,20,0.35); backdrop-filter: blur(0.375rem); -webkit-backdrop-filter: blur(0.375rem); cursor: pointer; transition: opacity .18s; will-change: transform; }
.mtag b { font-weight: 800; }
.mtag.cur { background: #FFC400; color: #141821; border-color: #B88A00; border-bottom-width: 2px; font-size: 0.8438rem; }
.mtag.lock { background: rgba(20,24,33,0.72); color: #D5DAE2; }
.mtag.lock svg { color: #B9C0CB; flex-shrink: 0; }
.mtag .tst { display: inline-flex; gap: 1px; font-size: 0.625rem; letter-spacing: 0; }
.mtag .tst i { font-style: normal; color: rgba(255,255,255,0.28); }
.mtag .tst i.on { color: #FFC400; }
.mtag.cur .tst i.on { color: #141821; }
body.mapbg #mtags { display: none; }
/* mission pop-up: readable labels on glass */
.mbody .lbl { color: #B9C0CB; font-size: 0.75rem; }
.mbox .rule b { color: #FFC400; }

/* ===== Responsive layout: keep content together on wide screens ===== */
.split { max-width: 78rem; margin: 0 auto; }
.split.quiz { align-items: center; align-content: center; }
.split.quiz .splitL { justify-content: center; }
.split.quiz .splitR { padding-top: 3.5rem; }
.ana > * { width: 100%; max-width: 82rem; margin-left: auto; margin-right: auto; }
.anagrid { grid-template-columns: minmax(0, 1fr) minmax(12.5rem, 0.8fr) minmax(0, 1fr); }
/* phones: safe areas for notches and rounded corners */
.hud { top: env(safe-area-inset-top); right: env(safe-area-inset-right); bottom: env(safe-area-inset-bottom); left: env(safe-area-inset-left); }
/* short phones: keep the main button on the same row as the round buttons */
@media (max-height: 470px) {
  .abar { flex-wrap: nowrap; gap: 0.5rem; }
  .hexbtns { gap: 0.375rem; }
  .ana .hexbtn { width: 3.25rem; height: 2.875rem; }
  .ana .nextbtn { min-height: 2.75rem; font-size: 0.875rem; padding: 0 1rem; white-space: nowrap; }
  .ana { padding-top: 0.5rem; padding-bottom: 0.5rem; gap: 0.5rem; }
}

/* ===== Phones held sideways in a browser (short screens): compact lists so pages fit without scrolling ===== */
@media (max-height: 420px) {
  .topics { gap: 0.5rem; }
  .topic { min-height: 0; padding: 0.625rem 0.75rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.625rem; row-gap: 0; align-items: center; }
  .topic .tsign { grid-row: 1 / 3; width: 2.25rem; height: 2.25rem; margin: 0; }
  .topic b { font-size: 1rem; }
  .set { padding-top: 0.25rem; padding-bottom: 0.25rem; min-height: 2.75rem; }
  .page > .topbar, .split .topbar { padding-top: 0.5rem; padding-bottom: 0.375rem; }
  .card { padding: 0.75rem 0.875rem; }
  .page { padding-bottom: 0.25rem; }
  .card.onboard { padding-top: 0.625rem; padding-bottom: 0.75rem; }
  .card.onboard .ctrl-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; row-gap: 0.375rem; }
  .card.onboard .ctrl-list li.small { grid-column: 1 / -1; }
  .card.onboard:has(.ctrl-list) { max-width: 46rem; width: calc(100vw - 2rem); }
  .card.onboard h2 { margin: 0.25rem 0 0.375rem; }
  .card.narrow .price { font-size: 2rem; margin: 0; }
  .card.narrow .paybtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .card.narrow:has(.paybtns) { max-width: 40rem; width: calc(100vw - 2rem); }
  .card.narrow .demo { margin: 0.25rem 0; }
  .topbar h1, .page > .topbar h1, .split .topbar h1 { font-size: 1.375rem; }
}

/* ===== Welcome screen: a real game scene behind a liquid-glass panel ===== */
.title-screen { position: fixed; inset: 0; min-height: 0; overflow: hidden; display: flex; align-items: center; padding: 1.5rem 2.75rem; padding-left: max(2.75rem, env(safe-area-inset-left)); box-sizing: border-box; }
.title-screen::before { content: ""; position: absolute; inset: -4%; background: #6d8f6a url(../images/title-land.jpg) center / cover no-repeat; animation: titledrift 24s ease-in-out infinite alternate; pointer-events: none; }
.title-screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 50%, rgba(11,14,20,0) 55%, rgba(11,14,20,0.35) 100%); pointer-events: none; }
@keyframes titledrift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
@media (prefers-reduced-motion: reduce) { .title-screen::before { animation: none; } }
.title-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0.875rem; width: min(30rem, 46vw); padding: 1.75rem 1.75rem 1.5rem; border-radius: 1.75rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 45%, rgba(255,255,255,0.12));
  -webkit-backdrop-filter: blur(1.25rem) saturate(170%); backdrop-filter: blur(1.25rem) saturate(170%);
  border: 1px solid rgba(255,255,255,0.32); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(255,255,255,0.08), 0 1.5rem 3rem rgba(11,14,20,0.35); box-sizing: border-box; }
.title-inner .kicker { font-size: 0.8125rem; font-weight: 800; letter-spacing: 1.5px; color: rgba(255,255,255,0.85); }
.title-inner h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 0.95; font-weight: 900; font-style: italic; font-stretch: 125%; letter-spacing: -1px; color: #fff; white-space: nowrap; max-width: 100%; text-shadow: 0 2px 12px rgba(11,14,20,0.35); }
.title-inner p { margin: 0; font-size: 1.0625rem; font-weight: 600; color: #fff; line-height: 1.35; text-shadow: 0 1px 6px rgba(11,14,20,0.45); }
.title-inner .btn.primary { align-self: stretch; min-width: 0; min-height: 3.5rem; font-size: 1.25rem; margin-top: 0.25rem; }
.title-inner .seg { align-self: flex-start; background: rgba(11,14,20,0.35); }
body.titlebg #mapwrap { display: none; }
.title-screen canvas.rain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.title-screen.rainon::before { animation: none; }
.title-screen { touch-action: none; -webkit-user-select: none; user-select: none; }
.title-screen .wipehint { position: absolute; z-index: 1; top: max(0.875rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); padding: 0.45rem 0.85rem; border-radius: 99px; font-size: 0.8125rem; font-weight: 700; color: #fff; white-space: nowrap;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); -webkit-backdrop-filter: blur(0.75rem); backdrop-filter: blur(0.75rem); pointer-events: none; animation: hintin 0.6s 1.2s backwards; transition: opacity 0.6s, transform 0.6s; }
.title-screen .wipehint.gone { opacity: 0; transform: translateY(-0.5rem); }
@keyframes hintin { from { opacity: 0; transform: translateY(-0.5rem); } }
@media (orientation: portrait) { .title-screen .wipehint { right: auto; left: 50%; translate: -50% 0; } }

/* phone upright */
@media (orientation: portrait) {
  html:has(body.portraitok) { font-size: clamp(14px, 4.1vw, 19px); }
  .title-screen { align-items: flex-end; justify-content: center; padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); }
  .title-screen::before { background-image: url(../images/title-port.jpg); }
  .title-inner { width: 100%; max-width: 28rem; gap: 0.875rem; text-align: center; padding: 1.5rem 1.25rem 1.25rem; }
  .title-inner .kicker { font-size: 0.75rem; }
  .title-inner h1 { font-size: 11vw; }
  .title-inner p { font-size: 1rem; }
  .title-inner .btn.primary { min-height: 3.4rem; font-size: 1.2rem; }
  .title-inner .seg { align-self: center; }
}

/* side situations on the result screen, and the instructor's bubble */
.cks .cksub { list-style: none; margin: 0.625rem 0 0.125rem; padding: 0.5rem 0 0; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.6875rem; font-weight: 800; letter-spacing: 1.2px; color: var(--signal-yellow, #FFC400); }
.ck.side.good .ckpts { color: #2CE36B; }
.ck.side.bad .ckpts { color: #FF6B5E; }
.exbub.ib { border-color: #FF6B5E; }
.exbub.ib b { color: #FF6B5E; }

/* ---------- instant replay (game style) ---------- */
.ir { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: max(0.875rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(0.875rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); color: #fff;
  background: linear-gradient(180deg, rgba(11,14,20,0.55), transparent 32%, transparent 62%, rgba(11,14,20,0.7)); }
.ir::before { content: ""; position: absolute; inset: 0; border: 0.3rem solid rgba(227,38,61,0.85); pointer-events: none; animation: irpulse 1.2s ease-in-out infinite; }
@keyframes irpulse { 50% { border-color: rgba(227,38,61,0.35); } }
.ir-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.25rem; animation: irin 0.45s cubic-bezier(.2,.9,.25,1.2) both; }
@keyframes irin { from { opacity: 0; transform: translateY(-1rem) scale(0.92); } }
.ir-tag { background: var(--red, #E3263D); color: #fff; font-weight: 900; font-size: 0.75rem; letter-spacing: 2px; padding: 0.25rem 0.75rem; border-radius: 0.375rem; }
.ir-title { margin: 0; font-size: clamp(1.5rem, 4.6vw, 2.75rem); font-weight: 900; font-style: italic; font-stretch: 118%; line-height: 1.05; text-transform: uppercase; text-shadow: 0 0.2rem 0 rgba(0,0,0,0.35), 0 0 1.5rem rgba(0,0,0,0.45); }
.ir-meas { font-size: 1.0625rem; font-weight: 700; background: rgba(11,14,20,0.6); border-radius: 99px; padding: 0.25rem 0.9rem; }
.ir-meas b { color: #FF6B5E; font-size: 1.25rem; font-style: italic; }
.ir.marked .ir-meas { animation: irhit 0.5s ease both; }
@keyframes irhit { 40% { transform: scale(1.18); background: rgba(227,38,61,0.85); } }
.ir-legend { position: absolute; left: max(1rem, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.375rem; }
.ir-legend .lg { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 0.8125rem; background: rgba(11,14,20,0.6); padding: 0.3rem 0.7rem 0.3rem 0.4rem; border-radius: 99px; }
.ir-legend .lg::before { content: ""; width: 1.25rem; height: 0.75rem; border-radius: 0.2rem; }
.ir-legend .you::before { background: #FFB800; }
.ir-legend .gh::before { background: rgba(234,246,255,0.45); border: 1.5px dashed #EAF6FF; }
.ir-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; animation: irin 0.45s 0.2s cubic-bezier(.2,.9,.25,1.2) both; }
.ir-next { margin: 0; max-width: 34rem; font-size: 1rem; font-weight: 700; line-height: 1.35; background: rgba(11,14,20,0.62); border-left: 0.3rem solid var(--signal-yellow, #FFC400); border-radius: 0.5rem; padding: 0.5rem 0.875rem; }
.ir-next b { display: block; font-size: 0.6875rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--signal-yellow, #FFC400); }
.ir-skip { pointer-events: auto; flex-shrink: 0; }

/* ---------- result rows: fix, exam tag, more ---------- */
.ck { align-items: flex-start; }
.ck .ckic, .ck .ckpts { margin-top: 0.0625rem; }
.ckt { display: block; }
.cknext { font-size: 0.75rem; font-weight: 600; color: #FFE1DC; line-height: 1.3; }
.cknext::before { content: "→ "; color: var(--signal-yellow, #FFC400); font-weight: 900; }
.ckmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.ckexam { font-size: 0.6875rem; font-weight: 800; padding: 0.125rem 0.5rem; border-radius: 99px; border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.ckexam.crit { background: rgba(227,38,61,0.85); border-color: transparent; }
.morebtn { border: 0; background: none; color: #DCE3EC; font: inherit; font-size: 0.75rem; font-weight: 700; text-decoration: underline; text-underline-offset: 0.15em; padding: 0.125rem 0; cursor: pointer; }
.ckmore { display: none; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; line-height: 1.35; color: #DCE3EC; }
.ckmore b { display: block; font-size: 0.625rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--signal-yellow, #FFC400); }
.ck.open .ckmore { display: flex; }
.ana .apanel { max-height: calc(100dvh - 7.25rem); overflow-y: auto; overscroll-behavior: contain; }

/* paywall: one clear action, restore as a quiet link underneath */
.split.pay .card .btn.primary.big { width: 100%; }
.paylink { display: block; margin: 1rem auto 0; padding: 0.375rem 0.5rem; border: 0; background: none; font: inherit; font-size: 0.875rem; font-weight: 700; color: #DCE3EC; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.paylink:hover, .paylink:focus-visible { color: #fff; }
