/* Layout concept: a phone-first edgame. A sky-grid world with thick-outlined comic "sticker" pieces,
   one centred column, a winding stage map with zig-zag lesson nodes, full-screen lesson cards,
   and a floating bottom dock (Lessons, Quizzes, Me). Each stage brings its own colour as --st. */
:root {
  --sky: #dcefff;
  --grid: #c3e1fb;
  --paper: #ffffff;
  --paper-2: #f2f8ff;
  --line: #1d2b53;
  --ink: #1d2b53;
  --muted: #4a5a82;
  --chaos: #c93a31; --chaos-wash: #fde4e0;
  --order: #2a6fcf; --order-wash: #ddebfc;
  --fun: #23843a;   --fun-wash: #ddf3de;
  --star: #ffc21a;
  --xp: #8048c4;
  --on-color: #ffffff;
  --focus: #2a6fcf;
  --shadow: 4px 4px 0 var(--line);
  --shadow-sm: 3px 3px 0 var(--line);
  --f-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif;
  --r-big: 24px; --r-mid: 16px; --r-small: 10px;
  --col: 720px;
  color-scheme: light;
}

/* ---------------- fixed colours: the same in light and dark ----------------
   Yellow surfaces stay yellow in dark mode, so text on them is always navy. Sticker art sits on white
   tiles in both themes. The code window is a dark editor in both themes. */
:root {
  --on-star: #1d2b53;       /* text and outlines on yellow (star) surfaces */
  --sticker: #ffffff;       /* tile behind sticker art and icons */
  --sticker-ink: #1d2b53;   /* outlines drawn on stickers, confetti and celebration type */
  --star-deep: #b98500;     /* the darker gold used for yellow button edges */
  --star-pale: #fff6cf;     /* the pale gold inside star icons */
  --code-bg: #142048;
  --code-bar: #0d1736;
  --code-text: #e6eeff;
  --code-dim: #a9b8e0;
  --code-ln: #6f80b5;
  --code-rule: #26346a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0e1633; --grid: #18244c; --paper: #17214a; --paper-2: #1d2a5a;
    --line: #04081a; --ink: #eef3ff; --muted: #a9b8e0;
    --chaos: #e0544a; --chaos-wash: #3a1c2a; --order: #3d84e6; --order-wash: #16295c; --fun: #2f9a46; --fun-wash: #133b2c;
    --xp: #a066e8; --focus: #6aa6ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0e1633; --grid: #18244c; --paper: #17214a; --paper-2: #1d2a5a;
  --line: #04081a; --ink: #eef3ff; --muted: #a9b8e0;
  --chaos: #e0544a; --chaos-wash: #3a1c2a; --order: #3d84e6; --order-wash: #16295c; --fun: #2f9a46; --fun-wash: #133b2c;
  --xp: #a066e8; --focus: #6aa6ff;
  color-scheme: dark;
}

/* ---------------- base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 400 1.0625rem/1.6 var(--f-body); color: var(--ink);
  background-color: var(--sky);
  background-image: linear-gradient(var(--grid) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--paper-2); border: 1.5px solid color-mix(in srgb, var(--line) 25%, transparent); padding: .05em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
body[data-view="player"] main { padding-bottom: 0; }
.col { width: 100%; max-width: var(--col); margin-inline: auto; padding-inline: 18px; padding-block: 22px 12px; }

/* ---------------- buttons, stars, avatars ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font-family: var(--f-display); font-size: 1.08rem; letter-spacing: .02em; line-height: 1.1; text-align: center;
  padding: .6em 1.2em; min-height: 48px; text-decoration: none;
  background: var(--paper); color: var(--ink); border: 3px solid var(--line); border-radius: 999px;
  box-shadow: 0 4px 0 var(--line); cursor: pointer; transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--line); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--line); }
.btn.big { font-size: 1.25rem; min-height: 56px; padding-inline: 1.6em; }
.btn-star { background: var(--star); color: var(--on-star); }
.btn-blue { background: var(--order); color: var(--on-color); }
.btn-red { background: var(--chaos); color: var(--on-color); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

.star-ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
.star-ico .fill { fill: var(--star); }
.star-ico .edge { fill: none; stroke: var(--line); stroke-width: 2.2; stroke-linejoin: round; }
.star-ico.is-empty .fill { fill: color-mix(in srgb, var(--muted) 14%, transparent); }
.star-ico.is-empty .edge { stroke: color-mix(in srgb, var(--muted) 70%, transparent); stroke-width: 1.8; }

.avatar { display: inline-block; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 3px solid var(--line); background: var(--paper); }
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar.xl { width: 112px; height: 112px; border-width: 4px; box-shadow: var(--shadow); }
.lvl-badge {
  position: absolute; right: -7px; bottom: -6px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; border: 2.5px solid var(--line); background: var(--xp); color: var(--on-color);
  font-family: var(--f-display); font-size: .8rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.xpbar { display: block; height: 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--xp); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.xpbar.big { height: 18px; border-width: 3px; }
.bump { animation: bump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.15) rotate(-3deg); } }
@keyframes pop { 0% { transform: scale(.3) rotate(-40deg); } 70% { transform: scale(1.2) rotate(6deg); } 100% { transform: none; } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Bolt's speech bubble */
.bolt { display: flex; gap: 12px; align-items: flex-start; }
.bolt .avatar { width: 48px; height: 48px; }
.bubble {
  position: relative; flex: 1; min-width: 0; background: var(--paper); border: 3px solid var(--line); border-radius: 18px;
  padding: 11px 15px; box-shadow: var(--shadow-sm); font-size: 1rem;
}
.bubble::before {
  content: ""; position: absolute; left: -11px; top: 15px; width: 16px; height: 16px; background: inherit;
  border-left: 3px solid var(--line); border-bottom: 3px solid var(--line); transform: rotate(45deg);
}
.bubble strong:first-child { font-family: var(--f-display); font-weight: 400; letter-spacing: .02em; margin-right: .25em; }
.verdict { font-family: var(--f-display); letter-spacing: .02em; margin-right: .35em; }
.verdict.yes { color: var(--fun); } .verdict.no { color: var(--chaos); }

/* ---------------- top bar ---------------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--paper); border-bottom: 3px solid var(--line); }
.topbar-in { max-width: var(--col); margin-inline: auto; padding: 8px 18px; display: flex; align-items: center; gap: 14px; min-height: 66px; }
.hud-me { flex: none; display: block; border-radius: 50%; }
.chip-av { position: relative; display: inline-block; }
.chip-av .avatar { width: 46px; height: 46px; border-width: 3px; box-shadow: 0 3px 0 var(--line); }
.chip-av .lvl-badge { right: -8px; bottom: -6px; min-width: 24px; height: 24px; font-size: .85rem; }
.hud-xp { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; text-decoration: none; color: var(--ink); }
.hud-xp-top { min-width: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hud-xp-top b { font-family: var(--f-display); font-weight: 400; font-size: 1rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-xp-top small { font-size: .78rem; font-weight: 700; color: var(--muted); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-xp .xpbar { height: 14px; border-width: 2.5px; }
.chip { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); border: 2.5px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px; background: var(--paper-2); min-height: 44px; }
.chip-stars { flex: none; background: var(--star); color: var(--on-star); padding: 3px 13px 3px 9px; font-family: var(--f-display); font-size: 1.1rem; gap: 6px; font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 var(--line); }
.chip-stars .star-ico { width: 24px; height: 24px; }
.chip-stars .star-ico .fill { fill: var(--star-pale); }
body[data-view="player"] .topbar { display: none; }

/* ---------------- bottom dock ---------------- */
.tabbar {
  position: fixed; z-index: 60; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 7px;
  background: var(--paper); border: 3px solid var(--line); border-radius: 26px; box-shadow: 0 6px 0 var(--line);
}
.tabbar a {
  display: grid; justify-items: center; gap: 2px; padding: 6px 4px 5px; border-radius: 18px; text-decoration: none;
  color: var(--muted); font-family: var(--f-display); font-size: .95rem; letter-spacing: .02em; min-height: 56px;
  transition: background .15s ease, color .15s ease;
}
.tab-ico { width: 32px; height: 32px; display: grid; place-items: center; }
.tab-ico svg { width: 32px; height: 32px; }
.tab-ico .avatar { width: 30px; height: 30px; border-width: 2.5px; }
.tabbar a:hover { color: var(--ink); }
.tabbar a[aria-current="page"] { background: var(--line); color: var(--star); }
.tabbar a[aria-current="page"] .tab-ico { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
.tabbar a[aria-current="page"] .avatar { border-color: var(--star); }
body[data-view="player"] .tabbar { display: none; }

/* ---------------- lessons: map ---------------- */
.map-head { padding: 6px 2px 16px; }
.map-head h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.map-head p { color: var(--muted); font-weight: 700; margin-top: 4px; }
.continue {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; margin-bottom: 26px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); box-shadow: var(--shadow);
}
.continue-ico { width: 58px; height: 58px; border-radius: 16px; border: 3px solid var(--line); background: color-mix(in srgb, var(--st, var(--star)) 25%, var(--paper)); display: grid; place-items: center; }
.continue-ico svg { width: 38px; height: 38px; }
.continue-txt { display: grid; min-width: 0; }
.continue-txt small { color: var(--muted); font-weight: 700; font-size: .85rem; }
.continue-txt b { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.continue:hover .btn { transform: translateY(-1px); }
@media (max-width: 480px) { .continue { grid-template-columns: auto minmax(0, 1fr); } .continue .btn { grid-column: 1 / -1; } }

.stage { margin-bottom: 26px; border: 3px solid var(--line); border-radius: var(--r-big); overflow: hidden; box-shadow: var(--shadow); background: color-mix(in srgb, var(--st) 12%, var(--paper)); }
.stage-banner { position: relative; padding: 14px 112px 16px 18px; background: var(--st); color: var(--on-color); border-bottom: 3px solid var(--line); display: grid; gap: 2px; }
.stage-num { font-family: var(--f-display); font-size: .95rem; background: rgba(0, 0, 0, .28); padding: 2px 11px; border-radius: 999px; width: fit-content; }
.stage-banner h2 { font-size: clamp(1.6rem, 4.6vw, 2.1rem); -webkit-text-stroke: 1.5px var(--line); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--line); margin-top: 4px; }
.stage-banner p { font-weight: 700; font-size: .98rem; }
.stage-meta { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-size: 1rem; background: rgba(0, 0, 0, .28); padding: 3px 11px; border-radius: 999px; }
.stage-meta .star-ico { width: 20px; height: 20px; }
.cleared { background: var(--star); color: var(--on-star); border-radius: 999px; padding: 0 8px; margin-left: 4px; }
.stage.is-soon .track { opacity: .78; }

