/* ===== Font: Bricolage Grotesque (SIL Open Font License, see fonts/OFL.txt), served from this site ===== */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/bricolage-latin.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: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/bricolage-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Tokens ===== */
:root {
  --bg: #fff4e0;
  --bg2: #fde9cc;
  --panel: #ffffff;
  --text: #1b1740;
  --muted: #6e6889;
  --line: #efe1cb;
  --edge: #1b1740;            /* chunky outline colour */
  --board: #f7efe2;
  --sky: #dcebff;
  --grid: rgba(27, 23, 64, .06);
  --ref: #3a3f73;
  --guess: #ff7a1a;
  --guess-deep: #e45f00;
  --guess-soft: rgba(255, 122, 26, .14);
  --true: #12a150;
  --true-soft: rgba(18, 161, 80, .14);
  --bad: #e23d5b;
  --sun: #ffd166;
  --leaf: #12a150;
  --berry: #e83f6f;
  --primary: #ff7a1a;
  --primary-text: #1b1740;
  --radius: 22px;
  --shadow: 6px 6px 0 var(--edge);
  --shadow-sm: 4px 4px 0 var(--edge);
  --shadow-lg: 9px 10px 0 var(--edge);
  --bw: 3px;                  /* outline width */
  /* Playful Pop accents: one per game card, stickers and the hero stage */
  --mint: #5fe0a6;
  --pink: #ff9fbd;
  --skyp: #7cc7ff;
  --lilac: #b9a6ff;
  --peach: #ffb37a;
  --dots: rgba(27, 23, 64, .1);
  --on-accent: #1b1740;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15122e;
    --bg2: #1c1840;
    --panel: #221d4a;
    --text: #f5f2ff;
    --muted: #a9a3c9;
    --line: #362f6b;
    --edge: #0b0920;
    --board: #1b1742;
    --sky: #23285a;
    --grid: rgba(255, 255, 255, .05);
    --ref: #c9ccf5;
    --guess: #ff8b33;
    --guess-deep: #ff9d52;
    --guess-soft: rgba(255, 139, 51, .18);
    --true: #3ddc84;
    --true-soft: rgba(61, 220, 132, .14);
    --primary-text: #15122e;
    --mint: #2f9e74;
    --pink: #b4507a;
    --skyp: #2f5aa8;
    --lilac: #5d4bb0;
    --peach: #b4652e;
    --dots: rgba(255, 255, 255, .07);
    --on-accent: #fff;
    color-scheme: dark;
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.02em; }
.c-ref { color: var(--ref); }
.c-guess { color: var(--guess-deep); }
.c-true { color: var(--true); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; flex: 1; }
.narrow { max-width: 880px; }

/* Ruler strip used as a divider */
.ruler {
  height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--edge) 0 2px, transparent 2px 50px) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--edge) 0 1px, transparent 1px 10px) bottom / 100% 6px no-repeat;
  opacity: .35;
}

/* ===== Buttons ===== */
.btn, .primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--edge); border-radius: 14px; padding: 10px 20px; font-weight: 800;
  text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .1s;
}
.primary { background: var(--primary); color: var(--primary-text); }
.secondary { background: var(--panel); color: var(--text); }
.btn:hover, .primary:hover, .secondary:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--edge); }
.btn:active, .primary:active, .secondary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.primary:disabled { opacity: .5; cursor: default; }
.big { padding: 14px 26px; font-size: 1.08rem; }

