/* ============================================================
   ReactMeter — shared stylesheet
   Dark "neon lab" theme. No frameworks, no build step.
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --card: rgba(17, 26, 46, 0.72);
  --card-solid: #101a2e;
  --border: #1e2a44;
  --border-bright: #2c3d63;
  --text: #e6edf7;
  --muted: #8b98b8;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 24px rgba(34, 211, 238, 0.25);
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(900px 500px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { vertical-align: middle; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: 0.2em 0; }
h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.tiny { font-size: 0.8rem; color: var(--muted); }
.muted { color: var(--muted); }

::selection { background: rgba(34, 211, 238, 0.35); }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.brand .logo {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  color: #06121a;
}

.nav { display: flex; align-items: center; gap: 12px; }

.nav-drop { position: relative; }
.nav-drop summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary:hover { border-color: var(--border-bright); background: rgba(34, 211, 238, 0.06); }
.nav-drop[open] summary { border-color: var(--accent); }

.nav-drop .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  background: var(--card-solid);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 2px;
  z-index: 60;
}
.nav-drop .menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
}
.nav-drop .menu a:hover { background: rgba(34, 211, 238, 0.08); text-decoration: none; }
.nav-drop .menu a svg { color: var(--accent); flex: none; }

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
  color: var(--warn);
  font-size: 0.85rem;
  font-weight: 600;
}
.streak-pill svg { color: var(--warn); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: #06121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { box-shadow: none; background: rgba(34, 211, 238, 0.07); }

.btn-sm { padding: 8px 15px; font-size: 0.88rem; border-radius: 10px; }

.kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--border-bright);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 0.82em;
  font-weight: 600;
}

/* ---------------- Cards / layout ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-soft {
  background: rgba(16, 26, 46, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 26px 0;
}

.game-head { text-align: center; margin: 30px 0 18px; }
.game-head p { color: var(--muted); max-width: 620px; margin: 6px auto 0; }

.content h2 { margin-top: 1.4em; }
.content p { color: #c3cde2; }

/* ---------------- Game stage ---------------- */

.stage {
  position: relative;
  min-height: clamp(380px, 55vh, 480px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.stage-result { user-select: text; -webkit-user-select: text; cursor: default; padding: 26px 18px; }

.stage-center { text-align: center; padding: 24px; max-width: 560px; }
.stage-center h2 { margin: 12px 0 6px; font-size: 1.5rem; }
.stage-center p { color: var(--muted); margin: 0 0 18px; }

.stage-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18));
  border: 1px solid var(--border-bright);
  color: var(--accent);
}
.stage-icon svg { width: 34px; height: 34px; }

.hud {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 13px 16px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.4);
  font-size: 0.92rem;
}
.hud b { font-variant-numeric: tabular-nums; color: var(--accent); }
.hud .hud-item { color: var(--muted); }

.lives { display: inline-flex; gap: 5px; align-items: center; }
.lives i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.lives i.off { background: var(--border-bright); box-shadow: none; opacity: 0.5; transform: scale(0.8); }

.round-dots { display: inline-flex; gap: 6px; }
.round-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-bright);
  transition: background 0.2s, box-shadow 0.2s;
}
.round-dots i.on { background: var(--accent); box-shadow: 0 0 8px rgba(34, 211, 238, 0.7); }

.stage-body { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 18px; }

/* ---------------- Result card ---------------- */

.result { width: min(560px, 100%); text-align: center; }

.result-top { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }

.grade {
  width: 76px; height: 76px; flex: none;
  display: grid; place-items: center;
  border-radius: 20px;
  font-size: 2rem; font-weight: 700;
  border: 1px solid var(--border-bright);
}
.g-splus, .g-s { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121a; box-shadow: var(--glow); }
.g-a { background: rgba(52, 211, 153, 0.15); color: var(--good); border-color: rgba(52, 211, 153, 0.5); }
.g-b { background: rgba(34, 211, 238, 0.12); color: var(--accent); border-color: rgba(34, 211, 238, 0.45); }
.g-c { background: rgba(251, 191, 36, 0.12); color: var(--warn); border-color: rgba(251, 191, 36, 0.45); }
.g-d { background: rgba(248, 113, 113, 0.12); color: var(--bad); border-color: rgba(248, 113, 113, 0.45); }