.track { position: relative; width: 100%; }
.track-svg { position: absolute; inset: 0; overflow: visible; }
.trail-bg { fill: none; stroke: color-mix(in srgb, var(--line) 30%, transparent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1 15; }
.trail-done { fill: none; stroke: var(--st); stroke-width: 9; stroke-linecap: round; opacity: .9; }
.prop { position: absolute; width: 64px; height: 64px; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)); opacity: .9; pointer-events: none; }
.prop svg { width: 100%; height: 100%; }
@media (max-width: 700px) { .prop { display: none; } }

.node { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; text-decoration: none; color: var(--ink); cursor: pointer; z-index: 2; }
.node:focus-visible { outline: none; }
.node:focus-visible .node-disc { outline: 4px solid var(--focus); outline-offset: 4px; }
.node-disc {
  position: absolute; left: -38px; top: -38px; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: var(--st); border: 3.5px solid var(--line); box-shadow: 0 6px 0 var(--line);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), box-shadow .15s ease;
}
.node-disc > svg { width: 44px; height: 44px; }
.node-label { position: absolute; left: 0; top: 48px; transform: translateX(-50%); width: max-content; max-width: 172px; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 5px 11px 6px; background: var(--paper); border: 2.5px solid var(--line); border-radius: 12px; box-shadow: 0 3px 0 var(--line); }
.node-label b { font-family: var(--f-display); font-weight: 400; font-size: 1rem; line-height: 1.1; }
.node-stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.node-stars .star-ico { width: 16px; height: 16px; }
.node-note { font-size: .78rem; font-weight: 700; color: var(--muted); }
a.node:hover .node-disc { transform: translateY(-4px) rotate(-4deg); box-shadow: 0 10px 0 var(--line); }
a.node:active .node-disc { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.node.done .node-disc { background: var(--star); }
.node.current .node-disc { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 0 var(--line), 0 0 0 0 color-mix(in srgb, var(--st) 55%, transparent); } 50% { box-shadow: 0 6px 0 var(--line), 0 0 0 14px color-mix(in srgb, var(--st) 0%, transparent); } }
.node.locked .node-disc { background: var(--paper-2); box-shadow: 0 6px 0 color-mix(in srgb, var(--line) 45%, var(--paper)); border-color: color-mix(in srgb, var(--line) 70%, var(--paper)); }
.node.soon .node-disc { background: var(--paper); border-style: dashed; border-color: color-mix(in srgb, var(--line) 55%, var(--paper)); box-shadow: none; }
.node.locked .node-disc > svg, .node.soon .node-disc > svg { filter: grayscale(1); opacity: .45; }
.node.soon .node-label b, .node.locked .node-label b { color: var(--muted); }
.node.soon .node-label, .node.locked .node-label { box-shadow: none; border-color: color-mix(in srgb, var(--line) 35%, transparent); }
.node-lock { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--line); display: grid; place-items: center; color: var(--muted); filter: none; }
.node-lock svg { width: 18px; height: 18px; }
.node.boss .node-disc { left: -48px; top: -48px; width: 96px; height: 96px; border-radius: 30px; }
.node.boss .node-disc > svg { width: 58px; height: 58px; }
.node.boss .node-label { top: 60px; }
.node.boss.done .node-disc, .node.boss.current .node-disc { background: var(--st); }
.node.boss.done .node-disc { background: var(--star); }
.node-start {
  position: absolute; left: -52px; top: 0; transform: translate(-100%, -50%); white-space: nowrap; z-index: 3;
  font-family: var(--f-display); font-size: 1.05rem; color: var(--st); background: var(--paper);
  border: 3px solid var(--line); border-radius: 14px; padding: 5px 13px; box-shadow: 0 4px 0 var(--line); animation: nudge 1.6s ease-in-out infinite;
}
.node-start::after { content: ""; position: absolute; top: 50%; right: -10px; width: 14px; height: 14px; background: var(--paper); border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); transform: translateY(-50%) rotate(-45deg); }
.node.flip .node-start { left: 52px; transform: translate(0, -50%); }
.node.flip .node-start::after { right: auto; left: -10px; transform: translateY(-50%) rotate(135deg); }
.node.boss .node-start { left: -62px; }
.node.boss.flip .node-start { left: 62px; }
@keyframes nudge { 50% { translate: -6px 0; } }
.node.flip .node-start { animation-name: nudgeR; }
@keyframes nudgeR { 50% { translate: 6px 0; } }
.node-me { position: absolute; left: 44px; top: -24px; }
.node.flip .node-me { left: -92px; }
.node.boss .node-me { left: 54px; }
.node.boss.flip .node-me { left: -102px; }
.node-me .avatar { width: 44px; height: 44px; box-shadow: 0 3px 0 var(--line); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(4deg); } }

/* ---------------- quizzes tab ---------------- */
.qgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qtile { display: grid; gap: 12px; align-content: start; padding: 16px; background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); box-shadow: var(--shadow); }
.qtile-ico { width: 54px; height: 54px; border-radius: 16px; border: 3px solid var(--line); background: var(--paper-2); display: grid; place-items: center; }
.qtile-ico svg { width: 36px; height: 36px; }
.qtile h2 { font-size: 1.45rem; }
.qtile p { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.qtile .btn { justify-self: start; }
@media (max-width: 520px) { .qgrid { grid-template-columns: 1fr; } }
.section-title { font-size: 1.6rem; margin: 30px 0 12px; }
.section-sub { color: var(--muted); margin: -6px 0 12px; font-size: .95rem; }
.boss-list { display: grid; gap: 10px; }
.boss-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); box-shadow: var(--shadow-sm); }
.boss-ico { width: 52px; height: 52px; border-radius: 15px; border: 3px solid var(--line); background: var(--st); display: grid; place-items: center; color: var(--muted); }
.boss-ico svg { width: 34px; height: 34px; }
.boss-row small { font-weight: 700; color: var(--muted); font-size: .8rem; }
.boss-row h3 { font-size: 1.2rem; }
.boss-row p { font-size: .9rem; color: var(--muted); }
.boss-row.is-locked .boss-ico { background: var(--paper-2); }
.boss-row.is-locked h3 { color: var(--muted); }
@media (max-width: 480px) { .boss-row { grid-template-columns: auto minmax(0, 1fr); } .boss-row .btn { grid-column: 1 / -1; } }

/* ---------------- me tab ---------------- */
.me-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; padding: 20px; background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-big); box-shadow: var(--shadow); }
.me-av { position: relative; }
.me-av .lvl-badge { min-width: 36px; height: 36px; font-size: 1.15rem; right: -6px; bottom: -4px; border-width: 3px; }
.me-main { display: grid; gap: 6px; min-width: 0; }
.me-name { font-family: var(--f-display); font-size: 1.8rem; border: 0; border-bottom: 3px dashed color-mix(in srgb, var(--line) 35%, transparent); background: none; padding: 0 0 2px; width: 100%; max-width: 16ch; border-radius: 0; }
.me-name:focus-visible { outline: none; border-bottom-color: var(--focus); }
.me-title { font-weight: 700; color: var(--xp); font-size: 1.05rem; }
.me-sub { font-size: .88rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .me-card { grid-template-columns: 1fr; justify-items: start; } }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stats div { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r-small); padding: 10px 8px; text-align: center; display: grid; }
.stats b { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats b small { font-size: .9rem; color: var(--muted); }
.stats span { font-size: .78rem; font-weight: 700; color: var(--muted); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats div:first-child { grid-column: 1 / -1; } }
.chars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.char { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); cursor: pointer; box-shadow: 0 4px 0 var(--line); transition: transform .12s ease; }
.char .avatar { width: 64px; height: 64px; }
.char b { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; line-height: 1.1; }
.char small { font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.15; text-align: center; }
.char:hover { transform: translateY(-3px); }
.char[aria-checked="true"] { background: var(--star); color: var(--on-star); }
.char[aria-checked="true"] small { color: var(--on-star); }
@media (max-width: 560px) { .chars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 12px; }
.badge { display: grid; justify-items: center; gap: 6px; text-align: center; font-weight: 700; font-size: .82rem; line-height: 1.2; color: var(--muted); }
.badge-disc { width: 70px; height: 70px; border-radius: 50%; border: 3px dashed color-mix(in srgb, var(--line) 45%, transparent); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.6rem; color: var(--muted); background: var(--paper-2); }
.badge-disc svg { width: 42px; height: 42px; }
.badge.got { color: var(--ink); }
.badge.got .badge-disc, .badge-disc.big { background: var(--st); border: 3.5px solid var(--line); box-shadow: 0 0 0 4px var(--star), 0 0 0 7px var(--line); }
.badge-disc.big { width: 110px; height: 110px; margin-bottom: 6px; }
.badge-disc.big svg { width: 66px; height: 66px; }
@media (max-width: 480px) { .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.missions label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--paper); border: 2.5px solid var(--line); border-left: 10px solid var(--st); border-radius: var(--r-mid); cursor: pointer; }
.missions input { width: 26px; height: 26px; accent-color: var(--fun); margin: 0; }
.missions b { display: block; }
.missions small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.missions em { font-style: normal; font-family: var(--f-display); color: var(--xp); white-space: nowrap; }
.missions svg { width: 22px; height: 22px; color: var(--muted); }
.missions .is-locked label { cursor: not-allowed; border-left-color: color-mix(in srgb, var(--line) 25%, transparent); }
.missions .is-locked b { color: var(--muted); }
.missions input:checked + span b { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--fun); }
.danger { margin-top: 34px; padding-top: 18px; border-top: 3px dashed color-mix(in srgb, var(--line) 30%, transparent); }
.confirm-text { font-weight: 700; margin-bottom: 10px; }

