:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --border: #e8e2d8;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --brand: #6b1515;
  --brand-dark: #4a0e0e;
  --brand-soft: #fbeaea;
  --shadow-sm: 0 1px 2px rgba(20, 14, 10, 0.05), 0 2px 6px rgba(20, 14, 10, 0.04);
  --shadow-md: 0 4px 16px rgba(20, 14, 10, 0.06), 0 12px 40px rgba(20, 14, 10, 0.06);
  --radius: 14px;
  --maxw: 1100px;
}

/* Reset overrides for the shared dice.css (which assumes a flex centered body) */
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--bg);
}
body {
  display: block;
  height: auto;
  width: 100%;
  margin: 0;
  background-image: none;
  background: var(--bg);
  line-height: 1.55;
}

/* Container helper */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header > .brand,
.site-header > .header-cta {
  display: inline-flex;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--brand);
  box-shadow: inset -2px 2px 4px rgba(0, 0, 0, 0.25), inset 2px -1px 3px rgba(0, 0, 0, 0.15);
  position: relative;
}
.brand-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.header-cta {
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.header-cta:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 0 24px;
}
.hero-text { max-width: 720px; margin: 0 auto 8px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.05;
}
.hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  background: var(--brand);
  border-radius: 4px;
}
.hero .lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  margin: 0 auto;
}

.hero-dice {
  display: flex;
  justify-content: center;
  padding: 32px 0 8px;
}

/* The canvas inside .hero-dice is sized by dice.js; just bound its max width
   for the site context so it doesn't overflow on narrow viewports. */
.hero-dice #dice-canvas {
  max-width: min(640px, 92%);
}

/* ---------- Controls ---------- */
#controls-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 4px 0 24px;
}
#decrease-button,
#increase-button,
#roll-button {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
  outline: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
#decrease-button:hover,
#increase-button:hover,
#roll-button:hover { transform: translateY(-2px); filter: brightness(1.05); }
#decrease-button:active,
#increase-button:active,
#roll-button:active { transform: translateY(0); filter: brightness(0.95); }
#decrease-button:focus-visible,
#increase-button:focus-visible,
#roll-button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
  border-radius: 50%;
}

#decrease-button {
  background-image: url("./min_button.png");
  background-size: 48px 48px;
  width: 48px;
  height: 48px;
}
#decrease-button:active { background-image: url("./min_button_pressed.png"); }

#increase-button {
  background-image: url("./plus_button.png");
  background-size: 48px 48px;
  width: 48px;
  height: 48px;
}
#increase-button:active { background-image: url("./plus_button_pressed.png"); }

#roll-button {
  background-image: url("./roll_button.png?v=2026-06-09");
  background-size: 140px 140px;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* Fixed dark — the button PNG is always white, so this must not follow
     the theme's --text (which flips light in dark mode). Matches the
     Android label colour (@color/roll_button_text). */
  color: #2b2b2b;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.7rem;
  /* Trim the line box to the glyph so the descenderless all-caps label
     sits at true optical centre (Android uses includeFontPadding=false). */
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#roll-button:active { background-image: url("./roll_button_pressed.png?v=2026-06-09"); }

