/* Layout: a risograph-printed puzzle booklet. Newsprint ground, fluorescent inks, chunky ink-outlined pieces
   with hard shadows, titles printed slightly off-register. The hub is a 2×2 sheet of game covers. */
@font-face { font-family: 'Bagel Fat One'; src: url(fonts/bagel.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url(fonts/atkinson-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url(fonts/atkinson-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* riso inks */
  --crowns: #ffb511; --rungs: #ff6c2f; --thread: #00a95c; --mosaic: #62a8e5; --pink: #ff48b0;
  --bg: #f4f3ee; --card: #fffefb; --ink: #1d1a2f; --muted: #646078; --line: #d8d5ca; --shadow: #1d1a2f; --on-game: #1d1a2f;
  --bad: #e5243b;
  --grain-opacity: .06;
  /* Crowns regions: ink tints */
  --r0: #ffcfe6; --r1: #ffe48c; --r2: #b4e6c7; --r3: #bfdff7; --r4: #ffc4a4; --r5: #d8cbf2; --r6: #a6e0dc; --r7: #e3e0d4;
  --display: 'Bagel Fat One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --game: var(--pink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17151f; --card: #221f2e; --ink: #f2efe6; --muted: #a39fb4; --line: #3a364a; --shadow: #07060b; --on-game: #17151f;
    --bad: #ff5a6e; --grain-opacity: .08;
    --r0: #7a2e58; --r1: #78611a; --r2: #1f6a44; --r3: #1e5480; --r4: #8a4120; --r5: #4e3d80; --r6: #1d6b66; --r7: #4a4757;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17151f; --card: #221f2e; --ink: #f2efe6; --muted: #a39fb4; --line: #3a364a; --shadow: #07060b; --on-game: #17151f;
  --bad: #ff5a6e; --grain-opacity: .08;
  --r0: #7a2e58; --r1: #78611a; --r2: #1f6a44; --r3: #1e5480; --r4: #8a4120; --r5: #4e3d80; --r6: #1d6b66; --r7: #4a4757;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 var(--body); padding-inline: 16px; padding-block: 0 56px; position: relative; min-height: 100vh; }
/* Paper grain over everything, never blocking input. */
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; text-wrap: balance; margin: 0; }
.wrap { max-width: 540px; margin-inline: auto; }
/* Off-register print: ink letters with the game's ink peeking out behind. */
.print { color: var(--ink); text-shadow: .06em .06em 0 var(--game); }

/* Chunky pressable buttons */
button, .btn { touch-action: manipulation; font: inherit; font-weight: 700; color: var(--ink); background: var(--card); border: 2.5px solid var(--ink); border-radius: 12px; padding: .5em 1em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4em; box-shadow: 0 3px 0 var(--shadow); transition: transform .06s, box-shadow .06s; }
button:active:not(:disabled), .btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--shadow); }
button:disabled { opacity: .4; cursor: default; box-shadow: none; transform: translateY(3px); }
.primary { background: var(--game); color: var(--on-game); }

/* Game page header */
.undo-top { padding: .25em .7em; font-size: .95rem; box-shadow: 0 2px 0 var(--shadow); }
.undo-top svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mode { display: flex; gap: 6px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.mode a { text-decoration: none; font-weight: 700; padding: .3em .85em; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--card); }
.mode a.on { background: var(--ink); color: var(--card); }
.mode .again { margin-left: auto; padding: .3em .85em; }
.done .preview { margin: 0; width: 100%; font: 700 .95rem/1.5 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; background: var(--bg); border: 2px dashed var(--line); border-radius: 10px; padding: 10px 12px; max-height: 9em; overflow: auto; }
.done .social { margin: 0; font-size: .9rem; color: var(--muted); }
.done .social a { color: var(--ink); font-weight: 700; }
.done .link { all: unset; cursor: pointer; color: var(--ink); font-weight: 700; text-decoration: underline; }
.done .link:focus-visible { outline: 3px solid var(--pink); }
.bar { display: flex; align-items: center; gap: 12px; padding-block: 14px 4px; max-width: 540px; margin-inline: auto; }
.bar .back { padding: .25em .75em; font-size: .95rem; box-shadow: 0 2px 0 var(--shadow); white-space: nowrap; }
.bar .back span { font-size: 1.15em; line-height: 1; }
.bar .spacer { flex: 1; }
.bar .time { font-family: var(--display); font-size: 1.1rem; font-variant-numeric: tabular-nums; background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px; padding: 0 .55em; min-width: 3.6em; text-align: center; }
.title { display: flex; align-items: center; gap: 12px; padding-block: 14px 18px; }
.title h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
.sticker { font-family: var(--display); font-size: 1rem; background: var(--game); color: var(--on-game); border: 2.5px solid var(--ink); border-radius: 8px; padding: .15em .5em; transform: rotate(-4deg); box-shadow: 2px 2px 0 var(--shadow); white-space: nowrap; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-block: 18px 0; }
.controls .note { color: var(--muted); font-size: .92rem; flex: 1 1 100%; min-width: 0; }
.rules { margin-top: 36px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; padding: 18px 20px; max-width: 65ch; position: relative; }
.rules h2 { font-size: 1.3rem; margin-bottom: 10px; }
.rules ul { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; color: var(--muted); }
.rules li::marker { color: var(--game); }

/* Shared square board: ink frame, hard shadow */
.board { --n: 8; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); width: 100%; aspect-ratio: 1; max-width: 100%; background: var(--ink); border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; gap: 1px; user-select: none; -webkit-user-select: none; box-shadow: 6px 6px 0 var(--game); position: relative; }

