/* Dropbox learning paths — shared styles.
   Look follows dropbox.com (Oct 2026): white page, warm "coconut" panels, graphite ink,
   Dropbox blue for action, a wide grotesk for display. Fonts are OFL stand-ins (fonts.css). */
:root {
  --blue: #0061FE; --blue-d: #0050D0; --blue-l: #3984FF; --zen: #B4C8E1;
  --ink: #1E1919; --ink2: #524A3E; --mute: #665F58; --line: #D8D3CB; --line2: #E8E4DE;
  --paper: #FFFFFF; --coconut: #F7F5F2; --sand: #EEE9E2; --graphite: #2B2929; --night: #1A1918;
  --crimson: #9B0032; --lime: #B4DC19; --ocean: #007891; --canopy: #BE4B0A; --gold: #FAD24B; --navy: #283750; --plum: #78286E; --tangerine: #FA551E;
  --good: #0E7A4A; --good-bg: #E3F4EA; --bad: #B4233C; --bad-bg: #FBE6E9;
  --accent: var(--blue);
  --display: 'Sharp Grotesk', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font: 'Atlas Grotesk', 'Archivo', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --r: 12px;
  --top: 64px;
  --shadow: 0 1px 2px rgba(30, 25, 25, .06), 0 8px 24px rgba(30, 25, 25, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-synthesis-weight: none; margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-stretch: 125%; font-weight: 500; letter-spacing: -.012em; line-height: 1.12; margin: 0; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue-l); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: var(--r); padding: 13px 20px; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.primary:disabled { background: #C9C4BC; color: #fff; cursor: not-allowed; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--coconut); }
.btn.big { padding: 18px 26px; font-size: 16px; border-radius: 16px; }
.btn.sm { padding: 9px 14px; font-size: 14px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line2); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.brand .glyph { width: 30px; height: 30px; flex: none; }
.brand .glyph svg { width: 100%; height: 100%; display: block; }
.brand .short { display: none; }
.brand b { font-family: var(--display); font-stretch: 125%; font-weight: 500; font-size: 16px; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.brand small { display: block; font-size: 14px; color: var(--mute); margin-top: 1px; white-space: nowrap; }
.top .sp { flex: 1; }
.xp { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--coconut); box-shadow: inset 0 0 0 1px var(--line2); position: relative; }
.xp .lv { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 14px var(--display); font-stretch: 125%; }
.xp .meta { line-height: 1.1; min-width: 92px; }
.xp .meta b { font-size: 14px; display: block; }
.xp .meta small { font-size: 14px; color: var(--mute); }
.xp .track { height: 5px; border-radius: 3px; background: var(--line); margin-top: 5px; overflow: hidden; }
.xp .track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.xp .plus { position: absolute; right: 8px; top: -6px; font: 700 14px var(--font); color: var(--good); opacity: 0; pointer-events: none; }
.xp .plus.go { animation: plus 1.1s ease-out; }
@keyframes plus { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
.xp.pop .lv { animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.2); } }
.combo { white-space: nowrap; font: 700 14px var(--font); color: var(--canopy); background: #FFE9DB; border-radius: 999px; padding: 4px 9px; display: none; }
.combo.on { display: inline-block; animation: pop .4s; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; position: relative; }
.iconbtn:hover { background: var(--coconut); }
.iconbtn svg { width: 22px; height: 22px; }
.menu { position: absolute; right: 0; top: 46px; background: #fff; border-radius: var(--r); box-shadow: 0 12px 40px rgba(0, 0, 0, .16), 0 0 0 1px var(--line2); padding: 8px; min-width: 250px; text-align: left; z-index: 40; }
.menu label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.menu label:hover { background: var(--coconut); }
.menu input { width: 18px; height: 18px; accent-color: var(--blue); }
.menu label small { display: block; font-size: 14px; color: var(--mute); margin-top: 1px; white-space: nowrap; }
.menu input { flex: none; }
#mapBtn { display: none; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.rail { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; padding: 22px 18px 28px; background: var(--coconut); border-right: 1px solid var(--line2); }
.rail h3 { font-size: 16px; margin-bottom: 2px; }
.rail .sub { font-size: 14px; color: var(--mute); margin-bottom: 14px; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 19px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.path li { position: relative; }
.path button { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: none; padding: 7px 8px 7px 0; cursor: pointer; text-align: left; border-radius: 10px; }
.path button:hover .t { color: var(--blue); }
.path .dot { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font: 600 14px var(--display); font-stretch: 125%; position: relative; z-index: 1; color: var(--mute); }
.path .done .dot { background: var(--ink); color: #fff; box-shadow: none; }
.path .cur .dot { background: var(--blue); color: var(--on-blue, #fff); box-shadow: 0 0 0 5px var(--sel-glow, rgba(0, 97, 254, .18)); }
.path .t { font-weight: 600; font-size: 14px; line-height: 1.25; display: block; }
.path .m { font-size: 14px; color: var(--mute); }
.trophies { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.trophies h4 { font: 600 14px var(--font); letter-spacing: 0; color: var(--mute); margin-bottom: 10px; }
.badges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.badge { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px var(--line); filter: grayscale(1); opacity: .45; transition: .3s; }
.badge.on { filter: none; opacity: 1; box-shadow: inset 0 0 0 2px var(--ink); }
.rail .meta { font-size: 14px; color: var(--mute); margin-top: 12px; }
.rail .reset { font-size: 14px; color: var(--mute); margin-top: 18px; display: inline-block; }
.main { min-width: 0; padding: 32px clamp(16px, 4vw, 56px) 40px; }
.stage { max-width: 1040px; margin: 0 auto; }

/* ---------- beat card ---------- */
.card { animation: rise .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.beathead { margin-bottom: 22px; }
.eyebrow { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: 0; margin-bottom: 10px; }
.eyebrow i { width: 9px; height: 9px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.beathead h2 { font-size: clamp(24px, 3.3vw, 32px); max-width: 26ch; text-wrap: balance; }
.lede { font-size: 20px; color: var(--ink2); max-width: 64ch; margin-top: 12px; }
.footerbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps i { width: 22px; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.done { background: var(--ink); }
.steps i.on { background: var(--blue); }
.hint { font-size: 14px; color: var(--mute); }
.footerbar .go { display: flex; gap: 12px; align-items: center; margin-left: auto; }
.footerbar .aux { width: 100%; display: flex; justify-content: flex-end; gap: 6px; margin-top: -6px; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.linkbtn:hover { background: var(--coconut); color: var(--ink); }
.linkbtn svg { width: 15px; height: 15px; }
.panel { background: var(--coconut); border-radius: var(--r); padding: 24px; }
.panel.white { background: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.panel.dark { background: var(--ink); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; }
.ill { width: 100%; max-width: 360px; justify-self: center; }
.kicker { font: 600 14px var(--font); letter-spacing: 0; color: var(--mute); margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; }
.quote { border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; font-size: 20px; margin: 14px 0; }
.quote cite { display: block; font-style: normal; font-size: 14px; color: var(--mute); margin-top: 8px; }
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bullets li { display: flex; gap: 12px; align-items: flex-start; }
.bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-top: 9px; flex: none; transform: rotate(45deg); }

/* ---------- coach ---------- */
.coach { display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 0; animation: rise .5s; }
.coach .ava { width: 52px; height: 52px; border-radius: 50%; flex: none; overflow: hidden; background: var(--sand); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); }
.coach .ava img { width: 100%; height: 100%; object-fit: cover; }
.coach .say { background: #fff; border-radius: 4px 16px 16px 16px; padding: 14px 18px; box-shadow: inset 0 0 0 1px var(--line); flex: 1; max-width: 680px; }
.coach .name { font: 700 14px var(--font); letter-spacing: 0; color: var(--mute); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.coach.good .say { box-shadow: inset 0 0 0 2px var(--good); }
.coach.bad .say { box-shadow: inset 0 0 0 2px var(--bad); }
.coach.ok .say { box-shadow: inset 0 0 0 2px var(--canopy); }
.hear { border: 0; background: var(--coconut); border-radius: 999px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.hear svg { width: 15px; height: 15px; }

/* ---------- hero / landing ---------- */
.hero { border-radius: 20px; overflow: hidden; background: var(--ink); color: #F7F5F2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-height: 440px; }
.hero .copy .kicker { color: rgba(247, 245, 242, .65); }
.hero .copy { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(30px, 3.5vw, 48px); color: #F7F5F2; text-wrap: balance; }
.hero .lede { color: rgba(247, 245, 242, .78); }
.hero .art { background: var(--coconut); display: grid; place-items: center; padding: 20px; }
.hero .art img { width: 100%; max-height: 420px; object-fit: contain; }
.hero .meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 26px; }
.hero .meta .chip { background: rgba(255, 255, 255, .08); color: #F7F5F2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.namebox { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.namebox input, .field { font: inherit; font-size: 16px; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.hero .namebox input { max-width: 300px; background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .namebox input::placeholder { color: rgba(247, 245, 242, .5); }
.hero small.fine { color: rgba(247, 245, 242, .6); font-size: 12px; }
.landing-below { margin-top: 28px; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.modcard { background: var(--coconut); border-radius: var(--r); padding: 18px; display: flex; gap: 14px; align-items: center; border: 0; text-align: left; cursor: pointer; }
.modcard:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.modcard img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.modcard b { display: block; font-size: 16px; line-height: 1.25; }
.modcard small { color: var(--mute); font-size: 14px; }

/* ---------- scene player ---------- */
.player { border-radius: 16px; overflow: hidden; background: var(--night); box-shadow: var(--shadow); scroll-margin: calc(var(--top) + 12px) 0 16px; }
.player .screen { position: relative; aspect-ratio: 16 / 9; background: var(--coconut); overflow: hidden; }
.player svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.player .title { position: absolute; left: 16px; top: 14px; font: 600 14px var(--font); background: rgba(255, 255, 255, .92); color: var(--ink); padding: 6px 11px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line2); transition: opacity .3s; }
.player.started .title { opacity: 0; }
.player .bigplay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; background: rgba(30, 25, 25, .42); border: 0; cursor: pointer; color: #fff; transition: opacity .3s; }
.player .bigplay span { width: 86px; height: 86px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .2s; }
.player .bigplay:hover span { transform: scale(1.06); }
.player .bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.player .bigplay em { font-style: normal; font-weight: 600; background: rgba(30, 25, 25, .7); padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.player.started .bigplay { opacity: 0; pointer-events: none; }
.player .cap { min-height: 84px; padding: 14px 20px; color: #F7F5F2; font-size: 16px; line-height: 1.45; background: var(--night); display: flex; align-items: center; }
.player .ctrl { display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px; background: var(--night); color: #fff; }
.player .ctrl button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.player .ctrl button:hover { background: rgba(255, 255, 255, .1); }
.player .ctrl svg { width: 20px; height: 20px; }
.player .bar::before { content: ""; position: absolute; inset: -14px 0; }
.player .bar { flex: 1; height: 6px; background: rgba(255, 255, 255, .2); border-radius: 3px; position: relative; cursor: pointer; margin: 0 8px; touch-action: none; }
.player .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-l); border-radius: 3px; }
.player .bar b { position: absolute; top: -2px; width: 2px; height: 10px; background: rgba(255, 255, 255, .5); }
.player .time { font: 500 14px var(--font); color: rgba(255, 255, 255, .7); min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
/* scene element states */
svg.scene [data-in] { opacity: 0; transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transform-box: fill-box; transform-origin: center; }
svg.scene [data-in].on { opacity: 1; transform: none; }
svg.scene .up[data-in] { transform: translateY(40px); }
svg.scene .left[data-in] { transform: translateX(-60px); }
svg.scene .right[data-in] { transform: translateX(60px); }
svg.scene .zoom[data-in] { transform: scale(.6); }
svg.scene [data-in].on.up, svg.scene [data-in].on.left, svg.scene [data-in].on.right, svg.scene [data-in].on.zoom { transform: none; }
svg.scene [data-out] { transition: opacity .6s; }
svg.scene [data-out].gone { opacity: .12; }
svg.scene [data-out].gone.vanish { opacity: 0; }
svg.scene .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 1.6s ease, opacity .4s; }
svg.scene [data-in].on .draw { stroke-dashoffset: 0; }
/* a line drawn in with its group: the group fades in, then the line draws */

/* ---------- interactions ---------- */
.flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.flips[data-n="2"], .flips[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flips[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flip { perspective: 1200px; border: 0; background: none; padding: 0; cursor: pointer; min-height: var(--fh, 220px); text-align: left; }
.flip .in { position: relative; width: 100%; height: 100%; min-height: var(--fh, 220px); transition: transform .6s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.flip.on .in { transform: rotateY(180deg); }
.flip .f, .flip .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; }
.flip .f { background: var(--coconut); box-shadow: inset 0 0 0 1px var(--line2); }
.flip .f img { width: 96px; height: 96px; object-fit: contain; margin-bottom: auto; }
.flip .f b { font: 500 20px/1.2 var(--display); font-stretch: 125%; margin-top: 12px; text-wrap: balance; }
.flip .f small { color: var(--mute); font-size: 14px; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.flip .b { background: var(--ink); color: #F7F5F2; transform: rotateY(180deg); font-size: 16px; line-height: 1.5; overflow: auto; }
.flip .b b { display: block; margin-bottom: 6px; color: var(--gold); font-size: 14px; letter-spacing: 0; }
.flip:not(.on):hover .f { box-shadow: inset 0 0 0 2px var(--ink); }

.tray { display: flex; flex-wrap: wrap; gap: 10px; min-height: 56px; padding: 14px; border-radius: var(--r); background: var(--coconut); margin-bottom: 18px; }
.tok { border: 0; background: #fff; border-radius: 10px; padding: 11px 14px; box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(0, 0, 0, .04); cursor: grab; font-size: 14px; font-weight: 500; text-align: left; max-width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; transition: box-shadow .15s, transform .15s, opacity .2s; }
.tok:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.tok.sel { box-shadow: inset 0 0 0 2px var(--blue), 0 6px 16px var(--sel-glow, rgba(0, 97, 254, .2)); transform: translateY(-2px); }
.tok.good { background: var(--good-bg); box-shadow: inset 0 0 0 2px var(--good); cursor: default; }
.tok.bad { animation: shake .4s; background: var(--bad-bg); }
.tok.dragging { opacity: .35; }
.ghosttok { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-2deg); box-shadow: 0 16px 40px rgba(0, 0, 0, .2) !important; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.bins { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 14px; }
.bin { border-radius: var(--r); border: 2px dashed var(--line); padding: 14px; min-height: 150px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.bin h4 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.bin h4 i { width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--blue)); flex: none; }
.bin p { font-size: 14px; color: var(--mute); margin: 0 0 4px; }
.bin.hot, .bin:hover { border-color: var(--c, var(--blue)); background: var(--coconut); }
.bin .tok { cursor: default; font-size: 14px; padding: 8px 11px; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.match .col { display: grid; gap: 10px; align-content: start; }
.match .tok { width: 100%; cursor: pointer; min-height: 52px; }
.match .tok.gone { opacity: .0; pointer-events: none; height: 0; min-height: 0; padding: 0; margin: -5px 0; }
.pairs { display: grid; gap: 8px; margin-top: 16px; }
.pair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--good); animation: rise .4s; }
.pair > * { padding: 10px 14px; font-size: 14px; }
.pair b { background: var(--good-bg); }

.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: center; border: 0; background: #fff; border-radius: var(--r); padding: 15px 16px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; text-align: left; font-size: 16px; transition: box-shadow .15s, background .15s; width: 100%; }
.choice:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--ink); }
.choice .k { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--coconut); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.choice.picked { box-shadow: inset 0 0 0 2px var(--blue); }
.choice.right { background: var(--good-bg); box-shadow: inset 0 0 0 2px var(--good); }
.choice.wrong { background: var(--bad-bg); box-shadow: inset 0 0 0 2px var(--bad); }
.choice:disabled { cursor: default; }
.qhead { text-wrap: balance; font-size: clamp(20px, 2.2vw, 24px); font-family: var(--display); font-stretch: 112%; font-weight: 500; margin-bottom: 16px; line-height: 1.25; }
.fb { margin-top: 14px; padding: 14px 16px; border-radius: var(--r); font-size: 16px; animation: rise .35s; }
.fb.good { background: var(--good-bg); }
.fb.bad { background: var(--bad-bg); }
.fb b:first-child { margin-right: 6px; }
.msg.note .stronger { display: block; margin-top: 6px; }

.deck { position: relative; max-width: 560px; margin: 0 auto; }
.deckcount { text-align: center; font-size: 14px; color: var(--mute); margin-bottom: 10px; font-weight: 600; }
.swcard { position: relative; min-height: 220px; border-radius: 18px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line2); padding: 28px; display: flex; flex-direction: column; justify-content: center; text-align: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s; }
.swcard .txt { font: 500 clamp(19px, 2.3vw, 24px)/1.3 var(--display); font-stretch: 112%; text-wrap: balance; }
.swcard.outL { transform: translateX(-130%) rotate(-14deg); opacity: 0; }
.swcard.outR { transform: translateX(130%) rotate(14deg); opacity: 0; }
.swcard .stamp { position: absolute; top: 18px; padding: 4px 10px; border-radius: 6px; font: 700 14px var(--font); letter-spacing: 0; opacity: 0; border: 2px solid; }
.swcard .stamp.l { left: 18px; color: var(--crimson); }
.swcard .stamp.r { right: 18px; color: var(--good); }
.deckbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.deckbtns .btn { justify-content: center; white-space: normal; text-align: center; }

.order { display: grid; gap: 8px; counter-reset: o; }
.orow { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 10px 10px 10px 14px; box-shadow: inset 0 0 0 1px var(--line); counter-increment: o; animation: rise .3s; }
.orow::before { content: counter(o); width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 14px var(--display); flex: none; }
.orow span { flex: 1; font-size: 16px; }
.orow .mv { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--coconut); cursor: pointer; display: grid; place-items: center; }
.orow .mv:disabled { opacity: .3; cursor: default; }
.orow .mv svg { width: 18px; height: 18px; }
.orow.right { box-shadow: inset 0 0 0 2px var(--good); background: var(--good-bg); }
.orow.wrong { box-shadow: inset 0 0 0 2px var(--bad); }
.palette { display: flex; flex-wrap: wrap; gap: 10px; }
.slots { display: grid; gap: 8px; margin-bottom: 16px; }
.slot { min-height: 52px; border-radius: 10px; border: 2px dashed var(--line); display: flex; align-items: center; gap: 12px; padding: 6px 12px; color: var(--mute); font-size: 14px; }
.slot .n { width: 28px; height: 28px; border-radius: 8px; background: var(--coconut); display: grid; place-items: center; font-weight: 700; color: var(--ink); flex: none; }
button.slot { width: 100%; font: inherit; text-align: left; background: #fff; }
.slot.filled { border-style: solid; border-color: var(--ink); color: var(--ink); background: #fff; cursor: pointer; }
.slot.right { border-color: var(--good); background: var(--good-bg); }
.slot.wrong { border-color: var(--bad); background: var(--bad-bg); }

.hotwrap { position: relative; border-radius: 14px; overflow: hidden; overflow-x: auto; box-shadow: var(--shadow), 0 0 0 1px var(--line2); background: #fff; }
.hotin { position: relative; }
/* ---------- hunt: find the problems in a mock-up ---------- */
.huntwrap { border-radius: 14px; overflow-x: auto; box-shadow: var(--shadow), 0 0 0 1px var(--line2); background: #fff; }
.huntin { min-width: 640px; }
.huntable { cursor: pointer; border-radius: 4px; outline-offset: 1px; transition: background .15s, box-shadow .15s; }
.huntable:hover { background: rgba(0, 0, 0, .05); }
.huntable.caught { background: var(--bad-bg); box-shadow: inset 0 -2px 0 var(--bad); position: relative; }
.huntable.caught::after { content: attr(data-no); position: absolute; top: -9px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 14px/18px var(--font); text-align: center; }
.huntable.nope { animation: nope .7s; }
@keyframes nope { 0%, 60% { background: var(--bad-bg); box-shadow: inset 0 -2px 0 var(--bad); } }
.huntwrap.prose .huntin { min-width: 0; }
.hsinfo .panel.bad .kicker { color: var(--bad); }
.hotwrap-hint { display: none; font-size: 14px; color: var(--mute); margin-top: 8px; }
.hs { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 0; background: var(--blue); color: var(--on-blue, #fff); cursor: pointer; font: 700 14px var(--font); display: grid; place-items: center; box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--hs-ring, rgba(0, 97, 254, .28)); animation: beacon 1.8s infinite; z-index: 2; }
.hs.seen { background: #fff; color: var(--ink); animation: none; box-shadow: 0 0 0 2px var(--ink), 0 2px 8px rgba(0, 0, 0, .25); }
@keyframes beacon { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 12px var(--hs-pulse, rgba(0, 97, 254, .1)); } }
.hsinfo { margin-top: 14px; min-height: 92px; }
.found { font-size: 14px; color: var(--mute); font-weight: 600; margin-top: 10px; }

.chat { display: grid; gap: 12px; max-height: 520px; overflow: auto; padding: 18px; background: var(--coconut); border-radius: var(--r); scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 86%; animation: rise .35s; }
.msg .ava { width: 36px; height: 36px; border-radius: 50%; flex: none; overflow: hidden; background: var(--sand); display: grid; place-items: center; font: 700 14px var(--font); }
.msg .ava img { width: 100%; height: 100%; object-fit: cover; }
.msg .bub { background: #fff; border-radius: 16px 16px 16px 4px; padding: 11px 14px; box-shadow: inset 0 0 0 1px var(--line2); font-size: 16px; }
.msg .who { font-size: 14px; font-weight: 700; color: var(--mute); letter-spacing: 0; margin-bottom: 2px; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg.me .bub { background: var(--blue); color: var(--on-blue, #fff); border-radius: 16px 16px 4px 16px; box-shadow: none; }
.msg.me .who { color: var(--on-blue, #fff); opacity: .75; }
.msg.note { max-width: 100%; justify-content: center; }
.msg.note .bub { background: transparent; box-shadow: none; font-size: 14px; color: var(--mute); text-align: center; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line2); width: max-content; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.replies { display: grid; gap: 8px; margin-top: 14px; }
.meter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.meter .track { flex: 1; height: 10px; border-radius: 6px; background: var(--line2); overflow: hidden; }
.meter .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--crimson), var(--gold), var(--good)); transition: width .6s; }
.boss { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r); background: var(--ink); color: #fff; margin-bottom: 14px; }
.boss img { width: 64px; height: 64px; border-radius: 12px; background: var(--coconut); object-fit: contain; flex: none; }
.boss b { font: 500 20px var(--display); font-stretch: 125%; display: block; text-wrap: balance; }
.boss small { color: rgba(255, 255, 255, .7); }

.lightning .clock { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-weight: 700; }
.lightning .clock .t { font: 600 32px var(--display); font-stretch: 125%; font-variant-numeric: tabular-nums; }
.lightning .clock .track { flex: 1; height: 8px; border-radius: 4px; background: var(--line2); margin: 0 16px; overflow: hidden; }
.lightning .clock .track i { display: block; height: 100%; background: var(--blue); transition: width .25s linear; }
.lightning .clock.low .track i { background: var(--crimson); }
.scoreboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--coconut); border-radius: var(--r); padding: 16px; }
.stat b { display: block; font: 500 32px var(--display); font-stretch: 125%; }
.stat small { color: var(--mute); font-size: 14px; }

.reflect { display: grid; gap: 16px; }
.reflect label { display: grid; gap: 8px; font-weight: 600; font-size: 16px; }
.reflect textarea { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); min-height: 84px; resize: vertical; background: #fff; color: var(--ink); }
.reflect .count { font-size: 14px; color: var(--mute); font-weight: 500; }
.reflect h4 { font-size: 16px; margin-top: 8px; }
.reflect .rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reflect .rcopy { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .reflect .rgrid { grid-template-columns: 1fr; } }

.slider { display: grid; gap: 6px; margin-bottom: 16px; }
.slider label { display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
.slider label b { font-family: var(--display); font-stretch: 125%; font-weight: 500; }
.slider input { width: 100%; accent-color: var(--blue); height: 28px; }

/* ---------- quiz + certificate ---------- */
.qprog { display: flex; gap: 6px; margin-bottom: 18px; }
.qprog i { flex: 1; height: 6px; border-radius: 3px; background: var(--line2); }
.qprog i.on { background: var(--blue); } .qprog i.g { background: var(--good); } .qprog i.b { background: var(--bad); }
.result { text-align: center; padding: 10px 0; }
.result .big { font: 500 64px var(--display); font-stretch: 125%; line-height: 1; }
.result h3 { font-size: 24px; margin: 10px 0 8px; }
.preview { width: 100%; position: relative; overflow: hidden; border-radius: 10px; box-shadow: var(--shadow), 0 0 0 1px var(--line2); margin: 18px 0; background: #fff; }
.preview > div { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* certificate page, 1650 x 1275 */
.cert { width: 1650px; height: 1275px; position: relative; background: #fff; color: var(--ink); font-family: var(--font); overflow: hidden; }
.cert .side { position: absolute; left: 0; top: 0; bottom: 0; width: 470px; background: var(--ink); color: #F7F5F2; padding: 80px 60px; display: flex; flex-direction: column; }
.cert .side .glyph { width: 86px; height: 86px; }
.cert .side .glyph svg { width: 100%; height: 100%; }
.cert .side .prog { font: 500 40px/1.12 var(--display); font-stretch: 125%; margin-top: 48px; }
.cert .side .ill { margin-top: auto; max-width: 100%; width: 350px; background: var(--coconut); border-radius: 22px; padding: 22px; }
.cert .main2 { position: absolute; left: 470px; right: 0; top: 0; bottom: 0; padding: 100px 110px 160px; display: flex; flex-direction: column; }
.cert .k { font: 700 22px var(--font); letter-spacing: 0; color: var(--mute); }
.cert .t1 { font-size: 30px; color: var(--ink2); margin-top: 48px; }
.cert .nm { font: 500 92px/1.05 var(--display); font-stretch: 125%; margin-top: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cert .nm.long { font-size: 68px; }
.cert .nm.longer { font-size: 52px; }
.cert .rule { height: 6px; width: 180px; background: var(--accent); margin: 40px 0 34px; border-radius: 3px; }
.cert .t2 { font-size: 29px; line-height: 1.5; color: var(--ink2); max-width: 900px; }
.cert .t2 b { color: var(--ink); }
.cert .skills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cert .skills span { font-size: 21px; font-weight: 600; padding: 9px 18px; border-radius: 999px; background: var(--coconut); }
.cert .foot { margin-top: auto; padding-top: 28px; display: flex; gap: 56px; align-items: flex-end; }
.cert .foot small { display: block; font-size: 18px; color: var(--mute); letter-spacing: 0; font-weight: 700; }
.cert .foot b { font: 500 30px var(--display); font-stretch: 125%; white-space: nowrap; }
.cert .fine { position: absolute; left: 580px; right: 110px; bottom: 40px; font-size: 17px; line-height: 1.45; color: var(--mute); padding-top: 18px; border-top: 1px solid var(--line2); }

/* takeaway card (portrait, 1275 x 1650) */
.take { width: 1275px; height: 1650px; background: #fff; color: var(--ink); font-family: var(--font); padding: 80px 86px; position: relative; display: flex; flex-direction: column; }
.take .th { display: flex; align-items: center; gap: 24px; padding-bottom: 34px; border-bottom: 3px solid var(--ink); }
.take .th .glyph { width: 72px; height: 72px; } .take .th .glyph svg { width: 100%; height: 100%; }
.take .th b { font: 500 46px/1.1 var(--display); font-stretch: 125%; display: block; }
.take .th span { font-size: 22px; color: var(--mute); }
.take .th .who { margin-left: auto; text-align: right; font-size: 20px; color: var(--mute); }
.take .th .who b { font-size: 28px; color: var(--ink); }
.take .tb { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 46px; margin-top: 40px; flex: 1; align-content: start; }
.take h4 { font: 500 27px var(--display); font-stretch: 125%; margin-bottom: 14px; }
.take p, .take li { font-size: 21px; line-height: 1.45; }
.take ul { margin: 0; padding-left: 26px; }
.take li { margin-bottom: 8px; }
.take .full { grid-column: 1 / -1; }
.take .box { background: var(--coconut); border-radius: 18px; padding: 26px 30px; }
.take .fine { font-size: 16px; color: var(--mute); margin-top: 24px; }

/* ---------- toast, confetti, level up ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px 14px 14px; display: flex; gap: 14px; align-items: center; z-index: 60; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); transition: transform .45s cubic-bezier(.2, .8, .2, 1); max-width: calc(100vw - 32px); }
.toast:not(.on) { opacity: 0; visibility: hidden; transition: transform .45s, opacity .3s, visibility 0s .45s; }
.toast.on { transform: translate(-50%, 0); }
.toast .medal { width: 46px; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.toast .medal svg { width: 70%; height: 70%; }
.toast .lvmedal { width: 100%; height: 100%; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; font: 500 24px var(--display); }
.toast b { display: block; font-size: 16px; } .toast span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }

.foot-note { max-width: 1040px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--line2); font-size: 12px; color: var(--mute); }
.scrim { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  #mapBtn { display: grid; }
  .rail { position: fixed; left: 0; top: var(--top); bottom: 0; width: min(320px, 86vw); height: auto; z-index: 25; transform: translateX(-102%); transition: transform .3s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.map-open .rail { transform: none; }
  body.map-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0, 0, 0, .3); z-index: 20; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  /* On a phone the title and Start come first; the description and the art follow (reordered, not hidden). */
  .hero .art { order: 1; max-height: 230px; }
  .hero .art img { max-height: 200px; }
  .hero .copy > .kicker { order: 0; } .hero .copy > h1 { order: 1; } .hero .copy > .meta { order: 2; margin: 14px 0 18px; }
  .hero .copy > .namebox { order: 3; } .hero .copy > small.fine { order: 4; } .hero .copy > .lede { order: 5; margin-top: 18px; }
  .grid2, .split, .match { grid-template-columns: 1fr; }
  .bins { grid-template-columns: 1fr; }
  .split .ill { max-width: 220px; order: -1; }
  .xp .meta { display: none; }
  .brand small { display: none; }
  .top { padding: 0 12px; gap: 8px; }
  .main { padding: 22px 16px 32px; }
  .player .cap { font-size: 16px; min-height: 116px; padding: 12px 14px; }
  .player .title { display: none; }
  .deckbtns { grid-template-columns: 1fr; }
  .flips[data-n] { grid-template-columns: 1fr; }
  .hotwrap.mock .hotin { min-width: 680px; }
  .hotwrap-hint { display: block; }
  .hs { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .namebox .btn { flex: none; }
  .player .time { display: none; }
  .footerbar .go { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .footerbar .go .hint { order: -1; width: 100%; text-align: right; }
  .footerbar .go .hint:empty { display: none; }
  .brand .long { display: none; } .brand .short { display: block; }
  .footerbar .go .btn { flex: 1; justify-content: center; }
  .steps { display: none; }
  .flip, .flip .in { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The scene's poster: a composed frame, dimmed and still, until play (design review, 2026-10-21). */
.player.poster svg.scene { filter: brightness(.6) saturate(.85); }
.player.poster svg.scene * { animation-play-state: paused; }
.player.snap svg.scene * { transition: none !important; }
