:root {
  --cream: #f4eedc; --paper: #fbf7ec; --ink: #1d2a21; --muted: #5d6b60;
  --board: #1f3d2b; --board-2: #2a4f39; --chalk: #f4eedc; --line: #d8cfb5;
  --g: #3a7d44; --y: #c9971c; --b: #3b3f3c; --accent: #b23a2a;
  --radius: 10px; --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --cream: #121a15; --paper: #18231c; --ink: #ece6d3; --muted: #9fae9f;
  --board: #0d1f14; --board-2: #1c3626; --chalk: #f0e9d2; --line: #2d3d32;
  --b: #4a4f4b; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #121a15; --paper: #18231c; --ink: #ece6d3; --muted: #9fae9f;
    --board: #0d1f14; --board-2: #1c3626; --chalk: #f0e9d2; --line: #2d3d32;
    --b: #4a4f4b; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

/* ---------- header ---------- */
.top {
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  padding: 8px 10px; background: var(--board); color: var(--chalk);
  border-bottom: 4px solid #8b6b3d;
}
.top-right { display: flex; justify-content: flex-end; gap: 4px; }
.logo {
  margin: 0; text-align: center; font: 700 26px/1 var(--serif); letter-spacing: .12em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.stumps { display: inline-flex; gap: 3px; height: 24px; align-items: flex-end; position: relative; }
.stumps i { width: 4px; height: 24px; background: var(--chalk); border-radius: 2px; display: block; }
.stumps::before { content: ""; position: absolute; top: -3px; left: -1px; right: -1px; height: 3px; background: #d9b56a; border-radius: 2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: var(--chalk); font-size: 18px; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }

main { width: 100%; max-width: 560px; margin: 0 auto; padding: 14px 12px 24px; flex: 1; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- start card (scoreboard) ---------- */
.board {
  background: linear-gradient(180deg, var(--board-2), var(--board));
  color: var(--chalk); border-radius: var(--radius); padding: 14px 16px 16px;
  border: 3px solid #8b6b3d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.15);
  position: relative;
}
.board .meta { display: flex; justify-content: space-between; align-items: center; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.badge { background: #d9b56a; color: #1d2a21; padding: 4px 8px; border-radius: 99px; font-weight: 700; letter-spacing: .04em; }
.board .teams { font: 700 26px/1.15 var(--serif); margin: 12px 0 6px; }
.board .facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chip { font: 600 13px/1 var(--mono); padding: 6px 9px; border-radius: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.board .flavour { font-style: italic; opacity: .9; margin: 8px 0 0; }

.sponsor { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.sponsor img { height: 18px; vertical-align: middle; margin: 0 4px; }

/* ---------- clues ---------- */
.clues { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.clue {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid #8b6b3d;
  border-radius: 8px; padding: 9px 12px; animation: slidein .35s ease-out;
}
.clue .k { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.clue .t { margin-top: 4px; white-space: pre-line; }
.clue.locked { opacity: .55; border-left-color: var(--line); font-size: 14px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- scorecard ---------- */
details.sc { margin-top: 8px; }
details.sc summary { cursor: pointer; font-weight: 600; color: var(--g); }
.inn { margin: 10px 0 14px; font-size: 13px; }
.inn h4 { margin: 0 0 4px; font: 700 13px/1.2 var(--mono); background: var(--board); color: var(--chalk); padding: 6px 8px; border-radius: 4px; display: flex; justify-content: space-between; }
.inn table { width: 100%; border-collapse: collapse; }
.inn td, .inn th { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.inn td:first-child, .inn th:first-child, .inn td.d { text-align: left; }
.inn td.d { color: var(--muted); font-size: 12px; }
.inn th { font-size: 11px; color: var(--muted); font-weight: 600; }
.inn tr.me td { background: color-mix(in srgb, var(--y) 22%, transparent); font-weight: 700; }
.mask { letter-spacing: -1px; color: var(--y); font-weight: 700; }

/* ---------- guess grid ---------- */
.grid { margin: 14px 0 8px; }
.grid-head, .row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.grid-head { font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; margin-bottom: 4px; }
.guess { margin-bottom: 8px; }
.guess .gname { font-size: 13px; font-weight: 600; margin: 0 0 3px 2px; }
.guess.skip .gname { color: var(--muted); font-style: italic; }
.tile {
  aspect-ratio: 1 / .78; border-radius: 8px; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; position: relative;
  font-weight: 700; padding: 2px; line-height: 1.05; transform-style: preserve-3d;
}
.tile small { display: none; }
.example .tile small { display: block; font: 600 9px/1 var(--mono); opacity: .85; text-transform: uppercase; margin-bottom: 3px; }
.tile b { font: 700 15px/1.1 var(--mono); }
.tile em { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 11px; opacity: .85; }
.tile.g { background: var(--g); } .tile.y { background: var(--y); } .tile.b { background: var(--b); }
.tile.skipt { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.tile.flip { animation: flip .5s ease both; }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: .2; } 100% { transform: none; opacity: 1; } }

/* ---------- input ---------- */
.play { position: relative; margin: 10px 0; }
.play .count { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.inputrow { display: flex; gap: 8px; position: relative; }
.inputrow input {
  flex: 1; min-width: 0; padding: 13px 14px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--paper); font-size: 17px;
}
.inputrow input:focus { outline: none; border-color: var(--g); }
.btn {
  border: 0; border-radius: var(--radius); padding: 12px 16px; font-weight: 700; cursor: pointer;
  background: var(--paper); border: 2px solid var(--line); min-height: 48px;
}
.btn.primary { background: var(--g); color: #fff; border-color: var(--g); }
.btn.wa { background: #1f8f4e; color: #fff; border-color: #1f8f4e; }
.btn:disabled { opacity: .5; cursor: default; }
.suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 4; list-style: none; margin: 4px 0 0; padding: 4px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-height: 320px; overflow: auto;
}
.suggest li { padding: 10px 12px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.suggest li small { color: var(--muted); white-space: nowrap; }
.suggest li[aria-selected="true"], .suggest li:hover { background: color-mix(in srgb, var(--g) 15%, transparent); }
.hardnote { font-size: 12px; color: var(--accent); min-height: 1em; margin-top: 4px; }

/* ---------- end + bonus ---------- */
.result { text-align: center; margin: 16px 0 10px; }
.result h2 { font: 700 28px/1.1 var(--serif); margin: 0 0 4px; }
.answer-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.answer-card .who { font: 700 24px/1.15 var(--serif); }
.answer-card .sub { color: var(--muted); font-size: 14px; }
.answer-card .line { margin: 8px 0 0; font-family: var(--mono); font-size: 14px; }
.video { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; margin: 10px 0; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bonus { background: var(--board); color: var(--chalk); border-radius: var(--radius); padding: 14px; margin: 14px 0; border: 3px solid #8b6b3d; }
.bonus h3 { margin: 0 0 2px; font: 700 20px/1.2 var(--serif); }
.bonus .hint { font-size: 13px; opacity: .8; margin: 0 0 10px; }
.bq { margin: 12px 0; }
.bq label { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; gap: 8px; }
.bq input[type=number] { width: 96px; padding: 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); text-align: right; font-family: var(--mono); }
.bq input[type=range] { width: 100%; margin-top: 8px; accent-color: #d9b56a; height: 28px; }
.bq .reveal { font-family: var(--mono); font-size: 14px; margin-top: 4px; }
.avgtoggle { display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; overflow: hidden; font-size: 12px; }
.avgtoggle button { background: transparent; border: 0; padding: 4px 8px; cursor: pointer; color: var(--chalk); }
.avgtoggle button[aria-pressed="true"] { background: #d9b56a; color: #1d2a21; }
.bonus .btn.primary { width: 100%; margin-top: 6px; background: #d9b56a; border-color: #d9b56a; color: #1d2a21; }
.bonus-score { text-align: center; font-size: 22px; margin-top: 8px; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.share .btn { width: 100%; }
.share .full { grid-column: 1 / -1; }
.countdown { text-align: center; color: var(--muted); font-size: 14px; }
.countdown b { font: 700 22px/1.2 var(--mono); color: var(--ink); display: block; }
.summary { color: var(--muted); font-size: 14px; }

/* ---------- ads ---------- */
.ad { margin: 16px 0; min-height: 0; text-align: center; }
.ad .label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- modals ---------- */
.modal { border: 0; border-radius: 14px; padding: 20px 18px; width: min(520px, 94vw); background: var(--paper); color: var(--ink); max-height: 88vh; }
.modal::backdrop { background: rgba(10,20,14,.55); }
.modal h2 { margin: 0 0 10px; font: 700 24px/1.2 var(--serif); }
.modal .close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.close-btn { width: 100%; margin-top: 8px; }
.example { background: var(--cream); border-radius: 10px; padding: 10px; }
.example .ex-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.legend { padding-left: 18px; font-size: 13px; margin: 8px 0 0; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--g); }
.statnums { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin: 6px 0 14px; }
.statnums b { display: block; font: 700 26px/1.1 var(--mono); }
.statnums small { font-size: 11px; color: var(--muted); }
.dist { display: grid; gap: 4px; }
.dist div { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: center; font: 600 13px var(--mono); }
.dist span { background: var(--b); color: #fff; padding: 2px 6px; border-radius: 4px; text-align: right; min-width: 22px; }
.dist span.hit { background: var(--g); }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
#toast.show { opacity: 1; }

.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 16px 12px 24px; border-top: 1px solid var(--line); }
.foot p { margin: 6px 0 0; }
.notice { background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 380px) { .tile b { font-size: 13px; } .board .teams { font-size: 22px; } }

.board .did { margin: 12px 0 0; padding: 10px 12px; background: rgba(255,255,255,.1); border-radius: 8px; font-weight: 600; }
.board .did span { display: block; font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-bottom: 3px; }
.hintbox { background: color-mix(in srgb, var(--y) 16%, var(--paper)); border: 1px solid color-mix(in srgb, var(--y) 45%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.legend-line { font-size: 12px; color: var(--muted); text-align: center; margin: 2px 0 0; }
.tile { cursor: pointer; }
#toast { max-width: 92vw; text-align: center; line-height: 1.35; }
.howto ol { padding-left: 20px; margin: 6px 0 10px; }
.howto li { margin: 6px 0; }
.howto .tiny { font-size: 13px; color: var(--muted); }

/* ===================== v2: brief improvements ===================== */
.center { text-align: center; } .muted { color: var(--muted); } .small { font-size: 13px; }
.left { text-align: left; }
.kicker { font: 700 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.page-title { font: 700 28px/1.15 var(--serif); margin: 6px 0 6px; }
.btn.ghost { background: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn small { font-weight: 500; color: var(--muted); }

/* board */
.board .fmt { font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #d9b56a; margin-top: 12px; }
.board .teams { margin-top: 6px; }
.badge.lvl-easy { background: #9fc59a; } .badge.lvl-regular { background: #d9b56a; } .badge.lvl-expert { background: #e08a6d; }

/* clues */
.clue.new { border-left-color: var(--g); box-shadow: 0 0 0 2px color-mix(in srgb, var(--g) 25%, transparent); }

/* pips */
.pips { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.pips i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--g); display: inline-block; }
.pips i.used { background: var(--b); border-color: var(--b); }
.pips i.used.skip { background: transparent; border-style: dashed; border-color: var(--muted); }
.pips span { margin-left: 6px; font-size: 13px; color: var(--muted); }
.suggest li.none { color: var(--muted); cursor: default; }
.suggest li em { font-style: normal; color: var(--muted); font-size: 13px; margin-left: 4px; }
.guess.right .gname { color: var(--g); }

/* reveal */
.reveal { text-align: center; margin: 18px 0 8px; }
.score { font-family: var(--serif); line-height: 1; }
.score b { font-size: 76px; font-weight: 700; }
.score span { font-size: 26px; color: var(--muted); margin-left: 2px; }
.score-label { font: 700 22px/1.2 var(--serif); margin: 6px 0 4px; color: var(--g); }
.answer-card .who { font: 700 30px/1.1 var(--serif); margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tags span { font: 600 12px/1 var(--mono); padding: 6px 8px; border-radius: 6px; background: var(--cream); border: 1px solid var(--line); text-transform: capitalize; }
.figs { margin: 0; display: grid; gap: 6px; }
.figs div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: baseline; }
.figs dt { font: 700 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.figs dd { margin: 0; font-size: 15px; }
.figs dd small { color: var(--muted); }
.factbox { margin: 12px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--cream); border: 1px solid var(--line); }
.factbox ul { margin: 0; padding-left: 18px; font-size: 14px; }
.factbox li { margin: 3px 0; }

/* share */
.sharebox { margin: 16px 0; }
.card-img { width: 100%; max-width: 360px; display: block; margin: 0 auto 10px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); aspect-ratio: 1080 / 1350; background: var(--board); }
.sharetext { white-space: pre-wrap; user-select: all; background: var(--paper); border: 1px dashed var(--line); padding: 10px; border-radius: 8px; font-size: 14px; }
.share .btn.wa { display: inline-flex; }

/* know your player stepper */
.bonus-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bonus-head .muted { color: rgba(244,238,220,.7); font-size: 13px; }
.bq.done { opacity: .95; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 8px; }
.bq-l { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; gap: 8px; }
.bq input[type=number] { width: 104px; padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); text-align: right; font: 600 16px var(--mono); color: var(--chalk); }
.reveal-line { font: 14px var(--mono); margin-top: 3px; opacity: .9; }
.bq .btn.primary { width: 100%; margin-top: 8px; background: #d9b56a; border-color: #d9b56a; color: #1d2a21; }

/* form strip */
.form { margin: 22px 0 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.form-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); text-align: center; }
.form-row b { display: block; font: 700 24px/1.1 var(--mono); }
.form-row small { font-size: 11px; color: var(--muted); }
.form-links { display: flex; gap: 8px; margin-top: 10px; }
.form-links .btn { flex: 1; min-height: 44px; padding: 8px; font-size: 14px; }

/* archive */
.archive { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.arch { width: 100%; display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 10px; align-items: center; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; min-height: 56px; }
.arch-n { font: 700 15px var(--mono); color: var(--muted); }
.arch-main b { display: block; font-size: 15px; } .arch-main small { color: var(--muted); }
.arch-st { text-align: right; display: grid; font-size: 12px; }
.arch-score { font: 700 15px var(--mono); }

/* sponsorship */
.partner { margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.partner a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.partner img { height: 28px; } .partner span { color: var(--muted); font-size: 14px; }
.previewbtn { width: 100%; margin: 6px 0 0; justify-content: flex-start; }
.notice.left { text-align: left; margin-top: 12px; }
h3.sub { margin: 0 0 6px; font-size: 15px; }
.card-btn { display: block; margin: 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; max-width: 360px; }
.card-btn .card-img { margin-bottom: 6px; }
.cardview { width: min(480px, 96vw); }
.cardview img { width: 100%; border-radius: 12px; display: block; margin: 18px 0 10px; -webkit-touch-callout: default; user-select: auto; }

/* ===================== v3: simpler screen + illustrations ===================== */
.board { padding: 12px 14px 14px; }
.hero { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 12px; align-items: center; margin-top: 10px; }
.art { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px #d9b56a; display: grid; place-items: center; }
.art svg { width: 64px; height: 64px; }
.board .teams { margin: 0; font-size: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tm { display: inline-flex; align-items: center; gap: 6px; }
.tm i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.vs { font: 600 13px var(--mono); opacity: .6; }
.who-line { margin-top: 4px; font-size: 15px; opacity: .9; }
.board .did { margin: 12px 0 0; padding: 10px 12px; background: rgba(255,255,255,.08); border-radius: 8px; font-weight: 600; font-size: 15px; line-height: 1.35; }

.clues { margin: 14px 0 6px; }
.clue-head { display: flex; justify-content: space-between; align-items: center; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.steps { display: inline-flex; gap: 4px; }
.steps i { width: 18px; height: 5px; border-radius: 3px; background: var(--line); display: inline-block; }
.steps i.on { background: var(--g); }
.clues ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.clues .clue { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; animation: none; }
.clues .clue:first-child { border-top: 0; }
.clues .clue.new { box-shadow: none; background: color-mix(in srgb, var(--g) 9%, transparent); }
.clues .clue.new .k { color: var(--g); }
.ci { color: var(--muted); padding-top: 1px; }
.clue.new .ci { color: var(--g); }
.clues .clue .t { margin-top: 2px; font-size: 15px; }

.hint1 { margin: 2px 0 10px; color: var(--muted); font-size: 14px; text-align: center; }
.linkbtn { background: none; border: 0; padding: 8px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; min-height: 44px; }
.legend-line { font-size: 12px; }
.small-btn { min-height: 40px; font-size: 14px; }

.reveal { margin-top: 8px; }
.reveal-art svg { width: 150px; height: auto; display: block; margin: 0 auto -6px; }
.answer-card { text-align: center; }
.answer-card .tags { justify-content: center; }
.perf { font: 600 16px/1.4 var(--mono); margin: 4px 0 6px; }

.share-row { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 14px; align-items: center; }
.share-row .card-btn { max-width: none; }
.share-row .card-img { max-width: 116px; margin: 0; border-radius: 8px; }
.share-actions { display: grid; gap: 8px; }
.share-actions .btn { width: 100%; }
.share-actions .linkbtn { min-height: 36px; padding: 4px; }
#card-tip { margin: 6px 0 0; }

.bonus-open { width: 100%; text-align: left; background: var(--board); color: var(--chalk); border: 3px solid #8b6b3d; border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: grid; gap: 2px; }
.bonus-open b { font: 700 18px/1.2 var(--serif); }
.bonus-open span { font-size: 14px; opacity: .85; }
.bonus:has(.bonus-open) { background: none; border: 0; padding: 0; }

details.more { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 10px 12px; }
details.more > summary { cursor: pointer; font-weight: 700; }
.factlist { margin: 10px 0; padding-left: 18px; font-size: 14px; }
.factlist li { margin: 3px 0; }
@media (max-width: 360px) { .hero { grid-template-columns: 60px minmax(0,1fr); } .art { width: 60px; height: 60px; } .art svg { width: 50px; height: 50px; } }
.tile b.two { font-size: 13px; line-height: 1.15; }
.clues-done > summary { list-style: none; cursor: pointer; }
.clues-done > summary::-webkit-details-marker { display: none; }
.clues-done > summary .clue-head span:first-child::after { content: " (tap to show)"; text-transform: none; letter-spacing: 0; font-weight: 500; }
.clues-done[open] > summary .clue-head span:first-child::after { content: ""; }

/* editions */
.eds { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 0 0 12px; }
.ed { border: 0; background: transparent; border-radius: 999px; padding: 8px 4px; min-height: 40px; font: 600 13px/1 system-ui, sans-serif; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.ed i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.ed i.star { width: auto; height: auto; font-style: normal; color: var(--y); font-size: 11px; }
.ed.on { background: var(--board); color: var(--chalk); }
@media (max-width: 360px) { .ed { font-size: 12px; gap: 3px; } }

/* ===================== v4: habit features (kept quiet) ===================== */
.reveal-art .bail, .reveal-art .rball { transform-box: fill-box; transform-origin: center; }
.reveal-art .b1 { animation: bail1 .7s cubic-bezier(.2,.8,.3,1) both .15s; }
.reveal-art .b2 { animation: bail2 .7s cubic-bezier(.2,.8,.3,1) both .15s; }
.reveal-art .rball { animation: rball .35s ease-in both; }
@keyframes bail1 { from { transform: translate(14px, 18px) rotate(28deg); } to { transform: none; } }
@keyframes bail2 { from { transform: translate(-22px, 24px) rotate(-34deg); } to { transform: none; } }
@keyframes rball { from { transform: translate(-46px, 6px); opacity: .3; } to { transform: none; opacity: 1; } }
.commentary { font-style: italic; margin: 2px 0 4px; }

.challenge { background: color-mix(in srgb, var(--y) 18%, var(--paper)); border: 1px solid color-mix(in srgb, var(--y) 50%, transparent); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 10px; font-size: 15px; text-align: center; }
.vs-result { font-weight: 700; margin: 6px 0 0; }
.celebrate { margin: 10px auto 0; max-width: 340px; background: var(--board); color: var(--chalk); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.celebrate small { opacity: .75; font-weight: 500; }

.career-strip { display: grid; gap: 6px; }
.career-strip .rank { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.career-strip .rank b { font: 700 18px/1.2 var(--serif); }
.career-strip .rank span, .career-strip .meta { font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--g); border-radius: 99px; }
.career-strip .meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.teaser { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

.cgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px 4px; text-align: center; margin: 8px 0 12px; }
.cgrid b { display: block; font: 700 22px/1.1 var(--mono); }
.cgrid small { font-size: 11px; color: var(--muted); }
.honours { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin: 6px 0 4px; }
.hon { border: 1px solid var(--line); border-radius: 10px; padding: 6px 2px; text-align: center; background: var(--cream); cursor: pointer; min-height: 64px; }
.hon span { display: block; font-size: 22px; line-height: 1.2; }
.hon small { display: block; font-size: 10px; line-height: 1.15; color: var(--muted); }
.hon.locked span { filter: grayscale(1); opacity: .35; }
.hon.earned { border-color: #d9b56a; background: color-mix(in srgb, #d9b56a 14%, var(--paper)); }
.hon.earned small { color: var(--ink); font-weight: 600; }
h3.sub { margin: 12px 0 6px; font-size: 15px; }
.hon small { overflow-wrap: anywhere; hyphens: auto; }

/* v5: How to play works as a full-screen sheet on phones; badge descriptions */
.modal { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal .close { width: 44px; height: 44px; top: 4px; right: 4px; z-index: 2; }
@media (max-width: 600px) {
  dialog.modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0;
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
  dialog.modal .close { position: fixed; top: calc(6px + env(safe-area-inset-top)); right: 8px; background: var(--paper); border-radius: 50%; }
  dialog.modal h2 { padding-right: 44px; }
}
.howto ol { padding-left: 22px; }
.example .row { gap: 4px; }
.example .tile { min-width: 0; }
.example .tile b { font-size: 13px; }
.example .tile small { font-size: 8px; letter-spacing: 0; }
.hon.sel { outline: 2px solid var(--g); outline-offset: 1px; }
.hon-how { min-height: 3.2em; margin: 6px 0 2px; padding: 8px 10px; background: var(--cream); border-radius: 8px; font-size: 13px; color: var(--muted); }
.hon-how b { color: var(--ink); }
.hon-how .got { color: var(--g); font-weight: 700; }
.example .tile em { display: none; }

/* crawlable intro text under the game (also helps AdSense review + search) */
.intro { max-width: 560px; margin: 8px auto 0; padding: 18px 12px 4px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.intro h2 { font: 700 18px/1.2 var(--serif); color: var(--ink); margin: 0 0 6px; }
.intro p { margin: 0 0 10px; }
.ad-slot { margin: 14px 0; text-align: center; min-height: 0; }
.ad-slot .label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
