/* ArcadeBreeze "Breeze" theme — brighter arcade look layered over arcade.css + game-polish.css.
   Loaded last, so it only overrides tokens and key components. */

:root {
  --ground: #F2F5FF;
  --surface: #FFFFFF;
  --raised: #E8EDFC;
  --hover: #DBE3FA;
  --text: #11163A;
  --muted: #4A5274;
  --accent: #3546D6;
  --on-accent: #FFFFFF;
  --line: #D6DDF2;
  --accent-shadow: #1F2C9E;
  --hero-a: #2F3CC9;
  --hero-b: #5B33D6;
  --hero-c: #8A2FC4;
  --shadow-sm: 0 1px 2px rgba(17, 22, 58, .06), 0 2px 8px rgba(17, 22, 58, .05);
  --shadow-md: 0 10px 30px rgba(31, 44, 158, .12);
  --game: #3546D6;
  --game-ink: #2B39B8;
  --game-soft: #E8EDFC;
}

:root[data-theme=dark] {
  --ground: #0A0E22;
  --surface: #131937;
  --raised: #1B2347;
  --hover: #252F5C;
  --text: #EEF1FF;
  --muted: #A9B1D6;
  --accent: #8C9BFF;
  --on-accent: #0A0E22;
  --line: #2A3462;
  --accent-shadow: #5562CC;
  --hero-a: #232D9C;
  --hero-b: #4422A8;
  --hero-c: #6A1F99;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, .35);
  --game-soft: #1B2347;
}

/* ---------- Type */
h1, h2, h3, .brand { font-family: 'Inter Tight', Inter, sans-serif; }
h1 { font-weight: 700; letter-spacing: -.03em; }
h2 { letter-spacing: -.02em; }

/* ---------- Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand svg { color: var(--accent); }
.site-header nav a { border-radius: 999px; padding: 6px 12px; }
.site-header nav a:hover { background: var(--raised); text-decoration: none; }

/* ---------- Buttons: chunky arcade press */
.primary, .game-actions .round-start, #game-controls #new {
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--accent-shadow);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.primary:hover, .game-actions .round-start:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--accent-shadow); }
.primary:active, .game-actions .round-start:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-shadow); }
.secondary-btn { border-radius: 12px; }
.game-actions button { border-radius: 10px; }