/* Crowns */
.crowns .board { touch-action: none; }
.crowns .cell { all: unset; box-sizing: border-box; background: var(--region); display: grid; place-items: center; cursor: pointer; position: relative; }
.crowns .cell:focus-visible { outline: 3px solid var(--pink); outline-offset: -3px; z-index: 2; }
.crowns .cell.wall-r { box-shadow: inset -3px 0 0 var(--ink); }
.crowns .cell.wall-b { box-shadow: inset 0 -3px 0 var(--ink); }
.crowns .cell.wall-r.wall-b { box-shadow: inset -3px 0 0 var(--ink), inset 0 -3px 0 var(--ink); }
.crowns .cell svg { width: 66%; height: 66%; overflow: visible; }
.crowns .cell .x { width: 34%; height: 34%; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; opacity: .5; }
.crowns .cell .crown { fill: var(--crowns); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(1.5px 1.5px 0 var(--shadow)); }
.crowns .cell.just svg { animation: drop .28s cubic-bezier(.3, 1.6, .5, 1) both; }
.crowns .cell.bad { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--bad) 40%, transparent) 0 5px, transparent 5px 11px), var(--region); }
.crowns .cell.bad .crown { fill: var(--bad); }
.crowns .board.solved .cell svg.crown-svg { animation: wave .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--row) * 70ms); }
@keyframes drop { from { transform: scale(.3) translateY(-30%); opacity: 0; } }
@keyframes wave { 40% { transform: translateY(-28%) scale(1.15) rotate(-8deg); } }
.stamp { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.stamp span { font-family: var(--display); font-size: clamp(2.4rem, 13vw, 4rem); color: var(--pink); border: 5px solid var(--pink); border-radius: 14px; padding: .05em .35em; background: color-mix(in srgb, var(--card) 85%, transparent); transform: rotate(-12deg); animation: stamp .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stamp { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } }

/* Rungs */
.ladder { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; position: relative; }
.ladder::before, .ladder::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8px; background: var(--game); border: 2.5px solid var(--ink); border-radius: 6px; z-index: 0; }
.ladder::before { left: calc(50% - 9.5rem); } .ladder::after { right: calc(50% - 9.5rem); }
.rung { display: flex; gap: 8px; position: relative; z-index: 1; }
.tile-l { width: clamp(3rem, 15vw, 3.6rem); aspect-ratio: 1; display: grid; place-items: center; font-family: var(--display); font-size: clamp(1.6rem, 8vw, 2.1rem); text-transform: uppercase; background: var(--card); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--shadow); line-height: 1; }
.tile-l.changed { background: var(--game); color: var(--on-game); }
.rung.end .tile-l { background: var(--ink); color: var(--card); }
.rung.goal .tile-l { background: var(--card); color: var(--ink); border-style: dashed; box-shadow: none; }
.rung.hinted .tile-l { border-color: var(--pink); }
.rung.new { animation: drop .3s cubic-bezier(.3, 1.6, .5, 1) both; }
.ladder .gap { font-family: var(--display); color: var(--muted); font-size: 1.6rem; line-height: .6; position: relative; z-index: 1; background: var(--bg); padding-inline: 6px; }
#play { display: flex; gap: 10px; padding-block: 22px 0; justify-content: center; }
#play input { width: 11ch; min-width: 0; font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; letter-spacing: .3em; text-align: center; padding: .25em .2em .25em .5em; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); }
#play input::placeholder { font-family: var(--body); font-size: 1rem; letter-spacing: normal; text-transform: none; color: var(--muted); }
#play input:focus { outline: 3px solid var(--game); outline-offset: 1px; }
.count { font-family: var(--display); }

