/* ── MATCH GAME ── */
#gameScreen{display:none;flex-direction:column;align-items:center;gap:24px;padding:64px 18px 80px;max-width:480px;width:100%;position:relative;z-index:1;height:100vh;height:100dvh;overflow:hidden;justify-content:center;}
body.match-bg{background:url('../Images/Backgrounds/GameSelectBGRec.webp') center/cover no-repeat fixed!important;}
.gtitle{font-size:1.4rem;font-weight:800;color:var(--text);text-align:center;text-shadow:0 2px 0 rgba(255,255,255,.8);}
.plabel{font-size:1rem;color:var(--text);font-weight:600;opacity:.65;}
.pdisp{display:flex;align-items:center;justify-content:center;animation:gentleFloat 3s ease-in-out infinite;filter:drop-shadow(0 4px 8px rgba(0,0,0,.1));}
/* flex:1 + grid-auto-rows:1fr makes the grid claim ALL leftover vertical
   space in #gameScreen and split it evenly between however many rows exist
   — beginner's single row gets the full area, advanced's two rows share it.
   A fixed vh-based card height (the previous approach) could only be tuned
   for whichever mode was more cramped (advanced, 2 rows), which left
   beginner's single row of cards sitting in a mostly-empty screen — the
   §1.6 dead-space finding. max-height keeps a single beginner row from
   growing absurdly tall. */
.choices{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-rows:1fr;gap:16px;width:100%;flex:1;max-height:440px;}
.cbtn-img{width:auto;height:auto;max-width:70%;max-height:120px;object-fit:contain;display:block;margin:0 auto;}
.cbtn{background:rgba(255,255,255,.75);border:3px solid rgba(255,255,255,.65);border-radius:20px;padding:20px 14px;display:flex;flex-direction:column;align-items:center;gap:7px;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.08);backdrop-filter:blur(6px);transition:transform .15s,background .2s,border-color .2s,filter .2s;-webkit-tap-highlight-color:transparent;height:100%;justify-content:center;font-family:'Baloo 2',cursive;}
.cbtn.correct{border-color:#66bb6a;background:rgba(102,187,106,.18);transform:scale(1.06);filter:drop-shadow(0 0 16px rgba(102,187,106,.55));}
/* NOTE: the old punitive red `.cbtn.wrong` rule was removed. Nothing applies it
   any more (wrong answers use .wrong-gentle), and leaving it in place invited
   someone to reintroduce a red failure state — which DEVELOPMENT_RULES §2.2
   forbids. Do not add it back. */

/* ── PROMPT + REPLAY SPEAKER ── */
.match-prompt-row{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:nowrap;}
.match-prompt-text{
  font-size:clamp(1.5rem,6vw,2.4rem);font-weight:900;color:var(--text);
  /* Was a hard, near-opaque 3px offset (0 3px 0) — on big bold letters that
     reads as a second copy of the text sitting just below it rather than a
     bevel. A soft blurred shadow gives depth without the ghosting. */
  text-shadow:0 2px 5px rgba(0,0,0,.16);padding:8px 4px 8px 16px;cursor:pointer;
  transition:transform .12s;user-select:none;-webkit-tap-highlight-color:transparent;
  text-align:center;line-height:1.2;
}
.match-prompt-text:active{transform:scale(.93);}
.match-prompt-lead{opacity:.5;font-size:.7em;font-weight:700;display:block;margin-bottom:2px;}
/* Deliberately UNDERSTATED. The first version was a 67px pulsing green button,
   which competed with the actual task — a toddler tapped the speaker instead of
   choosing an answer. It is a helper, not a choice, so it must read as
   secondary: small, quiet, no pulse. The answer cards are the only things on
   this screen that should invite a tap.
   60px per DEVELOPMENT_RULES.md's toddler tap-target floor (was 44px, the
   generic WCAG minimum, not this project's own stricter rule) — kept
   visually recessive via muted color/opacity instead of a smaller hitbox. */
.match-speaker{
  flex:0 0 auto;width:60px;height:60px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.55);border:none;
  color:rgba(60,80,60,.55);cursor:pointer;-webkit-tap-highlight-color:transparent;
  box-shadow:none;transition:opacity .15s,transform .12s;opacity:.75;
}
.match-speaker svg{width:28px;height:28px;}
.match-speaker:active{transform:scale(.9);opacity:1;}
/* No hinting animation — it drew the eye away from the answers. */
.match-speaker.hinting{animation:none;}
/* Gentle wrong: desaturate+shrink instead of alarming red border */
.cbtn.wrong-gentle{filter:grayscale(80%) brightness(0.7);transform:scale(0.88);transition:filter 0.3s ease,transform 0.3s ease;pointer-events:none;cursor:not-allowed;}
/* Hint pulse on the correct button after a wrong tap */
.cbtn.correct-hint{animation:correctHintPulse 0.65s ease-in-out 2;}
@keyframes correctHintPulse{0%,100%{transform:scale(1);}50%{transform:scale(1.07);}}
/* Neutral backdrop for color-round so colored swatches aren't on green grass */
.color-round #cgrid{background:rgba(255,255,255,0.18);border-radius:20px;padding:10px;}