/* ---------------- player (lessons + quizzes) ---------------- */
.player { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; max-width: 760px; margin-inline: auto; padding-inline: 16px; }
.p-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.p-top::before, .p-foot::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); background: var(--sky); z-index: -1; }
.p-top::before { border-bottom: 3px solid color-mix(in srgb, var(--line) 18%, transparent); }
.p-foot::before { border-top: 3px solid color-mix(in srgb, var(--line) 18%, transparent); }
.p-x { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.p-x svg { width: 28px; height: 28px; }
.p-x:hover { color: var(--ink); background: var(--paper); }
.p-bar { flex: 1; height: 20px; border: 3px solid var(--line); border-radius: 999px; background: var(--paper); overflow: hidden; }
.p-bar i { display: block; height: 100%; background: var(--star); border-right: 3px solid var(--line); transition: width .4s cubic-bezier(.3, 1.3, .5, 1); }
.p-bar i[style*="width:0.0%"] { border-right: 0; }
.p-gain { min-width: 64px; text-align: right; font-family: var(--f-display); color: var(--xp); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.p-body { padding-block: 14px 18px; }
.p-foot {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}
.p-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.p-foot .btn-star { min-width: 150px; }

.card { background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-big); box-shadow: 0 6px 0 var(--line); overflow: hidden; }
.card.enter { animation: cardIn .38s cubic-bezier(.3, 1.3, .5, 1); }
.card.enter-back { animation: cardBack .38s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes cardIn { from { transform: translateX(34px) rotate(1deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cardBack { from { transform: translateX(-34px) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }
.card-art { border-bottom: 3px solid var(--line); background: color-mix(in srgb, var(--st) 18%, var(--paper)); }
.card-art svg.scene-svg { display: block; width: 100%; height: auto; }
.sticker-art {
  display: flex; justify-content: center; align-items: center; gap: clamp(10px, 4vw, 34px); padding: 26px 16px; min-height: 170px;
  background-image: linear-gradient(color-mix(in srgb, var(--st) 22%, transparent) 1.5px, transparent 1.5px), linear-gradient(90deg, color-mix(in srgb, var(--st) 22%, transparent) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}
.sa-ico { width: clamp(70px, 18vw, 112px); aspect-ratio: 1; border-radius: 26px; border: 3.5px solid var(--line); background: var(--sticker); display: grid; place-items: center; box-shadow: 0 6px 0 var(--line); transform: rotate(var(--r)); }
.sa-ico svg { width: 68%; height: 68%; }
.card-text { padding: 22px 24px 24px; display: grid; gap: 14px; }
.card-text.center { justify-items: center; text-align: center; }
.card-text h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
.card-body { display: grid; gap: 10px; font-size: 1.1rem; line-height: 1.65; }
.card-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.icon-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 12px; background: var(--paper-2); border: 2.5px solid var(--line); border-radius: var(--r-mid); }
.il-ico { width: 56px; height: 56px; border-radius: 15px; border: 2.5px solid var(--line); background: var(--sticker); display: grid; place-items: center; }
.il-ico svg { width: 38px; height: 38px; }
.icon-list b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; line-height: 1.15; }
.icon-list li span:last-child { font-size: 1rem; line-height: 1.45; }
.check-tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-family: var(--f-display); font-size: .95rem; color: var(--on-color); background: var(--st); border: 2.5px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 6px; }
.check-tag svg { width: 22px; height: 22px; }
.q-big { font-size: clamp(1.5rem, 4.6vw, 2.05rem); line-height: 1.15; }
.opts { display: grid; gap: 10px; }
.opts.tf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 13px 15px; min-height: 62px;
  background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); box-shadow: 0 4px 0 var(--line);
  cursor: pointer; font-weight: 700; font-size: 1.06rem; line-height: 1.35; transition: transform .08s ease, box-shadow .08s ease;
}
.opt:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--line); }
.opt:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.opts.tf .opt { justify-content: center; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; min-height: 84px; }
.opt .key { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 2.5px solid var(--line); display: grid; place-items: center; font-family: var(--f-display); font-size: 1rem; background: var(--paper-2); }
.opt[disabled] { cursor: default; }
.opt.is-right { background: var(--fun); color: var(--on-color); animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
.opt.is-wrong { background: var(--chaos); color: var(--on-color); animation: shake .4s; }
.opt.is-right .key, .opt.is-wrong .key { background: var(--sticker); color: var(--sticker-ink); }
.opt.is-faded { opacity: .45; box-shadow: none; }
.check-why { display: grid; gap: 14px; }
.check-why:empty { display: none; }
.q-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; font-weight: 700; color: var(--muted); font-size: .9rem; }
.q-type { font-family: var(--f-display); font-size: .9rem; color: var(--on-color); background: var(--order); border: 2px solid var(--line); border-radius: 999px; padding: 2px 11px; }
.q-type.tf { background: var(--xp); }
.q-next { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.q-gain { font-family: var(--f-display); font-size: 1.15rem; color: var(--xp); }
.pips { flex: 1; display: flex; gap: 6px; align-items: center; }
.pip { flex: 1; height: 16px; border-radius: 999px; border: 2.5px solid var(--line); background: var(--paper); transition: background .25s ease; }
.pip.now { background: var(--star); }
.pip.ok { background: var(--fun); }
.pip.no { background: var(--chaos); }
.streak { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-display); font-size: 1.05rem; padding: 4px 11px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--paper); font-variant-numeric: tabular-nums; }
.streak svg { width: 18px; height: 18px; }
.streak.hot { background: var(--star); color: var(--on-star); animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
.done-art { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 26px 16px 8px; }
.done-art .star-ico { width: 44px; height: 44px; animation: pop .6s cubic-bezier(.3, 1.7, .5, 1) backwards; }
.done-art .star-ico:nth-child(3) { animation-delay: .12s; } .done-art .star-ico:nth-child(4) { animation-delay: .24s; }
.done-art.small { padding: 0; }
.done-art.small .star-ico { width: 30px; height: 30px; animation: none; }
.boss-big { width: 120px; height: 120px; border-radius: 34px; border: 4px solid var(--line); background: var(--st); display: grid; place-items: center; box-shadow: 0 6px 0 var(--line); }
.boss-big svg { width: 78px; height: 78px; }
.done-sub { color: var(--muted); font-weight: 700; font-size: 1.05rem; }
.done-hint { font-size: .92rem; color: var(--muted); }
.done-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.done-stats div { min-width: 104px; border: 2.5px solid var(--line); border-radius: var(--r-small); padding: 8px 14px; background: var(--paper-2); display: grid; }
.done-stats b { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.done-stats span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.qr-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qr-rules span { font-weight: 700; font-size: .85rem; border: 2px solid var(--line); border-radius: 999px; padding: 3px 11px; background: var(--paper-2); }

/* ---------------- widgets ---------------- */
.widget-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.star-slot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.star-slot .star-ico { width: 30px; height: 30px; }
.star-slot.got .star-ico { animation: pop .6s cubic-bezier(.3, 1.7, .5, 1); }
.widget { display: grid; gap: 14px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.calc-in { display: grid; gap: 14px; }
.calc-in label { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .95rem; }
.calc-in output { font-family: var(--f-display); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.calc-in input[type="range"] { width: 100%; accent-color: var(--order); height: 30px; }
.calc-in small { color: var(--muted); font-size: .82rem; }
.calc-out { padding: 16px; border: 3px solid var(--line); border-radius: var(--r-mid); background: var(--paper-2); display: grid; gap: 8px; }
.calc-line { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; font-size: .95rem; }
.calc-line b { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; }
.calc-big { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.goal { font-weight: 700; padding: 8px 12px; border-radius: var(--r-small); border: 2.5px solid var(--line); background: var(--paper); font-size: .95rem; }
.goal.hit { background: var(--fun); color: var(--on-color); }
@media (max-width: 620px) { .calc { grid-template-columns: 1fr; } }
.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.match-card { border: 2.5px solid var(--line); border-radius: var(--r-mid); padding: 12px; background: var(--paper-2); display: grid; gap: 8px; }
.match-card header { display: flex; align-items: center; gap: 10px; }
.match-card .avatar { width: 42px; height: 42px; border-radius: 12px; }
.match-card h3 { font-size: 1.2rem; }
.choice-label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.chips { flex-wrap: wrap; }
.match .chips { display: flex; gap: 6px; margin: 0; }
.chip { cursor: default; }
.match .chip { cursor: pointer; min-height: 38px; padding: 4px 12px; font-weight: 700; font-size: .9rem; background: var(--paper); }
.match .chip[aria-pressed="true"] { background: var(--line); color: var(--paper); }
.match .chip.right { background: var(--fun); color: var(--on-color); }
.match .chip.wrong { background: var(--chaos); color: var(--on-color); }
.match-out { display: grid; gap: 12px; }
.msg { padding: 10px 14px; border-radius: var(--r-small); border: 2.5px solid var(--line); font-weight: 700; background: var(--chaos-wash); }
@media (max-width: 620px) { .match { grid-template-columns: 1fr; } }

/* ---------------- onboarding ---------------- */
.onboarding { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; overflow-y: auto; background-color: var(--sky);
  background-image: linear-gradient(var(--grid) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px); background-size: 36px 36px; }
.ob-card { width: min(640px, 100%); display: grid; justify-items: center; gap: 16px; text-align: center; padding: 22px; background: var(--paper); border: 3.5px solid var(--line); border-radius: 28px; box-shadow: 0 8px 0 var(--line); }
.ob-card.enter { animation: cardIn .4s cubic-bezier(.3, 1.3, .5, 1); }
.ob-art { width: 100%; border: 3px solid var(--line); border-radius: var(--r-mid); overflow: hidden; }
.ob-art svg { display: block; width: 100%; height: auto; }
.ob-title { font-size: clamp(2rem, 6vw, 2.8rem); }
.ob-text { font-size: 1.15rem; max-width: 34em; }
.ob-card .chars { width: 100%; }
.ob-input { font-family: var(--f-display); font-size: 1.6rem; text-align: center; border: 3px solid var(--line); border-radius: 999px; padding: 10px 18px; width: min(340px, 100%); background: var(--paper-2); box-shadow: inset 0 3px 0 color-mix(in srgb, var(--line) 15%, transparent); }
.ob-me { margin-top: 6px; }
.ob-dots { display: flex; gap: 8px; }
.ob-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--paper-2); }
.ob-dots i.on { background: var(--star); width: 30px; border-radius: 999px; }

/* ---------------- celebrate, toast, +XP ---------------- */
.celebrate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(14, 22, 51, .6); }
.cel-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 8px; text-align: center; width: min(400px, 100%); padding: 30px 28px 26px; background: var(--star); color: var(--on-star); border: 4px solid var(--line); border-radius: 30px; box-shadow: 0 10px 0 var(--line); animation: celIn .55s cubic-bezier(.3, 1.6, .5, 1); }
.cel-card .avatar.xl { animation: spinIn .7s cubic-bezier(.3, 1.6, .5, 1); }
.cel-title { font-family: var(--f-display); font-size: 2.8rem; line-height: 1; color: var(--sticker); -webkit-text-stroke: 3px var(--sticker-ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--sticker-ink); margin-top: 8px; }
.cel-sub { font-weight: 700; font-size: 1.08rem; }
.cel-card .btn { margin-top: 10px; }
@keyframes celIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spinIn { from { transform: rotate(-200deg) scale(.3); } to { transform: none; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -18px; width: 10px; height: 16px; border: 2px solid var(--sticker-ink); border-radius: 3px; animation: confetti 1.9s ease-in forwards; }
@keyframes confetti { to { transform: translateY(470px) rotate(560deg); } }

.toast {
  position: fixed; left: 50%; z-index: 95; bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 30px); opacity: 0; visibility: hidden; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .2s ease, visibility .3s;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(92vw, 480px);
  background: var(--line); color: var(--on-color); border-radius: 999px; padding: 6px 18px 6px 6px; font-weight: 700; font-size: .95rem; box-shadow: 0 5px 0 rgba(0, 0, 0, .25);
}
.toast .avatar { width: 36px; height: 36px; border-color: var(--on-color); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
body[data-view="player"] .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.xp-pop {
  position: fixed; z-index: 99; pointer-events: none; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--f-display); font-size: 1.7rem; color: var(--star); -webkit-text-stroke: 2px var(--sticker-ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--sticker-ink);
  animation: xpup 1.3s ease-out forwards;
}
.xp-pop.bonus { color: var(--xp); font-size: 1.3rem; }
@keyframes xpup { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 18% { opacity: 1; transform: translate(-50%, -90%) scale(1.15); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -280%) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 480px) { .stage-banner { padding-right: 18px; } .stage-meta { position: static; width: fit-content; margin-top: 8px; } }

.stage-meta .star-ico.is-empty .edge { stroke: var(--sticker); }
.stage-meta .star-ico.is-empty .fill { fill: rgba(255, 255, 255, .25); }

.badge-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--sticker); border: 2.5px solid var(--line); display: grid; place-items: center; }
.badge-disc .badge-ico svg { width: 32px; height: 32px; }
.badge-disc.big .badge-ico { width: 76px; height: 76px; border-width: 3px; }
.badge-disc.big .badge-ico svg { width: 50px; height: 50px; }

