/* Fonts are self-hosted (SIL Open Font License, see assets/fonts/OFL-*.txt). */
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-serif-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-serif-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/noto-serif-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/noto-serif-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-serif-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Serif'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-serif-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/pixelify-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* Pixelify's 5 is drawn like its S (FL 305 read as FL 30S), so digits come from a
   re-spaced Silkscreen cut: tools/pixel_digits.py. Declared last, so it wins for 0-9. */
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/pixel-digits.woff2) format('woff2'); unicode-range: U+0030-0039; }
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/pixel-digits.woff2) format('woff2'); unicode-range: U+0030-0039; }

:root {
  --bg: #F1EADD;
  --card: #FBF6EC;
  --paper: #FFFFFF;
  --ink: #2A1E1B;
  --muted: #6B5F55;
  --soft: #4A413B;
  --clay: #B85F3C;
  --clay-dark: #8E4428;
  --good: #3D8B4F;
  --good-bg: #E3F1DF;
  --mid: #C98A12;
  --mid-bg: #FBEFCF;
  --bad: #A8392C;
  --bad-bg: #F7E0DA;
  --serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --pixel: 'Pixelify Sans', 'Courier New', monospace;
  --label: 'Noto Serif', Georgia, 'Times New Roman', serif;   /* small caps labels in the page's own text font, not a pixel face */
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  /* skeuomorphic pixel bevel: light top-left, shade bottom-right, like the icons */
  --bevel: inset 3px 3px 0 rgba(255, 255, 255, 0.75), inset -3px -3px 0 rgba(42, 30, 27, 0.13);
  --bevel-dark: inset 3px 3px 0 rgba(255, 255, 255, 0.28), inset -3px -3px 0 rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  overflow-wrap: break-word;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
img.px { image-rendering: crisp-edges; image-rendering: pixelated; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.label {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.card {
  background: var(--card);
  border: 3px solid var(--ink);
  box-shadow: var(--bevel), var(--shadow-lg);
  padding: 20px 18px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--card);
  box-shadow: var(--bevel), var(--shadow);
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn:active { transform: translate(2px, 2px); box-shadow: inset 3px 3px 0 rgba(42, 30, 27, 0.14), 2px 2px 0 var(--ink); }
@media (hover: hover) { .btn:hover:not(:disabled) { background-color: #FFFDF7; } .btn-primary:hover:not(:disabled) { background-color: #C46A45; } }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--clay); color: var(--card); box-shadow: var(--bevel-dark), var(--shadow); }
.btn-primary:active { box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.2), 2px 2px 0 var(--ink); }
.btn-wide { width: 100%; }
.btn-small { min-height: 40px; font-size: 15px; padding: 6px 12px; }
.linkbtn {
  appearance: none; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-family: var(--label); font-size: 13px; color: var(--ink); text-align: left; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.linkbtn:hover { color: var(--clay-dark); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

/* ---------- home ---------- */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.streak-chip {
  display: flex; align-items: center; gap: 2px; padding: 0 10px 0 2px;
  border: 3px solid var(--ink); background: var(--card); font-family: var(--label); font-size: 14px;
}
.streak-chip img { width: 32px; height: 32px; }
.hero-title { margin: 6px 0 0; font-family: var(--pixel); font-size: 46px; font-weight: 700; line-height: 0.95; }
.hero-copy { margin: 0; color: var(--soft); font-size: 15px; }
.mix { display: grid; grid-template-columns: repeat(10, minmax(0, 32px)); justify-content: space-between; min-height: 32px; margin-top: 6px; }
.mix img { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.home-card { display: flex; flex-direction: column; gap: 14px; }
.played-line { font-size: 17px; margin: 0; }
.played-line strong { font-family: var(--pixel); font-size: 26px; }
.countdown { font-family: var(--label); font-size: 12px; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { border: 3px solid var(--ink); background: var(--card); padding: 10px 6px; text-align: center; box-shadow: var(--bevel), 3px 3px 0 var(--ink); }
.stat b { display: block; font-family: var(--pixel); font-size: 24px; line-height: 1.1; }
.stat span { font-family: var(--label); font-size: 10px; color: var(--muted); text-transform: uppercase; }
.links { display: flex; flex-direction: column; gap: 4px; }
.links img { width: 32px; height: 32px; }
.foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------- play ---------- */
.playbar { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  appearance: none; width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0;
  border: 3px solid var(--ink); background: var(--card); cursor: pointer; font-family: var(--pixel); font-size: 20px; line-height: 1;
  box-shadow: var(--bevel), 3px 3px 0 var(--ink);
}
.icon-btn .pxi { width: 24px; height: 24px; display: block; }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: inset 3px 3px 0 rgba(42, 30, 27, 0.14), 1px 1px 0 var(--ink); }
@media (hover: hover) { .icon-btn:hover { background-color: #FFFDF7; } }
.pips { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; flex: 1; }
.pip { height: 14px; border: 2px solid var(--ink); background: var(--card); }
.pip.now { background: var(--clay); }
.pip.T { background: var(--good); }
.pip.C { background: var(--mid); }
.pip.M { background: var(--ink); }
.runscore { font-family: var(--pixel); font-weight: 700; font-size: 20px; min-width: 52px; text-align: right; }

.qmeta { display: flex; align-items: center; gap: 8px; }
.qmeta img { width: 32px; height: 32px; }
.diff { display: inline-flex; gap: 2px; margin-left: auto; }
.diff i { width: 8px; height: 8px; border: 1.5px solid var(--ink); display: block; }
.diff i.on { background: var(--ink); }
.qtext { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; hyphens: auto; }
.qtext .qask { display: block; }
.qtext .qhook { display: block; margin: 0 0 8px; font-size: 0.8em; font-weight: 400; color: var(--soft); }
/* Picture questions: pixel art in a pixel frame. An ink outline with notched corners,
   a paper mat with the same bevel as the buttons, and the same hard shadow. Logos sit
   on one of the paper tints; photos and flags get a printed edge. */
.qimg {
  --n: 4px;
  --notch: polygon(0 var(--n), var(--n) var(--n), var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n),
    100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%,
    var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)));
  position: relative; margin: 2px 6px 14px 0;
}
.qimg::before { content: ''; position: absolute; inset: 6px -6px -6px 6px; background: var(--ink); clip-path: var(--notch); }
.qframe { position: relative; background: var(--ink); padding: 4px; clip-path: var(--notch); }
.qmat { display: grid; place-items: center; min-height: 132px; padding: 14px; background: var(--card); box-shadow: var(--bevel); }
.qmat.t1 { background: var(--mid-bg); }
.qmat.t2 { background: var(--good-bg); }
.qmat.t3 { background: var(--bad-bg); }
.qimg img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.qimg.photo img, .qimg.flag img { box-shadow: 0 0 0 3px var(--ink); }
.qcredit { margin: -4px 0 8px; font: 400 9px/1.4 var(--label); letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.qcredit a { color: inherit; }

.timer { height: 10px; border: 2px solid var(--ink); background: var(--card); position: relative; overflow: hidden; }
.timer > i { position: absolute; inset: 0; transform-origin: left center; background: var(--ink); }
.timer.low > i { background: var(--bad); }

.answer-form { display: flex; gap: 8px; }
.answer-form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 14px;
  border: 3px solid var(--ink); border-radius: 0; background: var(--paper); font-size: 19px; font-family: var(--serif);
  box-shadow: inset 2px 2px 0 rgba(42, 30, 27, 0.08);
}
.answer-form input::placeholder { color: #9A8F86; }
.answer-form input:focus, .answer-form input:focus-visible { outline: none; border-color: var(--clay-dark); box-shadow: 4px 4px 0 var(--clay); }
.answer-form input[readonly] { background: var(--card); }
.answer-form .btn { min-height: 54px; min-width: 64px; }
.shake { animation: shake 0.32s linear; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.hint { min-height: 22px; font-size: 14px; color: var(--muted); margin: -4px 0 0; }
.hint.warn { color: var(--bad); }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice {
  appearance: none; min-height: 58px; padding: 8px 10px; text-align: left; display: flex; gap: 8px; align-items: center;
  border: 3px solid var(--ink); background: var(--card); box-shadow: var(--shadow); cursor: pointer; font-family: var(--serif); font-size: 16px; line-height: 1.2;
}
.choice b { font-family: var(--label); font-size: 12px; flex: none; }
.choice span, .feedback > :last-child { min-width: 0; overflow-wrap: anywhere; }
.choice:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.choice.right { background: var(--good-bg); border-color: var(--good); }
.choice.wrong { background: var(--bad-bg); border-color: var(--bad); }
.choice:disabled { cursor: default; }

.feedback { border: 3px solid var(--ink); padding: 12px 14px; display: flex; gap: 12px; align-items: center; background: var(--card); box-shadow: var(--bevel); }
.feedback .big { font-family: var(--pixel); font-weight: 700; font-size: 26px; line-height: 1; }
.feedback.T { background: var(--good-bg); }
.feedback.C { background: var(--mid-bg); }
.feedback.M { background: var(--bad-bg); }
.feedback p { margin: 0; font-size: 15px; }

/* ---------- results ---------- */
.score-big { font-family: var(--pixel); font-size: 72px; font-weight: 700; line-height: 0.9; margin: 2px 0 0; }
.rank { font-family: var(--label); font-size: 16px; color: var(--clay-dark); }
.better { font-size: 19px; line-height: 1.35; margin: 0; }
.better strong { font-family: var(--pixel); font-size: 24px; }
.grid10 { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.grid10 i { aspect-ratio: 1; border: 2px solid var(--ink); display: block; }
.grid10 i.T { background: var(--good); }
.grid10 i.C { background: var(--mid); }
.grid10 i.M { background: var(--ink); }
.grid10.reveal i { animation: g10-in 0.18s steps(3) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes g10-in { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.top-btns { display: flex; gap: 10px; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 12px; height: 12px; border: 2px solid var(--ink); display: inline-block; }
.hist { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; border-bottom: 3px solid var(--ink); }
.hist i { display: block; background: #C9BCA8; min-height: 2px; }
.hist i.me { background: var(--clay); }
.hist-axis { display: flex; justify-content: space-between; font-family: var(--label); font-size: 10px; color: var(--muted); }
.review { display: flex; flex-direction: column; gap: 10px; }
.rev { border: 3px solid var(--ink); background: var(--card); padding: 12px; display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; }
.rev img { width: 32px; height: 32px; }
.rev h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.3; }
.rev p { margin: 0; font-size: 14px; color: var(--soft); }
.rev .pts { font-family: var(--pixel); font-weight: 700; font-size: 18px; text-align: right; }
.rev .pts small { display: block; font-family: var(--label); font-size: 10px; color: var(--muted); font-weight: 400; }
.tag { display: inline-block; font-family: var(--label); font-size: 10px; padding: 1px 5px; border: 2px solid var(--ink); margin-right: 6px; }
.tag.T { background: var(--good-bg); }
.tag.C { background: var(--mid-bg); }
.tag.M { background: var(--bad-bg); }
.row-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- practice ---------- */
.catgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 480px) { .catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat {
  appearance: none; min-height: 124px; border: 3px solid var(--ink); background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font-family: var(--label); font-size: 12px; text-transform: uppercase; padding: 10px;
}
.cat:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.cat img { width: 64px; height: 64px; }
.cat .mosaic { display: grid; grid-template-columns: repeat(2, 32px); }
.cat .mosaic img { width: 32px; height: 32px; }

/* ---------- misc ---------- */
.center { text-align: center; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--ink); border-right-color: transparent; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { border: 3px solid var(--bad); background: var(--bad-bg); padding: 14px; }
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: var(--ink); color: var(--card); padding: 10px 16px; font-family: var(--label); font-size: 13px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
dialog.sheet {
  border: 3px solid var(--ink); box-shadow: var(--shadow-lg); background: var(--card); color: var(--ink);
  padding: 22px 20px; max-width: min(440px, calc(100vw - 32px)); width: 100%;
}
dialog.sheet::backdrop { background: rgba(42, 30, 27, 0.45); }
dialog.sheet h2 { font-family: var(--pixel); font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
dialog.sheet ul { padding-left: 20px; margin: 0 0 16px; }
dialog.sheet li { margin-bottom: 8px; }
dialog.sheet .fine { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
dialog.sheet .fine a { color: var(--clay-dark); }
dialog.sheet p { margin: 0 0 16px; }
.copy-text {
  width: 100%; margin: 0 0 14px; padding: 10px 12px; border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font: 15px/1.4 var(--serif); resize: none;
}

@media (min-width: 720px) {
  .wrap { max-width: 540px; padding-top: 36px; gap: 20px; }
  .qtext { font-size: 28px; }
  .brand-name { font-size: 22px; }
}
@media (max-height: 640px) {
  .qtext { font-size: 21px; }
  .hero-title { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- home: a quiet page. Masthead, the three Dailyables, Today's Ten, a line of links ---------- */
.wrap.home { gap: 40px; padding-top: max(36px, env(safe-area-inset-top)); padding-bottom: max(36px, env(safe-area-inset-bottom)); }
.hm-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hm-head .logo-top { max-width: 260px; margin: 0 auto; }
.hm-date { margin: 12px 0 0; font: 400 11px/1 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.hm-dly { display: flex; flex-direction: column; gap: 22px; }
.hm-kicker { margin: 0; display: flex; align-items: center; gap: 16px; font: 400 11px/1 var(--label); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.hm-kicker::before, .hm-kicker::after { content: ''; flex: 1; height: 1px; background: rgba(42, 30, 27, 0.18); }
/* the Dailyables as small raised buttons: the logo at 2x (192x128, whole pixels everywhere) in an ink
   frame that sits on a deep edge in the game's own night colour; it lifts on hover and presses down */
.dly-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.dly { --edge: #4A3A60; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; color: var(--ink); text-decoration: none; }
.dly-climb { --edge: #33466F; }
.dly-redcarpet { --edge: #8C1A30; }
.dly-neonrow { --edge: #4A2C86; }
.dly-wanted { --edge: #8A2A6E; }
.dly-art {
  position: relative; display: block; width: 100%; max-width: 196px; background: #07060F;
  border: 2px solid var(--ink);
  box-shadow: 0 6px 0 var(--edge), 0 6px 0 2px var(--ink), 0 16px 18px -6px rgba(42, 30, 27, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
/* a bevel over the art: a light top-left edge, a shaded bottom-right, like a key cap */
.dly-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.28), inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}
.dly-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; image-rendering: crisp-edges; image-rendering: pixelated; }
.dly-name { display: inline-flex; align-items: center; gap: 5px; font: 400 15px/1.2 var(--serif); white-space: nowrap; letter-spacing: 0.01em; text-align: center; }
.dly-tick { font-style: normal; font-size: 12px; color: var(--good); }
@media (hover: hover) {
  .dly:hover .dly-art { transform: translateY(-2px); box-shadow: 0 8px 0 var(--edge), 0 8px 0 2px var(--ink), 0 20px 22px -6px rgba(42, 30, 27, 0.38); }
  .dly:hover .dly-name { color: var(--clay-dark); }
}
.dly:active .dly-art { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 1px 0 2px var(--ink), 0 4px 8px -4px rgba(42, 30, 27, 0.35); transition-duration: 0.05s; }
.dly:focus-visible { outline: none; }
.dly:focus-visible .dly-art { outline: 3px solid var(--clay); outline-offset: 5px; }

.ten-bar {
  display: grid; align-items: center; gap: 14px 18px; padding: 22px 0;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas: "badge text" "go go" "err err";
  border-top: 1px solid rgba(42, 30, 27, 0.18); border-bottom: 1px solid rgba(42, 30, 27, 0.18);
}
.ten-bar.is-done { grid-template-areas: "badge text" "btns btns"; align-items: start; }
.ten-badge { grid-area: badge; width: 48px; height: 48px; image-rendering: crisp-edges; image-rendering: pixelated; }
.ten-text { grid-area: text; min-width: 0; }
.ten-title { margin: 0; font: 600 22px/1.15 var(--serif); letter-spacing: -0.01em; }
.ten-copy { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.ten-copy strong { font-weight: 600; color: var(--ink); }
.ten-better { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.ten-better strong { font-weight: 600; color: var(--soft); }
.ten-bar .grid10 { margin-top: 12px; max-width: 220px; gap: 3px; }
.ten-bar .grid10 i { border-width: 1px; }
.ten-go { grid-area: go; min-height: 44px; font-size: 16px; padding: 8px 22px; }
.ten-err { grid-area: err; }
.ten-err:empty { display: none; }
.ten-btns { grid-area: btns; display: flex; align-items: center; gap: 20px; }
.ten-btns .btn { min-height: 44px; font-size: 16px; padding: 8px 22px; }

.hm-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; }
.hm-foot > * { padding: 4px 12px; font: 400 11px/1.4 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hm-foot .linkbtn { color: var(--ink); }
.hm-foot .linkbtn:hover { color: var(--clay-dark); }
.hm-foot .countdown { font-size: 11px; }

/* General knowledge: every category as a small paper key, one tap to a round of ten */
.hm-gk { display: flex; flex-direction: column; gap: 22px; }
.gk-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gk {
  appearance: none; flex: 0 0 calc((100% - 30px) / 4); min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 11px;
  background: var(--card); color: var(--ink); cursor: pointer; font: inherit;
  border: 1px solid rgba(42, 30, 27, 0.22); box-shadow: 0 3px 0 rgba(42, 30, 27, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
a.gk { text-decoration: none; }
.gk-ic { display: block; height: 32px; }
.gk-ic img { display: block; width: 32px; height: 32px; image-rendering: crisp-edges; image-rendering: pixelated; }
.gk-ic .mosaic { display: grid; grid-template-columns: repeat(2, 16px); }
.gk-ic .mosaic img { width: 16px; height: 16px; }
.gk-name { font: 400 13px/1.2 var(--serif); text-align: center; white-space: nowrap; }
.gk-note { margin: 0; text-align: center; font-size: 13px; line-height: 1.4; color: var(--muted); }
@media (hover: hover) {
  .gk:hover { transform: translateY(-2px); border-color: rgba(42, 30, 27, 0.4); box-shadow: 0 5px 0 rgba(42, 30, 27, 0.2), 0 12px 16px -12px rgba(42, 30, 27, 0.4); }
  .gk:hover .gk-name { color: var(--clay-dark); }
}
.gk:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(42, 30, 27, 0.18); }
.gk:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

/* the "Did you know?" line under an answer */
.fact { margin: 10px 0 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; color: var(--soft); background: rgba(255, 255, 255, 0.45); border-left: 3px solid var(--clay); }
.fact span { display: block; margin-bottom: 2px; font: 400 10px/1.2 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay-dark); }

/* laptops and tablets: a narrow column in a lot of paper; logos at 2x, whole pixels */
@media (min-width: 720px) {
  .wrap.home { --home-w: 720px; max-width: none; padding: 72px 32px 56px; gap: 64px; align-items: center; }
  .wrap.home > * { width: 100%; max-width: var(--home-w); }
  .hm-head .logo-top { max-width: 300px; }
  .hm-date { margin-top: 16px; }
  .hm-dly { gap: 28px; }
  .dly-row { display: flex; justify-content: space-between; gap: 0; }
  .dly-art { width: 148px; }               /* 1.5x on tablets so all four fit */
  .dly { gap: 12px; }
  .ten-bar { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "badge text go" "err err err"; gap: 12px 22px; padding: 26px 4px; }
  .ten-bar.is-done { grid-template-areas: "badge text btns"; }
  .ten-btns { flex-direction: row-reverse; align-self: center; }
  .ten-go { min-width: 120px; }
  .hm-foot > * + * { border-left: 1px solid rgba(42, 30, 27, 0.2); }
  .gk-grid { gap: 12px; }
  .gk { flex-basis: calc((100% - 60px) / 6); padding: 16px 4px 12px; }
}

/* laptops: a slightly wider column so all four Dailyables fit at 2x */
@media (min-width: 1000px) {
  .wrap.home { --home-w: 880px; }
  .dly-art { width: 196px; }               /* 192 + the frame: 2x, whole pixels */
}

.logo-top { display: block; width: 100%; max-width: 300px; height: auto; margin: 2px 0 6px; }

/* ---------- how rare was that? ---------- */
.rarity {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px;
  border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--bevel), 3px 3px 0 var(--ink);
}
.rarity img { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }
.rarity b { display: block; font-family: var(--label); font-weight: 400; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gem, var(--ink)); }
.rarity span { display: block; font-size: 13px; color: var(--soft); line-height: 1.3; }
.rarity.pop { animation: rarity-pop 0.32s steps(4) both; }
@keyframes rarity-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.review .gem { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; }

/* Pixelify Sans draws "fi" as a ligature that reads like "A" */
* { font-variant-ligatures: none !important; }

/* ---------- SEO: the home page's H1 is the logo; a quiet, crawlable footer under the home screen ---------- */
.logo-h1 { margin: 0; line-height: 0; width: 100%; }
#app { min-height: 100vh; min-height: 100svh; }   /* keeps the footer below the fold until the home screen has drawn */
.site-foot { max-width: 720px; margin: 0 auto; padding: 8px 18px max(40px, env(safe-area-inset-bottom)); color: var(--soft); font-size: 14px; line-height: 1.55; }
.site-foot h2 { margin: 22px 0 6px; font: 400 11px/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.site-foot h3 { margin: 12px 0 2px; font: 600 14px/1.4 var(--serif); color: var(--ink); }
.site-foot p { margin: 0 0 8px; }
.site-foot a { color: var(--clay-dark); }
#app:not(.home) ~ .site-foot { display: none; }   /* hidden while a game or results screen is up */

/* ---------- landing pages (gta-6-quiz.html and later quiz pages): .lp is replaced when the round starts ---------- */
.lp { display: flex; flex-direction: column; gap: 22px; }
.lp .crumbs { font: 400 11px/1.4 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lp .crumbs a { color: var(--ink); }
.lp .start-row { display: flex; align-items: center; gap: 14px; }
.lp .start-row img { width: 64px; height: 64px; image-rendering: pixelated; flex: none; }
.lp h1 { margin: 0; font: 700 32px/1.1 var(--pixel); }
.lp .lede { margin: 0; font-size: 17px; }
.lp h2 { margin: 0 0 8px; font: 700 20px/1.2 var(--pixel); }
.lp h3 { margin: 14px 0 4px; font: 600 16px/1.3 var(--serif); }
.lp .card p { margin: 0 0 8px; }
.lp .card a, .lp .more a { color: var(--clay-dark); }
.lp details { border-top: 1px solid rgba(42, 30, 27, 0.15); padding: 10px 0; }
.lp details:last-of-type { border-bottom: 1px solid rgba(42, 30, 27, 0.15); }
.lp summary { cursor: pointer; font-weight: 600; }
.lp details p { margin: 6px 0 0; color: var(--soft); }
.lp .note { margin: 0; font-size: 13px; color: var(--muted); }
.lp .more { margin: 0; padding-left: 18px; }
.lp .more li { margin: 4px 0; }

/* ===== Launch pass (studio reports, 20 Nov 2026) ===== */

/* brand clay that passes WCAG AA with cream button text (4.98:1; #B85F3C was 4.11:1) */
:root { --clay: #A85232; --clay-hover: #994A2C; --on-clay: #FBF6EC; --stone: #D8CCBA; }
.btn-primary { color: var(--on-clay); }
@media (hover: hover) { .btn-primary:hover:not(:disabled) { background-color: var(--clay-hover); } }
a.btn { color: var(--ink); }
a.btn-primary { color: var(--on-clay); }
.answer-form input::placeholder { color: #776E67; }
.dly-tick { color: #2E7040; }
.copy-text { font-size: 16px; }                       /* stops iOS zooming into the copy-by-hand box */
dialog.sheet h2:focus { outline: none; }

/* a miss recedes: stone, not a black block (the shared emoji stays ⬛) */
.grid10 i.M, .pip.M, .legend i.M { background: var(--stone); }

/* Daily Ten results: one focal point that screenshots well */
.score-card { display: flex; flex-direction: column; gap: 12px; }
.res-hero { align-items: center; text-align: center; padding: 24px 18px 20px; }
.res-hero .score-big { font-size: 96px; line-height: 0.9; margin: 6px 0 2px; text-shadow: 4px 4px 0 rgba(168, 82, 50, 0.22); }
.res-hero .rank { display: inline-block; padding: 7px 10px 5px; background: var(--ink); color: var(--card); font-size: 16px; line-height: 1; letter-spacing: 0.06em; }
.res-hero .grid10 { width: 100%; max-width: 380px; gap: 6px; margin-top: 6px; }
.res-hero .legend { justify-content: center; }
.res-hero .better { font-size: 18px; max-width: 32ch; }
.res-url { margin: 0; font: 400 12px/1 var(--label); letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.share-note { margin: -4px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); max-width: 34ch; }

/* head to head, after a friend's challenge */
.h2h { display: flex; flex-direction: column; gap: 10px; border-color: var(--clay); }
.h2h-row { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.h2h-row b { font: 400 11px/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.h2h-s { font: 700 22px/1 var(--pixel); }
.h2h-row .grid10 { gap: 3px; max-width: 240px; }
.h2h-row .grid10 i { border-width: 1px; }
.h2h-v { margin: 2px 0 0; font: 600 20px/1.3 var(--serif); }

/* home: a friend's challenge, the pitch, and what each Dailyable is */
.ten-kicker { display: block; margin-bottom: 4px; font: 400 11px/1 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--clay-dark); }
.ten-bar.is-challenge { border-color: var(--clay); }
.ten-note { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--soft); }
.hm-pitch { margin: 12px auto 0; max-width: 32ch; font-size: 15px; line-height: 1.4; color: var(--soft); text-align: center; }
.dly { gap: 12px; }
.dly-sub { display: block; margin-top: -6px; font: 400 12px/1.3 var(--serif); color: var(--muted); text-align: center; }

/* home: today's streak and five dots under the date */
.today-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 14px 0 0; font: 400 11px/1.4 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.today-strip .ts-streak { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.today-strip .ts-streak b { font: 700 18px/1 var(--pixel); letter-spacing: 0; }
.today-strip .ts-ice { display: inline-flex; align-items: center; gap: 4px; color: #3D6A8F; cursor: help; }
.today-strip .ts-ice b { font: 700 15px/1 var(--pixel); letter-spacing: 0; }
.kg-ice { image-rendering: pixelated; }
.kg-dots { display: inline-flex; gap: 4px; }
.kg-dots i { width: 12px; height: 12px; border: 2px solid var(--ink); background: var(--card); display: block; }

/* "Next up" after the Daily Ten (assets/today.js) */
.nextup.card { display: flex; flex-direction: column; gap: 12px; }
.nextup .nu-k { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font: 400 11px/1.3 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.nextup .nu-k span { color: var(--muted); }
.nextup.card .nu-go { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.nextup .nu-go img { width: 96px; height: 64px; image-rendering: pixelated; border: 2px solid var(--ink); background: #07060F; }
.nextup.card .nu-t b { display: block; font: 700 18px/1.2 var(--pixel); }
.nextup.card .nu-t span { display: block; font-size: 14px; line-height: 1.35; color: var(--soft); }
.nextup.card .nu-btn { padding: 10px 16px; border: 3px solid var(--ink); background: var(--clay); color: var(--on-clay); font: 700 15px/1 var(--pixel); text-align: center; box-shadow: var(--bevel-dark), 3px 3px 0 var(--ink); }
.nextup.card .nu-go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.nextup.card .nu-more { margin: 0; font-size: 14px; color: var(--soft); }
.nextup.card .nu-more a { color: var(--clay-dark); }
.nextup .nu-streak { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 15px; line-height: 1.35; }
.nextup .kg-flame { flex: none; }
.nextup.card .nu-mile { margin: 0; padding: 8px 10px; border: 2px dashed var(--clay); font: 400 12px/1.4 var(--label); color: var(--clay-dark); }
.nextup.card .nu-all { margin: 0; font: 700 18px/1.3 var(--pixel); }
@media (max-width: 480px) { .nextup.card .nu-go { grid-template-columns: 96px minmax(0, 1fr); } .nextup.card .nu-btn { grid-column: 1 / -1; } }

/* small phones */
@media (max-width: 374px) { .gk { flex-basis: calc((100% - 20px) / 3); } }
.hm-legal { margin: 10px auto 0; max-width: 46ch; font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; }
.hm-legal a { color: var(--soft); }
.keeper { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; font-size: 16px; }
/* how-to: "Got it" stays in reach when the box scrolls on small screens */
dialog.sheet > form[method="dialog"]:last-child { position: sticky; bottom: -22px; margin: 0 -20px -22px; padding: 12px 20px 22px; background: var(--card); }

/* ===== Art pass, round 2 (studio art director, 20 Nov 2026) ===== */

/* The reveal: the answer is the hero, the points are a stamp, the gem is a collectible.
   Markup from app.js finish(): .feedback > .big + p > .fk (verdict) + .ans (the answer). */
.feedback { padding: 0; gap: 0; align-items: stretch; box-shadow: var(--bevel), 4px 4px 0 var(--ink); }
.feedback .big {
  flex: none; display: grid; place-items: center; min-width: 96px; padding: 14px 10px;
  font-size: 32px; color: var(--card); background: var(--good); border-right: 3px solid var(--ink);
  box-shadow: var(--bevel-dark); text-shadow: 2px 2px 0 rgba(42, 30, 27, 0.35);
}
.feedback.C .big { background: var(--mid); color: var(--ink); text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.35); }
.feedback.M .big { background: var(--stone); color: var(--soft); text-shadow: none; box-shadow: var(--bevel); }
.feedback p { align-self: center; padding: 12px 14px; }
.feedback .fk { display: block; margin-bottom: 4px; font: 400 12px/1.2 var(--label); letter-spacing: 1px; text-transform: uppercase; color: #2E7040; }
.feedback.C .fk { color: #7A5300; }
.feedback.M .fk { color: var(--bad); }
.feedback .ans { display: block; font: 700 24px/1.15 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
@media (min-width: 720px) { .feedback .ans { font-size: 28px; } .feedback .big { min-width: 112px; } }

/* gems at 2x (the 32px sprites, whole pixels), tier name in display type; the top two tiers
   go "night" like the Dailyables, so a Legendary or Mythic answer looks and feels rare */
.rarity { gap: 14px; padding: 10px 14px 10px 10px; }
.rarity img { width: 64px; height: 64px; }
.rarity b { font: 700 24px/1.1 var(--pixel); letter-spacing: 0; text-transform: none; }
.rarity span { margin-top: 3px; font-size: 14px; line-height: 1.35; }
.rarity.g4 { background: #F4ECFE; }
@media (max-width: 480px) { .rarity b { font-size: 20px; } }   /* "Legendary knowledge" on one line at 390px */
.rarity.g5, .rarity.g6 { color: #FFF; border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule-n, #3A2A10), 4px 4px 0 var(--ink); }
.rarity.g5 { background: #24170A; --rule-n: #5A3A12; }
.rarity.g5 b { color: #FFC24A; text-shadow: 0 0 12px rgba(255, 194, 74, 0.55); }
.rarity.g6 { background: #0B1D28; --rule-n: #1F4A5C; }
.rarity.g6 b { color: #7FF3FF; text-shadow: 0 0 12px rgba(127, 243, 255, 0.55); }
.rarity.g5 span, .rarity.g6 span { color: #E9E1D6; }

/* the timer reads as TIME: clay sand draining through ten 2-second cells (red in the last 5 s) */
.timer { height: 16px; border-width: 3px; }
.timer > i { background: var(--clay); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.28); }
.timer::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(42, 30, 27, 0.55) calc(10% - 2px) 10%);
}

/* one control language: the practice keys get the same ink frame and hard shadow as every
   other button (they were the only hairline + blurred-shadow controls on the page) */
.gk { border: 3px solid var(--ink); box-shadow: var(--bevel), 3px 3px 0 var(--ink); }
@media (hover: hover) { .gk:hover { border-color: var(--ink); box-shadow: var(--bevel), 4px 5px 0 var(--ink); } }
.gk:active { transform: translate(2px, 2px); box-shadow: var(--bevel), 1px 1px 0 var(--ink); }
.dly-art { box-shadow: 0 6px 0 var(--edge), 0 6px 0 2px var(--ink); }
@media (hover: hover) { .dly:hover .dly-art { box-shadow: 0 8px 0 var(--edge), 0 8px 0 2px var(--ink); } }

/* small labels: 12px, whole-pixel tracking */
.label, .hm-date, .hm-kicker, .hm-foot > *, .hm-foot .countdown, .stat span, .tag, .rev .pts small,
.fact span, .hist-axis, .today-strip, .ten-kicker, .h2h-row b, .nextup .nu-k, .site-foot h2, .lp .crumbs {
  font-size: 12px; letter-spacing: 1px;
}
.hm-kicker, .hm-date { letter-spacing: 2px; }
.toast { font-size: 12px; letter-spacing: 1px; padding: 12px 16px; }
.qcredit { font: 400 11px/1.4 var(--serif); letter-spacing: 0; text-transform: none; }
.runscore { font-size: 24px; }

/* ===== Motion pass (studio round 2, motion): every moment lands within a frame, and a common answer
   never feels like a Mythic one. Durations: taps 60-120 ms, feedback 160-320 ms, results ~1.9 s, skippable.
   Easing: --ease-out for things arriving, --ease-pop (a small overshoot) for rewards, steps() for pixel stamps. */
:root { --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); --ease-pop: cubic-bezier(0.3, 1.45, 0.5, 1); }
@keyframes fx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fx-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fx-pop { 0% { transform: scale(0.92); } 60% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes fx-big { 0% { transform: scale(0.3); opacity: 0; } 55% { transform: scale(1.18); opacity: 1; } 100% { transform: none; } }
@keyframes fx-bump { 0% { transform: scale(1.3); } 100% { transform: none; } }
@keyframes fx-stamp { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fx-spark { 0% { transform: translate(0, 0) scale(1.5); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0.5); opacity: 0; } }
.fx-sparks { position: absolute; left: 45px; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.fx-sparks i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; animation: fx-spark 0.6s var(--ease-out) both; }

/* a new question: the meta, the question, the picture and the box arrive in a 30 ms stagger (the clock is already running, so all of it is readable by ~150 ms) */
.q-in > .qmeta { animation: fx-rise 0.16s var(--ease-out) both; }
.q-in > .qtext { animation: fx-rise 0.16s var(--ease-out) 0.03s both; }
.q-in > .qimg { animation: fx-rise 0.18s var(--ease-out) 0.06s both; }
.q-in > .timer, .q-in > .answer-form, .q-in > .hint, .q-in > #show-choices { animation: fx-rise 0.18s var(--ease-out) 0.09s both; }
.pip.now { animation: fx-bump 0.24s var(--ease-pop); }
.pip.pop { animation: fx-bump 0.22s var(--ease-pop); }
.runscore { display: inline-block; transform-origin: right center; }
@keyframes fx-bump-g { 0% { transform: scale(1.3); color: var(--good); } 70% { color: var(--good); } 100% { transform: none; } }
.runscore.bump { animation: fx-bump-g 0.4s var(--ease-pop); }

/* the last five seconds: the bar thickens for a beat on each second; at zero it blinks twice */
@keyframes fx-beat { 0% { transform: scaleY(1.6); box-shadow: 0 0 0 2px var(--bad-bg); } 100% { transform: none; box-shadow: none; } }
@keyframes fx-blink { 50% { opacity: 0.2; } }
.timer.beat { animation: fx-beat 0.22s var(--ease-out); }
.timer.expired > i { animation: fx-blink 0.24s steps(1) 2; }

/* wrong: a decaying shake in whole pixels and a red edge; so close: a small amber nudge */
@keyframes shake { 0%, 100% { transform: none; } 15% { transform: translateX(-6px); } 35% { transform: translateX(5px); } 55% { transform: translateX(-3px); } 75% { transform: translateX(2px); } }
@keyframes fx-nudge { 0%, 100% { transform: none; } 30% { transform: translateX(3px); } 65% { transform: translateX(-2px); } }
.answer-form.shake { animation: shake 0.28s var(--ease-out); }
.answer-form.shake input { border-color: var(--bad); }
.answer-form.nudge { animation: fx-nudge 0.22s var(--ease-out); }
.answer-form.nudge input { border-color: var(--mid); }
.hint.warn.near { color: #7A5200; }

/* the four choices rise in a 40 ms stagger; a right pick pops, a wrong pick shakes and the right one lights 260 ms later */
.choices:not([hidden]) .choice { animation: fx-rise 0.16s var(--ease-out) both; }
.choices .choice:nth-child(2) { animation-delay: 0.04s; }
.choices .choice:nth-child(3) { animation-delay: 0.08s; }
.choices .choice:nth-child(4) { animation-delay: 0.12s; }
.choices .choice.pop { animation: fx-pop 0.24s var(--ease-pop) both; }
.choices .choice.shake { animation: shake 0.28s var(--ease-out) both; }
.choices .choice.shown { animation: none; }

/* the answer: a right one pops with its points; a miss drops in quietly; the gem card follows, later and longer for Legendary and Mythic */
#fb .feedback.T, #fb .feedback.C { animation: fx-pop 0.2s var(--ease-pop) both; }
#fb .feedback.T .big, #fb .feedback.C .big { animation: fx-big 0.32s var(--ease-pop) 0.04s both; }
#fb .feedback.M { animation: fx-drop 0.18s var(--ease-out) both; }
#fb .rarity { position: relative; }
#fb .rarity.pop { animation-delay: 0.18s; }
#fb .rarity.pop[data-g="5"], #fb .rarity.pop[data-g="6"] { animation-duration: 0.4s; animation-delay: 0.26s; }
@keyframes fx-gem { 0%, 100% { filter: none; transform: none; } 40% { filter: brightness(1.7); transform: scale(1.25); } }
@keyframes fx-ring { 0%, 100% { outline: 0 solid transparent; outline-offset: 0; } 50% { outline: 4px solid var(--gem); outline-offset: 3px; } }
#fb .rarity[data-g="3"] img, #fb .rarity[data-g="4"] img { animation: fx-gem 0.3s steps(3) 0.5s both; }
#fb .rarity[data-g="5"] img, #fb .rarity[data-g="6"] img { animation: fx-gem 0.36s steps(3) 0.66s both; }
#fb .rarity[data-g="5"], #fb .rarity[data-g="6"] { animation: rarity-pop 0.4s steps(4) 0.26s both, fx-ring 0.5s var(--ease-out) 0.66s; }
#fb .fact { animation: fx-rise 0.2s var(--ease-out) 0.45s both; }
.q-in > #next:not([hidden]) { animation: fx-rise 0.16s var(--ease-out) 0.12s both; }

/* results, first time: the grid turns over square by square while the score counts, then the rank stamps */
.res-hero .better { min-height: 2.7em; }               /* no jump when today's comparison arrives */
@keyframes fx-flip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1.2); } 100% { transform: none; } }
@keyframes fx-flip-m { from { transform: scaleY(0); } to { transform: none; } }
.res-hero.fx-run .grid10 i { transform: scaleY(0); }
.res-hero .grid10 i.fx-flip { animation: fx-flip 0.18s var(--ease-pop) both; }
.res-hero .grid10 i.fx-flip.M { animation: fx-flip-m 0.14s var(--ease-out) both; }
.res-hero .score-big { display: inline-block; }
.res-hero .score-big.land { animation: fx-bump 0.26s var(--ease-pop); }
.res-hero.fx-run .rank, .res-hero.fx-run .legend, .res-hero.fx-run .better, .res-hero.fx-run .res-url,
.res-hero.fx-run #share, .res-hero.fx-run .share-note, .res-hero.fx-run .countdown { opacity: 0; }
.res-hero .rank { position: relative; }
.res-hero.fx-run.fx-rank .rank { opacity: 1; animation: fx-stamp 0.2s steps(3) both; }
@keyframes fx-thud { 40% { transform: translateY(3px); } }
.res-hero.fx-rank { animation: fx-thud 0.14s var(--ease-out) 0.2s; }
.res-hero.fx-run.fx-rest .legend, .res-hero.fx-run.fx-rest .better { opacity: 1; animation: fx-rise 0.24s var(--ease-out) both; }
.res-hero.fx-run.fx-rest .res-url, .res-hero.fx-run.fx-rest #share { opacity: 1; animation: fx-rise 0.24s var(--ease-out) 0.06s both; }
.res-hero.fx-run.fx-rest .share-note, .res-hero.fx-run.fx-rest .countdown { opacity: 1; animation: fx-rise 0.24s var(--ease-out) 0.12s both; }
.fx-fresh > .nextup, .fx-fresh > #hist, .fx-fresh > .stats-row { animation: fx-rise 0.3s var(--ease-out) 1.9s both; }
.hist i { transform-origin: bottom; animation: fx-flip-m 0.4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 20ms); }
/* the streak flame catches when today's first game extends it */
@keyframes fx-ignite { 0% { transform: scale(0.4) translateY(4px); filter: grayscale(1); } 50% { transform: scale(1.4); filter: none; } 75% { transform: scale(0.95); } 100% { transform: none; } }
.kg-flame.ignite { animation: fx-ignite 0.45s steps(5) both; transform-origin: 50% 90%; }

@media (prefers-reduced-motion: reduce) {
  .res-hero.fx-run .grid10 i { transform: none; }
  .fx-sparks { display: none; }
}

/* Survival: hearts and lifelines in the play bar, the entry above the practice keys */
.surv-hud { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.surv-hearts { display: inline-flex; gap: 4px; }
.surv-hud .heart { width: 27px; height: 24px; display: block; }
.surv-ll { font: 400 11px/1.2 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.surv-note { margin: 10px 0 0; padding: 8px 10px; border: 2px dashed var(--clay); font: 400 12px/1.4 var(--label); color: var(--clay-dark); }
.surv-note.bad { border-color: var(--bad); color: var(--bad); }
.surv-bar { border-top: 0; padding-top: 0; }
.surv-badge { display: grid; place-items: center; }
.surv-badge .heart { width: 45px; height: 40px; display: block; }
.surv-bar .ten-go { background: var(--card); }
.surv-res .grid10 { width: 100%; }
#show-choices:disabled { opacity: 0.5; cursor: not-allowed; }

/* Player psychology: the title's meaning, the next goal, a personal best, momentum */
.rank-line { margin: -2px 0 0; font-size: 15px; line-height: 1.4; color: var(--soft); max-width: 32ch; }
.next-rank { margin: -4px 0 0; font: 400 11px/1.5 var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.next-rank b { font-weight: 400; color: var(--clay-dark); }
.pb-badge { display: inline-block; padding: 6px 10px 4px; background: var(--mid); color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--bevel);
  font: 400 12px/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; animation: pb-pop 0.4s steps(4) 0.9s both; }
.pb-line { margin: -4px 0 0; font-size: 14px; color: var(--clay-dark); }
.res-hero.is-pb { border-color: var(--mid); }
@keyframes pb-pop { from { transform: scale(0.4) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(-2deg); opacity: 1; } }
.combo { display: inline-block; margin-left: 6px; padding: 2px 6px 1px; border: 2px solid var(--good); color: var(--good);
  font: 400 10px/1.2 var(--label); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pb-badge { animation: none; transform: rotate(-2deg); } }

/* the home page's v2 front sheet (assets/hero.css) is hidden in v1, the pixel look */
.hx { display: none; }
/* the print look's masthead and footer on the other pages, and its painted icons (assets/page.css) */
.pg-mast, .pg-foot, img.v2i { display: none; }

/* Daily Ten results: the logo on top, and a big way on to the next game */
.logo-res { display: block; width: 260px; max-width: 64vw; height: auto; margin: 0 0 4px; }
.ng-go { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k arrow" "name arrow"; align-items: center; justify-items: start; row-gap: 4px; column-gap: 14px; min-height: 76px; padding: 12px 20px; font-size: 22px; text-align: left; }
.ng-go .ng-k { grid-area: k; } .ng-go .ng-name { grid-area: name; } .ng-go .ng-arrow { grid-area: arrow; }
.ng-go .ng-k { font-family: var(--label); font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.ng-go .ng-name { font-size: 26px; line-height: 1.05; }
.ng-go .ng-arrow { font-size: 34px; line-height: 0.8; margin-left: 2px; }
.ng-sub { margin: -2px 0 4px; font-size: 14px; line-height: 1.4; color: var(--soft); max-width: 36ch; }
.ng-key { display: inline-block; margin-left: 4px; font-family: var(--label); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (hover: none) { .ng-key { display: none; } }


/* Streamer mode (assets/stream.js, ?stream=1): big text for a 1080p stream, the address on screen, a small toolbar */
html.stream .wrap:not(.home) { zoom: var(--kgz, 1); gap: 14px; }
#kg-join { position: fixed; left: 16px; bottom: 16px; z-index: 6; pointer-events: none; padding: .35em .6em; font: 700 calc(18px * var(--kgz, 1))/1.1 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: .06em; background: #1E1A17; color: #E8D6BC; border: 3px solid #1E1A17; box-shadow: 4px 4px 0 #C9A15A; }
#kg-join b { color: #fff; }
html[data-banner="top"] #kg-join { top: 16px; bottom: auto; }
html[data-banner="off"] #kg-join { display: none; }
#kg-stream-bar { position: fixed; right: 12px; bottom: 12px; z-index: 10; display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: rgba(30, 26, 23, .86); color: #E8D6BC; font: 500 13px/1 'Helvetica Neue', Helvetica, Arial, sans-serif; }
#kg-stream-bar span { opacity: .75; margin-right: 2px; }
#kg-stream-bar button { font: inherit; color: inherit; background: transparent; border: 1px solid rgba(232, 214, 188, .5); padding: 5px 8px; cursor: pointer; }
#kg-stream-bar button:hover { background: rgba(232, 214, 188, .15); }
@media (max-width: 899px) { #kg-join { font-size: 14px; } #kg-stream-bar { display: none; } }

/* Christmas season (assets/look.js puts .xmas on <html> from 20 November to 6 January): a ribbon above
   the home page and the Christmas round first in the practice grid (assets/app.js) */
.xm-rib, .gk-sub { display: none; }
html.xmas .xm-rib {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: #7E2C22; color: #F7EEDC; text-decoration: none; text-align: center;
  font: 400 15px/1.35 Georgia, 'Noto Serif', serif;
}
html.xmas .xm-rib img { flex: none; width: 30px; height: 30px; }
.xm-rib b { font-weight: 700; color: #F3CF7A; }
.xm-go { white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.xm-rib:hover .xm-go, .xm-rib:focus-visible .xm-go { color: #F3CF7A; }
.xm-rib:focus-visible { outline: 2px solid #F3CF7A; outline-offset: -4px; }
body.hx-off .xm-rib { display: none !important; }
@media (max-width: 599px) { .xm-more { display: none; } }