/* ---------- "How" cards ---------- */
.how {
  padding: 56px 0 24px;
}
.how h2,
.tv h2,
.history h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}
.how h2 { text-align: center; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.card p  { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- TV section ---------- */
.tv {
  padding: 64px 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.tv-text p { color: var(--muted); margin: 0 0 18px; max-width: 46ch; }
.tv-shot {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.play-badge img {
  display: inline-block;
  vertical-align: middle;
}

/* ---------- History ---------- */
.history {
  padding: 48px 0;
  max-width: 720px;
  margin: 0 auto;
}
.history p { margin: 0 0 14px; color: #2a2a2a; }
@media (prefers-color-scheme: dark) {
  .history p { color: #d8d3ca; }
}

/* Footer styles moved to the richer ".site-footer-rich" / ".footer-cols"
   blocks in the multi-page additions section below. */

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .tv { grid-template-columns: 1fr; gap: 24px; }
  .tv-shot { order: -1; }
  .hero { padding-top: 32px; }
}

@media (max-width: 480px) {
  main { padding: 0 16px; }
  .site-header { padding: 12px 16px; }
  .hero-dice { padding: 16px 0 4px; }
  #roll-button { width: 120px; height: 120px; background-size: 120px 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .header-cta, #decrease-button, #increase-button, #roll-button { transition: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110d;
    --surface: #1e1a16;
    --border: #2c2620;
    --text: #f1ece4;
    --muted: #a59f95;
    --brand-soft: #2a1313;
  }
  .header-cta { background: var(--brand); }
  .header-cta:hover { background: #8b1d1d; }
  .site-header { background: rgba(20, 17, 13, 0.85); }
}

/* ============================================================
   Multi-page additions (nav, breadcrumbs, article prose,
   game grid, FAQ, CTA, tables, richer footer).
   These power the content pages under /dobbelspellen/, etc.
   ============================================================ */

/* ---------- Header navigation ---------- */
.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.site-nav > a:not(.header-cta) {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-nav > a:not(.header-cta):hover { color: var(--brand); }
.site-nav > a[aria-current="page"]:not(.header-cta) { color: var(--brand); }

@media (max-width: 620px) {
  .site-nav { gap: 14px; }
  .site-nav > a:not(.header-cta) { display: none; }
}

/* ---------- Page hero (compact, for content pages) ---------- */
.page-hero {
  text-align: center;
  padding: 40px 0 8px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 14px;
}
.page-hero .lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 60ch;
  margin: 0 auto;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: var(--maxw);
  margin: 18px auto 0;
  padding: 0 24px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb span[aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumb .sep { opacity: 0.5; }

/* ---------- Article / prose ---------- */
.prose {
  max-width: 740px;
  margin: 0 auto;
  padding: 16px 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}
.prose > p,
.prose > ul,
.prose > ol { color: #2a2a2a; }
@media (prefers-color-scheme: dark) {
  .prose > p,
  .prose > ul,
  .prose > ol { color: #d8d3ca; }
}
.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 40px 0 14px;
  scroll-margin-top: 80px;
}
.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 26px 0 10px;
  scroll-margin-top: 80px;
}
.prose p { margin: 0 0 16px; }
.prose ul,
.prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin: 0 0 8px; }
.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--brand-dark); }
.prose strong { font-weight: 700; }
.prose figure { margin: 24px 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; text-align: center; }

.lead {
  font-size: 1.15rem;
  color: var(--muted) !important;
  margin-bottom: 24px !important;
}

/* Callout / note box */
.note {
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 0.98rem;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--brand); }
@media (prefers-color-scheme: dark) {
  .note strong { color: #e8a0a0; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.prose thead th {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
}
@media (prefers-color-scheme: dark) {
  .prose thead th { color: #e8a0a0; }
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:nth-child(even) td { background: rgba(0,0,0,0.015); }
@media (prefers-color-scheme: dark) {
  .prose tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
}
.prose td.num,
.prose th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 8px 0 28px;
  box-shadow: var(--shadow-sm);
}
.toc p { margin: 0 0 10px; font-weight: 700; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 0 0 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- CTA box ---------- */
.cta-box {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 26px;
  margin: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-box h2 { color: #fff; margin: 0 0 8px; font-size: 1.4rem; }
.cta-box p { color: rgba(255,255,255,0.9); margin: 0 0 18px; }
.cta-button {
  display: inline-block;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }

/* ---------- Game grid (hub page) ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 8px 0 16px;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.game-card .game-meta {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 3px 9px;
  border-radius: 999px;
}
@media (prefers-color-scheme: dark) {
  .tag { color: #e8a0a0; }
}
.game-card h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; }
.game-card p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.game-card .game-go {
  font-weight: 700;
  color: var(--brand);
  font-size: 0.92rem;
}

/* ---------- FAQ ---------- */
.faq { max-width: 740px; margin: 40px auto 0; }
.faq > h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.faq .faq-body { padding: 0 20px 18px; color: var(--muted); }
.faq .faq-body p { margin: 0 0 10px; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Related links ---------- */
.related {
  max-width: 740px;
  margin: 44px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.related h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 14px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.related-grid a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-grid a:hover { border-color: var(--brand); transform: translateY(-1px); }
.related-grid a span { display: block; color: var(--muted); font-weight: 400; font-size: 0.82rem; margin-top: 3px; }

/* ---------- Inline mini dice CTA used on the hub ---------- */
.hub-roller { padding: 8px 0 0; }

/* ---------- Richer footer ---------- */
.footer-cols {
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding: 40px 24px 8px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col .footer-head {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 12px;
  color: var(--text);
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--brand); }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}
.footer-tag { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; max-width: 32ch; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 760px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 440px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---------- Printable Yahtzee scoreblad ---------- */
.print-button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.print-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.printable-scoreblad table { font-variant-numeric: tabular-nums; }
.printable-scoreblad td:not(:first-child) { min-width: 56px; height: 30px; }
.print-only { display: none; }

@media print {
  body * { visibility: hidden !important; }
  #printable-scoreblad, #printable-scoreblad * { visibility: visible !important; }
  #printable-scoreblad {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .no-print { display: none !important; }
  .print-only { display: block !important; }
  .print-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
  #printable-scoreblad table { border: 1px solid #000 !important; width: 100%; }
  #printable-scoreblad th,
  #printable-scoreblad td {
    border: 1px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
    padding: 8px 10px;
  }
  #printable-scoreblad td { height: 32px; }
}

/* ==================================================================
   App promotion (app-promo.js) + /app/ landing page
   Added when the multi-page site absorbed the Play-app promotion.
   Reuses the existing tokens and the .cards/.card/.tv-shot patterns.
   ================================================================== */

/* ---- Homepage TV section: desktop QR + iOS alternative ---- */
.qr-box {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  max-width: 380px;
}
.qr-box[hidden] { display: none; }
.qr-box img {
  flex: none;
  width: 108px;
  height: 108px;
  background: #fff;           /* white quiet zone so the QR scans in dark mode */
  border-radius: 8px;
  padding: 6px;
  box-sizing: border-box;
}
.qr-box p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.qr-box strong { color: var(--text); }
.ios-tv-alt { color: var(--muted); font-size: 0.95rem; }
.ios-tv-alt[hidden] { display: none; }
.arrow-link { color: var(--brand); font-weight: 700; text-decoration: none; }
.arrow-link:hover { text-decoration: underline; }

/* ---- Sitewide sticky install banner (Android, non-/app/ pages) ---- */
.app-banner {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: app-banner-in 0.3s ease;
}
@keyframes app-banner-in { from { transform: translateY(16px); opacity: 0; } }
.app-banner-icon { flex: none; width: 48px; height: 48px; border-radius: 10px; }
.app-banner-text { flex: 1; min-width: 0; }
.app-banner-title { font-weight: 700; font-size: 0.95rem; }
.app-banner-sub { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.app-banner-install {
  flex: none;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
}
.app-banner-install:hover { background: var(--brand-dark); }
.app-banner-close {
  flex: none; appearance: none; background: none; border: none;
  color: var(--muted); font-size: 22px; line-height: 1; padding: 6px; cursor: pointer;
}
body.has-app-banner { padding-bottom: 96px; }

/* ---- iOS: hide every Play CTA (badge + tagged links + the nav app shortcut).
        In-body internal /app/ links stay (that page answers iPhone visitors). ---- */
body.no-app-promo a[data-play-campaign],
body.no-app-promo .play-badge { display: none; }
body.no-app-promo .site-nav a[data-nav-app] { display: none; }
body.no-app-promo .app-cta,
body.no-app-promo .closing-cta { display: none; }

/* ---- Narrow prose sections used by /app/ (compat, iPhone, closing) ---- */
.section-narrow { padding: 40px 0 8px; max-width: 720px; margin: 0 auto; }
.section-narrow p { margin: 0 0 14px; color: var(--text); }
.section-narrow dl { margin: 0; }
.section-narrow dt { font-weight: 700; margin: 18px 0 4px; }
.section-narrow dd { margin: 0; color: var(--muted); }

/* ---- /app/ hero ---- */
.app-hero {
  padding: 48px 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.app-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.app-hero .lede { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.1rem); margin: 0 0 22px; }
.install-button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}
.install-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.trust-line { margin: 10px 0 16px; color: var(--muted); font-size: 0.85rem; }
.app-cta .play-badge { display: inline-block; }
.already-installed {
  margin: 10px 0 0; padding: 12px 16px;
  background: var(--brand-soft); border-radius: var(--radius);
  color: var(--text); font-weight: 600; max-width: 46ch;
}
.already-installed[hidden] { display: none; }
body.app-installed .app-cta,
body.app-installed .closing-cta { display: none; }
.app-tip {
  margin: 18px auto 0; max-width: 620px; text-align: center;
  color: var(--muted); font-size: 0.95rem;
}
.features { padding: 40px 0 8px; }
.features h2, .closing-cta h2 { text-align: center; }
.qr-section[hidden] { display: none; }
.qr-fallback { color: var(--muted); font-size: 0.9rem; }
.closing-cta { padding: 48px 0 40px; text-align: center; }
.closing-cta p { color: var(--muted); margin: 0 0 20px; }

/* ---- Dark-mode: --brand (#6b1515) is a background tone; as a foreground on
        dark surfaces it fails contrast, so brand-red foregrounds get the light
        variant already used elsewhere in dark mode. ---- */
@media (prefers-color-scheme: dark) {
  .arrow-link { color: #e08d8d; }
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .app-hero { grid-template-columns: 1fr; gap: 24px; }
  .app-hero .tv-shot { order: -1; }
}

/* ---------- Game preset chips (homepage hero) ---------- */
.game-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 10px;
}
.game-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.game-chip:hover { transform: translateY(-1px); border-color: var(--brand); }
.game-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.game-chip[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.game-chip .chip-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.game-chip .chip-meta { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.game-chip-default .chip-name { color: var(--brand); }

.hold-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 auto 6px;
  max-width: 60ch;
  padding: 0 16px;
}
.game-rules-link { text-align: center; margin: 0 0 8px; font-size: 14px; }
.game-rules-link a { color: var(--brand); font-weight: 600; text-decoration: none; }
.game-rules-link a:hover { text-decoration: underline; }
