/* Invite Only: the same lilac party look as the iOS app. */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #E6DAFD; --board: #C8B1F5; --tile: #E3D6FB; --tile-lit: #F0E9FE; --tile-invited: #F8F5FF; --tile-crasher: #FFD3E2;
  --ink: #2B1D57; --accent: #5B3FC4; --mid: #9C7BEA; --soft: #F3EEFF; --clue: #EDE4FF; --pink: #FF8FB8; --red: #E5484D; --hint: #A98AF0;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 600;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: 0.5; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.svg { display: inline-flex; line-height: 0; }
.svg > svg { width: 100%; height: 100%; display: block; }
.svg.icon { width: 1em; height: 1em; }
.spacer { flex: 1; }
.spacer-v { flex: 1; min-height: 4px; }
.center { text-align: center; justify-content: center; }
.muted { color: rgba(43, 29, 87, 0.55); }
.muted-ink { color: rgba(43, 29, 87, 0.75); font-size: 15px; }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 0.9px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.eyebrow.center { justify-content: center; }
.eyebrow.light { color: rgba(255, 255, 255, 0.85); }

.dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; color: #fff; font-size: 13px; }
.dot.big { width: 44px; height: 44px; font-size: 20px; }
.dot.accent { background: var(--accent); }
.dot.hint { background: var(--hint); }
.dot.soft { background: var(--soft); }
.dot.soft .svg { width: 20px; height: 18px; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; flex: none; }
.tick.big { width: 24px; height: 24px; }

.circle-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 800; flex: none; }
.circle-btn.small { width: 28px; height: 28px; font-size: 13px; color: var(--accent); }
.big-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 18px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 900; text-decoration: none; width: 100%;
  transition: transform 0.12s;
}
.big-btn:active, .white-btn:active, .act:active, .soft-btn:active { transform: scale(0.97); }
.soft-btn { flex: 1; height: 44px; border-radius: 14px; background: var(--soft); color: var(--accent); font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 7px; }
.white-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 18px; background: #fff;
  color: var(--accent); font-size: 17px; font-weight: 900; width: 100%; text-decoration: none; }