/* ---------------- mini challenges ---------------- */
.check-tag.challenge { background: var(--line); color: var(--star); }
.code-win { margin: 0; border: 3px solid var(--line); border-radius: var(--r-mid); overflow: hidden; background: var(--code-bg); box-shadow: 0 4px 0 var(--line); }
.code-win figcaption { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--code-bar); color: var(--code-dim); font: 700 .82rem/1 ui-monospace, "Cascadia Code", Consolas, monospace; border-bottom: 2px solid var(--code-rule); }
.code-win figcaption i { width: 10px; height: 10px; border-radius: 50%; background: #ff6159; }
.code-win figcaption i:nth-child(2) { background: #ffbd2e; } .code-win figcaption i:nth-child(3) { background: #28c840; }
.code-win figcaption span { margin-left: 8px; }
.code-win pre { margin: 0; padding: 10px 0; overflow-x: auto; font: .92rem/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--code-text); }
.code-win .ln { display: block; padding-right: 14px; white-space: pre; }
.code-win .ln b { display: inline-block; width: 2.6em; padding-right: .9em; text-align: right; color: var(--code-ln); font-weight: 400; user-select: none; }
.quote-card { margin: 0; border: 3px solid var(--line); border-radius: var(--r-mid); background: var(--paper-2); overflow: hidden; box-shadow: 0 4px 0 var(--line); }
.quote-card figcaption { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-weight: 700; font-size: .88rem; color: var(--muted); border-bottom: 2px dashed color-mix(in srgb, var(--line) 25%, transparent); }
.quote-card figcaption svg { width: 22px; height: 22px; }
.quote-card blockquote { margin: 0; padding: 10px 14px 12px; font-size: 1.06rem; line-height: 1.5; }

/* ---------------- missions by stage ---------------- */
.mission-stages { display: grid; gap: 12px; }
.mission-stage { background: var(--paper); border: 3px solid var(--line); border-radius: var(--r-mid); padding: 12px 14px; border-left: 10px solid var(--st); }
.mission-stage h3 { font-size: 1.15rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mission-stage h3 span { font-family: var(--f-body); font-weight: 700; font-size: .8rem; color: var(--muted); }
.mission-stage .missions { margin-top: 10px; }
.mission-stage .missions label { border-left-width: 2.5px; }
.mission-stage.is-locked { border-left-color: color-mix(in srgb, var(--line) 25%, transparent); }
.mission-stage.is-locked h3 { color: var(--muted); }
.mission-locked { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-weight: 700; font-size: .9rem; }
.mission-locked svg { width: 18px; height: 18px; }
.mission-tool { margin: 6px 0 0 50px; }
.tool-link { font-weight: 700; font-size: .9rem; color: var(--order); }
.partner { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--star); color: var(--on-star); border: 1.5px solid var(--line); text-decoration: none; vertical-align: 1px; }

/* ---------------- studio tools ---------------- */
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tools li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r-mid); }
.tool-ico { width: 48px; height: 48px; border-radius: 14px; border: 2.5px solid var(--line); background: var(--sticker); display: grid; place-items: center; }
.tool-ico svg { width: 32px; height: 32px; }
.tool-txt { display: grid; min-width: 0; }
.tool-txt b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; line-height: 1.15; }
.tool-txt small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.tool-btn { min-height: 40px; padding: .35em .95em; font-size: .95rem; }
.tool-soon { font-size: .78rem; font-weight: 700; color: var(--muted); }
.disclosure { margin-top: 10px; font-size: .85rem; color: var(--muted); }
@media (max-width: 620px) { .tools { grid-template-columns: 1fr; } }

/* looks have no name label */
.chars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .chars { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .char .avatar { width: 54px; height: 54px; } .char b { font-size: .95rem; } }

.mission-preview { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.mission-preview li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.mission-preview svg { width: 18px; height: 18px; flex: none; }
.mission-later { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .9rem; padding: 4px 2px; }
.mission-later svg { width: 18px; height: 18px; }

/* ---------------- open (not started) lessons ---------------- */
.node.open .node-disc { background: color-mix(in srgb, var(--st) 30%, var(--paper)); }
a.node.open:hover .node-disc { background: var(--st); }

/* ---------------- missions grouped per stage ---------------- */
details.mission-stage { padding: 0; }
details.mission-stage summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 14px; }
details.mission-stage summary::-webkit-details-marker { display: none; }
details.mission-stage summary::after { content: "+"; margin-left: auto; font-family: var(--f-display); font-size: 1.3rem; line-height: 1; color: var(--muted); }
details.mission-stage[open] summary::after { content: "\2212"; }
details.mission-stage summary span { font-weight: 700; font-size: .8rem; color: var(--muted); }
details.mission-stage summary b { font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; }
details.mission-stage summary em { font-style: normal; font-weight: 700; font-size: .82rem; color: var(--muted); }
details.mission-stage .missions { margin: 0; padding: 0 14px 14px; }

