@font-face { font-family: "Abril Fatface"; font-display: swap; src: url(fonts/abril-fatface-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Archivo Black"; font-display: swap; src: url(fonts/archivo-black-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Serif Display"; font-display: swap; src: url(fonts/dm-serif-display-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 600; font-display: swap; src: url(fonts/jost-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-weight: 400; font-display: swap; src: url(fonts/permanent-marker-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }

:root {
  --charcoal: #20201E; --graphite: #2A2A27; --graphite2: #34342F;
  --stone: #DCD9CE; --limestone: #CFCABC; --paper: #F4F2EC; --white: #FFFFFF;
  --oxblood: #4A0000; --ink: #20201E; --muted: #55544D; --line: #BDB8A9;
  --ok: #3F7D4E; --near: #B8892B; --no: #8A877D; --miss: #B3261E;
  --top: 50px; --bar: 104px; --loupe: 200px;
  --brand: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  --display: Jost, "Futura", "Avenir Next", system-ui, sans-serif;
  --text: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
.hc { --ok: #E8742F; --near: #4F9BE0; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
/* a game, not a document: no text selection, callouts or magnifier loupes from the system */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.modal p, .modal li, .modal td { -webkit-user-select: text; user-select: text; }
body { background: var(--charcoal); color: var(--ink); font: 400 14px/1.45 var(--text); min-width: 1024px; overflow: hidden auto; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.top :focus-visible, .stage :focus-visible, .overlay.dark :focus-visible, .soon :focus-visible { outline-color: #F4F2EC; }
kbd { font: 500 11px/1 var(--text); border: 1px solid currentColor; border-radius: 4px; padding: 2px 5px; opacity: .85; }
[hidden] { display: none !important; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lbl, .eyebrow { font: 500 11px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.top { height: var(--top); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px; background: var(--charcoal); color: var(--stone); border-bottom: 1px solid #33332F; }
.brand { display: flex; align-items: center; gap: 11px; letter-spacing: .02em; }
.brand .mark { width: 20px; height: 20px; border: 1.5px solid var(--stone); border-radius: 50%; position: relative; }
.brand .mark::after { content: ""; position: absolute; width: 8px; height: 1.5px; background: var(--stone); right: -6px; bottom: -2px; transform: rotate(45deg); }
.edition { font: 400 13px/1 var(--text); letter-spacing: .04em; color: #A9A597; }
.edition b { color: var(--stone); font-weight: 500; margin-right: 10px; }
.tools { justify-self: end; display: flex; gap: 4px; }
.icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--stone); }
.icon:hover { background: #2E2E2A; }
.icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon svg .fill { fill: currentColor; stroke: none; }
#btnSound .off { display: none; }
#btnSound.muted .on { display: none; } #btnSound.muted .off { display: inline; }

/* ---------- round 1 ---------- */
main { height: calc(100vh - var(--top)); height: calc(100dvh - var(--top) - env(safe-area-inset-top)); }
.play { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.stage { position: relative; overflow: hidden; overflow: clip; background: var(--charcoal); cursor: crosshair; touch-action: none; user-select: none; }
.stage.panning { cursor: grabbing; }
.stage:focus, .stage:focus-visible { outline: none; }
.stage.locked { cursor: default; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.marks { position: absolute; inset: 0; pointer-events: none; }
.m { position: absolute; left: 0; top: 0; will-change: translate; }

.cursor { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(0,0,0,.45); animation: pop .16s var(--ease); }
.cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.confirm { position: absolute; left: 30px; top: -15px; height: 30px; padding: 0 12px 0 14px; border-radius: 15px; background: var(--paper); color: var(--ink); font: 600 12.5px/30px var(--text); white-space: nowrap; pointer-events: auto; box-shadow: 0 4px 14px rgba(0,0,0,.35); display: flex; gap: 8px; align-items: center; animation: pop .16s var(--ease); }
.confirm:hover { background: #fff; }
.confirm kbd { font-size: 10px; padding: 2px 4px; opacity: .55; }


.pend { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px dashed #fff; opacity: .8; animation: spin 1.2s linear infinite; }
.hit { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid var(--ok); box-shadow: 0 0 0 1.5px #fff, inset 0 0 0 1.5px #fff, 0 2px 8px rgba(0,0,0,.4); animation: land .38s var(--ease); }
.hit .tk { position: absolute; right: -9px; top: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); border: 1.5px solid #fff; display: grid; place-items: center; }
.hit svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.hit .nm { position: absolute; top: 38px; left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--ink); font: 600 12px/1 var(--text); padding: 6px 9px; border-radius: 4px; white-space: nowrap; animation: fadeout 1.8s .2s forwards; }
.miss { width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; animation: shake .36s var(--ease); }
.miss svg { width: 26px; height: 26px; fill: none; stroke: var(--miss); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.miss.old { opacity: .55; animation: none; }

.zoom { display: flex; align-items: center; gap: 2px; border: 1px solid #9C988B; border-radius: 18px; height: 34px; padding: 0 4px; }
.zoom .zl { font: 500 11px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 6px 0 8px; }
.zoom button { width: 28px; height: 28px; border-radius: 14px; color: var(--ink); font: 400 20px/1 var(--display); display: grid; place-items: center; }
.zoom button:hover { background: var(--limestone); }
.zoom .fit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.hint { position: absolute; left: 16px; bottom: 16px; color: #CFCABC; background: rgba(32,32,30,.82); padding: 9px 13px; border-radius: 8px; font-size: 12.5px; transition: opacity .5s; pointer-events: none; }
.hint.gone { opacity: 0; }
.banner { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background: rgba(32,32,30,.94); color: var(--stone); padding: 26px 44px; border-radius: 14px; text-align: center; animation: pop .3s var(--ease); pointer-events: none; }
.banner .b1 { font: 400 34px/1.1 var(--display); color: #fff; }
.banner .b2 { margin-top: 8px; color: #B6B2A4; }

/* bottom bar */
.bar { height: var(--bar); background: var(--stone); display: grid; grid-template-columns: auto minmax(172px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 0 20px; border-top: 1px solid #33332F; }
.b-time { min-width: 112px; }
.b-time .lbl { margin-bottom: 6px; }
.time { font: 300 44px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.time.low { color: var(--miss); }
.time.low.tick { animation: tick 1s steps(1) infinite; }
.b-sel { display: flex; flex-direction: column; gap: 9px; padding-left: 22px; border-left: 1px solid var(--line); height: 72px; justify-content: center; }
.b-sel .row { display: flex; justify-content: space-between; align-items: center; }
.cnt { font: 500 13px/1 var(--text); font-variant-numeric: tabular-nums; }
.pips { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
.pip { height: 8px; border-radius: 4px; background: transparent; border: 1.5px solid #9C988B; transition: background .2s, border-color .2s; }
.pip.used { background: var(--ink); border-color: var(--ink); }
.pip.p-hit { background: var(--ok); border-color: var(--ok); }
.pip.p-miss { background: var(--miss); border-color: var(--miss); }
.pip.p-wait { background: #9C988B; border-color: #9C988B; }
.cards { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: calc(var(--bar) - 20px); }
.card { container-type: inline-size; background: var(--white); border-radius: 7px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 3px 6px; min-width: 0; overflow: hidden; border: 1.5px solid transparent; transition: border-color .25s, opacity .25s; }
.card img { width: 100%; flex: 1; min-height: 0; object-fit: contain; transition: filter .3s, opacity .3s; }
.card .nm { font: 500 clamp(7.5px, 13cqi, 11px)/1.1 var(--text); text-align: center; margin-top: 3px; color: var(--ink); max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tick { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; transform: scale(0); transition: transform .3s var(--ease); }
.card .tick svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card.found { border-color: var(--ok); }
.card.found img { opacity: .45; filter: grayscale(.6); }
.card.found .nm { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.card.found .tick { transform: scale(1); }
.card.justfound { animation: bump .5s var(--ease); }
.card.missed img { opacity: .35; filter: grayscale(1); }
.card .no { position: absolute; left: 4px; top: 3px; font: 600 9.5px/1 var(--text); color: var(--muted); }
.card.missed { border-color: var(--miss); }
.card.missed .nm { color: var(--miss); }
.card.missed::after { display: none; content: "Missed"; position: absolute; left: 4px; top: 4px; font: 600 8.5px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; background: var(--miss); color: #fff; padding: 3px 4px; border-radius: 3px; }
.b-ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.tools2 { display: flex; gap: 6px; }
.tbtn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 8px; border-radius: 16px; border: 1px solid #9C988B; font: 500 12px/1 var(--text); color: var(--ink); }
.tbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.tbtn.on { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }
.tbtn:hover:not(.on) { background: var(--limestone); }
.zoom { display: flex; align-items: center; border: 1px solid #9C988B; border-radius: 16px; height: 32px; padding: 0 3px; }
.zoom button { width: 28px; height: 26px; border-radius: 13px; color: var(--ink); font: 400 19px/1 var(--display); display: grid; place-items: center; }
.zoom button:hover { background: var(--limestone); }
.zoom .fit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ghost { border: 1px solid #9C988B; border-radius: 16px; height: 32px; padding: 0 16px; font-weight: 500; font-size: 12px; color: var(--ink); }
.ghost:hover { background: var(--limestone); }
.ghost.arm { background: var(--oxblood); color: #fff; border-color: var(--oxblood); }
.revealbox { display: flex; align-items: center; gap: 22px; }
.bar.revealed .b-sel { display: none; }
.bar.revealed { grid-template-columns: auto minmax(0, 1fr) auto; }
.rk { font: 400 17px/1.2 var(--display); white-space: nowrap; }
.rpts { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.rpts span { font: 300 32px/1 var(--display); }
.rpts small { color: var(--muted); }
.revealbox .primary { width: auto; white-space: nowrap; }

/* magnifier */
.loupe { position: absolute; left: 0; top: 0; width: var(--loupe); height: var(--loupe); margin: calc(var(--loupe) / -2) 0 0 calc(var(--loupe) / -2); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px rgba(244,242,236,.95), 0 0 0 3px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.5); will-change: transform; z-index: 2; }
.stage.loupe-on { cursor: none; }
.stage.loupe-on.panning { cursor: grabbing; }
.m.ctag { z-index: 3; width: 0; height: 0; }
.ctag .confirm { top: -15px; left: 30px; }
.ctag.flip .confirm { left: auto; right: 30px; }
.ctag.below .confirm { top: 26px; left: -40px; }
.ctag.below.flip .confirm { left: auto; right: -40px; }
.primary { background: var(--charcoal); color: var(--paper); height: 46px; padding: 0 24px; border-radius: 23px; font: 500 15px/1 var(--text); letter-spacing: .01em; transition: transform .12s, background .2s; width: 100%; }
.primary:hover:not(:disabled) { background: #000; }
.primary:active:not(:disabled) { transform: scale(.98); }
.primary:disabled { opacity: .35; }
.primary.big { height: 54px; font-size: 16px; }

/* ---------- coming soon ---------- */
.soon { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--stone); text-align: center; }
.soon h1 { font: 300 46px/1.1 var(--display); margin: 18px 0 10px; color: #fff; }
.soon p { color: #A9A597; }
.count { font: 300 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.count.big { font-size: 40px; margin-top: 26px; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: var(--top) 0 0 0; background: rgba(20,20,18,.62); display: grid; place-items: center; z-index: 20; animation: fade .2s; }
.overlay.dark { background: rgba(14,14,13,.94); inset: 0; }
.modal { background: var(--paper); border-radius: 16px; padding: 38px 44px; width: 520px; max-height: calc(100vh - 60px); overflow: auto; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: rise .3s var(--ease); }
.modal h1 { font: 300 40px/1.05 var(--display); margin: 12px 0 22px; }
.modal h2 { font: 400 28px/1.1 var(--display); margin: 0 0 18px; }
.modal h3 { font: 500 11px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.modal ul { margin: 0; padding-left: 18px; } .modal li { margin: 5px 0; }
.x { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--muted); }
.x:hover { background: var(--stone); }
.x.light { color: #ddd; position: fixed; right: 22px; top: 18px; } .x.light:hover { background: #333; }
.fine { color: var(--muted); font-size: 12px; margin: 16px 0 0; text-align: center; }
.how { list-style: none; padding: 0; margin: 0 0 26px; counter-reset: s; }
.how li { counter-increment: s; position: relative; padding: 0 0 0 44px; margin: 0 0 14px; font-size: 14.5px; }
.how li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font: 500 13px/1 var(--display); }
.how b { display: block; font-weight: 600; }
.load { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.load .bar { flex: 1; height: 3px; background: var(--limestone); border-radius: 2px; overflow: hidden; }
.load i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.load.done { visibility: hidden; }
.results { width: 480px; text-align: center; }
.score { font: 300 104px/1 var(--display); margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.score small { font-size: 22px; color: var(--muted); margin-left: 6px; }
.answer { font: 400 16px/1.3 var(--display); color: var(--muted); margin-bottom: 20px; }
.answer b { color: var(--oxblood); font-weight: 500; letter-spacing: .06em; }
.break { width: 100%; border-collapse: collapse; font-size: 13.5px; text-align: left; }
.break td { padding: 8px 0; border-bottom: 1px solid #E2DED2; }
.break td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.break tr.neg td:last-child { color: var(--miss); }
.break tr.total td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 600; font-size: 15px; padding-top: 11px; }
.break .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.resact { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; margin-top: 24px; }
.next { text-align: center; } .next .count { margin-top: 6px; }
.scoring { width: 100%; border-collapse: collapse; font-size: 13px; }
.scoring td { padding: 6px 0; border-bottom: 1px solid #E2DED2; } .scoring td:last-child { text-align: right; font-weight: 500; white-space: nowrap; padding-left: 12px; }
.stats .nums { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.stats .nums b { display: block; font: 300 34px/1 var(--display); }
.stats .nums span { font-size: 11px; color: var(--muted); }
.dist .r { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; margin: 5px 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.dist .r i { display: block; height: 20px; background: var(--limestone); border-radius: 3px; min-width: 22px; text-align: right; padding-right: 7px; font: 600 11px/20px var(--text); font-style: normal; }
.dist .r.me i { background: var(--ink); color: #fff; }
#keyBox img { max-width: 94vw; max-height: 92vh; border-radius: 6px; }
.toast { position: fixed; left: 50%; top: 76px; transform: translate(-50%, -12px); background: var(--paper); color: var(--ink); padding: 11px 18px; border-radius: 8px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes land { 0% { transform: scale(1.8); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeout { 0%,70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.07); } }
@keyframes tick { 50% { opacity: .55; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.soon .retry { width: auto; margin-top: 26px; }
.small { display: none; }
@media (max-width: 319px), (max-height: 299px) {
  body { min-width: 0; overflow: hidden; }
  .small { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--charcoal); color: var(--stone); flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; }
  .small h1 { font: 300 32px/1.15 var(--display); color: #fff; margin: 16px 0 10px; }
  .small p { color: #A9A597; max-width: 420px; }
}

/* ---------- touch ---------- */
.t-touch { display: none; }
@media (pointer: coarse) {
  .t-desk { display: none !important; }
  .t-touch { display: inline; }
  li.t-touch { display: list-item; }
  #zIn, #zOut { display: none; }
  #btnLoupe span { display: none; }
  #btnLoupe { padding: 0 8px; }
  .ctag { display: none; }
  .stage { cursor: default; }
}
.tconfirm { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: none; gap: 18px; z-index: 4; }
.tconfirm.top { bottom: auto; top: 14px; }
.tconfirm button { height: 48px; border-radius: 24px; padding: 0 24px; font: 600 15px/1 var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.tconfirm .tc-clear { background: rgba(32,32,30,.92); color: var(--paper); border: 1px solid #55544D; }
.tconfirm .tc-ok { background: var(--paper); color: var(--ink); padding: 0 34px; }
@media (pointer: coarse) { body.has-cursor .tconfirm { display: flex; animation: rise .18s var(--ease); } body.has-cursor .hint { display: none; } }

/* ---------- phones and tablets held upright ---------- */
@media (max-width: 760px), (max-width: 1023px) and (orientation: portrait) {
  :root { --top: 48px; --loupe: 150px; }
  body { min-width: 0; }
  .top { grid-template-columns: auto 1fr auto; padding: env(safe-area-inset-top) 8px 0 12px; height: calc(var(--top) + env(safe-area-inset-top)); gap: 8px; }
  .brand { font-size: 17px; gap: 9px; }
  .brand .mark { width: 17px; height: 17px; }
  .edition { justify-self: center; font-size: 12px; white-space: nowrap; }
  .edition b { margin: 0; }
  .edition .d { display: none; }
  .tools { gap: 0; }
  .icon { width: 34px; height: 34px; }
  .icon svg { width: 19px; height: 19px; }
  .bar { height: auto; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time sel ctl" "cards cards cards"; gap: 8px 14px; padding: 9px 10px calc(10px + env(safe-area-inset-bottom)); align-items: center; }
  .b-time { grid-area: time; min-width: 0; }
  .b-time .lbl { display: none; }
  .time { font-size: 32px; }
  .b-sel { grid-area: sel; border-left: 0; padding-left: 0; height: auto; gap: 6px; }
  .b-sel .row .lbl { font-size: 10px; letter-spacing: .1em; }
  .b-ctl { grid-area: ctl; flex-direction: row; align-items: center; gap: 6px; }
  .b-ctl .ghost { padding: 0 12px; }
  .cards { grid-area: cards; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(58px, 15vw, 96px); height: auto; border-left: 0; padding: 0; gap: 5px; }
  .card { padding: 4px 2px 4px; border-radius: 6px; }
  .card .no { font-size: 8.5px; left: 3px; top: 2px; }
  .card .tick { width: 15px; height: 15px; right: 3px; top: 3px; }
  .card .tick svg { width: 9px; height: 9px; }
  .bar.revealed { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time rv" "cards cards"; }
  .revealbox { grid-area: rv; justify-content: flex-end; gap: 12px; }
  .rk { font-size: 13.5px; white-space: normal; }
  .rpts { margin-top: 2px; } .rpts span { font-size: 24px; } .rpts small { white-space: nowrap; font-size: 11.5px; }
  .revealbox .primary { height: 42px; padding: 0 16px; font-size: 14px; }
  .hint { left: 10px; right: 10px; bottom: 10px; font-size: 12px; text-align: center; }
  .banner { padding: 18px 26px; width: max-content; max-width: 86%; }
  .banner .b1 { font-size: 26px; }
  .overlay { place-items: end center; }
  .modal { width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); max-height: calc(100dvh - var(--top) - 8px); }
  .modal h1 { font-size: 32px; margin-bottom: 16px; }
  .modal h2 { font-size: 24px; }
  .how li { font-size: 14px; }
  .results .score { font-size: 80px; }
  .resact { grid-template-columns: 1fr; gap: 14px; }
  .stats .nums b { font-size: 26px; }
  .stats .nums span { font-size: 10px; }
  .soon h1 { font-size: 30px; padding: 0 16px; }
  .toast { top: calc(var(--top) + 12px); max-width: 90vw; text-align: center; }
}

/* ---------- phones on their side ---------- */
@media (max-height: 500px) and (orientation: landscape), (min-width: 761px) and (max-width: 1023px) and (orientation: landscape) {
  :root { --top: 40px; --loupe: 140px; }
  body { min-width: 0; }
  .top { padding: 0 max(10px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
  .brand { font-size: 16px; }
  .edition .d { display: none; }
  .icon { width: 32px; height: 32px; }
  .play { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 292px; }
  .bar { height: 100%; border-top: 0; border-left: 1px solid #33332F; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time sel" "cards cards" "ctl ctl"; grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; gap: 8px 12px; padding: 8px max(10px, env(safe-area-inset-right)) 8px 10px; }
  .b-time { grid-area: time; min-width: 0; } .b-time .lbl { display: none; }
  .time { font-size: 28px; }
  .b-sel { grid-area: sel; border-left: 0; padding-left: 0; height: auto; gap: 5px; }
  .b-ctl { grid-area: ctl; flex-direction: row; justify-content: space-between; align-items: center; }
  .cards { grid-area: cards; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); height: auto; border-left: 0; padding: 0; gap: 4px; min-height: 0; }
  .card { padding: 3px 2px; min-height: 0; }
  .card img { min-height: 0; }
  .bar { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .intro .primary { position: sticky; bottom: 0; }
  .card .no { font-size: 8px; }
  .card .tick { width: 14px; height: 14px; }
  .bar.revealed { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time time" "cards cards" "rv rv"; }
  .revealbox { grid-area: rv; justify-content: space-between; gap: 8px; }
  .rk { font-size: 13px; white-space: normal; } .rpts span { font-size: 22px; }
  .revealbox .primary { height: 38px; padding: 0 14px; font-size: 13px; }
  .hint { display: none; }
  .tconfirm { bottom: 10px; }
  .tconfirm button { height: 42px; }
  .overlay { place-items: center; }
  .modal { max-height: calc(100dvh - var(--top) - 12px); padding: 22px 24px; }
  .modal h1 { font-size: 28px; margin: 6px 0 12px; }
  .how li { margin-bottom: 8px; }
  .results .score { font-size: 64px; }
}

.top, .bar { touch-action: none; }
.overlay { touch-action: pan-y; }

/* bigger touch targets on phones */
@media (pointer: coarse) {
  .ghost, .tbtn, .zoom { height: 40px; border-radius: 20px; }
  .zoom button { width: 36px; height: 34px; }
  .icon { width: 40px; height: 40px; }
}

@media (max-height: 400px) and (orientation: landscape) {
  .card .nm, .card .no { display: none; }
  .b-sel .row:last-child { display: none; }
  .time { font-size: 24px; }
  .modal { padding: 14px 20px; }
  .modal h1 { font-size: 22px; margin: 4px 0 8px; }
  .how li { font-size: 12.5px; margin-bottom: 4px; padding-left: 36px; }
  .how li::before { width: 22px; height: 22px; }
  .intro .fine, .intro .load { display: none; }
  .bar { gap: 6px 10px; padding-top: 6px; }
  .ghost, .tbtn, .zoom { height: 34px !important; }
  .zoom button { height: 28px !important; }
}

/* ---------- entry screen ---------- */
.entry { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; overflow: hidden; background: var(--charcoal); color: #fff; text-align: center; }
.entry-bg { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; filter: blur(2px) saturate(1.35) brightness(1.05); transform: scale(1.04); opacity: 0; transition: opacity .8s ease; }
.entry-bg.in { opacity: 1; animation: drift 40s ease-in-out infinite alternate; }
.entry-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 45% at 50% 50%, rgba(20,20,18,.42), rgba(20,20,18,.12) 70%, rgba(20,20,18,.30) 100%), linear-gradient(180deg, rgba(20,20,18,.30) 0%, rgba(20,20,18,0) 22%, rgba(20,20,18,0) 75%, rgba(20,20,18,.45) 100%); }
.entry-in { position: relative; padding: calc(24px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; max-width: 720px; animation: rise .6s var(--ease) both; }
.entry-no { white-space: nowrap; font: 500 12px/1 var(--text); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.82); background: rgba(20,20,18,.35); padding: 8px 14px; border-radius: 16px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.entry-tag { margin: 18px 0 30px; font: 400 clamp(17px, 2.2vw, 21px)/1.45 var(--display); color: rgba(255,255,255,.92); text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.entry-btn { height: 60px; padding: 0 44px; border-radius: 30px; background: var(--paper); color: var(--ink); font: 600 18px/1 var(--text); letter-spacing: .01em; box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 -3px 0 rgba(0,0,0,.08); transition: transform .15s var(--ease), box-shadow .15s; }
.entry-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.5), inset 0 -3px 0 rgba(0,0,0,.08); }
.entry-btn:active { transform: translateY(1px); }
.entry-links { margin-top: 20px; display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.6); }
.entry-links button { color: rgba(255,255,255,.88); font: 500 14px/1 var(--text); padding: 10px 6px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35); }
.entry-links button:hover { color: #fff; }
.entry :focus-visible { outline-color: #F4F2EC; }
.entry.out { opacity: 0; transition: opacity .38s ease; pointer-events: none; }
.overlay { z-index: 20; }
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
@keyframes swash { to { stroke-dashoffset: 0; } }
@media (max-height: 500px) and (orientation: landscape) {
  .logo.big { font-size: clamp(40px, 11vh, 70px); margin-top: 14px; }
  .entry-tag { margin: 10px 0 16px; font-size: 15px; }
  .entry-btn { height: 50px; font-size: 16px; }
  .entry-links { margin-top: 8px; }
}

/* before Start, the stage shows the same blurred backdrop instead of black */
.stage-bg { position: absolute; inset: -3%; width: 106%; height: 106%; object-fit: cover; filter: blur(2px) saturate(1.3) brightness(.75); pointer-events: none; }
@media (max-width: 420px) { .entry-no { font-size: 11px; letter-spacing: .14em; } }

/* ---------- PICADAY wordmark: letters cut from paper and photos ---------- */
.logo { display: inline-flex; align-items: center; gap: .05em; margin: 0; line-height: 1; font-size: 20px; }
.logo.big { font-size: clamp(50px, 11.5vw, 128px); margin: 26px 0 4px; gap: .06em; }
.logo .cut { display: inline-block; filter: drop-shadow(0 .05em .05em rgba(0,0,0,.35)) drop-shadow(0 .14em .22em rgba(0,0,0,.25)); transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); }
.logo .cut b { display: grid; place-items: center; min-width: .78em; height: 1.16em; padding: 0 .12em; font-weight: 400; font-size: var(--s, 1em); color: var(--ink2, #20201E); background: var(--bgc, #F4EBD8); background-size: cover; background-position: center;
  clip-path: polygon(2% 4%, 18% 0%, 41% 3%, 63% 0%, 86% 2%, 100% 0%, 98% 26%, 100% 52%, 97% 77%, 100% 100%, 79% 97%, 55% 100%, 33% 97%, 12% 100%, 0% 98%, 3% 71%, 0% 46%, 2% 22%); }
.logo .cut.ph b { color: #fff; text-shadow: 0 .03em 0 rgba(0,0,0,.55), 0 0 .12em rgba(0,0,0,.55); }
.logo .f1 b { font-family: "Abril Fatface", Georgia, serif; }
.logo .f2 b { font-family: "Archivo Black", Impact, sans-serif; }
.logo .f3 b { font-family: "DM Serif Display", Georgia, serif; font-style: normal; }
.logo .f4 b { font-family: var(--brand); }
.logo .f5 b { font-family: Jost, sans-serif; font-weight: 600; }
.logo.big .cut { animation: drop .5s var(--ease) both; }
.logo.big .cut:nth-child(2) { animation-delay: .05s; } .logo.big .cut:nth-child(3) { animation-delay: .1s; } .logo.big .cut:nth-child(4) { animation-delay: .15s; }
.logo.big .cut:nth-child(5) { animation-delay: .2s; } .logo.big .cut:nth-child(6) { animation-delay: .25s; } .logo.big .cut:nth-child(7) { animation-delay: .3s; }
@keyframes drop { from { opacity: 0; transform: rotate(calc(var(--r, 0deg) * 3)) translateY(-.4em) scale(1.15); } }
.logo.mini { font-size: 17px; gap: 2px; }
.logo.mini .cut { filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }

/* before Start nobody gets to study the objects: cards are blurred, then sharpen when the clock starts */
.card img, .card .nm { transition: filter .5s ease, opacity .5s ease; }
body.prestart .card img { filter: blur(7px) grayscale(.3); opacity: .7; }
body.prestart .card .nm { filter: blur(4px); }

/* ---------- language ---------- */
.tools { position: relative; }
.icon.lang { width: auto; min-width: 36px; padding: 0 6px; font: 600 12px/1 var(--text); letter-spacing: .08em; }
.icon.lang span { border: 1.5px solid currentColor; border-radius: 6px; padding: 4px 5px 3px; }
.langmenu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 180px; padding: 6px; border-radius: 12px; background: #2A2A27; border: 1px solid #3C3C37; box-shadow: 0 14px 34px rgba(0,0,0,.4); display: flex; flex-direction: column; }
.langmenu[hidden] { display: none; }
.langmenu button { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 12px; border-radius: 8px; color: var(--stone); font: 500 15px/1 var(--text); text-align: left; }
.langmenu button i { font-style: normal; font-size: 11px; letter-spacing: .1em; opacity: .55; }
.langmenu button:hover, .langmenu button:focus-visible { background: #34342F; }
.langmenu button[aria-checked="true"] { color: #fff; }
.langmenu button[aria-checked="true"] i { opacity: 1; color: var(--paper, #F4EBD8); }
.entry-lang { position: absolute; z-index: 2; top: calc(14px + env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: flex; padding: 3px; border-radius: 20px; background: rgba(20,20,18,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.entry-lang button { min-width: 40px; height: 32px; padding: 0 10px; border-radius: 16px; color: rgba(255,255,255,.8); font: 600 12px/1 var(--text); letter-spacing: .1em; }
.entry-lang button[aria-pressed="true"] { background: rgba(255,255,255,.92); color: #20201E; }
.entry-lang button:hover:not([aria-pressed="true"]) { color: #fff; background: rgba(255,255,255,.12); }
@media (pointer: coarse) { .entry-lang button { min-width: 44px; height: 36px; } }
@media (max-width: 760px), (max-width: 1023px) and (orientation: portrait) { .icon.lang { min-width: 34px; padding: 0 3px; font-size: 11px; } }

/* longer French and Spanish labels: counts never wrap, labels give way first */
.cnt { white-space: nowrap; }
.b-sel .row { gap: 10px; }
.b-sel .row .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- How to play: looping demos (CSS only; positions run on registered custom properties) ---------- */
@property --fx { syntax: "<number>"; inherits: true; initial-value: 80; }
@property --fy { syntax: "<number>"; inherits: true; initial-value: 80; }
@property --pr { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --ring { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --cf { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --hit { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --z { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --pan { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --two { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --ln { syntax: "<number>"; inherits: true; initial-value: 0; }
.demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 6px; }
.demo { margin: 0; }
.demo figcaption { font: 500 12.5px/1.35 var(--text); color: var(--ink); margin-top: 8px; }
.dscene { container-type: inline-size; position: relative; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #3A2E26; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.dimg { position: absolute; inset: 0; background: #6B4A2F url("demo.svg") center / cover; } /* a made-up shelf: never a real scene, so the demos give nothing away */
.dscene > b { position: absolute; display: block; }
/* finger and pointer */
.dfinger { left: calc(var(--fx) * 1cqw); top: calc(var(--fy) * 1cqw); width: 13cqw; height: 13cqw; margin: -6.5cqw 0 0 -6.5cqw; border-radius: 50%; background: rgba(255,255,255,.55); border: 1.5px solid rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.35); transform: scale(calc(1 - var(--pr) * .25)); }
.dcursor { display: none; left: calc(var(--fx) * 1cqw); top: calc(var(--fy) * 1cqw); width: 9cqw; height: 13cqw; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 26'%3E%3Cpath d='M1 1v20l5.5-5 3.8 8.5 3.4-1.5-3.8-8.3H17z' fill='%23fff' stroke='%23111' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E"); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); transform: scale(calc(1 - var(--pr) * .12)); transform-origin: 0 0; }
.dscene > .dcursor { display: none; }
@media (pointer: fine) { .demo .dscene > .dfinger { display: none; } .demo .dscene > .dcursor { display: block; } }
/* 1: place a marker, then confirm */
.dring { left: 34cqw; top: 57cqw; width: 15cqw; height: 15cqw; margin: -7.5cqw 0 0 -7.5cqw; border-radius: 50%; border: 2px dashed #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); opacity: var(--ring); transform: scale(calc(.6 + var(--ring) * .4)); }
.dhit { left: 34cqw; top: 57cqw; width: 15cqw; height: 15cqw; margin: -7.5cqw 0 0 -7.5cqw; border-radius: 50%; background: var(--ok, #2E7D4F); border: 2px solid #fff; display: grid !important; place-items: center; opacity: var(--hit); transform: scale(calc(.5 + var(--hit) * .5)); }
.dhit svg { width: 70%; height: 70%; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dconf { left: 43cqw; top: 57cqw; margin-top: -5.5cqw; height: 11cqw; padding: 0 3.5cqw; border-radius: 6cqw; background: var(--paper); color: var(--ink); font: 600 6.2cqw/11cqw var(--text); white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.35); opacity: var(--cf); transform: scale(calc(.7 + var(--cf) * .3)); transform-origin: 0 50%; }
.d1 .dscene { animation: demo1 5s ease-in-out infinite; }
@keyframes demo1 {
  0% { --fx: 86; --fy: 80; --pr: 0; --ring: 0; --cf: 0; --hit: 0; }
  20% { --fx: 34; --fy: 57; --pr: 0; }
  24% { --pr: 1; } 27% { --pr: 0; --ring: 0; }
  30% { --ring: 1; --cf: 0; } 34% { --cf: 1; --fx: 34; --fy: 57; }
  48% { --fx: 55; --fy: 59; --pr: 0; }
  52% { --pr: 1; --cf: 1; } 55% { --pr: 0; }
  58% { --cf: 0; --ring: 1; --hit: 0; } 62% { --ring: 0; --hit: 1; }
  78% { --fx: 86; --fy: 82; }
  90% { --hit: 1; } 98%, 100% { --hit: 0; --fx: 86; --fy: 80; }
}
/* 2: zoom, then look around */
.d2 .dimg { transform: scale(var(--z)) translateX(calc(var(--pan) * 18%)); transform-origin: 50% 50%; }
.d2 .dfinger { opacity: calc(var(--two) + var(--pan) * 0); }
.d2 .f1 { left: calc((44 - (var(--z) - 1) * 18 + var(--pan) * 22) * 1cqw); top: calc((40 - (var(--z) - 1) * 10) * 1cqw); }
.d2 .f2 { left: calc((56 + (var(--z) - 1) * 18) * 1cqw); top: calc((60 + (var(--z) - 1) * 10) * 1cqw); opacity: calc(var(--two) * (1 - var(--pan))); }
.d2 .dcursor { left: calc((50 + var(--pan) * 22) * 1cqw); top: 50cqw; }
.d2 .dscene { animation: demo2 5s ease-in-out infinite; }
@keyframes demo2 {
  0% { --z: 1; --pan: 0; --two: 0; }
  10% { --two: 1; --z: 1; } 40% { --z: 1.9; --two: 1; --pan: 0; }
  50% { --pan: 0; } 75% { --pan: 1; --two: 1; } 82% { --two: 0; --pan: 1; --z: 1.9; }
  94%, 100% { --z: 1; --pan: 0; --two: 0; }
}
/* 3: press and hold to magnify (on a mouse, the lens simply follows the pointer) */
.d3 { --ldy: -27; }
@media (pointer: fine) { .d3 { --ldy: 0; } }
.dlens { left: calc(var(--fx) * 1cqw); top: calc((var(--fy) + var(--ldy)) * 1cqw); width: 38cqw; height: 38cqw; margin: -19cqw 0 0 -19cqw; border-radius: 50%; overflow: hidden; border: 2.5px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.45); opacity: var(--ln); transform: scale(calc(.6 + var(--ln) * .4)); }
.dlens .dimg { inset: auto; width: 250cqw; height: calc(250cqw * 2 / 3); left: calc(19cqw - var(--fx) * 2.5cqw); top: calc(19cqw - var(--fy) * 2.5cqw); }
.dlens::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5cqw; height: 5cqw; margin: -2.5cqw; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.d3 .dring { left: calc(var(--fx) * 1cqw); top: calc(var(--fy) * 1cqw); }
.d3 .dscene { animation: demo3 5s ease-in-out infinite; }
@keyframes demo3 {
  0% { --fx: 24; --fy: 82; --pr: 0; --ln: 0; --ring: 0; }
  14% { --fx: 28; --fy: 62; --pr: 0; } 18% { --pr: 1; --ln: 0; } 24% { --ln: 1; --fx: 28; --fy: 62; }
  58% { --fx: 66; --fy: 58; --ln: 1; --pr: 1; } 64% { --pr: 0; --ln: 0; --ring: 0; } 68% { --ring: 1; }
  90% { --ring: 1; --fx: 66; --fy: 58; } 100% { --ring: 0; --fx: 24; --fy: 82; }
}
@media (pointer: fine) { @keyframes demo3 {
  0% { --fx: 22; --fy: 46; --ln: 1; --ring: 0; } 35% { --fx: 50; --fy: 26; } 70% { --fx: 76; --fy: 44; } 100% { --fx: 22; --fy: 46; --ln: 1; }
} }
@media (prefers-reduced-motion: reduce) { .demo .dscene { animation-duration: 12s; } }
@media (max-width: 520px) {
  .demos { grid-template-columns: 1fr; gap: 10px; }
  .demo { display: grid; grid-template-columns: 46% 1fr; gap: 12px; align-items: center; }
  .demo figcaption { margin: 0; font-size: 13.5px; }
}
@media (max-width: 380px) { .b-sel .row .lbl { letter-spacing: 0; font-size: 9.5px; } .b-sel .row { gap: 6px; } }
@media (max-width: 380px) { .bar { gap: 8px 10px; } .time { font-size: 28px; } .b-ctl { gap: 4px; } .b-ctl .ghost { padding: 0 10px; } }

/* print-at-home link on the results card */
.printbtn { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: background .15s; }
.printbtn:hover { background: #ECE9E1; }
.printbtn[hidden] { display: none; }
.printbtn svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.printbtn b { display: block; font: 600 14px/1.2 var(--text); }
.printbtn small { display: block; font: 400 12px/1.3 var(--text); color: var(--muted); margin-top: 2px; }
.entry-links a { color: rgba(255,255,255,.88); font: 500 14px/1 var(--text); padding: 10px 6px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35); }
.printbtn span { text-align: left; }

/* front-door wordmark: playful idle moves on the letter scraps (the scrap keeps its tilt; the move rides on top) */
.logo.big .cut { cursor: default; -webkit-tap-highlight-color: transparent; }
.logo.big .cut b { transform-origin: 50% 85%; }
.logo.big .cut.mv-hop b { animation: lg-hop .62s cubic-bezier(.3,.7,.4,1); }
.logo.big .cut.mv-wiggle b { animation: lg-wiggle .7s ease-in-out; }
.logo.big .cut.mv-flip b { animation: lg-flip .8s cubic-bezier(.4,.1,.3,1); }
.logo.big .cut.mv-spin b { animation: lg-spin .9s cubic-bezier(.5,.1,.3,1); transform-origin: 50% 50%; }
.logo.big .cut.mv-peek b { animation: lg-peek .9s ease-in-out; }
.logo.big .cut.mv-squish b { animation: lg-squish .6s ease-in-out; transform-origin: 50% 100%; }
@keyframes lg-hop { 0%, 100% { transform: none; } 18% { transform: scale(1.06, .9); } 45% { transform: translateY(-.32em) rotate(-4deg); } 70% { transform: translateY(0) scale(1.04, .94); } 85% { transform: translateY(-.05em); } }
@keyframes lg-wiggle { 0%, 100% { transform: none; } 20% { transform: rotate(9deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(5deg); } 80% { transform: rotate(-3deg); } }
@keyframes lg-flip { 0% { transform: perspective(400px) rotateY(0); } 50% { transform: perspective(400px) rotateY(180deg) scale(1.08); } 100% { transform: perspective(400px) rotateY(360deg); } }
@keyframes lg-spin { 0% { transform: rotate(0); } 70% { transform: rotate(370deg) scale(1.05); } 100% { transform: rotate(360deg); } }
@keyframes lg-peek { 0%, 100% { transform: none; } 30%, 60% { transform: translateY(.18em) rotate(6deg) scale(.96); } 75% { transform: translateY(-.08em) rotate(-2deg); } }
@keyframes lg-squish { 0%, 100% { transform: none; } 30% { transform: scale(1.18, .78); } 55% { transform: scale(.9, 1.14); } 75% { transform: scale(1.04, .97); } }
@media (prefers-reduced-motion: reduce) { .logo.big .cut b { animation: none !important; } }

/* admin preview marker */
.previewbar { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: #B8892B; color: #20201E; font: 600 12px/1 var(--text); letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; border-radius: 16px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); white-space: nowrap; }
body.is-preview .bar { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }

/* 5-4-3-2-1 countdown after Start */
.countdown { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(20,20,18,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.countdown[hidden] { display: none; }
.cdlogo { font-size: min(46vmin, 300px); }
.cdlogo .cut { animation: cd-pop .9s cubic-bezier(.2,.8,.25,1) both; }
.cdlogo .cut b { min-width: .9em; }
.cdlogo .cut.go b { padding: 0 .3em; white-space: nowrap; }
@keyframes cd-pop { 0% { opacity: 0; transform: rotate(calc(var(--r) * 4)) scale(1.6) translateY(-.2em); } 22% { opacity: 1; transform: rotate(var(--r)) scale(.94); } 34% { transform: rotate(var(--r)) scale(1.03); } 46%, 78% { transform: rotate(var(--r)) scale(1); opacity: 1; } 100% { opacity: 0; transform: rotate(var(--r)) scale(.8) translateY(.08em); } }
@media (prefers-reduced-motion: reduce) { .cdlogo .cut { animation: none; } }

/* share buttons on the results card */
.sharebar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.sharebar .sh { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 11px; border-radius: 20px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 500 13px/1 var(--text); background: #fff; }
.sharebar .sh[hidden] { display: none; }
.sharebar .sh:hover { background: #ECE9E1; }
.sharebar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sharebar svg .f { fill: currentColor; stroke: none; }
.sharebar .sh-whatsapp svg { color: #1F8F4E; } .sharebar .sh-facebook svg { color: #1F5FBF; }
.sharenote { margin: 8px 0 0; text-align: center; font: 400 12px/1.4 var(--text); color: var(--muted); }
@media (pointer: coarse) { .sharebar .sh { height: 44px; } }

.results .resact { grid-template-columns: 1fr; }
.results .next { margin-top: 20px; }