.link { color: var(--accent); font-size: 15px; font-weight: 800; padding: 8px 0; }
.link.wide { width: 100%; height: 40px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px 0 10px; border-radius: 100px; background: #fff; position: relative; }
.pill b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pill.big { height: 54px; padding: 0 16px 0 14px; gap: 8px; }
.pill.big b { font-size: 24px; }

/* Bunting */
.bunting-wrap { overflow: hidden; margin: 0 -16px; flex: none; }

/* ---------- Wordmark ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wm-letters { display: inline-flex; }
.wordmark { margin: 0; font-weight: 900; line-height: 1; padding-top: 0.26em; white-space: nowrap; display: inline-flex; letter-spacing: -0.01em; }
.dotless { position: relative; }
.wm-hat { position: absolute; width: 0.5em; height: 0.5em; left: 50%; top: -0.2em; transform: translateX(-42%) rotate(12deg); }

/* ---------- Guests and tiles ---------- */
.guest .bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.tile {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: 25%; background: var(--tile); display: block;
  transition: background-color 0.2s;
}
.tile.lit { background: var(--tile-lit); }
.tile.invited { background: var(--tile-invited); }
.tile.crasher { background: var(--tile-crasher); }
.tile-art { position: absolute; inset: 0; }
.tile-guest, .tile-mask { position: absolute; left: 8.75%; top: 8.75%; width: 82.5%; height: 82.5%; }
.tile-mask { animation: maskIn 0.35s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes maskIn { from { transform: translateX(-22%); opacity: 0; } }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.tile.selected::after, .tile.center::after { border: 3px solid var(--ink); }
.tile.dashed::after { border: 3px dashed var(--accent); }
.tile.hinted::before, .note.hinted::before, .crasher-pill.hinted::before, .rule-card.hinted::before, .hint-btn.hinted::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 3px solid var(--hint); pointer-events: none; z-index: 2;
  animation: glow 1.4s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { border-width: 3px; box-shadow: 0 0 3px rgba(169, 138, 240, 0.35); }
  50% { border-width: 4.5px; box-shadow: 0 0 9px rgba(169, 138, 240, 0.8); }
}
.tile-badge {
  position: absolute; top: 7.5%; right: 7.5%; width: 25%; aspect-ratio: 1; border-radius: 50%; color: #fff;
  display: grid; place-items: center; animation: popIn 0.3s cubic-bezier(.3, 1.6, .5, 1);
}
.tile-badge .icon { width: 62%; height: 62%; }
.tile-badge.invited { background: var(--accent); }
.tile-badge.crasher { background: var(--red); }
.tile.compact .tile-badge { top: 6%; right: 6%; width: 26.5%; }
@keyframes popIn { from { transform: scale(0); opacity: 0; } }

/* ---------- Game screen ---------- */
body.playing { overscroll-behavior: none; }
.game {
  --bw: min(100%, 364px, max(236px, calc(100dvh - 410px)));
  max-width: 440px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; gap: 10px;
  padding: 0 16px max(8px, env(safe-area-inset-bottom));
}
.game.has-rule { --bw: min(100%, 340px, max(236px, calc(100dvh - 480px))); }
.game-head { display: flex; align-items: center; gap: 8px; position: relative; z-index: 5; }
.level-label { display: flex; flex-direction: column; line-height: 1; }
.level-label small { font-size: 12px; font-weight: 900; letter-spacing: 0.9px; color: var(--accent); }
.level-label b { font-size: 26px; font-weight: 800; margin-top: 2px; }
.cake-pill { gap: 0; padding: 0 8px; }
.cake-pill .cake { width: 25px; height: 25px; transition: transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.cake-pill .cake.gone { transform: scale(0.85); }
.marker { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); transform: rotate(-4deg); overflow: visible; pointer-events: none; }
.marker rect { fill: none; stroke: var(--pink); stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.8s ease-in-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.marker-label {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 900; padding: 5px 10px; border-radius: 100px; animation: popIn 0.3s; pointer-events: none;
}
.marker.fade, .marker-label.fade { opacity: 0; transition: opacity 0.4s; }

.rule-card {
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px; border-radius: 16px; background: #fff; text-align: left; position: relative;
}
.rule-card.active { box-shadow: inset 0 0 0 2.5px var(--accent); }
.rule-card .dot { width: 32px; height: 32px; font-size: 14px; }
.rule-words { flex: 1; font-size: 13px; font-weight: 700; line-height: 1.25; }
.rule-words small { display: block; font-size: 10px; font-weight: 900; letter-spacing: 0.8px; color: var(--accent); }

.board-wrap { position: relative; display: flex; justify-content: center; }
.board {
  width: var(--bw); display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; padding: 10px;
  background: var(--board); border-radius: 28px;
}
.compact .board { gap: 6px; }

.caption { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; min-height: 20px; line-height: 1.35; }
.caption .icon { margin-top: 2px; flex: none; }
.caption.idle { color: var(--accent); }
.hint-card {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--clue);
  border: 2px solid var(--hint); font-size: 14px; line-height: 1.4; animation: hintIn 0.25s;
}
@keyframes hintIn { from { transform: scale(0.96); opacity: 0; } }
.hint-card p { flex: 1; }
.inline-icon { width: 20px; height: 20px; vertical-align: -5px; display: inline-flex; margin: 0 1px; }
.inline-icon svg.guest { width: 24px; height: 24px; margin-top: -4px; }

.tray { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tray-head { display: flex; align-items: center; gap: 8px; }
.tray-head h3 { font-size: 16px; font-weight: 700; }
.hint-btn { position: relative; height: 28px; padding: 0 10px; border-radius: 100px; background: #fff; color: var(--accent); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot-empty { height: 104px; border-radius: 18px; border: 2px dashed rgba(156, 123, 234, 0.7); }

.note {
  position: relative; height: 104px; border-radius: 18px; background: #fff; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; width: 100%; transition: box-shadow 0.15s, transform 0.12s;
}
.note:active { transform: scale(0.97); }
.note.active { box-shadow: inset 0 0 0 3px var(--accent); }
.note.enter { animation: noteIn 0.45s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes noteIn { from { transform: translateY(60px); opacity: 0; } }
.note.static { width: 130px; margin: 0 auto; }
.note-subject { height: 48px; display: flex; align-items: center; justify-content: center; }
.note-guest { width: 56px; height: 56px; margin-top: -8px; }
.note-hat { width: 42px; height: 42px; }
.note-hat.small { width: 34px; height: 34px; }
.note-badge { height: 26px; display: flex; align-items: center; }
.count-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.count-badge .svg { width: 30px; height: 15px; }
.count-badge b { font-size: 20px; font-weight: 700; }
.count-badge.word b { font-size: 17px; }
.count-badge.good { font-size: 17px; font-weight: 700; }
.bulb { position: absolute; top: -5px; right: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--hint); color: #fff;
  border: 2px solid #fff; display: grid; place-items: center; font-size: 11px; z-index: 3; animation: popIn 0.3s; }
.stamp {
  position: absolute; left: 10px; right: 10px; top: 50%; padding: 3px 0; text-align: center; background: #fff; border: 3px solid var(--accent);
  border-radius: 8px; color: var(--accent); font-size: 15px; font-weight: 800; letter-spacing: 1.2px; transform: translateY(-50%) rotate(-12deg);
  animation: stamp 0.3s cubic-bezier(.3, 1.3, .5, 1);
}
@keyframes stamp { from { transform: translateY(-50%) rotate(-12deg) scale(2.4); opacity: 0; } }

.actions { position: relative; height: 52px; flex: none; }
.action-row { display: flex; gap: 10px; height: 100%; animation: actIn 0.25s; }
@keyframes actIn { from { transform: translateY(24px); opacity: 0; } }
.act { height: 52px; border-radius: 18px; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }
.act.clear { flex: 0 0 52px; background: #fff; font-size: 16px; }
.act.invited { background: var(--accent); color: #fff; }
.act.accuse { background: var(--pink); color: var(--ink); }
.act.accuse .svg { width: 24px; height: 12px; }
.act .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 100px; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.act.invited .count { background: #fff; color: var(--accent); }
.act.accuse .count { background: var(--ink); color: var(--pink); }
.act-idle { height: 52px; border-radius: 18px; background: rgba(255, 255, 255, 0.7); display: grid; place-items: center; font-size: 15px; font-weight: 800; }

/* Tutorial tips */
.coach {
  position: absolute; z-index: 30; background: var(--ink); color: #fff; border-radius: 18px; padding: 13px 15px; display: flex; flex-direction: column;
  gap: 6px; text-align: left; animation: coachIn 0.3s; box-shadow: 0 8px 24px rgba(43, 29, 87, 0.25);
}
@keyframes coachIn { from { opacity: 0; transform: translateY(4px); } }
.coach::before { content: ""; position: absolute; left: var(--ax); width: 14px; height: 14px; background: var(--ink); transform: translateX(-50%) rotate(45deg); }
.coach.top::before { top: -6px; }
.coach.bottom::before { bottom: -6px; }
.coach b { font-size: 18px; font-weight: 700; }
.coach p { font-size: 14px; line-height: 1.4; }
.coach small { font-size: 10px; font-weight: 900; letter-spacing: 0.6px; opacity: 0.6; }
.coach-top { top: calc(100% + 12px); right: 0; width: min(290px, 100%); }
.coach-caught { left: 50%; top: 50%; width: 260px; transform: translate(-50%, -50%); animation: none; }
.coach-tray { left: 0; right: 0; top: 40px; }
.coach-hint { right: 0; top: 40px; width: min(260px, 100%); }
.coach-action { left: 0; right: 0; bottom: calc(100% + 12px); }

.toast {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(100% - 48px); max-width: 360px;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; text-align: center; font-size: 14px; z-index: 40;
  animation: toastIn 0.3s; pointer-events: none;
}
@keyframes toastIn { from { transform: translate(-50%, 30px); opacity: 0; } }

/* ---------- Popups ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(43, 29, 87, var(--dim)); display: grid; place-items: center; padding: 20px;
  overflow-y: auto; animation: fade 0.25s;
}
@keyframes fade { from { opacity: 0; } }
.popup {
  position: relative; z-index: 2; width: 100%; max-width: 380px; background: #fff; border-radius: 28px; padding: 20px 20px 18px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 4px 10px rgba(43, 29, 87, 0.12);
}
.popup.pop { max-width: 340px; padding: 26px 22px; gap: 12px; animation: pop 0.45s cubic-bezier(.3, 1.5, .5, 1) 0.1s both; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.popup h2 { font-size: 24px; font-weight: 700; text-align: center; line-height: 1.2; }
.popup h2.rule-title { font-size: 21px; }
.popup h2.huge { font-size: 32px; margin: 4px 0; }
.popup > p { font-size: 15px; text-align: center; color: rgba(43, 29, 87, 0.85); line-height: 1.4; }
.popup-top { display: flex; justify-content: space-between; align-items: center; }
.popup-top .muted { font-size: 12px; font-weight: 800; }
.popup .center { display: flex; flex-direction: column; align-items: center; }
.example { background: var(--bg); border-radius: 20px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.example.row { flex-direction: row; justify-content: center; gap: 12px; }
.example p { font-size: 13px; color: rgba(43, 29, 87, 0.65); text-align: center; }
.welcome { padding-top: 26px; gap: 16px; }
.welcome h2 { font-size: 26px; }
.soft-note { background: var(--soft); border-radius: 14px; padding: 10px 12px; text-align: center; font-size: 14px; }
.who-row { display: flex; gap: 10px; }
.who-row.board-bg { background: var(--board); border-radius: 22px; padding: 12px; gap: 14px; }
.who { flex: 1; background: var(--soft); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.board-bg .who { background: none; padding: 0; }
.who-tile { width: 96px; }
.board-bg .who-tile { width: 100%; max-width: 130px; }
.who-title { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; }
.who-title .svg { width: 26px; height: 13px; }
.who-title.invited { color: var(--accent); }
.who-title.crasher { color: var(--red); }
.board-bg .who-title.invited { color: var(--ink); }
.board-bg .who-title.crasher { color: var(--ink); }
.who small { font-size: 12px; color: rgba(43, 29, 87, 0.7); }
.quip { font-size: 12px; font-style: italic; font-weight: 700; color: var(--accent); text-align: center; }
.result-grid { display: grid; grid-template-columns: repeat(var(--cols), 28px); gap: 5px; justify-content: center; }
.result-grid i { width: 28px; height: 28px; border-radius: 8px; background: var(--board); animation: popIn 0.3s both; }
.result-grid i.c { background: var(--pink); }
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 800; }
.two { display: flex; gap: 8px; }
.cakes-row { flex-direction: row !important; gap: 6px; }
.cakes-row .svg { width: 40px; height: 37px; }
.finale { background: var(--soft); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.finale b { font-size: 17px; }
.finale span { font-size: 14px; color: rgba(43, 29, 87, 0.75); }
.finale .big-btn { font-size: 15px; height: 48px; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.confetti i { position: absolute; top: -40px; border-radius: 2px; animation: fall linear infinite; }
@keyframes fall { from { transform: translateY(-20px) rotate(0); } to { transform: translateY(calc(100vh + 60px)) rotate(var(--spin)); } }

/* How to play sheet */
.sheet-overlay { place-items: start center; padding: 24px 12px; }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 28px; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; animation: sheetIn 0.3s; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; }
.sheet-head h2 { font-size: 26px; font-weight: 700; }
.sheet .lead { font-size: 15px; font-weight: 600; line-height: 1.45; }
.card { background: #fff; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 12px; font-weight: 900; letter-spacing: 0.7px; color: var(--accent); text-transform: uppercase; }
.card p { font-size: 14px; }
.read-row { display: flex; gap: 6px; }
.read-tile { flex: 1; height: 92px; background: var(--soft); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.read-tile > span { height: 52px; display: flex; align-items: center; }
.read-tile b { font-size: 12px; }
.read-guest { width: 52px; height: 52px; margin-top: -6px; }
.read-hat { width: 40px; height: 40px; }
.read-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--soft); border-radius: 14px; font-size: 14px; }
.read-line > :first-child { width: 58px; display: flex; justify-content: center; }
.read-line .tick.big { width: 24px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; min-height: 24px; padding-top: 3px; line-height: 1.4; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.mini-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 11px; font-size: 13px; font-weight: 800; }
.mini-btn.invited { background: var(--accent); color: #fff; }
.mini-btn.accuse { background: var(--pink); }
.mini-btn.accuse .svg { width: 20px; height: 10px; }
.card hr { border: 0; border-top: 1px solid rgba(43, 29, 87, 0.12); margin: 2px 0; width: 100%; }
.rule-line { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35; }

/* The demo */
.demo { background: #fff; border-radius: 28px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.demo-fit { display: flex; justify-content: center; }
.demo-canvas { position: relative; width: 280px; height: 248px; background: var(--bg); border-radius: 22px; overflow: hidden; flex: none; }
.demo-canvas > * { position: absolute; transform: translate(-50%, -50%); }
.demo-board { left: 140px; top: 50px; width: 218px; height: 78px; background: var(--board); border-radius: 18px; }
.demo-tile { width: 62px; height: 62px; }
.demo-clue { width: 112px; height: 84px; background: #fff; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.demo-clue.active { box-shadow: inset 0 0 0 3px var(--accent); }
.demo-clue .note-subject { height: 34px; }
.demo-clue .count-badge { transform: scale(0.85); }
.demo-clue .stamp { font-size: 12px; letter-spacing: 1px; border-width: 2.5px; border-radius: 6px; padding: 2px 0; }
.demo-btn { width: 124px; height: 36px; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 800; transition: opacity 0.3s, transform 0.12s; }
.demo-btn.invited { background: var(--accent); color: #fff; }
.demo-btn.accuse { background: var(--pink); }
.demo-btn.accuse .svg { width: 20px; height: 10px; }
.demo-btn.off { opacity: 0.35; }
.demo-btn.press { transform: translate(-50%, -50%) scale(0.94); }
.ripple { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(91, 63, 196, 0.5); opacity: 0; transform: translate(-50%, -50%) scale(0.3);
  transition: left 0.5s ease-in-out, top 0.5s ease-in-out, opacity 0.15s, transform 0.15s; }
.ripple.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hand { transform: translate(-6px, -1px); transform-origin: 6px 1px; transition: left 0.5s ease-in-out, top 0.5s ease-in-out, transform 0.12s;
  filter: drop-shadow(0 3px 4px rgba(43, 29, 87, 0.25)); }
.hand.press { transform: translate(-6px, -1px) scale(0.85); }
.hand .svg { width: 30px; height: 34px; }
.demo-caption { font-size: 14px; font-weight: 700; color: rgba(43, 29, 87, 0.8); text-align: center; min-height: 40px; display: grid; place-items: center; }

/* ---------- Home ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.home > .bunting-wrap { margin: 0 calc(50% - 50vw); }
.hero { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 48px; align-items: start; padding: 24px 0 56px; }
.hero-text { display: flex; flex-direction: column; gap: 18px; padding-top: 36px; position: sticky; top: 20px; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 24px rgba(91, 63, 196, 0.25); }
.tagline { font-size: 21px; line-height: 1.4; font-weight: 700; max-width: 30ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row .big-btn { width: auto; height: 56px; }
.appstore { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px 0 11px; border-radius: 16px; background: #000; color: #fff;
  text-decoration: none; font-size: 16px; font-weight: 800; line-height: 1.15; }
.appstore img { border-radius: 9px; }
.appstore small { display: block; font-size: 11px; font-weight: 700; opacity: 0.75; }
.hero-play { background: rgba(255, 255, 255, 0.35); border-radius: 32px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.hero-head { display: flex; justify-content: space-between; align-items: center; }
.pill.saved { height: auto; padding: 5px 10px; font-size: 14px; font-weight: 800; gap: 6px; }
.pill.saved .svg { width: 22px; height: 20px; }
.up-next { background: var(--accent); color: #fff; border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.up-top { display: flex; justify-content: space-between; align-items: center; }
.up-top .svg { width: 30px; height: 15px; }
.up-next h3 { font-size: 30px; font-weight: 800; }
.up-next p { font-size: 15px; opacity: 0.9; line-height: 1.4; }
.up-guests { background: rgba(255, 255, 255, 0.85); border-radius: 18px; display: flex; justify-content: space-around; padding: 4px 6px 2px; }
.up-guests .svg { width: 52px; height: 52px; }
.trail-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; scroll-margin-top: 20px; }
.trail-head h3 { font-size: 18px; font-weight: 800; }
.trail-head .muted { font-size: 14px; font-weight: 800; }
.trail { position: relative; margin-top: 18px; }
.trail-path { position: absolute; inset: 0; overflow: visible; }
.trail-path path { fill: none; stroke: var(--board); stroke-linecap: round; stroke-linejoin: round; }
.trail-path .walked { stroke-width: 18; }
.trail-path .ahead { stroke-width: 12; stroke-dasharray: 0.1 22; }
.node-slot { position: absolute; width: 88px; height: 88px; transform: translate(-50%, -50%); display: grid; place-items: center; }
.node { position: relative; display: grid; place-items: center; text-decoration: none; }
.node .disc { position: relative; border-radius: 50%; display: grid; place-items: center; }
.node.locked .disc { width: 54px; height: 54px; background: rgba(255, 255, 255, 0.75); border: 2px dashed rgba(156, 123, 234, 0.7); }
.node.locked b { font-size: 20px; font-weight: 700; color: var(--mid); }
.lock { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mid); color: #fff; border: 2px solid #fff; display: grid; place-items: center; font-size: 9px; }
.node.next .disc { width: 70px; height: 70px; background: var(--accent); color: #fff; display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.node.next b { font-size: 26px; font-weight: 700; }
.node.next small { font-size: 9px; font-weight: 900; letter-spacing: 1px; margin-top: 2px; }
.pulse { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; border-radius: 50%; border: 6px solid rgba(91, 63, 196, 0.5);
  transform: translate(-50%, -50%); animation: pulse 1.6s linear infinite; }
@keyframes pulse { from { width: 70px; height: 70px; opacity: 1; } to { width: 100px; height: 100px; opacity: 0; } }
.mascot { position: absolute; width: 44px; height: 44px; left: 50%; top: -52px; transform: translateX(-50%); pointer-events: none; }
.node.next:hover .disc, .node.done:hover .disc { filter: brightness(1.08); }
.node.done .disc { width: 58px; height: 58px; background: var(--mid); border: 3px solid #fff; color: #fff; }
.node.done b { font-size: 22px; font-weight: 700; }
.node.done .tick { position: absolute; top: -7px; right: -7px; border: 2px solid #fff; font-size: 10px; }
.node-cakes { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; background: #fff; border-radius: 100px; padding: 3px 6px; }
.node-cakes .svg { width: 19px; height: 18px; }
.node.more { width: 70px; height: 70px; border-radius: 50%; background: #fff; border: 2px dashed rgba(91, 63, 196, 0.45); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.node.more .icon { font-size: 17px; }
.node.more span:not(.svg) { font-size: 10px; font-weight: 900; text-align: center; line-height: 1.05; }

.how { display: grid; grid-template-columns: 1fr minmax(0, 360px); gap: 48px; align-items: center; padding: 56px 0; border-top: 2px dashed rgba(156, 123, 234, 0.4); }
.how-text { display: flex; flex-direction: column; gap: 16px; }
.how h2, .gallery-section h2 { font-size: 36px; font-weight: 800; line-height: 1.15; }
.how-text > p { font-size: 18px; line-height: 1.5; max-width: 46ch; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.35; }
.how .link { align-self: flex-start; }

.faq-section { padding: 56px 0; display: flex; flex-direction: column; gap: 14px; border-top: 2px dashed rgba(156, 123, 234, 0.4); }
.faq-section h2 { font-size: 36px; font-weight: 800; }
.faq { max-width: 720px; width: 100%; margin: 8px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: #fff; border-radius: 18px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-size: 17px; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 900; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; font-size: 15px; line-height: 1.5; color: rgba(43, 29, 87, 0.8); }
/* Plain HTML shown before the game loads (and to crawlers). */
.static { max-width: 720px; margin: 0 auto; padding: 48px 20px; line-height: 1.5; }
.static h1 { font-size: 44px; font-weight: 900; }
.static h2 { font-size: 22px; margin-top: 24px; }
.static p, .static li { font-size: 16px; }
.gallery-section { padding: 56px 0; display: flex; flex-direction: column; gap: 14px; border-top: 2px dashed rgba(156, 123, 234, 0.4); }
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 4px 20px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.gallery img { width: 230px; height: auto; flex: none; border-radius: 24px; scroll-snap-align: center; box-shadow: 0 8px 24px rgba(91, 63, 196, 0.18); background: #fff; }
.gallery-section > .center { display: flex; }

footer { padding: 40px 0 48px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-top: 2px dashed rgba(156, 123, 234, 0.4); text-align: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
footer nav a { font-weight: 800; text-decoration: none; }

.gallery img:first-child { margin-left: auto; }
.gallery img:last-child { margin-right: auto; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .hero-text { position: static; padding-top: 8px; align-items: center; text-align: center; }
  .hero-play { max-width: 480px; width: 100%; margin: 0 auto; }
  .cta-row { justify-content: center; }
  .how { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .how .demo { max-width: 400px; width: 100%; margin: 0 auto; }
  .how h2, .gallery-section h2 { font-size: 30px; }
}
@media (max-width: 480px) {
  .home { padding: 0 14px; }
  .home > .bunting-wrap { margin: 0 -14px; }
  .hero .wordmark { font-size: 50px !important; }
  .tagline { font-size: 18px; }
  .cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .cta-row .big-btn, .appstore { width: 100%; justify-content: center; }
  .hero-play { padding: 12px; border-radius: 26px; }
  .game { padding-left: 12px; padding-right: 12px; }
  .bunting-wrap { margin: 0 -12px; }
}
@media (max-width: 360px) {
  .slots { gap: 6px; }
  .count-badge b { font-size: 17px; }
  .count-badge.good { font-size: 14px; }
  .read-tile b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Full-width bunting, and no page scrolling behind popups. */
.game > .bunting-wrap { margin: 0 calc(50% - 50vw); }
body:has(.overlay) { overflow: hidden; }