/* ---------------- parent gate ---------------- */
.gate { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; background: rgba(14, 22, 51, .62); }
.gate-card { width: min(420px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center; padding: 26px 24px; background: var(--paper); border: 4px solid var(--line); border-radius: 28px; box-shadow: 0 8px 0 var(--line); }
.gate-card h2 { font-size: 2rem; }
.gate-note { font-size: .9rem; color: var(--muted); }
.btn.hold { position: relative; overflow: hidden; min-width: 220px; }
.btn.hold i { position: absolute; inset: 0; width: 0; background: rgba(255, 255, 255, .55); }
.btn.hold span { position: relative; }
.btn.hold.holding i { width: 100%; transition: width 2.5s linear; }

/* ---------------- ad slot ---------------- */
.ad-slot { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 18px; padding: 14px 14px 14px 14px; background: var(--paper); border: 2.5px dashed var(--line); border-radius: var(--r-mid); }
.ad-label { position: absolute; top: -11px; left: 14px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; background: var(--line); color: var(--paper); padding: 1px 9px; border-radius: 999px; }
.ad-txt { display: grid; min-width: 0; }
.ad-txt b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; }
.ad-txt small { color: var(--muted); font-size: .85rem; line-height: 1.35; }
@media (max-width: 480px) { .ad-slot { grid-template-columns: 48px minmax(0, 1fr); } .ad-slot .btn { grid-column: 1 / -1; } }

/* ---------------- studio tools: light list ---------------- */
.tools { display: block; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r-mid); overflow: hidden; }
.tools li { display: block; padding: 0; border: 0; border-radius: 0; background: none; }
.tools li + li { border-top: 1.5px solid color-mix(in srgb, var(--line) 15%, transparent); }
.tool-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--ink); text-decoration: none; }
a.tool-row:hover { background: var(--paper-2); }
.tool-row .tool-ico { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--paper-2); }
.tool-row .tool-ico svg { width: 26px; height: 26px; }
.tool-row .tool-txt b { font-family: var(--f-body); font-weight: 700; font-size: .98rem; }
.tool-row .tool-txt small { font-size: .82rem; }
.tool-go { font-size: 1.1rem; color: var(--muted); }
.tool-row.is-soon { opacity: .6; }

/* =====================================================================
   Design pass: hierarchy through restraint.
   Rule 1. The bold comic outline + hard shadow is reserved for things you press or play:
           buttons, lesson nodes, answer options, the lesson card, the bottom dock.
   Rule 2. Everything else is a quiet surface: no outline, soft fill, generous padding.
   Rule 3. Items inside a surface are separated by hairlines, never by more boxes.
   Rule 4. The display face is for headings; labels and numbers use the body face.
   ===================================================================== */
:root { --hair: color-mix(in srgb, var(--line) 12%, transparent); --surface-shadow: 0 1px 2px color-mix(in srgb, var(--line) 10%, transparent); }

/* quiet surfaces */
.me-card, .stats, .qtile, .boss-row, .continue, details.mission-stage, .tools, .stage, .ob-card, .cel-card, .gate-card {
  border: 0; box-shadow: var(--surface-shadow);
}
.me-card { border-radius: var(--r-big); padding: 24px; }
.continue { border-radius: var(--r-big); padding: 14px 16px; }
.continue-ico { border: 0; }
.qtile { border-radius: var(--r-big); padding: 20px; }
.qtile-ico, .boss-ico { border: 0; }
.boss-list { gap: 0; background: var(--paper); border-radius: var(--r-big); box-shadow: var(--surface-shadow); overflow: hidden; }
.boss-row { border-radius: 0; box-shadow: none; background: none; }
.boss-row + .boss-row { border-top: 1.5px solid var(--hair); }
.boss-ico { width: 44px; height: 44px; border-radius: 12px; }
.boss-ico svg { width: 28px; height: 28px; }

/* stats: one strip with dividers instead of five boxes */
.stats { gap: 0; background: var(--paper); border-radius: var(--r-mid); overflow: hidden; }
.stats div { border: 0; border-radius: 0; background: none; padding: 14px 8px; }
.stats div + div { border-left: 1.5px solid var(--hair); }
.stats b { font-family: var(--f-body); font-weight: 700; font-size: 1.4rem; }
@media (max-width: 600px) { .stats div + div { border-left: 0; } .stats div { border-top: 1.5px solid var(--hair); } .stats div:first-child { border-top: 0; } }

/* look picker: avatars only, ring for the chosen one */
.chars { gap: 14px 10px; }
.char { border: 0; background: none; box-shadow: none; padding: 6px 4px; }
.char:hover { transform: none; }
.char:hover .avatar { transform: translateY(-2px); }
.char .avatar { width: 68px; height: 68px; transition: transform .15s ease, box-shadow .15s ease; }
.char[aria-checked="true"] { background: none; color: inherit; }
.char[aria-checked="true"] .avatar { box-shadow: 0 0 0 4px var(--star), 0 0 0 7px var(--line); }
.char b { font-family: var(--f-body); font-weight: 700; font-size: .9rem; }

/* badges: soft, no dashes */
.badge-disc { border: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--hair); }

/* missions: one surface per stage, hairline rows inside */
details.mission-stage { border-left: 0; background: var(--paper); border-radius: var(--r-mid); overflow: hidden; }
details.mission-stage summary { position: relative; padding-left: 22px; }
details.mission-stage summary::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 6px; border-radius: 0 6px 6px 0; background: var(--st); }
details.mission-stage summary b { font-family: var(--f-body); font-weight: 700; font-size: 1rem; }
details.mission-stage .missions { gap: 0; padding: 0; border-top: 1.5px solid var(--hair); }
details.mission-stage .missions li + li { border-top: 1.5px solid var(--hair); }
details.mission-stage .missions label { border: 0; border-radius: 0; background: none; padding: 12px 16px; }
.missions em { font-family: var(--f-body); font-weight: 700; font-size: .85rem; }
.mission-tool { margin: -6px 0 10px 54px; }

/* map: the stage is a tinted field, the nodes carry the outlines */
.stage { border-radius: 28px; overflow: hidden; }
.stage-banner { border-bottom: 0; }
.stage-banner h2 { -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.stage-meta, .stage-num { background: rgba(0, 0, 0, .2); }
.node-label { border-width: 0; box-shadow: var(--surface-shadow); }
.node-label b { font-family: var(--f-body); font-weight: 700; font-size: .92rem; }
.node-start { border-width: 2.5px; box-shadow: 0 3px 0 var(--line); }

/* quieter player chrome */
.card { border-width: 2.5px; box-shadow: 0 5px 0 var(--line); }
.icon-list li { border: 0; background: var(--paper-2); }
.il-ico { border: 0; }
.code-win, .quote-card { box-shadow: none; }
.quote-card { border-width: 2px; }
.done-stats div { border: 0; }
.check-tag { border-width: 2px; }

/* dock and chips: lighter outline, same shape */
.tabbar { border-width: 2.5px; box-shadow: 0 4px 0 var(--line); }
.chip-stars { box-shadow: none; border-width: 2px; }

/* headings: display face only where it earns it */
.section-title { font-size: 1.35rem; margin: 34px 0 12px; }
.me-title, .pc-title { font-family: var(--f-body); font-weight: 700; }

/* ---------------- stage badges ---------------- */
.badges { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; }
.badge { display: grid; justify-items: center; gap: 2px; text-align: center; color: var(--ink); }
.badge-art { width: 84px; display: block; }
.badge-art svg { width: 100%; height: auto; display: block; }
.badge:not(.got) .badge-art { filter: grayscale(1); opacity: .38; }
.badge b { font-weight: 700; font-size: .9rem; line-height: 1.2; margin-top: 4px; }
.badge small { font-size: .74rem; color: var(--muted); line-height: 1.25; }
.badge:not(.got) b { color: var(--muted); }
.badge-art.big { width: 128px; margin-bottom: 6px; }

/* ---------------- badge earned: juice (squash and stretch, impact shake, sparks, shine) ---------------- */
.badge-earn { position: relative; display: inline-grid; place-items: center; }
.badge-earn i { position: absolute; left: 50%; top: 42%; width: 10px; height: 10px; margin: -5px; border-radius: 3px; background: var(--sticker); border: 2px solid var(--sticker-ink); opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); }
.cel-card.juicy .badge-earn i { animation: spark .7s cubic-bezier(.2, .8, .3, 1) forwards; animation-delay: calc(.38s + var(--d)); }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.4); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-86px) scale(1); } }
.cel-card.juicy .badge-art.stamp { animation: stamp .62s cubic-bezier(.25, 1.4, .5, 1) both; }
@keyframes stamp { 0% { transform: scale(2.4) rotate(-18deg); opacity: 0; } 55% { transform: scale(.86, 1.12) rotate(3deg); opacity: 1; } 72% { transform: scale(1.1, .9); } 100% { transform: none; } }
.cel-card.juicy { animation: celIn .55s cubic-bezier(.3, 1.6, .5, 1), impact .28s ease-out .36s; }
@keyframes impact { 25% { transform: translate(-4px, 3px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, 1px); } }
.badge-art.stamp { position: relative; overflow: hidden; border-radius: 50%; }
.badge-art .shine { position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%); transform: translateX(-120%); pointer-events: none; }
.cel-card.juicy .badge-art .shine { animation: shine .9s ease-in-out .7s forwards; }
@keyframes shine { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .badge-earn i, .badge-art .shine { display: none; } }

/* ---------------- about page + me footer ---------------- */
.about section { background: var(--paper); border-radius: var(--r-big); box-shadow: var(--surface-shadow); padding: 18px 20px; margin-bottom: 14px; }
.about h2 { font-size: 1.3rem; margin-bottom: 8px; }
.about ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.about p { max-width: 62ch; }
.me-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: .9rem; color: var(--muted); font-weight: 700; }
.me-foot a { color: var(--order); }
.danger { border-top: 1.5px solid var(--hair); }
.me-name { border-bottom: 2px solid transparent; }
.me-name:hover { border-bottom-color: var(--hair); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 10px; }
.badge { width: 128px; }

