/* One narrow centered column: header, square cover, six guess rows, one input.
   The album art is the only color on the page. */
:root {
  --bg: #F4F4F1; --fg: #151514; --muted: #83837D; --line: #D9D9D3; --soft: #E5E5E0; --raise: #FFFFFF;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121211; --fg: #ECECE7; --muted: #7E7E78; --line: #2C2C29; --soft: #222220; --raise: #1B1B19; color-scheme: dark; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.app { max-width: 440px; margin: 0 auto; padding-block: 20px 28px; display: flex; flex-direction: column; gap: 22px; }
.app[hidden] { display: none; }
.loading { position: fixed; left: 0; right: 0; top: 42%; text-align: center; color: var(--muted); margin: 0; animation: late-in .2s 1s both; }
.loading.err { animation: none; }
@keyframes late-in { from { opacity: 0; } }
/* Hidden until the cover is ready (see reveal() in app.js) */
.app { transition: opacity .25s ease; }
body.booting .app { opacity: 0; }

header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mark { display: flex; align-items: baseline; gap: 10px; }
/* Logo: a 3x3 cover, light to dark like the clue tiles (follows the theme) */
.logo { width: 18px; height: 18px; flex: none; align-self: center; }
.logo .g0 { fill: #F3D9E1; }
.logo .g1 { fill: #E7A9BD; }
.logo .g2 { fill: #D2718F; }
.logo .g3 { fill: #9E3F5E; }
.logo .g4 { fill: #4E1A2D; }
.word { font-weight: 600; font-size: 19px; letter-spacing: -0.035em; }
.num { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.hright { display: flex; align-items: center; gap: 16px; }
.dots { display: flex; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line); }
.dot.used { background: var(--muted); border-color: var(--muted); }
.dot.now { border-color: var(--fg); }
.dot.win { background: var(--fg); border-color: var(--fg); }
/* Profile square: your latest solved cover as a 3x3, empty until your first solve */
.me { appearance: none; width: 20px; height: 20px; padding: 0; border: 0; background: transparent; cursor: pointer; display: block; }
.av { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
.av i { display: block; }
.av.portrait { display: block; } .av.portrait img { width: 100%; height: 100%; display: block; image-rendering: pixelated; object-fit: cover; }
.av.blank { background: var(--fg); }
/* Profile panel */
.who { display: flex; align-items: flex-start; gap: 22px; }
.bigav { width: 76px; height: 76px; flex: none; }
.avcol { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.linkish { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--fg); }
.linkish:focus { outline: none; }
.linkish:focus-visible { outline: none; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pstats div { display: flex; flex-direction: column; gap: 4px; }
.pstats span, .phead span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; color: var(--muted); }
.pstats b { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* solves by round: thin bars, today's in ink */
.dist { display: flex; flex-direction: column; gap: 6px; }
.drow { display: grid; grid-template-columns: 12px 1fr 24px; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drow .dc { text-align: right; }
.dtrack { height: 8px; }
.dtrack i { display: block; height: 100%; min-width: 2px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.drow.now { color: var(--fg); } .drow.now .dtrack i { background: var(--fg); }
.phead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: -6px; }
.dropback { position: fixed; inset: 0; z-index: 19; }
.drop { position: fixed; z-index: 20; top: calc(54px + env(safe-area-inset-top, 0px)); right: max(16px, calc((100vw - 440px) / 2)); width: min(340px, calc(100vw - 32px)); max-height: calc(100svh - 74px); overflow: auto; background: var(--bg); border: 0; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -24px rgba(0, 0, 0, .28); padding: 24px; display: flex; flex-direction: column; gap: 18px; outline: none; animation: drop-in .18s ease-out; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.streak { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.streak b { font-size: 60px; font-weight: 600; letter-spacing: -0.05em; line-height: .85; font-variant-numeric: tabular-nums; }
.streak span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: lowercase; color: var(--muted); }
.drop .nums { grid-template-columns: repeat(3, 1fr); }
.drop .nums b { font-size: 20px; }
.label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .08em; text-transform: lowercase; }
.mwrap { max-height: 252px; overflow: auto; }
.mosaic { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mt { appearance: none; padding: 0; border: 0; background: none; aspect-ratio: 1 / 1; cursor: pointer; display: block; }
.mt img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.mt.empty { box-shadow: inset 0 0 0 1px var(--line); }
.mt.today { box-shadow: inset 0 0 0 1px var(--fg); }
.mt.on { outline: 1.5px solid var(--fg); outline-offset: 2px; }
.mt:focus { outline: none; }
.mt.on:focus { outline: 1.5px solid var(--fg); }
.grad { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; }
.grad i { display: block; }
.minfo { font-size: 12px; color: var(--muted); margin-top: -6px; }
.minfo:empty { display: none; }
.iconbtn { appearance: none; border: 0; background: none; color: var(--fg); padding: 6px; margin: -6px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
button:focus-visible, input:focus-visible, a:focus-visible, .tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* The cover never takes more than about half the screen height, so the clues and input stay close. */
figure { margin: 0 auto; width: min(100%, 52svh); min-width: min(100%, 260px); display: flex; flex-direction: column; gap: 10px; }
.frame { width: 100%; max-width: 100%; aspect-ratio: 1 / 1; background: var(--soft); position: relative; }
/* Finished: a label on the cover says how it went */
.badge { position: absolute; left: 10px; bottom: 10px; background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: lowercase; padding: 6px 9px; animation: badge-in .35s cubic-bezier(.2, .8, .3, 1) both; }
/* Finished: rows that were only skips don't say anything, so they go (the dots still show tries used) */
body.done .row.skiprow, body.done .row.empty { display: none; }
body.done .board:not(:has(.row:not(.skiprow):not(.empty))) { display: none; }
@keyframes badge-in { from { opacity: 0; transform: translateY(6px); } }
#cover { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; transition: opacity .18s ease; }
#cover.fade { opacity: 0; }
#cover.clear { image-rendering: pixelated; } /* the reveal is pixel art too (22 tiles across) */
.frame .sharpen { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.soon { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.soon b { font-family: var(--mono); font-weight: 500; font-size: clamp(32px, 11vw, 52px); letter-spacing: -0.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.cap { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: lowercase; }

.board { display: flex; flex-direction: column; gap: 6px; }
.heads, .row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, clamp(54px, 18vw, 68px)); gap: 6px; align-items: center; }
.heads { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .08em; text-transform: lowercase; }
.heads span { text-align: center; }
.heads span:first-child { text-align: left; }
.guess { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gt { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idx { font-family: var(--mono); font-size: 11px; color: var(--line); }
.tile { height: 40px; display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: -0.02em; border: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tile.skip { border-style: dashed; }
.tile.clue { cursor: pointer; position: relative; }
/* Small corner mark so clue tiles read as tappable */
.tile.clue::after { content: ""; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; opacity: .45; }
.tile.clue:hover::after, .tile.clue.on::after { opacity: .9; }
.tile.l0 { background: color-mix(in oklab, var(--fg) 6%, var(--soft)); border-color: transparent; color: var(--fg); }
.tile.l1 { background: color-mix(in oklab, var(--fg) 38%, var(--soft)); border-color: transparent; color: var(--fg); }
.tile.l2 { background: color-mix(in oklab, var(--fg) 68%, var(--soft)); border-color: transparent; color: var(--bg); }
.tile.l3 { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.tile.dash { color: var(--muted); }
.tile.on { outline: 2px solid var(--fg); outline-offset: 2px; }
/* New row: the tile flips; a blank face covers it for the first half, so the color shows mid-flip */
.tile.flip { position: relative; overflow: visible; animation: flip .56s ease-in-out both; }
.tile.flip::before { content: ""; position: absolute; inset: -2px; z-index: 2; background: var(--bg); border: 2px solid var(--bg); box-shadow: inset 0 0 0 1px var(--line); animation: flip-face .56s both; animation-delay: inherit; }
.tile.flip.bounce { animation-name: flip, bounce; animation-duration: .56s, .42s; animation-timing-function: ease-in-out, cubic-bezier(.3, 1.6, .5, 1); }
@keyframes flip { 0% { transform: perspective(400px) rotateX(0); } 50% { transform: perspective(400px) rotateX(90deg); } 100% { transform: perspective(400px) rotateX(0); } }
@keyframes flip-face { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes bounce { 0%, 100% { transform: none; } 45% { transform: translateY(-7px); } }
.guess.pop { animation: pop-in .35s ease-out both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } }
.detail { min-height: 16px; font-size: 12px; color: var(--fg); text-align: right; }

/* The guess input stays docked at the bottom of the screen while playing. */
#bottom.dock { position: sticky; bottom: 0; z-index: 4; background: var(--bg); margin-inline: -4px; padding: 10px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
.entry { position: relative; display: flex; flex-direction: column; gap: 8px; }
.field { display: flex; align-items: center; gap: 14px; border-bottom: 1.5px solid var(--fg); }
#q { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; padding: 10px 0; outline: none; }
#q::placeholder { color: var(--muted); }
.chev { appearance: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px 4px; display: grid; place-items: center; }
.chev:hover { color: var(--fg); }
.textbtn { appearance: none; background: none; border: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; padding: 6px 0; }
.textbtn:hover { color: var(--fg); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.hint.warn { color: var(--fg); }
.list { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--raise); border: 1px solid var(--line); list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow: auto; box-shadow: 0 14px 34px rgba(0, 0, 0, .10); z-index: 5; }
.opt { padding: 9px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; }
.opt span:first-child { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt span:last-child { font-size: 12px; color: var(--muted); white-space: nowrap; }
.opt[aria-selected="true"] { background: var(--soft); }

.result { display: flex; flex-direction: column; gap: 18px; }
.answer.nothumb { grid-template-columns: minmax(0, 1fr); }
.donebar { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid var(--fg); padding: 9px 0 10px; animation: pop-in .35s ease-out both; }
.donebar b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.donebar span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.answer { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; }
.answer img { width: 88px; height: 88px; display: block; }
.verdict { font-size: 24px; font-weight: 600; letter-spacing: -0.035em; }
.atitle { font-weight: 500; margin-top: 4px; }
.ameta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.crowd { font-size: 13px; color: var(--fg); min-height: 0; }
.crowd:empty { display: none; }
.listen { font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.listen a { color: var(--fg); text-underline-offset: 3px; }
.actions { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
/* Actions are plain clickable text, no buttons */
.btn { appearance: none; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.btn.ghost { font-weight: 400; color: var(--muted); }
.btn:hover, .btn.ghost:hover { color: var(--fg); }
.actions .btn { text-decoration: none; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 0; }
.actions .btn + .btn::before { content: "/"; margin-right: 12px; color: color-mix(in srgb, var(--muted) 55%, transparent); } /* share / past covers */
.app .actions { gap: 12px; }
.next { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
pre.share { margin: 0; font-family: var(--mono); font-size: 12px; background: var(--soft); padding: 10px 12px; white-space: pre-wrap; user-select: all; }

footer { display: flex; justify-content: center; align-items: center; gap: 18px; }
footer .textbtn { font-size: 12px; }
.social { color: var(--muted); display: grid; place-items: center; padding: 4px; margin: -4px; }
.social:hover { color: var(--fg); }

.sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); display: grid; place-items: center; z-index: 20; padding: 16px; }
.panel { background: var(--bg); width: 100%; max-width: 380px; padding: 24px; display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--line); max-height: 90vh; overflow: auto; }
.panel p { margin: 0; line-height: 1.5; color: var(--fg); }
.panel p.small { font-size: 12px; color: var(--muted); }
/* How to play */
.sheet { animation: fade-in .18s ease-out; }
.sheet .panel { animation: rise-in .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.howpanel { gap: 0; padding: 26px 24px 22px; max-width: 400px; }
.howpanel .ph { margin-bottom: 8px; }
.howpanel .ph h2 { font-size: 20px; letter-spacing: -0.035em; }
.hstep { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.hstep:first-of-type { border-top: 0; }
.hno { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; padding-top: 2px; }
.hbody { display: flex; flex-direction: column; gap: 12px; }
.hbody p { line-height: 1.45; }
.hsharp { display: flex; align-items: center; gap: 10px; }
.hpix { width: 52px; height: 52px; display: grid; }
.hpix i { display: block; }
.harrow { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.howto { gap: 6px; }
.howto .row { grid-template-columns: minmax(0, 1fr) repeat(3, 52px); }
.howto .heads { grid-template-columns: minmax(0, 1fr) repeat(3, 52px); }
.howto .tile { height: 34px; }
.hscale { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; color: var(--muted); }
.hscale i.tile { width: 18px; height: 10px; border: 0; }
.hscale span:first-child { margin-right: 4px; }
.hscale span:last-child { margin-left: 4px; }
.hfoot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.hfoot span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: lowercase; color: var(--muted); }
.archive { display: flex; flex-direction: column; }
.arow { appearance: none; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--fg); display: flex; justify-content: space-between; padding: 12px 0; cursor: pointer; text-align: left; }
.arow:disabled { cursor: default; color: var(--muted); }
.arow .astate { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: lowercase; color: var(--muted); }
.arow:not(:disabled):hover .astate { color: var(--fg); }
.ph { display: flex; justify-content: space-between; align-items: center; }
.ph h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nums div { display: flex; flex-direction: column; gap: 2px; }
.nums b { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nums span { font-size: 11px; color: var(--muted); }
.dist { display: flex; flex-direction: column; gap: 5px; }
.bar { display: grid; grid-template-columns: 14px 1fr; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bar div { height: 18px; background: var(--soft); display: flex; justify-content: flex-end; align-items: center; padding-right: 6px; color: var(--fg); min-width: 22px; font-variant-numeric: tabular-nums; }
.bar div.hi { background: var(--fg); color: var(--bg); }

/* Just solved: a card that pops up for a moment */
.winpop { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: color-mix(in oklab, var(--bg) 40%, transparent); animation: fade-in .2s ease-out both; cursor: pointer; }
.winpop.out { opacity: 0; transition: opacity .25s ease; }
.wincard { background: var(--fg); color: var(--bg); padding: 22px 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: win-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.wincard b { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; }
.winlabel, .winsub { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: lowercase; opacity: .7; }
@keyframes win-in { from { opacity: 0; transform: scale(.85); } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); font-size: 13px; padding: 8px 14px; border-radius: 999px; z-index: 30; }

/* Phones: a smaller cover, and smaller still while typing so it stays in view above the album list */
@media (max-width: 600px), (pointer: coarse) {
  figure { width: min(100%, 44svh); transition: width .2s ease; }
  body.typing figure { width: min(100%, 150px) !important; min-width: 0 !important; }
  body.typing .cap { display: none; }
}
/* Phones: everything on one screen. The rows, input and result are compact; the cover takes what's left (see fitScreen). */
@media (max-width: 600px), (pointer: coarse), (max-height: 900px) {
  .app { gap: 12px; padding-block: 12px 10px; min-height: 0; }
  header { margin-bottom: 10px; } /* breathing room between the header and the art */
  .cap { display: none; }
  .board { gap: 4px; }
  .heads, .row { gap: 4px; }
  .tile { height: 34px; font-size: 10px; }
  .guess { gap: 0; line-height: 1.2; }
  .guess .gt { font-size: 13px; }
  .guess .ga { font-size: 11px; }
  body.done .row.empty { display: none; }
  #bottom.dock { padding-top: 4px; }
  .entry { gap: 6px; }
  #q { padding: 8px 0; }
  .result { gap: 10px; }
  .answer { gap: 14px; }
  .verdict { font-size: 20px; }
  .atitle { margin-top: 2px; }
  .listen, .crowd { font-size: 12.5px; }
  .actions { gap: 16px; }
  footer { gap: 16px; }
  .answer { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .answer img { width: 64px; height: 64px; }
}
/* Very short screens: the footer waits until the game is over */
@media (max-height: 600px) {
  body:not(.done) footer { display: none; }
  .answer { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .answer img { width: 44px; height: 44px; }
  .result { gap: 8px; }
  .donebar { padding: 6px 0 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .drop, .sheet, .sheet .panel, .badge, .winpop, .wincard { animation: none; }
  .tile.flip, .tile.flip::before, .guess.pop { animation: none; }
  #cover { transition: none; }
}
@media (max-height: 700px) {
  .howpanel { padding: 20px 20px 16px; }
  .hstep { padding: 10px 0; }
  .hbody { gap: 8px; }
  .hpix { width: 40px; height: 40px; }
  .howto .tile { height: 30px; }
  .hfoot { padding-top: 12px; }
}

/* fine art: the movement timeline */
.tline { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-bottom: 2px; }
.tseg { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; transition: opacity .3s; }
.tseg i { display: block; width: 100%; height: 8px; background: color-mix(in oklab, var(--fg) 55%, var(--soft)); position: relative; }
.tseg i b { position: absolute; left: 50%; top: -5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1.5px var(--fg); }
.tseg span { font-size: 8.5px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tseg small { font-family: var(--mono); font-size: 7.5px; color: var(--muted); }
.tseg.out { opacity: .28; }
.tseg.hit i { background: var(--fg); }
.tile { font-size: 9.5px; }


/* fine art: self-portrait gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.gframe { appearance: none; border: 0; padding: 3px; background: #E9DFCC; box-shadow: inset 0 0 0 1px #C9A97E; aspect-ratio: 1 / 1; position: relative; cursor: pointer; display: grid; place-items: center; }
.gframe img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.gframe.empty { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.gq { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.gcount { position: absolute; right: -4px; bottom: -4px; background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: 9px; padding: 1px 4px; }

/* Computers: the art on the left, the guesses on the right (phones keep the stacked layout) */
@media (min-width: 900px) and (pointer: fine) {
  .app { max-width: 1060px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto 1fr auto auto 1fr auto; grid-template-areas: "head head" ". ." "art board" "art bottom" ". ." "foot foot";
    column-gap: 64px; row-gap: 16px; align-items: start; padding-block: 28px 24px; width: 100%;
    min-height: 100svh; box-sizing: border-box; }
  /* header pinned to the top, footer to the bottom, the game centred in the space between */
  header { grid-area: head; margin-bottom: 20px; }
  /* tall paintings: limit by height too (--ar is the painting's width / height, set by the game) */
  figure { grid-area: art; width: 100%; max-width: min(100%, var(--art, 460px), calc((100svh - 210px) * var(--ar, 1))); min-width: 0; margin: 0 0 0 auto; }
  .board { grid-area: board; }
  #bottom { grid-area: bottom; }
  #bottom.dock { position: static; margin: 0; padding: 0; }
  /* the suggestions open downwards, into the space under the search box, so the guesses stay visible */
  .list { top: calc(100% - 22px); bottom: auto; max-height: min(300px, calc(100svh - 470px)) !important; min-height: 150px; }
  footer { grid-area: foot; margin-top: 8px; }
  .cap { display: flex; }
}

/* Sister game link in the footer: its own 3x3 logo and name */
footer a.sib { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
footer a.sib + a.sib { border-left: 0; padding-left: 0; }
footer a.sib:hover { color: var(--fg); }
footer a.sib .sibl { display: block; }
/* fine art: a few lines about the painting after the game */
.about { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--soft); }
.about p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--fg); }
@media (max-height: 700px) { .about p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } }

/* sister games card (after two past puzzles in a day) */
.sisback { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); display: grid; place-items: center; z-index: 30; padding: 16px; animation: sisfade .18s ease-out; }
.siscard { background: var(--bg); color: var(--fg); width: 100%; max-width: 360px; border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; animation: sisrise .22s cubic-bezier(.2, .8, .3, 1); }
.siscard > b { font-size: 20px; font-weight: 600; letter-spacing: -0.035em; }
.siscard > p { margin: 0; line-height: 1.5; font-size: 14px; }
.sislink { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 12px 0; border-top: 1px solid var(--line); }
.sislink span { display: flex; flex-direction: column; gap: 1px; } .sislink strong { font-weight: 600; letter-spacing: -0.02em; font-size: 15px; } .sislink small { color: var(--muted); font-size: 12.5px; }
.sislink em { font-style: normal; font-size: 12px; color: var(--muted); } .sislink:hover em { color: var(--fg); }
.sisclose { appearance: none; border: 0; background: none; padding: 6px 0 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; align-self: flex-start; text-decoration: underline; text-underline-offset: 3px; }
@keyframes sisfade { from { opacity: 0; } } @keyframes sisrise { from { opacity: 0; transform: translateY(10px); } }

/* lowercase interface: titles, artist names, the answer and full sentences keep their own capitals */
body { text-transform: lowercase; }
.gt, .ga, .opt, .list, .atitle, .ameta, .minfo, .about, .hint, .toast, p, input, textarea, .stats, .stats * { text-transform: none; }
input::placeholder { text-transform: lowercase; }
button { text-transform: inherit; }

/* the win, slowly: the winning row flips tile by tile (.slow), then waves */
.tile.flip.bounce.slow { animation-duration: .9s, .8s; animation-timing-function: cubic-bezier(.45, 0, .2, 1), cubic-bezier(.3, 1.5, .5, 1); }
.tile.flip.slow::before { animation-duration: .9s; }

/* the stamp on the artwork's corner */
.stamp { position: absolute; right: -6%; top: -6%; width: 40%; max-width: 220px; z-index: 4; pointer-events: none; --rot: -8deg; transform: rotate(var(--rot)); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .2)); }
.stamp svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--mono); font-weight: 600; }
.stamp.go { animation: stamp-press .75s var(--stamp-delay, 3.1s) both; }
/* press: the stamp lifts in with a soft shadow, then presses flat onto the page */
@keyframes stamp-press {
  0% { opacity: 0; transform: rotate(var(--rot)) translateY(-10px) scale(1.12); filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .28)); animation-timing-function: ease-out; }
  35% { opacity: 1; transform: rotate(var(--rot)) translateY(-8px) scale(1.1); filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .25)); animation-timing-function: cubic-bezier(.5, 0, .9, .4); }
  62% { opacity: 1; transform: rotate(var(--rot)) scale(.985); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
  100% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}
.stamp { width: 38%; max-width: 210px; --rot: -10deg; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)) drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
/* the metal tiers shine: a slow sweep of light, then a long rest, on repeat */
.stamp .glint { opacity: 0; animation: stamp-glint 6s ease-in-out .6s infinite; }
.stamp.go .glint { animation-delay: calc(var(--stamp-delay, 3.1s) + .8s); }
@keyframes stamp-glint { 0% { opacity: 1; transform: translateX(-110px); } 28%, 100% { opacity: 1; transform: translateX(170px); } }
@media (prefers-reduced-motion: reduce) { .stamp.go { animation: none; } .stamp .glint { animation: none; } }

/* the search box reads like the rest of the site: what you type shows in lowercase (search ignores case anyway) */
#q { text-transform: lowercase; }

/* the line under the search box in lowercase too, like everything around it */
.hint { text-transform: lowercase; }

/* search: an italic catalogue line with the puzzle's catalogue number */
.field { border-bottom-width: 1px; }
#q::placeholder { font-style: italic; }
.field .cat { font-family: var(--mono); font-size: 11px; color: var(--fg); letter-spacing: .04em; white-space: nowrap; flex: none; }
@media (max-width: 420px) { .field .cat { display: none; } }

/* "this week" under the result */
.recent { margin-top: 22px; }
.recent .rhd { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.recent .rhd .textbtn { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; padding: 0; }
.recent .rrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rcell { appearance: none; border: 0; padding: 0; aspect-ratio: 1; position: relative; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--fg) 6%, var(--bg)); }
.rcell:disabled { cursor: default; }
.rcell:not(:disabled):hover { outline: 1px solid var(--fg); outline-offset: 2px; }
.rcell img, .rcell .rpx { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rcell .rpx { display: grid; grid-template-columns: repeat(3, 1fr); }
.rcell .rno { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.rcell em { position: absolute; left: 4px; bottom: 3px; font-family: var(--mono); font-style: normal; font-size: 9px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.rcell.now { outline: 1.5px solid var(--fg); outline-offset: 2px; }
.rcell em { background: rgba(0, 0, 0, .55); text-shadow: none; padding: 1px 3px; left: 3px; bottom: 3px; }

.rcell img.first { image-rendering: pixelated; }
.result .actions { justify-content: space-between; align-items: baseline; }
.result .actions .next { margin-left: auto; }
.listen:empty { display: none; }
/* computers, finished: the exhibition row sits on the same line as the bottom of the painting */
@media (min-width: 900px) and (pointer: fine) {
  body.done #bottom { align-self: stretch; display: flex; flex-direction: column; padding-bottom: var(--capgap, 0px); }
  body.done #bottom .result { flex: 1; }
  body.done #bottom .recent { margin-top: auto; }
}

/* before the first guess: the search box is the obvious place to start */
.entry.first .field { border-bottom-width: 2px; border-bottom-color: var(--fg); }
.entry.first #q::placeholder { color: var(--fg); opacity: .75; }
.entry.first .hint { color: var(--fg); }
.field.hereglow { animation: hereglow 1.6s ease-out 1; }
@keyframes hereglow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fg) 35%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { .field.hereglow { animation: none; } }
/* the timeline under the painting */
figure .tline { margin: 6px 0 0; }
figure .tline.tin { animation: tl-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes tl-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { figure .tline.tin { animation: none; } }
/* computers: guesses then the search box, no gap between them (the painting's extra height goes below the search) */
@media (min-width: 900px) and (pointer: fine) {
  .app { grid-template-rows: auto 1fr min-content auto 1fr auto; }
  body:not(.done) #bottom { align-self: start; }
}
/* phones: the painting is narrow, so the timeline runs the full width under it */
@media (max-width: 899px), (pointer: coarse) {
  figure .tline { width: calc(100vw - 32px); max-width: 520px; position: relative; left: 50%; transform: translateX(-50%); margin-top: 8px; }
}
/* the right column is one block: guesses, then the search (or the result) right under them */
.side { display: contents; }
@media (min-width: 900px) and (pointer: fine) {
  .app { grid-template-rows: auto 1fr auto 1fr auto; grid-template-areas: "head head" ". ." "art side" ". ." "foot foot"; }
  .app > .side { grid-area: side; display: flex; flex-direction: column; gap: 18px; min-width: 0; align-self: stretch; }
  .side > .board, .side > #bottom { grid-area: auto; }
  body.done .side > #bottom { flex: 1; }
}
@media (min-width: 900px) and (pointer: fine) { .side > #bottom, .side > .board { width: 100%; } .side > #bottom .entry { width: 100%; } }
/* timeline labels: hidden except the ones that carry a clue */
figure .tline .tseg span, figure .tline .tseg small { visibility: hidden; }
figure .tline .tseg.named span, figure .tline .tseg.named small { visibility: visible; }
/* a guessed era: its bar is outlined instead of carrying a little circle */
.tseg i b { display: none; }
.tseg.g i { box-shadow: 0 0 0 1.5px var(--fg); }
.tseg.g span { text-decoration: underline; text-underline-offset: 2px; }

.backtoday { appearance: none; border: 0; background: none; padding: 0 0 0 8px; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#num .backtoday:first-child, #num > .backtoday { padding-left: 0; }
#num .backtoday + .backtoday { padding-left: 10px; }
/* avatar: a solved painting at round 5; past paintings: the same tiles */
.av.pic { display: block; overflow: hidden; }
.av.pic img { width: 100%; height: 100%; display: block; object-fit: cover; image-rendering: pixelated; }
.mosaic { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mt { position: relative; overflow: hidden; }
.mt img { object-fit: cover; }
.mosaic:not(.archgrid) .mt.on::after { content: "✓"; position: absolute; right: 3px; bottom: 2px; width: 15px; height: 15px; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-size: 10px; line-height: 1; }
.archgrid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.archgrid .mt { background: var(--soft); }
.archgrid .mt img { position: absolute; inset: 0; width: 100%; height: 100%; }
.archgrid .mt em { position: absolute; left: 4px; bottom: 3px; z-index: 1; font-family: var(--mono); font-style: normal; font-size: 9.5px; color: #fff; background: rgba(0, 0, 0, .55); padding: 1px 3px; }
.archgrid .mt u { position: absolute; right: 4px; top: 2px; z-index: 1; text-decoration: none; color: #fff; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.archgrid .mt:disabled { cursor: default; }
.archgrid .mt:not(:disabled):hover { outline: 1.5px solid var(--fg); outline-offset: 2px; }
@media (max-width: 520px) { .archgrid { grid-template-columns: repeat(4, 1fr); } }
.mosaic:not(.archgrid) .mt.on { outline-offset: -2px; }
/* past paintings: months + a filter */
.afilt { display: flex; gap: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.afilt button { appearance: none; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; font: inherit; }
.afilt button.on { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.amonths { display: flex; flex-direction: column; gap: 18px; max-height: min(62svh, 560px); overflow: auto; padding-right: 2px; }
.amonth .mhead { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; background: var(--bg); padding: 4px 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--fg); }
.amonth .mrec { color: var(--muted); }
.archgrid .mt[hidden], .amonth[hidden] { display: none; }
/* the missed row in "solved in": the same bar, a lighter tone */
.dist .drow.miss .dtrack i { opacity: .45; }
.dist .drow.miss .dn { font-size: .85em; }
/* narrow phones: footer links never break onto two lines */
@media (max-width: 400px) { footer { gap: 10px 12px !important; flex-wrap: wrap; justify-content: center; font-size: 12.5px; } footer > *, footer a, footer button { white-space: nowrap; } }
.rcell canvas.rpx { image-rendering: pixelated; image-rendering: crisp-edges; }
/* the pixel rounds, drawn on whole screen pixels (see drawPixels) */
.frame .pxcv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.frame .pxcv[hidden] { display: none; }
#cover.pxhide { opacity: 0; }
.frame .sharpen { z-index: 2; }

/* the credit under the answer */
.result .credit { margin: 14px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .03em; color: var(--muted); line-height: 1.5; }

/* the hanko: ink pressed onto the picture, not an object sitting on it (no shadow; the ink takes on what's under it) */
.stamp { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)) !important; mix-blend-mode: normal; width: 26%; max-width: 150px; right: -4%; top: -3%; --rot: -8deg; }
.stamp svg { overflow: visible; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; } }
/* the manga sound effect on a solve */
.sfx { display: inline-flex; flex-direction: column; align-items: center; white-space: nowrap; font-size: clamp(34px, 8vw, 62px); }
.sfx b { display: block; font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: 1em; line-height: 1; letter-spacing: -.03em; color: var(--ink); text-transform: none;
  text-shadow: .065em .065em 0 var(--sh), -2px -2px 0 var(--bg), 2px -2px 0 var(--bg), -2px 2px 0 var(--bg), 2px 2px 0 var(--bg), 0 2px 0 var(--bg), 2px 0 0 var(--bg), -2px 0 0 var(--bg), 0 -2px 0 var(--bg); }
.sfx i { display: inline-block; margin-top: .08em; padding: 2px 6px; font: 500 10px var(--mono); font-style: normal; letter-spacing: .2em; background: var(--ink); color: var(--bg); text-transform: none; }
/* the sound effect slams in: big, overshoots, settles */
.stamp.go { animation: stamp-press .75s var(--stamp-delay, 3.1s) both; }
@keyframes sfx-slam {
  0% { opacity: 0; transform: rotate(var(--rot)) scale(1.9); }
  55% { opacity: 1; transform: rotate(calc(var(--rot) - 2deg)) scale(.92); }
  78% { transform: rotate(calc(var(--rot) + 1deg)) scale(1.04); }
  100% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .stamp.go { animation: none; } }
/* medal colours for the tag under the sound effect */
.sfx.gold i { background: linear-gradient(135deg, #F6D77A, #C9962A 55%, #E9C25B); color: #2A1F08; }
.sfx.silver i { background: linear-gradient(135deg, #EEF1F4, #A9B1B9 55%, #D5DAE0); color: #1E2226; }
.sfx.bronze i { background: linear-gradient(135deg, #E2A774, #9B6033 55%, #C98A55); color: #24150A; }
/* the folded corner: the stamp box covers the picture; sizes in cqw (the picture's width) so it looks the same at any size */
.frame { container-type: inline-size; }
.stamp:has(.corner) { inset: 0; right: 0; top: 0; width: auto; max-width: none; overflow: hidden; transform: none; filter: none !important; animation: none; pointer-events: none; }
.corner { --metal: linear-gradient(135deg, #B98A1F, #F3D271 50%, #B98A1F); --shine: linear-gradient(180deg, #FFF4C2 0%, #F2C94C 40%, #A87512 62%, #F6D879 100%); --flat: #F3D271;
  position: absolute; right: 0; top: 0; width: 50cqw; height: 50cqw; filter: drop-shadow(-.6cqw .8cqw 1.4cqw rgba(0, 0, 0, .35)); }
.corner::before { content: ""; position: absolute; inset: 0; background: #151514; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.corner::after { content: ""; position: absolute; inset: 0; background: var(--metal); clip-path: polygon(0 0, 5% 0, 100% 95%, 100% 100%); }
.corner.silver { --metal: linear-gradient(135deg, #8C969F, #EEF1F4 50%, #8C969F); --shine: linear-gradient(180deg, #FFFFFF 0%, #D5DBE1 40%, #7D8892 62%, #EEF2F5 100%); --flat: #E3E8EC; }
.corner.bronze { --metal: linear-gradient(135deg, #8E5529, #E0A574 50%, #8E5529); --shine: linear-gradient(180deg, #FFE0C2 0%, #D9965C 40%, #7A4519 62%, #E9B485 100%); --flat: #E7AE7E; }
/* the text runs along the diagonal, centred between the fold and the corner */
.corner .cin { position: absolute; left: 68%; top: 32%; transform: translate(-50%, -50%) rotate(45deg); display: flex; flex-direction: column; align-items: center; gap: .9cqw; z-index: 1; white-space: nowrap; }
.corner b { font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: 7.6cqw; line-height: 1; letter-spacing: -.02em; text-transform: none;
  background: var(--shine); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .3cqw 0 rgba(0, 0, 0, .7)); }
.corner .cin > span { display: flex; align-items: baseline; gap: 1.6cqw; }
.corner i { font: 500 max(6px, 2.2cqw) var(--mono); font-style: normal; letter-spacing: .18em; color: var(--flat); opacity: .85; text-transform: none; }
.corner em { font: 600 4cqw/1 Geist, sans-serif; font-style: normal; background: var(--shine); -webkit-background-clip: text; background-clip: text; color: transparent; }
.corner em small { font: 500 max(6px, 2.2cqw) var(--mono); -webkit-text-fill-color: var(--flat); opacity: .7; margin-left: .2cqw; }
/* it folds in from the corner on a solve */
.stamp.go .corner { animation: corner-in .55s var(--stamp-delay, 3.1s) cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: 100% 0; }
@keyframes corner-in { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .stamp.go .corner { animation: none; } }
/* the pennant: the stamp box covers the picture; sizes in cqw (the picture's width) so it looks the same at any size */
.frame { container-type: inline-size; }
.stamp:has(.pennant) { inset: 0; right: 0; top: 0; width: auto; max-width: none; overflow: visible; transform: none; filter: none !important; animation: none; pointer-events: none; }
.pennant { --metal: linear-gradient(90deg, #B98A1F, #F3D271 50%, #B98A1F); --shine: linear-gradient(180deg, #FFF4C2 0%, #F2C94C 40%, #A87512 62%, #F6D879 100%); --flat: #F3D271;
  position: absolute; right: 7cqw; top: -2cqw; width: 21cqw; padding: 5cqw 0 10cqw; display: flex; flex-direction: column; align-items: center; gap: 1.6cqw;
  background: #151514; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); filter: drop-shadow(0 1cqw 2cqw rgba(0, 0, 0, .35)); }
.pennant::before { content: ""; position: absolute; inset: 0; background: var(--metal);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%, 0 0, 6% 0, 6% 93%, 50% 79.5%, 94% 93%, 94% 0); }
.pennant.silver { --metal: linear-gradient(90deg, #8C969F, #EEF1F4 50%, #8C969F); --shine: linear-gradient(180deg, #FFFFFF 0%, #D5DBE1 40%, #7D8892 62%, #EEF2F5 100%); --flat: #E3E8EC; }
.pennant.bronze { --metal: linear-gradient(90deg, #8E5529, #E0A574 50%, #8E5529); --shine: linear-gradient(180deg, #FFE0C2 0%, #D9965C 40%, #7A4519 62%, #E9B485 100%); --flat: #E7AE7E; }
.pennant b { font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: 7.4cqw; line-height: 1; writing-mode: vertical-rl; letter-spacing: .02em; text-transform: none;
  background: var(--shine); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .3cqw 0 rgba(0, 0, 0, .7)); }
.pennant i { font: 500 max(6px, 2.3cqw) var(--mono); font-style: normal; letter-spacing: .18em; color: var(--flat); opacity: .85; text-transform: none; }
.pennant .pn { margin-top: .6cqw; padding-top: 1.6cqw; border-top: 1px solid color-mix(in srgb, var(--flat) 45%, transparent); font: 600 5cqw/1 Geist, sans-serif;
  background: var(--shine); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pennant .pn small { font: 500 max(6px, 2.4cqw) var(--mono); -webkit-text-fill-color: var(--flat); opacity: .7; margin-left: .3cqw; }
/* it drops in from above on a solve */
.stamp.go .pennant { animation: pennant-in .7s var(--stamp-delay, 3.1s) cubic-bezier(.25, 1.4, .4, 1) both; }
@keyframes pennant-in { 0% { transform: translateY(-110%); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .stamp.go .pennant { animation: none; } }

/* ---------- anime touches ---------- */
:root { --sakura: #C4557A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sakura: #E7A9BD; } }
:root[data-theme="dark"] { --sakura: #E7A9BD; }
/* the katakana name under the wordmark, and Japanese under the column headers */
.mark .word { position: relative; }
.mark .word::after { content: "キャラクターアート"; position: absolute; left: 0; top: 100%; margin-top: 1px; font: 400 8.5px/1 var(--mono); letter-spacing: .18em; color: var(--sakura); white-space: nowrap; }
.heads span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.heads span:first-child { align-items: flex-start; }
.heads .jp { font-size: 8px; letter-spacing: .1em; color: var(--sakura); opacity: .85; }
/* sakura pink for the parts you act on: the round you're on, the guess line, links */
.dot.now { border-color: var(--sakura); background: color-mix(in srgb, var(--sakura) 22%, transparent); }
.field { border-bottom-color: var(--sakura) !important; }
.listen a, .result .actions .next, .textbtn:hover { text-decoration-color: var(--sakura); }
.listen a:hover { color: var(--sakura); }
/* speed lines on a win */
figure { position: relative; }
.speed { position: absolute; inset: -14% -16%; z-index: 0; pointer-events: none; animation: speed 1.2s ease-out both;
  -webkit-mask: radial-gradient(closest-side, transparent 55%, #000 70%, transparent 100%); mask: radial-gradient(closest-side, transparent 55%, #000 70%, transparent 100%); }
.speed svg { width: 100%; height: 100%; display: block; fill: var(--fg); }
@keyframes speed { 0% { opacity: 0; transform: scale(.9); } 15% { opacity: .35; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
figure .frame { position: relative; z-index: 1; }
/* clue tiles in the logo's sakura shades: pale pink (far) to deep plum (right) */
.tile.l0 { background: #F6E4EA; color: #6B3A4B; border-color: transparent; }
.tile.l1 { background: #E7A9BD; color: #3E1424; border-color: transparent; }
.tile.l2 { background: #C4557A; color: #FFF5F8; border-color: transparent; }
.tile.l3 { background: #4E1A2D; color: #FBE9EF; border-color: #4E1A2D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile.l0 { background: #2E2126; color: #D9B3C0; } }
:root[data-theme="dark"] .tile.l0 { background: #2E2126; color: #D9B3C0; }
/* ---------- manga page theme ----------
   Paper with a faint screentone, the picture framed like a manga panel (thick ink border, hard offset shadow), clue
   tiles inked with a bold outline, and screentone dots over the middle shades (kept light so the text stays readable). */
body { background-color: #F7F5EF; background-image: radial-gradient(color-mix(in srgb, var(--fg) 9%, transparent) 1px, transparent 1.3px); background-size: 6px 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-color: var(--bg); } }
:root[data-theme="dark"] body { background-color: var(--bg); }
figure .frame { outline: 3px solid var(--fg); outline-offset: 5px; box-shadow: 9px 9px 0 0 var(--fg); }
.mark .word { font-weight: 700; letter-spacing: -.025em; }
.tile.clue { border: 2px solid var(--fg) !important; box-shadow: 2px 2px 0 var(--fg); }
.tile.l1, .tile.l2 { position: relative; }
.tile.l1::after, .tile.l2::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(0, 0, 0, .16) 1px, transparent 1.3px); background-size: 4px 4px; }
.tile.l2::after { background-image: radial-gradient(rgba(255, 255, 255, .2) 1px, transparent 1.3px); }
.tile:not(.clue):not(.skip) { border-style: dashed; }
.field { border-bottom: 3px solid var(--fg) !important; }
.donebar { border-bottom-width: 3px !important; }
/* more old-school manga dots: a halftone that grows toward the top-left and bottom-right corners of the page (like a
   printed tone fading out), and the panel's shadow printed as dots instead of solid ink */
body { background-image:
  radial-gradient(color-mix(in srgb, var(--fg) 9%, transparent) 1px, transparent 1.3px); }
body::before, body::after { content: ""; position: fixed; width: 48vmax; height: 48vmax; pointer-events: none; z-index: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--fg) 13%, transparent) 36%, transparent 40%); background-size: 7px 7px; }
body::before { left: 0; top: 0; -webkit-mask: radial-gradient(circle at 0 0, #000 0, transparent 70%); mask: radial-gradient(circle at 0 0, #000 0, transparent 62%); }
body::after { right: 0; bottom: 0; -webkit-mask: radial-gradient(circle at 100% 100%, #000 0, transparent 70%); mask: radial-gradient(circle at 100% 100%, #000 0, transparent 62%); }
.app { position: relative; z-index: 1; }
figure .frame { box-shadow: none; }
figure .frame::before { content: ""; position: absolute; left: 12px; top: 12px; right: -13px; bottom: -13px; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--fg) 42%, transparent 46%); background-size: 5px 5px; }
.tile.clue { box-shadow: none; }
.tile.clue { background-clip: padding-box; }
/* room for the dotted panel shadow above the caption under the picture */
figure .cap { margin-top: 22px; }
/* the line under the guess box as a manga narration box: inked border on paper */
.entry .hint:not(:empty) { display: inline-block; margin-top: 10px; padding: 5px 9px; background: var(--bg); border: 2px solid var(--fg); color: var(--fg); font-size: 11.5px; }
/* phones: the big corner halftones crowd a small screen; keep just the fine screentone, and a lighter narration box */
@media (max-width: 760px) { body::before, body::after { display: none; } .entry .hint:not(:empty) { border-width: 1.5px; font-size: 11px; } }
/* ---------- theme: colourless with a touch of pink ----------
   Everything is black, white and grey except one hot pink, used only where something good happens or where you act:
   an exact clue, the round you're on, the guess line, the picture's offset block. The character is the only colour. */
:root { --pink: #FF4F8B; --sakura: #FF4F8B; }
body { background-image: none !important; background-color: var(--bg) !important; }
body::before, body::after { display: none !important; }
figure .frame { outline: 2px solid var(--fg); outline-offset: 0; box-shadow: 10px 10px 0 0 var(--pink) !important; }
figure .frame::before { display: none !important; }
figure .cap { margin-top: 18px; }
.mark .word { font-weight: 800; letter-spacing: -.035em; }
.mark .word::after { color: var(--pink); }
.heads .jp { color: var(--muted); opacity: .8; }
/* clue tiles: greys for far to close, pink for exactly right */
.tile.clue { border: 1.5px solid var(--fg) !important; box-shadow: none !important; border-radius: 3px; }
.tile.l1::after, .tile.l2::after { display: none !important; }
.tile.l0 { background: var(--bg) !important; color: var(--fg) !important; }
.tile.l1 { background: #CFCFCA !important; color: #151514 !important; }
.tile.l2 { background: #5E5E59 !important; color: #F4F4F1 !important; }
.tile.l3 { background: var(--pink) !important; color: #fff !important; border-color: var(--fg) !important; font-weight: 600; }
.tile:not(.clue):not(.skip) { border-style: solid !important; border-radius: 3px; }
.hscale i.tile.l3 { background: var(--pink) !important; }
/* the round you're on, the guess line, links */
.dot.now { border-color: var(--pink) !important; background: var(--pink) !important; }
.field { border-bottom: 2px solid var(--fg) !important; }
.entry .hint:not(:empty) { border: 0 !important; padding: 0 !important; background: none !important; color: var(--muted) !important; }
.entry .hint:not(:empty) b, .entry .hint mark { background: var(--pink); color: #fff; }
.listen a { text-decoration-color: var(--pink) !important; text-decoration-thickness: 2px; }
.donebar { border-bottom-width: 2px !important; }
/* the answer's name gets a pink highlighter stroke */
.answer .atitle { display: inline; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 45%, transparent) 58%, color-mix(in srgb, var(--pink) 45%, transparent) 92%, transparent 92%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile.l1 { background: #3A3A37 !important; color: #ECECE7 !important; } :root:not([data-theme="light"]) .tile.l2 { background: #8A8A84 !important; color: #121211 !important; } }

/* ---------- theme: visual novel ----------
   A soft pastel sky, the character as the sprite, and the guess box as a dialogue box with a "???" name tag that
   becomes the character's name when you find them. Pink stays the one accent. */
:root { --pink: #F25C9A; --sakura: #F25C9A; --vnbox: #1E1726; --vntext: #F7EEF4; }
body { background: linear-gradient(180deg, #FCE7F0 0%, #F3EEFC 55%, #E6F1FD 100%) fixed !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: linear-gradient(180deg, #24182A 0%, #17151F 55%, #121A24 100%) fixed !important; } }
.mark .word, .gt, .vntag { font-family: "M PLUS Rounded 1c", Geist, sans-serif !important; }
.mark .word { font-weight: 800; letter-spacing: -.02em; }
figure .frame { outline: none !important; box-shadow: 0 22px 40px -18px rgba(90, 40, 80, .45) !important; border-radius: 6px; overflow: hidden; }
figure .cap { margin-top: 14px; }
/* clue tiles: rounded, pastel for far to close, pink for exactly right */
.tile, .tile.clue { border-radius: 10px !important; border: 0 !important; }
.tile.l0 { background: rgba(255, 255, 255, .75) !important; color: #4B3D55 !important; box-shadow: inset 0 0 0 1px #E6DCEC; }
.tile.l1 { background: #E5DAF0 !important; color: #3A2D47 !important; }
.tile.l2 { background: #8E7BA6 !important; color: #fff !important; }
.tile.l3 { background: var(--pink) !important; color: #fff !important; }
.tile:not(.clue):not(.skip) { background: rgba(255, 255, 255, .45) !important; box-shadow: inset 0 0 0 1px #E6DCEC; }
/* the dialogue box */
.entry.vn { position: relative; margin-top: 26px; padding: 22px 20px 16px; background: var(--vnbox); border-radius: 14px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pink), 0 18px 30px -16px rgba(60, 20, 50, .5); }
.entry.vn .field { border-bottom: 1px solid rgba(255, 255, 255, .22) !important; }
.entry.vn #q { color: var(--vntext) !important; }
.entry.vn #q::placeholder { color: #B8A9C4; }
.entry.vn .hint, .entry.vn .hint:not(:empty) { color: #F3D6E4 !important; background: none !important; border: 0 !important; padding: 0 !important; margin-top: 10px; min-height: 1.45em; }
.entry.vn .chev, .entry.vn .skip, .entry.vn .count { color: #CDBFD8 !important; }
.vntag { position: absolute; left: 18px; top: -15px; padding: 5px 16px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em; }
.vnnext { position: absolute; right: 16px; bottom: 10px; color: var(--pink); font-size: 11px; font-style: normal; animation: vn-bob .9s ease-in-out infinite; }
@keyframes vn-bob { 50% { transform: translateY(3px); } }
/* the answer: the character speaking, their name on the tag */
.answer.vn { position: relative; margin-top: 20px; padding: 22px 20px 16px; background: var(--vnbox); color: var(--vntext); border-radius: 14px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pink); }
.answer.vn .vntag.on { letter-spacing: .02em; font-size: 14px; }
.answer.vn .vnline { margin: 2px 0 8px; font-size: 16px; line-height: 1.4; min-height: 1.4em; }
.answer.vn .ameta { color: #CDBFD8 !important; }
.answer .atitle { background: none; }
@media (prefers-reduced-motion: reduce) { .vnnext { animation: none; } }
.vntag { text-transform: none !important; }
#bottom.dock { background: transparent !important; }
figure .frame { overflow: visible !important; }
figure .frame img, figure .frame canvas { border-radius: 6px; }
.entry.vn .field > span, .entry.vn .tries { color: #CDBFD8 !important; }
.entry.vn .cat { color: #CDBFD8 !important; }

/* ---------- animations ---------- */
/* the wordmark turns over between English and Japanese (the katakana line under it isn't needed any more) */
.mark .word::after { content: none !important; }
.mark .word { display: inline-block; transform-origin: 50% 60%; transition: transform .24s ease-in, opacity .24s ease-in; }
.mark .word.flipout { transform: rotateX(90deg); opacity: 0; }
.mark .word.flipin { animation: word-in .26s ease-out both; }
.mark .word.jp { letter-spacing: .02em; color: var(--pink); font-size: calc(1em * var(--jpscale, 1)); }
@keyframes word-in { from { transform: rotateX(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
/* the character idles like a visual-novel sprite: a slow breath */
figure .frame { animation: sprite-idle 4.5s ease-in-out infinite; }
@keyframes sprite-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
/* the dialogue box slides up when it appears; the name tag pops */
.entry.vn, .answer.vn { animation: box-up .45s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes box-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.vntag { animation: tag-pop .5s .15s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes tag-pop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
/* the round you're on pulses softly */
.dot.now { animation: dot-pulse 1.6s ease-in-out infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 25%, transparent); } }
/* empty guess rows shimmer once, left to right, when the page opens */
.row.empty .tile { animation: tile-in .4s ease-out both; }
.row.empty:nth-child(3) .tile { animation-delay: .05s; } .row.empty:nth-child(4) .tile { animation-delay: .1s; } .row.empty:nth-child(5) .tile { animation-delay: .15s; } .row.empty:nth-child(6) .tile { animation-delay: .2s; } .row.empty:nth-child(7) .tile { animation-delay: .25s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { figure .frame, .entry.vn, .answer.vn, .vntag, .dot.now, .row.empty .tile { animation: none !important; } }
/* ---------- neutral with pops of pink ----------
   A plain warm-white page and greys everywhere; pink only on exact clues, the name tag, the dialogue box's edge,
   the round you're on and the flipped wordmark. */
:root { --vnbox: #1C1C1B; --vntext: #F4F4F1; }
body { background: var(--bg) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: var(--bg) !important; } }
figure .frame { box-shadow: 0 20px 36px -20px rgba(0, 0, 0, .35) !important; }
.tile.l0 { background: #FFFFFF !important; color: #3B3B38 !important; box-shadow: inset 0 0 0 1px #E2E2DD; }
.tile.l1 { background: #DEDED9 !important; color: #222220 !important; }
.tile.l2 { background: #6E6E69 !important; color: #FFFFFF !important; }
.tile:not(.clue):not(.skip) { background: transparent !important; box-shadow: inset 0 0 0 1px #DEDED9; }
.entry.vn, .answer.vn { box-shadow: 0 0 0 2px var(--pink), 0 16px 28px -18px rgba(0, 0, 0, .45) !important; }
.entry.vn #q::placeholder { color: #A3A39D; }
.entry.vn .hint, .entry.vn .hint:not(:empty) { color: #DCDCD6 !important; }
.entry.vn .chev, .entry.vn .skip, .entry.vn .cat, .answer.vn .ameta { color: #A3A39D !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile.l0 { background: #1C1C1B !important; color: #ECECE7 !important; box-shadow: inset 0 0 0 1px #33332F; } :root:not([data-theme="light"]) .tile.l1 { background: #3A3A37 !important; color: #ECECE7 !important; } :root:not([data-theme="light"]) .tile.l2 { background: #8E8E88 !important; color: #121211 !important; } }

/* ---------- the page is the picture ----------
   The round's picture is painted across the page (see paintStage in app.js): block for block where the frame sits,
   carried on past its edges and faded to the page colour along an oval. The frame's own <img> is invisible; it only
   holds the place (and the round-to-round animations play in it, softened by the same oval). */
#stage { position: absolute; left: 0; right: 0; top: 0; overflow: hidden; z-index: 0; pointer-events: none; }
#stage[hidden] { display: none; }
#stage canvas { position: absolute; image-rendering: pixelated; }
figure .frame { box-shadow: none !important; outline: none !important; border-radius: 0 !important; animation: none !important;
  -webkit-mask: radial-gradient(ellipse closest-side at 50% 50%, #000 92%, transparent 300%); mask: radial-gradient(ellipse closest-side at 50% 50%, #000 92%, transparent 300%); }
figure .frame img, figure .frame canvas { border-radius: 0 !important; }
figure .frame > img { opacity: 0; }
.board, #bottom { position: relative; }
.cardy { background: var(--raise); border-radius: 18px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent), 0 20px 40px -24px rgba(0, 0, 0, .3); }
@media (min-width: 900px) and (pointer: fine) {
  #stage { position: fixed; inset: 0; }
  body { overflow: hidden; }
  .app { display: block !important; max-width: none; margin: 0; padding: 0; }
  header { position: fixed; z-index: 3; left: 32px; right: 32px; top: 22px; }
  .hright { background: var(--raise); border-radius: 999px; padding: 9px 14px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }
  figure { position: fixed !important; z-index: 1; top: 0; left: 50%; transform: translateX(-50%); margin: 0 !important; height: 100svh; width: auto !important; max-width: none !important; min-width: 0 !important; aspect-ratio: var(--ar, 1); gap: 0; }
  figure .frame { height: 100svh; width: auto; aspect-ratio: var(--ar, 1); }
  figure .cap { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); margin: 0 !important; gap: 14px; white-space: nowrap;
    background: var(--raise); border-radius: 999px; padding: 8px 14px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }
  .side > .board { position: fixed; z-index: 2; right: 32px; top: 80px; width: 390px !important; max-height: calc(100svh - 150px); overflow: auto; padding: 14px;
    background: var(--raise); border-radius: 18px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent), 0 20px 40px -24px rgba(0, 0, 0, .3); }
  .side > #bottom { position: fixed; z-index: 2; left: 32px; top: 72px; width: 370px !important; max-height: calc(100svh - 130px); overflow: auto; padding: 20px 4px 4px; }
  footer { position: fixed; z-index: 2; left: 32px; bottom: 18px; margin: 0 !important; }
}
/* the floating pieces are pink: the round pill and the grid pill solid pink, the guesses card ringed in pink like the
   dialogue box */
@media (min-width: 900px) and (pointer: fine) {
  .hright, figure .cap { background: var(--pink) !important; color: #fff; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--pink) 70%, transparent) !important; }
  figure .cap span { color: #fff !important; }
  .hright .dot { border-color: #ffffffaa !important; }
  .hright .dot.used { background: #ffffff88 !important; }
  .hright .dot.now { background: #fff !important; border-color: #fff !important; box-shadow: none; animation: none; }
  .hright .dot.win { background: #fff !important; border-color: #fff !important; }
  .side > .board { box-shadow: 0 0 0 2px var(--pink), 0 20px 40px -24px rgba(0, 0, 0, .3) !important; }
}
/* the stage draws the blocks now; the frame is only a place holder (and the stage for the round-to-round animations) */
figure .frame { background: transparent !important; }
.frame .pxcv { display: none !important; }
figure .cap { z-index: 3; }
@media (min-width: 900px) and (pointer: fine) {
  /* finished: the answer, the share and the rest sit on one card, ringed in pink like the guesses */
  body.done .side > #bottom { background: var(--raise); border-radius: 18px; padding: 26px 18px 16px; top: 80px; box-shadow: 0 0 0 2px var(--pink), 0 20px 40px -24px rgba(0, 0, 0, .3); }
  body.done .side > #bottom .answer.vn { box-shadow: none !important; }
  footer { background: var(--raise); border-radius: 999px; padding: 8px 16px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 8%, transparent); }
}
/* phones: the picture a little bigger, and the guesses on a pink-ringed card so the fade under the picture doesn't
   run into them */
@media (max-width: 899px), (pointer: coarse) {
  figure { width: min(100%, 44svh) !important; }
  .board { background: var(--raise); border-radius: 16px; padding: 10px; box-shadow: 0 0 0 2px var(--pink), 0 16px 30px -20px rgba(0, 0, 0, .3); }
  .hright { background: var(--pink); border-radius: 999px; padding: 7px 12px; }
  .hright .dot { border-color: #ffffffaa !important; } .hright .dot.used, .hright .dot.win, .hright .dot.now { background: #fff !important; border-color: #fff !important; box-shadow: none; }
}
/* ---------- everything floats ----------
   No cards: each guess is its own dark bar floating over the page, the clue tiles dark too (lighter the closer they
   are, pink when exact), all in the same columns. Rows not played yet aren't shown. The finished panel is dark too. */
.side > .board, .board { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
.board .row.empty { display: none; }
.board .heads, .board .row { --fg: #F4F4F1; --muted: #A3A39D; --line: #3A3A37; color: var(--fg); background: #1C1C1BF2; border-radius: 14px; padding: 8px 8px 8px 14px; margin-bottom: 8px;
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .55); grid-template-columns: minmax(0, 1fr) repeat(3, 72px); }
.board .heads { padding-block: 7px; background: #1C1C1BE6; }
.board .heads .jp { color: var(--pink) !important; opacity: 1; }
.board .row .guess small, .board .row .guess .sub, .board .row .guess span + span { color: var(--muted); }
.board .tile, .board .tile.clue { border: 0 !important; border-radius: 9px !important; box-shadow: none !important; }
.board .tile.l0 { background: #2A2A28 !important; color: #A3A39D !important; }
.board .tile.l1 { background: #3E3E3A !important; color: #ECECE7 !important; }
.board .tile.l2 { background: #6A6A64 !important; color: #FFFFFF !important; }
.board .tile.l3 { background: var(--pink) !important; color: #fff !important; }
.board .tile.skip { background: #2A2A28 !important; color: #A3A39D !important; }
@media (min-width: 900px) and (pointer: fine) {
  .side > .board { width: 400px !important; overflow: visible; }
  /* the seal lands on the picture's extension, to the right of the character, not on them */
  figure .stamp { right: auto !important; left: calc(100% + 28px); top: 46% !important; width: 150px !important; }
  /* the finished panel: dark, floating, like the dialogue box */
  body.done .side > #bottom { --fg: #F4F4F1; --muted: #A3A39D; --line: #3A3A37; --soft: #2A2A28; --raise: #1C1C1B; color: var(--fg); background: #1C1C1BF2 !important; box-shadow: 0 0 0 2px var(--pink), 0 20px 40px -24px rgba(0, 0, 0, .5) !important; }
  footer { --fg: #F4F4F1; --muted: #A3A39D; --line: #3A3A37; background: #1C1C1BF2 !important; color: #F4F4F1; box-shadow: none !important; }
  footer a, footer button { color: #DCDCD6 !important; }
}
/* no tiles: the clues are plain words in their columns on the dark bar. Pink when exact, white when close, grey when
   it only shares something, dim when it's off. */
.board .tile, .board .tile.clue, .board .tile.l0, .board .tile.l1, .board .tile.l2, .board .tile.l3, .board .tile.skip { background: none !important; height: 30px; font-size: 11px; }
.board .tile.l0, .board .tile.skip { color: #77776F !important; }
.board .tile.l1 { color: #B9B9B2 !important; }
.board .tile.l2 { color: #FFFFFF !important; font-weight: 500; }
.board .tile.l3 { color: var(--pink) !important; font-weight: 600; }
.board .tile.clue::after { display: none; }
.board .tile.l3::before { content: ""; position: absolute; left: 50%; bottom: 3px; width: 14px; height: 2px; margin-left: -7px; border-radius: 2px; background: var(--pink); }
.board .tile { position: relative; }
/* no bubble behind the tries and the profile square: they sit on the page like the wordmark */
.hright { background: none !important; box-shadow: none !important; padding: 0 !important; }
.hright .dot { border-color: var(--line) !important; background: transparent !important; box-shadow: none !important; }
.hright .dot.used { background: var(--muted) !important; border-color: var(--muted) !important; }
.hright .dot.win { background: var(--fg) !important; border-color: var(--fg) !important; }
.hright .dot.now { background: var(--pink) !important; border-color: var(--pink) !important; animation: dot-pulse 1.6s ease-in-out infinite; }
/* ---------- picture left, words right ----------
   The picture stands on the left of the page, fading out on both sides; everything you read and do is on the right,
   in black, straight on the page: no cards, no bubbles. Pink only for exact clues, the round you're on and tags. */
:root { --tx: var(--fg); --tx2: var(--muted); --tx3: color-mix(in srgb, var(--muted) 70%, transparent); --rule: var(--line); }
.board .heads, .board .row { background: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 9px 0 !important; margin: 0 !important; border-bottom: 1px solid var(--rule); color: var(--tx); }
.board .heads { border-bottom-color: var(--fg); padding-top: 0 !important; }
.board .heads span { color: var(--tx2) !important; }
.board .heads .jp { color: var(--pink) !important; }
.board .row .guess, .board .row .guess * { color: var(--tx) !important; }
.board .row .guess small, .board .row .guess span + span { color: var(--tx2) !important; }
.board .tile.l0, .board .tile.skip { color: var(--tx3) !important; }
.board .tile.l1 { color: var(--tx2) !important; }
.board .tile.l2 { color: var(--tx) !important; }
.board .tile.l3::before { box-shadow: none; }
.entry.vn { background: none !important; box-shadow: none !important; padding: 16px 0 0 !important; color: var(--tx); }
.entry.vn .field { border-bottom: 2px solid var(--fg) !important; }
.entry.vn #q { color: var(--tx) !important; }
.entry.vn #q::placeholder { color: var(--tx2); }
.entry.vn .hint, .entry.vn .hint:not(:empty) { color: var(--tx2) !important; }
.entry.vn .chev, .entry.vn .skip, .entry.vn .cat, .entry.vn .count, .entry.vn .tries, .entry.vn .field > span { color: var(--tx2) !important; }
.vntag { left: 0 !important; }
.answer.vn { background: none !important; box-shadow: none !important; padding: 16px 0 0 !important; color: var(--tx) !important; }
.answer.vn .ameta { color: var(--tx2) !important; }
.board { background: none !important; box-shadow: none !important; padding: 0 !important; }
@media (min-width: 900px) and (pointer: fine) {
  /* the picture: full height, its middle at about a third of the way across */
  figure { left: max(0px, calc(30vw - 50svh * var(--ar, 1))) !important; transform: none !important; }
  figure .cap { display: none !important; }
  figure .stamp { left: calc(100% - 70px) !important; top: 64% !important; width: 140px !important; }
  /* the words: one column down the right */
  .app { position: relative; z-index: 2; margin-left: auto !important; width: min(560px, 46vw); height: 100svh; overflow: auto; padding: 30px 44px 24px !important;
    display: flex !important; flex-direction: column; gap: 26px; }
  header, .side > .board, .side > #bottom, footer { position: static !important; width: auto !important; max-height: none !important; overflow: visible !important; left: auto; right: auto; top: auto; bottom: auto; }
  .side > #bottom { padding: 0 !important; }
  body.done .side > #bottom { background: none !important; box-shadow: none !important; padding: 0 !important; }
  .side > .board { width: 100% !important; }
  .board .heads, .board .row { grid-template-columns: minmax(0, 1fr) repeat(3, 84px); }
  footer { margin-top: auto !important; background: none !important; padding: 0 !important; box-shadow: none !important; }
  footer a, footer button { color: var(--muted) !important; }
  .hright { margin-left: auto; }
}
/* back to the page's own colours inside the column (the dark floating panels set their own) */
:root { --fg0: var(--fg); --muted0: var(--muted); --line0: var(--line); --soft0: var(--soft); --raise0: var(--raise); }
.board .heads, .board .row, #bottom, body.done .side > #bottom, footer { --fg: var(--fg0) !important; --muted: var(--muted0) !important; --line: var(--line0) !important; --soft: var(--soft0) !important; --raise: var(--raise0) !important; color: var(--fg0) !important; }
@media (min-width: 900px) and (pointer: fine) { header { width: 100% !important; align-self: stretch; } }
/* the wordmark stays at the top left of the page, over the picture; the tries and profile stay in the column */
@media (min-width: 900px) and (pointer: fine) {
  header .mark { position: fixed; left: 32px; top: 30px; z-index: 3; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .35); }
  header .mark .num { color: rgba(255, 255, 255, .85); }
  header .mark .logo { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
  header .mark .word.jp { color: #FF8DB5; }
}
/* the words in the column get a soft glow of the page colour, so faint pixels under them never fight the letters */
@media (min-width: 900px) and (pointer: fine) {
  .app .board, .app #bottom, .app footer, .app .hright { text-shadow: 0 0 2px var(--bg), 0 0 8px var(--bg), 0 0 14px var(--bg); }
  .app .vntag, .app .board .tile.l3 { text-shadow: none; }
}
/* tiles back in the guess chart: white when off, light grey when it shares something, dark grey when close, pink
   when exact */
.board .tile, .board .tile.clue { height: 36px !important; border-radius: 8px !important; font-size: 10.5px; text-shadow: none !important; }
.board .tile.l0, .board .tile.skip { background: #FFFFFF !important; color: #6E6E69 !important; box-shadow: inset 0 0 0 1px #E2E2DD !important; }
.board .tile.l1 { background: #DEDED9 !important; color: #222220 !important; }
.board .tile.l2 { background: #6E6E69 !important; color: #FFFFFF !important; font-weight: 500; }
.board .tile.l3 { background: var(--pink) !important; color: #FFFFFF !important; font-weight: 600; }
.board .tile.l3::before { display: none; }
.board .heads, .board .row { column-gap: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .board .tile.l0, :root:not([data-theme="light"]) .board .tile.skip { background: #1C1C1B !important; color: #A3A39D !important; box-shadow: inset 0 0 0 1px #33332F !important; } :root:not([data-theme="light"]) .board .tile.l1 { background: #3A3A37 !important; color: #ECECE7 !important; } :root:not([data-theme="light"]) .board .tile.l2 { background: #8E8E88 !important; color: #121211 !important; } }
/* the seal: red ink pressed on the page, multiplied into it like real ink */
.stamp { filter: none !important; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: screen; } }
@media (min-width: 900px) and (pointer: fine) {
  #bottom { position: relative; }
  #bottom .stamp { position: absolute; left: auto !important; right: 6px !important; top: 46px !important; width: 116px !important; max-width: none; --rot: -7deg; z-index: 3; }
}
@media (min-width: 900px) and (pointer: fine) { .side > #bottom { position: relative !important; } }
