:root {
  --ink: #14244e;
  --ink-soft: #536078;
  --paper: #fffaf3;
  --white: #ffffff;
  --pink: #ef3d79;
  --orange: #ff8a24;
  --yellow: #f5c41b;
  --blue: #1c83d7;
  --green: #29ad73;
  --purple: #7c3fc0;
  --line: rgba(20, 36, 78, .11);
  --shadow: 0 18px 55px rgba(44, 49, 85, .12);
  --soft-shadow: 0 10px 30px rgba(44, 49, 85, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(239, 61, 121, .07), transparent 24rem),
    radial-gradient(circle at 92% 22%, rgba(28, 131, 215, .08), transparent 25rem),
    var(--paper);
  font-family: Inter, ui-rounded, "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.game-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.game-confetti i { position: absolute; display: block; width: 11px; height: 11px; border-radius: 3px; opacity: .22; transform: rotate(24deg); }
.game-confetti i:nth-child(1) { background: var(--pink); left: 4%; top: 28%; }
.game-confetti i:nth-child(2) { background: var(--yellow); left: 17%; top: 76%; border-radius: 50%; }
.game-confetti i:nth-child(3) { background: var(--blue); right: 9%; top: 40%; }
.game-confetti i:nth-child(4) { background: var(--green); right: 22%; top: 82%; border-radius: 50%; }
.game-confetti i:nth-child(5) { background: var(--orange); left: 48%; top: 11%; }
.game-confetti i:nth-child(6) { background: var(--purple); right: 42%; top: 62%; border-radius: 50%; }

.games-header {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.games-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.games-brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 6px 18px rgba(20,36,78,.12); }
.games-brand span { display: grid; }
.games-brand strong { font-size: 1.05rem; letter-spacing: -.02em; }
.games-brand small { margin-top: 2px; color: var(--ink-soft); font-size: .74rem; }
.back-to-shop { color: var(--ink); font-weight: 800; text-decoration: none; padding: 10px 14px; border-radius: 999px; }
.back-to-shop:hover { background: #fff; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.games-hub { padding: 42px 0 76px; }
.games-hero {
  min-height: 405px;
  padding: clamp(34px, 5vw, 66px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 46px;
  overflow: hidden;
  border: 1px solid rgba(20,36,78,.08);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,247,229,.88)),
    var(--white);
  box-shadow: var(--shadow);
  position: relative;
}
.games-hero::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: 17%;
  bottom: -120px;
  border-radius: 50%;
  background: rgba(245,196,27,.18);
}
.games-eyebrow { margin: 0 0 10px; color: var(--pink); font-size: .78rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.games-eyebrow span { color: var(--yellow); }
.games-hero h1 { margin: 0; max-width: 680px; font-size: clamp(3.2rem, 7vw, 6.8rem); line-height: .88; letter-spacing: -.07em; }
.games-hero h1 em { color: var(--pink); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.games-hero-copy > p:not(.games-eyebrow) { max-width: 610px; margin: 24px 0 0; color: var(--ink-soft); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.68; }
.screen-note { max-width: 610px; margin-top: 25px; padding: 13px 16px; display: flex; gap: 12px; align-items: center; border-radius: 18px; background: rgba(41,173,115,.1); color: #275d4a; line-height: 1.4; }
.screen-note > span:first-child { font-size: 1.65rem; }
.screen-note strong { display: block; }

.games-hero-art { min-height: 290px; position: relative; }
.hero-sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  border: 9px solid #fff;
  border-radius: 38% 62% 47% 53% / 53% 42% 58% 47%;
  box-shadow: 0 22px 50px rgba(20,36,78,.17);
  font-size: 5rem;
}
.sticker-dino { left: 4%; top: 34%; background: #e4f6eb; transform: rotate(-9deg); }
.sticker-letter { right: 4%; top: 1%; color: #fff; background: var(--pink); font: 900 6rem/1 Georgia, serif; transform: rotate(8deg); }
.sticker-sun { right: 1%; bottom: -2%; width: 112px; height: 112px; background: #fff1ad; font-size: 3.8rem; transform: rotate(-5deg); }
.hero-brush { position: absolute; left: 42%; top: -5%; font-size: 6.5rem; transform: rotate(22deg); filter: drop-shadow(0 17px 13px rgba(20,36,78,.15)); }

.games-controls { margin: 25px 0 58px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.level-picker, .palette-progress {
  min-height: 88px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--soft-shadow);
}
.level-picker > span, .palette-progress span { display: block; color: var(--ink-soft); font-size: .78rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.level-buttons { display: flex; padding: 4px; border-radius: 14px; background: #f0f2f7; }
.level-button { border: 0; border-radius: 11px; background: transparent; padding: 10px 14px; cursor: pointer; font-size: .88rem; font-weight: 850; }
.level-button.is-active { color: #fff; background: var(--ink); box-shadow: 0 5px 12px rgba(20,36,78,.2); }
.palette-progress strong { display: block; margin-top: 3px; font-size: .92rem; }
.palette-dots { display: flex; gap: 8px; }
.palette-dots i { width: 27px; height: 27px; border-radius: 50%; border: 2px dashed #cfd4df; background: #fff; transition: transform .35s, background .35s, border-color .35s; }
.palette-dots i.is-earned { border: 0; background: var(--reward); box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 4px 10px color-mix(in srgb, var(--reward) 32%, transparent); transform: scale(1.07); }

.games-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.games-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.045em; }
.games-heading > p { max-width: 400px; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game-card {
  --tone: var(--pink);
  --tone-soft: #fff0f5;
  min-height: 300px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
  border-radius: 27px;
  background: linear-gradient(155deg, #fff 42%, var(--tone-soft));
  box-shadow: var(--soft-shadow);
  transition: transform .24s ease, box-shadow .24s ease;
}
.game-card:hover { transform: translateY(-5px); box-shadow: 0 17px 38px rgba(44,49,85,.14); }
.tone-pink { --tone: var(--pink); --tone-soft: #fff0f5; }
.tone-blue { --tone: var(--blue); --tone-soft: #eff8ff; }
.tone-yellow { --tone: #dca800; --tone-soft: #fff8d9; }
.tone-purple { --tone: var(--purple); --tone-soft: #f7efff; }
.tone-green { --tone: var(--green); --tone-soft: #ebfaf3; }
.tone-orange { --tone: var(--orange); --tone-soft: #fff2e6; }
.game-icon { width: 65px; height: 65px; display: grid; place-items: center; border-radius: 21px; background: var(--tone-soft); font-size: 2.35rem; transform: rotate(-4deg); }
.game-badge { margin-top: 20px; color: var(--tone); font-size: .7rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.game-card h3 { margin: 8px 0 7px; font-size: 1.27rem; letter-spacing: -.025em; }
.game-card p { margin: 0 0 20px; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.game-card button { width: 100%; margin-top: auto; padding: 12px 14px; display: flex; justify-content: space-between; border: 0; border-radius: 13px; color: #fff; background: var(--tone); cursor: pointer; font-weight: 900; }
.game-card button:hover:not(:disabled) { filter: brightness(.94); }
.game-card.is-coming { opacity: .72; }
.game-card.is-coming:hover { transform: none; }
.game-card button:disabled { color: var(--ink-soft); background: rgba(20,36,78,.08); cursor: default; }

.grownups-note { margin-top: 24px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; border-radius: 22px; color: #654557; background: #fff1f6; }
.grownups-note > span { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; color: #fff; background: var(--pink); font-size: 1.2rem; }
.grownups-note strong { display: block; }
.grownups-note p { margin: 3px 0 0; line-height: 1.5; }

/* Pantalla de juego */
.game-stage { min-height: calc(100vh - 94px); padding: 34px 0 70px; }
.stage-header { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stage-back, .sound-button { border: 0; cursor: pointer; }
.stage-back { padding: 11px 15px; border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: var(--soft-shadow); font-weight: 850; }
.stage-round { padding: 9px 13px; border-radius: 999px; color: #526078; background: #fff; font-size: .79rem; font-weight: 800; }
.stage-card {
  width: min(920px, 100%);
  min-height: 610px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.stage-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.stage-title-row h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1; letter-spacing: -.05em; }
.sound-button { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; background: #eef7ff; font-size: 1.45rem; }
.sound-button:hover { background: #dcefff; }
.stage-instruction { margin: 14px 0 30px; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.55; }
.game-area { min-height: 350px; display: grid; align-content: center; }
.game-feedback { min-height: 25px; margin: 18px 0 0; text-align: center; color: var(--ink-soft); font-weight: 800; }
.game-feedback.is-wrong { color: #c44258; animation: nudge .32s ease; }
.game-feedback.is-good { color: #188057; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.visual-card { width: min(300px, 82vw); margin: 0 auto 28px; display: grid; place-items: center; aspect-ratio: 1.3; overflow: hidden; border-radius: 28px; background: #fff8e3; box-shadow: inset 0 0 0 1px rgba(20,36,78,.07), var(--soft-shadow); }
.visual-card img { width: 100%; height: 100%; object-fit: cover; }
.visual-icon { font-size: clamp(5rem, 15vw, 8rem); filter: drop-shadow(0 10px 8px rgba(20,36,78,.12)); }
.visual-card.small { width: min(220px, 65vw); margin-bottom: 20px; }

.word-slots { min-height: 70px; display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.word-slot { min-width: 66px; min-height: 58px; padding: 12px; display: grid; place-items: center; border: 2px dashed #cbd2df; border-radius: 16px; color: var(--ink); background: #fafbfe; font-size: 1.2rem; font-weight: 950; }
.word-slot.is-filled { border-style: solid; border-color: #bfdff4; background: #eef8ff; }
.syllable-bank { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; }
.syllable-chip, .letter-choice, .word-choice { border: 2px solid transparent; cursor: pointer; font-weight: 950; transition: transform .15s, border-color .15s; }
.syllable-chip { min-width: 72px; padding: 15px 19px; border-radius: 16px; color: #fff; background: var(--blue); font-size: 1.16rem; box-shadow: 0 6px 0 #1266aa; }
.syllable-chip:nth-child(3n+2) { background: var(--pink); box-shadow-color: #bf2c5c; }
.syllable-chip:nth-child(3n) { color: var(--ink); background: var(--yellow); box-shadow-color: #c89b08; }
.syllable-chip:active { transform: translateY(4px); box-shadow: none; }
.syllable-chip:disabled { opacity: .28; box-shadow: none; cursor: default; }
.game-actions { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; }
.primary-game-button, .soft-game-button { min-height: 48px; padding: 13px 21px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 900; }
.primary-game-button { color: #fff; background: var(--ink); box-shadow: 0 6px 0 #081533; }
.primary-game-button:disabled { opacity: .38; cursor: default; box-shadow: none; }
.soft-game-button { color: var(--ink); background: #eef1f7; }

.memory-grid { width: min(620px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.memory-card { position: relative; min-height: 126px; padding: 0; border: 0; border-radius: 20px; background: transparent; perspective: 700px; cursor: pointer; }
.memory-card-inner { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .42s ease; }
.memory-card.is-open .memory-card-inner, .memory-card.is-matched .memory-card-inner { transform: rotateY(180deg); }
.memory-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: inherit; backface-visibility: hidden; box-shadow: var(--soft-shadow); }
.memory-back { color: #fff; background: linear-gradient(145deg, var(--pink), #e7306d); font-size: 2rem; }
.memory-back::after { content: "✦"; }
.memory-front { padding: 9px; border: 2px solid #f2d5df; background: #fff; transform: rotateY(180deg); font-size: 1.2rem; font-weight: 950; text-align: center; }
.memory-front img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.memory-front .visual-icon { font-size: 3.5rem; }
.memory-card.is-matched { opacity: .58; }

.initial-choices, .story-choices { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.letter-choice { width: 86px; height: 86px; border-radius: 23px; color: var(--ink); background: #fff4bd; box-shadow: 0 7px 0 #dfb724; font-size: 2.35rem; }
.letter-choice:nth-child(2) { color: #fff; background: var(--pink); box-shadow-color: #bf2c5c; }
.letter-choice:nth-child(3) { color: #fff; background: var(--blue); box-shadow-color: #1266aa; }
.letter-choice:active, .word-choice:active { transform: translateY(5px); box-shadow: none; }

.trace-board { width: min(560px, 100%); height: 340px; margin: 0 auto; position: relative; overflow: hidden; border: 3px dashed #d8dcea; border-radius: 28px; background: #fffdf8; touch-action: none; }
.trace-letter { position: absolute; inset: 0; display: grid; place-items: center; color: transparent; -webkit-text-stroke: 5px #dce1ec; font: 900 15rem/1 Arial Rounded MT Bold, Arial, sans-serif; user-select: none; }
.trace-canvas, .paint-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.trace-tools, .paint-tools { margin: 16px auto 0; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; }
.trace-tools span { color: var(--ink-soft); font-size: .88rem; font-weight: 800; }

.number-display { width: 110px; height: 110px; margin: 0 auto 25px; display: grid; place-items: center; border-radius: 31px; color: #fff; background: var(--purple); box-shadow: 0 9px 0 #5c2998; font-size: 4.3rem; font-weight: 950; }
.count-grid { width: min(550px, 100%); margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 13px; }
.count-dot { width: 62px; height: 62px; padding: 0; border: 3px dashed #cbd2df; border-radius: 50%; background: #fff; cursor: pointer; }
.count-dot.is-painted { border-style: solid; border-color: var(--paint, var(--orange)); background: var(--paint, var(--orange)); box-shadow: inset 0 0 0 5px rgba(255,255,255,.45), 0 7px 14px color-mix(in srgb, var(--paint, var(--orange)) 30%, transparent); transform: scale(1.05); }
.count-status { margin-top: 18px; text-align: center; color: var(--ink-soft); font-weight: 850; }

.paint-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; align-items: stretch; }
.paint-board { min-height: 370px; position: relative; overflow: hidden; border: 2px solid #e3e6ed; border-radius: 28px; background: #fffefb; touch-action: none; }
.paint-underlay { position: absolute; inset: 15px; display: grid; place-items: center; overflow: hidden; border-radius: 20px; opacity: .65; filter: grayscale(1) contrast(.7); }
.paint-underlay img { width: 100%; height: 100%; object-fit: contain; }
.paint-underlay .visual-icon { font-size: 10rem; }
.paint-canvas { z-index: 2; mix-blend-mode: multiply; }
.paint-side { padding: 18px; border-radius: 24px; background: #f7f8fb; }
.paint-side strong { display: block; margin-bottom: 12px; }
.paint-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.paint-color { width: 43px; height: 43px; border: 4px solid #fff; border-radius: 50%; background: var(--paint); box-shadow: 0 0 0 1px #d5dae5; cursor: pointer; }
.paint-color.is-selected { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.06); }
.brush-range { margin-top: 18px; display: grid; gap: 7px; color: var(--ink-soft); font-size: .82rem; font-weight: 850; }
.brush-range input { width: 100%; accent-color: var(--pink); }
.paint-handoff { margin: 15px 0 0; padding: 12px; border-radius: 14px; color: #37624f; background: #eaf8f0; font-size: .83rem; line-height: 1.45; }

.story-card { width: min(680px, 100%); margin: 0 auto; padding: 28px; border-radius: 28px; background: #fff7d8; box-shadow: inset 0 0 0 2px rgba(245,196,27,.28); text-align: center; }
.story-card .visual-card { margin-bottom: 20px; }
.story-sentence { margin: 0; color: var(--ink); font: 800 clamp(1.35rem, 4vw, 2.1rem)/1.45 Georgia, serif; }
.story-blank { display: inline-block; min-width: 120px; padding: 0 6px 3px; border-bottom: 3px solid var(--pink); color: var(--pink); }
.story-choices { margin-top: 23px; }
.word-choice { min-width: 126px; padding: 15px 18px; border-radius: 16px; color: #fff; background: var(--blue); box-shadow: 0 6px 0 #1266aa; }
.word-choice:nth-child(2) { background: var(--green); box-shadow-color: #1c8055; }
.word-choice:nth-child(3) { background: var(--pink); box-shadow-color: #bf2c5c; }

.reward-dialog { width: min(510px, calc(100% - 32px)); padding: 38px; border: 0; border-radius: 31px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(20,36,78,.25); text-align: center; }
.reward-dialog::backdrop { background: rgba(20,36,78,.48); backdrop-filter: blur(4px); }
.reward-dialog h2 { margin: 6px 0 10px; font-size: 2rem; letter-spacing: -.04em; }
.reward-dialog > p:not(.games-eyebrow) { color: var(--ink-soft); line-height: 1.55; }
.reward-color { width: 90px; height: 90px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: #fff3b8; font-size: 3rem; box-shadow: 0 10px 30px rgba(20,36,78,.12); }
.reward-sparkles { color: var(--pink); font-size: 1.45rem; letter-spacing: 12px; }
.reward-sparkles span { color: var(--yellow); }
.reward-actions { margin-top: 22px; display: grid; gap: 10px; }

.games-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto 30px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.games-footer img { border-radius: 50%; }
.games-footer p { margin: 0; }
.games-footer a { margin-left: auto; color: var(--ink); font-weight: 850; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 4px solid rgba(28,131,215,.28); outline-offset: 3px; }

@media (max-width: 980px) {
  .games-hero { grid-template-columns: 1fr .65fr; }
  .hero-sticker { width: 118px; height: 118px; font-size: 4rem; }
  .sticker-letter { font-size: 4.8rem; }
  .sticker-sun { width: 90px; height: 90px; font-size: 3rem; }
  .games-controls { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .games-header, main, .games-footer { width: min(100% - 24px, 1180px); }
  .games-header { margin-top: 12px; }
  .games-brand img { width: 46px; height: 46px; }
  .games-brand small { display: none; }
  .back-to-shop { padding-right: 4px; font-size: .9rem; }
  .games-hub { padding-top: 24px; }
  .games-hero { min-height: 0; grid-template-columns: 1fr; gap: 24px; padding: 30px 24px 26px; border-radius: 29px; }
  .games-hero h1 { font-size: clamp(3.4rem, 18vw, 5.4rem); }
  .games-hero-art { min-height: 190px; }
  .hero-sticker { width: 105px; height: 105px; border-width: 6px; border-radius: 30px; font-size: 3.7rem; }
  .sticker-dino { left: 5%; top: 35%; }
  .sticker-letter { right: 10%; top: 0; font-size: 4rem; }
  .sticker-sun { right: 1%; bottom: -2%; width: 78px; height: 78px; font-size: 2.4rem; }
  .hero-brush { left: 42%; top: 16%; font-size: 4.5rem; }
  .games-controls { margin-bottom: 44px; }
  .level-picker, .palette-progress { align-items: flex-start; flex-direction: column; }
  .level-buttons { width: 100%; }
  .level-button { flex: 1; }
  .palette-progress { flex-direction: row; align-items: center; }
  .games-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .games-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 250px; }
  .grownups-note { align-items: flex-start; }
  .game-stage { padding-top: 22px; }
  .stage-card { min-height: 590px; padding: 26px 18px; border-radius: 28px; }
  .stage-round { display: none; }
  .stage-title-row h1 { font-size: 2.4rem; }
  .sound-button { flex-basis: 47px; width: 47px; height: 47px; }
  .memory-grid { grid-template-columns: repeat(2, 1fr); }
  .memory-card { min-height: 112px; }
  .paint-layout { grid-template-columns: 1fr; }
  .paint-board { min-height: 340px; }
  .paint-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .paint-side > strong { grid-column: 1/-1; margin: 0; }
  .paint-handoff { grid-column: 1/-1; }
  .paint-colors { display: flex; flex-wrap: wrap; }
  .paint-color { width: 39px; height: 39px; }
  .games-footer { align-items: flex-start; flex-wrap: wrap; }
  .games-footer a { width: 100%; margin-left: 58px; }
}

@media (max-width: 430px) {
  .games-brand strong { font-size: .92rem; }
  .games-hero { padding-inline: 20px; }
  .screen-note { align-items: flex-start; }
  .palette-progress { flex-direction: column; }
  .palette-dots i { width: 25px; height: 25px; }
  .stage-title-row h1 { font-size: 2.05rem; }
  .stage-instruction { margin-bottom: 22px; }
  .visual-card { margin-bottom: 20px; }
  .letter-choice { width: 75px; height: 75px; font-size: 2rem; }
  .trace-board { height: 300px; }
  .trace-letter { font-size: 12rem; }
  .number-display { width: 92px; height: 92px; font-size: 3.6rem; }
  .count-dot { width: 54px; height: 54px; }
  .story-card { padding: 22px 15px; }
  .reward-dialog { padding: 30px 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; }
}
