:root {
  --bg: #14122b;
  --bg-2: #1d1a3d;
  --card: #241f4d;
  --text: #f4f2ff;
  --muted: #b5afd9;
  --accent: #ff8a3d;
  --accent-2: #ffd166;
  --accent-text: #ff8a3d;
  --eyebrow: #ffd166;
  --ok: #3ddc97;
  --bad: #ff5d73;
  --board: #fdf6e3;
  --radius: 16px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbf8ff;
    --bg-2: #f1ecff;
    --card: #ffffff;
    --text: #1d1a3d;
    --muted: #5d5785;
    --accent-text: #c2530a;
    --eyebrow: #8a5a00;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  max-width: 960px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.logo { width: 28px; height: 28px; color: var(--text); }
.top-cta { font-weight: 600; text-decoration: none; }

main { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }

.hero { padding: 32px 0 24px; text-align: center; }
.eyebrow { color: var(--eyebrow); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.4rem); }
.hl { color: var(--accent-text); }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 36em; margin: 0 auto 20px; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #1d1a3d;
  font: 700 1rem var(--font);
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, .top-cta:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--muted); }

.play {
  background: var(--bg-2); border-radius: var(--radius);
  padding: 16px; margin: 8px auto 40px; max-width: 560px;
}
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.play-head h2 { margin: 0; font-size: 1.4rem; }
.stats { display: flex; gap: 6px; }
.pill { background: var(--card); border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; font-weight: 700; }

.targets { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.targets li {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border-radius: 999px; padding: 4px 12px 4px 6px; font-size: .95rem;
}
.targets li .emo { font-size: 1.3rem; line-height: 1; }
.targets li.found { background: color-mix(in srgb, var(--ok) 30%, var(--card)); text-decoration: line-through; }

.board {
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 100% 0, #fff3b0 0 7%, transparent 7.5%),
    linear-gradient(180deg, #bfe6ff 0 34%, #b8e3a0 34% 100%);
  border-radius: 12px; overflow: hidden;
  container-type: inline-size;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  cursor: crosshair;
}
.item {
  position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  font-size: 6.6cqw; line-height: 1; pointer-events: none;
}
.ring {
  position: absolute; transform: translate(-50%, -50%);
  width: 12cqw; height: 12cqw; border-radius: 50%;
  border: 3px solid var(--ok); box-shadow: 0 0 0 3px rgba(255,255,255,.8);
  pointer-events: none; animation: pop .25s ease-out;
}
.ring.hint { width: 34cqw; height: 34cqw; border: 3px dashed var(--accent); box-shadow: none; animation: pulse 1.2s ease-in-out 2; }
.miss {
  position: absolute; transform: translate(-50%, -50%);
  width: 6cqw; height: 6cqw; border-radius: 50%;
  background: color-mix(in srgb, var(--bad) 70%, transparent);
  pointer-events: none; animation: fade .6s ease-out forwards;
}
@keyframes pop { from { transform: translate(-50%, -50%) scale(.4); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade { to { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }

.play-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

.result { text-align: center; margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--card); }
.result h3 { font-size: 1.5rem; color: var(--ok); }

.how { padding: 8px 0 32px; }
.how h2, .soon h2 { font-size: 1.6rem; text-align: center; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; }
.card-ico { font-size: 1.8rem; }
.card h3 { font-size: 1.1rem; margin-top: 6px; }
.card p { color: var(--muted); margin: 0; }

.soon { text-align: center; padding: 8px 0 40px; }
.soon p { color: var(--muted); max-width: 36em; margin: 0 auto; }

.foot { text-align: center; color: var(--muted); padding: 24px var(--gutter) 40px; font-size: .9rem; }

.doc { max-width: 720px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-size: 1.25rem; margin-top: 1.5em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, .ring.hint, .miss { animation: none; }
}
