/* Palette echoes what cats see best: yellows and blues on deep night blue. */
:root {
  --bg: #101826;
  --bg-2: #162133;
  --panel: #1b2940;
  --line: #2a3a55;
  --text: #f4efe4;
  --muted: #b5bccb;
  --yellow: #ffd84a;
  --yellow-ink: #2a2105;
  --blue: #7fd3ff;
  --radius: 18px;
  --display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body);
}
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
main > section { max-width: 1120px; margin: 0 auto; padding: 48px 20px; }

/* Header */
.top {
  display: flex; align-items: center; gap: 24px; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 16px 20px;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.top-nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--yellow); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding-top: 24px !important; }
.kicker { color: var(--yellow); font-weight: 700; margin: 0 0 6px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.95rem; }
.ticks li::before { content: '✓ '; color: var(--yellow); font-weight: 700; }
.hero-stage { position: relative; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 0 10px #0b111c, 0 0 0 11px var(--line); }
.stage-canvas { width: 100%; height: 100%; display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem var(--body); text-decoration: none; cursor: pointer;
  border: 0; border-radius: 999px; padding: 12px 22px;
  background: var(--yellow); color: var(--yellow-ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,216,74,0.25); }
.btn:active { transform: translateY(1px); }
.btn-big { font-size: 1.15rem; padding: 16px 30px; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: 6px 10px; border-radius: 10px; }
.icon-btn:hover { color: var(--text); background: var(--line); }

/* Game cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
/* Content sections */
.steps ol { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; background: var(--bg-2); border-radius: var(--radius); padding: 22px; box-shadow: 0 0 0 1px var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #08213a; font: 700 1.1rem var(--display); margin-bottom: 10px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.feature p, .why li { color: var(--muted); }
.why ul { padding-left: 1.2em; }
.why li { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.foot { max-width: 1120px; margin: 0 auto; padding: 32px 20px 48px; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

/* Setup sheet */
.sheet { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 560px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
.sheet::backdrop { background: rgba(5, 9, 16, 0.7); backdrop-filter: blur(4px); }
.sheet-inner { background: var(--panel); border-radius: 24px; padding: 22px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,0.5); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; }
.sheet fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.sheet legend { font-weight: 700; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 0.95rem var(--body); color: var(--text); background: var(--bg-2); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.chip[aria-pressed='true'] { background: var(--yellow); color: var(--yellow-ink); box-shadow: none; }
.sound-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.sound-row legend { width: 100%; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.switch input { width: 20px; height: 20px; accent-color: var(--yellow); }
input[type='range'] { flex: 1; min-width: 120px; accent-color: var(--yellow); }
.cat-name { display: block; margin-top: 16px; font-weight: 700; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cat-name .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.cat-name input { display: block; width: 100%; margin-top: 8px; font: 1rem var(--body); color: var(--text); background: var(--bg-2); border: 0; border-radius: 12px; padding: 10px 14px; box-shadow: inset 0 0 0 1.5px var(--line); text-transform: none; letter-spacing: 0; }
.pin-tip { margin-top: 16px; background: var(--bg-2); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; color: var(--muted); }
.pin-tip summary { cursor: pointer; font-weight: 700; color: var(--text); }
#setup-start { width: 100%; margin-top: 20px; }
.sheet-note { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

/* Play layer: the whole screen is the game. */
.play-layer {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
.play-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
html.cat-locked, html.cat-locked body { overflow: hidden; overscroll-behavior: none; touch-action: none; }
.play-clock { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: calc(env(safe-area-inset-left) + 18px); font: 600 0.9rem var(--body); color: rgba(255,255,255,0.28); pointer-events: none; font-variant-numeric: tabular-nums; }

.lock-corner {
  position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: calc(env(safe-area-inset-right) + 8px);
  width: 56px; height: 56px; padding: 6px; border: 0; background: rgba(0,0,0,0.25); border-radius: 50%;
  cursor: pointer; opacity: 0.45; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.lock-corner svg { width: 100%; height: 100%; display: block; }
.lock-track { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 3; }
.lock-progress { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-dasharray: 132; stroke-dashoffset: 132; transform: rotate(-90deg); transform-origin: 50% 50%; }
.lock-shackle { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.lock-body { fill: #fff; }
.lock-hint { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); white-space: nowrap; color: #fff; font: 600 0.85rem var(--body); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.lock-corner.holding { opacity: 1; }
.lock-corner.holding .lock-hint { opacity: 0.8; }
.lock-corner.holding .lock-progress { stroke-dashoffset: 0; transition: stroke-dashoffset 2.5s linear; }

.lock-puzzle { position: absolute; inset: 0; background: rgba(5,9,16,0.82); z-index: 2; }
.lock-msg { position: absolute; top: 10%; width: 100%; text-align: center; font: 600 1.3rem var(--display); margin: 0; }
.lock-puzzle button {
  position: absolute; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 0;
  background: var(--yellow); color: var(--yellow-ink); font: 700 1.8rem var(--display); cursor: pointer; touch-action: none;
}
.lock-puzzle button.done { background: var(--blue); }

.play-layer.ended .play-canvas { filter: brightness(0.35); transition: filter 2s; }
.locked-summary { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); background: var(--panel); border-radius: 24px; padding: 24px; box-shadow: 0 0 0 1px var(--line); pointer-events: none; }
.locked-summary .hint { color: var(--muted); margin: 14px 0 0; text-align: center; }

/* Result */
.summary h2 { font-size: 1.6rem; }
.summary h2 strong { color: var(--yellow); }
.summary-kicker { color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 0; }
.summary-stats div { background: var(--bg-2); border-radius: 14px; padding: 12px; text-align: center; }
.summary-stats dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.summary-stats dd { margin: 2px 0 0; font: 700 1.6rem var(--display); }
.summary-fav { margin: 14px 0 0; color: var(--blue); font-weight: 700; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-stage { order: -1; }
  .steps ol, .feature { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .top-nav { max-width: 100%; }
}
@media (max-width: 480px) {
  main > section { padding: 32px 16px; }
  .top, .foot { padding-left: 16px; padding-right: 16px; }
  .row2 { grid-template-columns: 1fr; }
  .hero-stage { border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card a { transition: none; }
}

/* ----- Hub, cards with clips, pricing, breadcrumbs ----- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--yellow-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.section-lede { color: var(--muted); margin-top: -6px; max-width: 40em; }
.hero-stage { margin: 0; }
.stage-caption { position: absolute; left: 14px; bottom: 14px; right: 14px; pointer-events: none; }
.stage-caption a { pointer-events: auto; display: inline-flex; align-items: baseline; gap: 8px; background: rgba(10,16,28,0.78); backdrop-filter: blur(6px); color: var(--text); text-decoration: none; font: 600 1rem var(--display); padding: 8px 14px; border-radius: 999px; }
.stage-caption .cap-sub { font: 600 0.85rem var(--body); color: var(--yellow); }

.card { background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card:hover { box-shadow: 0 0 0 2px var(--yellow); transform: translateY(-2px); }
.card-clip { position: relative; display: block; }
.card-clip canvas { width: 100%; aspect-ratio: 16 / 10; display: block; background: #000; }
.card-tag { position: absolute; top: 10px; left: 10px; background: rgba(10,16,28,0.75); color: var(--yellow); font: 700 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 4px; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--yellow); }
.card-body p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-actions .more { color: var(--blue); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.card-actions .more:hover { text-decoration: underline; }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; }
.also { color: var(--muted); margin-top: 18px; }

.crumbs { max-width: 1120px; margin: 0 auto; padding: 4px 20px 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.top-nav a span { margin-right: 2px; }
.best-for { color: var(--yellow); font-weight: 700; }

.match ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px 24px; }
.match li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.match-tag { font-weight: 700; color: var(--yellow); }
.match-who { color: var(--muted); }
.match-who::after { content: ':'; }
.match a { font-weight: 700; }

.pricing .plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 8px; }
.plan { position: relative; background: var(--bg-2); border-radius: var(--radius); padding: 22px; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.plan-best { box-shadow: 0 0 0 2px var(--yellow); }
.plan-badge { position: absolute; top: -12px; left: 22px; margin: 0; background: var(--yellow); color: var(--yellow-ink); font: 700 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; }
.plan-name { font: 600 1.15rem var(--display); margin: 0; }
.plan-price { font: 700 2rem var(--display); margin: 4px 0 8px; }
.plan-price span { font: 600 0.9rem var(--body); color: var(--muted); }
.plan ul { padding-left: 1.1em; color: var(--muted); flex: 1; margin: 0 0 16px; }
.pricing-note { color: var(--muted); font-size: 0.9rem; }

.chip-locked { color: var(--muted); }
.chip-locked[aria-pressed='true'] { background: var(--bg-2); color: var(--text); box-shadow: inset 0 0 0 2px var(--yellow); }
.chip-lock { font-size: 0.8em; }
.upsell { margin-top: 14px; background: rgba(255,216,74,0.08); border-radius: 14px; padding: 12px 14px; box-shadow: inset 0 0 0 1px rgba(255,216,74,0.35); }
.upsell p { margin: 0 0 10px; font-size: 0.95rem; }
.upsell-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.next-h { margin: 18px 0 6px; color: var(--muted); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.next { list-style: none; padding: 0; margin: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.next a { font-weight: 700; }

.unlock .lede { margin-bottom: 0; }
.unlock .pricing { padding: 24px 0; }
.unlock-status { background: var(--bg-2); border-radius: var(--radius); padding: 16px 20px; box-shadow: 0 0 0 1px var(--line); }
.unlocked-now { color: var(--yellow); }
.test-unlock { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.opt { color: var(--muted); font-size: 0.85rem; }

.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot-brand a { font: 700 1.1rem var(--display); color: var(--text); text-decoration: none; }
.foot-h { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 4px 0; }
@media (max-width: 860px) { .foot-cols { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .crumbs { padding: 4px 16px 0; } .match ul, .cards-2 { grid-template-columns: 1fr; } }