/* =====================================================================
   Lighter pass: thin soft strokes, soft shadows, tinted panels,
   display face only for page and lesson titles.
   ===================================================================== */
:root {
  --sky: #eef6ff; --grid: #e2eefb;
  --stroke: color-mix(in srgb, var(--line) 18%, transparent);
  --stroke-strong: color-mix(in srgb, var(--line) 55%, transparent);
  --soft: 0 1px 2px rgba(29, 43, 83, .06), 0 4px 14px rgba(29, 43, 83, .06);
  --press: 0 2px 0 color-mix(in srgb, var(--line) 22%, transparent);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sky: #0f1733; --grid: #141e40; --soft: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); } }
:root[data-theme="dark"] { --sky: #0f1733; --grid: #141e40; --soft: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); }
body { background-size: 40px 40px; }

/* type: display face only for page titles and lesson titles */
.map-head h1, .ob-title, .card-text h2, .q-big, .cel-title { letter-spacing: .005em; }
.map-head h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.qtile h2, .boss-row h3, .section-title, .stage-banner h2, .continue-txt b, .gate-card h2, .about h2, .tool-txt b, .lu-big { font-family: var(--f-body); font-weight: 700; }
.section-title { font-size: 1.15rem; }
.stage-banner h2 { font-size: 1.35rem; text-shadow: none; }
.card-text h2 { font-size: clamp(1.5rem, 4.2vw, 2rem); }
.q-big { font-size: clamp(1.35rem, 4vw, 1.75rem); }

/* buttons: thin stroke, small tactile drop */
.btn { border-width: 2px; border-color: var(--stroke-strong); box-shadow: var(--press); font-family: var(--f-body); font-weight: 700; font-size: 1rem; }
.btn:hover { box-shadow: 0 3px 0 color-mix(in srgb, var(--line) 22%, transparent); }
.btn:active { box-shadow: none; }
.btn-star { border-color: color-mix(in srgb, var(--star-deep) 60%, transparent); }
.btn-blue, .btn-red { border-color: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { box-shadow: none; }

/* top bar + chips */
.topbar { border-bottom: 1px solid var(--stroke); box-shadow: none; }
.chip-av .avatar { border-width: 2px; box-shadow: none; }
.lvl-badge { border-width: 2px; }
.xpbar { border: 0; background: color-mix(in srgb, var(--line) 10%, transparent); }
.hud-xp .xpbar { height: 10px; }
.chip-stars { border: 0; box-shadow: none; }

/* bottom dock */
.tabbar { border: 1px solid var(--stroke); box-shadow: 0 8px 28px rgba(29, 43, 83, .14); border-radius: 22px; }
.tabbar a { font-family: var(--f-body); font-weight: 700; font-size: .85rem; }
.tabbar a[aria-current="page"] { background: color-mix(in srgb, var(--star) 28%, var(--paper)); color: var(--ink); }
.tabbar a[aria-current="page"] .avatar { border-color: var(--line); }
.tab-ico .avatar { border-width: 2px; }

/* avatars */
.avatar { border-width: 2px; }
.avatar.xl { border-width: 3px; box-shadow: var(--soft); }
.char[aria-checked="true"] .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--star); }

/* surfaces get soft shadows */
.me-card, .stats, .qtile, .boss-list, .continue, details.mission-stage, .tools, .about section, .ob-card, .gate-card { box-shadow: var(--soft); }
.cel-card { border: 0; box-shadow: var(--soft); }

/* map: tinted stage panels, lighter nodes */
.stage { background: color-mix(in srgb, var(--st) 7%, var(--paper)); box-shadow: var(--soft); }
.stage-banner { background: color-mix(in srgb, var(--st) 14%, var(--paper)); color: var(--ink); padding-block: 16px; }
.stage-banner p { color: var(--muted); font-size: .92rem; }
.stage-num { background: var(--st); color: var(--on-color); }
.stage-meta { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--stroke); }
.stage-meta .star-ico.is-empty .edge { stroke: color-mix(in srgb, var(--muted) 70%, transparent); }
.stage-meta .star-ico.is-empty .fill { fill: transparent; }
.cleared { background: var(--star); }
.trail-bg { stroke: color-mix(in srgb, var(--line) 18%, transparent); stroke-width: 6; }
.trail-done { stroke-width: 7; opacity: .7; }
.node-disc { border-width: 2.5px; border-color: var(--stroke-strong); box-shadow: 0 4px 0 color-mix(in srgb, var(--line) 18%, transparent); }
a.node:hover .node-disc { box-shadow: 0 7px 0 color-mix(in srgb, var(--line) 18%, transparent); }
.node.done .node-disc { border-color: color-mix(in srgb, var(--star-deep) 70%, transparent); }
.node-start { border-width: 1.5px; border-color: var(--stroke-strong); box-shadow: var(--soft); }
.node-start::after { border-width: 1.5px; border-color: var(--stroke-strong); }
.node-me .avatar { box-shadow: var(--soft); }

/* lesson player */
.card { border: 0; box-shadow: var(--soft); }
.card-art { border-bottom: 1px solid var(--stroke); }
.p-bar { border: 0; background: color-mix(in srgb, var(--line) 10%, transparent); height: 14px; }
.p-bar i { border-right: 0; border-radius: 999px; }
.p-top::before { border-bottom: 1px solid var(--stroke); }
.p-foot::before { border-top: 1px solid var(--stroke); }
.check-tag { border: 0; padding: 4px 12px 4px 8px; }
.check-tag.challenge { background: color-mix(in srgb, var(--line) 88%, transparent); }
.opt { border: 1.5px solid var(--stroke-strong); box-shadow: none; }
.opt:hover:not([disabled]) { border-color: var(--line); box-shadow: var(--press); transform: translateY(-1px); }
.opt:active:not([disabled]) { box-shadow: none; transform: none; }
.opt .key { border-width: 1.5px; border-color: var(--stroke-strong); }
.opt.is-right, .opt.is-wrong { border-color: transparent; }
.bubble { border: 0; box-shadow: var(--soft); background: var(--paper); }
.bubble::before { border: 0; box-shadow: -2px 2px 3px rgba(29, 43, 83, .05); }
.bolt .avatar { box-shadow: none; }
.icon-list li { background: color-mix(in srgb, var(--st) 7%, var(--paper)); }
.sa-ico { border-width: 2px; border-color: var(--stroke-strong); box-shadow: var(--soft); }
.code-win { border: 0; box-shadow: var(--soft); }
.quote-card { border: 0; box-shadow: inset 0 0 0 1px var(--stroke); }
.pip { border: 0; background: color-mix(in srgb, var(--line) 10%, transparent); height: 12px; }
.streak { border: 0; background: var(--paper); box-shadow: var(--soft); }
.done-stats div, .qr-rules span { background: color-mix(in srgb, var(--line) 5%, var(--paper)); border: 0; }
.boss-big { border-width: 2.5px; border-color: var(--stroke-strong); box-shadow: var(--soft); }

/* toasts and gate */
.toast { box-shadow: var(--soft); }
.ad-slot { border: 1px dashed var(--stroke-strong); }