/* Thread */
.thread .board { touch-action: none; background: var(--line); }
.thread .cell { background: var(--card); display: grid; place-items: center; }
.thread .cell.on { background: color-mix(in srgb, var(--game) 22%, var(--card)); }
.thread .board svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.thread polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thread .under { stroke: var(--ink); stroke-width: .5; }
.thread .over { stroke: var(--game); stroke-width: .34; }
.thread circle { fill: var(--game); stroke: var(--ink); stroke-width: .08; }
.thread .dot { position: relative; z-index: 2; width: 66%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; font-family: var(--display); font-size: clamp(.95rem, 4.8vw, 1.35rem); line-height: 1; }
.thread .cell.on .dot { background: var(--game); color: var(--on-game); box-shadow: 0 0 0 2.5px var(--ink); }
.thread .board.solved .cell.on { animation: glow .5s ease both; animation-delay: calc(var(--k) * 12ms); }
@keyframes glow { 50% { background: var(--game); } }
.progress { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* Mosaic */
/* Clue areas are fixed for the longest clue the generator allows (MAX_CLUES = 3 numbers), so the board never moves.
   They read as part of the board: tinted panels joined to the grid, one stripe per row and column, each number on its own chip. */
.nono { --clue-w: calc(3 * 1.3em + 12px); font-size: clamp(.74rem, 3.3vw, .95rem); display: grid; grid-template-columns: var(--clue-w) minmax(0, 1fr); grid-template-rows: calc(3 * 1.12em + 14px) auto; user-select: none; -webkit-user-select: none; touch-action: none; filter: drop-shadow(6px 6px 0 var(--game)); --tint: color-mix(in srgb, var(--game) 13%, var(--card)); --tint2: color-mix(in srgb, var(--game) 26%, var(--card)); }
.nono .corner { grid-area: 1 / 1; } .nono .cols { grid-area: 1 / 2; } .nono .rows { grid-area: 2 / 1; } .nono .cells { grid-area: 2 / 2; }
/* With room to spare, an empty column on the right as wide as the clues centres the grid itself on the page. */
@media (min-width: 600px) { .nono { grid-template-columns: var(--clue-w) minmax(0, 1fr) var(--clue-w); } }
.nono .cols, .nono .rows { display: grid; gap: 1px; border: 3px solid var(--ink); overflow: hidden; background: var(--line); }
.nono .cols { grid-template-columns: repeat(10, minmax(0, 1fr)); border-bottom: 0; border-radius: 12px 12px 0 0; margin-inline: 0 0; }
.nono .rows { grid-template-rows: repeat(10, minmax(0, 1fr)); border-right: 0; border-radius: 12px 0 0 12px; }
.nono .clue { display: flex; font-family: var(--display); font-size: 1em; line-height: 1.12; color: var(--ink); transition: opacity .2s; background: var(--tint); }
.nono .clue:nth-child(even) { background: var(--tint2); }
.nono .clue.col { flex-direction: column; justify-content: flex-end; align-items: center; gap: 1px; padding-bottom: 5px; }
.nono .clue.row { justify-content: flex-end; align-items: center; gap: 2px; padding-right: 5px; }
.nono .clue b { min-width: 1.1em; text-align: center; background: color-mix(in srgb, var(--card) 75%, transparent); border-radius: 4px; padding: 0 .08em; }
.nono .clue.met b { opacity: .3; }
.nono .cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 3px solid var(--ink); border-radius: 0 0 12px 0; overflow: hidden; position: relative; }
.nono .cell { all: unset; box-sizing: border-box; aspect-ratio: 1; background: var(--card); display: grid; place-items: center; cursor: pointer; }
.nono .cell:focus-visible { outline: 3px solid var(--pink); outline-offset: -3px; }
.nono .cell.cut-r { box-shadow: inset -2px 0 0 var(--ink); }
.nono .cell.cut-b { box-shadow: inset 0 -2px 0 var(--ink); }
.nono .cell.cut-r.cut-b { box-shadow: inset -2px 0 0 var(--ink), inset 0 -2px 0 var(--ink); }
.nono .cell.on { background: var(--ink); }
.nono .cell.just.on { animation: pop .2s ease-out both; }
.nono .cell svg { width: 55%; height: 55%; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; }
.nono.solved .cell.on { background: var(--game); animation: reveal .45s ease both; animation-delay: calc(var(--k) * 35ms); }
@keyframes pop { from { transform: scale(.6); } }
@keyframes reveal { 0% { background: var(--ink); } 50% { transform: scale(1.12); } }

