/* Games Lab showcase — game-night dark theme + mock-screen component kit.
   Every pitch page composes from this kit; page-scoped <style> is for small
   game-specific tweaks only. */

:root {
  --bg: #12141d;
  --surface: #1b1e2b;
  --surface-2: #232738;
  --line: #303549;
  --text: #f2f3f7;
  --muted: #9aa0b6;
  --accent: #ffb800; /* overridden per cluster via body[data-cluster] */

  --c-daily: #ffb800;
  --c-party: #ff5d8f;
  --c-duel: #45d4ff;
  --c-road: #5ad46e;
  --c-board: #b48bff;

  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, sans-serif;
}

body[data-cluster="daily"] { --accent: var(--c-daily); }
body[data-cluster="party"] { --accent: var(--c-party); }
body[data-cluster="duel"]  { --accent: var(--c-duel); }
body[data-cluster="road"]  { --accent: var(--c-road); }
body[data-cluster="board"] { --accent: var(--c-board); }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  padding: 0 16px 64px;
}

main { max-width: 720px; margin: 0 auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0.6em 0; }
a { color: var(--accent); }

/* ---------- top nav + page header ---------- */

.topnav {
  max-width: 720px; margin: 0 auto; padding: 18px 0 6px;
  font-weight: 700; font-size: 0.95rem;
}
.topnav a { text-decoration: none; color: var(--muted); }
.topnav a:hover { color: var(--text); }

.concept-head { max-width: 720px; margin: 10px auto 26px; }
.concept-head h1 { font-size: 2.4rem; font-weight: 800; margin: 10px 0 4px; }
.concept-head .tagline { font-size: 1.15rem; color: var(--muted); font-weight: 600; }

.kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 0.8rem; font-weight: 700;
}
.chip-cluster { background: var(--accent); color: #12141d; }

/* ---------- sections ---------- */

section { margin: 34px 0; }
section > h2 {
  font-size: 1.25rem; font-weight: 800; margin-bottom: 10px;
  padding-left: 12px; border-left: 4px solid var(--accent);
}
section ul { padding-left: 22px; }
section li { margin: 6px 0; }

/* ---------- phone mock frame ---------- */

.hero-mock { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 24px 0; }

.phone {
  width: min(320px, 100%);
  background: #0b0d14;
  border: 2px solid var(--line);
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.phone .screen {
  background: var(--surface);
  border-radius: 22px;
  padding: 16px 14px;
  min-height: 340px;
  display: flex; flex-direction: column; gap: 14px;
}
.phone.mini { width: min(180px, 100%); border-radius: 22px; padding: 8px; }
.phone.mini .screen { min-height: 190px; padding: 10px 8px; gap: 8px; border-radius: 14px; font-size: 0.62rem; }
.phone.mini .tile { width: 24px; height: 24px; font-size: 0.75rem; border-radius: 6px; }
.phone.mini .app-bar { font-size: 0.62rem; }
.phone.mini .big-btn { padding: 7px; font-size: 0.65rem; }
.phone.mini .pill { font-size: 0.58rem; padding: 3px 8px; }
.phone.mini .bubble { font-size: 0.62rem; padding: 6px 8px; }

.phone-cap { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-align: center; }

/* in-mock components */

.app-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.app-bar .app-name { color: var(--accent); }

.tile-row { display: flex; gap: 6px; justify-content: center; }
.tile {
  width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.25rem;
  background: var(--surface-2); border: 1px solid var(--line);
}
.tile-good { background: #2e7d4f; border-color: #2e7d4f; }
.tile-warn { background: #b28900; border-color: #b28900; }
.tile-bad { background: #a63b4e; border-color: #a63b4e; }
.tile-accent { background: var(--accent); border-color: var(--accent); color: #12141d; }
.tile-dim { opacity: 0.45; }
.tile-empty { background: transparent; border: 2px dashed var(--line); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 700;
}
.pill-accent { background: var(--accent); border-color: var(--accent); color: #12141d; }
.pill-center { align-self: center; }

.timer { font-variant-numeric: tabular-nums; }

.big-btn {
  display: block; width: 100%; text-align: center;
  padding: 13px; border-radius: 14px;
  background: var(--accent); color: #12141d;
  font-weight: 800; font-size: 0.95rem;
}
.big-btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

.bubble {
  max-width: 85%; padding: 9px 12px;
  background: var(--surface-2); border-radius: 14px 14px 14px 4px;
  font-size: 0.85rem; align-self: flex-start;
}
.bubble.right { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #2b3150; }

.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 0.85rem; font-weight: 600;
}
.list-row.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.scorebar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.score {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 14px; border-radius: 12px; background: var(--surface-2);
  font-size: 0.75rem; font-weight: 700; color: var(--muted);
}
.score b { font-size: 1.05rem; color: var(--text); }
.score.leader { border: 1px solid var(--accent); }
.score.leader b { color: var(--accent); }

.share-grid {
  align-self: center; text-align: center;
  background: var(--surface-2); border-radius: 12px; padding: 10px 16px;
  font-size: 0.9rem; line-height: 1.5; font-weight: 700;
}

/* pass-the-phone handoff screen */
.handoff { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.handoff .who { font-size: 1.5rem; font-weight: 800; }
.handoff .avatar { font-size: 2.6rem; }

/* board grid for board-game mocks: set columns inline, e.g. style="--cols:5" */
.board-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 4px; align-self: center; width: 100%;
}
.board-grid .cell {
  aspect-ratio: 1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 800; font-size: 0.9rem;
}
.cell.p1 { background: #2b4a8f; }
.cell.p2 { background: #8f3b5a; }
.cell.hot { background: var(--accent); color: #12141d; }

.spacer { flex: 1; }

/* ---------- sample round: storyboard + transcript ---------- */

.storyboard {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin: 18px 0; align-items: start;
}
.frame { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.frame-cap { font-size: 0.78rem; color: var(--muted); font-weight: 700; text-align: center; }
@media (max-width: 540px) { .storyboard { grid-template-columns: 1fr; } }

.transcript {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 16px 0;
}
.beat { display: flex; gap: 10px; align-items: baseline; }
.beat .who { flex: 0 0 auto; font-weight: 800; color: var(--accent); font-size: 0.9rem; }
.beat .line { font-size: 0.95rem; }
.state {
  align-self: center; text-align: center;
  font-size: 0.82rem; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 5px 16px;
  margin: 4px 0;
}
.payoff {
  border-color: var(--accent);
}

/* ---------- footer pager ---------- */

.pager {
  max-width: 720px; margin: 48px auto 0;
  display: flex; justify-content: space-between; gap: 12px;
}
.pager a {
  text-decoration: none; font-weight: 800; font-size: 0.9rem;
  padding: 12px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.pager a:hover { border-color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }
.pager small { display: block; color: var(--muted); font-weight: 700; }

/* ---------- index page ---------- */

.hero { max-width: 980px; margin: 40px auto 8px; text-align: center; }
.hero h1 { font-size: 2.8rem; font-weight: 800; }
.hero .sub { color: var(--muted); font-size: 1.1rem; font-weight: 600; max-width: 560px; margin: 8px auto 0; }

.filters {
  max-width: 980px; margin: 24px auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.filter-btn {
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-family: var(--font); font-weight: 800; font-size: 0.85rem;
}
.filter-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }

.cluster-section { max-width: 980px; margin: 34px auto; }
.cluster-section > h2 {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
.cluster-section > h2::before {
  content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--cluster-c, var(--accent));
}
.cluster-section > .cluster-sub { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--cluster-c, var(--accent));
  border-radius: var(--radius); padding: 16px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--cluster-c, var(--accent)); }
.card .glyph { font-size: 1.9rem; }
.card h3 { font-size: 1.1rem; font-weight: 800; margin: 6px 0 2px; }
.card .hook { color: var(--muted); font-size: 0.87rem; margin: 0 0 10px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card .meta .chip { font-size: 0.72rem; padding: 3px 9px; }

.badge-play {
  background: var(--c-road); color: #12141d;
  font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}

footer.site { max-width: 980px; margin: 60px auto 0; text-align: center; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* Build notes are builder-facing: hidden unless dev mode is on (?dev=1 sets
   it, ?dev=0 clears it — see assets/dev.js). */
.build-notes { display: none; }
html.dev .build-notes { display: block; }

/* Visible confirmation that dev mode is on, on pages with no build notes. */
html.dev body::after {
  content: "dev";
  position: fixed; right: 12px; bottom: 12px; z-index: 99;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; pointer-events: none;
}
