/* nycweedprice.org: one stylesheet for every page. System fonts only, no external assets (see _headers CSP). */

/* Tokens. Paper and ink for content; the board is the dark band (header, heroes, alerts, footer). */
:root {
  color-scheme: light dark;
  --paper: #f5f4f0; --surface: #fff; --sunk: #ebeae5;
  --ink: #17181a; --ink-2: #45484d; --ink-3: #5f6267;
  --line: rgba(23, 24, 26, .12); --line-2: rgba(23, 24, 26, .24);
  --accent: #c8ff00; --accent-hover: #b4e600; --on-accent: #111;
  --accent-ink: #2f5a00; --focus: #2f5a00;
  --board: #0f1011; --board-2: #1c1d1f; --board-ink: #f2f1ec; --board-ink-2: #b6b5af; --board-line: rgba(242, 241, 236, .14);
  --hole: var(--board);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1); --fast: 120ms; --mid: 220ms;
  --wrap: 72rem;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111213; --surface: #18191b; --sunk: #0b0c0d;
    --ink: #ecebe6; --ink-2: #bebdb7; --ink-3: #9a9993;
    --line: rgba(236, 235, 230, .11); --line-2: rgba(236, 235, 230, .22);
    --accent-ink: #c8ff00; --focus: #c8ff00;
    --board: #0a0b0c;
  }
}
/* Anything on the board swaps the content tokens for board ones. */
.on-board {
  background: var(--board); color: var(--board-ink);
  --ink: var(--board-ink); --ink-2: var(--board-ink-2); --ink-3: var(--board-ink-2);
  --line: var(--board-line); --line-2: rgba(242, 241, 236, .26);
  --surface: var(--board-2); --sunk: #050506;
  --accent-ink: var(--accent); --focus: var(--accent);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; background: var(--paper); color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
a { color: var(--accent-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
small, .fine { color: var(--ink-3); }
small { font-size: 13px; }
.fine { font-size: 14px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -64px; z-index: 50; padding: 8px 16px; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; }
.skip:focus { top: 8px; }
.wrap, .topbar-in, .hero-in { max-width: var(--wrap); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 48rem) { .wrap, .topbar-in, .hero-in { padding-left: 24px; padding-right: 24px; } }
main.wrap { padding-top: 32px; padding-bottom: 32px; }
main > section + section, main > * + .section, main > .section + * { margin-top: 48px; }
main > p.fine + section { margin-top: 32px; }

/* Top bar and tabs. On small screens the brand row scrolls away and the tab strip stays. */
.topbar { position: sticky; top: -52px; z-index: 20; border-bottom: 1px solid var(--board-line); }
.brand { display: inline-flex; align-items: center; gap: 8px; height: 52px; color: var(--board-ink); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .tld { color: var(--accent); font-weight: 500; }
.brand svg { width: 24px; height: 24px; flex: none; }
.tabs { position: relative; margin: 0 -16px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs ul { display: flex; gap: 4px; width: max-content; margin: 0; padding: 0 32px 0 8px; list-style: none; }
.tabs a { position: relative; display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--r-sm) var(--r-sm) 0 0; color: var(--board-ink-2); font-size: 15px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.tabs a:hover { color: var(--board-ink); background: var(--board-2); }
.tabs a[aria-current="page"] { color: var(--board-ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs a:focus-visible { outline-offset: -3px; }
@media (min-width: 60rem) {
  .topbar { top: 0; }
  .topbar-in { display: flex; align-items: center; gap: 24px; }
  .brand { height: 60px; }
  .tabs { margin: 0 0 0 auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .tabs ul { padding: 0; }
  .tabs a { height: 60px; border-radius: 0; }
}

/* Hero */
.hero-in { padding-top: 32px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(32px, 8vw, 56px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 16px; max-width: 16ch; }
.hero .lede, .hero .asof { font-size: 17px; color: var(--ink-2); max-width: 36rem; }
.hero .asof time { color: var(--ink); }
.hero .fine { color: var(--ink-2); }
.hero a { color: var(--ink); }
.kicker { margin: 0 0 12px; color: var(--accent); font-size: 15px; font-weight: 500; }
.kicker a { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 56rem) {
  .hero-in { padding-top: 56px; padding-bottom: 64px; }
  .hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
  .hero-split h1 { margin-bottom: 20px; }
}

/* Buttons */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-sm); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary, a.btn-primary { background: var(--accent); color: var(--on-accent); border-color: rgba(0, 0, 0, .12); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost, a.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--sunk); }

/* The price tag: the site's one bright object. */
.tags { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 30rem) { .tags { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56rem) { .hero-split .tags { margin-top: 0; } }
.tags.one { grid-template-columns: 1fr; max-width: 24rem; }
.tag { position: relative; padding: 18px 20px 20px 40px; border-radius: 14px; background: var(--accent); color: #111; clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px), 0 20px); --focus: #111; }
.tag::before { content: ""; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--hole); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.tag a { color: #111; }
.tag .tag-label { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: #23251c; }
.tag .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.tag .big a { text-decoration-thickness: 2px; text-underline-offset: .12em; }
.tag .big small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: #2a2c22; }
.tag .tag-meta { margin: 0; font-size: 14px; line-height: 1.45; color: #23251c; }
.tag .tag-meta small { color: #2a2c22; }
.tag-sm { padding: 12px 16px 14px 36px; }
.tag-sm .big { font-size: 32px; margin: 0; }
.tag-sm .tag-label { margin-bottom: 4px; font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .tags .tag { animation: rise 420ms var(--ease) both; }
  .tags .tag:nth-child(2) { animation-delay: 70ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* Panels and sections */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
@media (min-width: 48rem) { .panel { padding: 24px; } }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.notice { padding: 12px 16px; border-radius: var(--r); border: 1px solid #d9a400; background: rgba(217, 164, 0, .12); }

/* Home filters */
#filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; margin-bottom: 20px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.seg { display: inline-flex; flex-wrap: nowrap; max-width: 100%; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; padding: 0 12px; white-space: nowrap; border-radius: var(--r-sm); color: var(--ink-2); font-size: 15px; font-weight: 500; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 -3px 0 var(--accent-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
@media (max-width: 22rem) { .seg span { min-width: 0; padding: 0 8px; font-size: 14px; } }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 14rem; font-size: 13px; font-weight: 500; color: var(--ink-3); }
select, input[type="search"], input[type="email"], input[type="number"], input[type="text"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; transition: border-color var(--fast) var(--ease); }
select:hover, input:hover { border-color: var(--ink-3); }
.near-me { margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
.near-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 8px; }
.near-controls .btn { flex: 1 1 12rem; max-width: 20rem; }
.near-controls .field { flex: 0 1 10rem; }
.near-me p { margin: 0; }
#cheapMsg:not(:empty) { margin-top: 8px; font-weight: 600; }
#nearMsg:empty { display: none; }
#nearMsg { flex-basis: 100%; margin: 0; }

/* Price spread for the current filter: three figures over one tick per store */
.spread { margin: 0 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
.spread-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.spread-figs dt { font-size: 13px; color: var(--ink-3); }
.spread-figs dd { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.2; }
.spread-figs div:first-child dd { color: var(--accent-ink); }
.spread-figs div:nth-child(2) { text-align: center; }
.spread-figs div:last-child { text-align: right; }
.spread-strip { position: relative; height: 28px; margin: 0 6px; }
.spread-strip::before { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 1px; background: var(--line-2); }
.spread-strip i { position: absolute; top: 6px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--ink-3); opacity: .55; }
.spread-strip i.lo { width: 4px; margin-left: -2px; top: 2px; height: 24px; background: var(--accent-ink); opacity: 1; }
.spread-strip b { position: absolute; top: 0; width: 12px; height: 12px; margin-left: -6px; border: 2px solid var(--ink); border-radius: 50%; background: var(--sunk); transform: translateY(8px); }

/* Home results: a ranked list with a price bar */
.count { margin: 0 0 8px; font-size: 14px; color: var(--ink-3); }
.results { width: 100%; border-collapse: collapse; }
.results caption { padding: 0 0 8px; text-align: left; font-size: 13px; color: var(--ink-3); }
.results th { padding: 8px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.results th:last-child { text-align: right; }
.results td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.results tbody tr { transition: background-color var(--fast) var(--ease); }
.results tbody tr:hover { background: var(--sunk); }
.results .rank { width: 2.5rem; padding-top: 17px; color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.results .top .rank { color: var(--accent-ink); font-weight: 600; }
.store-name { font-weight: 600; }
.store-name a { color: var(--ink); text-decoration: none; }
.store-name a:hover { text-decoration: underline; }
.product { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.product a { color: var(--ink-2); }
.bar { display: block; max-width: 18rem; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--line); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink-3); }
.top .bar i { background: var(--accent-ink); }
.price { width: 1%; text-align: right; white-space: nowrap; font-size: 20px; font-weight: 600; }
.price a { color: var(--ink); }
.price small { display: block; font-weight: 400; white-space: normal; }
.results .product, .results td small { overflow-wrap: break-word; }

/* Alerts band */
.cta { display: grid; gap: 16px 32px; padding: 24px 16px; border-radius: var(--r-lg); }
@media (min-width: 48rem) { .cta { grid-template-columns: 1fr 1fr; align-items: center; padding: 32px; } }
.cta h2 { font-size: 28px; }
.cta p { color: var(--ink-2); }
.alert { display: flex; flex-wrap: wrap; gap: 8px; }
.alert input[type="email"] { flex: 1 1 12rem; width: auto; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Questions and link lists */
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 12px 0; font-size: 17px; font-weight: 500; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; color: var(--ink-3); font-family: var(--mono); font-size: 20px; line-height: 1; transition: transform var(--mid) var(--ease); }
details[open] > summary::after { transform: rotate(45deg); }
details > p, details > ul { margin: 0 0 16px; color: var(--ink-2); max-width: 46rem; }
.links { columns: 2 12rem; column-gap: 24px; padding: 0; list-style: none; }
.links li { break-inside: avoid; padding: 4px 0; }

/* Data tables (coverage, cheapest, index, plus, store and neighborhood pages) */
.scroll, .table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.scroll table, .table-wrap table { width: 100%; border-collapse: collapse; overflow-wrap: break-word; }
.scroll caption { padding: 16px 16px 8px; text-align: left; font-size: 15px; font-weight: 600; }
.scroll th, .scroll td, .table-wrap th, .table-wrap td { padding: 12px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.scroll thead th, .table-wrap thead th { border-top: 0; font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.scroll caption + thead th { border-top: 1px solid var(--line); }
.scroll tbody tr, .table-wrap tbody tr { transition: background-color var(--fast) var(--ease); }
.scroll tbody tr:hover, .table-wrap tbody tr:hover { background: var(--sunk); }
.scroll tbody th { font-weight: 500; }
@media (max-width: 30rem) {
  /* Phones: every column has to fit (no sideways scrolling), so cells get tight and headers wrap. */
  .scroll th, .scroll td, .table-wrap th, .table-wrap td { padding: 10px 4px; font-size: 14px; }
  .scroll tr > :first-child, .table-wrap tr > :first-child { padding-left: 8px; }
  .scroll tr > :last-child, .table-wrap tr > :last-child { padding-right: 8px; }
  .scroll thead th, .table-wrap thead th { white-space: normal; font-size: 12px; }
  .scroll caption { padding: 12px 10px 8px; }
  /* Long URLs and names in text columns may break anywhere; figures never do. */
  .store-cell, .scroll td:last-child:nth-child(3) { overflow-wrap: anywhere; }
  .menu-cell .btn { gap: 4px; padding: 0 6px; font-size: 13px; white-space: nowrap; }
  .store-cell small a { white-space: nowrap; }
  .store-cell small { font-size: 12px; }
  .scroll tbody th, .scroll .date-cell { white-space: nowrap; }
}
.prose { max-width: 50rem; }
/* A prose page keeps the page edge of the header and hero; only its measure is narrower. */
.wrap.prose { max-width: var(--wrap); }
.wrap.prose > * { max-width: 50rem; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose h2 { margin-top: 40px; }
.pager { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Store and neighborhood pages */
.crumbs { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.address { color: var(--ink-2); margin-bottom: 20px; }
.hero .tags { max-width: 34rem; }
.list-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 12px; margin-bottom: 16px; }
.list-filters label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.list-note { font-size: 14px; color: var(--ink-3); margin-bottom: 12px; }
.product-cell a { color: var(--ink); }
.size-cell { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.price-cell { width: 1%; text-align: right !important; white-space: nowrap; font-size: 17px; font-weight: 600; }
.price-cell a { color: var(--ink); }
thead .price-cell { font-size: 13px; font-weight: 500; }
.no-data { color: var(--ink-3); padding: 16px 0; }
.history { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.sparkline { display: block; width: 100%; max-width: 320px; height: auto; color: var(--accent-ink); }
.stat { display: flex; flex-direction: column; }
.stat span:first-child { font-size: 13px; color: var(--ink-3); }
.stat span:last-child { font-size: 24px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.chips li { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; }
.chips li > a { font-weight: 600; color: var(--ink); }
.chips .nearby-price { margin-left: 4px; color: var(--ink-3); }
.chips .nearby-price a { color: var(--ink-3); }
.deals-section ul { padding-left: 20px; }
#map iframe { display: block; width: 100%; height: 320px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r); }
.store-addr { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.store-link { font-weight: 600; color: var(--ink); }

/* Deal Reveal */
.reveal-grid + .actions { margin: 0 0 16px; }
.reveal-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 0 0 24px; --hole: var(--paper); }
.reveal { min-height: 216px; overflow: hidden; }
.reveal .tag-label { margin: 0 0 4px; }
.reveal h2 { margin: 0 0 8px; font-size: 17px; }
.reveal .big { margin: 0 0 8px; }
.reveal .mut { font-size: 14px; color: #2a2c22; margin: 4px 0 0; }
.reveal a { display: inline-block; margin-top: 8px; font-weight: 600; }
.cover { position: absolute; inset: -1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 500; color: var(--board-ink-2); background: repeating-linear-gradient(135deg, #2a2b2e 0 10px, #222326 10px 20px); transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease); }
.cover .cover-n { font-family: var(--mono); font-size: 48px; line-height: 1; font-weight: 600; color: var(--accent); }
.cover:hover { color: var(--board-ink); background: repeating-linear-gradient(135deg, #333438 0 10px, #2a2b2e 10px 20px); }
.cover:active { transform: scale(.98); }
.cover:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }
.reveal.open .cover { transform: translateY(-8px); }
.reveal.open .cover { opacity: 0; pointer-events: none; }

/* Price game popup (popup-game.js) */
.game { width: min(34rem, calc(100% - 16px)); max-width: none; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-2); border-radius: var(--r-lg); }
.game::backdrop { background: rgba(0, 0, 0, .72); }
body:has(.game[open]) { overflow: hidden; }
.game-in { padding: 14px 14px 16px; }
@media (min-width: 30rem) { .game-in { padding: 20px 24px 24px; } }
.game-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.game-top h2 { margin: 6px 0 4px; font-size: clamp(20px, 6vw, 28px); letter-spacing: -.01em; }
.game-x { flex: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.game-status { margin: 0 0 8px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.game-ask { margin: 0 0 8px; color: var(--ink-2); }
.game-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.game-slot { display: flex; flex-direction: column; }
.game-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; min-height: 12rem; padding: 14px 8px; border: 2px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease), background-color var(--mid) var(--ease); }
.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-card[aria-disabled="true"] { cursor: default; transform: none; }
.game-price { font-size: 40px; line-height: 1.1; font-weight: 600; color: var(--accent); }
.game-card .game-price { position: relative; flex: none; display: flex; align-items: center; justify-content: center; align-self: stretch; height: 76px; overflow: hidden; border-radius: var(--r-sm); background: #0f1011; }
.game-card .game-amount { color: var(--accent); white-space: nowrap; font-size: clamp(22px, 7.4vw, 40px); }
/* The drop shadow follows the foil's alpha, so every scratch gets a thin raised edge. */
.game-foil { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.game-glint { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.game-glint::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 35%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); opacity: 0; }
.game-fx { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; pointer-events: none; }
/* Only an armed foil takes over touch, so the rest of the dialog still scrolls. */
.game-foil.armed { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.game-foil.armed:active { cursor: grabbing; }
/* The script sweeps the leftover foil away; the late fade only covers a canvas that can't draw. */
.game-foil.cleared { opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease) 340ms; }
.game-store { font-weight: 600; line-height: 1.25; }
.game-hood, .game-product { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.game-tag { margin-top: auto; font-size: 13px; font-weight: 600; }
.game-card.cheaper { border-color: var(--accent); background: var(--accent); color: #111; }
.game-card.cheaper span { color: #111; }
.game-card.cheaper .game-amount { color: var(--accent); }
.game [tabindex="-1"]:focus { outline: none; } /* focus moves here so it is read out; nothing to operate */
.game-card.dearer { border-color: var(--line); }
.game-card.dearer .game-amount { color: var(--ink-2); }
.game-card.picked { box-shadow: 0 0 0 3px var(--ink); }
.game-notes { margin: 4px 0 0; text-align: center; }
.game-notes small { display: block; }
.game-result { min-height: 1.5em; margin: 12px 0 0; font-weight: 600; }
.game-actions { margin: 10px 0 14px; }
.game-actions .btn { flex: 1 1 10rem; }
.game > .game-in > .fine { margin: 0; font-size: 12px; }
.game-score { margin: 0 0 12px; font-size: 18px; }
.game-score b { display: block; font-size: 44px; line-height: 1.1; color: var(--accent); }
.game-find { padding: 14px 16px; border: 2px dashed var(--accent); border-radius: 14px; background: var(--surface); }
.game-find p { margin: 0 0 4px; }
.game-find h3 { margin-bottom: 4px; font-size: 15px; }
.game-find a { display: inline-flex; align-items: center; min-height: 44px; }
.game-find .game-notes { text-align: left; }
@media (prefers-reduced-motion: no-preference) {
  .game[open] { animation: rise 260ms var(--ease) both; }
  .game-card.shown .game-amount { animation: bump 420ms var(--ease) both; }
  .game-card.cheaper { animation: win 520ms var(--ease) both; }
  .game-find, .game-score b { animation: pop 460ms var(--ease) both; }
  .game-foil.armed:not(.touched) + .game-glint::after { animation: glint 2.8s var(--ease) 400ms infinite; }
}
@keyframes glint { from { opacity: 1; transform: translateX(-120%) skewX(-14deg); } 40%, to { opacity: 1; transform: translateX(320%) skewX(-14deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.12) rotate(2deg); } }
@keyframes bump { 50% { transform: scale(1.18) rotate(-2deg); } }
@keyframes win { 50% { transform: scale(1.04) rotate(-1deg); } }

/* Plus */
.yes { color: var(--accent-ink); font-weight: 600; }

/* Footer */
.site-footer { margin-top: 48px; padding: 40px 0 48px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 16px 0; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: none; font-size: 15px; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .fine { max-width: 46rem; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
