/* generated by tools/howto/build.py from index.html; don't edit */

  /* the typefaces ship with the paper (fonts/), so it works offline and asks nothing of anyone else; all under the SIL Open Font License */
  @font-face { font-family: 'UnifrakturMaguntia'; src: url("../fonts/unifraktur.woff") format("woff"); font-weight: 400; font-display: swap; }
  @font-face { font-family: 'Playfair Display'; src: url("../fonts/playfair.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }
  @font-face { font-family: 'Playfair Display'; src: url("../fonts/playfair-italic.woff") format("woff"); font-weight: 400 900; font-style: italic; font-display: swap; }
  @font-face { font-family: 'Newsreader'; src: url("../fonts/newsreader.woff") format("woff"); font-weight: 400 600; font-style: normal; font-display: swap; }
  @font-face { font-family: 'Newsreader'; src: url("../fonts/newsreader-italic.woff") format("woff"); font-weight: 400 600; font-style: italic; font-display: swap; }
  @font-face { font-family: 'Libre Franklin'; src: url("../fonts/librefranklin.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }


  :root {
    --paper: #f4efe4; --paper-2: #ebe4d4; --paper-3: #e1d8c4;
    --ink: #1b1a17; --ink-2: #4d483f; --ink-3: #7c7567;
    --rule: #1b1a17; --faint: #cbc1ab;
    --red: #b3261e; --red-soft: rgba(179, 38, 30, 0.1);
    --hit-bg: #1b1a17; --hit-fg: #f4efe4; --ok-bg: #3f9a35; --ok-fg: #ffffff; --out-bg: color-mix(in srgb, var(--ink) 24%, var(--paper));
    --near-bg: #eec643; --near-fg: #1b1a17; --good: #2e7d32;
    --sel-bg: rgba(238, 198, 67, 0.55); --sel-soft: rgba(238, 198, 67, 0.18); --same-bg: rgba(238, 198, 67, 0.3); --same-ring: rgba(190, 140, 20, 0.75);
    --type: #2f2d29; --type-face: #3b3833; --type-fg: #f1ebdd;
    --hl-1: rgba(255, 212, 0, 0.55); --hl-2: rgba(255, 110, 170, 0.42); --hl-3: rgba(90, 220, 130, 0.45); --hl-4: rgba(95, 175, 255, 0.45); --hl-5: rgba(255, 150, 60, 0.45);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 10px 26px rgba(40, 30, 10, 0.1);
    --grain-op: 0.07; --blend: multiply; --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 0 0.4  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.07'/></svg>");
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #161512; --paper-2: #1f1d19; --paper-3: #2a2721;
      --ink: #ece5d5; --ink-2: #b3ab9a; --ink-3: #847d6f;
      --rule: #ece5d5; --faint: #3a362e;
      --red: #ff7a6b; --red-soft: rgba(255, 122, 107, 0.13);
      --hit-bg: #ece5d5; --hit-fg: #161512; --ok-bg: #5cb350; --ok-fg: #ffffff; --out-bg: color-mix(in srgb, var(--ink) 20%, var(--paper));
    --near-bg: #d9ad2b; --near-fg: #161512; --good: #6fcf7a;
    --sel-bg: rgba(217, 173, 43, 0.42); --sel-soft: rgba(217, 173, 43, 0.12); --same-bg: rgba(217, 173, 43, 0.22); --same-ring: rgba(230, 190, 70, 0.7);
      --type: #0c0b09; --type-face: #2b2924; --type-fg: #f1ebdd;
      --hl-1: rgba(255, 212, 0, 0.32); --hl-2: rgba(255, 110, 170, 0.3); --hl-3: rgba(90, 220, 130, 0.28); --hl-4: rgba(95, 175, 255, 0.32); --hl-5: rgba(255, 150, 60, 0.3);
      --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px rgba(0, 0, 0, 0.45);
      --grain-op: 0.05; --blend: screen; --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 0 0.4  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.06'/></svg>");
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --paper: #161512; --paper-2: #1f1d19; --paper-3: #2a2721;
    --ink: #ece5d5; --ink-2: #b3ab9a; --ink-3: #847d6f;
    --rule: #ece5d5; --faint: #3a362e;
    --red: #ff7a6b; --red-soft: rgba(255, 122, 107, 0.13);
    --hit-bg: #ece5d5; --hit-fg: #161512; --ok-bg: #5cb350; --ok-fg: #ffffff; --out-bg: color-mix(in srgb, var(--ink) 20%, var(--paper));
    --near-bg: #d9ad2b; --near-fg: #161512; --good: #6fcf7a;
    --sel-bg: rgba(217, 173, 43, 0.42); --sel-soft: rgba(217, 173, 43, 0.12); --same-bg: rgba(217, 173, 43, 0.22); --same-ring: rgba(230, 190, 70, 0.7);
    --type: #0c0b09; --type-face: #2b2924; --type-fg: #f1ebdd;
    --hl-1: rgba(255, 212, 0, 0.32); --hl-2: rgba(255, 110, 170, 0.3); --hl-3: rgba(90, 220, 130, 0.28); --hl-4: rgba(95, 175, 255, 0.32); --hl-5: rgba(255, 150, 60, 0.3);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px rgba(0, 0, 0, 0.45);
    --grain-op: 0.05; --blend: screen; --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.45  0 0 0 0 0.4  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.06'/></svg>");
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { margin: 0; min-height: 100%; }
  body {
    background: var(--grain), var(--paper); background-color: var(--paper); color: var(--ink);
    font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif; font-size: 17px; line-height: 1.45;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  }
  /* newsprint grain: painted straight onto the page (a blended overlay made Chrome skip redrawing parts of the page) */
  button, input { font-family: inherit; color: inherit; }
  button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  a { color: inherit; }
  .paper { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-height: 100vh; display: flex; flex-direction: column; }
  .sans { font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif; }
  .smallcaps { font-family: 'Libre Franklin', sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

  /* masthead */
  .masthead { text-align: center; padding-bottom: 2px; }
  .ears { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
  .ear { font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); text-align: left; }
  .ear.motto { font-family: 'Newsreader', serif; font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.8rem; text-align: center; }
  .ears-r { justify-self: end; display: flex; align-items: center; gap: 2px; min-width: 0; }
  .mast-acct { display: flex; align-items: center; gap: 2px; min-width: 0; }
  .mast-acct button { font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: none; border: 0; padding: 6px; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
  .mast-acct .mast-up { border: 1.5px solid var(--ink); border-radius: 2px; text-decoration: none; padding: 5px 8px; margin-left: 2px; }
  .mast-acct .mast-up:hover { background: var(--ink); color: var(--paper); }
  .mast-acct .mast-me { display: flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; font-size: 0.8rem; font-weight: 700; text-decoration: none; min-width: 0; }
  .mast-acct .mast-me span { overflow: hidden; text-overflow: ellipsis; max-width: 14ch; border-bottom: 1px solid currentColor; }
  .mast-acct .mast-me svg { width: 15px; height: 15px; flex: none; }
  .mast-acct .mast-lb { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; text-decoration: none; color: var(--ink); }
  .mast-acct .mast-lb svg { width: 19px; height: 19px; }
  .mast-acct .mast-lb:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
  /* ================= Killer Sudoku ================= */
  .ks-cages { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
  .ks-cages path { fill: none; stroke: var(--ink-2); stroke-width: 1.3px; stroke-dasharray: 3 2.5; vector-effect: non-scaling-stroke; }
  .ks .bc { position: relative; }
  .ks .bc span:not(.nt) { position: relative; z-index: 2; }
  .ks-lab { position: absolute; top: 3%; left: 5%; z-index: 3; font-style: normal; font-family: 'Libre Franklin', sans-serif; font-weight: 800; line-height: 1; padding: 0 1px; font-size: max(8px, calc(100cqw / 9 * 0.2)); color: var(--ink); background-color: inherit; pointer-events: none; }
  .ks-lab.ok { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; }
  .ks .bc .nt { inset: 28% 8% 8%; grid-template-rows: repeat(3, 1fr); }
  .ks .bc.incage:not(.sel):not(.same) { background-image: linear-gradient(var(--sel-soft), var(--sel-soft)); }
  .ks.done .bs-tools, .ks.done .bs-pad, .ks.done .bs-check { display: none; }
  /* a bigger board: on phones it runs nearly edge to edge; on wide screens the page widens and the buttons and numbers sit beside it */
  .ks-side { display: flex; flex-direction: column; gap: 12px; }
  .ks.done .ks-side { display: none; }
  .paper .bs.ks .bs-grid.ks-grid { width: min(100%, 568px, calc(100vh - 300px)); }
  @media (max-width: 600px) { .paper .bs.ks .bs-grid.ks-grid { --kw: min(calc(100% + 20px), calc(100vh - 290px)); width: var(--kw); margin-inline: max(-10px, calc((100% - var(--kw)) / 2)); } }
  @media (min-width: 980px) and (min-height: 600px) {
    .paper:has(.ks) { max-width: 960px; }
    .bs.ks { display: grid; grid-template-columns: auto 300px; column-gap: 32px; justify-content: center; align-items: start; }
    .ks > * { grid-column: 1 / -1; }
    .paper .bs.ks > .bs-grid.ks-grid { grid-column: 1; width: min(620px, calc(100vh - 250px)); min-width: 0; margin: 0; }
    .ks > .ks-side { grid-column: 2; padding-top: 4px; }
    .ks-side .bs-tools, .ks-side .bs-pad { width: 100%; }
    .ks-side .bs-pad { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .ks-side .bs-pad .pd { height: 64px; font-size: 1.7rem; }
    .ks-side .bs-check { margin: 0 auto; }
    .ks .fp-head, .ks .tierbar { width: 100%; }
  }
  /* ================= The Mailroom ================= */
  .mr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .mr .fp-head, .mr .tierbar { width: 100%; max-width: 460px; }
  .mr-board { position: relative; display: grid; grid-template-columns: repeat(var(--w), 1fr); width: min(100%, 440px, calc((100vh - 400px) * var(--w) / var(--h))); min-width: 250px; container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; }
  .mr-c { aspect-ratio: 1; background: var(--paper); position: relative; }
  /* floor: warm boards, three to a square */
  .mr-c:not(.w) { background-color: color-mix(in srgb, #c49a62 16%, var(--paper));
    background-image: repeating-linear-gradient(0deg, color-mix(in srgb, var(--ink) 12%, transparent) 0 1px, transparent 1px 33.34%),
      linear-gradient(90deg, transparent 0 30%, color-mix(in srgb, var(--ink) 9%, transparent) 30% calc(30% + 1px), transparent calc(30% + 1px) 70%, color-mix(in srgb, var(--ink) 9%, transparent) 70% calc(70% + 1px), transparent calc(70% + 1px)); background-size: 100% 100%, 100% 33.34%; }
  .mr-c.st { box-shadow: inset 0 calc(100cqw / var(--w) * 0.13) 0 -1px rgba(0, 0, 0, 0.16); }
  .mr-c.sl { box-shadow: inset calc(100cqw / var(--w) * 0.09) 0 0 -1px rgba(0, 0, 0, 0.1); }
  .mr-c.st.sl { box-shadow: inset 0 calc(100cqw / var(--w) * 0.13) 0 -1px rgba(0, 0, 0, 0.16), inset calc(100cqw / var(--w) * 0.09) 0 0 -1px rgba(0, 0, 0, 0.1); }
  /* walls: brick, mortar in a neutral grey so it reads in the day and night editions */
  .mr-c.w { background-color: #6e3f30;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23d8cfc0' stroke-opacity='.55' stroke-width='1.6'%3E%3Cpath d='M0 10h40M0 20h40M0 30h40M0 40h40M10 0v10M30 0v10M0 10v10M20 10v10M40 10v10M10 20v10M30 20v10M0 30v10M20 30v10M40 30v10'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
  .mr-c.w.face { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23d8cfc0' stroke-opacity='.55' stroke-width='1.6'%3E%3Cpath d='M0 10h40M0 20h40M0 30h40M10 0v10M30 0v10M0 10v10M20 10v10M40 10v10M10 20v10M30 20v10'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(transparent 72%, rgba(0, 0, 0, 0.32) 72%); }
  /* loading-bay spots: red corner marks over a light hatch */
  .mr-c.goal::after { content: ""; position: absolute; inset: 10%; border-radius: 2px;
    background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--red) 16%, transparent) 0 2px, transparent 2px 6px);
    --k: 28%; --t: 2.5px;
    border: var(--t) solid var(--red); -webkit-mask: conic-gradient(at var(--k) var(--k), transparent 75%, #000 0) 0 0 / calc(100% - var(--k)) calc(100% - var(--k)), linear-gradient(#000, #000) content-box; mask: conic-gradient(at var(--k) var(--k), transparent 75%, #000 0) 0 0 / calc(100% - var(--k)) calc(100% - var(--k)), linear-gradient(#000, #000) content-box; }
  .mr-board { border: 3px solid var(--ink); border-radius: 4px; overflow: hidden; box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 22%, transparent); }
  .mr-s { position: absolute; left: 0; top: 0; width: calc(100% / var(--w)); aspect-ratio: 1; transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%)); transition: transform 0.12s ease-out; pointer-events: none; z-index: 2; }
  .mr-box { pointer-events: auto; cursor: pointer; }
  .mr-s svg { width: 100%; height: 100%; display: block; overflow: visible; }
  .mr-sh { fill: rgba(0, 0, 0, 0.18); }
  .mr-b0 { fill: #d9d2c3; stroke: #1d1b18; stroke-width: 1.4; }
  .mr-b1 { fill: #fbf8f0; stroke: #1d1b18; stroke-width: 1.8; }
  .mr-b4 { fill: #1d1b18; }
  .mr-b2 { stroke: #8a8478; stroke-width: 1.1; stroke-linecap: round; }
  .mr-b3 { stroke: #b3261e; stroke-width: 2; fill: none; stroke-linecap: round; } .mr-b3.thin { stroke-width: 1.4; }
  .mr-knot { fill: #b3261e; }
  .mr-tick { opacity: 0; transform-origin: 31px 9px; transform: scale(0.4); transition: opacity 0.15s ease, transform 0.2s ease; }
  .mr-tick circle { fill: #b3261e; stroke: #fbf8f0; stroke-width: 1.4; } .mr-tick path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mr-box.home .mr-tick { opacity: 1; transform: scale(1); }
  .mr-box.home .mr-b1 { fill: #f3ead6; }
  .mr-c1 { fill: #1d1b18; }
  .mr-coat { fill: #2f3b4c; } .mr-strap { stroke: #7a4a2a; stroke-width: 1.8; } .mr-bag { fill: #9b6a3e; stroke: #5c3a1e; stroke-width: 1; } .mr-bagline { stroke: #f3ead6; stroke-width: 1; }
  .mr-face { fill: #f0c9a0; stroke: #1d1b18; stroke-width: 1.2; }
  .mr-cap { fill: #b3261e; stroke: #1d1b18; stroke-width: 1.1; } .mr-brim { fill: #7d1a14; }
  .mr-body { transform-origin: 20px 36px; }
  .mr-me { z-index: 3; }
  .mr-me.face-l svg { transform: scaleX(-1); }
  .mr-me.walk .mr-body { animation: mr-step 0.14s ease-out; }
  @keyframes mr-step { 50% { transform: translateY(-1.6px) rotate(-3deg); } }
  .mr-me.bump svg { animation: shake 0.25s ease; }
  .mr-pad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: 46px 46px; gap: 6px; }
  .mr-pad .btn { padding: 0; font-size: 1rem; min-height: 0; }
  .mr-pad [data-dir="u"] { grid-column: 2; } .mr-pad [data-dir="l"] { grid-column: 1; grid-row: 2; } .mr-pad [data-dir="d"] { grid-column: 2; grid-row: 2; } .mr-pad [data-dir="r"] { grid-column: 3; grid-row: 2; }
  .mr-tools { width: min(100%, 460px); }
  .mr.done .mr-pad, .mr.done .mr-tools { display: none; }
  @media (pointer: fine) and (min-height: 760px) { .mr-pad { display: none; } }
  @media (max-height: 700px) { .mr-pad { grid-template-rows: 40px 40px; } }
  /* ================= Daily Deal ================= */
  .dd { display: flex; flex-direction: column; gap: 10px; }
  .dd .fp-head, .dd .tierbar, .dd-board, .dd-tools, .dd-finish { width: min(100%, 560px); margin-inline: auto; }
  .dd-board { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; min-height: 300px; }
  .dd-slot, .dd-card { position: absolute; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * 0.09); }
  .dd-slot { border: 1.5px dashed var(--faint); display: grid; place-items: center; color: var(--faint); font-size: calc(var(--cw) * 0.42); }
  .dd-slot.col { border-style: solid; border-color: color-mix(in srgb, var(--faint) 60%, transparent); }
  .dd-slot.stock { cursor: pointer; }
  .dd-slot.stock.again::after { content: "↻"; color: var(--ink-3); font-size: calc(var(--cw) * 0.5); }
  .dd-card { background: #fffdf7; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.18); color: #1d1b18; cursor: pointer; transition: transform 0.12s ease; }
  .dd-card.red { color: #b3261e; }
  /* card backs look like real ones: a light rim round a red lattice and a dark edge, so every card in a stack shows its own stripe */
  .dd-card.back { --rim: #fffdf7; cursor: default; border: 1px solid #4a1612; background-color: #a8322a;
    background-image: repeating-linear-gradient(45deg, rgba(255, 253, 247, 0.2) 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, rgba(255, 253, 247, 0.2) 0 1px, transparent 1px 5px);
    box-shadow: inset 0 0 0 calc(var(--cw) * 0.055) var(--rim), inset 0 0 0 calc(var(--cw) * 0.055 + 1px) rgba(74, 22, 18, 0.55), 0 -1px 2px rgba(0, 0, 0, 0.22), 0 1px 1.5px rgba(0, 0, 0, 0.25); }
  .dd-slot.stock ~ .dd-card.back[data-pile="s"] { cursor: pointer; }
  .dd-r { position: absolute; top: 4%; left: 7%; display: flex; flex-direction: column; align-items: center; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(var(--cw) * 0.27); line-height: 1; letter-spacing: -0.04em; }
  .dd-r i { font-style: normal; font-size: 0.85em; margin-top: 1px; }
  .dd-s { position: absolute; right: 8%; bottom: 4%; font-size: calc(var(--cw) * 0.5); line-height: 1; }
  .dd-card.under { pointer-events: none; }
  .dd-card.lift { z-index: 500 !important; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); transition: none; }
  .dd-card.nope { animation: shake 0.3s ease; }
  .dd-finish { text-align: center; }
  .dd.done .dd-tools, .dd.done .dd-finish { display: none; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dd-card:not(.back) { background: #ece6da; } }
  :root[data-theme="dark"] .dd-card:not(.back) { background: #ece6da; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dd-card.back { --rim: #ece6da; border-color: #12100d; } }
  :root[data-theme="dark"] .dd-card.back { --rim: #ece6da; border-color: #12100d; }
  /* ================= Timeline ================= */
  .tl { display: flex; flex-direction: column; gap: 10px; width: min(100%, 520px); margin: 0 auto; }
  .tl-left { font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .tl-ask { margin: 0; text-align: center; font-size: 0.95rem; }
  .tl-end-lab { font-family: 'Libre Franklin', sans-serif; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
  .tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .tl-card { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 6px 8px 10px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; position: relative; }
  .tl-card.lift { z-index: 5; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22); cursor: grabbing; }
  .tl-card.flash { animation: pop 0.2s ease; }
  .tl-card.lock, .tl.done .tl-card { cursor: default; }
  .tl-card.lock, .tl-card.right { background: var(--ink); color: var(--paper); }
  .tl-card.wrong { border-style: dashed; color: var(--ink-2); }
  .tl-text { flex: 1; font-size: 0.98rem; line-height: 1.3; }
  .tl-year { flex: none; min-width: 4.4em; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.05rem; color: var(--red); }
  .tl-card.lock .tl-year, .tl-card.right .tl-year { color: #fff; background: var(--red); padding: 4px 7px 3px; border-radius: 2px; min-width: 0; text-align: center; font-size: 1rem; line-height: 1.1; }
  .tl-card.lock .tl-year::after, .tl-card.right .tl-year::after { content: " ✓"; font-family: 'Libre Franklin', sans-serif; font-size: 0.72em; }
  .tl-grip { flex: none; display: grid; gap: 3px; width: 14px; }
  .tl-grip i { display: block; height: 2px; background: var(--ink-3); border-radius: 1px; }
  .tl-mv { display: flex; flex-direction: column; gap: 2px; }
  .tl-b { appearance: none; width: 40px; height: 26px; border: 1px solid var(--faint); background: var(--paper-2); color: var(--ink); border-radius: 3px; font-size: 0.7rem; cursor: pointer; }
  .tl-b:disabled { opacity: 0.25; cursor: default; }
  .tl-act { text-align: center; }
  .tl-msg { min-height: 1.3em; margin: 8px 0 0; font-size: 0.88rem; color: var(--ink-2); }
  .tl.done .tl-act { display: none; }
  .tl-ans-h { font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin: 14px 0 6px; }
  .tl-ans { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
  .tl-ans b { font-family: 'Playfair Display', serif; color: var(--red); margin-right: 4px; }
  /* ================= On This Day ================= */
  .od { display: flex; flex-direction: column; gap: 12px; width: min(100%, 520px); margin: 0 auto; }
  .od-clip { border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 4px 14px; text-align: center; }
  .od-date { font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
  .od-date b { display: inline-block; min-width: 3.4em; color: var(--red); letter-spacing: 0.2em; }
  .od-date b.shown { letter-spacing: 0.06em; animation: pop 0.3s ease; }
  .od-head { margin: 8px 0 0; font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(1.25rem, 5.4vw, 1.6rem); line-height: 1.22; text-wrap: balance; }
  .od.done .od-range { display: none; }
  .od-range { margin: 0; text-align: center; font-size: 0.95rem; color: var(--ink-2); min-height: 1.4em; }
  .od-range b { color: var(--ink); font-family: 'Libre Franklin', sans-serif; font-weight: 800; }
  .od-guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .od-guesses:empty { display: none; }
  .od-g { display: grid; grid-template-columns: 4.2em 1fr auto; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--faint); background: var(--paper-2); border-radius: 3px; font-family: 'Libre Franklin', sans-serif; }
  .od-g b { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
  .od-dir { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
  .od-band { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; border: 1.5px solid currentColor; }
  .od-band.b1 { background: var(--red); border-color: var(--red); color: #fff; }
  .od-band.b2 { color: var(--red); }
  .od-band.b3 { color: var(--ink); }
  .od-band.b4, .od-band.b5 { color: var(--ink-3); border-style: dashed; }
  .od-g.right { background: var(--ink); border-color: var(--ink); color: var(--paper); grid-template-columns: 4.2em 1fr; }
  .od-play { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .od-play[hidden] { display: none; }
  .od-entry { width: 100%; text-align: center; }
  .od-typed { display: inline-block; min-width: 5.2em; padding: 6px 14px 4px; border-bottom: 2.5px solid var(--ink); font-family: 'Playfair Display', serif; font-weight: 900; font-size: 2rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
  .od-typed.empty { color: var(--ink-3); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 13px 14px 9px; }
  .od-kb { max-width: 360px; }
  .od-kb .key { max-width: none; font-size: 1.15rem; }
  .od-kb .key.wide { flex: 1; max-width: none; font-size: 1.2rem; }
  .od-go { flex: 2; min-height: 54px; }
  .od-go:disabled { opacity: 0.45; cursor: default; }
  .figs.od-figs { grid-template-columns: repeat(4, 1fr); }
  .od-yest b { font-family: 'Playfair Display', serif; color: var(--red); margin-right: 4px; }
  /* short phones: a slimmer clipping, rows and keys so the keypad stays in view */
  @media (max-height: 760px) and (max-width: 899px) {
    .od { gap: 9px; }
    .od-clip { padding: 8px 4px 10px; }
    .od-head { font-size: clamp(1.1rem, 4.8vw, 1.35rem); margin-top: 5px; }
    .od-g { padding: 4px 10px; } .od-g b { font-size: 1.1rem; }
    .od-typed { font-size: 1.6rem; padding: 3px 14px 2px; } .od-typed.empty { font-size: 1rem; padding: 8px 14px 6px; }
    .od-kb .key, .od-go { height: 46px; min-height: 46px; } .od-kb { gap: 6px; }
  }
  /* wide screens: the clipping and guesses on the left, the keypad beside them */
  @media (min-width: 900px) {
    .paper:has(.od) { max-width: 960px; }
    .od { width: 100%; max-width: 880px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 40px; row-gap: 12px; align-items: start; }
    .od > * { grid-column: 1 / -1; }
    .od > .od-clip { grid-column: 1; grid-row: 3; }
    .od > .od-range { grid-column: 1; grid-row: 4; }
    .od > .od-guesses { grid-column: 1; grid-row: 5; }
    .od > .od-play { grid-column: 2; grid-row: 3 / span 3; padding-top: 6px; }
    .od.done > .od-clip, .od.done > .od-range, .od.done > .od-guesses { grid-column: 1 / -1; }
    .od .fp-head, .od .tierbar { width: 100%; }
  }
  /* ================= Misprint ================= */
  .mp { display: flex; flex-direction: column; gap: 12px; width: min(100%, 480px); margin: 0 auto; }
  .mp-ask { margin: 0; text-align: center; font-size: 0.95rem; color: var(--ink-2); min-height: 1.4em; }
  .mp-grid { --n: 5; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(4px, 1.4vw, 7px);
    width: min(100%, calc(100vh - 330px), 420px); min-width: 250px; margin: 0 auto; container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; }
  .mp-hole { aspect-ratio: 1; }
  .mp-t { appearance: none; aspect-ratio: 1; min-width: 0; padding: 0; position: relative; display: grid; place-items: center; cursor: pointer; border-radius: 3px;
    border: 1.5px solid var(--ink-3); background: var(--paper); color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 900; text-transform: uppercase;
    font-size: calc(100cqw / var(--n) * 0.5); line-height: 1; transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease; -webkit-tap-highlight-color: transparent; touch-action: none; }
  .mp-t::before { content: ""; position: absolute; pointer-events: none; }
  .mp-t.hit { background: var(--ink); border-color: var(--ink); color: var(--paper); cursor: default; }
  .mp-t.hit::before { top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 clamp(8px, 2.6cqw, 12px) clamp(8px, 2.6cqw, 12px) 0; border-color: transparent var(--red) transparent transparent; }
  .mp-t.near { border-color: var(--red); }
  .mp-t.near::before { left: 22%; right: 22%; bottom: 11%; height: 3px; background: var(--red); border-radius: 2px; }
  .mp-t.miss { color: var(--ink-2); border-color: var(--faint); background: var(--paper-2); }
  .mp-t.fix { background: var(--paper-2); border: 1.5px dashed var(--red); color: var(--red); }
  .mp-t.pick { background: var(--sel-bg); border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 25%, transparent); }
  .mp-t.cur:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
  .mp-t:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
  .mp-t.lift { z-index: 5; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25); transition: none; }
  .mp-t.swap { animation: pop 0.22s ease; }
  .mp-t.nope { animation: shake 0.3s ease; }
  .mp-t.hop { animation: hop 0.5s ease both; animation-delay: var(--d, 0ms); }
  .mp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 700; color: var(--ink-2); }
  .mp-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .mp-k { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 2px; border: 1.5px solid var(--ink-3); font-style: normal; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 0.7rem; }
  .mp-k.hit { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .mp-k.hit::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 6px 6px 0; border-color: transparent var(--red) transparent transparent; }
  .mp-k.near { border-color: var(--red); box-shadow: inset 0 -3px 0 -1px var(--red); }
  .mp-k.miss { background: var(--paper-2); border-color: var(--faint); color: var(--ink-2); }
  .mp.done .mp-legend { display: none; }
  .mp-words { text-align: center; font-size: 0.92rem; margin: 6px 0 0; }
  @media (max-height: 700px) { .mp-grid { width: min(100%, calc(100vh - 290px), 420px); } .mp { gap: 9px; } }
  /* ================= Thread ================= */
  .th { display: flex; flex-direction: column; gap: 10px; width: min(100%, 460px); margin: 0 auto; }
  .th-theme { text-align: center; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 8px 4px; }
  .th-theme span { display: block; font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
  .th-theme b { font-family: 'Playfair Display', serif; font-size: 1.35rem; line-height: 1.2; }
  .th-word { min-height: 1.6em; text-align: center; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.12em; }
  .th-word.good { color: var(--ink); animation: pop 0.25s ease; } .th-word.bad { color: var(--red); font-size: 0.85rem; letter-spacing: 0.04em; } .th-word.dim { color: var(--ink-2); font-size: 0.85rem; letter-spacing: 0.04em; }
  .th-board { position: relative; display: grid; grid-template-columns: repeat(var(--c), minmax(0, 1fr)); width: min(100%, calc((100vh - 405px) * var(--c) / var(--r)), 400px); min-width: 220px; margin: 0 auto;
    touch-action: none; user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .th-c { position: relative; z-index: 1; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; text-transform: uppercase;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(100cqw / var(--c) * 0.42); color: var(--ink); }
  .th-c::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; z-index: -1; transition: background-color 0.15s ease; }
  .th-c.on { color: var(--paper); } .th-c.on::before { background: var(--ink); }
  .th-c.got { color: #fff; cursor: default; } .th-c.got::before { background: var(--wc, var(--ink)); }
  .th-c.got.new::before { animation: pop 0.3s ease; }
  .th-c.hint::before { border: 2px dashed var(--red); }
  .th-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  .th-lines polyline { fill: none; stroke-width: 0.3; stroke-linecap: round; stroke-linejoin: round; }
  .th-lines polyline.got { stroke: var(--ink); } .th-lines polyline.on { stroke: var(--ink); }
  .th-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .th-bar .btn { padding: 10px 14px; font-size: 0.72rem; min-width: 92px; }
  #th-hint.ready { background: var(--red); border-color: var(--red); color: #fff; }
  .th-meter { display: flex; gap: 5px; }
  .th-meter i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
  .th-meter i.on { background: var(--red); border-color: var(--red); }
  .th.done .th-bar, .th.done .th-word { display: none; }
  @media (max-height: 720px) { .th { gap: 7px; } .th-theme { padding: 5px 4px; } .th-theme b { font-size: 1.15rem; } .th-board { width: min(100%, calc((100vh - 350px) * var(--c) / var(--r)), 400px); } }
  /* ================= Chain Letter ================= */
  .cl { display: flex; flex-direction: column; gap: 10px; width: min(100%, 500px); margin: 0 auto; }
  .cl-ask { margin: 0; text-align: center; font-size: 0.92rem; color: var(--ink-2); }
  .cl-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(3px, 0.9vh, 8px); }
  .cl-row { position: relative; display: flex; justify-content: center; padding: 4px 8px; border-radius: 4px; cursor: default; }
  .cl-row.open { cursor: pointer; outline: 1.5px dashed var(--ink-3); outline-offset: -1px; }
  .cl-row.on { background: color-mix(in srgb, var(--near-bg) 28%, transparent); outline: 2px solid var(--ink); outline-offset: -1px; }
  .cl-row.nope { animation: shake 0.3s ease; }
  .cl-w { display: flex; gap: 3px; }
  /* box size follows the screen: height from the room left for the chain, width from the room across for the longest
     word in that row; the letter is sized from whichever is smaller, so it always sits inside its box */
  .cl-b { --bh: clamp(20px, min(8.4vw, (100vh - 540px) / var(--rows, 8) - 9px), 38px); --bw: clamp(16px, min(7.4vw, (100vw - 56px - (var(--len, 6) - 1) * 3px) / var(--len, 6)), 34px);
    width: min(var(--bw), var(--bh) * 1.12); height: var(--bh); display: grid; place-items: center; border: 1.5px solid var(--faint); border-radius: 2px; background: var(--paper); overflow: hidden;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(min(var(--bh), var(--bw)) * 0.6); line-height: 1; text-transform: uppercase; color: var(--ink); }
  .cl-b.end { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .cl-b.got { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .cl-row.solved .cl-b.got { animation: pop 0.25s ease; }
  .cl-b.given { border-color: var(--ink-3); color: var(--red); }
  .cl-b.typed { border-color: var(--ink); }
  .cl-kb { margin: 4px auto 0; }
  .cl-kb .key.wide { font-size: 0.66rem; }
  .cl-kb[hidden] { display: none; }
  @media (max-height: 760px) { .cl-row { padding: 2px 8px; } .cl .kb .key { height: 42px; } .cl .kb { gap: 5px; } .cl { gap: 7px; } .cl-ask { font-size: 0.82rem; } }
  /* short windows (a browser pane, a phone held sideways): slimmer keys and a shorter intro give the chain more room */
  @media (max-height: 660px) { .cl .kb .key { height: 34px; } .cl .kb { gap: 4px; } .cl-ask { display: none; } .cl-b { --bh: clamp(20px, min(8.4vw, (100vh - 400px) / var(--rows, 8) - 9px), 34px); } }
  /* wide screens: the chain on the left, the keyboard beside it */
  @media (min-width: 900px) {
    .paper:has(.cl) { max-width: 960px; }
    .cl { width: 100%; max-width: 900px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 36px; row-gap: 10px; align-items: center; }
    .cl > * { grid-column: 1 / -1; }
    .cl > .cl-chain { grid-column: 1; grid-row: 4; }
    .cl > .cl-kb { grid-column: 2; grid-row: 4; margin: 0; }
    .cl-b { --bh: clamp(22px, (100vh - 320px) / var(--rows, 8) - 8px, 40px); --bw: clamp(22px, (100vh - 320px) / var(--rows, 8) - 8px, 36px); }
    .cl .fp-head, .cl .tierbar { width: 100%; }
  }
  /* ================= Layout ================= */
  .ly-board { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr);
    width: min(100%, calc(100vh - 316px), 460px); min-width: 250px; aspect-ratio: 1; margin: 0 auto; border: 2.5px solid var(--rule); background: var(--paper);
    container-type: inline-size; user-select: none; -webkit-user-select: none; touch-action: none; cursor: crosshair; box-sizing: border-box; }
  .ly-c { position: relative; z-index: 2; display: grid; place-items: center; box-shadow: inset 0 0 0 0.5px var(--faint);
    font-family: 'Playfair Display', serif; font-weight: 900; font-size: calc(100cqw / var(--n) * 0.48); color: var(--ink); line-height: 1; pointer-events: none; }
  .ly-rects { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .ly-r { position: absolute; box-sizing: border-box; border: 2.5px solid var(--rule); }
  .ly-r.off { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); border-style: dashed; }
  .ly-r.draw { z-index: 3; border: 2.5px solid var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); display: grid; place-items: end center; }
  .ly-r.draw b { margin-bottom: 2px; padding: 1px 6px; background: var(--red); color: var(--paper); font: 700 12px 'Libre Franklin', sans-serif; white-space: nowrap; }
  .ly-ask { display: grid; place-items: center; text-align: center; min-height: 2.7em; line-height: 1.35; text-wrap: balance; margin: 2px 0 8px; font-size: 14px; color: var(--ink-2); }
  .ly.done .bs-tools, .ly.done .ly-ask { display: none; }
  .ly.done .ly-board { cursor: default; }
  .ly-mini { width: min(100%, 260px); min-width: 0; margin: 12px auto; cursor: default; }
  @media (max-height: 720px) { .ly-board { width: min(100%, calc(100vh - 270px), 460px); } }
  /* ================= Wire Room ================= */
  .wr-board { position: relative; width: min(100%, calc(100vh - 316px), 460px); min-width: 250px; aspect-ratio: 1; margin: 0 auto; border: 2.5px solid var(--rule); background: var(--paper);
    box-sizing: border-box; user-select: none; -webkit-user-select: none; touch-action: none; cursor: pointer; }
  .wr-board svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .wr-grid { stroke: var(--faint); stroke-width: 0.025; fill: none; }
  .wr-let { font: 800 0.36px 'Libre Franklin', sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
  .wr-ask { display: grid; place-items: center; text-align: center; min-height: 2.7em; line-height: 1.35; text-wrap: balance; margin: 2px 0 8px; font-size: 14px; color: var(--ink-2); }
  .wr.done .bs-tools, .wr.done .wr-ask { display: none; }
  .wr.done .wr-board { cursor: default; }
  .wr-mini { width: min(100%, 260px); min-width: 0; margin: 12px auto; cursor: default; }
  @media (max-height: 720px) { .wr-board { width: min(100%, calc(100vh - 270px), 460px); } }
  /* ================= Greater Than ================= */
  .gt-grid { display: grid; grid-template-columns: repeat(calc(var(--n) - 1), 1fr 0.42fr) 1fr; grid-template-rows: repeat(calc(var(--n) - 1), 1fr 0.42fr) 1fr;
    width: min(100%, calc(100vh - 365px), 440px); min-width: 250px; aspect-ratio: 1; margin: 0 auto; container-type: inline-size; user-select: none; -webkit-user-select: none; }
  .gt-c { appearance: none; min-width: 0; padding: 0; margin: 0; position: relative; display: grid; place-items: center; cursor: pointer; background: var(--paper);
    border: 2px solid var(--rule); border-radius: 3px; font-family: 'Libre Franklin', sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color 0.12s ease; }
  .gt-c.given { background: var(--paper-2); }
  .gt-c.given .gt-v { font-family: 'Playfair Display', serif; }
  .gt-c.zone { background: var(--paper-2); }
  .gt-c.same { background: var(--same-bg); }
  .gt-c.sel { background: var(--sel-bg); }
  .gt-c.wrong .gt-v { color: var(--red); }
  .gt-v { font-weight: 800; font-size: calc(100cqw / (var(--n) * 1.42 - 0.42) * 0.56); line-height: 1; }
  .gt-c .nt { position: absolute; inset: 7%; display: grid; grid-template-rows: repeat(2, 1fr); font-size: max(8px, calc(100cqw / (var(--n) * 1.42 - 0.42) * 0.22)); font-weight: 600; color: var(--ink-2); line-height: 1; }
  .gt-c .nt i { font-style: normal; display: grid; place-items: center; }
  .gt-s { display: grid; place-items: center; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(100cqw / (var(--n) * 1.42 - 0.42) * 0.42); line-height: 1; color: var(--red); }
  .gt-s.v { transform: rotate(90deg); }
  .gt-s.bad { color: var(--paper); background: var(--red); border-radius: 50%; margin: 12%; }
  .gt.done .bs-tools, .gt.done .bs-pad, .gt.done .bs-check { display: none; }
  .gt-pad .pd { height: 52px; }
  .gt-mini { display: grid; width: min(100%, 200px); margin: 12px auto; border: 2px solid var(--rule); font-family: 'Libre Franklin', sans-serif; }
  .gt-mini i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; font-weight: 700; box-shadow: inset 0 0 0 0.5px var(--faint); }
  @media (max-height: 720px) { .gt-grid { width: min(100%, calc(100vh - 312px), 440px); } }
  /* giveaways */
  .gw-list { list-style: none; padding: 0 !important; margin: 4px 0 10px !important; display: grid; gap: 12px; }
  .gw-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .gw-top b { font-family: 'Playfair Display', serif; font-size: 1.05rem; }
  .gw-top span { font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 700; color: var(--red); text-align: right; }
  .gw-rule, .gw-you { margin: 2px 0 !important; font-size: 0.88rem !important; }
  .gw-you { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.78rem !important; }
  .gw-bar { height: 8px; border: 1.5px solid var(--ink); border-radius: 2px; margin: 6px 0 4px; overflow: hidden; }
  .gw-bar i { display: block; height: 100%; background: var(--ink); }
  .gw-preview { margin: 0 0 8px; padding: 6px 8px; border: 1.5px dashed var(--red); color: var(--red); font-family: 'Libre Franklin', sans-serif; font-size: 0.76rem !important; font-weight: 700; }
  /* leaderboards */
  .lb-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--ink); margin: 12px 0 10px; }
  .lb-tab { appearance: none; border: 0; background: none; color: var(--ink-2); font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 2px 7px; min-height: 44px; cursor: pointer; line-height: 1.2; border-bottom: 3px solid transparent; margin-bottom: -2px; }
  .lb-tab.on { color: var(--ink); border-bottom-color: var(--red); }
  .lb .tierbar { width: 100%; }
  .lb .tier { min-height: 36px; font-size: 0.66rem; }
  .lb-pick { display: grid; gap: 8px; margin-top: 8px; }
  .lb-pick select { width: 100%; min-height: 42px; cursor: pointer; }
  .lb-about { margin: 8px 0 6px; font-size: 0.84rem !important; color: var(--ink-2); font-style: italic; }
  .lb-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
  .lb-row { display: grid; grid-template-columns: 2.4em 1fr auto; align-items: baseline; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--faint); font-size: 0.98rem !important; }
  .lb-r { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.8rem; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
  .lb-row.top .lb-r { color: var(--red); }
  .lb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .lb-n small { font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-left: 4px; }
  .lb-v { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .lb-row.me { background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .lb-gap { text-align: center; color: var(--ink-3); padding: 2px 0; border-bottom: 1px solid var(--faint); }
  .lb-empty { padding: 18px 4px; text-align: center; color: var(--ink-2); font-style: italic; }
  .lb-foot { margin: 12px 0 0; font-size: 0.88rem !important; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .lb-foot .btn { flex: none; }
  @media (max-width: 420px) { .lb-tab { font-size: 0.6rem; letter-spacing: 0.04em; } }
  @media (max-width: 520px) { .ears:has(.mast-acct:not(:empty)) .ear.motto { display: none; } .ears:has(.mast-acct:not(:empty)) { grid-template-columns: auto 1fr; } }
  /* the welcome-back strip at the top of the front page, for readers who are logged in */
  .greet { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 8px 4px 8px 12px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--ink) 4%, transparent); }
  .greet .gk { font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
  .greet p { margin: 0; flex: 1; font-size: 0.98rem; line-height: 1.35; }
  .greet p b { font-family: 'Playfair Display', serif; font-size: 1.08rem; }
  .greet p a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
  .greet .gx { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--ink-2); font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 50%; }
  .greet .gx:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
  @media (max-width: 420px) { .greet .gk { display: none; } }
  .nameplate { display: block; font-family: 'UnifrakturMaguntia', 'Old English Text MT', serif; font-size: clamp(2.3rem, 11vw, 3.6rem); line-height: 1.05; text-decoration: none; margin: 4px 0 6px; letter-spacing: 0.01em; }
  .dateline { border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 5px 0 4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
  @media (max-width: 400px) { .dateline .de { display: none; } }
  /* the two streaks sit at either end of the dateline: "3 streak" on the left, "2 ★" on the right */
  .dateline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
  .dl-streak { justify-self: start; white-space: nowrap; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
  .dl-streak b { color: var(--ink); font-weight: 800; }
  .dl-super { justify-self: end; }
  .dl-super i { font-style: normal; color: var(--red); margin-left: 3px; }
  /* ---- streak celebrations ---- */
  .dl-streak { position: relative; }
  .dl-streak .roll { display: inline-grid; overflow: hidden; vertical-align: bottom; height: 1.25em; line-height: 1.25em; }
  .dl-streak .roll span { grid-area: 1 / 1; text-align: center; }
  .dl-streak.cele-day .r-old, .dl-streak.cele-sup .r-old { animation: roll-out 0.5s cubic-bezier(0.5, 0, 0.3, 1) 0.15s both; }
  .dl-streak.cele-day .r-new, .dl-streak.cele-sup .r-new { animation: roll-in 0.5s cubic-bezier(0.5, 0, 0.3, 1) 0.15s both; }
  @keyframes roll-out { to { transform: translateY(-110%); } }
  @keyframes roll-in { from { transform: translateY(110%); } }
  .dl-streak.cele-day .r-new { color: var(--red); transition: color 0.6s ease 1.1s; }
  .dl-streak .lbl { background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; padding-bottom: 1px; }
  .dl-streak.cele-day .lbl { animation: ink-under 1.4s ease 0.3s both; }
  @keyframes ink-under { 0% { background-size: 0 2px; color: var(--ink-2); } 35% { background-size: 100% 2px; color: var(--red); } 75% { background-size: 100% 2px; color: var(--red); } 100% { background-size: 100% 2px; color: var(--ink-2); } }
  .dl-streak .plus { position: absolute; left: calc(100% + 5px); top: 0; font-weight: 800; color: var(--red); opacity: 0; pointer-events: none; }
  .dl-streak.cele-day .plus { animation: plus-up 1.2s ease-out 0.25s both; }
  @keyframes plus-up { 0% { opacity: 0; transform: translateY(4px) scale(0.8); } 20% { opacity: 1; transform: translateY(-6px) scale(1.15); } 100% { opacity: 0; transform: translateY(-24px) scale(1); } }
  .dl-super i { display: inline-block; position: relative; }
  .dl-super.cele-sup i { animation: star-spin 1.1s cubic-bezier(0.3, 0, 0.3, 1) both; }
  @keyframes star-spin { 0% { transform: rotate(0) scale(1); } 35% { transform: rotate(220deg) scale(2.3); color: var(--near-bg); text-shadow: 0 0 8px var(--near-bg); } 70% { transform: rotate(340deg) scale(1.6); color: var(--near-bg); } 100% { transform: rotate(360deg) scale(1); } }
  .dl-super .spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--near-bg); opacity: 0; pointer-events: none;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
  .dl-super.cele-sup .spark { animation: spark 0.9s ease-out 0.3s both; }
  @keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(0.6); } }
  .dateline.shine { background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--near-bg) 45%, transparent) 50%, transparent 65%) no-repeat; background-size: 300% 100%; animation: shine 1.3s ease-in-out both; }
  @keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
  .dl-streak.cele-still b { color: var(--red); }
  /* ---- the big streak moment: a front-page extra in the middle of the screen ---- */
  .cele-ov { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 55%, transparent); opacity: 0; transition: opacity 0.25s ease; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; }
  .cele-ov.in { opacity: 1; }
  .cele-ov.out { opacity: 0; transition: opacity 0.5s ease 0.1s; }
  .cele-card { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 230px; padding: 18px 30px 16px; background: var(--paper);
    border: 3px double var(--ink); box-shadow: 6px 6px 0 var(--ink); transform: scale(0.2) rotate(-14deg); opacity: 0; }
  .cele-ov.in .cele-card { animation: cele-slam 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) 0.05s forwards; }
  @keyframes cele-slam { 0% { transform: scale(2.4) rotate(-14deg); opacity: 0; } 55% { transform: scale(0.94) rotate(-3deg); opacity: 1; } 100% { transform: scale(1) rotate(-2deg); opacity: 1; } }
  .cele-kick { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red); border-bottom: 2px solid var(--red); padding-bottom: 3px; }
  .cele-num { display: flex; align-items: center; gap: 6px; font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(5rem, 26vw, 7.5rem); line-height: 1; color: var(--ink); margin: 4px 0 14px; font-variant-numeric: lining-nums; }
  .cele-roll { display: inline-grid; overflow: hidden; height: 1.08em; line-height: 1.08em; }
  /* lining figures: every digit is the same height, so 5 doesn't hang below the window and 6 doesn't sit high */
  .cele-roll span { grid-area: 1 / 1; text-align: center; }
  .cele-ov.in .cele-roll .r-old { animation: roll-out 0.5s cubic-bezier(0.5, 0, 0.3, 1) 0.6s both; }
  .cele-ov.in .cele-roll .r-new { animation: roll-in 0.5s cubic-bezier(0.5, 0, 0.3, 1) 0.6s both, cele-red 1s ease 1.1s both; }
  @keyframes cele-red { 0% { color: var(--ink); } 30% { color: var(--red); transform: scale(1.12); } 100% { color: var(--red); transform: scale(1); } }
  .cele-num em { font-style: normal; color: var(--near-bg); font-size: 0.7em; display: inline-block; position: relative; top: 0.12em; text-shadow: 0 0 18px color-mix(in srgb, var(--near-bg) 70%, transparent); }
  .cele-ov.in .cele-num em { animation: star-spin 1.2s cubic-bezier(0.3, 0, 0.3, 1) 0.5s both; }
  .cele-lbl { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); margin-top: 4px; }
  .cele-sub { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-size: 0.95rem; color: var(--ink-2); }
  .cele-ov.sup .cele-card { border-color: var(--red); box-shadow: 6px 6px 0 var(--red); }
  .cele-btn { margin-top: 14px; min-width: 170px; }
  .cele-ov.sup .cele-btn { background: var(--red); border-color: var(--red); }
  .cele-rays { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 1; }
  .cele-rays i { position: absolute; left: -4px; top: 0; width: 8px; height: 46vmax; transform-origin: 50% 0; transform: rotate(var(--a)); background: linear-gradient(color-mix(in srgb, var(--near-bg) 55%, transparent), transparent 70%); opacity: 0; }
  .cele-ov.in .cele-rays { animation: cele-turn 6s linear both; }
  .cele-ov.in .cele-rays i { animation: cele-ray 1.6s ease-out 0.2s both; }
  .cele-ov:not(.sup) .cele-rays i { background: linear-gradient(color-mix(in srgb, var(--ink) 18%, transparent), transparent 65%); }
  @keyframes cele-ray { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0.55; } }
  @keyframes cele-turn { to { transform: rotate(40deg); } }
  .cele-bit { position: absolute; left: 50%; top: 50%; width: 9px; height: 13px; margin: -6px 0 0 -4px; z-index: 1; background: var(--paper-3); border: 1px solid var(--ink-3); opacity: 0; }
  .cele-bit.red { background: var(--red); border-color: var(--red); }
  .cele-bit.star { width: 14px; height: 14px; border: 0; background: var(--near-bg); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
  .cele-ov.in .cele-bit { animation: cele-burst 1.4s cubic-bezier(0.15, 0.7, 0.3, 1) calc(0.3s + var(--t)) both; }
  @keyframes cele-burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) translateX(12px) rotate(var(--r)); } }

  .streak-chip { position: fixed; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 52px); z-index: 29; transform: translate(-50%, -140%); opacity: 0; transition: transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1), opacity 0.25s ease;
    background: var(--paper); border: 1.5px solid var(--rule); box-shadow: var(--shadow); padding: 8px 16px; font-family: 'Libre Franklin', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; pointer-events: none; }
  .streak-chip.in { transform: translate(-50%, 0); opacity: 1; }
  .streak-chip .dl-streak { display: inline-block; }
  /* hover / tap explainer bubbles on the two dateline streaks */
  #dl-day, #dl-super { cursor: help; outline: none; border-radius: 2px; }
  #dl-day:focus-visible, #dl-super:focus-visible { box-shadow: 0 0 0 2px var(--red); }
  #dl-day::after, #dl-super::after { content: attr(data-tip); position: absolute; top: calc(100% + 9px); z-index: 40; width: min(240px, calc(100vw - 32px)); padding: 9px 11px; background: var(--ink); color: var(--paper);
    font: 500 0.8rem/1.4 'Libre Franklin', sans-serif; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s; pointer-events: none; }
  #dl-day::before, #dl-super::before { content: ""; position: absolute; top: calc(100% + 4px); z-index: 41; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity 0.15s ease, visibility 0s linear 0.15s; pointer-events: none; }
  #dl-day::after { left: -2px; }  #dl-day::before { left: 10px; }
  #dl-super::after { right: -2px; }  #dl-super::before { right: 6px; }
  #dl-day.tip-on::after, #dl-super.tip-on::after, #dl-day:focus-visible::after, #dl-super:focus-visible::after,
  #dl-day.tip-on::before, #dl-super.tip-on::before, #dl-day:focus-visible::before, #dl-super:focus-visible::before { opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s ease, transform 0.15s ease; }
  @media (hover: hover) {
    #dl-day:hover::after, #dl-super:hover::after, #dl-day:hover::before, #dl-super:hover::before { opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s ease 0.1s, transform 0.15s ease 0.1s; }
  }
  #dl-day:hover, #dl-super:hover, #dl-day.tip-on, #dl-super.tip-on, #dl-day:focus-visible, #dl-super:focus-visible { z-index: 40; }
  .streak-chip:has(.cele-day) { padding-right: 34px; }
  .dateline .dl-short { display: none; }
  @media (max-width: 560px) { .dateline .dl-long { display: none; } .dateline .dl-short { display: inline; } }
  .icon-btn { appearance: none; border: 1px solid var(--faint); background: transparent; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); position: relative; flex: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease; }
  .icon-btn::after { content: ""; position: absolute; inset: -4px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .icon-btn:active { transform: scale(0.92); background: var(--paper-2); }
  @media (hover: hover) { .icon-btn:hover { border-color: var(--ink); } }

  main { flex: 1; padding-top: 14px; }
  /* while playing, the masthead shrinks so the puzzle fits on the screen */
  .paper.in-game .ears { position: absolute; right: 0; top: 0; display: block; }
  .paper.in-game .ear { display: none; }
  .paper.in-game .ears .icon-btn { width: 32px; height: 32px; }
  .paper.in-game .mast-acct { display: none; }
  .paper.in-game .nameplate { font-size: 1.7rem; margin: 0 0 4px; }
  .paper.in-game .dateline { font-size: 0.58rem; padding: 3px 0 2px; }
  .paper.in-game .masthead { position: relative; }
  .paper.in-game main { padding-top: 10px; }
  .paper.in-game .colophon { display: none; }
  .view-enter { animation: page-in 0.3s ease both; }
  @keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

  /* section heads */
  .shead { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; padding-bottom: 2px; }
  .shead::before, .shead::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
  .shead span { font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }

  /* today's progress */
  .progress { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-family: 'Libre Franklin', sans-serif; }
  .pg-label { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
  .pg-meter { flex: 1; display: flex; gap: 3px; min-width: 0; }
  .pg-meter i { flex: 1 1 0; height: 9px; border: 1.5px solid var(--ink-3); border-radius: 1px; transition: background-color 0.3s ease; }
  .pg-meter i.on { background: var(--red); border-color: var(--red); }
  .pg-meter i.miss { background: var(--ink-3); border-color: var(--ink-3); }
  .pg-count { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .pg-count b { color: var(--ink); font-weight: 800; }

  /* front page stories */
  .story { appearance: none; background: none; border: none; text-align: left; cursor: pointer; color: inherit; font: inherit; position: relative; -webkit-tap-highlight-color: transparent;
    display: grid; grid-template-columns: minmax(0, 1fr) 64px; column-gap: 14px; align-items: center; padding: 14px; transition: background-color 0.15s ease; }
  .story .st { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
  .story:active { background: var(--paper-2); }
  .story .kicker { font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
  .story h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 1.55rem; line-height: 1.05; letter-spacing: -0.01em; }
  .story .dek { display: block; margin: 0; font-style: italic; color: var(--ink-2); font-size: 0.93rem; line-height: 1.35; }
  .story .status { font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 1.3em; }
  .story .status b { color: var(--ink); }
  .story .status .done, .done-stamp { color: var(--red); font-family: 'Libre Franklin', sans-serif; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.66rem; border: 1.5px solid var(--red); padding: 1px 6px; border-radius: 3px; transform: rotate(-3deg); display: inline-block; }
  .story .go { font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; display: inline-flex; gap: 4px; }
  .story .go span { transition: transform 0.15s ease; }
  .story.is-solved .go { color: var(--ink-2); }
  .story .art { width: 100%; color: var(--ink); display: block; }
  .story .art svg { width: 100%; height: auto; display: block; }
  .story.is-solved .art { opacity: 0.55; }
  @media (hover: hover) {
    .story:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
    .story:hover .go span { transform: translateX(3px); }
  }
  .story.lead { width: 100%; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 16px; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
  .story.lead h2 { font-size: 2.1rem; }
  .story.lead .dek { font-size: 1rem; }
  .story.lead:active { background: none; }
  /* the grid of stories: column rules between stories, a hairline under each */
  .stories { display: grid; grid-template-columns: 1fr; }
  .stories .story { border-bottom: 1px solid var(--faint); padding-left: 0; padding-right: 0; }
  @media (min-width: 540px) {
    .stories { grid-template-columns: 1fr 1fr; }
    .stories .story { grid-template-columns: 1fr; align-content: start; row-gap: 10px; padding: 14px 14px 16px; }
    .stories .story .art { grid-row: 1; width: 64px; }
    .stories .story:nth-child(2n+1) { padding-left: 0; }
    .stories .story:nth-child(2n) { padding-right: 0; border-left: 1px solid var(--faint); }
    /* a section with a single story runs across the page */
    .stories .story:only-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 80px; column-gap: 20px; padding-right: 0; }
    .stories .story:only-child .art { grid-row: auto; width: 80px; }
    .story.lead { grid-template-columns: minmax(0, 1fr) 120px; }
    .story.lead h2 { font-size: 2.4rem; }
  }
  @media (min-width: 900px) {
    .paper.front { max-width: 880px; }
    .paper.front .nameplate { font-size: 4.4rem; }
    .paper.front .stories { grid-template-columns: repeat(3, 1fr); }
    .paper.front .stories .story:nth-child(n) { padding: 16px 16px 18px; border-left: 1px solid var(--faint); }
    .paper.front .stories .story:nth-child(3n+1) { padding-left: 0; border-left: none; }
    .paper.front .stories .story:nth-child(3n) { padding-right: 0; }
    .paper.front .stories .story:only-child { padding-right: 0; }
    .story.lead { grid-template-columns: minmax(0, 1fr) 150px; column-gap: 28px; padding: 20px 0 22px; }
    .story.lead h2 { font-size: 3rem; }
    .story.lead .dek { font-size: 1.12rem; max-width: 34em; }
  }

  /* boxes under the stories */
  .boxes { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
  .boxes.boxes-one { grid-template-columns: 1fr !important; }
  .box { border: 1px solid var(--rule); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .box h3 { margin: 0; font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--faint); padding-bottom: 6px; }
  .box p { margin: 0; font-size: 0.92rem; }
  .box .fine { font-size: 0.82rem; color: var(--ink-2); }
  .week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-family: 'Libre Franklin', sans-serif; text-align: center; }
  .wd { display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .wd i { font-style: normal; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
  .wd b { width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid var(--faint); border-radius: 50%; font-size: 0.72rem; font-weight: 800; }
  .wd.on b { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .wd.today i { color: var(--red); }
  .wd.today b { border-color: var(--red); }
  .wd.today b { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--red); }
  .wd.full b { background: var(--red); border-color: var(--red); color: var(--paper); }
  /* your record */
  .record { gap: 12px; }
  .rec-streaks { display: grid; grid-template-columns: 1fr 1fr; text-align: center; padding: 2px 0 4px; }
  .rs { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 6px; }
  .rs + .rs { border-left: 1px solid var(--faint); }
  .rs b { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 2.3rem; line-height: 1; font-variant-numeric: lining-nums; }
  .rl { font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
  .rl i { font-style: normal; color: var(--red); }
  .rh { font-size: 0.8rem; font-style: italic; color: var(--ink-2); line-height: 1.25; }
  .record .wd b { width: 22px; height: 22px; }
  .rec-key { display: flex; justify-content: center; gap: 16px; margin-top: -4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .rec-key span { display: inline-flex; align-items: center; gap: 6px; }
  .rec-key .k { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
  .rec-key .k.on { background: var(--ink); }
  .rec-key .k.full { background: var(--red); }
  .rec-line { margin: 0; padding-top: 9px; border-top: 1px dotted var(--faint); text-align: center; font-size: 0.9rem; color: var(--ink-2); }
  .rec-line b { color: var(--ink); font-variant-numeric: lining-nums; }
  .alltime { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
  .alltime::before, .alltime::after { content: ""; flex: 1; border-top: 1px solid var(--faint); }
  .alltime b { color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.05rem; letter-spacing: 0; font-variant-numeric: lining-nums; vertical-align: -1px; }
  .figs.four { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .figs.four span { letter-spacing: 0.04em; font-size: 0.56rem; white-space: nowrap; }
  .figs .super b { color: var(--red); }
  .ylist { display: flex; flex-direction: column; }
  .ylist p { padding: 6px 0; border-bottom: 1px dotted var(--faint); font-size: 0.9rem; line-height: 1.4; break-inside: avoid; }
  .ylist p:last-child { border-bottom: none; }
  .ylist .linkish { margin-left: 4px; padding: 6px 0; }
  .figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
  .figs:has(> div:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
  .figs.four:has(> div:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .figs b { display: block; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: lining-nums; }
  .figs span { font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
  .linkish { appearance: none; background: none; border: none; padding: 0; cursor: pointer; font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); text-align: left; }
  @media (min-width: 540px) { .boxes { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 900px) {
    .paper.front .boxes { grid-template-columns: 1fr 2fr; }
    .paper.front .ylist { display: block; columns: 2; column-gap: 24px; }
    .paper.front .ylist p:last-child { border-bottom: 1px dotted var(--faint); }
  }

  /* game pages */
  .gbar { display: grid; grid-template-columns: minmax(78px, 1fr) minmax(0, auto) minmax(78px, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 14px; }
  .gbar .back { white-space: nowrap; justify-self: start; text-decoration: none; font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 6px; }
  .gbar .back svg { width: 14px; height: 14px; flex: none; }
  .gbar h1 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.5rem; line-height: 1; text-align: center; white-space: nowrap; min-width: 0; }
  .gbar h1 small { display: block; font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }
  .gbar .tools { justify-self: end; display: flex; gap: 8px; }
  /* on phones the way back is an arrow, so the puzzle's name has room */
  @media (max-width: 480px) {
    .gbar .back { width: 36px; height: 36px; min-height: 0; padding: 0; justify-content: center; border: 1px solid var(--faint); border-radius: 50%; position: relative; }
    .gbar .back::after { content: ""; position: absolute; inset: -4px; }
    .gbar .back span { display: none; }
    .gbar .back svg { width: 17px; height: 17px; }
    .gbar h1 { font-size: clamp(1.2rem, 6vw, 1.5rem); }
  }
  .btn { appearance: none; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 11px 16px; min-height: 44px; border-radius: 2px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.08s ease, background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease; -webkit-tap-highlight-color: transparent; user-select: none; }
  .btn.ghost { background: transparent; color: var(--ink); }
  .btn:active { transform: scale(0.97); opacity: 0.85; }
  .btn.ghost:active { background: var(--paper-2); opacity: 1; }
  .btn:disabled { opacity: 0.35; cursor: default; transform: none; }
  .btn svg { width: 16px; height: 16px; }
  .btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

  /* modal */
  .modal-back { position: fixed; inset: 0; z-index: 20; background: rgba(15, 12, 8, 0.5); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); animation: fade 0.2s ease; }
  .modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); padding: 20px; position: relative; animation: drop 0.25s ease; }
  .modal h2 { margin: 0 0 4px; padding-right: 40px; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.6rem; }
  .modal h3 { margin: 16px 0 6px; font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--faint); padding-bottom: 4px; }
  .modal p, .modal li { font-size: 0.95rem; }
  .modal ul { padding-left: 18px; margin: 6px 0; }
  .modal ul.ranks-list { padding-left: 0; }
  .modal .share-row { text-align: center; margin: 16px 0 0; }
  .modal .x { position: absolute; top: 12px; right: 12px; }
  @keyframes fade { from { opacity: 0; } }
  @keyframes drop { from { transform: translateY(12px); opacity: 0; } }

  .toast { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); width: max-content; line-height: 1.35; transform: translate(-50%, -20px); z-index: 30; background: var(--ink); color: var(--paper); font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.84rem; padding: 10px 16px; border-radius: 2px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); text-align: center; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  .toast button { appearance: none; border: none; background: none; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

  .colophon { margin-top: 28px; border-top: 3px double var(--rule); padding-top: 10px; font-size: 0.74rem; color: var(--ink-3); text-align: center; line-height: 1.5; }
  .colophon details { text-align: left; margin-top: 6px; }
  .colo-links { margin: 0 0 6px; display: flex; justify-content: center; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
  .colo-links a.linkish { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
  .about-mail { font-family: 'Libre Franklin', sans-serif; overflow-wrap: anywhere; }
  .about-warn { color: var(--red); font-weight: 600; }
  .about-ver { font-size: 0.78rem; color: var(--ink-3); margin-top: 14px; }
  .colophon summary { cursor: pointer; text-align: center; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; }

  /* the card every puzzle shows once it's done */
  .wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 18px 8px 16px; margin: 4px auto 0; width: 100%; max-width: 460px; }
  .wrap.fresh { animation: page-in 0.4s ease both; }
  .wrap h2 { margin: 4px 0 0; font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.7rem; line-height: 1.1; }
  .wrap p { margin: 0; }
  .wrap .btn-row { margin-top: 4px; }
  .wrap .next { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .wrap .next b { font-variant-numeric: tabular-nums; color: var(--ink); }
  .stamp { align-self: center; font-family: 'Libre Franklin', sans-serif; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); border: 3px solid var(--red); padding: 6px 14px; transform: rotate(-4deg); font-size: 1rem; text-align: center; line-height: 1.2; animation: stamp 0.42s cubic-bezier(.2, 1.5, .5, 1) both; }
  .stamp small { display: block; font-size: 0.66rem; letter-spacing: 0.1em; }
  .stamp.soft { color: var(--ink-2); border-color: var(--ink-2); transform: rotate(3deg); }
  .story .status .done.soft { color: var(--ink-2); border-color: var(--ink-2); transform: rotate(2deg); }
  .wrap .stamp { animation: none; }
  .wrap.fresh .stamp { animation: stamp 0.42s cubic-bezier(.2, 1.5, .5, 1) 0.15s both; }
  @keyframes stamp { from { transform: rotate(-4deg) scale(2.4); opacity: 0; } 60% { opacity: 1; } }

  /* stats bars */
  .dist { display: flex; flex-direction: column; gap: 4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 700; }
  .dist div { display: grid; grid-template-columns: 1rem 1fr; gap: 6px; align-items: center; }
  .dist i { display: block; background: var(--ink-3); color: var(--paper); font-style: normal; text-align: right; padding: 1px 6px; min-width: 1.6rem; }
  .dist .now i { background: var(--red); }

  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.6s; animation-timing-function: ease-in-out; }
  html.theme-fade, html.theme-fade * { transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease !important; }
  @media (prefers-reduced-motion: reduce) {
    .view-enter, .modal, .modal-back { animation: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  }

  /* ================= Inkling ================= */
  .ink { display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .ink-mode { min-height: 0; display: flex; gap: 10px; align-items: center; }
  .ink-mode:empty { display: none; }
  .pill { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border: 1.5px solid var(--red); color: var(--red); padding: 2px 8px; }
  .board { display: grid; gap: 6px; width: min(100%, 330px, calc((100vh - 360px) * 0.83)); min-width: 220px; }
  .brow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .tile { aspect-ratio: 1; border: 2px solid var(--faint); display: grid; place-items: center; position: relative; background: transparent;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: clamp(1.5rem, 8vw, 2rem); text-transform: uppercase; line-height: 1; user-select: none; }
  .tile span { position: relative; z-index: 1; }
  .tile.filled { border-color: var(--ink); }
  .tile.pop { animation: pop 0.12s ease; }
  .tile.hit { background: var(--hit-bg); border-color: var(--hit-bg); color: var(--hit-fg); }
  .tile.near { background: var(--near-bg); border-color: var(--near-bg); color: var(--near-fg); }
  .tile.miss { background: var(--paper-2); border-color: var(--paper-2); color: var(--ink-3); }
  /* Word Guess and Equation Guess are marked like an editor's proof: a red circle for the right spot, a red underline for
     "in it, somewhere else", and a stroke through anything that isn't in it. Black ink on newsprint, no colored tiles. */
  .proof .tile.near, .proof .tile.miss { background: var(--paper); border-color: var(--ink-3); color: var(--ink); }
  .proof .tile.miss { color: var(--ink-3); border-color: var(--faint); }
  .proof .tile::before { content: ""; position: absolute; pointer-events: none; }
  /* right spot: the letter is set solid in ink, with a red corner like a proofreader's "OK" tick */
  .proof .tile.hit { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .proof .tile.hit::before { top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 12px 12px 0; border-color: transparent var(--red) transparent transparent; }
  .proof .tile.near::before { left: 20%; right: 20%; bottom: 10%; height: 3px; background: var(--red); border-radius: 2px; }
  .proof .tile.miss::before { left: 16%; right: 16%; top: 50%; height: 2px; background: var(--ink-3); transform: rotate(-24deg); }
  .proof .key.near, .proof .key.miss { background: var(--paper-2); border-color: var(--faint); color: var(--ink); }
  .proof .key::before { content: ""; position: absolute; pointer-events: none; }
  .proof .key.hit { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .proof .key.hit::before { top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--red) transparent transparent; border-top-right-radius: 3px; }
  .proof .key.near::before { left: 26%; right: 26%; bottom: 9px; height: 3px; background: var(--red); border-radius: 2px; }
  .proof .key.miss { background: transparent; border-color: transparent; color: var(--ink-3); opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 2px; }
  /* Equation Guess: a symbol that isn't in the equation just fades, with no strike-through on the tile or the key */
  .eq .tile.miss::before { content: none; }
  .eq-kb .key.miss { text-decoration: none; }
  .ink.proof .board { width: min(100%, 360px, calc((100vh - 360px) * 0.86)); gap: 5px; }
  .ink.proof .brow { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .ink.proof .tile { font-size: clamp(1.3rem, 7vw, 1.8rem); }
  .ex.proof { grid-template-columns: repeat(6, 42px); }
  .tile.flip { animation: flip 0.46s ease both; animation-delay: var(--d, 0ms); }
  .tile.hop { animation: hop 0.5s ease both; animation-delay: var(--d, 0ms); }
  .brow.shake { animation: shake 0.4s ease; }
  @keyframes pop { 50% { transform: scale(1.08); } }
  @keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
  @keyframes hop { 40% { transform: translateY(-14px); } 70% { transform: translateY(2px); } }
  @keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
  .ex { display: grid; grid-template-columns: repeat(5, 46px); gap: 5px; justify-content: center; margin: 12px 0; }
  .ex .tile { font-size: 1.4rem; }
  /* on-screen keypads live on their own graphics layer for good: when a tile pops above them, Chrome no longer
     lifts them onto a temporary layer and tears it down again, which could leave the keys undrawn until the next repaint */
  .kb, .cw-kb, .bs-pad, .bs-tools { will-change: transform; transform: translateZ(0); }
  .kb { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 7px; user-select: none; }
  .kb-row { display: flex; gap: 5px; justify-content: center; }
  .key { appearance: none; flex: 1; max-width: 44px; height: 54px; border: 1px solid var(--faint); background: var(--paper-2); border-radius: 3px; cursor: pointer; position: relative;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.95rem; text-transform: uppercase; color: var(--ink); display: grid; place-items: center; padding: 0; }
  .key.wide { flex: 1.6; max-width: 72px; font-size: 0.7rem; letter-spacing: 0.04em; }
  .key svg { width: 22px; height: 22px; }
  .key { transition: background-color 0.2s ease, color 0.2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .key:active { background: var(--paper-3); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.08); }
  .key.hit { background: var(--hit-bg); color: var(--hit-fg); border-color: var(--hit-bg); }
  .key.near { background: var(--near-bg); border-color: var(--near-bg); color: var(--near-fg); }
  .key.miss { background: transparent; border-color: transparent; color: var(--ink-3); font-weight: 600; }
  .ink-result { width: 100%; max-width: 440px; }
  @media (max-width: 380px) { .key { height: 48px; font-size: 0.85rem; } .kb-row { gap: 4px; } }

  /* ================= Fine Print ================= */
  .fp { display: flex; flex-direction: column; gap: 14px; }
  .fp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .fp-head h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.45rem; line-height: 1.1; }
  .fp-head .clock { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
  .fp-grid-wrap { position: relative; width: 100%; max-width: 460px; margin: 0 auto; touch-action: none; user-select: none; border: 1.5px solid var(--rule); padding: 6px; background: var(--paper); }
  .fp-grid { display: grid; position: relative; z-index: 2; }
  .fp-grid span { aspect-ratio: 1; display: grid; place-items: center; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: clamp(0.9rem, 4.4vw, 1.25rem); text-transform: uppercase; cursor: pointer; }
  .fp-grid span.anchor { color: var(--red); box-shadow: inset 0 0 0 2px var(--red); border-radius: 50%; animation: pop 0.15s ease; }
  .fp-marks { position: absolute; inset: 6px; z-index: 1; pointer-events: none; width: calc(100% - 12px); height: calc(100% - 12px); }
  .fp-marks line { stroke-linecap: round; }
  .fp-marks .live { stroke: var(--ink); opacity: 0.16; }
  .fp-marks .found { mix-blend-mode: var(--blend); }
  .fp-marks .found.new { stroke-dasharray: 1; animation: fp-draw 0.32s ease-out both; }
  @keyframes fp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .fp-words { columns: 3; column-gap: 14px; font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.04em; border-top: 1px solid var(--rule); padding-top: 10px; }
  .fp-words span { display: block; padding: 2px 0; break-inside: avoid; position: relative; width: fit-content; }
  .fp-words span.got { color: var(--ink-3); }
  .fp-words span.got::after { content: ""; position: absolute; left: -2px; right: -2px; top: 52%; border-top: 2px solid var(--red); transform: rotate(-2deg); transform-origin: left center; }
  .fp-words span.got.new::after { animation: fp-strike 0.35s ease-out 0.2s both; }
  @keyframes fp-strike { from { transform: rotate(-2deg) scaleX(0); } }
  @media (max-width: 420px) { .fp-words { columns: 2; } }

  /* ================= Typeset ================= */
  .ts { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
  .rank { display: flex; flex-direction: column; gap: 6px; }
  .rank-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .rank-top b { font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.3rem; }
  .rank-top span { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
  .rank-bar { position: relative; height: 16px; display: flex; align-items: center; margin: 0 6px; }
  .rank-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: 2px solid var(--faint); }
  .rank-bar .fill { position: absolute; left: 0; top: 7px; border-top: 2px solid var(--ink); transition: width 0.4s ease; }
  .rank-bar i { position: absolute; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--faint); transform: translateX(-50%); }
  .rank-bar i.on { background: var(--ink); border-color: var(--ink); }
  .rank-next { font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 600; color: var(--ink-2); }
  .ts-solved { display: flex; align-items: center; gap: 10px; padding: 4px 0 0; font-size: 0.9rem; margin-top: -6px; }
  .ts-solved.fresh .done-stamp { animation: stamp 0.42s cubic-bezier(.2, 1.5, .5, 1) both; }
  .ts-solved span:nth-child(2) { flex: 1; min-width: 0; font-style: italic; color: var(--ink-2); }
  .stick { min-height: 58px; display: flex; justify-content: center; align-items: center; gap: 4px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 8px 4px; flex-wrap: wrap; }
  .stick .ph { font-style: italic; color: var(--ink-3); font-size: 0.95rem; }
  .stick .ch { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.7rem; text-transform: uppercase; min-width: 1.2em; text-align: center; animation: pop 0.12s ease; }
  .stick.shake { animation: shake 0.4s ease; }
  .stick.good .ch { color: var(--good); }
  .tray { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 440px; width: 100%; margin: 0 auto; padding: 10px; background: var(--type); border-radius: 4px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5); }
  .sort { appearance: none; aspect-ratio: 0.82; border: none; border-radius: 3px; cursor: pointer; background: linear-gradient(180deg, #4a4740, var(--type-face) 40%, #25231f); color: var(--type-fg); box-shadow: 0 2px 0 #11100e, inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(1.3rem, 6.5vw, 1.9rem); text-transform: uppercase; display: grid; place-items: center; transition: opacity 0.15s ease, transform 0.15s ease; }
  .sort:active { transform: translateY(2px); box-shadow: 0 0 0 #11100e; }
  .sort.used { opacity: 0.25; transform: translateY(2px); box-shadow: none; }
  .ts-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; max-width: 440px; width: 100%; margin: 0 auto; }
  .found-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
  .found-head span { font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
  .found { display: flex; flex-direction: column; gap: 10px; }
  .flen { display: flex; flex-direction: column; gap: 4px; }
  .flen h4 { margin: 0; font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
  .flen .ws { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 1rem; }
  .flen .ws .w { text-transform: capitalize; }
  .flen .ws .w.front { color: var(--red); font-weight: 600; }
  .flen .ws .blank { color: var(--ink-3); letter-spacing: 0.12em; font-family: 'Libre Franklin', sans-serif; font-size: 0.86rem; }
  .flen .ws .w.new { animation: page-in 0.4s ease; background: var(--hl-1); }
  .bonus { font-size: 0.9rem; color: var(--ink-2); font-style: italic; }
  .ranks-list { list-style: none; padding: 0; margin: 6px 0; }
  .ranks-list li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--faint); padding: 4px 0; }
  .ranks-list li.me { font-weight: 600; color: var(--red); }
  .yday { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.95rem; text-transform: capitalize; }
  .yday .miss { color: var(--ink-3); }

  /* ================= Box Score ================= */
  .bs { display: flex; flex-direction: column; gap: 12px; }
  .bs-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 1px; container-type: inline-size; width: min(100%, 460px, calc(100vh - 330px)); min-width: 280px; margin: 0 auto; border: 2.5px solid var(--rule); background: var(--faint); user-select: none; position: relative; }
  .bs-grid::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background:
      linear-gradient(to right, transparent calc(33.333% - 1.25px), var(--rule) calc(33.333% - 1.25px), var(--rule) calc(33.333% + 1.25px), transparent calc(33.333% + 1.25px), transparent calc(66.667% - 1.25px), var(--rule) calc(66.667% - 1.25px), var(--rule) calc(66.667% + 1.25px), transparent calc(66.667% + 1.25px)),
      linear-gradient(to bottom, transparent calc(33.333% - 1.25px), var(--rule) calc(33.333% - 1.25px), var(--rule) calc(33.333% + 1.25px), transparent calc(33.333% + 1.25px), transparent calc(66.667% - 1.25px), var(--rule) calc(66.667% - 1.25px), var(--rule) calc(66.667% + 1.25px), transparent calc(66.667% + 1.25px)); }
  .bs-grid > *, .kk-grid > *, .cs-grid > *, .sb-grid > *, .ms-grid > *, .fp-grid > * { min-width: 0; min-height: 0; }
  .bc { appearance: none; aspect-ratio: 1; border: none; background: var(--paper); padding: 0; cursor: pointer; position: relative;
    font-family: 'Libre Franklin', sans-serif; font-weight: 500; font-size: clamp(1rem, 5vw, 1.45rem); color: var(--ink-2); display: grid; place-items: center; }
  .bc.given { font-family: 'Playfair Display', serif; font-weight: 900; color: var(--ink); }
  .bc.zone { background: var(--paper-2); }
  /* every square holding the selected number: a warm tint and a thin gold ring, a step lighter than the selected square */
  .bc.same { background: var(--same-bg); box-shadow: inset 0 0 0 2px var(--same-ring); color: var(--ink); font-weight: 700; }
  .bc.sel { background: var(--sel-bg); }
  .bc.wrong { color: var(--red); }
  .bc .nt { position: absolute; inset: 7%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); font-family: 'Libre Franklin', sans-serif; font-size: max(8px, calc(100cqw / 9 * 0.24)); font-weight: 600; color: var(--ink-2); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
  .bc .nt i { font-style: normal; display: grid; place-items: center; }
  .bs-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 460px); margin: 0 auto; }
.bs-tools.two { grid-template-columns: repeat(2, 1fr); }
  .bs-tools .btn { padding: 9px 6px; font-size: 0.72rem; }
  .bs-tools .btn .sw { display: inline-block; min-width: 2.2em; padding: 1px 5px; border-radius: 2px; background: var(--paper-3); color: var(--ink-2); font-size: 0.64rem; }
  .bs-tools .btn.on { background: var(--ink); color: var(--paper); }
  .bs-tools .btn.on .sw { background: var(--red); color: var(--paper); }
  .bc:focus-visible { outline: none; }
  .bc { -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color 0.12s ease; }
  .bs.done .bs-tools, .bs.done .bs-pad, .bs.done .bs-check { display: none; }
  .bs-mini { display: grid; grid-template-columns: repeat(9, 1fr); max-width: 300px; margin: 12px auto 4px; border: 2px solid var(--rule); font-family: 'Libre Franklin', sans-serif; font-size: 0.9rem; color: var(--ink-3); }
  .bs-mini i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
  .bs-mini i:nth-child(3n) { border-right: 1.5px solid var(--rule); }
  .bs-mini i:nth-child(9n) { border-right: none; }
  .bs-mini i:nth-child(n+19):nth-child(-n+27), .bs-mini i:nth-child(n+46):nth-child(-n+54) { border-bottom: 1.5px solid var(--rule); }
  .bs-mini i:nth-child(n+73) { border-bottom: none; }
  .bs-mini i.g { color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 900; }
  .bs-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; width: min(100%, 460px); margin: 0 auto; }
  .pd { appearance: none; border: 1px solid var(--faint); background: var(--paper-2); border-radius: 3px; height: 52px; cursor: pointer; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.4rem; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0; }
  .pd small { font-family: 'Libre Franklin', sans-serif; font-size: 0.56rem; font-weight: 700; color: var(--ink-3); margin-top: 3px; min-height: 0.6rem; }
  .pd.spent { opacity: 0.3; }
  .pd { transition: background-color 0.15s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .pd:active { background: var(--paper-3); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.08); }
  .bs-pad.notes .pd { font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--ink-2); border-style: dashed; border-color: var(--ink-3); }
  .bs-check { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 0.9rem; cursor: pointer; min-height: 44px; width: fit-content; margin: -6px auto 0; padding: 0 8px; }
  .bs-check input { accent-color: var(--red); width: 16px; height: 16px; }

  /* crisp tap feedback everywhere; animations respect reduced motion (see style.css) */
  .sort { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .fp-grid-wrap { -webkit-tap-highlight-color: transparent; }

  /* ================= Mini Crossword ================= */
  .cw { display: flex; flex-direction: column; gap: 12px; }
  .cw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .cw-clock { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 3.2em; display: inline-flex; align-items: center; gap: 6px; }
  .cw-clock.paused { color: var(--ink-3); }
  .cw-tools { position: relative; display: flex; gap: 6px; }
  .cw-tool { appearance: none; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); border-radius: 2px; cursor: pointer;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
  .cw-tool svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
  .cw-tool.on { background: var(--ink); color: var(--paper); }
  .cw-tool.on svg { transform: rotate(180deg); }
  .cw-tool:disabled { opacity: 0.35; cursor: default; }
  .cw-pop { position: absolute; top: calc(100% + 6px); z-index: 5; min-width: 150px; background: var(--paper); border: 1.5px solid var(--rule); box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 4px 0; animation: page-in 0.15s ease; }
  .cw-pop-h { font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 6px 14px 2px; }
  .cw-pop button { appearance: none; border: none; background: none; text-align: left; min-height: 44px; padding: 0 14px; cursor: pointer; font-family: 'Newsreader', Georgia, serif; font-size: 1.02rem; color: var(--ink); }
  .cw-pop button:hover, .cw-pop button:focus-visible { background: var(--paper-2); }

  .cw-main { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "play" "end" "kb" "lists"; gap: 14px; justify-items: center; }
  .cw-play { grid-area: play; display: flex; flex-direction: column; gap: 10px; width: min(100%, 360px, calc(100vh - 400px)); min-width: 250px; }
  .cw-bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: stretch; background: var(--paper-3); border-left: 3px solid var(--red); min-height: 52px; }
  .cw-arrow { appearance: none; border: none; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; min-height: 44px; }
  .cw-arrow svg { width: 18px; height: 18px; }
  .cw-arrow:active { background: var(--paper-2); }
  .cw-bar-text { appearance: none; border: none; background: none; color: var(--ink); cursor: pointer; text-align: left; padding: 6px 4px; font-family: 'Newsreader', Georgia, serif; font-size: 1.02rem; line-height: 1.25; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
  .cw-bar-n { font-family: 'Libre Franklin', sans-serif; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
  .cw-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 2.5px solid var(--rule); background: var(--rule); gap: 1px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
  .cw-c { aspect-ratio: 1; position: relative; background: var(--paper); display: grid; place-items: center; cursor: pointer; overflow: hidden; }
  .cw-c.blk { cursor: default; background-color: var(--type); background-image: repeating-linear-gradient(45deg, var(--faint) 0 1px, transparent 1px 6px); }
  /* night edition: the dark-on-dark hatching nearly vanished, so lift the blocked squares to a clear mid-gray with bolder hatching */
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-c.blk { background-color: color-mix(in srgb, var(--ink) 26%, var(--paper)); background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 55%, var(--paper)) 0 1.5px, transparent 1.5px 6px); } }
  :root[data-theme="dark"] .cw-c.blk { background-color: color-mix(in srgb, var(--ink) 26%, var(--paper)); background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 55%, var(--paper)) 0 1.5px, transparent 1.5px 6px); }
  .cw-c i { position: absolute; top: 3px; left: 4px; font-style: normal; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: clamp(0.55rem, 2.4vw, 0.7rem); line-height: 1; color: var(--ink-2); z-index: 1; }
  .cw-c span { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: clamp(1.45rem, 8.5vw, 2.1rem); text-transform: uppercase; line-height: 1; margin-top: 8%; color: var(--ink); position: relative; z-index: 1; }
  .cw-c.word { background: var(--paper-3); }
  .cw-c.sel { background: linear-gradient(var(--red-soft), var(--red-soft)), var(--paper-3); }
  .cw-c.sel::before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2.5px var(--red); z-index: 2; pointer-events: none; }
  .cw-c.pop span { animation: pop 0.12s ease; }
  .cw-c.bad span { color: var(--red); }
  .cw-c.bad::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--red) calc(50% - 1px), var(--red) calc(50% + 1px), transparent calc(50% + 1px)); opacity: 0.8; pointer-events: none; }
  .cw-c.shown::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 11px 11px 0; border-color: transparent var(--red) transparent transparent; pointer-events: none; }
  .cw-c.solved { cursor: default; }
  .cw-c.solved span { animation: none; }

  .cw-kb { grid-area: kb; width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 6px; user-select: none; -webkit-user-select: none; }
  .cw-kr { display: flex; gap: 5px; justify-content: center; }
  .cw-k { appearance: none; flex: 1; max-width: 44px; height: 50px; border: 1px solid var(--faint); background: var(--paper-2); border-radius: 3px; cursor: pointer; padding: 0;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.95rem; text-transform: uppercase; color: var(--ink); display: grid; place-items: center; touch-action: manipulation; }
  .cw-k.wide { flex: 1.6; max-width: 72px; }
  .cw-k svg { width: 22px; height: 22px; }
  .cw-k:active { background: var(--paper-3); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.08); }

  .cw-lists { grid-area: lists; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--rule); padding-top: 8px; }
  .cw-lists h3 { margin: 0 0 4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--faint); padding-bottom: 4px; }
  .cw-lists ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .cw-lists li { display: grid; grid-template-columns: 1.4em 1fr; gap: 4px; padding: 6px 6px 6px 4px; cursor: pointer; font-size: 0.93rem; line-height: 1.3; border-left: 3px solid transparent; }
  .cw-lists li b { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 800; padding-top: 2px; }
  .cw-lists li.cur { background: var(--paper-3); border-left-color: var(--red); }
  .cw-lists li.cross { border-left-color: var(--faint); }
  .cw-lists li.fin span, .cw-lists li.fin b { color: var(--ink-3); }
  .cw-lists li.fin span { text-decoration: line-through; text-decoration-color: var(--faint); }

  .cw-end { grid-area: end; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; border-top: 3px double var(--rule); padding: 16px 6px 4px; animation: page-in 0.35s ease; }
  .cw-end p { margin: 0; }
  .cw-next { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .cw-next b { font-variant-numeric: tabular-nums; color: var(--ink); }

  /* beside the grid when there's room */
  @media (min-width: 600px) {
    .cw-main { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play lists" "end end" "kb kb"; align-items: start; column-gap: 22px; }
    .cw-play { width: min(320px, calc(100vh - 400px)); }
    .cw-lists { grid-template-columns: 1fr; border-top: none; padding-top: 0; gap: 12px; justify-self: stretch; }
  }
  @media (max-width: 380px) { .cw-k { height: 46px; font-size: 0.85rem; } .cw-kr { gap: 4px; } .cw-tool { padding: 0 9px; } .cw-lists { gap: 10px; } .cw-lists li { font-size: 0.88rem; } }
  @media (prefers-reduced-motion: reduce) { .cw-pop, .cw-end, .cw-c.pop span { animation: none; } }

  /* ================= Groups ================= */
  .gr { display: flex; flex-direction: column; align-items: center; gap: 12px; --gr-w: min(100vw - 32px, 460px); }
  .gr-mode { display: flex; gap: 10px; align-items: center; }
  .gr-mode:empty { display: none; }
  .gr-lede { margin: 0; font-style: italic; color: var(--ink-2); font-size: 0.95rem; text-align: center; }
  .gr-board { width: var(--gr-w); display: flex; flex-direction: column; gap: 6px; }
  .gr-bands { display: flex; flex-direction: column; gap: 6px; }
  .gr-bands:empty { display: none; }
  .gr-band { min-height: calc((var(--gr-w) - 18px) / 4 * 0.8); border-radius: 3px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
  .gr-band b { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; }
  .gr-band span { font-family: 'Newsreader', Georgia, serif; font-size: 0.98rem; line-height: 1.25; }
  .gr-band.gr-missed { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
  .gr-band.gr-new { animation: gr-in 0.42s cubic-bezier(.2, 1.3, .5, 1) both; }
  .gr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .gr-tile { appearance: none; aspect-ratio: 5 / 4; min-height: 48px; border: 1px solid var(--faint); border-radius: 3px; background: var(--paper-2); color: var(--ink); cursor: pointer; padding: 0 2px; overflow: hidden;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
    font-size: min(1.05rem, calc((var(--gr-w) - 18px) / 4 * 0.9 / (var(--len) * 0.7)));
    display: grid; place-items: center; user-select: none; -webkit-user-select: none; transition: background-color 0.12s ease, color 0.12s ease, transform 0.12s ease; }
  /* tiles lifted off the page: a shade darker than the paper by day, lighter by night, with a firmer edge */
  .gr-tile:not(.sel) { background: color-mix(in srgb, var(--ink) 12%, var(--paper)); border-color: color-mix(in srgb, var(--ink) 30%, var(--paper)); box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 22%, var(--paper)); }
  .gr-tile:hover { border-color: var(--ink-3); }
  .gr-tile:active { transform: scale(0.97); }
  .gr-tile.sel { background: var(--hit-bg); border-color: var(--hit-bg); color: var(--hit-fg); }
  .gr-tile.gr-pop { animation: pop 0.12s ease; }
  .gr-tile.gr-hop { animation: gr-hop 0.5s ease both; animation-delay: var(--d, 0ms); }
  .gr-tile.gr-shake { animation: shake 0.4s ease; }
  @keyframes gr-hop { 40% { transform: translateY(-12px); } 70% { transform: translateY(2px); } }
  @keyframes gr-in { from { transform: scale(0.94); opacity: 0; } }
  .gr-miss { display: flex; align-items: center; gap: 10px; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
  .gr-dots { display: inline-flex; gap: 7px; }
  .gr-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--faint); display: block; transition: background-color 0.3s ease, border-color 0.3s ease; }
  .gr-dots i.on { background: var(--ink); border-color: var(--ink); }
  .gr-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; width: var(--gr-w); }
  .gr-actions .btn { min-height: 44px; padding: 10px 6px; font-size: 0.74rem; }
  .gr-actions .btn:disabled { opacity: 0.4; cursor: default; }
  .gr-mini { display: flex; flex-direction: column; gap: 3px; align-items: center; margin: 12px auto 0; }
  .gr-mini span { display: flex; gap: 3px; }
  .gr-mini i { width: 18px; height: 18px; border-radius: 2px; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
  .gr-help { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
  .gr-help .gr-band { min-height: 0; padding: 7px 8px; }
  .gr-help .gr-band span { font-size: 0.88rem; }
  .gr-help small { font-family: 'Libre Franklin', sans-serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); text-align: right; margin: -2px 2px 4px; }
  @media (prefers-reduced-motion: reduce) {
    .gr-band.gr-new, .gr-tile.gr-hop, .gr-tile.gr-shake, .gr-tile.gr-pop { animation: none; }
    .gr-tile { transition: none; }
  }

  /* ================= Word Ladder ================= */
  .wl { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .wl-mode { display: flex; gap: 10px; align-items: center; }
  .wl-info { width: 100%; max-width: 420px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); border-bottom: 1px solid var(--faint); padding-bottom: 6px; }
  .wl-info b { color: var(--ink); letter-spacing: 0.04em; }
  .wl-ladder { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 30px; width: min(100%, 300px); }
  .wl-ladder::before, .wl-ladder::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5px; border: 1.8px solid var(--ink); border-radius: 2px; background: var(--paper-2); }
  .wl-ladder::before { left: 10px; transform: rotate(-0.6deg); }
  .wl-ladder::after { right: 10px; transform: rotate(0.6deg); }
  .wl-rung { position: relative; width: 100%; display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; justify-content: center; }
  .wl-rung::before { content: ""; position: absolute; left: -17px; right: -17px; top: 50%; border-top: 2px solid var(--ink); z-index: 0; }
  .wl-t { position: relative; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper);
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.45rem; text-transform: uppercase; line-height: 1; user-select: none; }
  .wl-start .wl-t, .wl-end .wl-t { background: var(--hit-bg); border-color: var(--hit-bg); color: var(--hit-fg); }
  .wl-end.wl-won .wl-t { animation: wl-hop 0.5s ease both; }
  .wl-end.wl-won .wl-t:nth-child(2) { animation-delay: 80ms; } .wl-end.wl-won .wl-t:nth-child(3) { animation-delay: 160ms; } .wl-end.wl-won .wl-t:nth-child(4) { animation-delay: 240ms; }
  .wl-new .wl-t { animation: wl-in 0.25s ease both; }
  .wl-t.wl-ch::after { content: ""; position: absolute; inset: 5px; border: 2.4px solid var(--red); border-radius: 52% 46% 55% 45% / 48% 55% 45% 52%; transform: rotate(-9deg); pointer-events: none; }
  .wl-start .wl-t.wl-ch::after, .wl-end .wl-t.wl-ch::after { border-color: var(--red); }
  .wl-hinted .wl-t { border-style: dashed; color: var(--ink-2); }
  .wl-input .wl-t { border-color: var(--faint); border-style: solid; }
  .wl-input .wl-t.wl-typed { border-color: var(--ink); }
  .wl-input .wl-t.wl-ghost { color: var(--ink-3); font-weight: 500; }
  .wl-input .wl-t.wl-caret { box-shadow: inset 0 -4px 0 var(--red); }
  .wl-input .wl-t.wl-pop { animation: pop 0.12s ease; }
  .wl-input.wl-shake { animation: shake 0.4s ease; }
  .wl-gap { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); position: relative; z-index: 1; padding: 2px 8px; }
  .wl-gap:empty { display: none; }
  .wl-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 420px); }
  .wl-tools .btn { min-height: 44px; padding: 9px 6px; font-size: 0.74rem; }
  .wl-tools .btn:disabled { opacity: 0.35; cursor: default; }
  .wl-result { text-align: center; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 6px 14px; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: page-in 0.35s ease; }
  .wl-result h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.6rem; line-height: 1.1; }
  .wl-result p { margin: 0; }
  .wl-sol { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; }
  .wl-next { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .wl-next b { font-variant-numeric: tabular-nums; color: var(--ink); }
  .wl-mini { display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.18em; }
  .wl-mini span { border-bottom: 1px solid var(--faint); padding: 0 6px 2px; }
  .wl-mini .wl-endw { color: var(--red); }
  .wl-mini i { font-style: normal; color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .wl-ex { margin: 12px 0; }
  .wl-ex .wl-endw { color: var(--ink); }
  .wl-dist div { grid-template-columns: 2rem 1fr; }
  .wl-kb { margin-top: 2px; }
  @keyframes wl-in { from { opacity: 0; transform: translateY(-6px); } }
  @keyframes wl-hop { 40% { transform: translateY(-10px); } 70% { transform: translateY(2px); } }
  @media (max-width: 380px) {
    .wl-rung { grid-template-columns: repeat(4, 40px); gap: 5px; }
    .wl-t { width: 40px; height: 40px; font-size: 1.3rem; }
    .wl-ladder { gap: 7px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .wl-new .wl-t, .wl-end.wl-won .wl-t, .wl-input .wl-t.wl-pop, .wl-input.wl-shake, .wl-result { animation: none; }
  }

  /* ================= Jumble ================= */
  .jb { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .jb-mode { display: flex; gap: 10px; align-items: center; }
  .jb-list { width: 100%; max-width: 440px; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
  .jb-row { appearance: none; background: none; border: none; border-bottom: 1px solid var(--faint); color: inherit; font: inherit; cursor: pointer; width: 100%;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 8px 4px 8px 10px; position: relative; text-align: left; min-height: 56px; }
  .jb-row.jb-active { background: var(--paper-2); box-shadow: inset 4px 0 0 var(--red); }
  .jb-row.jb-solved { cursor: default; }
  .jb-row.jb-shake { animation: shake 0.4s ease; }
  .jb-row.jb-good .jb-slot { animation: jb-hop 0.45s ease both; }
  .jb-row.jb-good .jb-slot:nth-child(2) { animation-delay: 60ms; } .jb-row.jb-good .jb-slot:nth-child(3) { animation-delay: 120ms; } .jb-row.jb-good .jb-slot:nth-child(4) { animation-delay: 180ms; } .jb-row.jb-good .jb-slot:nth-child(5) { animation-delay: 240ms; } .jb-row.jb-good .jb-slot:nth-child(6) { animation-delay: 300ms; }
  .jb-scr { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; color: var(--ink-2); white-space: nowrap; }
  .jb-solved .jb-scr { text-decoration: line-through; text-decoration-color: var(--red); color: var(--ink-3); }
  .jb-scr.jb-red { color: var(--red); font-style: normal; letter-spacing: 0.08em; }
  .jb-slots { display: flex; gap: 4px; }
  .jb-slot { position: relative; width: 36px; height: 38px; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center;
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.25rem; text-transform: uppercase; line-height: 1; }
  .jb-slot.jb-cap { background: var(--red-soft); border-color: var(--red); color: var(--red); }
  .jb-solved .jb-slot.jb-cap { background: var(--red); border-color: var(--red); color: var(--paper); }
  .jb-slot.jb-shown { color: var(--ink-3); border-style: dashed; }
  .jb-frow .jb-slot.jb-lock { background: var(--red-soft); color: var(--red); border-style: solid; }
  .jb-slot.jb-circ::after { content: ""; position: absolute; inset: 2px; border: 2px solid var(--red); border-radius: 50%; pointer-events: none; }
  .jb-slot.jb-pop { animation: pop 0.12s ease; }
  .jb-slot.jb-lock { background: var(--paper-3); color: var(--red); }
  .jb-solved .jb-slot { background: var(--hit-bg); border-color: var(--hit-bg); color: var(--hit-fg); animation: none; }
  .jb-solved .jb-slot.jb-circ::after { border-color: var(--red); inset: 1px; border-width: 2.4px; }
  .jb-hn { position: absolute; left: 10px; bottom: 3px; font-style: normal; font-family: 'Libre Franklin', sans-serif; font-size: 0.5rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
  .jb-fin { width: 100%; max-width: 440px; border: 1.5px solid var(--rule); padding: 8px 0 0; background: var(--paper); }
  .jb-fhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 10px 4px; border-bottom: 1px solid var(--faint); }
  .jb-fhead span { white-space: nowrap; font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.15rem; }
  .jb-fhead small { flex: 1; font-family: 'Libre Franklin', sans-serif; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); text-align: right; }
  .jb-frow { grid-template-columns: 1fr; justify-items: center; border-bottom: none; }
  .jb-frow .jb-slot { border-style: dashed; }
  .jb-frow .jb-slot.jb-full, .jb-frow.jb-solved .jb-slot { border-style: solid; }
  .jb-frow.jb-locked { cursor: default; }
  .jb-frow.jb-locked .jb-slot { border-color: var(--faint); }
  .jb-work { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
  .jb-tray { --n: 6; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 56px)); justify-content: center; gap: 6px; padding: 10px; background: var(--type); border-radius: 4px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5); }
  .jb-tray.jb-shake { animation: shake 0.4s ease; }
  .jb-type { appearance: none; aspect-ratio: 0.82; min-height: 48px; border: none; border-radius: 3px; cursor: pointer; background: linear-gradient(180deg, #4a4740, var(--type-face) 40%, #25231f); color: var(--type-fg); box-shadow: 0 2px 0 #11100e, inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(1.3rem, 6.5vw, 1.8rem); text-transform: uppercase; display: grid; place-items: center; transition: opacity 0.15s ease, transform 0.15s ease; padding: 0; }
  .jb-type:active { transform: translateY(2px); box-shadow: none; }
  .jb-type.jb-used { opacity: 0.22; transform: translateY(2px); box-shadow: none; }
  .jb-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .jb-actions .btn { min-height: 44px; padding: 9px 6px; font-size: 0.74rem; }
  .jb-result { text-align: center; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 6px 14px; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: page-in 0.35s ease; }
  .jb-result p { margin: 0; }
  .jb-next { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .jb-next b { font-variant-numeric: tabular-nums; color: var(--ink); }
  .jb-ex { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; padding: 6px 8px; border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
  .jb-ex .jb-slot { width: 30px; height: 32px; font-size: 1rem; animation: none; }
  @keyframes jb-hop { 40% { transform: translateY(-7px); } 70% { transform: translateY(1px); } }
  @media (max-width: 400px) {
    .jb-slot { width: 32px; height: 36px; font-size: 1.1rem; }
    .jb-slots { gap: 3px; }
    .jb-scr { font-size: 0.92rem; }
    .jb-row { padding-left: 8px; gap: 6px; }
  }
  @media (max-width: 350px) { .jb-slot { width: 29px; } }
  @media (prefers-reduced-motion: reduce) {
    .jb-row.jb-shake, .jb-row.jb-good .jb-slot, .jb-slot.jb-pop, .jb-tray.jb-shake, .jb-result { animation: none; }
  }

  /* ================= Hangman ================= */
  .hm { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .hm-mode { display: flex; gap: 10px; align-items: center; }
  .hm-stage { width: min(100%, 340px); border: 1.5px solid var(--rule); background: var(--paper); padding: 4px; box-shadow: 3px 3px 0 var(--paper-3); }
  .hm-svg { display: block; width: 100%; height: auto; color: var(--ink); overflow: hidden; }
  .hm-part { display: none; }
  .hm-part.hm-on { display: inline; }
  .hm-part.hm-draw, .hm-draw path, .hm-draw circle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hm-ink 0.75s ease-in-out forwards; animation-delay: var(--hm-d, 0ms); }
  .hm-boat { transform-box: fill-box; transform-origin: 50% 70%; transition: transform 0.9s cubic-bezier(.4, 1.4, .5, 1); }
  .hm-bob .hm-water { animation: hm-bob 3.2s ease-in-out infinite; }
  .hm-stage.hm-rock .hm-svg { animation: hm-rock 0.45s ease; }
  @keyframes hm-ink { to { stroke-dashoffset: 0; } }
  @keyframes hm-bob { 50% { transform: translateX(-6px); } }
  @keyframes hm-rock { 25% { transform: rotate(-1.2deg); } 75% { transform: rotate(1.2deg); } }
  .hm-count { width: 100%; max-width: 420px; display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--faint); padding-bottom: 6px; }
  .hm-count b { color: var(--red); font-size: 0.95rem; }
  .hm-missed { justify-self: end; display: flex; gap: 6px; font-size: 0.95rem; color: var(--ink-3); }
  .hm-missed s { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
  .hm-word { display: flex; gap: 6px; justify-content: center; padding: 6px 0 2px; }
  .hm-slot { width: 38px; height: 46px; border-bottom: 3px solid var(--ink); display: grid; place-items: end center; padding-bottom: 3px; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.9rem; line-height: 1; text-transform: uppercase; }
  .hm-slot.hm-reveal { color: var(--red); border-bottom-color: var(--red); }
  .hm-slot.hm-pop { animation: hm-pop 0.35s ease; }
  .hm-ex { margin: 10px 0; }
  .hm-ex .hm-slot { width: 32px; height: 40px; font-size: 1.5rem; }
  @keyframes hm-pop { 40% { transform: translateY(-8px) scale(1.12); } }
  .hm-kb .key:disabled { cursor: default; }
  .hm-kb .key.miss { opacity: 0.3; text-decoration: line-through; text-decoration-color: var(--red); }
  .hm-result { text-align: center; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 6px 14px; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: page-in 0.35s ease; }
  .hm-result h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 900; font-style: italic; font-size: 1.6rem; line-height: 1.1; }
  .hm-result p { margin: 0; }
  .hm-next { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .hm-next b { font-variant-numeric: tabular-nums; color: var(--ink); }
  @media (max-width: 380px) {
    .hm-slot { width: 34px; height: 42px; font-size: 1.65rem; }
    .hm-word { gap: 5px; }
    .hm-count { gap: 8px; font-size: 0.68rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hm-part.hm-draw, .hm-draw path, .hm-draw circle { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
    .hm-boat { transition: none; }
    .hm-bob .hm-water, .hm-stage.hm-rock .hm-svg, .hm-slot.hm-pop, .hm-result { animation: none; }
  }

  /* ================= Math Cages ================= */
  .kk { display: flex; flex-direction: column; gap: 12px; }
  .kk-grid { display: grid; gap: 1px; width: min(100%, 440px, calc(100vh - 330px)); min-width: 260px; margin: 0 auto; border: 3px solid var(--rule); background: var(--faint); user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .kc { appearance: none; aspect-ratio: 1; border: none; background-color: var(--paper); padding: 0; cursor: pointer; position: relative; display: grid; place-items: center;
    font-family: 'Libre Franklin', sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color 0.12s ease; }
  .kk-grid { position: relative; }
  .kk-walls { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 3; }
  .kk-walls path { fill: none; stroke: var(--rule); stroke-width: 4px; stroke-linecap: square; vector-effect: non-scaling-stroke; }
  .kc:focus-visible { outline: none; }
  .kc.zone { background-color: var(--paper-2); }
  .kc.cage { background-image: linear-gradient(var(--sel-soft), var(--sel-soft)); }
  .kc.same { background-color: var(--same-bg); box-shadow: inset 0 0 0 2px var(--same-ring); }
  .kc.sel { background-color: var(--sel-bg); background-image: none; }
  .kk-lab { position: absolute; top: calc(3% + 2px); left: calc(5% + 2px); font-style: normal; font-weight: 800; line-height: 1; font-size: max(9px, calc(100cqw / var(--n) * 0.17)); color: var(--ink); z-index: 2; pointer-events: none; }
  .kk-lab.ok { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; }
  .kk-v { font-family: 'Playfair Display', serif; font-weight: 900; font-size: calc(100cqw / var(--n) * 0.44); line-height: 1; margin-top: 12%; }
  .kc.wrong .kk-v { color: var(--red); }
  .kk-v.kk-nt { position: absolute; inset: 30% 4% 4%; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: max(8px, calc(100cqw / var(--n) * 0.14)); color: var(--ink-3); }
  .kk-v.kk-nt i { font-style: normal; text-align: center; }
  .kk.done .bs-tools, .kk.done .bs-pad, .kk.done .bs-check { display: none; }
  .kk.done .kc { cursor: default; }
  .kk-mini { display: grid; width: min(100%, 240px); margin: 12px auto; border: 2px solid var(--rule); font-family: 'Libre Franklin', sans-serif; }
  .kk-mini i { font-style: normal; aspect-ratio: 1; position: relative; display: grid; place-items: center; padding-top: 18%; font-weight: 700; font-size: 1.05rem; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
  .kk-mini i.kr { border-right: 2px solid var(--rule); }
  .kk-mini i.kb { border-bottom: 2px solid var(--rule); }
  .kk-mini i.lc { border-right: none; }
  .kk-mini i.lr { border-bottom: none; }
  .kk-mini em { position: absolute; top: 2px; left: 3px; font-style: normal; font-weight: 800; font-size: 0.6rem; line-height: 1; }

  /* ================= Equation Guess ================= */
  .eq-board { display: grid; gap: 5px; width: min(100%, 400px, calc((100vh - 380px) * var(--cols, 7) / var(--rows, 5) * 0.95)); min-width: 260px; }
  .eq-row { display: grid; grid-template-columns: repeat(var(--cols, 7), 1fr); gap: 5px; }
  .eq .tierbar { width: 100%; max-width: 400px; }
  .eq-size { font-family: 'Libre Franklin', sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .eq-row.shake { animation: shake 0.4s ease; }
  .eq-board .tile { font-size: clamp(1.1rem, 5.6vw, 1.6rem); border-width: 2px; }
  .eq-kb .key { max-width: 52px; font-size: 1.1rem; }
  .eq-kb .key.wide { max-width: 88px; font-size: 0.72rem; }
  .eq-ex { display: grid; grid-template-columns: repeat(7, 36px); gap: 4px; justify-content: center; margin: 12px 0; }
  .eq-ex .tile { font-size: 1.05rem; }

  /* ================= Picture Grid ================= */
  .pg { display: flex; flex-direction: column; gap: 12px; }
  .pg-wrap { width: 100%; display: flex; justify-content: center; }
  .pg-board { display: grid; user-select: none; -webkit-user-select: none; touch-action: none; }
  .pg-corner { border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
  .pg-cc, .pg-rc { font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: calc(var(--c) * 0.5); line-height: 1; color: var(--ink); display: flex; gap: calc(var(--c) * 0.12); transition: color 0.2s ease; }
  .pg-cc { flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: calc(var(--c) * 0.18); border-bottom: 2px solid var(--rule); background: var(--paper); }
  .pg-rc { justify-content: flex-end; align-items: center; padding-right: calc(var(--c) * 0.22); border-right: 2px solid var(--rule); background: var(--paper); }
  .pg-cc.ok, .pg-rc.ok { color: var(--ink-3); }
  .pg-cc.ok i, .pg-rc.ok i { text-decoration: line-through; text-decoration-color: var(--faint); }
  .pg-cc i, .pg-rc i { font-style: normal; }
  .pg-cc.b5 { border-right: 1.5px solid var(--ink-3); }
  .pg-rc.b5 { border-bottom: 1.5px solid var(--ink-3); }
  .pc { border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); background: var(--paper); cursor: pointer; position: relative; }
  .pc.r5 { border-right: 1.5px solid var(--ink-3); }
  .pc.d5 { border-bottom: 1.5px solid var(--ink-3); }
  .pc.on { background: var(--ink); }
  .pc.mk::before, .pc.mk::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; border-top: 1.6px solid var(--ink-3); }
  .pc.mk::before { transform: rotate(45deg); }
  .pc.mk::after { transform: rotate(-45deg); }
  .pc.sel { box-shadow: inset 0 0 0 2px var(--near-bg); z-index: 1; }
  .pc.wrong { background: var(--red); }
  .pc.wrong.mk { background: var(--red-soft); }
  .pc.pop { animation: pop 0.12s ease; }
  .pc.reveal { animation: pg-ink 0.5s ease both; }
  @keyframes pg-ink { from { background: var(--paper); } 60% { background: var(--red); } }
  .pg.done .pc { cursor: default; border-color: transparent; }
  .pg.done .pc.mk::before, .pg.done .pc.mk::after { display: none; }
  .pg.done .pg-tools, .pg.done .pg-modes { display: none; }
  .pg-modes { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 460px); margin: 0 auto; border: 1.5px solid var(--ink); border-radius: 2px; }
  .pg-mode { appearance: none; border: none; background: transparent; color: var(--ink); min-height: 44px; cursor: pointer; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .pg-mode + .pg-mode { border-left: 1.5px solid var(--ink); }
  .pg-mode.on { background: var(--ink); color: var(--paper); }
  .pg-sw { width: 14px; height: 14px; display: inline-grid; place-items: center; font-size: 0.8rem; }
  .pg-sw.fill { background: currentColor; }
  .pg-mini { display: grid; width: min(100%, 200px); margin: 12px auto; border: 2px solid var(--rule); }
  .pg-mini i { aspect-ratio: 1; }
  .pg-mini i.on { background: var(--ink); }
  .pg-ex { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0; font-family: 'Libre Franklin', sans-serif; font-weight: 700; }
  .pg-exr { display: grid; grid-template-columns: repeat(6, 28px); border: 1.5px solid var(--rule); }
  .pg-exr i { height: 28px; border-right: 1px solid var(--faint); font-style: normal; display: grid; place-items: center; color: var(--ink-3); font-size: 0.8rem; }
  .pg-exr i.on { background: var(--ink); }
  @media (prefers-reduced-motion: reduce) { .pc.pop, .pc.reveal { animation: none; } }

  /* ================= Zeros & Ones ================= */
  .zo { display: flex; flex-direction: column; gap: 12px; }
  .zo-grid { display: grid; gap: 3px; width: min(100%, 440px, calc(100vh - 300px)); min-width: 260px; margin: 0 auto; padding: 5px; border: 2.5px solid var(--rule); background: var(--paper); user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .zc { appearance: none; aspect-ratio: 1; border: 1.5px solid var(--faint); border-radius: 3px; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; color: var(--ink);
    font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: calc(100cqw / var(--n) * 0.46); line-height: 1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color 0.12s ease, border-color 0.12s ease; }
  .zc:focus-visible { outline: none; }
  .zc.z0, .zc.z1 { border-color: var(--ink-3); }
  .zc.given { font-family: 'Playfair Display', serif; font-weight: 900; background: var(--paper-3); border-color: var(--paper-3); cursor: default; }
  .zc.sel { background: var(--sel-bg); }
  .zc.bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
  .zc.given.bad { color: var(--red); background: var(--red-soft); border-color: var(--red); }
  .zc.pop span { display: inline-block; animation: pop 0.14s ease; }
  .zo-hint { margin: -4px 0 0; text-align: center; font-size: 0.86rem; font-style: italic; color: var(--ink-2); }
  .zo.done .bs-tools, .zo.done .bs-check { display: none; }
  .zo-check { margin-top: -4px; }
  .zo-check2 { margin-top: -14px; }
  .zo.done .zc { cursor: default; }
  .zo-mini { display: grid; width: min(100%, 240px); margin: 12px auto; border: 2px solid var(--rule); font-family: 'Libre Franklin', sans-serif; }
  .zo-mini i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; font-size: 0.8rem; color: var(--ink-3); border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
  .zo-mini i.g { color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 900; }
  .zo-ex { display: flex; gap: 24px; justify-content: center; margin: 10px 0; font-family: 'Libre Franklin', sans-serif; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.2em; }
  .zo-ex b { color: var(--red); }
  @media (prefers-reduced-motion: reduce) { .zc.pop span { animation: none; } }

  /* digits: lining figures, trimmed to their own height so they sit in the middle of their square */
  .bc, .pd, .kc, .kk-v, .zc, .bs-mini, .kk-mini, .zo-mini, .figs b { font-variant-numeric: lining-nums tabular-nums; }
  .bc, .kk-v, .zc span, .pd { text-box: trim-both cap alphabetic; }
  .bc .nt i, .kk-v.kk-nt i { text-box: trim-both cap alphabetic; }
  .kk-v { margin-top: 14%; }

  /* ================= pages: section tabs, section heads, the "inside" box ================= */
  .desks { display: flex; border-bottom: 2px solid var(--rule); margin: 0 0 2px; overflow-x: auto; scrollbar-width: none; }
  .desks::-webkit-scrollbar { display: none; }
  .desks a { flex: 1 1 0; min-width: 0; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 4px 5px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
    font-family: 'Libre Franklin', sans-serif; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 4px solid transparent; margin-bottom: 0; -webkit-tap-highlight-color: transparent; transition: color 0.15s ease, border-color 0.15s ease; }
  .desks a b { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 0.95rem; letter-spacing: 0; color: var(--ink-3); line-height: 1; }
  /* the tab bar scrolls sideways on phones, so it clips anything hanging over its bottom rule: the red marker sits
     fully inside it, right on top of the rule, rather than overlapping the rule and getting cut down to a sliver */
  .desks a.on { color: var(--ink); border-bottom-color: var(--red); }
  .desks a.on b { color: var(--red); }
  @media (hover: hover) { .desks a:hover { color: var(--ink); } }
  .desks a:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

  .sec-head { text-align: center; padding: 18px 0 14px; }
  .sec-letter { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red); }
  .sec-head h2 { margin: 4px 0 6px; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 2.2rem; line-height: 1.02; letter-spacing: -0.01em; }
  .sec-head p { margin: 0 auto; max-width: 30em; font-style: italic; color: var(--ink-2); font-size: 0.97rem; line-height: 1.4; }
  @media (min-width: 540px) { .sec-head h2 { font-size: 2.8rem; } }

  .fp-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid currentColor; border-radius: 2px; font-size: 0.56rem; letter-spacing: 0.1em; color: var(--ink-2); vertical-align: 1px; }

  .story.soon { cursor: default; grid-template-columns: 1fr !important; }
  .story.soon .kicker { color: var(--ink-3); }
  .story.soon h2 { color: var(--ink-2); }
  .story.soon:active { background: none; }
  @media (hover: hover) { .story.soon:hover h2 { text-decoration: none; } }

  /* a note to new readers: boxed at the top of the front page until they close it */
  .welcome { margin: 14px 0 4px; border: 1.5px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 3px; padding: 14px 16px 16px; position: relative; }
  .welcome .wk { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin: 0; }
  .welcome h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.35rem, 5.4vw, 1.7rem); line-height: 1.15; margin: 4px 36px 10px 0; text-wrap: balance; }
  .welcome ol, .welcome-modal ol { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: wl; display: grid; gap: 9px; }
  .welcome li, .welcome-modal li { counter-increment: wl; display: grid; grid-template-columns: 26px 1fr; gap: 8px; font-size: 0.95rem; line-height: 1.42; }
  .welcome li::before, .welcome-modal li::before { content: counter(wl); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 800 0.72rem/1 'Libre Franklin', sans-serif; margin-top: 1px; }
  .welcome li i, .welcome-modal li i { font-style: normal; color: var(--red); }
  .welcome .btn-row { justify-content: flex-start; }
  .welcome .x { position: absolute; top: 8px; right: 8px; }
  @media (max-width: 420px) { .welcome { padding: 12px 13px 14px; } .welcome li { font-size: 0.89rem; line-height: 1.38; } .welcome ol { gap: 7px; } }
  @media (min-width: 720px) { .welcome ol { grid-template-columns: 1fr 1fr; column-gap: 22px; } }
  /* the home-screen note: same boxed style as the welcome note, a little smaller */
  .a2hs { margin: 14px 0 4px; border: 1.5px solid var(--rule); padding: 12px 14px 14px; position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 4px 12px; align-items: start; }
  .a2hs img { width: 52px; height: 52px; border-radius: 12px; grid-row: span 2; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
  .a2hs h2 { font-family: 'Playfair Display', serif; font-size: 1.12rem; line-height: 1.2; margin: 2px 34px 0 0; text-wrap: balance; }
  .a2hs p { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--ink-2); }
  .a2hs .x { position: absolute; top: 6px; right: 6px; }
  .a2hs-steps { grid-column: 1 / -1; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: a2; display: grid; gap: 7px; }
  .a2hs-steps li { counter-increment: a2; display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: 0.92rem; line-height: 1.4; align-items: center; }
  .a2hs-steps li::before { content: counter(a2); width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font: 800 0.66rem/1 'Libre Franklin', sans-serif; }
  .a2hs-steps .sh { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--faint); border-radius: 5px; vertical-align: -6px; margin: 0 2px; color: #1a73e8; }
  .a2hs-steps .sh svg { width: 15px; height: 15px; }
  .a2hs .btn-row { grid-column: 1 / -1; justify-content: flex-start; margin-top: 10px; }
  .a2hs .btn { min-height: 40px; padding: 8px 14px; }
  .welcome-modal .a2hs { display: block; border: 0; padding: 0; margin: 0 0 6px; }
  .inside { margin: 22px 0 0; border: 1.5px solid var(--rule); }
  /* accounts */
  .acct-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
  .acct-in { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 10px 12px; font: 600 1rem 'Libre Franklin', sans-serif; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px; }
  .acct-in:focus { outline: 2px solid var(--red); outline-offset: 1px; }
  .acct-code { letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; flex-basis: 140px; }
  .acct-msg { min-height: 1.3em; margin: 4px 0; font-family: 'Libre Franklin', sans-serif; font-size: 0.82rem; color: var(--red); }
  .acct-fine { font-size: 0.82rem !important; color: var(--ink-2); }
  .acct-status { font-family: 'Libre Franklin', sans-serif; font-size: 0.82rem !important; color: var(--ink-2); }
  .acct-row { justify-content: flex-start; margin: 10px 0 4px; }
  .acct-form.stack { flex-direction: column; flex-wrap: nowrap; }
  .acct-form.stack .acct-in { flex: none; width: 100%; }
  .acct-pwbox { position: relative; display: flex; flex: 1 1 180px; min-width: 0; }
  .acct-pwbox .acct-in { flex: 1 1 auto; width: 100%; padding-right: 68px; }
  .acct-form.stack .acct-pwbox { flex: none; width: 100%; }
  .acct-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; min-width: 56px; padding: 0 10px; border: 0; background: transparent; cursor: pointer;
    font: 800 0.7rem 'Libre Franklin', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border-radius: 2px; }
  .acct-eye:hover, .acct-eye[aria-pressed="true"] { color: var(--red); }
  .acct-eye:focus-visible { outline: 2px solid var(--red); }
  /* the browser's own reveal button would double up with ours */
  .acct-pwbox input::-ms-reveal { display: none; }
  .acct-form.stack .btn { align-self: flex-start; }
  .acct-hint { margin-top: -4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .acct-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-family: 'Libre Franklin', sans-serif; font-size: 0.9rem; cursor: pointer; }
  .acct-check input { width: 18px; height: 18px; accent-color: var(--ink); }
  .rem-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .rem-row .rem-hour { flex: 0 0 auto; min-height: 40px; padding: 6px 10px; }
  .rec-acct { margin: -4px 0 0; text-align: center; font-size: 0.85rem !important; color: var(--ink-2); }
  .rec-acct .linkish { text-transform: none; letter-spacing: 0; font-size: 0.85rem; }
  /* ads: boxed and labelled like a paper's ad space; hidden when nothing fills them */
  .ad { margin: 22px 0 0; padding: 6px 0 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: center; min-height: 140px; }
  .ad-lbl { display: block; margin-bottom: 6px; font-family: 'Libre Franklin', sans-serif; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
  .ad:has(ins[data-ad-status="unfilled"]) { display: none; }
  /* choosing your ten */
  .fp-edit { display: flex; justify-content: flex-end; padding: 6px 0 0; }
  .fp-edit .linkish { padding: 6px 0; }
  .fp-intro { margin: 4px 0 8px; color: var(--ink-2); }
  .fp-intro i { font-style: normal; color: var(--red); }
  .fp-count { margin: 0 0 4px; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
  .fp-count b { color: var(--ink); font-weight: 800; }
  .fp-count.ok b { color: var(--good); }
  .fp-count.over b { color: var(--red); }
  .fp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .fp-item { appearance: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; text-align: left; cursor: pointer; background: transparent; color: var(--ink); border: 1.5px solid var(--faint); border-radius: 2px; font: 600 0.92rem/1.2 'Newsreader', serif; }
  .fp-item small { font: 800 0.58rem/1 'Libre Franklin', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-left: 2px; }
  .fp-item.on { border-color: var(--ink); background: var(--paper-2); }
  .fp-num { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: grid; place-items: center; font: 800 0.72rem/1 'Libre Franklin', sans-serif; }
  .fp-item.on .fp-num { background: var(--red); border-color: var(--red); color: #fff; }
  .fp-actions { margin-top: 16px; }
  .fp-actions .btn[disabled] { opacity: 0.4; cursor: default; }
  .inside h3 { margin: 0; padding: 7px 12px; background: var(--ink); color: var(--paper); font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
  .in-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.15s ease; }
  .in-row + .in-row { border-top: 1px solid var(--faint); }
  .in-row:active { background: var(--paper-2); }
  .in-l { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--red); text-align: center; }
  .in-n { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .in-n b { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 1.12rem; line-height: 1.15; }
  .in-n small { font-style: italic; color: var(--ink-2); font-size: 0.84rem; }
  .in-c { font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
  .in-c span { display: inline-block; margin-left: 4px; color: var(--ink); transition: transform 0.15s ease; }
  @media (hover: hover) { .in-row:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; } .in-row:hover .in-c span { transform: translateX(3px); } }
  .in-row:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

  .cont { margin: 18px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); text-align: right; }
  .cont a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); text-decoration: none; font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  @media (hover: hover) { .cont a:hover { color: var(--red); } }


  /* ================= Codebreaker ================= */
  .cb { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .cb .fp-head { width: 100%; }
  .cb-q { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 14px; padding: 10px 0 2px; max-width: 540px; }
  .cb-w { display: flex; gap: 3px; }
  .cb-c, .cb-x { display: flex; flex-direction: column; align-items: center; width: 24px; }
  .cb-c { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .cb-c:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  .cb-x { width: auto; min-width: 5px; }
  .cb-p { width: 100%; height: 30px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; line-height: 1; border-radius: 2px 2px 0 0; transition: background-color 0.12s ease; }
  .cb-c .cb-p { border-bottom: 2px solid var(--ink); }
  .cb-k { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; margin-top: 4px; line-height: 1; }
  .cb-c.same .cb-p { background: var(--sel-soft); }
  .cb-c.sel .cb-p { background: var(--sel-bg); }
  /* letters given at the start sit in shaded, printed boxes; the ones you type stand on an underline in bold ink */
  .cb-c.given .cb-p { font-weight: 600; color: var(--ink-2); border-bottom-color: transparent; border-radius: 3px; }
  .cb-c.given:not(.sel):not(.same) .cb-p { background: var(--out-bg); }
  .cb-c.given { cursor: default; }
  .cb-c.bad .cb-p { color: var(--red); }
  .cb-c.pop .cb-p { animation: pop 0.14s ease; }
  .cb.done .cb-c { cursor: default; }
  .cb.done .cb-c .cb-p { border-bottom-color: transparent; }
  .cb.done .cb-k { display: none; }
  .cb.done .cb-q { gap: 4px 14px; }
  .cb-who { margin: -6px 0 0; font-style: italic; color: var(--ink-2); text-align: center; min-height: 1.3em; }
  .cb-hint { margin: 0; }
  .cb.done .cb-tools, .cb.done .cb-check, .cb.done .cb-kb, .cb.done .cb-hint { display: none; }
  .cb #cb-end { width: 100%; }
  .cb-kb .key.used { opacity: 0.4; }
  .cb-check { margin-top: -4px; }
  .cb-ex { display: flex; gap: 4px; justify-content: center; margin: 12px 0; }
  .cb-ex .cb-c { width: 28px; cursor: default; }
  @media (prefers-reduced-motion: reduce) { .cb-c.pop .cb-p { animation: none; } }

  /* ================= Four Sides ================= */
  .fs { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .fs-cur { min-height: 46px; min-width: 62%; display: flex; align-items: center; justify-content: center; padding: 0 8px; border-bottom: 2px solid var(--ink); font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.9rem; letter-spacing: 0.08em; }
  .fs-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 4px; background: var(--red); animation: fs-blink 1s steps(1) infinite; }
  @keyframes fs-blink { 50% { opacity: 0; } }
  .fs-cur.shake { animation: shake 0.3s ease; }
  .fs-words { min-height: 1.5em; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--ink-2); }
  .fs-words b { color: var(--ink-3); font-weight: 400; }
  .fs-none { font-family: 'Newsreader', serif; font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
  .fs-board { width: min(100%, 340px); }
  .fs-svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
  .fs-box { fill: var(--paper); stroke: var(--rule); stroke-width: 2.5; }
  .fs-l { cursor: pointer; outline: none; }
  .fs-hit { fill: transparent; }
  .fs-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; transition: fill 0.15s ease, stroke 0.15s ease; }
  .fs-l text { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 23px; fill: var(--ink); transition: opacity 0.15s ease; }
  .fs-l.used .fs-dot { fill: var(--ink); }
  .fs-l.now .fs-dot { fill: var(--red); stroke: var(--red); }
  .fs-l.last .fs-dot { r: 9; }
  .fs-l.off { cursor: not-allowed; }
  .fs-l.off text, .fs-l.off .fs-dot { opacity: 0.3; }
  .fs-done { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.5; }
  .fs-now { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 7 5; }
  .fs.done .fs-done { opacity: 0.85; }
  @media (hover: hover) { .fs-l:not(.off):not(.fin):hover .fs-dot { stroke: var(--red); } .fs-l:not(.off):not(.fin):hover text { fill: var(--red); } }
  .fs-tools { width: min(100%, 360px); }
  .fs-par { margin: 0; }
  .fs-give { margin: -4px 0 0; }
  .fs.done .fs-tools, .fs.done .fs-par, .fs.done .fs-cur { display: none; }
  .fs.revealing .fs-tools, .fs.revealing .fs-par, .fs.revealing .fs-give { visibility: hidden; }
  .fs.revealing .fs-l { cursor: default; }
  .fs.done .fs-l { cursor: default; }
  .fs #fs-end { width: 100%; }
  @media (prefers-reduced-motion: reduce) { .fs-caret { animation: none; } }


  /* ================= Bullseye ================= */
  .be { display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .be .fp-head { width: 100%; }
  .be-target { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 28px 10px; border: 2.5px solid var(--rule); box-shadow: 3px 3px 0 var(--paper-3); background: var(--paper); }
  .be-target span { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
  .be-target b { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 3rem; line-height: 1; font-variant-numeric: lining-nums; }
  .be-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 58px; max-width: 420px; }
  .be-t { appearance: none; min-width: 54px; height: 54px; padding: 0 10px; border: 1.5px solid var(--rule); border-radius: 4px; background: var(--paper-2); color: var(--ink); cursor: pointer; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 1.35rem; font-variant-numeric: lining-nums tabular-nums; -webkit-tap-highlight-color: transparent; touch-action: manipulation; display: inline-grid; place-items: center; transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
  .be-t.big { background: var(--paper-3); }
  .be-t.made { border-style: dashed; }
  .be-t.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .be-t.hit { background: var(--red); color: #fff; border-color: var(--red); border-style: solid; }
  .be-t.pop { animation: pop 0.18s ease; }
  .be-t:disabled { cursor: default; }
  .be-ops { display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; }
  .be-op { appearance: none; height: 50px; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 1.5rem; line-height: 1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .be-op.sel { background: var(--red); border-color: var(--red); color: #fff; }
  .be-op:disabled { opacity: 0.35; cursor: default; }
  .be-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 1.4em; font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: 0.95rem; font-variant-numeric: lining-nums; color: var(--ink-2); }
  .be-log i { font-style: normal; color: var(--red); font-weight: 800; }
  .be-log b { color: var(--ink); }
  .be-log .be-none { font-family: 'Newsreader', serif; font-style: italic; font-weight: 400; color: var(--ink-3); }
  .be-tools { width: min(100%, 420px); grid-template-columns: repeat(4, 1fr); }
  .be.done .be-ops, .be.done .be-tools { display: none; }
  .be #be-end { width: 100%; }
  .be-ex { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; font-family: 'Libre Franklin', sans-serif; font-weight: 800; }
  .be-ex .be-t { cursor: default; }
  .be-ex i { font-style: normal; color: var(--red); font-size: 1.3rem; }
  @media (prefers-reduced-motion: reduce) { .be-t.pop { animation: none; } }

  /* ================= Bridges ================= */
  .br { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .br .fp-head { width: 100%; }
  .br-board { width: min(100%, 460px, calc(100vh - 290px)); min-width: 280px; border: 2.5px solid var(--rule); background: var(--paper); padding: 4px; }
  .br-svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
  .br-dots circle { fill: var(--ink-3); opacity: 0.35; }
  #br-lines line, .br-lines line { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
  .br-hit { stroke: transparent; stroke-width: 22; cursor: pointer; }
  .br-i { cursor: pointer; }
  .br-i circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2.2; transition: fill 0.15s ease, stroke 0.15s ease; }
  .br-i text { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 17px; fill: var(--ink); font-variant-numeric: lining-nums; }
  .br-i.full circle { fill: var(--ink); }
  .br-i.full text { fill: var(--paper); }
  .br-i.over circle { stroke: var(--red); fill: var(--red-soft); }
  .br-i.over text { fill: var(--red); }
  .br-i.sel circle { stroke: var(--red); stroke-width: 3.5; }
  .br-i.near circle { stroke-dasharray: 4 3; stroke: var(--red); }
  .br-i.fin { cursor: default; }
  .br-hint { margin: -2px 0 0; }
  .br-tools { width: min(100%, 420px); }
  .br.done .br-tools, .br.done .br-hint, .br.done .br-hits { display: none; }
  .br #br-end { width: 100%; }
  .br-mini { width: min(100%, 300px); margin: 12px auto; border: 2px solid var(--rule); padding: 4px; }
  .br-ex .br-mini { width: 170px; }


  /* ================= Cross Sums ================= */
  .cs { display: flex; flex-direction: column; gap: 12px; }
  .cs-grid { display: grid; gap: 1px; width: min(100%, 460px, calc(100vh - 330px)); min-width: 270px; margin: 0 auto; padding: 1px; background: var(--ink); border: 2px solid var(--rule); user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .cs-c { appearance: none; aspect-ratio: 1; border: none; background: var(--paper); padding: 0; cursor: pointer; position: relative; color: var(--ink); display: grid; place-items: center;
    font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: calc(100cqw / var(--n) * 0.5); line-height: 1; font-variant-numeric: lining-nums tabular-nums; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color 0.12s ease; }
  .cs-c.zone { background: var(--paper-2); }
  .cs-c.sel { background: var(--sel-bg); }
  .cs-c.wrong { color: var(--red); }
  .cs-c.fin { cursor: default; }
  .cs-c .nt { position: absolute; inset: 6%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); font-size: max(7px, calc(100cqw / var(--n) * 0.2)); font-weight: 600; color: var(--ink-2); }
  .cs-c .nt i { font-style: normal; display: grid; place-items: center; }
  .cs-k { --ck: color-mix(in srgb, var(--ink) 16%, var(--paper)); aspect-ratio: 1; background: var(--ck); position: relative; }
  .cs-k.clue { background: linear-gradient(to top right, transparent calc(50% - 0.6px), var(--ink-3) calc(50% - 0.6px), var(--ink-3) calc(50% + 0.6px), transparent calc(50% + 0.6px)), var(--ck); }
  .cs-k span { position: absolute; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(100cqw / var(--n) * 0.27); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; transition: color 0.15s ease, opacity 0.15s ease; }
  .cs-k .ka { top: 9%; right: 9%; }
  .cs-k .kd { bottom: 9%; left: 9%; }
  .cs-k span.hot { color: var(--red); }
  .cs-k span.met { opacity: 0.4; }
  .cs-k span.bad { color: var(--red); text-decoration: underline; }
  .cs .bs-tools, .cs .bs-pad { width: min(100%, 460px); }
  .cs-check { margin-top: -6px; }
  .cs.done .bs-tools, .cs.done .bs-pad, .cs.done .cs-check { display: none; }
  .cs-mini { width: min(100%, 280px); min-width: 0; margin: 12px auto; }
  .cs-mini .cs-c { cursor: default; }

  /* ================= Star Battle ================= */
  .sb { display: flex; flex-direction: column; gap: 12px; }
  .sb-grid { display: grid; width: min(100%, 440px, calc(100vh - 320px)); min-width: 260px; margin: 0 auto; border: 2.5px solid var(--rule); user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .sb-c { appearance: none; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; position: relative; display: grid; place-items: center; color: var(--ink); background: var(--sb-0);
    box-shadow: inset 0 0 0 0.5px var(--faint); font-size: calc(100cqw / var(--n) * 0.56); line-height: 1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .sb-c.t0 { background: var(--sb-0); } .sb-c.t1 { background: var(--sb-1); } .sb-c.t2 { background: var(--sb-2); } .sb-c.t3 { background: var(--sb-3); }
  .sb-c::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 0 solid var(--ink); }
  .sb-c.et::after { border-top-width: 2.5px; } .sb-c.er::after { border-right-width: 2.5px; } .sb-c.eb::after { border-bottom-width: 2.5px; } .sb-c.el::after { border-left-width: 2.5px; }
  .sb-c > span { display: grid; place-items: center; width: 100%; height: 100%; }
  .sb-star { width: 64%; height: 64%; display: block; fill: currentColor; }
  .sb-c.dot span::before { content: ""; display: block; width: calc(100cqw / var(--n) * 0.14); height: calc(100cqw / var(--n) * 0.14); border-radius: 50%; background: var(--ink-3); }
  .sb-c.star { color: var(--ink); }
  .sb-c.bad { color: var(--red); }
  .sb-c.pop > span { animation: pop 0.16s ease; }
  .sb-c.fin { cursor: default; }
  .sb-hint { margin: -4px 0 0; }
  .sb .bs-tools { width: min(100%, 440px); }
  .sb-tools { grid-template-columns: repeat(4, 1fr); }
  .sb-c.hinted { animation: sb-hint 1.2s ease; }
  @keyframes sb-hint { 0%, 40% { box-shadow: inset 0 0 0 3px var(--near-bg); } 100% { box-shadow: inset 0 0 0 0.5px var(--faint); } }
  .sb-check { margin-top: -4px; }
  .sb.done .bs-tools, .sb.done .sb-check, .sb.done .sb-hint { display: none; }
  .sb-mini { width: min(100%, 220px); min-width: 0; margin: 12px auto; }
  :root { --sb-0: #f6f1e6; --sb-1: #ece3cf; --sb-2: #f3e7c4; --sb-3: #e6dccb; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sb-0: #1d1b18; --sb-1: #26231f; --sb-2: #2e2a1f; --sb-3: #22201d; } }
  :root[data-theme="dark"] { --sb-0: #1d1b18; --sb-1: #26231f; --sb-2: #2e2a1f; --sb-3: #22201d; }
  @media (prefers-reduced-motion: reduce) { .sb-c.pop > span { animation: none; } }


  /* ================= Minesweeper ================= */
  :root { --ms-1: #2d5d9f; --ms-2: #2e7a4c; --ms-3: #b3261e; --ms-4: #3a3790; --ms-5: #8a4317; --ms-6: #1f7a7a; --ms-7: #1f1b16; --ms-8: #6b6259; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ms-1: #8db4f0; --ms-2: #7fcf9b; --ms-3: #ff8a7a; --ms-4: #b3aef5; --ms-5: #f0a873; --ms-6: #7fd6d6; --ms-7: #efe9e2; --ms-8: #a0968c; } }
  :root[data-theme="dark"] { --ms-1: #8db4f0; --ms-2: #7fcf9b; --ms-3: #ff8a7a; --ms-4: #b3aef5; --ms-5: #f0a873; --ms-6: #7fd6d6; --ms-7: #efe9e2; --ms-8: #a0968c; }
  .ms { display: flex; flex-direction: column; gap: 12px; }
  .ms-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: min(100%, 520px); margin: 0 auto; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .ms-bar b { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
  .ms-note { font-style: italic; font-family: 'Source Serif 4', Georgia, serif; color: var(--ink-3); }
  .ms.done .ms-note { visibility: hidden; }
  .ms-grid { display: grid; width: min(100%, 520px, calc(100vh - 300px)); min-width: 270px; margin: 0 auto; border: 2.5px solid var(--rule); background: var(--rule); gap: 1px; user-select: none; -webkit-user-select: none; container-type: inline-size; }
  .ms-c { appearance: none; aspect-ratio: 1; border: 0; padding: 0; margin: 0; cursor: pointer; display: grid; place-items: center; position: relative;
    background: var(--paper-3); box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.45), inset -1.5px -1.5px 0 rgba(0, 0, 0, 0.12);
    font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: calc(100cqw / var(--n) * 0.56); line-height: 1; color: var(--ink);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-touch-callout: none; }
  .ms-c:disabled { cursor: default; color: inherit; }
  .ms-c.open { background: var(--paper); box-shadow: none; cursor: default; }
  .ms-c.n1 { color: var(--ms-1); } .ms-c.n2 { color: var(--ms-2); } .ms-c.n3 { color: var(--ms-3); } .ms-c.n4 { color: var(--ms-4); }
  .ms-c.n5 { color: var(--ms-5); } .ms-c.n6 { color: var(--ms-6); } .ms-c.n7 { color: var(--ms-7); } .ms-c.n8 { color: var(--ms-8); }
  .ms-c.open.n1, .ms-c.open.n2, .ms-c.open.n3, .ms-c.open.n4, .ms-c.open.n5, .ms-c.open.n6, .ms-c.open.n7, .ms-c.open.n8 { cursor: pointer; }
  .ms-flag, .ms-mine { width: 66%; height: 66%; display: block; color: var(--ink); }
  .ms-c.mine { background: var(--paper); box-shadow: none; }
  .ms-c.boom { background: var(--red); } .ms-c.boom .ms-mine { color: var(--paper); }
  .ms-c.wrongflag { background: var(--red-soft); }
  .ms-c.hinted { animation: ms-hint 1.2s ease; }
  @keyframes ms-hint { 0%, 40% { box-shadow: inset 0 0 0 3px var(--near-bg, var(--sel-bg)); } 100% { box-shadow: none; } }
  .ms-modes { width: min(100%, 520px); }
  .ms-modes .ms-sw { width: 16px; height: 16px; }
  .ms-modes .pg-mode.on .ms-flag, .ms-modes .pg-mode.on .ms-mine { color: var(--paper); }
  .ms-modes .pg-sw { width: 18px; height: 18px; }
  .ms-modes .pg-sw svg { width: 100%; height: 100%; }
  .ms-hint { margin: -4px 0 0; }
  .tierbar.four { grid-template-columns: repeat(4, 1fr); width: min(100%, 520px); }
  .ms-pick { display: grid; gap: 6px; margin: 12px 0 4px; }
  .ms-pick label { display: flex; justify-content: space-between; font-family: 'Libre Franklin', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
  .ms-pick label b { color: var(--ink); letter-spacing: 0; text-transform: none; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
  .ms-pick input[type=range] { width: 100%; accent-color: var(--red); height: 28px; }
  .ms-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
  .ms-presets .btn { padding: 8px 4px; font-size: 0.7rem; }
  .ms-pick-note { min-height: 1.2em; margin: 4px 0 0; font-size: 0.85rem; color: var(--ink-3); font-style: italic; }
  .ms .bs-tools { width: min(100%, 520px); }
  .ms.done .ms-modes, .ms.done .ms-hint, .ms.done .ms-tools { display: none; }
  .ms-ex { display: flex; justify-content: center; gap: 1px; background: var(--rule); width: max-content; margin: 10px auto; border: 2px solid var(--rule); container-type: inline-size; --n: 1; }
  .ms-ex .ms-c { width: 38px; font-size: 1.15rem; }

  /* ================= Daily 2048 ================= */
  :root { --g2-board: #cfc3ad; --g2-cell: #e3d9c6; --g2-2: #f6f0e3; --g2-4: #efe2c6; --g2-8: #f0bf8c; --g2-16: #ec9f6b; --g2-32: #e57f59; --g2-64: #d85a3c; --g2-128: #edd27e; --g2-256: #e9c85f; --g2-512: #e2bb44; --g2-1024: #d6a92c; --g2-2048: #b3261e; --g2-ink: #3b342c; --g2-gold-ink: #4a3410; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g2-board: #2e2a24; --g2-cell: #3a352e; --g2-2: #5a5247; --g2-4: #6b5f4d; --g2-8: #a8693d; --g2-16: #b9603a; --g2-32: #c35437; --g2-64: #cf4430; --g2-128: #b8973b; --g2-256: #c6a23a; --g2-512: #d4ad38; --g2-1024: #e0b934; --g2-2048: #e0533f; --g2-ink: #f3ece2; --g2-gold-ink: #1b1a17; } }
  :root[data-theme="dark"] { --g2-board: #2e2a24; --g2-cell: #3a352e; --g2-2: #5a5247; --g2-4: #6b5f4d; --g2-8: #a8693d; --g2-16: #b9603a; --g2-32: #c35437; --g2-64: #cf4430; --g2-128: #b8973b; --g2-256: #c6a23a; --g2-512: #d4ad38; --g2-1024: #e0b934; --g2-2048: #e0533f; --g2-ink: #f3ece2; --g2-gold-ink: #1b1a17; }
  .g2, .sp { display: flex; flex-direction: column; gap: 12px; }
  .g2-bar { display: flex; justify-content: center; gap: 22px; font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .g2-bar b { display: block; text-align: center; font-size: 1.25rem; letter-spacing: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
  .g2-board { --gap: 2.4cqw; position: relative; width: min(100%, 420px, calc(100vh - 330px)); min-width: 270px; aspect-ratio: 1; margin: 0 auto; background: var(--g2-board); border-radius: 6px; container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
  .g2-board:focus-visible { box-shadow: 0 0 0 2px var(--red); }
  .g2-cell, .g2-board .g2-t { position: absolute; width: calc((100cqw - 5 * var(--gap)) / 4); height: calc((100cqw - 5 * var(--gap)) / 4); left: calc(var(--gap) + var(--c) * ((100cqw - 5 * var(--gap)) / 4 + var(--gap))); top: calc(var(--gap) + var(--r) * ((100cqw - 5 * var(--gap)) / 4 + var(--gap))); border-radius: 4px; }
  .g2-cell { background: var(--g2-cell); }
  .g2-t { display: grid; place-items: center; font-family: 'Libre Franklin', sans-serif; font-weight: 800; color: var(--g2-ink); background: var(--g2-2); font-size: calc(100cqw / 4 * (var(--len) > 3 ? 0.3 : var(--len) > 2 ? 0.36 : 0.44)); font-variant-numeric: tabular-nums; }
  .g2-board .g2-t { transition: left 0.11s ease, top 0.11s ease; z-index: 1; }
  .g2-board .g2-t { font-size: calc(100cqw / 4 * 0.42); }
  .g2-board .g2-t[style*="--len: 3"], .g2-board .g2-t[style*="--len:3"] { font-size: calc(100cqw / 4 * 0.34); }
  .g2-board .g2-t[style*="--len: 4"], .g2-board .g2-t[style*="--len:4"] { font-size: calc(100cqw / 4 * 0.28); }
  .g2-t.v4 { background: var(--g2-4); } .g2-t.v8 { background: var(--g2-8); color: #fff; } .g2-t.v16 { background: var(--g2-16); color: #fff; } .g2-t.v32 { background: var(--g2-32); color: #fff; }
  .g2-t.v64 { background: var(--g2-64); color: #fff; } .g2-t.v128 { background: var(--g2-128); color: #fff; } .g2-t.v256 { background: var(--g2-256); color: #fff; } .g2-t.v512 { background: var(--g2-512); color: #fff; }
  .g2-t.v1024, .g2-t.v2048, .g2-t.v4096 { background: var(--g2-1024); color: #fff; }
  .g2-t.v128, .g2-t.v256, .g2-t.v512, .g2-t.v1024 { color: var(--g2-gold-ink); }
  .g2-t.goal { background: var(--g2-2048); color: #fff; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--g2-2048); }
  .g2-t.gone { z-index: 0; }
  .g2-t.born { animation: g2-born 0.2s ease 0.08s backwards; }
  .g2-t.merged { animation: g2-merge 0.2s ease 0.1s; z-index: 2; }
  @keyframes g2-born { from { transform: scale(0); } to { transform: scale(1); } }
  @keyframes g2-merge { 0% { transform: scale(1); } 50% { transform: scale(1.14); } 100% { transform: scale(1); } }
  .g2-board.nudge { animation: g2-nudge 0.18s ease; }
  @keyframes g2-nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
  .g2-hint, .sp-hint { margin: -4px 0 0; }
  .g2 .bs-tools, .sp .bs-tools { width: min(100%, 420px); }
  .g2.done .g2-tools, .g2.done .g2-hint, .sp.done .sp-tools, .sp.done .sp-hint { display: none; }
  .g2-ex { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; }
  .g2-ex .g2-t { position: static; width: 44px; height: 44px; border-radius: 4px; font-size: 1.2rem; }
  .g2-ex i { font-style: normal; font-size: 1.2rem; color: var(--ink-2); }

  /* ================= Sliding Puzzle ================= */
  .sp-board { --gap: 1.6cqw; position: relative; width: min(100%, 420px, calc(100vh - 330px)); min-width: 260px; aspect-ratio: 1; margin: 0 auto; border: 2.5px solid var(--rule); background: var(--paper-2); container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; }
  .sp-t { --size: calc((100cqw - (var(--n) + 1) * var(--gap)) / var(--n)); appearance: none; border: 1.5px solid var(--ink); position: absolute; width: var(--size); height: var(--size);
    left: calc(var(--gap) + var(--c) * (var(--size) + var(--gap))); top: calc(var(--gap) + var(--r) * (var(--size) + var(--gap)));
    background: var(--paper); color: var(--ink); border-radius: 3px; cursor: pointer; display: grid; place-items: center; padding: 0;
    font-family: 'Playfair Display', serif; font-weight: 900; font-size: calc(var(--size) * 0.46); box-shadow: 0 2px 0 var(--ink);
    transition: left 0.12s ease, top 0.12s ease, background-color 0.2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .sp-t.home { background: var(--paper-3); }
  .sp-t:disabled { cursor: default; color: var(--ink); }
  .sp.done .sp-t { background: var(--ink); color: var(--paper); box-shadow: 0 2px 0 var(--red); }
  .sp-board.peek .sp-t { left: calc(var(--gap) + var(--hc) * (var(--size) + var(--gap))); top: calc(var(--gap) + var(--hr) * (var(--size) + var(--gap))); background: var(--sel-soft); }
  .sp-t.nope { animation: g2-nudge 0.18s ease; }
  .sp-ex { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; justify-content: center; margin: 10px 0; }
  .sp-ex span, .sp-ex i { height: 40px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 3px; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.1rem; background: var(--paper-3); }
  .sp-ex i { border-style: dashed; background: transparent; }

  /* ================= Word Guess: the press ================= */
  .wp { gap: 12px; width: 100%; }
  .wp .fp-head { width: 100%; max-width: 460px; }
  .wp-count { font-family: 'Libre Franklin', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
  .wp-pick { width: 100%; max-width: 460px; display: flex; align-items: stretch; gap: 8px; }
  .wp-pick .tierbar { flex: 1; width: auto; margin: 0; }
  .wp-pick .tier { min-height: 34px; font-size: 0.66rem; letter-spacing: 0.06em; padding: 0 2px; }
  .wp-pick .tier small { font-weight: 600; letter-spacing: 0.04em; opacity: 0.65; margin-left: 3px; }
  .wp-chips { display: flex; align-items: center; justify-content: center; gap: 4px; }
  .wp-pick .wp-chip { min-width: 34px; height: 34px; font-size: 0.95rem; }
  .wp-head { width: 100%; max-width: 460px; display: flex; justify-content: space-between; align-items: baseline; margin: -4px 0 -2px; }
  /* phones and narrow windows: the side column dissolves and its contents sit above the board as before */
  .wp-side { display: contents; }
  /* desktops: word length, level and the tries count move to a column on the left, so the height they took
     goes to the letter sheets instead. A matching empty column on the right keeps the board centered. */
  @media (min-width: 900px) and (min-height: 560px) {
    .paper:has(.wp) { max-width: 960px; }
    .wp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px) minmax(0, 1fr); column-gap: 32px; row-gap: 12px; align-items: start; justify-items: center; }
    .wp > * { grid-column: 2; }
    .wp > .wp-side { display: flex; flex-direction: column; gap: 16px; grid-column: 1; grid-row: 1 / span 6; justify-self: end; width: 196px; padding-top: 2px; }
    .wp-side .wp-pick { flex-direction: column; gap: 10px; max-width: none; }
    .wp-side .wp-chips { justify-content: space-between; }
    .wp-side .wp-pick .wp-chip { flex: 1; height: 40px; font-size: 1.1rem; }
    .wp-side .wp-pick .tierbar { grid-template-columns: 1fr; }
    .wp-side .wp-pick .tier { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 0.72rem; }
    .wp-side .wp-pick .tier + .tier { border-left: 0; border-top: 1.5px solid var(--ink); }
    .wp-side .wp-head { flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
    .wp-side .wp-now { font-size: 1.15rem; }
  }
  .wp-now { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 700; font-size: 1rem; }
  @media (max-width: 420px) { .wp-pick .tier small { display: none; } }
  .wp-chips > span { font-family: 'Libre Franklin', sans-serif; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-right: 4px; }
  .wp-chip { appearance: none; min-width: 42px; height: 36px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); border-radius: 2px; cursor: pointer; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.05rem; position: relative; -webkit-tap-highlight-color: transparent; }
  .wp-chip.on { background: var(--ink); color: var(--paper); }
  .wp-chip i { position: absolute; top: -7px; right: -6px; font-style: normal; font-family: 'Libre Franklin', sans-serif; font-size: 0.62rem; font-weight: 800; background: var(--paper); color: var(--good); border: 1px solid var(--good); border-radius: 50%; width: 15px; height: 15px; display: grid; place-items: center; }
  .wp-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

  /* the sheets: a tiny front page each, with a masthead rule and columns of type under the letter */
  .wp-sheet { position: relative; aspect-ratio: 5 / 6; background: var(--paper); border: 1px solid var(--ink-3); box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.14);
    transform: rotate(var(--tilt, 0deg)); display: grid; place-items: center; container-type: inline-size; color: var(--ink); }
  .wp-sheet::before { content: ""; position: absolute; top: 5%; left: 11%; right: 11%; height: 5%; border-top: 2px solid currentColor; border-bottom: 1px solid currentColor; opacity: 0.55; }
  .wp-sheet::after { content: ""; position: absolute; bottom: 5%; left: 11%; right: 11%; height: 7%; background: repeating-linear-gradient(90deg, currentColor 0 28%, transparent 28% 36%); opacity: 0.16; }
  .wp-sheet b { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 70cqw; line-height: 1; text-transform: uppercase; margin-top: 4%; text-decoration-thickness: 0.11em; text-underline-offset: 0.1em; }
  .wp-sheet.empty, .wp-sheet.slot { background: transparent; border: 1.5px dashed var(--faint); box-shadow: none; transform: none; }
  .wp-sheet.empty::before, .wp-sheet.empty::after, .wp-sheet.slot::before, .wp-sheet.slot::after { display: none; }
  .wp-sheet.hit { background: var(--ink) linear-gradient(225deg, var(--red) 0 13%, transparent 13%); border-color: var(--ink); color: var(--paper); }
  .wp-sheet.hit::after { opacity: 0.25; }
  .wp-sheet.near b { text-decoration: underline; text-decoration-color: var(--red); }
  .wp-sheet.near { border-color: var(--red); }
  .wp-sheet.miss { color: var(--ink-2); border-color: var(--faint); box-shadow: none; }
  /* "in the word, somewhere else" has to read at a glance: a red-tinted sheet with a full red border and a heavy red
     underline, while letters that aren't in the word fade back so the two can't be confused */
  .wp-sheet.near { background: color-mix(in srgb, var(--red) 11%, var(--paper)); border: 2px solid var(--red); }
  .wp-sheet.near b { text-decoration-thickness: 0.15em; }
  .wp-sheet.miss { color: var(--ink-3); background: var(--paper-2); }
  .wp-sheet.miss b { opacity: 0.8; }
  .wp .kb .key.near { background: color-mix(in srgb, var(--red) 11%, var(--paper-2)); border-color: var(--red); }
  .wp .kb .key.miss { text-decoration: none; }
  .wp-sheet.drop { animation: wp-drop 0.2s ease; }
  .wp-sheet.hop { animation: hop 0.5s ease both; animation-delay: var(--d, 0ms); }
  .wp-sheet.fresh { animation: wp-inked 0.3s ease; }
  @keyframes wp-drop { from { transform: translateY(-14px) rotate(var(--tilt, 0deg)); opacity: 0; } to { transform: rotate(var(--tilt, 0deg)); opacity: 1; } }
  @keyframes wp-inked { 50% { filter: brightness(1.3); } }

  .wp-proofs { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 6px; }
  .wp-row { display: grid; grid-template-columns: repeat(var(--n), var(--sw, 44px)); gap: 5px; justify-content: center; height: var(--rh, 53px); }
  .wp-row .wp-sheet { width: var(--sw, 44px); height: var(--rh, 53px); aspect-ratio: auto; }
  .wp-row.blank { position: relative; }
  /* rows still to print: blank newsprint squares, pressed lightly into the page; the next row to print is outlined */
  .wp-row.blank .wp-sheet.empty { border: 0; border-radius: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
  .wp-row.blank.next .wp-sheet.empty { background: transparent; box-shadow: none; border: 1.5px solid var(--ink-3); }
  .wp-proofs { gap: 5px !important; }

  /* the stage: sheets wait on the belt, ride into the press, and come out the other side */
  .wp-stage { position: relative; width: 100%; max-width: 460px; height: 104px; display: grid; grid-template-columns: 1fr 80px 26px; align-items: end; }
  .wp-feed { grid-column: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 40px)); justify-content: end; gap: 4px; padding: 0 6px 13px 0; position: relative; z-index: 1; }
  .wp-row.waiting .wp-sheet.empty { border-color: transparent; }
  .wp-feed.shake { animation: shake 0.4s ease; }
  .wp-press { grid-column: 2; position: relative; z-index: 3; height: 104px; }
  .wp .kb .key { height: 48px; }
  @media (max-height: 880px) { .wp .kb .key { height: 44px; } .wp-stage, .wp-press { height: 84px; } .wp { gap: 10px; } }
  @media (max-height: 720px) { .wp .kb .key { height: 40px; } .wp .kb { gap: 5px; } .wp-stage, .wp-press { height: 72px; } .wp { gap: 8px; } }
  .wp-press-art { width: 100%; height: 100%; display: block; }
  .wp-ink { fill: var(--ink); } .wp-line { stroke: var(--ink); fill: none; }
  .wp-plate { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 9px; letter-spacing: 2px; fill: var(--paper); }
  .wp-belt { position: absolute; left: 0; right: 0; bottom: 4px; height: 8px; border-radius: 4px; z-index: 0;
    background: repeating-linear-gradient(90deg, var(--ink-2) 0 10px, var(--ink-3) 10px 20px); opacity: 0.75; }
  .wp-stage.running .wp-belt { animation: wp-belt 0.45s linear infinite; }
  .wp-stage.running .wp-roll { animation: wp-spin 0.6s linear infinite; }
  .wp-stage.running .wp-roll-r { animation-direction: reverse; }
  @keyframes wp-belt { to { background-position: 20px 0; } }
  @keyframes wp-spin { to { transform: rotate(360deg); } }
  .wp-fly { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
  .wp-fly .wp-sheet { position: fixed; margin: 0; transform-origin: top left; }
  .wp.done .wp-stage { display: none; }
  .wp-ex { display: grid; grid-template-columns: repeat(5, 40px); gap: 5px; justify-content: center; margin: 12px 0; }
  .wp-figs { grid-template-columns: repeat(3, 1fr) !important; }
  .wp-figs b { font-size: 1.2rem; }

  /* ================= Jigsaw ================= */
  .jg { display: flex; flex-direction: column; gap: 10px; }
  .jg-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; color: var(--ink-2); }
  .jg-bar b { color: var(--ink); font-size: 1rem; }
  .jg-title { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 700; color: var(--ink); font-size: 1rem; }
  .jg-table { position: relative; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
  .jg-board { position: absolute; top: 0; border: 2.5px solid var(--rule); box-sizing: content-box; margin: -2.5px; background: var(--paper-2) center / 100% 100% no-repeat;
    background-image: none; box-shadow: inset 0 0 0 1px var(--faint); }
  .jg-board::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
    background: linear-gradient(var(--faint) 1px, transparent 1px) 0 0 / calc(100% / var(--jn, 4)) calc(100% / var(--jn, 4)), linear-gradient(90deg, var(--faint) 1px, transparent 1px) 0 0 / calc(100% / var(--jn, 4)) calc(100% / var(--jn, 4)); }
  .jg-board.ghost { background-blend-mode: normal; }
  .jg-board.ghost::before { content: ""; position: absolute; inset: 0; background: var(--paper-2); opacity: 0.78; }
  .jg-tray { position: absolute; border: 1.5px dashed var(--faint); border-radius: 4px; background: color-mix(in srgb, var(--paper-3) 45%, transparent); }
  .jg-tray span { position: absolute; left: 8px; top: 6px; font-family: 'Libre Franklin', sans-serif; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
  .jg-p { position: absolute; left: 0; top: 0; z-index: 2; cursor: grab; filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, 0.28)); will-change: transform; }
  .jg-p.lift { cursor: grabbing; filter: drop-shadow(3px 8px 6px rgba(0, 0, 0, 0.35)); }
  .jg-p.set { z-index: 1 !important; filter: none; cursor: default; pointer-events: none; }
  .jg-p.glide { transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.3, 1); }
  .jg-p.snap { animation: jg-snap 0.28s ease; }
  @keyframes jg-snap { 40% { filter: drop-shadow(0 0 6px var(--near-bg)) brightness(1.15); } }
  .jg-board.whole { animation: jg-whole 0.9s ease; }
  @keyframes jg-whole { 40% { box-shadow: 0 0 0 6px var(--near-bg); } }
  .jg-tools { grid-template-columns: repeat(4, 1fr); }
  .jg .bs-tools { width: min(100%, 520px); }
  .jg .bs-tools .btn .sw { display: inline-block; min-width: 2.2em; }
  .jg.done .jg-tools, .jg.done .jg-tray { display: none; }
  .jg-table.wide .jg-tray span { top: 8px; }

  /* ================= Easy / Medium / Hard picker ================= */
  .tierbar { display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 420px); margin: 0 auto; border: 1.5px solid var(--ink); border-radius: 2px; }
  .tier { appearance: none; border: 0; background: transparent; color: var(--ink); min-height: 40px; cursor: pointer; font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; -webkit-tap-highlight-color: transparent; }
  .tier + .tier { border-left: 1.5px solid var(--ink); }
  .tier.on { background: var(--ink); color: var(--paper); }
  .tier i { font-style: normal; color: var(--good); font-weight: 800; margin-left: 2px; }
  .tier.on i { color: inherit; }
  .tier.out i { color: var(--ink-3); }
  .tier:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  .story .status .tier-tag { font-family: 'Libre Franklin', sans-serif; font-weight: 800; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); border: 1px solid currentColor; border-radius: 2px; padding: 0 4px; white-space: nowrap; }
  .story .status .tier-tag.won { color: var(--paper); background: var(--red); border-color: var(--red); }
  .story .status .tier-tag.out { color: var(--paper); background: var(--ink-3); border-color: var(--ink-3); }
  .story .status .tier-tags { display: inline-flex; gap: 4px; margin-right: 6px; vertical-align: 1px; }
  .story .status .tier-tags .tier-tag { margin: 0; }

  /* ================= turning the page: a corner curl ================= */
  .turn { position: fixed; top: 0; height: 100%; z-index: 15; pointer-events: none; overflow: hidden; }
  .turn .t-page, .turn .t-half, .turn .t-backside, .turn .t-curl, .turn .t-crease, .turn .t-lift { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
  .turn .t-page { overflow: hidden; background: var(--grain), var(--paper); background-color: var(--paper); }
  .turn .t-half { overflow: hidden; transform-origin: 0 0; will-change: transform; }
  .turn .t-in { transform-origin: 0 0; will-change: transform; }
  .turn .t-backside { inset: 0; background: var(--paper-2); opacity: 0.88; }
  .turn .t-curl { transform-origin: 0 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.28) 7%, rgba(255, 255, 255, 0.08) 22%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.1)); }
  .turn .t-crease { transform-origin: 0 0; background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16)); }
  .turn .t-lift { transform-origin: 0 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0)); }
  :root[data-theme="dark"] .turn .t-curl { background: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.12) 7%, rgba(255, 255, 255, 0.03) 22%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.2)); }
  .turn .snap { position: absolute; left: 0; margin: 0; z-index: 0; }
  .turn .t-page { isolation: isolate; }
  .turn .t-backside, .turn .t-crease { z-index: 1; }
  .turn .t-curl { z-index: 2; }
  .turn .snap * { animation: none !important; transition: none !important; }
  /* the copy is only a picture: a scrolling box in it (the section tabs) gets its own layer in Chrome and
     escapes the turn's rotated clipping, drawing a dark line past the fold. clip keeps it flat. */
  .turn .snap .desks { overflow: clip !important; }
  /* ================= Chess Problem ================= */
  .ch { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .ch > .fp-head { align-self: stretch; }
  .ch-task { margin: 0; font-family: 'Libre Franklin', sans-serif; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); min-height: 1.2em; }
  .ch-task b { color: var(--ink); }
  .ch.done .ch-task { color: var(--red); }
  .ch-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(100%, 440px, calc(100vh - 330px)); min-width: 260px; aspect-ratio: 1; border: 2.5px solid #1d1b18; outline: 1px solid var(--rule); outline-offset: 3px; user-select: none; -webkit-user-select: none; background: #f2ece0; }
  .ch-sq { position: relative; appearance: none; border: 0; padding: 0; margin: 0; aspect-ratio: 1; background: #f6f1e6; cursor: pointer; display: block; touch-action: manipulation; -webkit-tap-highlight-color: transparent; color: #1d1b18; }
  .ch-sq.dk { background-color: #a8a093; }
  .ch-sq.mine { touch-action: none; }
  .ch-sq:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; z-index: 2; }
  .ch-pc { position: absolute; inset: 3%; display: block; pointer-events: none; z-index: 1; }
  .ch-pc svg { width: 100%; height: 100%; display: block; }
  .ch-sq.last::before, .ch-sq.sel::before, .ch-sq.chk::before, .ch-sq.bad::before, .ch-sq.hint::before, .ch-sq.hint-t::before { content: ""; position: absolute; inset: 0; }
  .ch-sq.last::before { background: rgba(214, 170, 40, 0.36); }
  .ch-sq.sel::before { background: rgba(214, 170, 40, 0.62); }
  .ch-sq.chk::before { background: radial-gradient(circle, rgba(179, 38, 30, 0.8) 0, rgba(179, 38, 30, 0.4) 45%, transparent 72%); }
  .ch-sq.bad::before { background: rgba(179, 38, 30, 0.5); }
  .ch-sq.hint::before { box-shadow: inset 0 0 0 3px #b3261e; animation: ch-pulse 1.1s ease-in-out infinite; }
  .ch-sq.hint-t::before { box-shadow: inset 0 0 0 3px #b3261e; background: rgba(179, 38, 30, 0.14); }
  @keyframes ch-pulse { 50% { box-shadow: inset 0 0 0 5px rgba(179, 38, 30, 0.55); } }
  .ch-sq.tgt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 28%; height: 28%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(29, 27, 24, 0.42); z-index: 2; pointer-events: none; }
  .ch-sq.cap::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 3px solid rgba(29, 27, 24, 0.5); z-index: 2; pointer-events: none; }
  .ch-sq.lift .ch-pc { opacity: 0.25; }
  .ch-rk, .ch-fl { position: absolute; z-index: 3; font: 800 9px/1 'Libre Franklin', sans-serif; color: #1d1b18; background: #f2ece0; padding: 1px 2px; border-radius: 2px; pointer-events: none; opacity: 0.85; }
  .ch-rk { left: 1px; top: 1px; }
  .ch-fl { right: 1px; bottom: 1px; }
  .ch-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3)); }
  .ch-ghost svg { width: 100%; height: 100%; display: block; }
  .ch.done .ch-sq { cursor: default; }
  .ch-moves { margin: 0; min-height: 1.5em; max-width: 440px; font-family: 'Newsreader', Georgia, serif; font-size: 1.08rem; line-height: 1.4; text-align: center; word-spacing: 0.08em; }
  .ch-moves b { font-family: 'Libre Franklin', sans-serif; font-size: 0.78rem; margin-left: 6px; }
  .ch-moves b:first-child { margin-left: 0; }
  .ch-none { color: var(--ink-3); font-style: italic; font-size: 0.92rem; }
  .ch-mini { width: min(100%, 220px); min-width: 0; margin: 12px auto; outline: none; border-width: 2px; }
  .ch-mini .ch-sq { cursor: default; }
  .ch-sol { text-align: center; font-family: 'Newsreader', Georgia, serif; font-size: 1.08rem; }
  /* ---- small phones ---- */
  /* short screens (iPhone SE/8 and browsers with toolbars): while playing, drop the nameplate and keep just the dateline, so the board and keys fit */
  @media (max-height: 740px) and (max-width: 560px) {
    .paper.in-game .nameplate, .paper.in-game .ears { display: none; }
    .paper.in-game main { padding-top: 6px; }
    .paper.in-game .gbar { padding-bottom: 5px; margin-bottom: 8px; }
  }
  /* narrow phones (320–400px wide) */
  @media (max-width: 400px) {
    .ear .vol { display: none; }
    .ear.motto { font-size: 0.74rem; }
    .desks a { font-size: 0.6rem; letter-spacing: 0.03em; padding-inline: 2px; }
    .gbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
    .gbar .tools { gap: 6px; }
    .gbar h1 { font-size: clamp(1.05rem, 5.6vw, 1.4rem); overflow: hidden; text-overflow: ellipsis; }
    .cw-tools { gap: 4px; }
    .cw-tool { padding: 0 8px; font-size: 0.66rem; letter-spacing: 0.04em; }
    .cw-top { gap: 6px; }
    .cw-tools { min-width: 0; flex: 0 1 auto; }
    .cw-tool { flex: 1 1 auto; justify-content: center; padding: 0 6px; font-size: 0.62rem; }
    .jg-tools { grid-template-columns: repeat(2, 1fr); }
  }
  /* very short screens (iPhone SE in Safari with its toolbars, about 550px tall): trim the chrome above and below each board */
  @media (max-height: 620px) and (max-width: 560px) {
    .paper.in-game .tier { min-height: 34px; }
    .paper.in-game .fp-head h2 { font-size: 1.2rem; }
    .paper.in-game .key { height: 44px; }
    .paper.in-game .kb { gap: 5px; }
    .paper.in-game .cw-play { min-width: 210px; gap: 6px; }
    .paper.in-game .cw-bar { min-height: 42px; }
    .paper.in-game .cw { gap: 8px; }
    .paper.in-game .cw-k { height: 42px; }
    .paper.in-game .cw-kb { gap: 5px; }
    .paper.in-game .bs-grid, .paper.in-game .kk-grid, .paper.in-game .cs-grid { min-width: 220px; width: min(100%, 460px, calc(100vh - 310px)); }
    .paper.in-game .ch-board { min-width: 220px; width: min(100%, 440px, calc(100vh - 300px)); }
    .paper.in-game .wp-stage, .paper.in-game .wp-press { height: 70px; }
    .paper.in-game .wp .kb .key { height: 40px; }
    .paper.in-game .cw-tool { min-height: 36px; }
    .paper.in-game .cw-play { min-width: 190px; }
    .paper.in-game .jb-row { min-height: 44px; padding-block: 4px; }
    .paper.in-game .jb-slot { height: 32px; }
  }