/* ---------- Home hero */
.masthead.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 40px;
  border: 0;
  border-radius: 28px;
  color: #FFFFFF;
  background:
    radial-gradient(600px 300px at 90% -10%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(500px 260px at -10% 110%, rgba(255, 160, 120, .25), transparent 60%),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.masthead.hero > astro-island,
.masthead.hero > .hero-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.masthead.hero > .hero-copy,
.masthead.hero > .hero-picks {
  position: relative;
  z-index: 1;
}
.hero .masthead-top { border-bottom: 0; padding-bottom: 0; margin-bottom: 18px; }
.hero .edition-label { color: #FFFFFF; opacity: .95; }
.hero h1 { color: #FFFFFF; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; max-width: 15ch; font-weight: 800; }
.hero .masthead-lead { color: #F1EEFF; font-size: 17px; max-width: 46ch; }
.hero .streak-pill, .hero .surprise-btn {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); color: #FFFFFF;
}
.hero .surprise-btn:hover { background: rgba(255, 255, 255, .26); }
.hero .hero-cta { background: #FFFFFF; color: #2A2FA8; box-shadow: 0 3px 0 rgba(10, 10, 60, .35); }
.hero .hero-cta:hover { background: #FFFFFF; box-shadow: 0 4px 0 rgba(10, 10, 60, .35); }
.hero .hero-secondary { background: transparent; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .55); }
.hero .hero-secondary:hover { background: rgba(255, 255, 255, .14); }
.hero .resume-link { color: #FFFFFF; text-decoration: underline; }
.hero .club-stats { margin-top: 26px; background: rgba(0, 0, 30, .22); border-color: rgba(255, 255, 255, .25); }
.hero .club-stats span { color: #E4E1FF; }
.hero .club-stats strong { color: #FFFFFF; }
.masthead.is-new .club-stats, .masthead.is-new .streak-pill { display: none; }

.hero-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hero-tile {
  position: relative; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: #FFFFFF; color: #11163A;
  box-shadow: 0 10px 24px rgba(10, 8, 60, .28);
  transition: transform .18s, box-shadow .18s;
}
.hero-tile:nth-child(odd) { transform: rotate(-1.2deg); }
.hero-tile:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }
.hero-tile:hover { transform: translateY(-4px) rotate(0); box-shadow: 0 16px 30px rgba(10, 8, 60, .35); text-decoration: none; }
.hero-tile img { display: block; width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.hero-tile-label { display: flex; flex-direction: column; padding: 10px 14px 12px; gap: 1px; }
.hero-tile-label strong { font-family: 'Inter Tight', Inter, sans-serif; font-size: 17px; line-height: 1.2; }
.hero-tile-label span { font-size: 13px; color: #4A5274; }
.hero-play {
  position: absolute; top: 10px; right: 10px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #FFFFFF; color: #2A2FA8; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

/* ---------- Section headings & cards */
.section-eyebrow { color: var(--accent); }
.daily-card, .mini-card, .game-card {
  border-radius: 20px; box-shadow: var(--shadow-sm); border-color: var(--line);
  transition: transform .18s, box-shadow .18s;
}
.daily-card:hover, .mini-card:hover, .game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.game-caption h3 { font-size: 18px; }
.play-reveal { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-weight: 700; }
.filters .filter { border-radius: 999px; }
.filter[aria-pressed=true] { box-shadow: 0 2px 0 var(--accent-shadow); }
.search-field { border-radius: 999px; }

/* ---------- Per-game colour (decoration = --game, text-bearing fill = --game-ink) */
body[data-game="click-speed"]      { --game: #FF5A5F; --game-ink: #C92A36; --game-soft: #FFECEE; }
body[data-game="reaction-time"]    { --game: #12B886; --game-ink: #0B7A5A; --game-soft: #E3F8F0; }
body[data-game="pattern-recall"]   { --game: #4C6EF5; --game-ink: #3B4FC4; --game-soft: #EDF1FF; }
body[data-game="target-rush"]      { --game: #F03E3E; --game-ink: #C92A2A; --game-soft: #FFEDED; }
body[data-game="word-recall"]      { --game: #AE3EC9; --game-ink: #862E9C; --game-soft: #F8EBFB; }
body[data-game="ape-memory"]       { --game: #F76707; --game-ink: #B8480A; --game-soft: #FFF0E3; }
body[data-game="tile-flash"]       { --game: #15AABF; --game-ink: #0B7285; --game-soft: #E3F7FA; }
body[data-game="2048"]             { --game: #F59F00; --game-ink: #A35F00; --game-soft: #FFF4DB; }
body[data-game="bird-flying"]      { --game: #339AF0; --game-ink: #1864AB; --game-soft: #E5F2FD; }
body[data-game="dinosaur-runner"]  { --game: #40C057; --game-ink: #2B7A3A; --game-soft: #E9F8EC; }
body[data-game="snake"]            { --game: #2F9E44; --game-ink: #276C36; --game-soft: #E6F5E9; }
body[data-game="minesweeper"]      { --game: #5C7CFA; --game-ink: #364FC7; --game-soft: #ECF0FF; }
body[data-game="sudoku"]           { --game: #4263EB; --game-ink: #2E46B3; --game-soft: #EBEFFF; }
body[data-game="word-search"]      { --game: #AE3EC9; --game-ink: #862E9C; --game-soft: #F8EBFB; }
body[data-game="solitaire"],
body[data-game="spider-solitaire"],
body[data-game="freecell"]         { --game: #0CA678; --game-ink: #087F5B; --game-soft: #E3F7F0; }
body[data-game="mahjong-solitaire"]{ --game: #E8590C; --game-ink: #B2440A; --game-soft: #FFEEE3; }
body[data-game="memory-match"]     { --game: #E64980; --game-ink: #B02A5E; --game-soft: #FDEBF2; }
body[data-game="tic-tac-toe"]      { --game: #7048E8; --game-ink: #5535C2; --game-soft: #F0EBFF; }
body[data-game="four-in-a-row"]    { --game: #E03131; --game-ink: #B02525; --game-soft: #FDEAEA; }
body[data-game="bow-arrow-aim-trainer"] { --game: #F76707; --game-ink: #B34A05; --game-soft: #FFF0E3; }
:root[data-theme=dark] body[data-game] { --game-soft: color-mix(in srgb, var(--game) 14%, var(--surface)); }

/* ---------- Game page: compact heading so the board sits higher */
body[data-game] .breadcrumbs { font-size: 13px; padding-top: 14px; }
body[data-game] .game-heading { padding: 4px 0 14px; align-items: center; }
body[data-game] .game-title-row { margin-bottom: 6px; }
body[data-game] .game-heading h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
body[data-game] .game-heading p { margin-top: 4px; }

body[data-game] .play-area {
  border: 1px solid var(--line);
  border-top: 5px solid var(--game);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  padding: 16px 18px 18px;
}
body[data-game] .game-command-bar { background: var(--game-soft); border-color: transparent; border-radius: 14px; }
body[data-game] .game-setup { border-radius: 12px; background: var(--surface); }
body[data-game] .game-score {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--game-soft); border: 0; border-radius: 999px;
  padding: 7px 14px; font-size: 14px;
}
body[data-game] .game-stage {
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--game) 10%, transparent), transparent 55%),
    var(--ground);
}

/* Reflex test targets: big, colourful, satisfying */
body[data-game] .test-target {
  border: 0; border-radius: 20px; min-height: 330px;
  background: var(--game-ink); color: #FFFFFF;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 8px 24px color-mix(in srgb, var(--game) 30%, transparent);
  transition: transform .06s, filter .15s;
  cursor: pointer;
}
body[data-game] .test-target:hover { filter: brightness(1.05); }
body[data-game] .test-target:active { transform: scale(.99); }
body[data-game] .test-target strong { font-family: 'Inter Tight', Inter, sans-serif; font-weight: 800; font-size: clamp(40px, 6vw, 64px); }
body[data-game] .test-target span { font-size: 17px; opacity: .95; }
body[data-game="reaction-time"] .test-target { background: #3546D6; }
body[data-game="reaction-time"] .test-target.wait { background: #C92A36; }
body[data-game="reaction-time"] .test-target.go { background: #0B7A5A; color: #FFFFFF; }
body[data-game] .meter { height: 10px; border-radius: 999px; background: var(--raised); }
body[data-game] .meter div { background: var(--game); border-radius: 999px; }

/* Board games pick up the game colour */
body[data-game="2048"] .board-2048 { background: #3B2F2A; border-radius: 18px; }
body[data-game="tic-tac-toe"] .tic-cell { background: var(--surface); border: 2px solid var(--line); font-weight: 800; }
body[data-game="tic-tac-toe"] .tic-cell.player-1 { color: var(--game-ink); }
body[data-game="tic-tac-toe"] .tic-cell.player-2 { color: #C92A36; }
:root[data-theme=dark] body[data-game="tic-tac-toe"] .tic-cell.player-1 { color: #B9A8FF; }
:root[data-theme=dark] body[data-game="tic-tac-toe"] .tic-cell.player-2 { color: #FF9AA2; }

/* Side cards and guides */
.controls-guide, .aside-card { border-radius: 18px; box-shadow: var(--shadow-sm); }
body[data-game] .controls-guide { border-top: 4px solid var(--game); }
.game-article h2 { position: relative; padding-left: 14px; }
.game-article h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 4px; background: var(--game); }
.article-links { border-left: 5px solid var(--game); }

/* ---------- Responsive */
@media (max-width: 980px) {
  .masthead.hero { grid-template-columns: 1fr; padding: 28px; }
  .hero-picks { max-width: 640px; }
}
@media (max-width: 640px) {
  .masthead.hero { padding: 22px 18px; border-radius: 22px; gap: 22px; }
  .hero .masthead-ctas > a { flex: 1 1 auto; }
  .hero-picks { gap: 12px; }
  .hero-tile:nth-child(odd), .hero-tile:nth-child(even) { transform: none; }
  .hero-tile-label { padding: 8px 10px 10px; }
  .hero-tile-label strong { font-size: 15px; }
  .hero-tile-label span { display: none; }
  body[data-game] .game-heading { flex-wrap: wrap; gap: 10px; }
  body[data-game] .game-heading h1 { font-size: 26px; }
  body[data-game] .play-area { padding: 12px; border-radius: 18px; }
  body[data-game] .game-stage { padding: 8px; }
  body[data-game] .test-target { min-height: 260px; }
  body[data-game] #favorite { min-height: 38px; padding: 6px 14px; font-size: 14px; }
  body[data-game] .game-command-bar { padding: 10px; gap: 8px; }
  body[data-game] .game-command-bar .session-title { width: auto; flex: 1 1 100%; }
  body[data-game] .game-command-bar .fullscreen-action { min-height: 40px; margin-left: 0; }
  body[data-game] .game-setup .setup-summary { font-size: 0; }
  body[data-game] .game-setup .setup-summary > span { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-tile, .hero-tile:nth-child(odd), .hero-tile:nth-child(even) { transform: none; transition: none; }
  .daily-card, .mini-card, .game-card, .primary { transition: none; }
}

/* ---------- Round controls: one tidy row, clear enabled/disabled states */
.game-command-bar .game-actions { flex: 0 1 auto; flex-wrap: nowrap; gap: 8px; }
.game-command-bar .input-mode-switch { margin-left: auto; }
.game-actions button { min-width: 92px; white-space: nowrap; border: 1px solid transparent; }
.game-actions .round-start { min-width: 120px; }
.game-actions .round-pause:not(:disabled) { background: #FFD43B; color: #3D2E00; box-shadow: 0 3px 0 #C9A227; }
.game-actions .round-stop:not(:disabled) { background: #FFFFFF; color: #B02525; border-color: #F1A7A7; box-shadow: 0 3px 0 #F1A7A7; }
.game-actions .round-pause::before { content: "❚❚"; font-size: 10px; margin-right: 7px; letter-spacing: -1px; }
.game-actions .round-stop::before { content: "■"; font-size: 11px; margin-right: 7px; }
.game-actions .round-pause:disabled, .game-actions .round-stop:disabled {
  color: var(--muted); border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  box-shadow: none; opacity: .8; cursor: not-allowed;
}
.game-actions .round-pause:disabled { background: color-mix(in srgb, #FFD43B 14%, transparent); }
.game-actions .round-stop:disabled { background: color-mix(in srgb, #F1A7A7 14%, transparent); }
:root[data-theme=dark] .game-actions .round-stop:not(:disabled) { background: #2A1620; color: #FFB3BC; border-color: #7A2E3B; box-shadow: 0 3px 0 #7A2E3B; }
@media (max-width: 640px) {
  .game-command-bar .game-actions { width: 100%; }
  .game-actions button, .game-actions .round-start { flex: 1 1 0; min-width: 0; padding: 10px 6px; }
  .game-command-bar .input-mode-switch { margin-left: 0; }
}

/* ---------- Header level chip */
.level-chip {
  white-space: nowrap; flex: none;
  display: inline-flex; align-items: center; gap: 6px; margin-right: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 13px; color: var(--text);
  background: var(--raised); border: 1px solid var(--line);
}
.level-chip:hover { text-decoration: none; background: var(--hover); }
.level-chip-bar { width: 36px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.level-chip-bar span { display: block; height: 100%; background: linear-gradient(90deg, #FFC53D, #FF5A5F); }
@media (max-width: 480px) { .level-chip-bar { display: none; } .level-chip { padding: 4px 8px; margin-right: 2px; } }
@media (max-width: 360px) { .level-chip { display: none; } }

/* ---------- Result card */
.reward-card {
  margin: 14px 0 12px; padding: 18px 20px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--game, var(--accent));
  box-shadow: var(--shadow-md);
  animation: reward-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.reward-card[data-mood="great"] { background: linear-gradient(135deg, var(--game-soft, var(--raised)), var(--surface) 70%); }
.reward-card[data-mood="retry"] { border-style: dashed; }
.reward-main { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.reward-emoji { font-size: 44px; line-height: 1; animation: reward-bounce .9s ease .1s both; }
.reward-title { font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 4px; }
.reward-line { margin: 0; color: var(--text); font-size: 15px; }
.reward-goal { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.reward-stars { display: flex; gap: 4px; font-size: 34px; line-height: 1; }
.reward-stars span { color: var(--line); transform: scale(.4); opacity: 0; animation: star-pop .45s cubic-bezier(.2, 1.6, .4, 1) forwards; animation-delay: calc(var(--i) * .18s + .2s); }
.reward-stars span.on { color: #F5A400; text-shadow: 0 2px 0 #C47F00; }
.reward-xp { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reward-benchmark { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.reward-bench-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.reward-bench-head strong { color: var(--text); font-weight: 700; }
.reward-bench-head span { color: var(--muted); font-size: 12px; font-weight: 600; }
.reward-bench-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #94A3B8, #339AF0 45%, #12B886 78%, #F59F00); }
.reward-bench-fill { height: 100%; border-radius: 999px; opacity: 0; }
.reward-bench-pin { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.reward-bench-markers { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.reward-bench-markers > span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.reward-bench-markers > span:first-child { left: 0; transform: none; }
.reward-trials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.trial-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums; }
.trial-pill small { color: var(--muted); font-weight: 600; }
.trial-pill.fast { border-color: #12B886; }
.trial-pill.mid { border-color: #F59F00; }
.reward-trend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line); }
.reward-sparkline { color: var(--accent); flex-shrink: 0; }
.reward-trend-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.reward-trend-meta strong { color: var(--text); }
.reward-xp-gain { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.reward-xp-bar { flex: 1 1 160px; height: 10px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.reward-xp-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFC53D, #FF5A5F); transition: width 1s ease .3s; }
.reward-level { font-size: 13px; font-weight: 700; color: var(--accent); }
@keyframes reward-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes reward-bounce { 0% { transform: scale(.3) rotate(-15deg); } 60% { transform: scale(1.2) rotate(8deg); } 100% { transform: none; } }
@keyframes star-pop { to { transform: scale(1); opacity: 1; } }
@media (max-width: 640px) {
  .reward-main { grid-template-columns: auto 1fr; }
  .reward-stars { grid-column: 1 / -1; font-size: 30px; }
  .reward-emoji { font-size: 36px; }
}

/* ---------- Toasts + confetti */
.reward-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.reward-toast {
  display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 340px;
  padding: 12px 16px; border-radius: 16px; background: #11163A; color: #FFFFFF;
  box-shadow: 0 12px 30px rgba(10, 10, 40, .35); animation: toast-in .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.reward-toast small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #FFD66B; }
.reward-toast strong { font-size: 15px; }
.reward-toast.levelup { background: linear-gradient(135deg, #2F3CC9, #8A2FC4); }
.reward-toast.milestone { background: #FFFFFF; color: #11163A; border: 2px solid var(--game, #3546D6); min-width: 0; }
.reward-toast.leaving { opacity: 0; transform: translateY(8px); transition: .4s; }
.toast-icon { font-size: 28px; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }
@media (max-width: 640px) { .reward-toasts { left: 12px; right: 12px; bottom: 12px; } .reward-toast { max-width: none; } }

/* ---------- Trophy room */
.trophy-level { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 24px; margin: 8px 0 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.trophy-level-badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font: 800 32px 'Inter Tight', Inter, sans-serif; color: #FFFFFF; background: linear-gradient(135deg, #2F3CC9, #8A2FC4); box-shadow: 0 6px 0 #1F2C9E; }
.trophy-level-copy h2 { margin: 0 0 8px; font-size: 24px; }
.trophy-level-copy p { margin: 8px 0 0; color: var(--muted); }
.trophy-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.trophy-stats div { background: var(--raised); border-radius: 14px; padding: 10px 14px; }
.trophy-stats dt { font-size: 12px; color: var(--muted); }
.trophy-stats dd { margin: 0; font: 700 22px 'Inter Tight', Inter, sans-serif; }
.trophy-heading { margin: 0 0 14px; }
.trophy-grid { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.trophy { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.trophy.unlocked { border-color: #F5C24A; background: linear-gradient(135deg, color-mix(in srgb, #FFC53D 16%, var(--surface)), var(--surface)); }
.trophy.locked .trophy-icon { filter: grayscale(1); opacity: .6; }
.trophy-icon { font-size: 30px; line-height: 1; }
.trophy-copy { display: flex; flex-direction: column; gap: 2px; }
.trophy-copy span { font-size: 14px; color: var(--muted); }
.trophy-copy small { font-size: 12px; color: var(--muted); }
.trophy-cta { margin-bottom: 40px; }
@media (max-width: 640px) { .trophy-stats { grid-template-columns: repeat(2, 1fr); } .trophy-level { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .reward-card, .reward-emoji, .reward-stars span, .reward-toast { animation: none; opacity: 1; transform: none; }
  .reward-xp-bar span { transition: none; }
}

/* The result card already tells the story; the share bar just keeps its buttons. */
.reward-card:not([hidden]) + .share-bar .share-copy-wrap { display: none; }
.reward-card:not([hidden]) + .share-bar { justify-content: flex-end; padding: 10px 14px; }

/* ---------- Dropdowns (every <select> on the site)
   Closed control is styled everywhere. Browsers that support customizable selects
   (Chrome/Edge 135+) also get a styled option list; others keep their native list. */
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233546D6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme=dark] { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C9BFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

select,
.game-controls select,
.contact-fields select {
  -webkit-appearance: none; appearance: none;
  min-height: 44px; padding: 10px 42px 10px 14px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--surface) var(--chevron) no-repeat right 14px center / 16px;
  border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.game-controls select { min-height: 42px; font-size: 13px; padding: 8px 38px 8px 12px; background-position: right 12px center; }
.contact-fields select { margin-top: 8px; min-height: 48px; }
select:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background-color: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
select:disabled { opacity: .6; cursor: not-allowed; }
.game-controls label { font-weight: 600; letter-spacing: .01em; }

@supports (appearance: base-select) {
  select, .game-controls select, .contact-fields select, ::picker(select) { -webkit-appearance: base-select; appearance: base-select; }
  select, .game-controls select, .contact-fields select { background-image: none; padding-right: 14px; display: flex; align-items: center; gap: 10px; }
  select::picker-icon {
    content: ""; width: 16px; height: 16px; margin-left: auto; flex: none;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate .2s ease;
  }
  select:open { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
  select:open::picker-icon { rotate: 180deg; }
  ::picker(select) {
    margin-block: 6px; padding: 6px;
    min-width: anchor-size(width);
    max-height: min(360px, 60vh); overflow-y: auto;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 18px 44px rgba(17, 22, 58, .18), 0 2px 6px rgba(17, 22, 58, .08);
    opacity: 1; transition: opacity .15s, translate .15s, display .15s allow-discrete, overlay .15s allow-discrete;
  }
  ::picker(select):popover-open { @starting-style { opacity: 0; translate: 0 -4px; } }
  :root[data-theme=dark] ::picker(select) { box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
  select option {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 500;
    color: var(--text); background: transparent; cursor: pointer;
  }
  select option:hover, select option:focus-visible { background: var(--raised); outline: none; }
  select option:checked { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 700; }
  select option::checkmark { order: 1; margin-left: auto; content: "✓"; color: var(--accent); font-weight: 800; }
  select option:disabled { color: var(--muted); cursor: not-allowed; }
}
@media (prefers-reduced-motion: reduce) { ::picker(select), select::picker-icon { transition: none; } }
select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@supports (appearance: base-select) { select option { white-space: normal; } }