/* ---------------- bottom nav: a plain light bar ---------------- */
.tabbar {
  left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-width: none;
  border: 0; border-top: 1px solid var(--stroke); border-radius: 0; box-shadow: none;
  background: var(--paper);
  padding: 6px max(12px, calc(50% - 220px)) calc(6px + env(safe-area-inset-bottom, 0px)); gap: 0;
}
.tabbar a { min-height: 50px; padding: 4px; gap: 1px; border-radius: 0; background: none; color: var(--muted); font-size: .75rem; position: relative; }
.tabbar a:hover { color: var(--ink); background: none; }
.tab-ico, .tab-ico svg { width: 24px; height: 24px; }
.tab-ico .avatar { width: 24px; height: 24px; border-width: 1.5px; }
.tabbar a[aria-current="page"] { background: none; color: var(--ink); }
.tabbar a[aria-current="page"] .tab-ico { animation: none; color: var(--order); }
.tabbar a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--order); }
.tabbar a[aria-current="page"] .avatar { border-color: var(--order); }
main { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.toast.update { padding-right: 6px; }
.toast .btn { min-height: 40px; padding: .4em 1.1em; font-size: .95rem; }

/* ---------------- transit-line map ---------------- */
.line { background: var(--paper); border-radius: 20px; box-shadow: var(--soft); margin-bottom: 18px; overflow: hidden; }
.line-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px 10px; }
.line-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--st); color: var(--on-color); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.line-title h2 { font-family: var(--f-body); font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.line-title p { color: var(--muted); font-size: .88rem; line-height: 1.4; margin-top: 2px; }
.line-meta { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stations { list-style: none; margin: 0; padding: 4px 0 10px; position: relative; }
.stations::before { content: ""; position: absolute; left: 35px; top: 0; bottom: 22px; width: 4px; margin-left: -2px; border-radius: 4px; background: var(--st); opacity: .9; }
.station > a, .station.soon { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 9px 18px; color: var(--ink); text-decoration: none; }
.station > a:hover { background: color-mix(in srgb, var(--st) 7%, transparent); }
.stop { position: relative; z-index: 1; width: 18px; height: 18px; justify-self: center; border-radius: 50%; background: var(--paper); border: 3px solid var(--st); display: grid; place-items: center; }
.stop svg { width: 12px; height: 12px; }
.station.done .stop { background: var(--st); }
.station.boss .stop { width: 22px; height: 22px; border-radius: 6px; border-width: 3px; }
.station.boss.done .stop { background: var(--st); }
.station.current .stop { width: 34px; height: 34px; border: 0; background: none; }
.station.current .stop .avatar { width: 34px; height: 34px; border: 2px solid var(--paper); box-shadow: 0 0 0 3px var(--st); }
.st-txt { display: grid; min-width: 0; }
.st-txt b { font-weight: 700; font-size: .98rem; line-height: 1.3; }
.st-txt small { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.station.current .st-txt small { color: var(--st); font-weight: 700; filter: brightness(.8); }
.station.boss .st-txt b { font-weight: 700; }
.st-go { color: color-mix(in srgb, var(--muted) 70%, transparent); width: 16px; height: 16px; }
.st-go svg { width: 16px; height: 16px; display: block; }
.station.soon { opacity: .55; }
.station.soon .stop { border-style: dashed; }
.continue small { font-weight: 700; }
@media (max-width: 480px) { .line-head { grid-template-columns: auto minmax(0, 1fr); } .line-meta { grid-column: 2; } }

/* ---------------- stage tabs (navy band) ---------------- */
.stabs { background: var(--line); }
:root[data-theme="dark"] .stabs { background: #070c22; }
.stabs-in { max-width: var(--col); margin-inline: auto; display: flex; gap: 6px; overflow-x: auto; padding: 10px 18px 0; scrollbar-width: none; }
.stabs-in::-webkit-scrollbar { display: none; }
.stab { flex: none; width: 62px; display: grid; justify-items: center; gap: 0; padding: 7px 0 8px; border: 0; border-radius: 14px 14px 0 0; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #dfe7ff; font-family: var(--f-body); position: relative; }
.stab small { font-size: .66rem; font-weight: 700; opacity: .8; }
.stab b { font-size: 1.4rem; line-height: 1.05; font-weight: 800; }
.stab em { font-style: normal; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.stab::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 3px; border-radius: 0 0 3px 3px; background: var(--st); }
.stab:hover { background: rgba(255, 255, 255, .18); }
.stab.on { background: var(--sky); color: var(--ink); }
.stab.cleared em::after { content: " \2713"; }

/* ---------------- stage card (team + title) ---------------- */
.world-col { padding-top: 16px; }
.stage-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 14px;
  background: var(--paper); border-radius: 18px; box-shadow: var(--soft); }
.team { display: flex; }
.team .avatar { width: 40px; height: 40px; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--stroke); }
.team .avatar + .avatar { margin-left: -10px; }
.stage-card-txt { display: grid; min-width: 0; }
.stage-card-txt small { font-weight: 700; font-size: .75rem; color: var(--st); filter: brightness(.85); }
.stage-card-txt b { font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.stage-card-txt span { font-size: .85rem; color: var(--muted); line-height: 1.4; }
@media (max-width: 440px) { .team .avatar { width: 32px; height: 32px; } }

/* ---------------- the world ---------------- */
.world { position: relative; width: 100%; max-width: 560px; margin: 0 auto; border-radius: 24px; overflow: hidden; box-shadow: var(--soft); }
.world-svg { display: block; width: 100%; height: 100%; }
.wnode { position: absolute; width: 0; height: 0; text-decoration: none; color: var(--ink); z-index: 2; }
.wn-disc { position: absolute; left: -29px; top: -29px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sticker); border: 5px solid var(--st); box-shadow: 0 0 0 2.5px var(--sticker-ink), 0 4px 0 2.5px rgba(29, 43, 83, .25);
  font-weight: 800; font-size: 1.25rem; color: var(--sticker-ink); transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.wn-disc svg { width: 24px; height: 24px; }
.wnode.done .wn-disc { background: var(--st); }
.wnode.boss .wn-disc { border-radius: 18px; }
.wnode.boss .wn-disc svg { width: 32px; height: 32px; }
.wnode.boss.done .wn-disc svg { width: 24px; height: 24px; }
.wnode.current .wn-disc { animation: glow 1.8s ease-in-out infinite; }
.wnode:hover .wn-disc { transform: translateY(-3px) scale(1.04); }
.wnode:focus-visible { outline: none; }
.wnode:focus-visible .wn-disc { outline: 3px solid var(--focus); outline-offset: 4px; }
.wn-label { position: absolute; left: 0; top: 40px; transform: translateX(-50%); width: max-content; max-width: 210px; display: grid; justify-items: center; text-align: center;
  padding: 7px 14px 8px; background: var(--sticker); border-radius: 14px; box-shadow: 0 0 0 1.5px rgba(29, 43, 83, .18), 0 6px 16px rgba(29, 43, 83, .1); color: var(--sticker-ink); }
.wn-label b { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.wn-label small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.wnode.current .wn-label small { color: var(--chaos); font-weight: 700; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 2.5px var(--sticker-ink), 0 4px 0 2.5px rgba(29, 43, 83, .25), 0 0 0 0 color-mix(in srgb, var(--st) 60%, transparent); } 50% { box-shadow: 0 0 0 2.5px var(--sticker-ink), 0 4px 0 2.5px rgba(29, 43, 83, .25), 0 0 0 14px color-mix(in srgb, var(--st) 0%, transparent); } }

/* the player's pawn: avatar on a board-game base */
.pawn { position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; }
.pawn .avatar { position: absolute; left: -22px; top: -50px; width: 44px; height: 44px; border: 2.5px solid var(--sticker-ink); animation: bob 2.4s ease-in-out infinite; }
.pawn i { position: absolute; left: -16px; top: -6px; width: 32px; height: 12px; border-radius: 50%; background: var(--sticker-ink); box-shadow: 0 4px 0 rgba(29, 43, 83, .18); }
.pawn i::before { content: ""; position: absolute; left: 10px; top: -10px; width: 12px; height: 12px; background: var(--sticker-ink); border-radius: 3px 3px 0 0; }

.next-stage { display: flex; margin: 18px auto 0; }

/* stage tabs: icon + short name instead of a number */
.stab { width: 78px; padding: 8px 4px 8px; gap: 3px; }
.stab-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--sticker); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--st); }
.stab-ico svg { width: 24px; height: 24px; }
.stab b { font-size: .74rem; font-weight: 700; line-height: 1.15; text-align: center; }
.stab em { font-size: .68rem; opacity: .75; }
.stab.on .stab-ico { box-shadow: 0 0 0 2px var(--st), 0 2px 6px rgba(29, 43, 83, .15); }
.stab { padding-bottom: 10px; }
.stab.cleared em::after { content: none; }
.stab-ico { position: relative; }
.stab.cleared .stab-ico::after { content: "\2713"; position: absolute; right: -4px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--fun); color: var(--on-color); font-size: .62rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--line); }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats div:first-child { grid-column: auto; } .stats div + div { border-left: 1.5px solid var(--hair); border-top: 0; } .stats div { border-top: 0; } }

/* gentle ambient motion in the stage worlds (off for reduced motion) */
.world-svg .drift { animation: drift 38s ease-in-out infinite alternate; }
.world-svg .drift.slow { animation-duration: 52s; }
.world-svg .bob { animation: floaty 4s ease-in-out infinite; transform-box: fill-box; }
.world-svg .twinkle { animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drift { to { transform: translateX(26px); } }
@keyframes floaty { 50% { transform: translateY(-5px); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8); } }
/* superintelligent-D7: every stage's world moves as its things would; slow, small, out of phase (art.js sets each
   delay). Elements that carry an SVG transform attribute are wrapped, since a CSS transform replaces it. */
