:root {
  --bg: #ffffff;
  --surface: #f6f6f6;
  --text: #000000;
  --subtext: #666666;
  --border: #eeeeee;
  --button-bg: #000000;
  --button-text: #ffffff;
  --active: #ffd54f;
  --valid: #66bb6a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #f0f0f0;
    --subtext: #a0a0a0;
    --border: #333333;
    --button-bg: #f0f0f0;
    --button-text: #000000;
  }
}

/* A manual choice (the light/dark button, or Preferences > Theme) beats the
   device setting; with none, the media query above decides. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1c1c1c;
  --text: #f0f0f0;
  --subtext: #a0a0a0;
  --border: #333333;
  --button-bg: #f0f0f0;
  --button-text: #000000;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f6f6;
  --text: #000000;
  --subtext: #666666;
  --border: #eeeeee;
  --button-bg: #000000;
  --button-text: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.skip { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--button-bg); color: var(--button-text); z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.nav, .hero, .section, .footer { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }

.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand img { border-radius: 8px; }
.nav nav { display: flex; align-items: center; gap: 20px; font-size: 0.95rem; }
.nav nav a:not(.btn) { text-decoration: none; color: var(--subtext); }
.nav nav a:not(.btn):hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--text);
  text-decoration: none; font-weight: 600; font-size: 1rem; min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--surface); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary, .btn-small { background: var(--button-bg); color: var(--button-text); border-color: var(--button-bg); }
.btn-primary:hover, .btn-small:hover { background: var(--button-bg); opacity: 0.88; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.btn-small { padding: 8px 16px; min-height: 36px; font-size: 0.9rem; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--active); outline-offset: 2px; }

.btn-collab {
  border-color: #4c9a51;
  color: #2f6b34;
  background: rgba(102, 187, 106, 0.12);
}
.btn-collab:hover { background: rgba(102, 187, 106, 0.22); box-shadow: 0 6px 16px rgba(76, 154, 81, 0.22); }
@media (prefers-color-scheme: dark) {
  .btn-collab { border-color: #66bb6a; color: #9be39e; background: rgba(102, 187, 106, 0.14); }
  .btn-collab:hover { background: rgba(102, 187, 106, 0.24); }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: background-color 0.15s ease; }
  .btn:hover, .btn:active { transform: none; }
}

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 56px 72px; }
.eyebrow { color: var(--subtext); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
.lead { margin-top: 20px; font-size: 1.15rem; color: var(--subtext); max-width: 34em; }
.cta { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.cta .btn { width: 100%; text-align: center; }

.board {
  /* minmax(0, …) and min-width: 0 so the letters shrink to fit (Safari on
     narrower screens, like the iPhone Duo, otherwise let the last column spill
     out of the panel). */
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; min-width: 0;
  font-family: var(--serif); font-size: clamp(1.1rem, 3.6vw, 1.7rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 14px;
  user-select: none;
}
.board span {
  display: grid; place-items: center; aspect-ratio: 1; min-width: 0; line-height: 1; border-radius: 8px;
  transition: background 0.25s, color 0.25s;
}
.board span.on { background: var(--active); color: #000; }
.board span.done { background: var(--valid); color: #000; }

.section { padding-block: 56px; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 32px; }

.card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.card p { color: var(--subtext); }

/* How to play: one card per platform (web, app, YouTube) */
.section-lead { color: var(--subtext); max-width: 40em; margin: -16px 0 32px; }
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.platform {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px;
}
.platform-head { display: flex; align-items: center; gap: 14px; }
.platform-icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--button-bg); color: var(--button-text);
}
.platform-icon.youtube { background: #ff0000; color: #fff; }
.platform h3 { font-size: 1.3rem; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.platform-tag { color: var(--subtext); font-size: 0.9rem; }
.platform-badge {
  font-family: inherit; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--subtext); background: var(--bg);
}
.platform-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; counter-reset: step; flex: 1; }
.platform-steps li { counter-increment: step; position: relative; padding-left: 36px; color: var(--subtext); font-size: 0.95rem; }
.platform-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--button-bg); color: var(--button-text); font-size: 0.8rem; font-weight: 700;
}
.platform-steps strong { color: var(--text); }
.platform-steps code { font-size: 0.9em; padding: 1px 5px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.platform .btn { align-self: flex-start; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }

.watch { text-align: center; }
.soon { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.soon h2 { margin-bottom: 12px; }
.soon p:not(.eyebrow) { color: var(--subtext); max-width: 30em; margin-bottom: 28px; }
.phone { justify-self: center; width: min(280px, 70vw); padding: 8px; border-radius: 44px; background: #111; border: 2px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.18); }
.phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
.watch h2 { margin-bottom: 12px; }
.watch p { color: var(--subtext); margin-bottom: 28px; }

/* Terms and Privacy pages */
.legal { width: 100%; max-width: 760px; margin-inline: auto; padding: 48px 20px 72px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal-updated { color: var(--subtext); margin-top: 10px !important; font-size: 0.9rem; }
.legal-summary { margin: 32px 0 8px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.legal-summary h2 { font-size: 1.25rem; margin-bottom: 10px; }
.legal section { padding-top: 32px; }
.legal section h2 { font-size: 1.45rem; margin-bottom: 12px; }
.legal h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 10px 0 0; padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal p, .legal li { color: var(--subtext); }
.legal strong { color: var(--text); }
.legal a { color: var(--text); }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 32px; border-top: 1px solid var(--border); color: var(--subtext); font-size: 0.9rem; }
.footer-links { display: flex; gap: 20px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 32px 48px; }
  .platforms, .cards, .soon { grid-template-columns: 1fr; }
  .soon { text-align: center; }
  .soon p:not(.eyebrow) { margin-inline: auto; }
  .nav nav a:not(.btn) { display: none; }
  .nav nav { gap: 8px; }
  .nav .btn-small { padding: 8px 12px; font-size: 0.8rem; }
}
