/* tabletop.discount */
:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-2: #efebe3;
  --text: #1c1915;
  --muted: #6d665b;
  --line: #e2ddd2;
  --accent: #a3201a;
  --accent-ink: #ffffff;
  --accent-soft: #f7e4e1;
  --gold: #a87a1c;
  --good: #19703a;
  --good-soft: #e3f2e7;
  --warn: #93600a;
  --bad: #a3201a;
  --logo-hole: var(--bg);
  --radius: 12px;
  --shadow: 0 1px 2px rgb(28 25 21 / 6%), 0 4px 16px rgb(28 25 21 / 5%);
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131110; --surface: #1c1a18; --surface-2: #24211e; --text: #eeeae3; --muted: #a39b8f; --line: #34302b;
    --accent: #e5483c; --accent-ink: #160b09; --accent-soft: #3a1915; --gold: #d9a845;
    --good: #5ccb80; --good-soft: #173323; --warn: #e3ad48; --bad: #f07067;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--body); background: var(--bg); color: var(--text); }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: .005em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: 1.7rem; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 700; }
.logo { width: 30px; height: 30px; color: var(--accent); --logo-hole: var(--surface); flex: none; }
.search { flex: 1; position: relative; max-width: 560px; margin-left: auto; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.game-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.game-nav::-webkit-scrollbar { display: none; }
.game-nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--muted); white-space: nowrap; }
.game-nav a:hover { background: var(--surface-2); color: var(--text); }
.game-nav .nav-aside { margin-left: auto; }

main { padding-bottom: 56px; }
main > section { margin-top: 48px; }

/* ---------- shared ---------- */
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 68ch; margin-top: 12px; }
.summary { margin-top: 14px; max-width: 75ch; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head a { font-weight: 600; font-size: .95rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 32px 0; }
.note { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.save { color: var(--good); font-weight: 600; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.page-head { margin-top: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  padding: 12px 20px; border-radius: 10px; text-decoration: none; white-space: nowrap; border: 0; font-size: 1rem; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 7px 14px; font-size: .9rem; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- hero ---------- */
.hero { margin-top: 36px; padding: clamp(24px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  background-image: radial-gradient(120% 140% at 100% 0%, var(--accent-soft) 0%, transparent 55%); }
.hero h1 { max-width: 22ch; }
.hero-search { display: flex; gap: 8px; margin-top: 24px; max-width: 640px; }
.hero-search input { flex: 1; min-width: 0; padding: 14px 16px; font: inherit; font-size: 1.05rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); }
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-search button { padding: 0 22px; font: inherit; font-weight: 700; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 28px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: .82rem; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.page-head .summary { color: var(--text); }

/* ---------- game tiles & chips ---------- */
.game-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.game-tiles a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s, transform .15s; border-left: 4px solid var(--accent); }
.game-tiles a:hover { border-color: var(--muted); border-left-color: var(--accent); transform: translateY(-1px); }
.tile-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.tile-count { font-size: .85rem; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips span { color: var(--muted); font-weight: 500; font-size: .8rem; }
.chips.small a { padding: 5px 10px; font-size: .85rem; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin: 28px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.filters { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.filters a { display: inline-block; padding: 5px 11px; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--muted); }
.filters a:hover { background: var(--surface-2); color: var(--text); }
.filters a[aria-current] { background: var(--text); color: var(--bg); }
.sorts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; color: var(--muted); }
.sorts a { color: var(--muted); }
.sorts b { color: var(--text); }

/* ---------- product cards ---------- */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.noimg { display: block; width: 100%; height: 100%; min-height: 120px; background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--bg) 10px 20px); border-radius: 8px; }
.badge-save { position: absolute; top: 8px; left: 8px; background: var(--good); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 8px; border-radius: 6px; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--body); font-size: .95rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.card-price .price { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.card-price s { color: var(--muted); font-size: .88rem; }
.card-stock { font-size: .8rem; font-weight: 600; }
.card-stock.ok { color: var(--good); }
.card-stock.pre { color: var(--warn); }
.card-stock.no { color: var(--muted); font-weight: 500; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 28px; }
.pager a, .pager b, .pager span { min-width: 38px; padding: 7px 12px; border-radius: 8px; text-align: center; text-decoration: none; }
.pager a { background: var(--surface); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--accent); }
.pager b { background: var(--text); color: var(--bg); }
.back { margin-top: 28px; }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 36px; margin-top: 20px; align-items: start; }
.product-media { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; aspect-ratio: 1; display: grid; place-items: center; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.meta { color: var(--muted); margin-top: 10px; font-size: .92rem; }
.best { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 18px 20px;
  background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); border-radius: 14px; }
.best.none { background: var(--surface-2); border-color: var(--line); display: block; }
.best-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--good); }
.best.none .best-label { color: var(--muted); }
.best-price { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1.05; margin-top: 2px; }
.best-price s { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.best-where { margin-top: 2px; }
.product .summary { color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.offers .price { font-family: var(--display); font-weight: 700; font-size: 1.35rem; }
.offers tr.is-best { background: color-mix(in srgb, var(--good-soft) 70%, transparent); }
.offers tr.dim td { opacity: .58; }
.offers td:last-child { text-align: right; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: .72rem; font-weight: 700; color: var(--good); background: var(--good-soft); border-radius: 999px; vertical-align: 2px; }
.stock { font-weight: 700; font-size: .9rem; }
.stock.in_stock, .stock.low_stock { color: var(--good); }
.stock.preorder, .stock.backorder { color: var(--warn); }
.stock.out_of_stock { color: var(--bad); }
.facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0; }
.facts dl div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
section > h2 { margin-bottom: 14px; }

/* ---------- home extras ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 4px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 16px; color: var(--muted); max-width: 75ch; }

.games-index { display: grid; gap: 16px; margin-top: 24px; }
.games-index section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.games-index h2 a { text-decoration: none; }
.games-index h2 a:hover { color: var(--accent); }
.games-index p { color: var(--muted); margin-top: 6px; }
.games-index .chips { margin-top: 12px; }

.prose { max-width: 760px; margin-top: 18px; }
.prose h2 { margin: 32px 0 10px; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose li { margin-bottom: 8px; }

/* ---------- forms (retailers) ---------- */
.form { display: flex; flex-direction: column; gap: 6px; max-width: 580px; margin-top: 20px; }
.form label { font-weight: 600; font-size: .92rem; margin-top: 10px; }
.form label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.form input:not([type=checkbox]), .form select, .form textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form button { margin-top: 16px; align-self: flex-start; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice.error { border: 1px solid var(--bad); border-radius: 10px; padding: 10px 14px; margin-top: 16px; }
.notice.error ul { margin: 6px 0 0; padding-left: 18px; }
main > h1 { margin-top: 28px; }
main > h1 + p, main > p { max-width: 70ch; margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid p { color: var(--muted); margin-top: 10px; max-width: 46ch; }
.site-footer h2 { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .logo { --logo-hole: var(--surface); }
.legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.legal p + p { margin-top: 6px; }

@media (max-width: 800px) {
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product-media { max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .header-row { flex-wrap: wrap; gap: 10px; }
  .search { max-width: none; flex-basis: 100%; }
  .game-nav .nav-aside { margin-left: 0; }
  .hero-search { flex-direction: column; }
  .hero-search button { padding: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-price .price { font-size: 1.3rem; }
  .hide-sm { display: none; }
  th, td { padding: 10px; }
  .best .btn { width: 100%; }
  h2 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