.world-svg :is(.sway, .swing, .wave, .beat, .spinx, .nod, .rumble, .puff, .crawl, .flap, .thump, .rise) { transform-box: fill-box; }
.world-svg .sway { transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite; }
.world-svg .swing { transform-origin: 50% 0; animation: swing 3.6s ease-in-out infinite; }
.world-svg .wave { transform-origin: 0 50%; animation: wave 1.8s ease-in-out infinite; }
.world-svg .beat { transform-origin: 50% 60%; animation: beat 1.6s ease-in-out infinite; }
.world-svg .spinx { transform-origin: 50% 50%; animation: spinx 4.4s ease-in-out infinite; }
.world-svg .nod { transform-origin: 50% 100%; animation: nod 6s ease-in-out infinite; }
.world-svg .rumble { transform-origin: 50% 100%; animation: rumble 2.2s ease-in-out infinite; }
.world-svg .puff { transform-origin: 50% 100%; animation: puff 3s ease-in-out infinite; }
.world-svg .thump { transform-origin: 50% 50%; animation: thump 1.2s ease-in-out infinite; }
.world-svg .crawl { animation: crawl 7s ease-in-out infinite; }
.world-svg .flap { transform-origin: 50% 50%; animation: flap .9s ease-in-out infinite; }
.world-svg .rise { transform-origin: 50% 100%; animation: rise 2.8s ease-out infinite; }
.world-svg .blink { animation: blink 2.4s steps(1, end) infinite; }
.world-svg .glow { animation: glow-soft 3.2s ease-in-out infinite; }
.world-svg .fly { animation: fly 46s linear infinite; }
.world-svg .turn { transform-box: view-box; animation: turn 60s linear infinite; }
.world-svg .turn-back { transform-box: fill-box; transform-origin: 50% 50%; animation: turn 60s linear infinite reverse; }
.world-svg .sweep { transform-box: view-box; animation: sweep 7s ease-in-out infinite alternate; }
@keyframes sway { 50% { transform: rotate(3deg); } }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes wave { 50% { transform: skewY(8deg) scaleX(.9); } }
@keyframes beat { 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } 60% { transform: none; } }
@keyframes spinx { 50% { transform: scaleX(.2); } }
@keyframes nod { 50% { transform: rotate(-10deg); } }
@keyframes rumble { 25% { transform: translateX(-1px); } 50% { transform: translate(1px, -2px); } 75% { transform: translateX(-1px); } }
@keyframes puff { 50% { transform: scale(1.1, 1.06); } }
@keyframes thump { 50% { transform: scale(1.06); } }
@keyframes crawl { 50% { transform: translateX(-14px); } }
@keyframes flap { 50% { transform: scaleY(-.5); } }
@keyframes rise { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes glow-soft { 50% { opacity: .45; } }
@keyframes fly { from { transform: translateX(-460px); } to { transform: translateX(460px); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes sweep { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }

/* ---------------- Tools tab ---------------- */
.tabbar { grid-template-columns: repeat(4, 1fr); }
.tools-note { color: var(--muted); font-size: .92rem; margin: -6px 2px 6px; }
.ours { display: inline-flex; flex: none; line-height: 0; }
.ours .avatar { width: 22px; height: 22px; border-width: 1.5px; }
.tgroup { margin-top: 26px; }
.tgroup-head { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.tgroup-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--stroke); display: grid; place-items: center; }
.tgroup-ico svg { width: 24px; height: 24px; }
.tgroup-about { color: var(--muted); font-size: .9rem; margin: 4px 0 10px 44px; }
@media (max-width: 480px) { .tgroup-about { margin-left: 0; } }
.tgroup .tool-row { grid-template-columns: minmax(0, 1fr) auto; padding: 11px 16px; }

/* HUD avatar: no oval focus ring; keyboard focus shows as a blue avatar border instead */
.hud-me:focus-visible { outline: none; }
.hud-me:focus-visible .avatar { border-color: var(--order); box-shadow: 0 0 0 2px var(--order-wash); }

/* ---------------- living avatars: idle motion where the avatar is the star of the screen ---------------- */
@media (prefers-reduced-motion: no-preference) {
  :is(.ob-card, .chars, .me-av) .a-eyes { transform-box: fill-box; transform-origin: center; animation: a-blink 4.2s infinite; }
  :is(.ob-card, .chars, .me-av) .a-head { transform-box: view-box; transform-origin: 50px 76px; animation: a-sway 3.4s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-leaves { transform-box: view-box; transform-origin: 50px 40px; animation: a-leaves 2.6s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-float { animation: a-float 2.8s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-stars circle { animation: a-twinkle 2.2s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-stars circle:nth-child(2n) { animation-delay: -1.1s; }
  /* each character keeps its own rhythm, so the picker never moves in lockstep */
  .chars .char:nth-child(2) svg * { animation-delay: -.8s; }
  .chars .char:nth-child(3) svg * { animation-delay: -2.1s; }
  .chars .char:nth-child(4) svg * { animation-delay: -1.4s; }
  .chars .char:nth-child(5) svg * { animation-delay: -3s; }
  .chars .char:nth-child(6) svg * { animation-delay: -.4s; }
  .chars .char:nth-child(7) svg * { animation-delay: -1.8s; }
  .chars .char:nth-child(8) svg * { animation-delay: -2.6s; }
  .chars .char:nth-child(9) svg * { animation-delay: -1.2s; }
  .chars .char:nth-child(10) svg * { animation-delay: -.6s; }
  .chars .char:nth-child(11) svg * { animation-delay: -2.3s; }
  .chars .char:nth-child(12) svg * { animation-delay: -1.6s; }
  .chars .char:nth-child(13) svg * { animation-delay: -.2s; }
  .chars .char:nth-child(14) svg * { animation-delay: -2.9s; }
  .chars .char:nth-child(15) svg * { animation-delay: -1s; }
  .chars .char:nth-child(16) svg * { animation-delay: -2.2s; }
  .chars .char:nth-child(n) .a-stars circle:nth-child(2n) { animation-delay: -1.1s; }
  /* the heroes' idle motion (superintelligent-D9) */
  :is(.ob-card, .chars, .me-av) .a-squish { transform-box: view-box; transform-origin: 50px 94px; animation: a-squish 1.8s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-flicker { transform-box: view-box; transform-origin: 50px 94px; animation: a-flicker .9s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-spin { transform-box: view-box; transform-origin: 50px 56px; animation: a-spin 12s linear infinite; }
  :is(.ob-card, .chars, .me-av) .a-tilt { transform-box: view-box; transform-origin: 50px 94px; animation: a-sway 2.6s ease-in-out infinite alternate; }
  :is(.ob-card, .chars, .me-av) .a-drip { animation: a-drip 2.4s ease-in infinite; }
  :is(.ob-card, .chars, .me-av) .a-drip.late { animation-delay: -1.2s; }
  /* picking a look: a happy hop */
  .char[aria-checked="true"] .avatar { animation: a-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
  /* the name screen: your character perks up as you type */
  .ob-me { animation: a-hop .55s cubic-bezier(.3, 1.6, .5, 1) .15s backwards; }
  .ob-me.perk { animation: a-perk .32s ease-out; }
}
@keyframes a-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes a-sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes a-leaves { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes a-float { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
@keyframes a-twinkle { from { opacity: .25; } to { opacity: 1; } }
@keyframes a-squish { from { transform: scale(1.04, .95); } to { transform: scale(.97, 1.03); } }
@keyframes a-flicker { from { transform: scale(1, .97) skewX(-2deg); } to { transform: scale(.98, 1.03) skewX(2deg); } }
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-drip { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes a-hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-8px) scale(1.06); } 100% { transform: translateY(0) scale(1); } }
@keyframes a-perk { 0% { transform: scale(1); } 45% { transform: scale(1.05) rotate(-3deg); } 100% { transform: scale(1); } }

/* focus rings are for keyboard players: after a tap or click, script-moved focus stays quiet */
html[data-input="pointer"] :focus-visible { outline: none; }
html[data-input="pointer"] .node:focus-visible .node-disc, html[data-input="pointer"] .wnode:focus-visible .wn-disc { outline: none; }

/* ---------------- fact-check record at the end of a lesson ---------------- */
.sources-box { margin-top: 14px; background: var(--paper); border: 1px solid var(--stroke); border-radius: var(--r-mid); font-size: .9rem; }
.sources-box summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; font-weight: 700; color: var(--ink); }
.sources-box summary::-webkit-details-marker { display: none; }
.sources-box summary span { color: var(--muted); font-weight: 400; }
.sources-box summary span::after { content: " +"; }
.sources-box[open] summary span::after { content: " \2212"; }
.sources-box ul { margin: 0; padding: 0 16px 4px 34px; display: grid; gap: 6px; }
.sources-box a { color: var(--order); overflow-wrap: anywhere; }
.sources-box p { padding: 8px 16px 14px; color: var(--muted); font-size: .85rem; }

/* celebration card: it is yellow, so its one button is navy ink instead of yellow-on-yellow */
.cel-card #cel-close { background: var(--sticker-ink); color: var(--sticker); border-color: var(--sticker-ink); box-shadow: 0 4px 0 rgba(29, 43, 83, .35); }
.cel-card #cel-close:hover { background: color-mix(in srgb, var(--sticker-ink) 85%, var(--sticker)); border-color: color-mix(in srgb, var(--sticker-ink) 85%, var(--sticker)); }
.cel-card #cel-close:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29, 43, 83, .35); }
.cel-card #cel-close:focus-visible { outline-color: var(--sticker-ink); }

/* bottom nav: no dot under the current tab (the blue icon and dark label mark it); a clearer hover */
.tabbar a[aria-current="page"]::after { content: none; }
.tabbar a[aria-current="page"] { font-weight: 800; }
.tabbar a:hover .tab-ico { color: var(--order); }
.tabbar a:hover .avatar { border-color: var(--order); }
@media (prefers-reduced-motion: no-preference) {
  .tab-ico { transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), color .15s ease; }
  .tabbar a:hover .tab-ico { transform: translateY(-4px) scale(1.12); }
  .tabbar a:active .tab-ico { transform: translateY(0) scale(.94); transition-duration: .08s; }
}

/* ---------------- tidy-ups (owner, 2026-10-09: superintelligent-D3, D4, D5) ---------------- */
/* top bar: the avatar's box is the circle alone, so it centres with the title block and the star chip;
   the empty XP track shows in dark mode too */
:root { --track: color-mix(in srgb, var(--line) 10%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --track: color-mix(in srgb, var(--muted) 24%, transparent); } }
:root[data-theme="dark"] { --track: color-mix(in srgb, var(--muted) 24%, transparent); }
.xpbar { background: var(--track); }
.hud-me, .chip-av { display: block; line-height: 0; }

/* stage tabs: the stage's colour line sits under its name */
.stab::before { top: auto; bottom: 4px; left: 18px; right: 18px; border-radius: 3px; }

/* Tools: the diamond (our stack) sits on the tool name's line (superintelligent-D10: no words) */
.tool-row .tool-txt b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* Quizzes: each tile and each boss is one compact row; the button keeps its own size beside the text */
.qgrid { gap: 10px; }
.qtile { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; }
.qtile-ico { width: 44px; height: 44px; border-radius: 12px; }
.qtile-ico svg { width: 28px; height: 28px; }
.qtile h2 { font-size: 1.05rem; }
.qtile p { font-size: .85rem; line-height: 1.35; margin-top: 0; }
.qtile .btn, .boss-row .btn { justify-self: end; min-height: 38px; padding: .35em 1em; font-size: .92rem; white-space: nowrap; }
.boss-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 10px 14px; }
.boss-row h3 { font-size: 1.05rem; }
.boss-row p { font-size: .85rem; }
@media (max-width: 480px) { .boss-row .btn { grid-column: auto; } }

/* phones: a swiped-to tab slides in from the side it came from (superintelligent-D6) */
@media (prefers-reduced-motion: no-preference) {
  .view.swipe-next { animation: swipe-next .22s ease-out; }
  .view.swipe-prev { animation: swipe-prev .22s ease-out; }
}
@keyframes swipe-next { from { transform: translateX(32px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes swipe-prev { from { transform: translateX(-32px); opacity: .3; } to { transform: none; opacity: 1; } }