.result-main { text-align: left; }
.result-score {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.result-score span { font-size: 0.45em; color: var(--muted); font-weight: 600; margin-left: 4px; }
.result-sub { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.result-sub b { color: var(--text); }

.pct-bar {
  height: 8px; border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 9px;
}
.pct-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-meta { margin: 16px 0 4px; color: var(--muted); font-size: 0.9rem; }
.result-meta b { color: var(--text); }

.badge-new {
  display: inline-block;
  padding: 3px 10px;
  margin-left: 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #06121a;
  background: linear-gradient(135deg, var(--good), var(--accent));
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spark { display: block; margin: 12px auto 0; opacity: 0.95; }

.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

.result-note { margin-top: 14px; }

/* Affiliate gear card */
.aff-card {
  margin: 22px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.45);
  text-align: left;
}
.aff-card h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.aff-item { display: block; padding: 8px 10px; border-radius: 8px; }
.aff-item:hover { background: rgba(34, 211, 238, 0.07); text-decoration: none; }
.aff-item b { color: var(--text); display: block; font-size: 0.94rem; }
.aff-item span { color: var(--muted); font-size: 0.82rem; }
.aff-disclosure { margin: 8px 0 0; font-size: 0.72rem; color: var(--muted); opacity: 0.8; }

/* ---------------- Ad slots ---------------- */

.ad-slot { margin: 28px auto; min-height: 90px; display: flex; align-items: center; justify-content: center; }

.house-ad {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-bright);
  background: rgba(16, 26, 46, 0.35);
}
.house-ad .ha-text { flex: 1; min-width: 220px; }
.house-ad b { font-size: 1rem; }
.house-ad p { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; }

/* ---------------- FAQ ---------------- */

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 10px 0;
  background: rgba(7, 11, 20, 0.35);
}
.faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.2rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 16px 14px; color: #c3cde2; }

/* ---------------- Footer ---------------- */

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.6);
  padding: 36px 0 28px;
}
.foot-in { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.foot-in nav { display: flex; flex-direction: column; gap: 7px; font-size: 0.92rem; }
.foot-brand { max-width: 320px; }
.foot-brand p { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; }
.foot-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: var(--card-solid);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow), var(--glow);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   HOME PAGE
   ============================================================ */

.hero { text-align: center; padding: 64px 0 30px; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin: 0 0 10px;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stats-strip {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin: 34px auto 8px;
  padding: 16px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16, 26, 46, 0.4);
  max-width: 640px;
}
.stat { text-align: center; }
.stat b { display: block; font-size: 1.45rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.82rem; }

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.test-card {
  position: relative;
  display: block;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.test-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow);
  text-decoration: none;
}
.tc-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(167, 139, 250, 0.16));
  border: 1px solid var(--border-bright);
  color: var(--accent);
  margin-bottom: 12px;
}
.test-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.test-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.tc-best {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.tc-best b { color: var(--good); font-variant-numeric: tabular-nums; }

.tod-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: #06121a;
  background: linear-gradient(135deg, var(--warn), var(--accent));
}

.section-title { text-align: center; margin: 46px 0 6px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 8px; }

/* ============================================================
   GAME-SPECIFIC STYLES
   ============================================================ */

