/* Powder Day: a full-screen pixel mountain at dusk, with dark notched
   panels floating over it. Soft colors only (no pure white), big tap targets,
   phone first. Change the look by editing the tokens in :root. */
/* FP Pixel: Pixelify Sans with 5, 8 and e redrawn to be easier to read (tools/fonts/build-fp-pixel.py,
   SIL OFL, css/fonts/OFL.txt). Other characters fall back to Pixelify Sans from Google Fonts. */
@font-face { font-family: "FP Pixel"; src: url("fonts/fp-pixel-400.woff2?v=1") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FP Pixel"; src: url("fonts/fp-pixel-500.woff2?v=1") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FP Pixel"; src: url("fonts/fp-pixel-600.woff2?v=1") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FP Pixel"; src: url("fonts/fp-pixel-700.woff2?v=1") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --panel: rgba(20, 23, 44, .9);
  --panel-solid: #171a33;
  --panel-edge: #343a62;
  --ink: #e8e6f1;
  --muted: #9095b6;
  --ice: #86d2d3;
  --coral: #e5867f;
  --amber: #e8bd74;
  --green: #6fb38a;
  --blue: #6f95d6;
  --ground: #9ba1bf;
  --btn-ink: #2a1620;
  /* Pixelify Sans for titles and reading text, Silkscreen for small capital labels. */
  --f-display: "FP Pixel", "Pixelify Sans", ui-monospace, "Courier New", monospace;
  --f-body: "FP Pixel", "Pixelify Sans", ui-monospace, "Courier New", monospace;
  --f-label: "Silkscreen", ui-monospace, "Courier New", monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --top: env(safe-area-inset-top, 0px);
  --kb: 0px; /* height of the phone keyboard, set by game.js */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  overflow: hidden;
  font-family: var(--f-body);
  font-size: 17px;
  font-variant-ligatures: none; /* no joined "fi" */
  letter-spacing: .02em; /* the pixel letters are tight: a little room makes words easier to read */
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
p { margin: 0; }

/* ---------- The mountain ---------- */
#scene, #overlay { position: fixed; left: 0; top: 0; display: block; }
#scene { image-rendering: pixelated; image-rendering: crisp-edges; touch-action: manipulation; }
#overlay { pointer-events: none; }

/* Everything over the mountain. The layer itself lets taps through to the
   canvas (for the old tree); its panels catch their own taps. */
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > *, .play > * { pointer-events: auto; }
#ui > .play, #ui > .hud { pointer-events: none; }

.notch { clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.panel { background: var(--panel); box-shadow: inset 0 0 0 1px var(--panel-edge); }
.lbl { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.lbl.gold { color: var(--amber); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- HUD ---------- */
.hud {
  position: absolute; top: calc(var(--top) + 10px); left: var(--gutter); right: var(--gutter-r);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px;
}
.stat { padding: 8px 14px 6px; min-width: 96px; display: flex; flex-direction: column; gap: 2px; justify-self: start; }
.stat.right { justify-self: end; text-align: right; align-items: flex-end; }
.val { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.val.ice { color: var(--ice); }
.val.coral { color: var(--coral); }
.streak { font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; color: var(--amber); margin-top: 2px; }
.progress { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 8px; }
.squares { display: flex; gap: 4px; }
.sq { width: 14px; height: 14px; background: #1a1e38; box-shadow: inset 0 0 0 2px #3a4068; }
.sq.cur { background: var(--coral); box-shadow: inset 0 0 0 2px #f2aba3; transform: scale(1.15); }
.sq.green { background: var(--green); box-shadow: none; }
.sq.blue { background: var(--blue); box-shadow: none; }
.sq.black { background: #20233c; box-shadow: inset 0 0 0 2px #c9cbe0; }
.sq.double { background: #c9cbe0; box-shadow: inset 0 0 0 3px #20233c; }
.sq.secret { background: var(--amber); box-shadow: none; }
.sq.wipe { background: #3a3f63; box-shadow: inset 0 0 0 2px #555b85; }

/* The run's distance and answer streak only show during a run (playing it, or its finish screen). */
body:not(.on-run) .hud .stat { visibility: hidden; }
/* Home: settings cog in the top left (where the distance shows during a run), archive beside it and
   the news button right below it. */
.homebar {
  position: absolute; top: calc(var(--top) + 10px); left: var(--gutter);
  display: grid; grid-template-columns: 44px auto; grid-auto-rows: 44px; gap: 8px; justify-items: start;
  z-index: 2; /* above the title, which comes close on phones */
}
.homebar button { height: 44px; border: 0; cursor: pointer; color: var(--ink); }
.homebar #btn-news { grid-column: 1; grid-row: 2; }
/* Mute: every screen, top right (below the answer streak during a run). */
#btn-mute.mutebtn {
  position: absolute; z-index: 2; top: calc(var(--top) + 10px); right: var(--gutter-r); height: 44px; border: 0; cursor: pointer; color: var(--ink);
}
.on-run #btn-mute.mutebtn { top: calc(var(--top) + 78px); }
.mutebtn .ico { color: var(--ice); }
/* Home: during a run only, just left of the mute button. */
#btn-home.homebtn {
  position: absolute; z-index: 2; top: calc(var(--top) + 78px); right: calc(var(--gutter-r) + 52px); height: 44px; border: 0; cursor: pointer;
}
.homebtn .ico { color: var(--ice); }
.mutebtn.muted .ico { color: var(--coral); }
.mutebtn .snd-off, .mutebtn.muted .snd-on { display: none; }
.mutebtn.muted .snd-off { display: inline; }
.iconbtn { width: 44px; display: grid; place-items: center; padding: 0; }
.iconbtn { position: relative; }
.iconbtn .cog, .iconbtn .ico { width: 22px; height: 22px; color: var(--ice); }
.iconbtn:hover .cog, .iconbtn:hover .ico { color: var(--amber); }
.iconbtn .dot { position: absolute; top: 6px; right: 6px; margin: 0; }
.textbtn { padding: 0 12px; font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.textbtn:hover { color: var(--amber); }

/* "+24 m" that rises off the skier */
.float {
  position: absolute; font-family: var(--f-label); font-size: 14px; letter-spacing: .08em;
  color: var(--ice); background: var(--panel-solid); padding: 4px 8px;
  box-shadow: inset 0 0 0 1px var(--panel-edge);
  transform: translate(-50%, -100%); opacity: 0; pointer-events: none !important; white-space: nowrap;
}
.float.show { animation: rise 1.8s ease-out forwards; }
.float.gold { color: #2a1f10; background: var(--amber); }
.float.miss { color: var(--ink); background: #4b4f78; }
@keyframes rise {
  0% { opacity: 0; margin-top: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; margin-top: -28px; }
}
/* reduced motion: the float stays put and just fades (a .01s "rise" ended on its invisible last frame) */
@keyframes hold { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Buttons ---------- */
.act {
  min-height: 48px; padding: 0 22px; border: 0; cursor: pointer; flex: none;
  background: var(--coral); color: var(--btn-ink);
  font-family: var(--f-label); font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
}
.act:hover { filter: brightness(1.08); }
.act:active { transform: translateY(1px); }
.act:disabled { opacity: .45; cursor: default; filter: none; transform: none; }
.act.ghost { background: rgba(16, 18, 36, .92); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ice); font-size: 12px; }
.act.big { min-height: 54px; padding: 0 40px; font-size: 16px; }
/* The home screen's Play button: gold like the DAY in the logo, with a stripe of light sweeping across it
   now and then. The stripe passes behind the text, and the notched corners clip it. */
#btn-play { position: relative; isolation: isolate; overflow: hidden; background: var(--amber); }
#btn-play::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 38% 45%,
    transparent 45% 49%, rgba(255, 255, 255, .35) 49% 52%, transparent 52%);
  transform: translateX(-100%);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Home ---------- */
.title-screen {
  position: absolute; top: calc(var(--top) + 9vh); left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.logo {
  margin: 0; font-size: clamp(40px, 9vw, 72px); font-weight: 600; letter-spacing: .06em; line-height: .95;
  color: #f1ebf2; text-shadow: 0 4px 0 rgba(20, 22, 44, .55);
}
.logo span { display: block; color: var(--amber); }
.logo, .sheet h2 { font-family: var(--f-display); }
.tag { font-family: var(--f-label); font-size: 12px; letter-spacing: .12em; color: #d8d2e6; text-transform: uppercase; }
.tag.soft { color: #b9b3cc; margin-bottom: 6px; }
.title-screen .note { background: var(--panel); padding: 8px 12px; }
.setting {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel);
  font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; cursor: pointer;
}
.setting input { width: 16px; height: 16px; margin: 0; accent-color: var(--ice); }

/* ---------- Sheets: how to play, archive, finish ---------- */
.sheet {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 32px)); max-height: calc(100% - 150px);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: auto;
}
.sheet.bottom {
  top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-height: min(52vh, calc(100% - 150px));
}
.sheet h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: .06em; line-height: 1.1; }
.sheet > .act { align-self: center; }
/* sheet title with a close X on the right */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xbtn {
  flex: none; width: 44px; height: 44px; margin: -8px -8px -8px 0; display: grid; place-items: center; padding: 0;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.xbtn svg { width: 16px; height: 16px; }
.xbtn:hover { color: var(--amber); }
.head-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.note { font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; color: var(--muted); line-height: 1.7; }
.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.how b { color: var(--ice); font-weight: 500; }

.archive { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.archive button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 50px; padding: 8px 14px; text-align: left; border: 0; cursor: pointer;
  background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge); color: var(--ink); font-size: 16px;
}
.archive button:hover { box-shadow: inset 0 0 0 1px var(--ice); }
.archive .status { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.archive .status.done { color: var(--ice); }
/* Archive: a month calendar */
.cal { display: flex; flex-direction: column; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-month { margin: 0; font-weight: 500; font-size: 20px; color: var(--ink); }
.cal-nav {
  width: 44px; height: 44px; border: 0; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ice);
  background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge);
}
.cal-nav:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ice); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-week span { text-align: center; font-family: var(--f-label); font-size: 10px; color: var(--muted); }
.cal-day {
  position: relative; aspect-ratio: 1; min-height: 40px; display: grid; place-items: center; padding: 0; border: 0;
  background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge); color: var(--ink); font-size: 17px;
}
.cal-day b { font-weight: 500; }
button.cal-day { cursor: pointer; }
button.cal-day:hover { box-shadow: inset 0 0 0 2px var(--ice); }
.cal-day.off { background: transparent; box-shadow: none; color: #4b5078; }
.cal-day i { position: absolute; bottom: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; }
.cal-day.part i { background: var(--amber); }
.cal-day.all { background: rgba(134, 210, 211, .16); box-shadow: inset 0 0 0 2px var(--ice); }
.cal-day.all i { background: var(--ice); }
.cal-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-key .k { display: inline-block; width: 8px; height: 8px; margin-left: 6px; }
.cal-key .k.part { background: var(--amber); }
.cal-key .k.all { background: var(--ice); }
/* Pick a category: one big button per set, its color on the left edge */
.pick .pick-cat { flex-wrap: wrap; row-gap: 6px; min-height: 56px; font-size: 18px; box-shadow: inset 0 0 0 1px var(--panel-edge), inset 5px 0 0 var(--cat, var(--ice)); padding-left: 18px; }
.pick .pick-cat:hover { box-shadow: inset 0 0 0 1px var(--ice), inset 5px 0 0 var(--cat, var(--ice)); }
.pick .pick-squares { flex-basis: 100%; display: flex; gap: 4px; }
.pick .pick-squares .sq { width: 10px; height: 10px; }
.pick-cat[data-cat="history"] { --cat: var(--amber); }
.pick-cat[data-cat="science"] { --cat: var(--ice); }
.pick-cat[data-cat="art"] { --cat: var(--coral); }
.pick-cat[data-cat="music"] { --cat: #b39ddb; }
.pick-cat[data-cat="movies"] { --cat: var(--green); }
#screen-pick { gap: 12px; }
#screen-pick .lbl { align-self: flex-start; }

.total { font-size: 24px; color: var(--ice); font-variant-numeric: tabular-nums; line-height: 1.1; }
/* How this run compares with everyone else's today */
.rank { margin: -4px 0 0; font-size: 16px; color: var(--amber); }
.stats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.rounds { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.rounds .meta { display: block; color: var(--coral); font-size: 14px; }
.rounds .hint { display: block; font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
#screen-finish .form-msg { text-align: center; }
/* Share and Another category, right under the score; "Copied!" shows below them, taking no room until then */
.finish-share { display: flex; flex-direction: column; gap: 8px; }
.finish-share .act { flex: 1 1 auto; } /* side by side when they fit, two full-width rows on a phone */
.finish-share .form-msg:empty { min-height: 0; margin-top: -8px; }

/* ---------- Playing: the prompt card ---------- */
.play { position: absolute; inset: 0; }
.card {
  position: absolute; top: calc(var(--top) + 130px); left: 50%; transform: translateX(-50%); /* below the 44 px corner buttons */
  width: min(580px, calc(100% - 32px)); padding: 16px 22px 14px;
  transition: opacity .35s, transform .35s;
}
.arriving .card, .arriving .bar { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }
.arriving .bar { transform: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-family: var(--f-label); font-size: 12px; letter-spacing: .12em; color: var(--coral); text-transform: uppercase; }
.style-chip {
  font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); padding: 3px 8px; box-shadow: inset 0 0 0 1px rgba(232, 189, 116, .5);
}
.prompt { font-size: clamp(21px, 3.9vw, 30px); font-weight: 500; line-height: 1.28; margin: 10px 0 10px; text-wrap: balance; }
.blank { display: inline-block; min-width: 3.5em; border-bottom: 3px solid var(--ice); color: var(--ice); line-height: 1.1; }
.answer-line { display: table; margin-top: 6px; }
/* The words that say what to answer ("this city", "Name", "In what year") */
.prompt .ask { background: none; color: var(--amber); }
.card .hint { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.card .hint b { color: var(--ice); font-weight: 400; }
.play.answered .card .hint { visibility: hidden; }
/* Guesses left on this prompt, under the question (coral at the last one). */
.card .guesses { margin: 0 0 6px; font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--ice); text-transform: uppercase; }
.card .guesses.last { color: var(--coral); }
.play.answered .card .guesses { visibility: hidden; } /* keeps the card's height, like .hint */

/* ---------- Playing: the answer bar ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: var(--kb);
  padding: 28px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: linear-gradient(to bottom, rgba(16, 18, 36, 0), rgba(16, 18, 36, .82) 42%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; transition: opacity .3s;
}
.row { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 660px; }
.timer { position: relative; width: 54px; height: 54px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
/* In Silkscreen: Pixelify's 5 looks like an S, and the reading countdown starts at 5. */
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-label); font-size: 16px; color: var(--ice); font-variant-numeric: tabular-nums; }
.timer.low span { color: var(--coral); }
/* The last 10 seconds (game.js URGENT_SECONDS): the timer is red and throbs on each second, and the time
   bar turns red and flashes with it. */
.timer.beat { animation: throb .35s ease-out; }
@keyframes throb { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }
.timer.low + .inwrap .tbar i { background: var(--coral); }
.timer.beat + .inwrap .tbar { animation: tbar-flash .45s ease-out; }
@keyframes tbar-flash { 0% { background: rgba(229, 134, 127, .75); } 100% { background: rgba(134, 210, 211, .15); } }
/* ...and a red glow rises at the screen edges, stronger toward zero (--hurry, 0-1), brightening on each second. */
.hurry {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 150px 40px rgba(226, 84, 74, .62);
  opacity: var(--hurry, 0); transition: opacity .25s linear;
}
.hurry::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px 20px rgba(236, 96, 84, .85); opacity: 0; }
.hurry.beat::after { animation: hurry-beat .6s ease-out; }
@keyframes hurry-beat { 0% { opacity: 1; } 100% { opacity: 0; } }
/* Reduce motion: the red and the growing glow stay, without the throbbing and flashing. */
@media (prefers-reduced-motion: reduce) { .timer.beat, .timer.beat + .inwrap .tbar, .hurry.beat::after { animation: none; } }
.reduce-motion .timer.beat, .reduce-motion .timer.beat + .inwrap .tbar, .reduce-motion .hurry.beat::after { animation: none; }
/* The reading countdown before GO: amber, with the answer box locked. */
.timer.reading span { color: var(--amber); }
.timer.reading + .inwrap .tbar i { background: var(--amber); }
.inwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#guess {
  width: 100%; height: 48px; border: 0; padding: 0 14px;
  background: rgba(12, 14, 30, .88); box-shadow: inset 0 0 0 2px rgba(134, 210, 211, .55);
  color: var(--ink); font-family: var(--f-body); font-size: 20px; /* 16px+ stops phones zooming on focus */
}
#guess::placeholder { color: #5f6589; }
#guess:disabled { opacity: .6; }
.tbar { height: 3px; background: rgba(134, 210, 211, .15); }
.tbar i { display: block; height: 100%; width: 100%; background: var(--ice); transform-origin: left; transition: transform .25s linear; }
.timer.off + .inwrap .tbar { visibility: hidden; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 660px; }
.suggest button {
  border: 0; cursor: pointer; min-height: 44px; padding: 6px 14px; font-size: 15px;
  background: var(--panel); box-shadow: inset 0 0 0 1px rgba(134, 210, 211, .45); color: var(--ink);
}
.suggest button:hover { box-shadow: inset 0 0 0 1px var(--ice); }
.form-msg { min-height: 1.4em; font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; color: var(--muted); text-align: center; max-width: 660px; }
.form-msg.ok { color: var(--ice); }
.form-msg.bad { color: var(--coral); }
/* A wrong answer: the box shakes and goes red for a moment (and uses one of the 3 guesses). */
#guess.wrong { box-shadow: inset 0 0 0 2px var(--coral); background: rgba(70, 20, 30, .9); animation: shake .45s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) { #guess.wrong { animation: none; } }
.reduce-motion #guess.wrong { animation: none; } /* the in-game Reduce motion setting: red, no shake */
/* Hints on trivia questions: "Hint?" after 15 seconds, then a yes, then the hint itself. */
.hint-box { margin-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hint-box[hidden], .hint-ask[hidden], .hint-text[hidden], .hint-btn[hidden] { display: none; }
.play.answered .hint-box { display: none; }
.hint-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.hint-btn {
  min-height: 44px; padding: 0 16px; border: 0; cursor: pointer; background: transparent;
  font-family: var(--f-label); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); box-shadow: inset 0 0 0 1px rgba(232, 189, 116, .6);
}
.hint-btn:hover { box-shadow: inset 0 0 0 1px var(--amber); }
.hint-btn.ghost { color: var(--muted); box-shadow: inset 0 0 0 1px rgba(150, 156, 190, .5); }
.hint-text { margin: 0; font-size: 17px; line-height: 1.35; color: var(--amber); }
/* A list question: the items named so far, and DONE to finish early. */
.list-bar { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 660px; }
.list-bar[hidden] { display: none; }
.list-got { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 76px; overflow: auto; }
.list-got span {
  padding: 4px 10px; font-size: 14px; color: var(--ink); background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(134, 210, 211, .6);
}
.list-bar .act { flex: none; min-height: 44px; padding: 0 16px; }

/* ---------- Playing: the result sheet ---------- */
.result {
  position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(500px, calc(100% - 32px)); max-height: min(52vh, calc(100% - 380px)); min-height: 210px;
  padding: 18px 20px 0; display: flex; flex-direction: column; gap: 10px; overflow: auto;
  animation: pop .35s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 12px); } }
.tierline { display: flex; align-items: center; justify-content: center; gap: 10px; }
.res-title { font-size: 26px; letter-spacing: .08em; font-weight: 600; line-height: 1; text-transform: uppercase; }
.reaction { text-align: center; color: var(--ink); font-size: 17px; }
.sign { width: 18px; height: 18px; flex: none; display: block; }
.sign.green { border-radius: 50%; background: var(--green); }
.sign.blue { background: var(--blue); }
.sign.black { background: #0d0f1e; transform: rotate(45deg) scale(.82); box-shadow: 0 0 0 2px #c9cbe0; }
/* Double black diamond: two diamonds side by side */
.sign.double { width: 32px; position: relative; }
.sign.double::before, .sign.double::after {
  content: ""; position: absolute; top: 2px; width: 13px; height: 13px;
  background: #0d0f1e; transform: rotate(45deg); box-shadow: 0 0 0 2px #c9cbe0;
}
.sign.double::before { left: 2px; }
.sign.double::after { right: 2px; }
.sign.secret { background: var(--amber); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.sign.wipe { background: #555b85; clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
.grade { display: flex; flex-direction: column; gap: 5px; }
.grade-track { position: relative; height: 10px; background: #262a48; overflow: hidden; }
.grade-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, var(--green) 0 35%, var(--blue) 35% 60%, #c9cbe0 60% 80%, #f4f3ff 80% 92%, var(--amber) 92%);
  background-size: 500px 100%; transition: width .8s steps(12);
}
.grade-fill.secret { background: var(--amber); }
.grade-scale { display: flex; justify-content: space-between; font-size: 8px; }
.grade-detail { text-align: center; font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.board-label { margin-top: 2px; }
.board { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.board li.tier { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: #1d2140; }
.board .pts { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; color: var(--amber); text-transform: uppercase; }
.board .tier-answers { font-size: 15px; line-height: 1.5; color: #c9c7da; }
.board mark { background: var(--ice); color: #14182c; padding: 0 3px; }
.board .more { color: #8f8daa; }
#btn-next {
  position: sticky; bottom: 0; margin: 4px -20px 0; width: calc(100% + 40px); min-height: 52px; clip-path: none;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Phones ---------- */
@media (max-width: 520px) {
  .stat { min-width: 76px; padding: 7px 10px 5px; }
  .val { font-size: 21px; }
  .sq { width: 11px; height: 11px; }
  .progress .lbl { font-size: 8px; }
  .card { top: calc(var(--top) + 128px); padding: 13px 16px 12px; }
  .timer { width: 46px; height: 46px; }
  .act { padding: 0 16px; }
  .act.big { padding: 0 34px; }
  .res-title { font-size: 22px; }
  .result { max-height: min(54vh, calc(100% - 360px)); }
}
/* The smallest phones (320 px wide): smaller question text, so a long question, the guesses line and
   the hint's Yes/No buttons all stay above the answer bar. */
@media (max-width: 359px) {
  .prompt { font-size: 18px; margin: 8px 0; }
  .hint-box { margin-top: 4px; }
}
/* Short screens (landscape phones): tuck the card up and let the sheets use the height. */
@media (max-height: 560px) {
  .card { top: calc(var(--top) + 70px); padding-top: 10px; padding-bottom: 10px; }
  .prompt { font-size: 18px; margin: 6px 0; }
  .card .guesses, .card .hint { display: inline-block; margin: 0 14px 0 0; } /* side by side: there's width to spare */
  .hint-box { margin-top: 4px; }
  .on-run #btn-mute.mutebtn { top: calc(var(--top) + 70px); }
  #btn-home.homebtn { top: calc(var(--top) + 70px); }
  .result { max-height: calc(100% - 120px); }
  .title-screen { top: calc(var(--top) + 76px); gap: 8px; }
}
/* While the phone keyboard is up, keep only what's needed to answer. */
.keyboard-open .hud, .keyboard-open .mutebtn { opacity: 0; pointer-events: none; }
.keyboard-open .card { top: calc(var(--top) + 10px); }

@media (prefers-reduced-motion: reduce) {
  .card, .result { transition: none; animation: none; }
  .float.show { animation: hold 1.8s linear forwards; }
  .act:active { transform: none; }
  #btn-play::after { animation: none; display: none; }
}
/* The same, when "Reduce motion" is switched on in Settings. */
.reduce-motion .card, .reduce-motion .result { transition: none; animation: none; }
.reduce-motion .float.show { animation: hold 1.8s linear forwards; }
.reduce-motion .act:active { transform: none; }
.reduce-motion #btn-play::after { animation: none; display: none; }

/* ---------- Locker: streaks, skins, sky themes ---------- */
.sheet.wide { width: min(560px, calc(100% - 32px)); }
.dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; background: var(--amber); vertical-align: 1px; }
.lstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lstats div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #1d2140; }
.lstats .lbl { font-size: 8px; letter-spacing: .12em; }
.lstats b { font-size: 22px; font-weight: 500; color: var(--ice); font-variant-numeric: tabular-nums; line-height: 1.1; }
.lstats small { font-family: var(--f-label); font-size: 9px; letter-spacing: .1em; color: var(--muted); min-height: 1em; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme {
  border: 0; cursor: pointer; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge);
  font-family: var(--f-label); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.theme i { display: block; width: 100%; height: 34px; }
.theme[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ice); }
.t-dusk i { background: linear-gradient(#20244a, #4d4675 55%, #b4818f 90%, #d9a08f); }
.t-sunset i { background: radial-gradient(circle at 28% 78%, #f6d3a0 0 6px, transparent 7px), linear-gradient(#2e2548, #7a4f6e 55%, #d39687 90%, #efb48f); }
.t-night i { background: radial-gradient(circle at 76% 30%, #e9e1d9 0 4px, transparent 5px), linear-gradient(#0d1127, #1b2146 60%, #38406c); }
.t-aurora i { background: linear-gradient(170deg, transparent 20%, rgba(111, 211, 166, .55) 32%, transparent 45%, rgba(154, 127, 224, .45) 58%, transparent 70%), linear-gradient(#0a1024, #13213f 60%, #203a58); }
.skins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: -6px; }
.skin {
  border: 0; cursor: pointer; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge); color: var(--ink);
}
.skin canvas { width: 72px; height: 84px; image-rendering: pixelated; image-rendering: crisp-edges; }
.skin b { font-weight: 500; font-size: 14px; line-height: 1.1; }
.skin small { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; color: var(--muted); line-height: 1.4; }
.skin.on { box-shadow: inset 0 0 0 2px var(--ice); }
.skin.on small { color: var(--ice); }
.skin.locked { cursor: default; }
.skin.locked canvas { filter: grayscale(1) brightness(.45); }
.skin.locked b { color: var(--muted); }
.unlocks { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(232, 189, 116, .08); box-shadow: inset 0 0 0 1px rgba(232, 189, 116, .45); }
.tabs { align-self: flex-start; }
/* Player account: each tab's panel */
.tabpanel { display: flex; flex-direction: column; gap: 14px; }
.lstats .wide { grid-column: 1 / -1; }

/* Achievements tab: a summary, then each category's cards. The difficulty is the ski sign
   (.sign: green circle easy, blue square medium, black diamond hard, double black expert, stash star secret). */
.ach-summary { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge); }
.ach-total { margin: 0; font-size: 16px; color: var(--muted); }
.ach-total b { font-size: 26px; font-weight: 500; color: var(--amber); font-variant-numeric: tabular-nums; }
.ach-diffs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-family: var(--f-label); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.ach-diffs li { display: flex; align-items: center; gap: 6px; }
.ach-diffs .sign { width: 12px; height: 12px; }
.ach-diffs .sign.black { transform: rotate(45deg) scale(.78); }
/* The double black diamond, sized down to sit with the other signs */
.ach-diffs .sign.double { width: 22px; }
.ach-diffs .sign.double::before, .ach-diffs .sign.double::after { top: 2px; width: 8px; height: 8px; }
.ach > .sign.double, .ach-new .sign.double { width: 26px; }
.ach > .sign.double::before, .ach > .sign.double::after, .ach-new .sign.double::before, .ach-new .sign.double::after { top: 4px; width: 10px; height: 10px; }
.ach-note { margin: 0; font-size: 14px; line-height: 1.25; color: var(--muted); }
.ach-prog { display: flex; align-items: center; gap: 8px; }
.ach-bar { flex: 1; height: 6px; background: #12152b; box-shadow: inset 0 0 0 1px var(--panel-edge); }
.ach-bar i { display: block; height: 100%; background: var(--ice); }
.ach-summary .ach-bar i { background: var(--amber); }
.ach-prog small { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ach-cat { display: flex; flex-direction: column; gap: 8px; }
.ach-cat h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-weight: 400; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ach { display: flex; align-items: flex-start; gap: 10px; padding: 10px; background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge); min-width: 0; }
.ach > .sign { margin-top: 2px; }
.ach.done { box-shadow: inset 0 0 0 2px rgba(232, 189, 116, .7); }
.ach-body { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.ach-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ach-top b { font-weight: 500; font-size: 15px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.ach-diff { flex: none; font-family: var(--f-label); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ach-body > small { font-family: var(--f-body); font-size: 14px; line-height: 1.2; color: var(--muted); }
.ach-body > .ach-tier { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ice); }
.ach-reward { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ach-reward canvas { width: 24px; height: 28px; image-rendering: pixelated; image-rendering: crisp-edges; }
.ach-reward span { display: block; width: 28px; }
.ach-reward span i { display: block; height: 16px; box-shadow: inset 0 0 0 1px var(--panel-edge); }
.ach-reward small { font-family: var(--f-body); font-size: 13px; line-height: 1.2; color: var(--ice); }
.ach-when { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; color: var(--amber); }
.ach.locked b { color: var(--muted); }
.ach.locked > .sign { opacity: .45; }
.ach.locked .ach-reward canvas, .ach.locked .ach-reward span i { filter: grayscale(1) brightness(.5); }
.ach.locked .ach-reward small { color: var(--muted); }
.ach.secret.locked b { letter-spacing: .12em; }
/* New achievements on the finish screen */
.ach-new { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ach-new li { display: flex; align-items: flex-start; gap: 10px; }
.ach-new li > span { display: flex; flex-direction: column; gap: 2px; }
.ach-new b { font-weight: 500; font-size: 15px; }
.ach-new small { font-size: 14px; line-height: 1.2; color: var(--muted); }
.ach-new .sign { margin-top: 2px; }
.ach-new .more { font-size: 14px; color: var(--muted); padding-left: 28px; }

/* News: the latest update's notes, Added / Changed / Removed, and the build number */
.news-body { display: flex; flex-direction: column; gap: 14px; }
.news-sec { display: flex; flex-direction: column; gap: 8px; }
.news-sec h3 { margin: 0; font-weight: 400; }
.news-sec.added h3 { color: var(--green); }
.news-sec.changed h3 { color: var(--ice); }
.news-sec.removed h3 { color: var(--coral); }
.news-sec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.3; }
/* Earlier updates, below the latest: a small version line over smaller notes. */
.news-old { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 2px solid var(--panel-edge); }
.news-ver { font-family: var(--f-label); font-size: 9px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.news-old .news-sec ul { font-size: 14px; }
.build { align-self: flex-end; margin: 0; font-family: var(--f-label); font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.seg.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; box-shadow: none; }
.tabs button {
  min-height: 42px; padding: 0 10px; font-size: 11px; color: var(--ink);
  background: rgba(16, 18, 36, .6); box-shadow: inset 0 0 0 2px var(--panel-edge);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.tabs button:hover { box-shadow: inset 0 0 0 2px var(--ice); }
.seg button[aria-selected="true"] { background: var(--ice); color: var(--btn-ink); box-shadow: inset 0 0 0 2px var(--ice); }
.theme small { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; color: var(--muted); text-transform: none; }
.theme[aria-checked="true"] small { color: var(--ice); }
.theme.locked { cursor: default; }
.theme.locked i { filter: grayscale(1) brightness(.5); }
.theme.locked span { color: var(--muted); }
/* For sale: tappable, with the price on an amber tag */
.skin.forsale, .theme.forsale { cursor: pointer; }
.forsale small { align-self: center; padding: 2px 6px; background: var(--amber); color: var(--btn-ink); letter-spacing: .1em; }
.forsale canvas, .theme.forsale i { filter: none !important; }
.skin.forsale b, .theme.forsale span { color: var(--ink); }
/* Stays in view at the bottom of the sheet, next to whatever was tapped. */
.shop-msg { position: sticky; bottom: -22px; z-index: 1; padding: 10px 12px; font-size: 15px; line-height: 1.35; background: linear-gradient(rgba(232, 189, 116, .1), rgba(232, 189, 116, .1)), var(--panel-solid); box-shadow: inset 0 0 0 1px rgba(232, 189, 116, .45); }
.skin.mini { flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; flex-wrap: wrap; }
.skin.mini canvas { width: 48px; height: 56px; }
@media (max-width: 520px) {
  .lstats, .themes { grid-template-columns: repeat(2, 1fr); }
  .skins { grid-template-columns: repeat(3, 1fr); }
  .ach-grid { grid-template-columns: 1fr; }
  /* The home bar (Settings, Archive, News) would cover today's squares: they show once you're skiing. */
  .on-home .progress { visibility: hidden; }
}

/* Home: the menu buttons sit side by side in equal columns on phones. */
@media (max-width: 560px) {
  .title-screen .row-btns { display: grid; grid-template-columns: 1fr 1fr; width: min(340px, 100%); }
}
.title-screen .row-btns .act { min-width: 150px; }

/* Day streak on the home screen */
.daystreak { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 17px; line-height: 1.1; }
.daystreak .flame { width: 18px; height: 24px; flex: none; }
.daystreak > span { white-space: nowrap; }
.daystreak b { font-size: 24px; font-weight: 600; color: var(--coral); font-variant-numeric: tabular-nums; }
.daystreak small { font-family: var(--f-label); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding-left: 10px; box-shadow: inset 1px 0 0 var(--panel-edge); }
.daystreak.due small { color: var(--amber); }
.daystreak.cold .flame { filter: grayscale(1) brightness(.7); }
.daystreak.cold b { color: var(--muted); }
/* Streak freezes held: a snowflake and the count */
.daystreak .freeze { display: inline-flex; align-items: center; gap: 4px; color: var(--ice); }
.daystreak .freeze svg { width: 14px; height: 14px; }
.daystreak .freeze b { font-size: 17px; color: var(--ice); }
.daystreak.ended small { color: var(--coral); }
.daystreak small { text-wrap: balance; }

/* Home, once today is skied: time to the next day's runs, and a peek at tomorrow's topics */
.nextrun { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: -2px 0 0; padding: 8px 14px;
  background: var(--panel); font-family: var(--f-label); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.nextrun small { font-family: var(--f-body); font-size: 14px; letter-spacing: 0; text-transform: none; color: #d8d2e6; text-wrap: balance; }

/* ---------- Settings ---------- */
.settings { gap: 16px; }
/* Starts below the top corner buttons so they stay tappable. */
.sheet.settings, #screen-locker, #screen-news { top: calc(var(--top) + 128px); transform: translateX(-50%); max-height: calc(100% - 144px - env(safe-area-inset-bottom, 0px)); }
.sgroup { display: flex; flex-direction: column; gap: 8px; }
.srow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 12px; background: #1d2140; box-shadow: inset 0 0 0 1px var(--panel-edge);
}
label.srow { cursor: pointer; }
.sname { display: flex; flex-direction: column; gap: 2px; font-size: 16px; line-height: 1.2; }
.sname small { font-family: var(--f-label); font-size: 9px; letter-spacing: .08em; color: var(--muted); line-height: 1.5; }
.skinnow { flex-direction: row; align-items: center; gap: 10px; }
.skinnow > span { display: flex; flex-direction: column; gap: 2px; }
.skinnow small { color: var(--ice); }
.skinnow canvas { width: 36px; height: 44px; image-rendering: pixelated; image-rendering: crisp-edges; }
.act.sm { min-height: 40px; padding: 0 14px; font-size: 10px; letter-spacing: .12em; }
.act.warn { box-shadow: inset 0 0 0 2px var(--coral); color: #f2c4bf; }

/* on/off switch: a pixel pill with a square knob */
.switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 46px; height: 26px; position: relative; background: #2b2f55; box-shadow: inset 0 0 0 2px var(--panel-edge);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
  transition: background .15s;
}
.switch::after { content: ""; position: absolute; top: 5px; left: 5px; width: 16px; height: 16px; background: var(--muted); transition: transform .15s, background .15s; }
.switch:checked { background: #2f6f78; box-shadow: inset 0 0 0 2px var(--ice); }
.switch:checked::after { transform: translateX(20px); background: var(--ice); }
.reduce-motion .switch, .reduce-motion .switch::after { transition: none; }

/* volume slider */
.slide { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 260px; }
.slide output { font-family: var(--f-label); font-size: 11px; color: var(--ice); min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { flex: 1; min-width: 0; height: 26px; margin: 0; background: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
input[type="range"]:disabled { opacity: .4; cursor: default; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: #2b2f55; box-shadow: inset 0 0 0 1px var(--panel-edge); }
input[type="range"]::-moz-range-track { height: 6px; background: #2b2f55; }
input[type="range"]::-moz-range-progress { height: 6px; background: var(--ice); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 20px; margin-top: -7px; background: var(--ice); border: 0; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 20px; background: var(--ice); border: 0; border-radius: 0; }

/* segmented choice (animation speed) */
.seg { display: inline-flex; flex: none; box-shadow: inset 0 0 0 1px var(--panel-edge); }
.seg button {
  min-height: 40px; padding: 0 10px; border: 0; cursor: pointer; background: transparent; color: var(--muted);
  font-family: var(--f-label); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.seg button[aria-checked="true"] { background: var(--ice); color: var(--btn-ink); }

.confirm { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(229, 134, 127, .1); box-shadow: inset 0 0 0 1px rgba(229, 134, 127, .55); }
.confirm p { font-size: 15px; text-align: center; }
.settings .form-msg:empty { display: none; }
/* credits: the role on the left, the name on the right (underlined when it links somewhere) */
.credits { gap: 12px; min-height: 44px; font-size: 16px; }
.credits a, .credits .who { color: var(--ice); }
.credits a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.credits a:hover { color: var(--amber); }
@media (max-width: 420px) {
  .srow { padding: 8px 10px; }
  .seg button { padding: 0 7px; }
}

/* Small mixed-case notes read better in the body face than in tiny capitals. */
.sname small, .skin small, .theme small, .lstats small, .skinnow small {
  font-family: var(--f-body); font-size: 14px; letter-spacing: .02em; text-transform: none; line-height: 1.2;
}

/* A short message at the top: a day that's still loading, the easter egg. */
.toast {
  position: fixed; top: calc(var(--top) + 12px); left: 50%; transform: translateX(-50%); z-index: 20;
  padding: 8px 12px; font-family: var(--f-label); font-size: 11px; color: var(--amber);
}

/* How to play: About the answers */
#screen-how h3 { margin: 6px 0 0; font-size: 11px; font-weight: 400; } /* Silkscreen is loaded at 400 only: no fake bold */
.faq { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.4; }
.faq dt { color: var(--ink); font-weight: 600; margin-top: 4px; }
.faq dd { margin: 0; color: #c9c7da; }