/* ===== Header ===== */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 38px; height: 38px; display: block; }
.l-ref { fill: var(--ref); }
.l-guess { fill: var(--guess); }
.l-stroke { fill: none; stroke: var(--ref); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.l-text { fill: var(--panel); }
.name { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.glinks { display: flex; gap: 6px; margin-right: auto; margin-left: 10px; flex-wrap: wrap; }
.glink {
  text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  color: var(--muted); border: 2px solid transparent;
}
.glink:hover { color: var(--text); }
.glink.active { color: var(--text); border-color: var(--edge); background: var(--panel); }
.tools { display: flex; align-items: center; gap: 6px; }
.streak { font-weight: 800; font-size: .9rem; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--sun); color: #1b1740; }
.streak:empty { display: none; }
.icon {
  min-width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--edge);
  background: var(--panel); font-weight: 800; display: grid; place-items: center; padding: 0 8px; font-size: .85rem;
}
.icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== Footer ===== */
.foot { margin-top: 40px; background: var(--bg2); }
.foot-in { max-width: 1040px; margin: 0 auto; padding: 22px 16px 28px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.foot-in a { color: var(--muted); margin-right: 14px; }
.foot .name { font-size: 1.05rem; color: var(--text); }

/* ===== Home ===== */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; padding: 36px 0 18px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  background: var(--panel); border: 2px solid var(--edge); border-radius: 999px; padding: 4px 12px; box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--true); box-shadow: 0 0 0 3px var(--true-soft); }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: .98; margin: 18px 0 14px; font-weight: 800; }
.hero h1 .hl { color: var(--guess); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .14em;
  background: repeating-linear-gradient(90deg, var(--guess) 0 3px, transparent 3px 9px);
}
.hero p.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 22px; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.parade {
  background: linear-gradient(180deg, var(--sky), var(--board) 78%);
  border: 2px solid var(--edge); border-radius: 26px; box-shadow: var(--shadow); padding: 14px 14px 8px; position: relative; overflow: hidden;
}
.parade svg { display: block; width: 100%; height: auto; }
.parade .pfig { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.parade .cap { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 4px; }
.pfig.oa { fill: var(--ref); }
.pfig.ob { fill: var(--guess); }
.pfig.oc { fill: var(--true); }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.section-head p { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gcard {
  display: flex; flex-direction: column; text-decoration: none; background: var(--panel);
  border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
a.gcard:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--edge); }
.gcard .art { height: 190px; border-bottom: 2px solid var(--edge); position: relative; }
.gcard .art svg { width: 100%; height: 100%; display: block; }
.gcard.t-size .art { background: linear-gradient(180deg, #ffe2c6, #fff3e4); }
.gcard.t-weight .art { background: linear-gradient(180deg, #cdf3dc, #effbf3); }
@media (prefers-color-scheme: dark) {
  .gcard.t-size .art { background: linear-gradient(180deg, #3b2a3e, #2a2250); }
  .gcard.t-weight .art { background: linear-gradient(180deg, #1d3d45, #1f2450); }
}
.gcard .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gcard h3 { margin: 0; font-size: 1.5rem; }
.gcard p { margin: 0; color: var(--muted); flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--bg2); border: 1.5px solid var(--line); }
.chip.done { background: var(--true-soft); border-color: var(--true); color: var(--true); }
.gcard .go { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.gcard .go span:last-child { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--guess-deep); }
.soon-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.scard {
  display: flex; gap: 14px; align-items: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--muted);
}
.scard .gicon { width: 46px; height: 46px; flex: none; opacity: .7; }
.scard b { color: var(--text); display: block; font-family: var(--display); font-size: 1.1rem; }
.sticker { margin-left: auto; transform: rotate(4deg); background: var(--sun); color: #1b1740; font-weight: 800; font-size: .75rem; padding: 4px 10px; border-radius: 8px; border: 2px solid var(--edge); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fcard { background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.fcard svg { width: 100%; height: 120px; display: block; background: var(--board); border-radius: 12px; }
.fcard .num { font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--guess-deep); line-height: 1; margin-top: 12px; }
.fcard p { margin: 6px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step-card { background: var(--bg2); border-radius: var(--radius); padding: 18px; }
.step-card::before {
  counter-increment: s; content: counter(s); font-family: var(--display); font-weight: 800; font-size: 1.3rem;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--guess); color: #1b1740; border: 2px solid var(--edge); margin-bottom: 10px;
}
.step-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.step-card p { margin: 0; color: var(--muted); }

.faq details { border-bottom: 2px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.4rem; line-height: 1; color: var(--guess-deep); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* ===== Game pages ===== */
.ghero { padding: 22px 0 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ghero .title { display: flex; align-items: center; gap: 14px; }
.ghero .badge {
  width: 58px; height: 58px; border-radius: 16px; border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; background: #ffe2c6; flex: none;
}
.ghero .badge.w { background: #cdf3dc; }
.ghero .badge svg { width: 38px; height: 38px; }
.ghero h1 { margin: 0; font-size: clamp(1.8rem, 4.6vw, 2.6rem); line-height: 1; }
.ghero .sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.modes { display: inline-flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 999px; border: 2px solid var(--edge); box-shadow: var(--shadow-sm); }
.mode { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: .92rem; color: var(--muted); }
.mode.active { background: var(--text); color: var(--bg); }
.cat-select { border: 2px solid var(--edge); background: var(--panel); color: var(--text); border-radius: 10px; padding: 4px 8px; font: inherit; font-size: .85rem; font-weight: 700; }

.banner {
  background: var(--sun); color: #1b1740; border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 10px 14px; margin-bottom: 14px; font-size: .95rem;
}
.game, .result, .panel {
  background: var(--panel); border: 2px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow); padding: 18px;
}
.meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pips { display: flex; gap: 6px; align-items: center; }
.pip { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--edge); background: var(--panel); }
.pip.cur { background: var(--text); }
.pip.s3 { background: var(--true); } .pip.s2 { background: var(--sun); } .pip.s1 { background: var(--guess); } .pip.s0 { background: var(--bad); }
.round-label { font-weight: 800; font-size: .85rem; color: var(--muted); margin-left: 6px; }
.scorebox { font-family: var(--display); font-weight: 800; background: var(--bg2); border-radius: 999px; padding: 3px 12px; font-size: .95rem; }
.scorebox b { font-size: 1.1rem; }
.prompt { font-family: var(--display); font-size: clamp(1.2rem, 2.6vw, 1.55rem); font-weight: 700; margin: 12px 0 12px; line-height: 1.25; letter-spacing: -.01em; }
.prompt small { display: block; font-family: system-ui, sans-serif; color: var(--muted); font-size: .85rem; font-weight: 600; margin-top: 4px; letter-spacing: 0; }

/* Board */
.board-wrap {
  border-radius: 16px; overflow: hidden; border: 2px solid var(--edge); position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--sky), var(--board) 85%);
}
#board { display: block; width: 100%; height: min(54vh, 460px); min-height: 300px; touch-action: none; user-select: none; cursor: ew-resize; }
.ground { stroke: var(--edge); stroke-width: 2.5; }
.earth { fill: url(#hatch); }
.hatch-line { stroke: var(--edge); stroke-width: 1; opacity: .25; }
.obj.ref { fill: var(--ref); }
.obj.guess { fill: var(--guess); }
.obj.guess.dim { opacity: .5; }
.obj.outline * {
  fill: var(--true-soft); stroke: var(--true); stroke-width: 3; stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
}
.measure line { stroke-width: 2; vector-effect: non-scaling-stroke; }
.measure rect { rx: 7; }
.measure text { font-size: 13px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.measure.ref line { stroke: var(--ref); } .measure.ref rect { fill: var(--ref); } .measure.ref text { fill: var(--panel); }
.measure.guess line { stroke: var(--guess); } .measure.guess rect { fill: var(--guess); } .measure.guess text { fill: #1b1740; }
.measure.true line { stroke: var(--true); } .measure.true rect { fill: var(--true); } .measure.true text { fill: #fff; }
.oname { font-size: 12px; fill: var(--muted); text-anchor: middle; font-weight: 800; }
.drag-hint { position: absolute; right: 12px; top: 10px; font-size: .75rem; font-weight: 800; color: var(--muted); background: var(--panel); border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 10px; pointer-events: none; }

/* Controls */
.controls { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.controls input[type=range] { flex: 1; accent-color: var(--guess); height: 30px; }
.step {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--edge);
  background: var(--panel); font-size: 1.4rem; line-height: 1; font-weight: 800;
}
.hint { color: var(--muted); font-size: .82rem; margin: 10px 0 0; text-align: center; }

.reveal { margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--bg2); border-radius: 16px; padding: 14px 16px; }
.pts { font-family: var(--display); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.pts small { display: block; font-size: .8rem; color: var(--muted); font-family: system-ui, sans-serif; font-weight: 700; }
.nums { font-size: .95rem; color: var(--muted); }
.nums b { color: var(--text); }
.meter { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.meter i { display: block; height: 100%; background: var(--true); border-radius: 999px; transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.fact { margin: 4px 0 0; font-size: .95rem; }

/* Result */
.result { text-align: center; padding: 26px 18px; }
.result .kicker { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.rank { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; margin: 2px 0 4px; }
.total b { font-family: var(--display); font-size: 4.2rem; font-weight: 800; line-height: 1; color: var(--guess-deep); }
.total span { color: var(--muted); font-size: 1.3rem; font-weight: 700; }
.blocks { font-size: 1.7rem; letter-spacing: 6px; margin-top: 8px; }
.vs { margin: 12px auto; padding: 10px; border-radius: 14px; background: var(--sun); color: #1b1740; border: 2px solid var(--edge); max-width: 420px; font-weight: 800; }
.rows { list-style: none; padding: 0; margin: 18px auto; max-width: 520px; text-align: left; }
.rows li { display: grid; grid-template-columns: 1fr 90px 44px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1.5px solid var(--line); font-size: .92rem; }
.rows li .bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rows li .bar i { display: block; height: 100%; background: var(--guess); }
.rows li b { text-align: right; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.challenge-box { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.challenge-box input {
  border: 2px solid var(--edge); border-radius: 14px; padding: 10px 12px; background: var(--bg); color: var(--text); font: inherit; min-width: 0; width: 210px;
}
.countdown { color: var(--muted); font-size: .9rem; font-weight: 700; }

.seo { margin-top: 32px; }
.seo h2 { font-size: 1.6rem; margin: 0 0 8px; }
.seo > p { color: var(--muted); max-width: 46em; }

/* Heavier or Lighter */
.scene { border-radius: 16px; border: 2px solid var(--edge); overflow: hidden; background: linear-gradient(180deg, #dff6e8, var(--board) 85%); }
@media (prefers-color-scheme: dark) { .scene { background: linear-gradient(180deg, #1d3d45, var(--board) 85%); } }
.scene svg { display: block; width: 100%; height: auto; }
.scene .stand { fill: var(--edge); }
.scene .beam { fill: var(--edge); }
.scene .rope { stroke: var(--edge); stroke-width: 2; }
.scene .pan { fill: var(--panel); stroke: var(--edge); stroke-width: 2.5; }
.scene .oa { fill: var(--ref); }
.scene .ob { fill: var(--guess); }
.labels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.lab { text-align: center; background: var(--bg2); border-radius: 14px; padding: 10px; border: 2px solid transparent; transition: border-color .2s, background .2s; }
.lab .n { font-weight: 800; }
.lab .w { font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.lab.right { border-color: var(--true); background: var(--true-soft); }
.lab.wrong { border-color: var(--bad); background: rgba(226, 61, 91, .1); }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.choose .heavy { background: var(--guess); }
.choose .light { background: var(--sky); color: var(--text); }
.hl-reveal { margin-top: 14px; background: var(--bg2); border-radius: 16px; padding: 14px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hl-reveal .verdict { font-family: var(--display); font-size: 1.7rem; font-weight: 800; }
.hl-reveal .txt { flex: 1; min-width: 200px; }
.hl-reveal .txt p { margin: 0; }
.hl-reveal .txt p + p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 4px; }
.dots i { width: 22px; height: 8px; border-radius: 999px; background: var(--line); }
.dots i.ok { background: var(--true); } .dots i.no { background: var(--bad); }

/* Dialogs, toast, confetti */
dialog {
  border: 2px solid var(--edge); border-radius: 22px; background: var(--panel); color: var(--text); box-shadow: var(--shadow);
  max-width: min(480px, calc(100vw - 32px)); padding: 22px;
}
dialog::backdrop { background: rgba(20, 16, 50, .5); }
dialog h2 { margin-top: 0; }
.help li { margin-bottom: 8px; }

/* Share sheet */
.share-dlg { width: 420px; }
.share-preview {
  white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .9rem; background: var(--bg2); border-radius: 14px;
  padding: 10px 12px; margin: 0 0 14px; max-height: 9.5em; overflow: auto;
}
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.sh {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; font-weight: 800; font-size: .85rem;
  border: 2px solid var(--edge); background: var(--panel); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); cursor: pointer;
}
.sh b, .sh svg { font-size: 1.3rem; line-height: 1; width: 1.4em; height: 1.4em; display: grid; place-items: center; }
.sh:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--edge); }
.sh-wa { background: #25d366; color: #0b2e17; grid-column: 1 / -1; flex-direction: row; justify-content: center; font-size: 1.05rem; padding: 14px; }
.share-dlg form { text-align: center; }
.vs-banner { font-weight: 600; }
.name-box { margin-bottom: 4px; }

/* First-visit intro */
.intro-dlg { width: 420px; text-align: center; }
.intro-dlg .kicker { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.intro-dlg h2 { margin: 2px 0 14px; font-size: 1.8rem; }
.intro-steps { list-style: none; padding: 0; margin: 0 0 16px; text-align: left; display: grid; gap: 10px; }
.intro-steps li {
  display: flex; gap: 12px; align-items: center; background: var(--bg2); border-radius: 14px; padding: 10px 12px;
  opacity: 0; transform: translateY(10px); animation: intro-in .45s cubic-bezier(.2, .9, .3, 1.2) var(--d) forwards;
}
.intro-steps .ie { font-size: 1.6rem; flex: none; width: 1.6em; text-align: center; }
.intro-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.intro-bar i { display: block; height: 100%; width: 0; background: var(--guess); border-radius: 999px; animation: intro-bar 2.1s linear forwards; }
@keyframes intro-in { to { opacity: 1; transform: none; } }
@keyframes intro-bar { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .intro-steps li { animation: none; opacity: 1; transform: none; }
  .intro-bar i { animation: none; width: 100%; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats div { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; }
.stats b { display: block; font-family: var(--display); font-size: 1.7rem; }
.stats span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 800;
  opacity: 0; pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) {
  .parade .pfig { animation: none; }
  .confetti { display: none; }
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; }
  .cards, .soon-row { grid-template-columns: 1fr; }
  .facts, .steps { grid-template-columns: 1fr; }
  .reveal { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 560px) {
  .top-in { padding: 8px 12px; gap: 8px; }
  .glinks { order: 3; width: 100%; margin: 0; }
  .tools { margin-left: auto; }
  .ghero .modes { width: 100%; }
  .mode { flex: 1; }
  .wrap { padding: 0 12px; }
  .game, .result { padding: 14px; border-radius: 18px; }
  .controls { flex-wrap: wrap; }
  .controls input[type=range] { order: 1; flex-basis: calc(100% - 110px); }
  .controls #minusBtn { order: 0; }
  .controls #plusBtn { order: 2; }
  .controls #lockBtn { order: 3; width: 100%; padding: 13px; }
  .lab .w { font-size: 1.25rem; }
  .total b { font-size: 3.4rem; }
}

/* How Big? guide content */
.guide { margin-top: 40px; display: grid; gap: 34px; }
.guide section > p { color: var(--muted); max-width: 46em; margin: 0 0 10px; }
.guide h3 { margin: 0 0 4px; font-size: 1.1rem; }
.howto, .tips { margin: 0; padding-left: 1.3em; color: var(--muted); display: grid; gap: 10px; }
.howto b, .tips b { color: var(--text); }
.modes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mode-card { background: var(--bg2); border-radius: var(--radius); padding: 16px 18px; }
.mode-card p { margin: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.score-table { border-collapse: collapse; width: 100%; max-width: 520px; }
.score-table th, .score-table td { text-align: left; padding: 9px 12px; border-bottom: 2px solid var(--line); }
.score-table th { font-size: .9rem; color: var(--muted); }
.score-table td:last-child, .score-table th:last-child { text-align: right; font-weight: 800; }
@media (max-width: 640px) { .modes-grid { grid-template-columns: 1fr; } }

/* ===== Number Guess ===== */
.ghero .badge.n { background: #dfe3ff; }
.ng-board {
  border: 2px solid var(--edge); border-radius: 16px; padding: 18px 14px 6px; text-align: center;
  background: linear-gradient(180deg, var(--sky), var(--board) 85%);
}
.ng-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ng-big { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1.05; color: var(--guess-deep); word-break: break-word; }
.ng-unit { font-size: .45em; color: var(--text); }
.ng-words { color: var(--muted); font-weight: 700; font-size: .95rem; min-height: 1.4em; }
.ng-line { display: block; width: 100%; height: auto; margin-top: 6px; overflow: visible; }
.ng-axis { stroke: var(--edge); stroke-width: 3; stroke-linecap: round; }
.ng-tick { stroke: var(--muted); stroke-width: 2; }
.ng-tl { font-size: 12px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.ng-m { stroke-width: 3; }
.ng-ml { font-size: 14px; font-weight: 800; }
.ng-you circle { fill: var(--guess); stroke: var(--edge); stroke-width: 2; } .ng-you .ng-m { stroke: var(--guess); } .ng-you text { fill: var(--guess-deep); }
.ng-true circle { fill: var(--true); stroke: var(--edge); stroke-width: 2; } .ng-true .ng-m { stroke: var(--true); } .ng-true text { fill: var(--true); }
.ng-type { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ng-type label { font-weight: 800; font-size: .9rem; color: var(--muted); }
.ng-type input {
  flex: 1; min-width: 0; border: 2px solid var(--edge); border-radius: 14px; padding: 10px 12px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 700;
}
.rows li small { font-weight: 700; }
@media (max-width: 560px) {
  .ng-rows li { grid-template-columns: 1fr 48px 34px; gap: 8px; }
  .ng-type label { width: 100%; }
  .ng-type #lockBtn { width: 100%; padding: 13px; }
}

/* ===== Sort It ===== */
.ghero .badge.s { background: #ffe9a8; }
.so-slots, .so-pool { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.so-pool { margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--line); }
.so-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  width: 100%; min-height: 118px; padding: 8px 6px; border-radius: 14px; border: 2px solid var(--edge);
  background: var(--panel); color: var(--text); font: inherit; text-align: center; box-shadow: 2px 2px 0 var(--edge);
}
button.so-card { cursor: pointer; }
button.so-card:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); }
.so-card.empty { background: var(--bg2); border-style: dashed; box-shadow: none; justify-content: center; color: var(--muted); }
.so-card.gone { visibility: hidden; }
.so-card.placed { background: var(--bg2); }
.so-card.ok { border-color: var(--true); background: var(--true-soft); }
.so-card.no { border-color: var(--bad); background: rgba(226, 61, 91, .1); }
.so-art { height: 54px; width: 100%; display: grid; place-items: center; }
.so-fig { max-width: 100%; max-height: 54px; fill: var(--ref); }
.so-pool .so-fig { fill: var(--guess); }
.so-name { font-size: .78rem; font-weight: 800; line-height: 1.15; }
.so-val { font-size: .78rem; font-weight: 800; color: var(--muted); }
.so-num, .so-key {
  position: absolute; top: -9px; left: -7px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; background: var(--text); color: var(--bg); border: 2px solid var(--edge);
}
.so-key { background: var(--panel); color: var(--muted); border-color: var(--line); }
.so-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.so-actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.so-scene { margin-top: 14px; border: 2px solid var(--edge); border-radius: 16px; padding: 8px; background: linear-gradient(180deg, var(--sky), var(--board) 85%); }
.so-scene > svg { display: block; width: 100%; height: auto; }
.so-scene .oa { fill: var(--ref); } .so-scene .ob { fill: var(--guess); }
.so-reveal { margin-top: 12px; }
.so-bars { display: grid; gap: 8px; padding: 6px; }
.so-bar { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.so-bn { font-weight: 800; }
.so-bt { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.so-bt i { display: block; height: 100%; border-radius: 999px; background: var(--ref); }
.so-bt i.ob { background: var(--guess); }
.so-note { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.so-blocks { font-size: 1.4rem; letter-spacing: 3px; margin-top: 8px; display: grid; gap: 4px; }
.so-blocks b { font-size: 1rem; letter-spacing: 0; color: var(--muted); }
@media (max-width: 560px) {
  .so-slots, .so-pool { gap: 6px; }
  .so-card { min-height: 100px; padding: 8px 3px 6px; border-radius: 12px; }
  .so-art { height: 40px; } .so-fig { max-height: 40px; }
  .so-name, .so-val { font-size: .68rem; }
  .so-bar { grid-template-columns: 1fr 1fr auto; font-size: .8rem; }
}
.so-dim { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.so-slots, .so-pool { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.so-card { min-width: 0; }
.so-name { overflow-wrap: break-word; }
@media (max-width: 480px) {
  .so-slots, .so-pool { grid-template-columns: 1fr; gap: 6px; }
  .so-card { flex-direction: row; min-height: 50px; padding: 6px 10px 6px 18px; gap: 10px; text-align: left; }
  .so-card.empty { justify-content: flex-start; }
  .so-card.gone { display: none; }
  .so-art { width: 44px; height: 36px; flex: none; }
  .so-fig { max-height: 36px; }
  .so-name { flex: 1; font-size: .85rem; }
  .so-dim, .so-val { font-size: .7rem; margin-left: auto; text-align: right; }
  .so-num, .so-key { top: 50%; left: -9px; transform: translateY(-50%); }
}

/* ===== Ballpark ===== */
.ghero .badge.b { background: #d7f0ff; }
.bp-timer { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; border: 2px solid var(--edge); }
.bp-timer i { display: block; height: 100%; width: 100%; background: var(--true); transition: width .1s linear; }
.bp-timer i.low { background: var(--bad); }
.bp-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bp-choice {
  position: relative; min-height: 76px; padding: 18px 4px 10px; border-radius: 14px; border: 2px solid var(--edge);
  background: var(--panel); color: var(--text); font: inherit; box-shadow: 2px 2px 0 var(--edge); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.bp-choice:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); background: var(--bg2); }
.bp-choice:disabled { cursor: default; }
.bp-range { font-family: var(--display); font-weight: 800; font-size: 1.02rem; line-height: 1.1; }
.bp-range sup { font-size: .65em; }
.bp-key { position: absolute; top: 5px; left: 7px; font-size: .7rem; font-weight: 800; color: var(--muted); }
.bp-exact { font-size: .75rem; font-weight: 800; }
.bp-choice.ok { border-color: var(--true); background: var(--true-soft); }
.bp-choice.near { border-color: var(--guess); background: rgba(255, 122, 26, .14); }
.bp-choice.no { border-color: var(--bad); background: rgba(226, 61, 91, .12); }
.bp-start { text-align: center; padding: 10px 0 4px; }
.bp-start p { color: var(--muted); margin: 0 0 14px; }
.dots i.near { background: var(--guess); }
@media (max-width: 560px) {
  .bp-choices { grid-template-columns: 1fr; gap: 6px; }
  .bp-choice { min-height: 48px; flex-direction: row; padding: 8px 12px; justify-content: space-between; }
  .bp-key { position: static; }
  .bp-range { font-size: 1.05rem; margin-right: auto; margin-left: 10px; }
}

/* ===== Speed Race ===== */
.ghero .badge.r { background: #ffd6e0; }
.sr-track {
  --racer: 64px;
  position: relative; border: 2px solid var(--edge); border-radius: 16px; padding: 10px 12px; display: grid; gap: 10px;
  background:
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 40px),
    linear-gradient(180deg, var(--sky), var(--board) 85%);
}
.sr-lane { position: relative; height: calc(var(--racer) + 34px); border-bottom: 2px dashed var(--line); }
.sr-lane:last-of-type { border-bottom: 0; }
.sr-racer {
  position: absolute; left: 0; top: 0; width: var(--racer); height: var(--racer); border-radius: 50%;
  border: 2px solid var(--edge); background: var(--panel); box-shadow: 2px 2px 0 var(--edge); padding: 0; cursor: pointer;
  display: grid; place-items: center; z-index: 1;
}
.sr-racer:disabled { cursor: default; }
.sr-emoji { font-size: calc(var(--racer) * .55); line-height: 1; }
.sr-track.picking .sr-racer { animation: srPulse 1.4s ease-in-out infinite; }
.sr-track.picking .sr-lane:nth-child(2) .sr-racer { animation-delay: .7s; }
@keyframes srPulse { 50% { transform: scale(1.07); } }
.sr-racer.picked { background: var(--sun); }
.sr-racer.win { border-color: var(--true); box-shadow: 0 0 0 4px var(--true-soft), 2px 2px 0 var(--edge); }
.sr-racer.lose { opacity: .8; }
.sr-speed { position: absolute; left: 0; bottom: 4px; display: flex; gap: 8px; align-items: baseline; font-size: .85rem; }
.sr-speed b { font-weight: 800; }
.sr-speed span { font-family: var(--display); font-weight: 800; color: var(--guess-deep); }
.sr-finish { position: absolute; top: 6px; bottom: 6px; right: 8px; width: 6px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--edge) 0 6px, var(--panel) 6px 12px); opacity: .6; }
.sr-gap { margin-top: 14px; text-align: center; }
.sr-q { margin: 0 0 10px; font-weight: 700; }
.sr-gaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sr-gaps button { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; }
.sr-gaps span { font-size: .78rem; color: var(--muted); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .sr-track.picking .sr-racer { animation: none; } }
@media (max-width: 560px) {
  .sr-track { --racer: 50px; padding: 8px; }
  .sr-gaps { grid-template-columns: 1fr; }
  .sr-gaps button { flex-direction: row; justify-content: space-between; }
}

/* Internal links at the end of every game page */
.more-games ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-games a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--bg2); color: var(--text); border: 2px solid transparent;
}
.more-games a:hover { border-color: var(--edge); }
.more-games span { color: var(--muted); font-size: .88rem; }
@media (max-width: 560px) { .more-games ul { grid-template-columns: 1fr; } }

/* ===== Header games menu and archive bar ===== */
.glinks { align-items: center; }
.gmenu { position: relative; }
.gmenu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.gmenu summary::-webkit-details-marker { display: none; }
.gmenu summary::after { content: "▾"; font-size: .8em; }
.gmenu[open] summary { color: var(--text); border-color: var(--edge); background: var(--panel); }
.gm-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 230px; padding: 6px;
  background: var(--panel); border: 2px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow); display: grid; gap: 2px;
}
.gm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: .92rem; }
.gm-item:hover, .gm-item.active { background: var(--bg2); }
.gm-icon { width: 22px; height: 22px; flex: none; }
.gm-all { color: var(--muted); border-top: 2px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.archive-bar {
  max-width: 1040px; margin: 10px auto 0; padding: 8px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--sun); color: #1b1740; border: 2px solid var(--edge); border-radius: 14px; font-size: .9rem; width: calc(100% - 32px);
}
.archive-bar a { color: #1b1740; font-weight: 800; }
.foot-links a { display: inline-block; margin-bottom: 4px; }
@media (max-width: 560px) {
  .gm-list { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
  .archive-bar { width: calc(100% - 24px); }
}

/* ===== Archive ===== */
.ghero .badge { font-size: 1.7rem; }
.ar-filter { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); font-size: .9rem; }
.ar-list { display: grid; gap: 14px; }
.ar-day { background: var(--panel); border: 2px solid var(--edge); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 12px 14px; }
.ar-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.ar-head span { color: var(--muted); font-weight: 700; font-size: .85rem; }
.ar-head .ar-count { margin-left: auto; }
.ar-chips, .st-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ar-chip {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; text-decoration: none;
  background: var(--bg2); color: var(--text); font-weight: 700; font-size: .88rem; border: 2px solid transparent;
}
.ar-chip:hover { border-color: var(--edge); }
.ar-chip span { flex: 1; min-width: 0; }
.ar-chip b { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--guess); color: #1b1740; white-space: nowrap; }
.ar-chip.done b { background: var(--true-soft); color: var(--true); }
#more { margin-top: 16px; }

/* ===== Stats ===== */
.st-today { margin-bottom: 18px; }
.st-badge {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 12px; border-radius: 18px;
  background: var(--panel); border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
}
.st-badge.gold { background: var(--sun); color: #1b1740; }
.st-badge b { display: block; font-family: var(--display); font-size: 1.2rem; }
.st-badge span { font-size: .9rem; }
.st-medal { font-size: 2.2rem; line-height: 1; }
.st-totals { margin-bottom: 6px; }
.st-h { margin: 22px 0 10px; }
.st-games { display: grid; gap: 12px; }
.st-game { display: block; text-decoration: none; color: var(--text); background: var(--panel); border: 2px solid var(--edge); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.st-game:hover { transform: translate(-1px, -1px); }
.st-gh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-gh .chip { margin-left: auto; }
.st-game .stats { margin: 0; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }

/* ===== Weekly ===== */
.wk-theme {
  display: flex; gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 14px; border-radius: 18px;
  background: var(--sun); color: #1b1740; border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
}
.wk-theme b { display: block; font-family: var(--display); font-size: 1.25rem; }
.wk-theme span { font-size: .88rem; }
.wk-emoji { font-size: 2.2rem; line-height: 1; }
.wk-kind { font-weight: 800; font-size: .85rem; color: var(--muted); }
.wk-options { display: grid; gap: 10px; }
.wk-options.two { grid-template-columns: 1fr 1fr; }
.wk-options.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-opt {
  position: relative; min-height: 72px; padding: 18px 12px 12px; border-radius: 14px; border: 2px solid var(--edge);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 800; box-shadow: 2px 2px 0 var(--edge); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
}
.wk-opt:hover:not(:disabled) { background: var(--bg2); transform: translate(-1px, -1px); }
.wk-opt:disabled { cursor: default; }
.wk-opt .bp-key { position: absolute; top: 5px; left: 8px; }
.wk-opt.ok { border-color: var(--true); background: var(--true-soft); }
.wk-opt.no { border-color: var(--bad); background: rgba(226, 61, 91, .12); }
.wk-val { font-size: .85rem; color: var(--muted); font-weight: 700; }
#upcoming { margin-top: 12px; }
@media (max-width: 560px) { .wk-options.two, .wk-options.four { grid-template-columns: 1fr; } }

/* ===== How Many Fit? ===== */
.ghero .badge.f { background: #e2f5d0; }
.hf-board { border: 2px solid var(--edge); border-radius: 16px; padding: 14px; background: linear-gradient(180deg, var(--sky), var(--board) 85%); }
.hf-cards { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.hf-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--panel); border: 2px solid var(--edge); border-radius: 14px; padding: 10px; }
.hf-cap { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hf-art { height: 90px; width: 100%; display: grid; place-items: center; }
.hf-fig { max-width: 100%; max-height: 90px; }
.hf-fig.oa { fill: var(--ref); } .hf-fig.ob { fill: var(--guess); }
.hf-card b { font-size: .9rem; }
.hf-x { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--muted); }
.hf-scene svg { display: block; width: 100%; height: auto; }
.hf-scene .oa { fill: var(--ref); } .hf-scene .oa.alt { fill: var(--muted); } .hf-scene .ob { fill: var(--guess); }
.hf-part { fill: var(--ref); opacity: .35; }
.hf-top { stroke: var(--true); stroke-width: 2; stroke-dasharray: 6 5; }
.hf-guess { text-align: center; margin-top: 10px; }
@media (max-width: 560px) { .hf-art { height: 64px; } .hf-fig { max-height: 64px; } .hf-x { font-size: 1.1rem; } }

/* ===== How Far? ===== */
.ghero .badge.d { background: #d9e7ff; }
.hw-board { border: 2px solid var(--edge); border-radius: 16px; padding: 10px 10px 12px; background: linear-gradient(180deg, var(--sky), var(--board) 85%); }
.hw-map svg { display: block; width: 100%; max-height: 420px; height: auto; margin: 0 auto; }
.hw-grid { stroke: var(--edge); stroke-width: 1; opacity: .12; }
.hw-grid.eq { opacity: .3; stroke-dasharray: 4 4; }
.hw-dot { fill: var(--muted); opacity: .55; }
.hw-city { stroke: var(--edge); stroke-width: 2; }
.hw-city.a { fill: var(--ref); } .hw-city.b { fill: var(--guess); }
.hw-label { font-size: 13px; font-weight: 800; fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.hw-line { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 3 6; opacity: .6; }
.hw-line.on { stroke: var(--true); stroke-width: 3; stroke-dasharray: 8 6; opacity: 1; }
.hw-km { font-family: var(--display); font-size: 16px; font-weight: 800; fill: var(--true); paint-order: stroke; stroke: var(--panel); stroke-width: 5px; stroke-linejoin: round; }

/* Home: Weekly, Archive and Stats strip */
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.extra {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); text-decoration: none; color: var(--muted);
  background: var(--panel); border: 2px solid var(--edge); box-shadow: var(--shadow-sm); font-size: .9rem;
}
.extra:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.extra > span { font-size: 1.8rem; line-height: 1; }
.extra b { display: block; color: var(--text); font-family: var(--display); font-size: 1.05rem; margin-bottom: 2px; }
@media (max-width: 820px) { .extras { grid-template-columns: 1fr; } }

/* ===== Leaderboard line on result screens ===== */
.lb { margin: 14px auto 4px; max-width: 360px; }
.lb-line { margin: 0 0 8px; font-weight: 700; }
.lb-line b { color: var(--guess-deep); font-family: var(--display); font-size: 1.15em; }
.lb-wait { color: var(--muted); font-weight: 600; }
.lb-bars { display: flex; align-items: flex-end; gap: 4px; height: 54px; padding: 0 2px; border-bottom: 2px solid var(--line); }
.lb-bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--line); min-height: 4px; }
.lb-bars i.me { background: var(--guess); }
.lb-axis { display: flex; justify-content: space-between; margin: 3px 0 0; font-size: .72rem; color: var(--muted); font-weight: 700; }

/* ===== Plain text pages ===== */
.prose { max-width: 46em; }
.prose h2 { margin-top: 28px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: 6px; }

/* Result squares wrap instead of overflowing on narrow phones */
.blocks { font-size: clamp(1.15rem, 5.6vw, 1.7rem); letter-spacing: 3px; word-break: break-all; line-height: 1.3; }

/* ===== Sources under facts ===== */
a.src { font-size: .78rem; font-weight: 800; color: var(--muted); text-decoration: underline dotted; white-space: nowrap; }
a.src:hover { color: var(--text); }

/* ===== Today's total (home, Stats, result screens) ===== */
.tt { background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; }
.tt .kicker { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.tt-head { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tt-score { font-family: var(--display); line-height: 1; margin: 4px 0; }
.tt-score b { font-size: 2.6rem; font-weight: 800; }
.tt-score span { font-size: 1.2rem; color: var(--muted); font-weight: 700; }
.tt-sub { font-size: .92rem; color: var(--muted); }
.tt-sub a { color: var(--guess-deep); font-weight: 800; }
.tt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-bar { height: 10px; border-radius: 999px; background: var(--bg2); border: 1.5px solid var(--line); margin: 12px 0; overflow: hidden; }
.tt-bar i { display: block; height: 100%; background: var(--guess); border-radius: 999px; }
.tt-games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tt-g { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg2); text-decoration: none; font-size: .82rem; font-weight: 700; min-width: 0; }
.tt-g span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-g b { font-family: var(--display); color: var(--muted); }
.tt-g.done { border-color: var(--true); background: var(--true-soft); }
.tt-g.done b { color: var(--true); }
.tt-g .gm-icon { width: 20px; height: 20px; flex: none; }
.tt-next { margin: 12px auto 0; font-size: .92rem; font-weight: 700; }
.tt-next a { color: var(--guess-deep); }
@media (max-width: 720px) { .tt-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Badges (Stats) ===== */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { padding: 12px; border-radius: 14px; border: 2px solid var(--edge); background: var(--panel); box-shadow: 2px 2px 0 var(--edge); text-align: center; }
.bdg .bi { font-size: 2rem; line-height: 1.2; display: block; }
.bdg b { display: block; font-family: var(--display); font-size: .98rem; }
.bdg span { display: block; font-size: .78rem; color: var(--muted); }
.bdg em { display: block; font-style: normal; font-size: .72rem; font-weight: 800; color: var(--true); margin-top: 4px; }
.bdg.locked { box-shadow: none; border-style: dashed; border-color: var(--line); }
.bdg.locked .bi { filter: grayscale(1); opacity: .35; }

/* ===== Survival ===== */
.sv-lives { font-size: 1.25rem; letter-spacing: 2px; }
.sv-timer { height: 8px; border-radius: 999px; background: var(--bg2); border: 1.5px solid var(--line); overflow: hidden; margin: 10px 0 14px; }
.sv-timer i { display: block; height: 100%; width: 100%; background: var(--true); transform-origin: left; }
.sv-timer.low i { background: var(--bad); }
.sv-start { text-align: center; padding: 26px 12px; }
.sv-start p { color: var(--muted); max-width: 34em; margin: 8px auto 16px; }

/* ===== Answers ===== */
.an-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.an-bar select { font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--edge); background: var(--panel); color: var(--text); }
.an-game { background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; margin-bottom: 14px; }
.an-game h2 { margin: 0 0 8px; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.an-game h2 .gm-icon { width: 24px; height: 24px; }
.an-game ol { margin: 0; padding-left: 1.3em; }
.an-game li { margin: 6px 0; }
.an-game li b { color: var(--true); }
.an-game .an-q { color: var(--muted); }
.an-hide { position: relative; }
.an-hide.blur ol { filter: blur(7px); user-select: none; pointer-events: none; }
.an-reveal { position: absolute; inset: 0; display: grid; place-items: center; }
.an-game .an-foot { margin: 10px 0 0; font-size: .88rem; }

/* ===== Forms (Suggest) ===== */
.form { display: grid; gap: 14px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-weight: 800; }
.form label span { font-weight: 600; font-size: .85rem; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--edge); background: var(--panel); color: var(--text);
}
.form textarea { min-height: 90px; resize: vertical; }
.form .ok { padding: 12px 14px; border-radius: 14px; background: var(--true-soft); border: 2px solid var(--true); font-weight: 700; }

/* ===== Friends League ===== */
.gm-random { font-weight: 800; color: var(--guess-deep); }
.extra-hot { border-color: var(--guess); }
.lg-next { display: inline-block; margin: 2px 0 8px; font-weight: 800; color: var(--guess-deep); }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 22px; }
@media (max-width: 720px) { .lg-grid { grid-template-columns: 1fr; } }
.lg-card { display: flex; flex-direction: column; gap: 10px; }
.lg-card h2 { margin: 0; }
.lg-card p { margin: 0; color: var(--muted); }
.lg-card .kicker { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.lg-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .9rem; }
.lg-field input {
  border: 2px solid var(--edge); border-radius: 14px; padding: 11px 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; min-width: 0;
}
.lg-code-in { text-transform: uppercase; letter-spacing: .25em; font-family: var(--display); font-weight: 800; }
.lg-err { color: var(--bad) !important; font-weight: 700; }
.lg-steps { margin-top: 8px; }
.lg-list { display: grid; gap: 8px; margin-bottom: 18px; }
.lg-item { display: flex; align-items: center; gap: 12px; }
.lg-item b { display: block; font-family: var(--display); font-size: 1.1rem; }
.lg-item span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.lg-trophy { font-size: 1.6rem; }
.lg-item .lg-go { margin-left: auto; color: var(--guess-deep); font-family: var(--display); font-weight: 800; font-size: 1rem; }
.lg-new { margin-bottom: 14px; }
.lg-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.lg-codebox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-codebox span { font-weight: 800; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.lg-codebox b { font-family: var(--display); font-size: 1.9rem; letter-spacing: .14em; color: var(--guess-deep); }
.lg-codebox button { padding: 6px 12px; }
.lg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-wa-btn { background: #25d366; color: #0b2e17; }
.lg-tabs { display: inline-flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 999px; border: 2px solid var(--edge); box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.lg-board { padding: 6px 14px; }
.lg-table { list-style: none; margin: 0; padding: 0; }
.lg-table li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.lg-table li:last-child { border-bottom: 0; }
.lg-table li.me { background: var(--guess-soft); margin: 0 -14px; padding: 10px 14px; }
.lg-table li.idle { opacity: .55; }
.lg-rank { font-family: var(--display); font-weight: 800; font-size: 1.25rem; text-align: center; }
.lg-who b { display: block; font-size: 1rem; }
.lg-who em { font-style: normal; font-size: .7rem; background: var(--text); color: var(--bg); padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.lg-games { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; }
.lg-games i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg2); opacity: .45; }
.lg-games i.on { background: var(--true-soft); opacity: 1; box-shadow: inset 0 0 0 1.5px var(--true); }
.lg-games svg { width: 14px; height: 14px; }
.lg-sub { color: var(--muted); font-size: .8rem; font-weight: 700; }
.lg-streak { font-weight: 800; font-size: .9rem; }
.lg-pts { text-align: right; white-space: nowrap; }
.lg-pts b { font-family: var(--display); font-size: 1.4rem; }
.lg-pts small { color: var(--muted); font-weight: 700; margin-left: 2px; }
.lg-foot { margin-top: 16px; text-align: center; }
.lg-foot .hint { margin-top: 12px; }
.lg-empty { text-align: center; display: grid; gap: 12px; justify-items: center; }
.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }

/* =====================================================================
   Playful Pop: chunky outlines, hard shadows that lift on hover, sticker
   colours per game and bouncy entrances. Layered on top of the rules above.
   ===================================================================== */
body { background-color: var(--bg); background-image: radial-gradient(var(--dots) 1.3px, transparent 1.4px); background-size: 22px 22px; }

/* Outlines: one width everywhere */
.btn, .primary, .secondary, .game, .result, .panel, .gcard, .extra, .tt, .fcard, .modes, .banner, .st-game, .icon,
.ghero .badge, .parade, .eyebrow, .pip, dialog, .cat-select, .challenge-box input, .lg-field input, .vs, .sh { border-width: var(--bw); }

/* Buttons: display font, pressable */
.btn, .primary, .secondary {
  font-family: var(--display); letter-spacing: -.01em; border-radius: 16px; box-shadow: var(--shadow-sm);
  transition: transform .14s cubic-bezier(.3, 1.6, .5, 1), box-shadow .14s, background .14s;
}
.btn:hover, .primary:hover, .secondary:hover { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 var(--edge); }
.btn:active, .primary:active, .secondary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--edge); }
.big { padding: 15px 26px; font-size: 1.12rem; border-radius: 18px; box-shadow: var(--shadow); }
.primary { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
@media (prefers-color-scheme: dark) { .primary { color: #15122e; text-shadow: none; } }

/* Header */
.brand .logo { display: inline-block; transform: rotate(-7deg); filter: drop-shadow(3px 3px 0 var(--guess)); transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.brand:hover .logo { transform: rotate(6deg) scale(1.08); }
.name { font-size: 1.4rem; }
.glink.active { border-width: 2.5px; box-shadow: 2px 2px 0 var(--edge); }
.streak { border: 2.5px solid var(--edge); box-shadow: 2px 2px 0 var(--edge); }
.gm-list { border-width: var(--bw) !important; box-shadow: var(--shadow) !important; }

/* Home hero */
.eyebrow { background: var(--mint); color: var(--on-accent); transform: rotate(-3deg); box-shadow: var(--shadow-sm); }
.eyebrow .dot { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.7rem); line-height: .95; letter-spacing: -.045em; }
.hero h1 .hl {
  color: #fff; background: var(--guess); padding: 0 .16em .04em; border-radius: .16em; display: inline-block;
  transform: rotate(-2.5deg); box-shadow: 5px 5px 0 var(--edge); margin-top: .08em;
}
.hero h1 .hl::after { content: none; }
.parade { background: var(--skyp); box-shadow: var(--shadow-lg); border-radius: 30px; transform: rotate(1deg); padding-bottom: 0; }
/* the ground: the lineup's ground line sits at 76% of its height */
/* (a background on the svg itself stops Chrome drawing its contents, so the ground is a layer behind it) */
.parade #parade { position: relative; z-index: 0; }
.parade #parade::before { content: ""; position: absolute; left: -14px; right: -14px; bottom: 0; height: 24%; background: var(--mint); z-index: -1; }
.parade .cap { background: var(--mint); margin: 0 -14px; padding: 2px 16px 12px; }
/* outlines stay 2.5px however much a drawing is scaled */
.pfig *, .gcard .art .oa *, .gcard .art .ob *, .fcard .oa *, .fcard .ob * { vector-effect: non-scaling-stroke; }
.parade .pfig { stroke: var(--edge); stroke-width: 2.5px; paint-order: stroke; }
.parade .pfig.oa { fill: #fff; }
.parade .cap { color: var(--on-accent); font-weight: 700; }
@media (prefers-color-scheme: dark) { .parade .pfig.oa { fill: var(--ref); } }

/* Today's total: a dark strip with a progress ring */
.tt { background: #1b1740; color: #fff; border-color: #1b1740; box-shadow: 8px 8px 0 var(--guess); padding: 18px 20px; }
.tt .kicker, .tt-score span, .tt-sub { color: #cfcaf0; }
.tt-sub a { color: var(--sun); }
.tt-head { justify-content: flex-start; }
.tt-head > div:nth-child(2) { flex: 1; min-width: 180px; }
.tt-ring { --p: 0; width: 78px; height: 78px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--guess) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); }
.tt-ring span { width: 60px; height: 60px; border-radius: 50%; background: #1b1740; display: grid; place-items: center; font: 800 1.15rem var(--display); }
.tt-bar { display: none; }
.tt-games { margin-top: 14px; }
.tt-g { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #fff; }
.tt-g b { color: #cfcaf0; }
.tt-g.done { background: rgba(95, 224, 166, .16); border-color: var(--mint); }
.tt-g.done b { color: var(--mint); }
.tt-g .gm-icon .l-ref { fill: #cfcaf0; } .tt-g .gm-icon .l-stroke { stroke: #cfcaf0; } .tt-g .gm-icon .l-text { fill: #1b1740; }
.tt .secondary { background: transparent; color: #fff; border-color: #fff; box-shadow: 3px 3px 0 #fff; }

/* Game cards: a sticker colour each, lift and tilt on hover, pop in on load */
.cards { gap: 22px; }
.gcard { box-shadow: var(--shadow); border-radius: 26px; animation: pop-in .55s cubic-bezier(.2, 1.5, .4, 1) backwards; }
a.gcard:hover { transform: translate(-3px, -5px) rotate(-.8deg); box-shadow: var(--shadow-lg); }
.gcard .art { border-bottom-width: var(--bw); height: 180px; }
.cards .gcard:nth-child(6n+1) .art { background: var(--sun); }
.cards .gcard:nth-child(6n+2) .art { background: var(--pink); }
.cards .gcard:nth-child(6n+3) .art { background: var(--mint); }
.cards .gcard:nth-child(6n+4) .art { background: var(--skyp); }
.cards .gcard:nth-child(6n+5) .art { background: var(--lilac); }
.cards .gcard:nth-child(6n+6) .art { background: var(--peach); }
.cards .gcard:nth-child(2) { animation-delay: .06s; } .cards .gcard:nth-child(3) { animation-delay: .12s; } .cards .gcard:nth-child(4) { animation-delay: .18s; }
.cards .gcard:nth-child(5) { animation-delay: .24s; } .cards .gcard:nth-child(6) { animation-delay: .3s; } .cards .gcard:nth-child(n+7) { animation-delay: .36s; }
.gcard .art .oa { fill: #fff; stroke: var(--edge); stroke-width: 2px; paint-order: stroke; }
.gcard .art .ob { stroke: var(--edge); stroke-width: 2px; paint-order: stroke; }
.gcard h3 { font-size: 1.55rem; letter-spacing: -.03em; }
.gcard .go span:last-child { background: var(--guess); color: #fff; padding: 4px 14px; border-radius: 999px; border: 2.5px solid var(--edge); box-shadow: 2px 2px 0 var(--edge); font-size: 1rem; }
@media (prefers-color-scheme: dark) { .gcard .art .oa { fill: var(--ref); } .gcard .go span:last-child { color: #15122e; } }
.chip { border: 2px solid var(--edge); background: var(--panel); }
.chip.done { background: var(--mint); color: var(--on-accent); border-color: var(--edge); }
@keyframes pop-in { from { opacity: 0; transform: translateY(26px) scale(.94); } }

/* Extras, facts, steps */
.extra { border-radius: 20px; transition: transform .14s cubic-bezier(.3, 1.6, .5, 1), box-shadow .14s; }
.extra:hover { transform: translate(-2px, -4px) rotate(-.5deg); box-shadow: var(--shadow); }
.extra > span { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; border: 2.5px solid var(--edge); background: var(--sun); font-size: 1.5rem; transform: rotate(-4deg); }
.extra:nth-child(3n+2) > span { background: var(--pink); } .extra:nth-child(3n) > span { background: var(--mint); }
.extra-hot { background: var(--guess); color: #fff; }
.extra-hot b { color: #fff; }
@media (prefers-color-scheme: dark) { .extra-hot, .extra-hot b { color: #15122e; } }
.fcard { box-shadow: var(--shadow); border-radius: 24px; }
.fcard svg { border: 2.5px solid var(--edge); background: var(--skyp); }
.fcard .oa { fill: #fff; stroke: var(--edge); stroke-width: 2px; paint-order: stroke; }
.fcard .ob { stroke: var(--edge); stroke-width: 2px; paint-order: stroke; }
@media (prefers-color-scheme: dark) { .fcard .oa { fill: var(--ref); } }
.fcard .num { font-size: 2.3rem; }
.step-card { background: var(--panel); border: var(--bw) solid var(--edge); box-shadow: var(--shadow-sm); }
.step-card:nth-child(2)::before { background: var(--mint); } .step-card:nth-child(3)::before { background: var(--pink); }
.step-card::before { transform: rotate(-6deg); border-width: var(--bw); }
.section-head h2 { letter-spacing: -.035em; }
.faq details { border-bottom-width: 2.5px; }

/* Game pages */
.ghero .badge { transform: rotate(-5deg); box-shadow: var(--shadow-sm); background: var(--sun); }
.ghero .badge.w { background: var(--mint); } .ghero .badge.s { background: var(--lilac); } .ghero .badge.b { background: var(--pink); }
.ghero .badge.r { background: var(--skyp); } .ghero .badge.f { background: var(--peach); } .ghero .badge.d { background: var(--mint); }
.ghero h1 { letter-spacing: -.04em; }
.mode.active { box-shadow: 2px 2px 0 var(--guess); }
.game, .result, .panel { box-shadow: var(--shadow-lg); border-radius: 26px; }
.banner { box-shadow: var(--shadow-sm); border-radius: 16px; transform: rotate(-.4deg); }
.reveal, .hl-reveal { animation: pop-in .4s cubic-bezier(.2, 1.5, .4, 1); }
.pts { font-size: 2.5rem; }

/* Result screen: the score is the star */
.result { padding: 30px 20px; animation: pop-in .5s cubic-bezier(.2, 1.4, .4, 1); }
.rank { letter-spacing: -.03em; }
.total b {
  font-size: clamp(4.2rem, 16vw, 5.6rem); color: var(--guess); -webkit-text-stroke: 2.5px var(--edge); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--edge); display: inline-block; animation: score-pop .6s .1s cubic-bezier(.2, 1.8, .4, 1) backwards;
}
@keyframes score-pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } }
.vs { border-radius: 16px; box-shadow: var(--shadow-sm); transform: rotate(-.6deg); }
.lb-bars i.me { background: var(--guess); box-shadow: inset 0 0 0 2px var(--edge); }

/* Dialogs and toasts */
dialog { box-shadow: var(--shadow-lg); border-radius: 26px; }
dialog[open] { animation: pop-in .35s cubic-bezier(.2, 1.5, .4, 1); }
.toast { border: var(--bw) solid var(--edge); box-shadow: var(--shadow-sm); background: var(--sun); color: #1b1740; }

/* Stats, league and other panels */
.st-game { box-shadow: var(--shadow); border-radius: 22px; transition: transform .14s, box-shadow .14s; }
a.st-game:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-lg); }
.stats div { border: 2.5px solid var(--edge); background: var(--panel); }
.lg-table li.me { background: var(--sun); color: #1b1740; }
.lg-table li.me .lg-pts small, .lg-table li.me .lg-sub { color: #4b4670; }

@media (max-width: 820px) {
  .parade { transform: none; }
  .tt-head { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .gcard, .result, .total b, .reveal, .hl-reveal, dialog[open], .eyebrow .dot { animation: none !important; }
  .brand:hover .logo, a.gcard:hover, .extra:hover { transform: none; }
}
@media (prefers-color-scheme: dark) { .cards .gcard:nth-child(6n+1) .art { background: #8a6a1c; } .ghero .badge { background: #8a6a1c; } .extra > span { background: #8a6a1c; } }

/* ===== Contact page ===== */
.ct-main { text-align: center; padding: 26px 18px; margin-bottom: 8px; }
.ct-k { margin: 0; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.ct-mail { display: inline-block; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 6vw, 2.3rem); letter-spacing: -.03em; color: var(--guess-deep); text-decoration: none; margin: 4px 0 8px; word-break: break-all; }
.ct-topics .mode-card p { color: var(--muted); }

/* Only the logo sits near the left edge on wide screens; the menu stays in the centred header.
   relative + left moves it without changing the layout, so the menu does not shift. */
@media (min-width: 1100px) { .top-in .brand { position: relative; left: calc((1040px - 100vw) / 2 + 8px); } }

/* ===== Categories page ===== */
.cat-cards .gcard .art { height: 150px; }
.cat-card .body { gap: 10px; }
.cat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cat-actions a { flex: 1; min-width: 120px; padding: 10px 14px; }
.ghero .sub a { color: var(--guess-deep); font-weight: 800; }

/* ===== Phones: compact header, comfy tap targets, no sideways scroll ===== */
.guide > section { min-width: 0; }                 /* lets wide tables scroll inside their box instead of widening the page */
.faq summary { padding: 6px 0; min-height: 44px; align-items: center; }
.controls input[type=range] { height: 40px; }
.tt-g { min-height: 40px; }
@media (max-width: 560px) {
  /* the header scrolls away with the page, and its links sit on one swipeable row */
  .top { position: relative; }
  .top-in { row-gap: 6px; }
  .brand .name { font-size: 1.2rem; }
  .brand .logo svg { width: 32px; height: 32px; }
  .glinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 4px; margin: 0 -12px; padding-left: 12px; width: calc(100% + 24px); }
  .glinks::-webkit-scrollbar { display: none; }
  .glink { white-space: nowrap; flex: none; padding: 8px 12px; }
  .tools { gap: 4px; }
  .tools .icon { min-width: 36px; height: 36px; }
  /* 16px stops iPhones zooming in when a field is tapped */
  .cat-select, select, input[type=text], input:not([type]), textarea { font-size: 16px; }
  .so-num, .so-key, .so-dim, .bp-key, .hf-cap, .lg-who em, .st-game em { font-size: 12px; }
}
@media (max-width: 560px) { .bdg em { font-size: 12px; } }
/* the smallest phones: keep the logo and the game's buttons on one row */
@media (max-width: 360px) {
  .brand { gap: 6px; }
  .brand .name { font-size: 1.05rem; }
  .tools .icon { padding: 0 6px; min-width: 34px; }
}
