@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #18201c;
  --muted: #6f766f;
  --paper: #f7f5ef;
  --card: rgba(255, 255, 255, 0.74);
  --line: #deded5;
  --green: #28634b;
  --green-dark: #194635;
  --green-soft: #e3eee7;
  --coral: #e56f51;
  --yellow: #f3c64d;
  --shadow: 0 24px 70px rgba(37, 51, 43, 0.10);
  --radius: 24px;
}

[data-theme="dark"] {
  --ink: #f3f5ef;
  --muted: #98a4a4;
  --paper: #080c16;
  --card: rgba(17, 24, 39, 0.78);
  --line: rgba(218, 235, 233, 0.12);
  --green: #72d2aa;
  --green-dark: #45ad83;
  --green-soft: rgba(78, 190, 145, 0.14);
  --coral: #ff8066;
  --yellow: #ffd166;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow-x: hidden;
  transition: color .35s ease, background-color .35s ease;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(114,210,170,.10), transparent 24%),
    radial-gradient(circle at 88% 7%, rgba(101,116,255,.12), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(229,111,81,.07), transparent 25%);
}

[data-theme="dark"] body::before,
[data-theme="dark"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(158,206,255,.65) 0 1px, transparent 1.3px);
  background-position: 0 0, 37px 61px;
  background-size: 113px 113px, 173px 173px;
  opacity: .35;
}

[data-theme="dark"] body::after {
  background-size: 257px 257px, 337px 337px;
  background-position: 90px 20px, 16px 140px;
  filter: blur(.3px);
  opacity: .22;
}

button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .55;
  pointer-events: none;
}

.ambient-one {
  top: -290px;
  right: -180px;
  background: radial-gradient(circle, rgba(230, 111, 81, .22), transparent 68%);
}