/* Result dialog */
dialog { border: 3px solid var(--ink); border-radius: 18px; padding: 0; background: var(--card); color: var(--ink); width: min(92vw, 400px); box-shadow: 8px 8px 0 var(--game); overflow: visible; }
dialog[open] { animation: drop .3s cubic-bezier(.3, 1.4, .5, 1) both; }
dialog::backdrop { background: rgb(15 12 25 / .55); }
.done { padding: 30px 24px 22px; display: grid; gap: 12px; position: relative; text-align: center; justify-items: center; }
.done .sticker { position: absolute; top: -16px; left: 50%; translate: -50% 0; }
.done h2 { font-size: 2.1rem; }
.done .detail { margin: 0; color: var(--muted); }
.done .stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0; width: 100%; border-block: 2.5px dashed var(--line); padding-block: 10px; }
.done .stats dt { font-size: .78rem; color: var(--muted); font-weight: 700; }
.done .stats dd { margin: 0; font-family: var(--display); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.done .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.done textarea { width: 100%; font: inherit; border-radius: 10px; border: 2.5px solid var(--ink); background: var(--bg); color: var(--ink); padding: 8px; }
.done .next { margin: 2px 0 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.done .close { position: absolute; top: 10px; right: 10px; width: 2.2em; height: 2.2em; padding: 0; box-shadow: none; border-width: 2px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); text-align: center; z-index: 30; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer and text pages */
.site-foot { max-width: 820px; margin: 48px auto 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); border-top: 2.5px dashed var(--line); padding-top: 16px; }
.site-foot a { color: var(--ink); }
.page .wrap, .page .bar, .page .site-foot { max-width: 680px; }
.prose { max-width: 65ch; }
.prose h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); margin: 18px 0 18px; --game: var(--pink); }
.prose h2 { font-size: 1.4rem; margin: 28px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--ink); font-weight: 700; }

/* Hub streak banner */
.streakbar { max-width: 820px; margin: 0 auto 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 14px 18px; box-shadow: 5px 5px 0 var(--pink); }
.streakbar .flame { font-size: 2.2rem; line-height: 1; }
.streakbar .flame.out { filter: grayscale(1); opacity: .45; }
.streakbar .big { font-family: var(--display); font-size: clamp(1.6rem, 7vw, 2.1rem); line-height: 1; }
.streakbar .sub { color: var(--muted); font-size: .92rem; }
.streakbar .today { margin-left: auto; display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: .9rem; }
.streakbar .today i { width: 22px; height: 22px; border: 2.5px solid var(--ink); border-radius: 6px; background: var(--card); }
.streakbar .today i.on { background: var(--game); }
@media (max-width: 520px) { .streakbar .today { margin-left: 0; width: 100%; } }

