/* VAX! — styles (light "infographic" theme: paper, navy ink, yellow→orange accents) */
:root {
  --paper: #f7f6f2;
  --paper-2: #eceae4;
  --card: #ffffff;
  --soft: #f3f4f8;
  --line: rgba(36, 48, 94, 0.11);
  --line-2: rgba(36, 48, 94, 0.2);
  --ink: #24305e;
  --text: #24305e;
  --body: #4a5478;
  --muted: #6b7493;
  --faint: #9aa1b8;
  --navy: #34427a;
  --slate: #5b6890;
  --vacc: #14a88a;
  --vacc-dark: #0b7f68;
  --vacc-soft: #dcf2ec;
  --sick: #ea5532;
  --sick-dark: #bf3a1c;
  --sick-soft: #fde4dc;
  --quar: #f5c242;
  --quar-dark: #b07d00;
  --risk: #f08a24;
  --ref: #97a1bb;
  --yellow: #f7c948;
  --orange: #f08a24;
  --gold: #f2ae1c;
  --grad: linear-gradient(120deg, #f8cf4f 0%, #f39b2c 60%, #ee7f22 100%);
  --shadow-sm: 0 1px 2px rgba(36, 48, 94, 0.06), 0 2px 8px rgba(36, 48, 94, 0.06);
  --shadow: 0 2px 6px rgba(36, 48, 94, 0.06), 0 12px 32px rgba(36, 48, 94, 0.1);
  --shadow-lg: 0 4px 10px rgba(36, 48, 94, 0.08), 0 30px 70px rgba(36, 48, 94, 0.18);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--paper); color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
body { position: fixed; inset: 0; }
button { font: inherit; color: inherit; }
a { color: var(--vacc-dark); font-weight: 700; }
svg { display: block; }

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

/* ---------- screens ---------- */
.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.screen.show { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.screen.show > * { pointer-events: auto; }
.hud.show { pointer-events: none; }
.hud.show > * { pointer-events: none; }
.hud.show .hud-top, .hud.show .hud-bottom, .hud.show .coach.show { pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-weight: 750; font-size: 16px; letter-spacing: .01em;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, opacity .2s, border-color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--soft); border-color: rgba(36, 48, 94, .3); }
.btn:active { transform: scale(0.96); }
.btn:focus-visible, .icon-btn:focus-visible, .tile:focus-visible, .toggle:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn.primary {
  background: var(--grad);
  color: var(--ink); border-color: transparent;
  font-weight: 850;
  box-shadow: 0 6px 18px rgba(240, 138, 36, 0.32), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn.primary:hover { filter: brightness(1.04) saturate(1.05); background: var(--grad); }
.btn.big { min-height: 60px; font-size: 21px; padding: 0 40px; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 16px; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.7); }
.btn.icon-only { padding: 0; width: 44px; min-width: 44px; }
.btn.icon-only svg { width: 20px; height: 20px; }
.btn.danger { color: var(--sick-dark); border-color: rgba(234, 85, 50, .35); }
.btn.danger.armed { background: var(--sick-soft); }
.btn.hidden { display: none; }
.btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
.btn.confirm { background: var(--ink); color: #fff; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(240, 138, 36, 0.32), 0 0 0 0 rgba(240, 138, 36, .5); }
  50% { box-shadow: 0 6px 18px rgba(240, 138, 36, 0.32), 0 0 0 12px rgba(240, 138, 36, 0); }
}

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px; border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer; touch-action: manipulation;
  transition: opacity .2s, transform .12s, background .2s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.dim { opacity: .4; }

/* ---------- title ---------- */
#screen-title { align-items: center; justify-content: center; padding: calc(24px + var(--safe-t)) 20px calc(16px + var(--safe-b)); }
#screen-title::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, rgba(247,246,242,.55) 0%, rgba(247,246,242,.2) 45%, rgba(247,246,242,.75) 85%);
}
.title-wrap { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: auto; }
.logo {
  margin: 0; line-height: .9;
  font-size: clamp(84px, 24vw, 168px); font-weight: 900; letter-spacing: -.03em;
  display: flex;
}
.logo .l {
  display: inline-block;
  color: var(--ink);
  text-shadow: 0 6px 0 rgba(36,48,94,.08);
  animation: drop .7s cubic-bezier(.2,1.4,.4,1) both;
}
.logo .l:nth-child(2) { animation-delay: .07s; }
.logo .l:nth-child(3) { animation-delay: .14s; }
.logo .bang {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; animation-delay: .24s; padding-right: .04em;
}
@keyframes drop { from { transform: translateY(-40px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.tagline { margin: 12px 0 30px; color: var(--body); font-size: clamp(16px, 4.4vw, 20px); font-weight: 600; }
.menu { display: flex; flex-direction: column; gap: 12px; width: min(320px, 86vw); }
.menu .btn { width: 100%; }
.menu .row { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.menu .row .btn { width: auto; flex: 1; }
.menu .row .btn.icon-only { flex: none; }
.menu .row .btn.ghost { background: rgba(255,255,255,.75); }
.badge { font-size: 11px; display: inline-flex; gap: 1px; }
.badge .new { background: var(--sick); color: #fff; border-radius: 999px; padding: 2px 7px; font-weight: 800; letter-spacing: .05em; }
.badge .st { width: 12px; height: 12px; }
.credit { position: relative; margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.credit a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(240,138,36,.6); }

/* ---------- stars ---------- */
.st { display: inline-block; width: 16px; height: 16px; color: #dde1ea; }
.st svg { width: 100%; height: 100%; }
.st.on { color: var(--gold); }

/* ---------- level select ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--safe-t)) calc(16px + var(--safe-r)) 12px calc(16px + var(--safe-l));
}
.topbar h2 { margin: 0; font-size: 24px; font-weight: 850; flex: 1; }
.star-total { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); background: #fff; border: 1.5px solid var(--line); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.star-total svg { width: 18px; height: 18px; color: var(--gold); }
.star-total b { color: var(--ink); }
.levels-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px calc(16px + var(--safe-r)) calc(30px + var(--safe-b)) calc(16px + var(--safe-l)); touch-action: pan-y; }
.chapters { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.chapter { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.chapter-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.chapter h3 { margin: 0; font-size: 19px; font-weight: 850; display: flex; align-items: center; gap: 10px; }
.ch-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 15px; }
.chapter p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.chapter-stars { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 750; white-space: nowrap; font-size: 14px; }
.chapter-stars svg { width: 16px; height: 16px; color: var(--gold); }
.chapter-stars b { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile {
  position: relative; text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 14px 12px; min-height: 104px;
  border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--soft);
  cursor: pointer; touch-action: manipulation;
  transition: transform .12s, background .2s, border-color .2s, box-shadow .2s;
}
.tile:hover { background: #fff; border-color: rgba(240,138,36,.55); box-shadow: var(--shadow-sm); }
.tile:active { transform: scale(.97); }
.tile.done { background: #fff; border-color: rgba(20,168,138,.4); }
.tile-num { font-size: 13px; font-weight: 850; color: var(--orange); letter-spacing: .04em; }
.tile-num svg { width: 18px; height: 18px; color: var(--faint); }
.tile-name { font-size: 16px; font-weight: 800; line-height: 1.15; flex: 1; color: var(--ink); }
.tile-stars { display: flex; gap: 2px; }
.tile-best { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 800; color: var(--vacc-dark); }
.tile.locked { cursor: default; opacity: .5; background: transparent; border-style: dashed; }
.tile.locked:hover { box-shadow: none; border-color: var(--line); }
.tile.locked .tile-num { color: var(--faint); }

/* ---------- HUD ---------- */
.hud-top {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 6px calc(12px + var(--safe-l));
}
.hud-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hud-level { font-size: 15px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--ink); text-shadow: 0 0 6px #fbfaf7, 0 0 2px #fbfaf7; }
.phase-pill { font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.phase-pill.vacc { background: var(--vacc-soft); color: var(--vacc-dark); border-color: transparent; }
.phase-pill.out { background: var(--sick-soft); color: var(--sick-dark); border-color: transparent; }
.phase-pill.over { background: #fff; color: var(--muted); }
.rt-track { height: 5px; margin: 0 calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l)); border-radius: 5px; background: rgba(36,48,94,.1); overflow: hidden; display: none; }
.hud.realtime .rt-track { display: block; }
.rt-bar { height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.hud-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  padding: 6px 12px 0;
}
.stat {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 999px;
  background: rgba(255,255,255,.95); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px; color: var(--muted); font-weight: 700;
}
.stat svg { width: 17px; height: 17px; color: var(--slate); }
.stat b { color: var(--ink); font-size: 16px; font-weight: 850; font-variant-numeric: tabular-nums; }
.stat.vacc svg, .stat.vacc b { color: var(--vacc-dark); }
.stat.vacc.empty b { color: var(--muted); }
.stat.sick svg, .stat.sick b { color: var(--sick); }
.stat.healthy svg { color: var(--navy); }
.stat.quar svg { color: var(--quar); }
.stat.quar b { color: var(--quar-dark); }

.hud-bottom {
  margin-top: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 8px calc(16px + var(--safe-r)) calc(14px + var(--safe-b)) calc(16px + var(--safe-l));
}
.hint { font-size: 14px; color: var(--body); font-weight: 650; text-align: center; min-height: 18px; text-shadow: 0 0 6px #fbfaf7, 0 0 3px #fbfaf7, 0 0 1px #fbfaf7; }
.hint b { font-weight: 850; }
.t-vacc { color: var(--vacc-dark); }
.t-quar { color: var(--quar-dark); }
#btn-go { min-width: 220px; }

.coach {
  position: absolute; left: 50%; bottom: calc(110px + var(--safe-b));
  transform: translate(-50%, 20px); opacity: 0; visibility: hidden;
  width: min(520px, calc(100% - 24px));
  display: flex; gap: 12px; align-items: center;
  padding: 14px 14px 14px 18px;
  border-radius: 18px; background: var(--ink); color: #fff;
  box-shadow: var(--shadow-lg);
  transition: opacity .3s, transform .3s, visibility 0s linear .3s;
}
.coach.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .3s, transform .3s cubic-bezier(.2,1.3,.4,1); }
.coach p { margin: 0; flex: 1; font-size: 15px; line-height: 1.45; font-weight: 600; }
.coach p b { color: var(--yellow); }
.coach .btn { background: var(--grad); color: var(--ink); border: none; flex: none; box-shadow: none; }
.coach::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }

.banner {
  position: absolute; left: 0; right: 0; top: 40%;
  text-align: center; font-size: clamp(44px, 13vw, 88px); font-weight: 900; letter-spacing: -.02em;
  opacity: 0; transform: scale(.6); pointer-events: none;
  text-shadow: 0 0 18px rgba(251,250,247,.95), 0 0 4px rgba(251,250,247,.95);
}
.banner.red { color: var(--sick); }
.banner.green { color: var(--vacc); }
.banner.show { animation: banner 1.5s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes banner {
  0% { opacity: 0; transform: scale(.6); }
  18% { opacity: 1; transform: scale(1.05); }
  30% { transform: scale(1); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(14px + var(--safe-r)) calc(16px + var(--safe-b)) calc(14px + var(--safe-l));
  background: rgba(36, 48, 94, .26);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility 0s linear .25s;
}
.modal.show { opacity: 1; visibility: visible; transition: opacity .25s; }
.modal-card {
  width: min(520px, 100%); max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--card);
  border-radius: 26px;
  padding: 24px 22px 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.97);
  transition: transform .35s cubic-bezier(.2,1.2,.4,1);
  touch-action: pan-y;
  -webkit-user-select: text; user-select: text;
}
.modal.show .modal-card { transform: none; }
.modal-card h2 { margin: 2px 0 10px; font-size: 28px; font-weight: 900; line-height: 1.1; color: var(--ink); }
.eyebrow { font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; padding: 0 14px; }
.modal-actions.wrap { flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.modal-actions.wrap .btn { flex: 0 1 auto; }
.modal-actions.sticky {
  position: sticky; bottom: -20px; margin: 16px -22px -20px; padding: 14px 22px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
}
@media (max-width: 420px) { .modal-actions.sticky { margin: 16px -16px -16px; padding: 14px 16px 16px; bottom: -16px; } }
.note { color: var(--muted); font-size: 14px; margin: 12px 0 0; text-align: center; }
.note b { color: var(--ink); }
.note .st { width: 14px; height: 14px; vertical-align: -2px; }

/* brief */
.story { color: var(--body); font-size: 16px; line-height: 1.5; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 750; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); }
.chip svg { width: 15px; height: 15px; }
.chip.vacc { color: var(--vacc-dark); background: var(--vacc-soft); }
.chip.sick { color: var(--sick-dark); background: var(--sick-soft); }
.chip.ref { color: var(--slate); }
.chip.warn { color: #8a5a00; background: #fdf0cc; }
.disease { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #fff4ea; border: 1px solid #fbdcc0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.disease span { color: var(--muted); }
.targets { display: flex; gap: 8px; margin-top: 14px; }
.target { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--soft); }
.target b { font-size: 20px; font-weight: 400; color: var(--ink); }
.tstars { display: flex; gap: 1px; }
.tstars .st { color: #dde1ea; }
.tstars .st.on { color: var(--gold); }

/* results */
.results { text-align: center; }
.score { margin: 6px 0 4px; }
.score .big {
  font-size: 88px; font-weight: 300; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score .pct { font-size: 40px; font-weight: 300; color: var(--orange); }
.score-label { color: var(--muted); font-size: 14px; font-weight: 650; }
.best { color: var(--orange); }
.res-stars { display: flex; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.rs { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #e3e6ee; }
.rs svg { width: 44px; height: 44px; }
.rs small { font-size: 12px; color: var(--faint); font-weight: 750; }
.rs.on { color: var(--gold); animation: starpop .5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d); }
.results.noanim .rs.on { animation: none; }
@keyframes starpop { 0% { transform: scale(0) rotate(-40deg); color: #e3e6ee; } 100% { transform: none; color: var(--gold); } }
.need { margin: 6px 0 0; color: var(--sick-dark); font-size: 14px; }
.breakdown { margin-top: 16px; }
.bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--soft); gap: 2px; }
.seg { min-width: 4px; }
.seg.h, .legend i.h { background: var(--navy); }
.seg.v, .legend i.v { background: var(--vacc); }
.seg.q, .legend i.q { background: var(--quar); }
.seg.i, .legend i.i { background: var(--sick); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 650; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.insights { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.insight { font-size: 14px; line-height: 1.45; color: var(--body); padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.insight b { color: var(--ink); }
.compare small { display: block; color: var(--faint); font-size: 12px; margin-top: 6px; }
.cmp-row { display: grid; grid-template-columns: 9.5em 1fr 3em; align-items: center; gap: 10px; margin: 4px 0; font-size: 13px; }
.cmp-row b { text-align: right; font-size: 16px; font-weight: 500; color: var(--ink); }
.cmp-bar { height: 10px; border-radius: 3px; background: #e3e6ee; overflow: hidden; }
.cmp-bar i { display: block; height: 100%; border-radius: 3px; }
.cmp-bar i.mine { background: var(--grad); }
.cmp-bar i.rand { background: #a7afc5; }
.verdict { margin-top: 8px; font-weight: 750; font-size: 13px; }
.verdict.good { color: var(--vacc-dark); }
.verdict.bad { color: #c46a12; }
.fact { margin-top: 12px; text-align: left; font-size: 14px; line-height: 1.5; padding: 12px 14px; border-radius: 14px; background: #fff7e2; border: 1px solid #f6e1a8; color: var(--body); }
.fact b { color: #b06b00; }

/* pause / settings */
.pause h2, .settings h2 { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.toggle {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.toggle span { flex: 1; display: flex; flex-direction: column; }
.toggle b { font-size: 16px; color: var(--ink); }
.toggle small { color: var(--muted); font-size: 13px; }
.toggle i { width: 50px; height: 30px; border-radius: 99px; background: #dfe2ea; position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(36,48,94,.25); transition: transform .2s; }
.toggle.on i { background: var(--vacc); }
.toggle.on i::after { transform: translateX(20px); }
.settings .danger { width: 100%; margin-top: 18px; }

/* how to */
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--body); }
.steps b { color: var(--ink); }
.step-ic { flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.step-ic .mini { width: 48px; height: 48px; }
.big-num { font-size: 32px; font-weight: 300; color: var(--orange); }
.legend-people { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); font-weight: 700; }
.legend-people span { display: flex; align-items: center; gap: 4px; }
.legend-people .mini { width: 28px; height: 28px; }
.tip { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }

/* about */
.about p { color: var(--body); line-height: 1.55; font-size: 15px; }
.about b { color: var(--ink); }
.about .small { font-size: 13px; color: var(--muted); }

/* sandbox */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 750; color: var(--muted); margin-top: 12px; }
.field span { display: flex; justify-content: space-between; }
.field output { color: var(--ink); font-variant-numeric: tabular-nums; }
.field.disabled { opacity: .35; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--soft);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; touch-action: pan-x; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: #e3e6ee; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: #e3e6ee; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(36,48,94,.3); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(36,48,94,.3); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 700; font-size: 15px; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--orange); }

/* toast */
.toast {
  position: fixed; left: 50%; top: calc(118px + var(--safe-t)); z-index: 30;
  transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  width: max-content; max-width: min(460px, calc(100% - 32px));
  padding: 12px 18px; border-radius: 16px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; line-height: 1.4; text-align: center;
  box-shadow: var(--shadow-lg);
  transition: opacity .25s, transform .25s;
  white-space: pre-line;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }

/* ---------- responsive ---------- */
@media (max-width: 420px) {
  .stat { padding: 5px 10px 5px 8px; font-size: 12px; }
  .stat b { font-size: 15px; }
  .modal-card { padding: 20px 16px 16px; border-radius: 22px; }
  .modal-card h2 { font-size: 24px; }
  .score .big { font-size: 74px; }
  .rs svg { width: 38px; height: 38px; }
  .cmp-row { grid-template-columns: 7.8em 1fr 2.6em; font-size: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hint { font-size: 13px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .hud-bottom { flex-direction: row; justify-content: center; padding-top: 4px; }
  .coach { bottom: calc(70px + var(--safe-b)); }
  .logo { font-size: 72px; }
  .tagline { margin-bottom: 14px; }
  .menu { gap: 8px; }
  .menu .btn { min-height: 42px; }
  .btn.big { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