.cbtn.matchShake{animation:matchShake .4s ease;}
.cbtn.matchBounce{animation:matchCorrectBounce .55s cubic-bezier(.34,1.56,.64,1)!important;}
.clabel{font-size:.9rem;font-weight:700;color:white;text-shadow:0 1px 4px rgba(0,0,0,.25);text-transform:capitalize;text-align:center;}
/* round counter pill */
.match-round-pill{font-size:.72rem;font-weight:800;letter-spacing:.6px;color:rgba(255,255,255,.7);background:rgba(0,0,0,.12);border-radius:50px;padding:3px 12px;text-transform:uppercase;}

/* ── ROUND PROGRESS DOTS ──
   Replaces the "Round 7 ⭐⭐" text label. Pre-literate users can't read a
   numeral; five filling dots show the same thing visually. */
.match-round-dots{display:flex;gap:7px;align-items:center;justify-content:center;background:rgba(0,0,0,.12);border-radius:50px;padding:6px 12px;pointer-events:none;}
.match-round-dot{
  width:10px;height:10px;border-radius:50%;
  background:rgba(255,255,255,.28);border:1.5px solid rgba(255,255,255,.45);
  transition:background .35s,box-shadow .35s,transform .35s;
}
.match-round-dot.lit{
  background:#ffe28a;border-color:#ffe28a;transform:scale(1.12);
  box-shadow:0 0 8px rgba(255,226,138,.85);
}

/* ── HUB BADGE ── */
.hub-game-badge{display:inline-block;margin-top:5px;background:rgba(255,255,255,.55);border-radius:50px;padding:2px 10px;font-size:.68rem;font-weight:800;color:var(--text);border:1.5px solid rgba(0,0,0,.08);}

/* ── MATCH IN-GAME SETTINGS ── */
#matchSettingsBg{display:none;position:fixed;inset:0;z-index:199;background:rgba(0,0,0,.38);}
#matchSettingsSheet{display:none;position:fixed;bottom:0;left:0;right:0;z-index:200;background:white;border-radius:24px 24px 0 0;padding:14px 18px 36px;box-shadow:0 -4px 28px rgba(0,0,0,.15);max-height:78dvh;overflow-y:auto;}
.ms-handle{width:40px;height:4px;background:#e0e0e0;border-radius:4px;margin:0 auto 12px;}
.ms-title{font-size:.95rem;font-weight:800;color:var(--text);text-align:center;margin-bottom:4px;}
.ms-lbl{font-size:.62rem;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;color:#b0a090;margin:8px 0 5px;}
.ms-cats{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;}
.ms-cat{background:#f5f5f5;border:2.5px solid #e0e0e0;border-radius:14px;padding:8px 4px 6px;font-size:.7rem;font-weight:800;color:var(--text);cursor:pointer;-webkit-tap-highlight-color:transparent;font-family:'Baloo 2',cursive;transition:background .15s,border-color .15s;display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;}
.ms-cat .ms-cat-icon{font-size:1.4rem;line-height:1;}
.ms-cat.on{background:#e8f5e9;border-color:#66bb6a;color:#2e7d32;}
.ms-diff-row{display:flex;gap:9px;}
.ms-diff{flex:1;background:#f5f5f5;border:2.5px solid #e0e0e0;border-radius:14px;padding:8px;font-size:.88rem;font-weight:800;color:var(--text);cursor:pointer;font-family:'Baloo 2',cursive;-webkit-tap-highlight-color:transparent;transition:background .15s;}
.ms-diff.on{background:#e8f5e9;border-color:#66bb6a;color:#2e7d32;}
.ms-cat{position:relative;overflow:hidden;}
.ms-cat-fill{position:absolute;inset:0;background:rgba(102,187,106,.25);width:0%;transition:none;pointer-events:none;border-radius:12px;}
#matchCogBtn{position:absolute;top:12px;right:14px;z-index:50;background:rgba(255,255,255,.8);border:2px solid rgba(0,0,0,.07);border-radius:50%;width:38px;height:38px;font-size:1.1rem;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:0 2px 8px rgba(0,0,0,.1);display:none;align-items:center;justify-content:center;}

/* ── DINO TAP GAME ── */
.dt-cloud{position:absolute;background:rgba(255,255,255,.75);border-radius:50px;pointer-events:none;}
.dt-dino{position:absolute;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;display:flex;flex-direction:column;align-items:center;}
.dt-name{font-size:.82rem;font-weight:800;color:white;text-shadow:0 1px 4px rgba(0,0,0,.4);text-align:center;margin-top:2px;}