/* ---- Reaction time ---- */
.rx-zone { cursor: pointer; width: 100%; flex: 1; display: flex; align-items: center; justify-content: center; transition: background 0.12s; }
.stage.rx-wait { background: linear-gradient(160deg, #7f1d1d, #991b1b); border-color: #b91c1c; }
.stage.rx-go { background: linear-gradient(160deg, #065f46, #059669); border-color: #10b981; }
.stage.rx-early { background: linear-gradient(160deg, #78350f, #92400e); border-color: var(--warn); }
.stage.rx-wait .stage-center p, .stage.rx-go .stage-center p, .stage.rx-early .stage-center p { color: rgba(255, 255, 255, 0.75); }
.rx-big { font-size: clamp(2rem, 7vw, 3rem); font-weight: 700; margin: 8px 0 4px; letter-spacing: -0.02em; }
.rx-ms { font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Aim trainer ---- */
.aim-arena { position: relative; width: 100%; flex: 1; cursor: crosshair; touch-action: none; }
.aim-target {
  position: absolute;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #67e8f9, var(--accent) 55%, #0e7490);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
  cursor: crosshair;
  animation: target-in 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.aim-target::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
@keyframes target-in { from { transform: scale(0.3); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }

/* ---- Sequence memory ---- */
.seq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(340px, 82vw);
}
.seq-tile {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--border-bright);
  background: var(--bg-2);
  cursor: pointer;
  transition: background 0.1s, transform 0.1s, box-shadow 0.1s;
}
.seq-tile:hover { border-color: var(--accent); }
.seq-tile.lit {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  transform: scale(1.04);
}
.seq-tile.wrong-flash { background: var(--bad); box-shadow: 0 0 18px rgba(248, 113, 113, 0.6); }

/* ---- Number memory ---- */
.num-display {
  font-size: clamp(2.6rem, 10vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 24px;
}
.num-bar {
  width: min(320px, 70vw);
  height: 7px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.num-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@keyframes bar-drain { from { width: 100%; } to { width: 0%; } }

.num-input {
  font-family: var(--font);
  font-size: 1.7rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.1em;
  padding: 13px 18px;
  width: min(320px, 76vw);
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: var(--bg-2);
  color: var(--text);
  outline: none;
  font-variant-numeric: tabular-nums;
}
.num-input:focus { border-color: var(--accent); box-shadow: var(--glow); }

.num-compare { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: 0.14em; margin: 6px 0; word-break: break-all; }
.num-compare .ok { color: var(--good); }
.num-compare .err { color: var(--bad); text-decoration: line-through; }
.num-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 14px; }

/* ---- Visual memory ---- */
.vis-grid {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: 8px;
  width: min(400px, 86vw);
}
.vis-tile {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: var(--bg-2);
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
  perspective: 300px;
}
.vis-tile.show, .vis-tile.hit {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  animation: flip-in 0.25s;
}
.vis-tile.miss { background: #3f1d2b; border-color: var(--bad); animation: shake 0.3s; }
@keyframes flip-in { from { transform: rotateY(70deg); } to { transform: rotateY(0); } }

/* ---- Typing test ---- */
.type-wrap { width: min(720px, 100%); padding: 0 6px; }
.type-box {
  position: relative;
  height: 10.2rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.5);
  padding: 18px 22px;
  cursor: text;
}
.type-box.blurred::after {
  content: "Click here or start typing";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(3px);
  color: var(--muted);
  font-weight: 600;
}
.type-words { font-size: 1.42rem; line-height: 2.2rem; letter-spacing: 0.01em; transition: transform 0.15s; }
.type-words .word { display: inline-block; margin-right: 0.62ch; }
.type-words .char { color: var(--muted); }
.type-words .char.ok { color: var(--text); }
.type-words .char.err { color: var(--bad); text-decoration: underline; }
.type-words .word.active .char.cur { box-shadow: inset -2px 0 0 var(--accent); animation: caret 1s step-end infinite; }
@keyframes caret { 50% { box-shadow: inset -2px 0 0 transparent; } }
.type-input { position: absolute; opacity: 0; pointer-events: none; left: 10px; top: 10px; width: 2px; height: 2px; border: 0; padding: 0; }

/* ---- Chimp test ---- */
.chimp-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  width: min(560px, 94vw);
}
.chimp-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: clamp(0.9rem, 3vw, 1.3rem);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.chimp-cell.has {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  cursor: pointer;
  transition: transform 0.08s;
}
.chimp-cell.has:hover { transform: scale(1.06); }
.chimp-cell.masked { color: transparent; background: var(--border-bright); border-color: var(--border-bright); }
.chimp-cell.gone { visibility: hidden; }

/* ---- Verbal memory ---- */
.vb-word {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 30px;
  min-height: 1.3em;
}
.vb-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.vb-btns .btn { min-width: 138px; }

/* ---------------- Shared animations ---------------- */

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.shake { animation: shake 0.3s; }

#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ---------------- Responsive ---------------- */

@media (max-width: 720px) {
  .header-in { height: 54px; }
  .result-top { gap: 14px; }
  .result-main { text-align: center; }
  .stage { min-height: 360px; }
  .type-words { font-size: 1.18rem; line-height: 1.9rem; }
  .type-box { height: 9rem; }
  .foot-in { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