.ambient-two {
  bottom: -320px;
  left: -220px;
  background: radial-gradient(circle, rgba(40, 99, 75, .18), transparent 68%);
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.5px;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(var(--coral) 0 44%, var(--ink) 44% 54%, #fff 54%);
  transform: rotate(-10deg);
}

.brand-mark::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  top: 8px;
  left: 8px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.brand-mark > span {
  position: absolute;
  z-index: 3;
  top: -6px;
  right: -7px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--yellow);
  color: #172015;
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(10deg);
}
.brand-mark > span::after { content: '?'; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.language-picker {
  position: relative;
  height: 42px;
  min-width: 104px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 31px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  cursor: pointer;
  transition: .2s ease;
}
.language-picker:hover, .language-picker:focus-within { border-color: var(--green); background: var(--card); box-shadow: 0 0 0 3px var(--green-soft); }
.language-picker > svg:first-child { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; }
.language-picker select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.language-chevron { position: absolute; right: 11px; width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }

.icon-button, .text-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: .2s ease;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.muted svg path:last-child { display: none; }
.theme-button { position: relative; }
.sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: block; }
.text-button { height: 42px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.icon-button:hover, .text-button:hover { border-color: #b9bbb3; background: #fff; transform: translateY(-1px); }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.screen { display: none; animation: screenIn .45s ease both; }
.screen.active { display: block; }

@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

.setup-screen { padding: 54px 0 80px; }
.hero { max-width: 720px; margin: 0 auto 72px; text-align: center; }

.eyebrow, .question-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(229,111,81,.12); }

.hero h1 {
  margin: 24px 0 24px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(45px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -4.2px;
}

.hero h1 em { color: var(--green); font-style: normal; }
.hero p { max-width: 570px; margin: auto; color: var(--muted); font-size: 18px; line-height: 1.65; }

.setup-section { margin-top: 54px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.section-heading > div { display: flex; align-items: center; gap: 14px; }
.section-heading h2 { margin: 0; font-family: 'Manrope', sans-serif; font-size: 22px; letter-spacing: -.7px; }
.section-heading p { margin: 0 0 2px; color: var(--muted); font-size: 14px; }
.step-number { color: var(--coral); font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 1px; }

.mode-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mode-option {
  min-height: 100px;
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border .2s, transform .2s, background .2s, box-shadow .2s;
}

.mode-option:hover { transform: translateY(-2px); border-color: #b8bcb4; box-shadow: 0 10px 25px rgba(32,48,39,.06); }
.mode-option.selected { border-color: var(--green); background: #f8fcf9; box-shadow: inset 0 0 0 1px var(--green); }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { margin-bottom: 5px; font-size: 15px; }
.mode-option small { color: var(--muted); font-size: 13px; }
.mode-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--green-soft); color: var(--green); font-family: 'Manrope'; font-weight: 800; }
.choice-icon { gap: 3px; align-content: center; }
.choice-icon i { width: 20px; height: 3px; display: block; border-radius: 3px; background: currentColor; }
.recall-icon { color: #9c4a35; background: #f7e7e2; font-size: 22px; }
.image-recall-icon { color:#6d65c7; background:rgba(112,101,205,.13); }
.image-recall-icon svg { width:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.flashcard-icon { color:#d56f37; background:rgba(229,132,76,.14); }
.flashcard-icon svg { width:25px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.radio-dot { width: 18px; height: 18px; border: 1px solid #b9bdb6; border-radius: 50%; }
.selected .radio-dot { border: 5px solid var(--green); }

.deck-tabs { width:fit-content; display:flex; gap:5px; margin:0 0 18px; padding:5px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb, var(--card) 80%, transparent); }
.deck-tab { min-height:38px; padding:0 17px; border:0; border-radius:9px; background:transparent; color:var(--muted); font-size:12px; font-weight:800; cursor:pointer; transition:.2s ease; }
.deck-tab:hover { color:var(--ink); background:color-mix(in srgb, var(--green-soft) 75%, transparent); }
.deck-tab.selected { background:var(--green); color:#fff; box-shadow:0 6px 18px rgba(40,99,75,.2); }
.deck-panel { display:none; animation:deckPanelIn .28s ease both; }
.deck-panel.active { display:block; }
.deck-panel-title { display:none; margin:0 0 12px; font-family:'Manrope'; font-size:16px; letter-spacing:-.4px; }
@keyframes deckPanelIn { from { opacity:0; transform:translateY(5px); } }
.names-note { margin:-7px 0 17px; color:var(--muted); font-size:12px; }

.generation-grid { display: flex; flex-direction: column; gap: 13px; }
.generation-card {
  position: relative;
  min-height: 162px;
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) minmax(260px, 42%) 46px;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: .25s ease;
}
.generation-card::before {
  content:'';
  position:absolute;
  inset:0;
  z-index:0;
  background:linear-gradient(100deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 58%);
  pointer-events:none;
}
.generation-card > * { position:relative; z-index:1; }
.generation-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow); }
.generation-card:focus-visible, .mode-option:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(40,99,75,.25); outline-offset: 3px; }
.generation-card .gen-index small { display:block; margin-bottom:3px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; }
.generation-card .roman { color: var(--accent, var(--green)); font-family: 'Manrope'; font-size: 38px; font-weight: 800; letter-spacing: -1.5px; }
.generation-card h3 { margin: 4px 0 7px; font-family:'Manrope'; font-size:25px; letter-spacing:-1px; }
.generation-card p { margin: 0; color: var(--muted); font-size: 12px; }
.generation-card .game-title { color:var(--accent,var(--green)); font-size:10px; font-weight:800; letter-spacing:1px; text-transform:uppercase; }
.generation-art { align-self:stretch; display:flex; align-items:center; justify-content:center; min-width:0; pointer-events:none; }
.generation-art::before { content:''; position:absolute; width:280px; height:110px; border-radius:50%; background:var(--accent); filter:blur(55px); opacity:.13; }
.generation-art img { width:150px; height:140px; margin:0 -20px; object-fit:contain; filter:drop-shadow(0 14px 16px rgba(0,0,0,.25)); transition:transform .35s ease; }
.generation-art img:nth-child(2) { transform:scale(.9) translateY(5px); }
.generation-card:hover .generation-art img:first-child { transform:translateX(-6px) scale(1.04) rotate(-2deg); }
.generation-card:hover .generation-art img:nth-child(2) { transform:translateX(6px) translateY(5px) scale(.94) rotate(2deg); }
.all-arrow { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; font-size:21px; transition:.25s; }
.generation-card:hover .all-arrow { color:var(--paper); background:var(--green); border-color:var(--green); transform:translateX(3px); }
.generation-card.all-generations { min-height:142px; }
.type-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.type-deck-card { position:relative; min-height:92px; display:grid; grid-template-columns:84px 1fr 28px; align-items:center; gap:13px; padding:16px; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--card); color:var(--ink); text-align:left; cursor:pointer; transition:.22s ease; }
.type-deck-card::before { content:''; position:absolute; inset:0; background:linear-gradient(112deg, color-mix(in srgb, var(--type-color) 16%, transparent), transparent 65%); pointer-events:none; }
.type-deck-card > * { position:relative; z-index:1; }
.type-deck-card:hover { transform:translateY(-2px); border-color:var(--type-color); box-shadow:0 14px 32px color-mix(in srgb, var(--type-color) 14%, transparent); }
.type-glyph { width:84px; min-height:28px; display:grid; place-items:center; }
.type-glyph img { width:84px; height:auto; display:block; filter:drop-shadow(0 6px 10px color-mix(in srgb, var(--type-color) 24%, transparent)); }
.type-deck-card strong,.type-deck-card small { display:block; }
.type-deck-card strong { margin-bottom:4px; font-size:13px; }
.type-deck-card small { overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.deck-arrow { color:var(--muted); font-size:18px; transition:.2s ease; }
.type-deck-card:hover .deck-arrow,.collection-card:hover .deck-arrow { color:var(--ink); transform:translateX(3px); }
.collection-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.collection-card { position:relative; min-height:190px; display:grid; grid-template-columns:1fr 180px 36px; align-items:center; gap:8px; padding:24px; overflow:hidden; border:1px solid var(--line); border-radius:19px; background:var(--card); color:var(--ink); text-align:left; cursor:pointer; transition:.25s ease; }
.collection-card::before { content:''; position:absolute; inset:0; background:linear-gradient(105deg, color-mix(in srgb, var(--collection-accent) 19%, transparent), transparent 67%); pointer-events:none; }
.collection-card:hover { transform:translateY(-3px); border-color:var(--collection-accent); box-shadow:0 18px 45px color-mix(in srgb, var(--collection-accent) 15%, transparent); }
.cute-collection { --collection-accent:#ef83ad; }
.legendary-collection { --collection-accent:#b49aea; }
.most-popular-collection { --collection-accent:#f0bd4f; }
.popular-collection { --collection-accent:#59aee8; }
.collection-copy,.collection-art,.collection-card .deck-arrow { position:relative; z-index:1; }
.collection-copy small,.collection-copy strong,.collection-copy span { display:block; }
.collection-copy small { margin-bottom:8px; color:var(--collection-accent); font-size:9px; font-weight:900; letter-spacing:1.2px; text-transform:uppercase; }
.collection-copy strong { margin-bottom:8px; font-family:'Manrope'; font-size:25px; line-height:1.05; letter-spacing:-1px; }
.collection-copy span { color:var(--muted); font-size:11px; line-height:1.5; }
.collection-art { height:140px; display:flex; align-items:center; justify-content:center; }
.collection-art img { position:absolute; width:112px; height:120px; object-fit:contain; filter:drop-shadow(0 14px 14px rgba(0,0,0,.22)); transition:.3s ease; }
.collection-art img:first-child { left:3px; transform:rotate(-5deg); }
.collection-art img:nth-child(2) { right:0; transform:rotate(5deg) scale(.93); }
.collection-card:hover .collection-art img:first-child { transform:translateX(-4px) rotate(-8deg) scale(1.04); }
.collection-card:hover .collection-art img:nth-child(2) { transform:translateX(4px) rotate(8deg) scale(.97); }
.data-credit { margin: 34px 0 0; color: #90968f; font-size: 12px; text-align: center; }
.data-credit a { color: inherit; }

.popular-section { margin-top:54px; }
.popular-decks { display:grid; grid-template-columns:repeat(5,1fr); gap:11px; }
.popular-decks a { min-height:112px; display:grid; grid-template-columns:36px 1fr; align-content:center; gap:2px 10px; padding:17px; border:1px solid var(--line); border-radius:16px; background:var(--card); color:var(--ink); text-decoration:none; transition:.22s ease; }
.popular-decks a:hover { transform:translateY(-2px); border-color:var(--green); box-shadow:0 14px 34px rgba(0,0,0,.14); }
.popular-decks a > span { grid-row:1 / 3; width:36px; height:36px; display:grid; place-items:center; align-self:center; border-radius:11px; background:var(--green-soft); color:var(--green); font-family:'Manrope'; font-size:12px; font-weight:900; }
.popular-decks a:nth-last-child(2) > span { background:rgba(239,131,173,.14); color:#ef83ad; font-size:20px; }
.popular-decks a:last-child > span { background:rgba(180,154,234,.14); color:#b49aea; font-size:18px; }
.popular-decks strong { align-self:end; font-family:'Manrope'; font-size:14px; }
.popular-decks small { min-width:0; overflow:hidden; color:var(--muted); font-size:9px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }

.learn-section { margin:76px 0 0; padding:48px; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(135deg, color-mix(in srgb, var(--card) 92%, var(--green) 8%), var(--card)); box-shadow:var(--shadow); text-align:center; }
.learn-section h2 { max-width:720px; margin:18px auto 16px; font-family:'Manrope'; font-size:clamp(30px,5vw,48px); line-height:1.05; letter-spacing:-2.2px; }
.learn-section > p { max-width:750px; margin:0 auto; color:var(--muted); font-size:16px; line-height:1.75; }
.learn-points { max-width:680px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:34px auto 0; }
.learn-points article { padding:20px 12px; border:1px solid var(--line); border-radius:15px; background:color-mix(in srgb, var(--paper) 68%, transparent); }
.learn-points strong, .learn-points span { display:block; }
.learn-points strong { margin-bottom:4px; color:var(--green); font-family:'Manrope'; font-size:27px; }
.learn-points span { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.7px; text-transform:uppercase; }

.site-footer { width:min(1120px,calc(100% - 40px)); display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:18px 30px; margin:0 auto; padding:32px 0 40px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; line-height:1.6; }
.site-footer p { max-width:680px; margin:0; }
.site-footer nav { display:flex; gap:18px; white-space:nowrap; }
.site-footer a { color:var(--muted); text-decoration:none; }
.site-footer a:hover { color:var(--green); }
.site-footer .footer-languages { width:100%; flex-wrap:wrap; gap:7px; padding-top:5px; }
.footer-languages a { min-width:29px; padding:3px 7px; border:1px solid var(--line); border-radius:7px; text-align:center; }

.legal-page main { width:min(820px,calc(100% - 40px)); padding:50px 0 80px; }
.legal-page .site-header { border-bottom:1px solid var(--line); }
.legal-page .brand { text-decoration:none; }
.legal-card { padding:clamp(28px,6vw,64px); border:1px solid var(--line); border-radius:var(--radius); background:var(--card); box-shadow:var(--shadow); }
.legal-card .eyebrow { margin-bottom:20px; }
.legal-card h1 { margin:0 0 14px; font-family:'Manrope'; font-size:clamp(42px,8vw,68px); letter-spacing:-3.5px; }
.legal-card .legal-lede { margin:0 0 38px; color:var(--muted); font-size:17px; line-height:1.7; }
.legal-card h2 { margin:34px 0 10px; font-family:'Manrope'; font-size:22px; letter-spacing:-.7px; }
.legal-card p, .legal-card li { color:var(--muted); line-height:1.75; }
.legal-card ul { padding-left:22px; }
.legal-card a { color:var(--green); }
.legal-updated { display:inline-block; margin-top:28px; padding:7px 11px; border-radius:8px; background:var(--green-soft); color:var(--green); font-size:11px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; }

.game-screen { padding: 30px 0 70px; }
.game-topbar { display: flex; align-items: end; justify-content: space-between; }
.session-labels { display: flex; align-items: center; gap: 10px; }
.session-generation, .session-mode { margin:0; padding: 8px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; line-height:1.2; }
.session-generation { background: var(--green); color: #fff; }
.session-mode { background: var(--green-soft); color: var(--green); }
.live-mode { position:relative; display:flex; align-items:center; border-radius:9px; background:var(--green-soft); color:var(--green); }
.live-mode select { min-height:32px; padding:0 30px 0 12px; border:0; outline:0; appearance:none; background:transparent; color:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.live-mode svg { position:absolute; right:9px; width:15px; fill:none; stroke:currentColor; stroke-width:1.8; pointer-events:none; }
.live-mode option { background:var(--paper); color:var(--ink); }
.game-stats { display: flex; gap: 34px; }
.game-stats div { min-width: 70px; }
.game-stats small, .game-stats strong { display: block; }
.game-stats small { margin-bottom: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.game-stats strong { font-family: 'Manrope'; font-size: 17px; }
.game-stats strong span { color: var(--coral); font-size: 12px; }
.progress-track { height: 3px; margin: 20px 0 46px; overflow: hidden; border-radius: 3px; background: #dddcd5; }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--coral); transition: width .35s ease; }

.classic-layout { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); align-items: center; gap: 8%; }
.pokemon-stage { position: relative; min-height: 540px; display: grid; place-items: center; isolation: isolate; }
.pokemon-stage::before { content: ''; position: absolute; z-index:-2; width: min(460px, 90%); aspect-ratio:1; border-radius:50%; background: rgba(255,255,255,.55); box-shadow: 0 30px 80px rgba(32,50,40,.08); }
.stage-orbit { position: absolute; z-index:-1; width:min(390px,78%); aspect-ratio:1; border:1px dashed rgba(40,99,75,.18); border-radius:50%; animation: orbit 28s linear infinite; }
.stage-orbit::before, .stage-orbit::after { content:''; position:absolute; width:9px; height:9px; border-radius:50%; background:var(--coral); }
.stage-orbit::before { top:12%; left:12%; }
.stage-orbit::after { right:4%; bottom:29%; background:var(--yellow); }
@keyframes orbit { to { transform: rotate(360deg); } }
.pokemon-stage img { width: min(420px, 82%); height: 410px; object-fit: contain; filter: drop-shadow(0 24px 20px rgba(38,47,42,.17)); opacity: 0; transform: scale(.92) translateY(10px); transition: opacity .25s, transform .4s cubic-bezier(.2,.8,.2,1), filter .25s; }
.pokemon-stage img.loaded { opacity: 1; transform: scale(1) translateY(0); }
.pokemon-stage img.answer-reveal { animation: revealPop .5s ease; }
@keyframes revealPop { 45% { transform: scale(1.07) rotate(-2deg); } }
.dex-number { position:absolute; top:45px; left:7%; color:#a8aaa5; font-family:'Manrope'; font-size:13px; font-weight:700; letter-spacing:2px; }
.type-badges { display:flex; align-items:center; justify-content:center; gap:7px; }
.type-badge { min-width:74px; padding:6px 13px; border-radius:999px; background:var(--type-color); color:#fff; box-shadow:inset 0 -2px 0 rgba(0,0,0,.12), 0 5px 14px color-mix(in srgb, var(--type-color) 28%, transparent); font-size:11px; font-weight:800; letter-spacing:1px; line-height:1; text-align:center; text-transform:uppercase; text-shadow:0 1px 2px rgba(0,0,0,.28); }
.type-badge.compact { min-width:0; padding:4px 7px; font-size:7px; letter-spacing:.55px; }
.stage-types { position:absolute; top:42px; left:50%; z-index:3; transform:translateX(-50%); }
.reveal-name { position:absolute; bottom:30px; left:50%; transform:translate(-50%, 8px); padding:9px 15px; border-radius:99px; background:var(--ink); color:#fff; font-size:13px; font-weight:700; opacity:0; transition:.25s; white-space:nowrap; }
.reveal-name.visible { opacity:1; transform:translate(-50%,0); }
.image-loader { position:absolute; display:none; }
.image-loader.active { display:block; }
.image-loader span { width:32px; height:32px; display:block; border:2px solid #d7d9d4; border-top-color:var(--green); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.answer-panel { max-width: 430px; }
.answer-panel h2, .recall-intro h2 { margin: 14px 0 34px; font-family:'Manrope'; font-size:clamp(34px,4vw,52px); line-height:1.03; letter-spacing:-2.5px; }
.answer-field { display:flex; align-items:center; padding:7px; border:1px solid #d2d4cd; border-radius:15px; background:rgba(255,255,255,.72); transition:.2s; }
.answer-field:focus-within { border-color:var(--green); box-shadow:0 0 0 4px rgba(40,99,75,.08); background:#fff; }
.answer-field input { min-width:0; flex:1; height:48px; padding:0 12px; border:0; outline:0; background:transparent; color:var(--ink); font-size:16px; }
.answer-field input::placeholder { color:#a3a8a1; }
.answer-field button { width:48px; height:48px; display:grid; place-items:center; border:0; border-radius:11px; background:var(--green); color:#fff; cursor:pointer; transition:.2s; }
.answer-field button:hover { background:var(--green-dark); }
.answer-field button svg { width:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.answer-feedback { min-height:20px; margin:10px 7px 0; color:#969a94; font-size:12px; }
.answer-feedback.correct { color:var(--green); font-weight:700; }
.answer-feedback.incorrect { color:#be4f36; font-weight:700; }
.shake { animation:shake .3s ease; }
@keyframes shake { 25% { transform:translateX(-5px); } 50% { transform:translateX(5px); } 75% { transform:translateX(-3px); } }
.hint-copy { margin:11px 0 0; padding:11px 14px; border:1px solid color-mix(in srgb, var(--yellow) 40%, var(--line)); border-radius:12px; background:color-mix(in srgb, var(--yellow) 10%, transparent); color:var(--ink); font-size:12px; line-height:1.5; }
.question-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:20px; }
.utility-button { min-height:38px; padding:0 13px; border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--muted); font-size:12px; font-weight:700; cursor:pointer; transition:.2s ease; }
.utility-button:hover { border-color:var(--green); color:var(--ink); background:var(--green-soft); transform:translateY(-1px); }
.hint-button span { width:18px; height:18px; display:inline-grid; place-items:center; margin-right:5px; border-radius:50%; background:var(--yellow); color:#30250a; font-size:11px; }
.retry-button { color:var(--green); }
.retry-button strong { min-width:20px; height:20px; display:inline-grid; place-items:center; margin-left:7px; border-radius:999px; background:var(--green); color:var(--paper); font-size:10px; }

.choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.choice-button { min-height:60px; padding:13px 15px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.68); font-weight:600; text-align:left; cursor:pointer; transition:.2s; }
.choice-button:disabled { cursor:default; }
.choice-button.correct { border-color:var(--green); background:var(--green-soft); color:var(--green); }
.choice-button.wrong { border-color:#d77a65; background:#f9e9e5; color:#a4432d; }
@media (hover:hover) and (pointer:fine) {
  .choice-button:hover:not(:disabled) { border-color:var(--green); transform:translateY(-1px); background:#fff; }
  [data-theme="dark"] .choice-button:hover:not(:disabled) { background:rgba(25,37,54,.95); }
}

.flashcard-layout { max-width:900px; margin:0 auto; padding:8px 0 50px; text-align:center; perspective:1400px; }
.flashcard-heading h2 { margin:11px 0 8px; font-family:'Manrope'; font-size:clamp(32px,5vw,50px); letter-spacing:-2.2px; }
.flashcard-heading p { margin:0 0 26px; color:var(--muted); }
.flashcard { width:min(520px,100%); aspect-ratio:1.08; display:block; margin:0 auto; padding:0; border:0; border-radius:30px; background:transparent; cursor:pointer; perspective:1400px; }
.flashcard-inner { position:relative; width:100%; height:100%; display:block; transform-style:preserve-3d; transition:transform .68s cubic-bezier(.2,.78,.22,1); }
.flashcard.learned .flashcard-inner { animation:learnedCard .5s ease; }
@keyframes learnedCard { 45% { transform:translateY(-8px) scale(1.025); filter:drop-shadow(0 0 22px rgba(114,210,170,.5)); } }
.flashcard-face { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:hidden; border:1px solid var(--line); border-radius:30px; background:linear-gradient(145deg, rgba(255,255,255,.91), rgba(239,241,235,.82)); box-shadow:0 28px 80px rgba(26,38,31,.15); backface-visibility:hidden; -webkit-backface-visibility:hidden; transform-style:preserve-3d; transition:transform .68s cubic-bezier(.2,.78,.22,1), opacity .3s ease; }
.flashcard-face::before { content:''; position:absolute; width:72%; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle, color-mix(in srgb, var(--green) 12%, transparent), transparent 67%); }
.flashcard-front { transform:rotateY(0deg); opacity:1; }
.flashcard-back { transform:rotateY(180deg); opacity:0; background:linear-gradient(145deg, rgba(255,255,255,.97), rgba(235,242,237,.92)); }
.flashcard.flipped .flashcard-front { transform:rotateY(-180deg); opacity:0; }
.flashcard.flipped .flashcard-back { transform:rotateY(0deg); opacity:1; }
.flashcard-face img { position:relative; width:64%; height:60%; object-fit:contain; filter:drop-shadow(0 18px 18px rgba(25,32,28,.18)); }
.flashcard-back img { width:45%; height:43%; margin-top:8px; }
.flashcard-dex { position:absolute; top:24px; left:28px; color:var(--muted); font-family:'Manrope'; font-size:12px; font-weight:800; letter-spacing:1.8px; }
.flashcard-types { position:absolute; top:22px; left:50%; z-index:2; transform:translateX(-50%); }
.flashcard-name { position:relative; max-width:90%; margin-top:-2px; font-family:'Manrope'; font-size:clamp(38px,7vw,66px); font-weight:800; line-height:1; letter-spacing:-3px; color:var(--name-color-a); }
.flashcard-name.dual-type-name { background:linear-gradient(90deg, var(--name-color-a) 0 49%, var(--name-color-b) 51% 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.flip-prompt { position:absolute; bottom:22px; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; }
.flip-prompt span { display:inline-block; margin-left:5px; font-size:16px; transition:transform .25s; }
.flashcard:hover .flip-prompt span { transform:rotate(10deg); }
.flashcard-hint { width:min(520px,100%); margin:14px auto 0; }
.flashcard-actions { width:min(520px,100%); display:grid; grid-template-columns:auto 1fr 1fr; gap:10px; margin:14px auto 0; }
.flashcard-actions .utility-button, .flashcard-actions .primary-button, .flashcard-actions .secondary-button { min-height:48px; }

.recall-layout { position:relative; }
.recall-intro { position:sticky; top:0; z-index:12; display:grid; grid-template-columns:1fr minmax(330px,460px); gap:60px; align-items:end; margin-bottom:38px; padding:14px 0 18px; border-bottom:1px solid rgba(222,222,213,.62); background:rgba(247,245,239,.86); backdrop-filter:blur(18px); }
.recall-intro h2 { margin-bottom:10px; }
.recall-intro > div > p { margin:0; color:var(--muted); line-height:1.6; }
.recall-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:10px; }
.recall-card { position:relative; min-width:0; aspect-ratio:.92; display:grid; place-items:center; overflow:hidden; border:1px solid #ddded8; border-radius:14px; background:rgba(255,255,255,.64); transition:.35s ease; }
.recall-card img { width:84%; height:76%; object-fit:contain; filter:brightness(0) opacity(.09); transition:.45s cubic-bezier(.2,.8,.2,1); }
.recall-card small { position:absolute; top:8px; left:9px; color:#aeb1ac; font-size:9px; font-weight:700; letter-spacing:.5px; }
.tile-types { position:absolute; top:7px; left:50%; z-index:2; max-width:65%; gap:3px; transform:translateX(-50%); }
.tile-hint-button { position:absolute; top:6px; right:7px; z-index:6; width:20px; height:20px; display:grid; place-items:center; padding:0; border:1px solid color-mix(in srgb, var(--yellow) 50%, var(--line)); border-radius:50%; background:color-mix(in srgb, var(--paper) 85%, var(--yellow) 15%); color:color-mix(in srgb, var(--yellow) 62%, var(--ink)); font-size:10px; font-weight:900; cursor:pointer; transition:.2s; }
.tile-hint-button:hover, .recall-card.hint-open .tile-hint-button { border-color:var(--yellow); background:var(--yellow); color:#30250a; transform:scale(1.08); }
.tile-hint-bubble { position:absolute; z-index:5; top:32px; right:7px; left:7px; padding:7px 6px; border:1px solid color-mix(in srgb, var(--yellow) 48%, var(--line)); border-radius:8px; background:color-mix(in srgb, var(--paper) 92%, var(--yellow) 8%); box-shadow:0 8px 20px rgba(0,0,0,.18); color:var(--ink); font-size:8px; font-weight:700; line-height:1.35; opacity:0; transform:translateY(-4px); pointer-events:none; transition:.2s ease; }
.recall-card.hint-open .tile-hint-bubble { opacity:1; transform:translateY(0); }
.recall-name { position:absolute; right:7px; bottom:7px; left:7px; display:flex; align-items:center; justify-content:center; gap:3px; overflow:hidden; color:transparent; font-size:10px; font-weight:700; text-align:center; text-overflow:ellipsis; white-space:nowrap; transition:.3s; }
.recall-name-text { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.tile-check { width:12px; height:12px; flex:0 0 auto; opacity:0; color:var(--green); fill:none; stroke:currentColor; stroke-width:2.8; stroke-linecap:round; stroke-linejoin:round; transition:.25s ease; }
.recall-card.revealed { border-color:rgba(58,179,118,.92); background:#fff; box-shadow:0 0 0 1px rgba(58,179,118,.3), 0 0 24px rgba(58,179,118,.24), 0 14px 30px rgba(34,49,40,.1); }
.recall-card.revealed img { filter:none; transform:scale(1.07); }
.recall-card.revealed .recall-name { color:var(--ink); }
.recall-card.revealed .tile-check { opacity:1; }
.recall-card.just-revealed { animation:cardPop .55s ease; }
.recall-grid.show-clues .recall-card:not(.revealed) img { filter:drop-shadow(0 8px 7px rgba(0,0,0,.18)); opacity:.86; }
.recall-grid.show-clues .recall-card:not(.revealed) { background:color-mix(in srgb, var(--card) 78%, var(--accent, var(--green)) 7%); }
@keyframes cardPop { 45% { transform:translateY(-7px) scale(1.04); } }

.toast { position:fixed; z-index:20; right:24px; bottom:24px; max-width:340px; padding:13px 17px; border-radius:12px; background:var(--ink); color:#fff; box-shadow:var(--shadow); font-size:13px; opacity:0; transform:translateY(10px); pointer-events:none; transition:.25s; }
.toast.visible { opacity:1; transform:translateY(0); }

.results-dialog { width:min(520px,calc(100% - 32px)); padding:46px; overflow:hidden; border:0; border-radius:26px; background:#fff; color:var(--ink); box-shadow:0 30px 100px rgba(18,30,23,.24); text-align:center; }
.results-dialog::backdrop { background:rgba(24,32,28,.45); backdrop-filter:blur(6px); }
.results-dialog h2 { margin:10px 0 9px; font-family:'Manrope'; font-size:38px; letter-spacing:-2px; }
.results-dialog > p:not(.question-kicker) { margin:0; color:var(--muted); }
.result-badge { width:54px; height:54px; display:grid; place-items:center; margin:0 auto 20px; border-radius:50%; background:var(--green); color:#fff; font-size:22px; }
.result-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:30px 0; }
.result-stats div { padding:15px 8px; border-radius:13px; background:var(--paper); }
.result-stats strong, .result-stats small { display:block; }
.result-stats strong { margin-bottom:4px; font-family:'Manrope'; font-size:22px; }
.result-stats small { color:var(--muted); font-size:11px; }
.result-actions { display:flex; gap:10px; }
.primary-button, .secondary-button { flex:1; min-height:50px; border-radius:13px; font-weight:700; cursor:pointer; }
.primary-button { border:1px solid var(--green); background:var(--green); color:#fff; }
.secondary-button { border:1px solid var(--line); background:#fff; }

.hidden { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

[data-theme="dark"] .ambient-one { background:radial-gradient(circle, rgba(93,88,200,.20), transparent 68%); }
[data-theme="dark"] .ambient-two { background:radial-gradient(circle, rgba(48,143,116,.17), transparent 68%); }
[data-theme="dark"] .icon-button,
[data-theme="dark"] .text-button,
[data-theme="dark"] .language-picker { background:rgba(15,22,35,.7); }
[data-theme="dark"] .icon-button:hover,
[data-theme="dark"] .text-button:hover,
[data-theme="dark"] .language-picker:hover,
[data-theme="dark"] .language-picker:focus-within { background:rgba(30,42,60,.9); border-color:var(--green); }
[data-theme="dark"] .brand-mark { border-color:#e8eee9; background:linear-gradient(var(--coral) 0 44%, #e8eee9 44% 54%, #101724 54%); }
[data-theme="dark"] .brand-mark::after { border-color:#e8eee9; background:#101724; }
[data-theme="dark"] .mode-option.selected { border-color:var(--green); background:rgba(36,79,62,.24); box-shadow:inset 0 0 0 1px var(--green), 0 12px 35px rgba(0,0,0,.18); }
[data-theme="dark"] .mode-option:hover { border-color:rgba(114,210,170,.55); box-shadow:0 14px 32px rgba(0,0,0,.22); }
[data-theme="dark"] .recall-icon { color:#ff9a83; background:rgba(229,111,81,.13); }
[data-theme="dark"] .generation-card { background:linear-gradient(105deg, rgba(19,27,43,.95), rgba(12,18,31,.84)); }
[data-theme="dark"] .generation-card:hover { border-color:color-mix(in srgb, var(--accent) 70%, white 10%); }
[data-theme="dark"] .session-generation { color:#07120d; }
[data-theme="dark"] .pokemon-stage::before { background:radial-gradient(circle at 45% 35%, rgba(40,53,76,.9), rgba(13,20,34,.78)); box-shadow:0 35px 90px rgba(0,0,0,.35), inset 0 0 70px rgba(114,210,170,.04); border:1px solid rgba(255,255,255,.05); }
[data-theme="dark"] .answer-field { background:rgba(13,20,33,.84); border-color:rgba(255,255,255,.13); }
[data-theme="dark"] .answer-field:focus-within { background:rgba(17,27,42,.95); }
[data-theme="dark"] .choice-button { background:rgba(16,24,38,.82); }
[data-theme="dark"] .choice-button.correct { background:rgba(53,132,98,.22); }
[data-theme="dark"] .choice-button.wrong { background:rgba(168,67,45,.2); }
[data-theme="dark"] .flashcard-face { background:linear-gradient(145deg, rgba(24,35,53,.98), rgba(10,16,28,.96)); box-shadow:0 30px 90px rgba(0,0,0,.44); }
[data-theme="dark"] .flashcard-back { background:linear-gradient(145deg, rgba(25,39,54,.99), rgba(9,16,27,.98)); }
[data-theme="dark"] .utility-button { background:rgba(13,20,33,.62); }
[data-theme="dark"] .hint-copy, [data-theme="dark"] .tile-hint-bubble { background:rgba(33,31,22,.96); }
[data-theme="dark"] .recall-intro { border-bottom-color:rgba(114,210,170,.16); background:rgba(8,12,22,.82); box-shadow:0 18px 40px rgba(0,0,0,.24); }
[data-theme="dark"] .recall-card { background:rgba(16,23,37,.78); border-color:rgba(255,255,255,.09); }
[data-theme="dark"] .recall-card.revealed { border-color:rgba(114,210,170,.92); background:rgba(20,34,41,.95); box-shadow:0 0 0 1px rgba(114,210,170,.34), 0 0 27px rgba(114,210,170,.25), 0 18px 34px rgba(0,0,0,.28); }
[data-theme="dark"] .recall-card img { filter:brightness(0) invert(1) opacity(.09); }
[data-theme="dark"] .recall-card.revealed img { filter:none; }
[data-theme="dark"] .results-dialog { background:#121a29; color:var(--ink); }
[data-theme="dark"] .result-stats div { background:#0b111d; }
[data-theme="dark"] .secondary-button { background:#172235; color:var(--ink); }
[data-theme="dark"] .results-dialog::backdrop { background:rgba(2,5,10,.75); }

@media (min-width:1600px) and (min-aspect-ratio:21/9) {
  .site-header, main, .site-footer { width:calc(100% - clamp(72px,6vw,220px)); max-width:none; }
  .setup-screen { padding-top:34px; }
  .hero { margin-bottom:36px; }
  .hero h1 { font-size:clamp(56px,5vw,88px); }
  .mode-section { margin-top:38px; }
  .mode-picker { grid-template-columns:repeat(5,1fr); gap:10px; }
  .mode-option { min-height:86px; padding:14px 16px; }
  .generation-section { display:grid; grid-template-columns:1.05fr 1.35fr .9fr; align-items:start; gap:14px; margin-top:40px; }
  .generation-section > .section-heading, .generation-section > .names-note { grid-column:1 / -1; }
  .generation-section > .section-heading { margin-bottom:2px; }
  .deck-tabs { display:none; }
  .deck-panel, .deck-panel.active { display:block; }
  .deck-panel-title { display:block; }
  .generation-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
  .generation-card, .generation-card.all-generations { min-height:88px; grid-template-columns:42px minmax(95px,1fr) 74px; gap:7px; padding:10px 11px; border-radius:13px; }
  .generation-card .gen-index small, .generation-card .all-arrow, .generation-card .game-title { display:none; }
  .generation-card .roman { font-size:24px; }
  .generation-card h3 { margin:0 0 3px; font-size:16px; letter-spacing:-.5px; }
  .generation-card p { font-size:8px; }
  .generation-art { grid-column:3; }
  .generation-art::before { width:90px; height:50px; filter:blur(25px); }
  .generation-art img { position:absolute; right:-3px; width:61px; height:68px; margin:0; }
  .generation-art img:nth-child(2) { right:28px; opacity:.58; }
  .type-grid { grid-template-columns:repeat(3,1fr); gap:8px; }
  .type-deck-card { min-height:75px; grid-template-columns:66px minmax(66px,1fr) 16px; gap:8px; padding:10px; border-radius:13px; }
  .type-glyph, .type-glyph img { width:66px; }
  .type-deck-card strong { font-size:11px; }
  .type-deck-card small { font-size:8px; }
  .collection-grid { grid-template-columns:1fr; gap:10px; }
  .collection-card { min-height:215px; grid-template-columns:1fr 150px 24px; padding:18px; }
  .collection-art img { width:102px; height:112px; }
  .popular-section { margin-top:40px; }
  .popular-decks { grid-template-columns:repeat(5,1fr); }
  .learn-section { margin-top:40px; padding:34px; }
}

@media (min-width:2600px) and (min-aspect-ratio:30/9) {
  .generation-section { grid-template-columns:1fr 1.5fr 1fr; gap:18px; }
  .type-grid { grid-template-columns:repeat(4,1fr); }
  .collection-grid { grid-template-columns:1fr 1fr; }
  .collection-card { min-height:190px; grid-template-columns:1fr 135px 22px; }
}

@media (max-width: 900px) {
  .generation-card { grid-template-columns:90px minmax(190px,1fr) minmax(220px,38%) 42px; gap:14px; }
  .generation-art img { width:125px; height:125px; }
  .classic-layout { grid-template-columns:1fr 360px; gap:3%; }
  .pokemon-stage { min-height:480px; }
  .pokemon-stage img { height:360px; }
  .recall-grid { grid-template-columns:repeat(6,1fr); }
}

@media (max-width: 720px) {
  .site-header { width:calc(100% - 28px); height:76px; }
  .header-actions:has(#quitButton:not(.hidden)) .icon-button { display:none; }
  main { width:calc(100% - 28px); }
  .setup-screen { padding-top:34px; }
  .hero { margin-bottom:54px; }
  .hero h1 { letter-spacing:-2.8px; }
  .hero p { font-size:16px; }
  .section-heading { align-items:start; }
  .section-heading p { display:none; }
  .mode-picker { grid-template-columns:1fr; }
  .mode-option { min-height:82px; }
  .deck-tabs { width:100%; }
  .deck-tab { min-width:0; flex:1; padding:0 8px; }
  .type-grid { grid-template-columns:repeat(2,1fr); }
  .collection-grid { grid-template-columns:1fr; }
  .collection-card { min-height:168px; }
  .popular-decks { grid-template-columns:repeat(2,1fr); }
  .learn-section { margin-top:54px; padding:32px 20px; }
  .learn-section h2 { letter-spacing:-1.7px; }
  .site-footer { width:calc(100% - 28px); flex-direction:column; gap:16px; }
  .generation-card { min-height:142px; grid-template-columns:62px 1fr 118px; gap:10px; padding:16px; }
  .generation-card .gen-index small { display:none; }
  .generation-card .roman { font-size:29px; }
  .generation-card h3 { font-size:20px; }
  .generation-card .all-arrow { display:none; }
  .generation-art { grid-column:3; }
  .generation-art img { position:absolute; width:105px; height:112px; margin:0; right:-7px; opacity:.9; }
  .generation-art img:nth-child(2) { right:43px; opacity:.55; }
  .game-screen { padding-top:18px; }
  .game-topbar { align-items:center; }
  .live-mode select { width:38px; padding:0; opacity:0; }
  .live-mode { width:38px; height:32px; }
  .live-mode::before { content:'↔'; position:absolute; inset:0; display:grid; place-items:center; font-size:15px; pointer-events:none; }
  .live-mode svg { display:none; }
  .game-stats { gap:16px; }
  .game-stats div { min-width:54px; }
  .progress-track { margin-bottom:18px; }
  .classic-layout { min-height:0; display:block; }
  .pokemon-stage { min-height:390px; }
  .pokemon-stage::before { width:330px; max-width:90%; }
  .stage-orbit { width:290px; max-width:78%; }
  .pokemon-stage img { width:330px; max-width:82%; height:300px; }
  .dex-number { top:25px; }
  .stage-types { top:23px; }
  .type-badge { min-width:62px; padding:5px 10px; font-size:9px; }
  .reveal-name { bottom:15px; }
  .answer-panel { max-width:520px; margin:0 auto; text-align:center; }
  .answer-panel h2 { margin:8px 0 22px; font-size:34px; letter-spacing:-1.8px; }
  .answer-feedback { text-align:left; }
  .recall-intro { grid-template-columns:1fr; gap:8px; margin-bottom:18px; padding:8px 0 10px; }
  .recall-intro .question-kicker { display:none; }
  .recall-intro h2 { margin:0; font-size:24px; letter-spacing:-1.1px; }
  .recall-intro > div > p { display:none; }
  .recall-form .answer-field input { height:44px; }
  .recall-form .answer-feedback { min-height:16px; margin-top:6px; font-size:11px; }
  .recall-grid { grid-template-columns:repeat(4,1fr); gap:7px; }
  .flashcard-layout { padding-top:0; }
  .flashcard-heading h2 { font-size:32px; letter-spacing:-1.7px; }
  .flashcard-heading p { margin-bottom:18px; font-size:13px; }
  .flashcard { width:min(470px,100%); border-radius:23px; }
  .flashcard-face { border-radius:23px; }
  .flashcard-dex { top:17px; left:19px; }
  .flashcard-types { top:15px; }
  .flashcard-name { font-size:clamp(34px,10vw,55px); letter-spacing:-2px; }
  .question-actions { justify-content:center; }
  .text-button { padding:0 13px; }
  .language-picker { min-width:72px; padding-left:10px; padding-right:24px; }
  .language-picker > svg:first-child { width:15px; }
  .language-chevron { right:8px; }
}

@media (max-width: 420px) {
  .brand { font-size:17px; }
  .header-actions { gap:6px; }
  .icon-button { width:36px; height:36px; }
  .language-picker { width:64px; min-width:64px; height:36px; }
  .text-button { height:36px; padding:0 10px; font-size:11px; }
  .generation-card { min-height:126px; padding:14px; grid-template-columns:48px 1fr 88px; }
  .deck-tab { font-size:10px; }
  .type-grid { grid-template-columns:1fr; gap:9px; }
  .type-deck-card { min-height:76px; }
  .type-deck-card { grid-template-columns:78px 1fr 22px; }
  .type-glyph, .type-glyph img { width:78px; }
  .collection-card { min-height:154px; grid-template-columns:1fr 112px; padding:18px; }
  .collection-card .deck-arrow { display:none; }
  .collection-art { height:110px; }
  .collection-art img { width:86px; height:98px; }
  .popular-decks { grid-template-columns:1fr; }
  .learn-points { grid-template-columns:1fr; }
  .generation-card .roman { font-size:24px; }
  .generation-card h3 { margin-top:14px; }
  .generation-art img { width:90px; height:96px; }
  .generation-art img:nth-child(2) { right:28px; }
  .game-stats div:last-child { display:none; }
  .choice-grid { grid-template-columns:1fr; }
  .pokemon-stage { min-height:350px; }
  .pokemon-stage img { height:270px; }
  .recall-grid { grid-template-columns:repeat(3,1fr); }
  .tile-types { max-width:70%; gap:2px; }
  .tile-types .type-badge.compact { padding:3px 4px; font-size:6px; letter-spacing:.25px; }
  .flashcard-actions { grid-template-columns:1fr 1fr; }
  .flashcard-actions .hint-button { grid-column:1 / -1; }
  .flashcard-face img { width:70%; height:58%; }
  .flashcard-back img { width:48%; height:40%; }
  .results-dialog { padding:36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