/* Hub */
.hub-head { max-width: 820px; margin-inline: auto; padding-block: 34px 26px; display: grid; gap: 14px; justify-items: start; }
.wordmark { font-size: clamp(3.6rem, 19vw, 7rem); line-height: .85; padding-bottom: .12em; letter-spacing: -.01em; --game: var(--pink); }
.wordmark .w { display: inline-block; }
.wordmark .w:nth-child(1) { transform: rotate(-3deg); }
.wordmark .w:nth-child(2) { transform: rotate(4deg) translateY(.04em); --game: var(--crowns); }
.wordmark .w:nth-child(3) { transform: rotate(-2deg); --game: var(--thread); }
.hub-head .lede { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 36ch; }
.hub-head .sticker { transform: rotate(-3deg); --game: var(--card); color: var(--ink); }
.games { list-style: none; padding: 0; margin: 0 auto; max-width: 820px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; text-decoration: none; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 5px 5px 0 var(--shadow); transition: transform .12s, box-shadow .12s; position: relative; height: 100%; }
.tile:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow); }
.tile:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow); }
.cover { background: var(--game); aspect-ratio: 4 / 3; display: grid; place-items: center; border-bottom: 3px solid var(--ink); position: relative; padding: 14px; min-width: 0; }
.tile .info { padding: 16px 16px 16px; display: grid; gap: 4px; align-content: start; }
.tile h2 { font-size: 1.9rem; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile .sticker { position: absolute; bottom: -15px; right: 12px; --game: var(--card); color: var(--ink); font-size: .85rem; transform: rotate(5deg); z-index: 2; }
.tile .sticker.solved { --game: var(--pink); color: var(--on-game); }
.tile .streak { font-weight: 700; font-size: .85rem; color: var(--ink); }
/* Cover previews of today's puzzles */
.mini-crowns { width: 66%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); border: 2.5px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--ink); gap: 1px; box-shadow: 3px 3px 0 var(--shadow); rotate: -3deg; }
.mini-crowns i { background: var(--region); }
.mini-rungs { display: grid; justify-items: center; gap: 6px; rotate: 2deg; }
.mini-rungs span { display: flex; gap: 4px; }
.mini-rungs i { font-style: normal; width: clamp(1.4rem, 5vw, 2rem); aspect-ratio: 1; display: grid; place-items: center; font-family: var(--display); font-size: clamp(.9rem, 3.4vw, 1.3rem); text-transform: uppercase; background: var(--ink); color: var(--card); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 2px 2px 0 var(--shadow); }
.mini-rungs span:last-child i { background: var(--card); color: var(--ink); border-style: dashed; }
.mini-rungs b { font-family: var(--display); font-weight: 400; color: var(--ink); line-height: .7; }
.mini-thread { width: 64%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--card); border: 2.5px solid var(--ink); border-radius: 8px; padding: 4px; box-shadow: 3px 3px 0 var(--shadow); rotate: 3deg; }
.mini-thread i { display: grid; place-items: center; font-style: normal; font-family: var(--display); font-size: clamp(.5rem, 1.8vw, .8rem); color: var(--card); }
.mini-thread i.d { background: var(--ink); border-radius: 50%; }
.mini-mosaic { width: 62%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px; background: var(--line); border: 2.5px solid var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 3px 3px 0 var(--shadow); rotate: -3deg; }
.mini-mosaic i { background: var(--card); }
.mini-mosaic { position: relative; }
.mini-mosaic::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: clamp(2.4rem, 9vw, 3.6rem); color: var(--ink); text-shadow: 3px 3px 0 var(--game); }
.hub-foot { max-width: 820px; margin: 40px auto 0; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.hub-foot .tick { font-family: var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .games { gap: 14px; }
  .tile h2 { font-size: 1.45rem; }
  .tile p { font-size: .85rem; }
  .tile .info { padding: 10px 12px 12px; }
}
@media (max-width: 360px) { .games { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Mosaic gets a wider page on big screens: the centred grid gives up room to the empty right column. */
@media (min-width: 600px) { .mosaic .wrap, .mosaic .bar { max-width: 620px; } }
