:root {
  --ink: #2b2a4a;
  --ink-soft: #453f66;
  --cream: #fff8e7;
  --paper: #ffffff;
  --marker: #ffe14a;
  --marker-deep: #f0c400;
  --coral: #ff5d73;
  --sky: #4dabf7;
  --mint: #3dce8b;
  --grape: #9775fa;
  --orange: #ff8a1e;
  --shadow: 0 6px 0 var(--ink);
  --radius: 28px;
  --font-display: "Fredoka", "Segoe UI Rounded", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", "Trebuchet MS", sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  overflow-x: clip;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.35;
  overflow-x: clip;
  cursor: default;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 0%, rgb(255 225 74 / 70%) 0 88px, transparent 90px),
    radial-gradient(circle at 100% 4%, rgb(77 171 247 / 45%) 0 120px, transparent 122px),
    radial-gradient(circle at 100% 88%, rgb(255 93 115 / 28%) 0 110px, transparent 112px),
    radial-gradient(circle at 0% 92%, rgb(61 206 139 / 32%) 0 120px, transparent 122px);
}

button,
a,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: var(--marker);
  color: var(--ink);
}

:focus-visible {
  outline: 4px solid var(--marker-deep);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 50;
  background: var(--marker);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgb(255 248 231 / 88%);
  backdrop-filter: blur(12px);
}

.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
}

.brand {
  margin-right: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.8rem);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-emoji,
.pill-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.sound-btn {
  gap: 6px;
}

.star-pill,
.sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding-inline: 12px;
  white-space: nowrap;
}

.star-pill {
  margin: 0;
  box-shadow: 0 3px 0 var(--ink);
}

.star-pill strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.sound-btn {
  min-width: 64px;
  font-family: var(--font-display);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}

.sound-btn[aria-pressed="false"] {
  background: #ece7dc;
}

.hero-playful {
  position: relative;
  padding-block: 4px 20px;
}

.hero-bubble {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 16px 22px;
  border-radius: 32px;
  border: 4px solid var(--ink);
  background: linear-gradient(165deg, #fff 0%, #fff9e0 55%, #e8f4ff 100%);
  box-shadow: var(--shadow);
}

.hero-stickers {
  margin: 0 0 8px;
  font-size: clamp(2rem, 10vw, 2.75rem);
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-emoji {
  position: absolute;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  opacity: 0.9;
  filter: drop-shadow(2px 3px 0 rgb(43 42 74 / 12%));
  animation: floaty 4s ease-in-out infinite;
}

.fe-1 { top: 2%; left: 4%; animation-delay: 0s; }
.fe-2 { top: 8%; right: 6%; animation-delay: 0.6s; }
.fe-3 { bottom: 12%; left: 8%; animation-delay: 1.2s; }
.fe-4 { bottom: 4%; right: 4%; animation-delay: 0.3s; }

.tagline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--marker);
  border: 3px solid var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  color: var(--ink);
}

.tagline-emoji {
  font-size: 1.35em;
  line-height: 1;
}

.section-playful {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-align: center;
}

.title-emoji {
  font-size: 1.35em;
  line-height: 1;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--marker);
  border: 3px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

h1,
h2,
h3,
.game-title,
.en-word,
.prompt {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
}

.section-title {
  margin: 16px 0 14px;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
}

.game-grid-hint {
  display: none;
  margin: -4px 0 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 188px;
  padding: 14px 10px 12px;
  border-radius: 28px;
  border: 4px solid var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgb(255 255 255 / 95%) 0 42%, transparent 43%),
    linear-gradient(180deg, color-mix(in srgb, var(--card) 72%, white), #fff 58%);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.15s ease;
}

.game-card[data-game="colorir"] { --card: #ff8fab; }
.game-card[data-game="tesouro"] { --card: #ffe14a; }
.game-card[data-game="pescaria"] { --card: #74c0fc; }
.game-card[data-game="alvo"] { --card: #ff922b; }
.game-card[data-game="quebra"] { --card: #8ce99a; }
.game-card[data-game="memoria"] { --card: #b197fc; }

.game-figure-memoria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  place-items: center;
  padding: 10px 8px 8px;
}

.game-figure-memoria .mem-thumb {
  font-size: clamp(1.45rem, 7.5vw, 1.9rem);
  line-height: 1;
  filter: drop-shadow(1px 2px 0 rgb(43 42 74 / 12%));
}
.game-card[data-game="tetris"] { --card: #74c0fc; }
.game-card[data-game="matematica"] { --card: #66d9e8; }
.game-card[data-game="ingles"] { --card: #ffd43b; }
.game-card[data-game="ligar"] { --card: #63e6be; }

.game-figure {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 120px);
  min-height: 96px;
  padding: 8px 4px 4px;
  border-radius: 22px;
  background: rgb(255 255 255 / 88%);
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgb(43 42 74 / 12%);
}

.game-emoji-main {
  font-size: clamp(2.6rem, 14vw, 3.4rem);
  line-height: 1;
  display: block;
  filter: drop-shadow(2px 3px 0 rgb(43 42 74 / 10%));
}

.game-emoji-extra {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: clamp(1.35rem, 7vw, 1.75rem);
  line-height: 1;
  transform: rotate(-8deg);
}

.game-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.game-title {
  display: block;
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  font-weight: 700;
}

.game-blurb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  font-family: var(--font-display);
}

.blurb-emoji {
  font-size: 1.1em;
  letter-spacing: -0.08em;
}

@container (max-width: 140px) {
  .game-title {
    font-size: 1.05rem;
  }

  .game-emoji-main {
    font-size: 2.35rem;
  }
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 14px 16px;
  border-radius: 22px;
  border: 3px solid var(--ink);
  background: rgb(255 255 255 / 76%);
}

.steps-playful li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #fff8e7 100%);
  box-shadow: 0 4px 0 var(--ink);
}

.step-emoji {
  font-size: 2.2rem;
  line-height: 1;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--marker);
  border: 3px solid var(--ink);
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.steps-playful h3 {
  font-size: 1.35rem;
}

.steps-playful p {
  font-size: 1rem;
  color: var(--ink-soft);
}

.steps p,
.site-footer p {
  margin: 0;
}

.site-footer {
  padding: 8px 0 calc(28px + env(safe-area-inset-bottom));
}

.site-footer p {
  color: var(--ink-soft);
  font-size: 1rem;
}

body[data-screen="game"] .site-footer {
  display: none;
}

.game-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.game-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.game-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
}

.learn-goal,
.hint,
.catch-line,
.step-line,
.caption {
  margin: 0;
  color: var(--ink-soft);
}

.learn-goal {
  font-size: 1rem;
}

.btn {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  min-height: 64px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--marker);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-back {
  min-width: 64px;
  min-height: 64px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-back-arrow {
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
  font-weight: 800;
}

.btn-again {
  background: #51cf66;
  color: var(--ink);
}

.celebrate-actions .btn-again {
  background: #51cf66;
  color: var(--ink);
}

.btn:active,
.game-card:active,
.spot:active,
.answer:active,
.choice:active,
.match-item:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.feedback {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.feedback[data-type="ok"] { color: #0d7a45; }
.feedback[data-type="no"] { color: #b42318; }

.feedback.pop { animation: pop 0.28s ease; }

.game-view.is-won > :not(.celebrate) {
  pointer-events: none;
}

.celebrate {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.celebrate h3 {
  margin: 0;
  font-size: 2rem;
}

.celebrate p {
  margin: 6px 0 12px;
}

.celebrate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.celebrate-actions .btn {
  flex: 1 1 140px;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: 0;
  left: calc(var(--i) * 7%);
  width: 10px;
  height: 14px;
  border-radius: 3px;
  background: var(--c);
  animation: fall 0.9s ease-in forwards;
  animation-delay: calc(var(--i) * 25ms);
}

.butterfly-stage,
.color-stage,
.island-map,
.pond,
.park,
.math-board,
.english-board {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
}

.butterfly-stage,
.color-stage {
  background: linear-gradient(#e7f5ff, #fff 70%);
  padding: 8px;
}

.coloring {
  width: min(100%, 420px);
  height: auto;
  display: block;
  margin-inline: auto;
}

.coloring [data-region] {
  stroke: var(--ink);
  stroke-width: 3;
  cursor: pointer;
}

.current-paint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
}

[data-current-color] {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: #fff;
}

.palette,
.answer-row,
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.palette {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.colorir-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: min(100%, 420px);
  margin-inline: auto;
  text-align: center;
}

.colorir-layout .phase-line,
.colorir-layout .hint,
.colorir-layout .catch-line,
.colorir-layout .current-paint,
.colorir-layout .mix-line {
  width: 100%;
  margin-inline: auto;
}

.colorir-layout .color-stage {
  width: 100%;
  padding: 6px;
  overflow: hidden;
}

.color-stage .color-scene {
  border-radius: 12px;
}

.coloring [data-region] {
  transition: filter 0.2s ease, transform 0.15s ease;
}

.coloring [data-region].is-painted {
  filter: drop-shadow(0 2px 6px rgb(43 42 74 / 0.2));
}

.coloring [data-region]:active {
  transform: scale(0.98);
}

.color-decor {
  animation: color-float 4s ease-in-out infinite;
}

@keyframes color-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.scene-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 2px 0 4px;
}

.scene-pick {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.colorir-layout .scene-picker {
  max-width: 100%;
  justify-content: center;
  row-gap: 6px;
}

.scene-pick[aria-pressed="true"] {
  outline: 4px solid var(--ink);
  outline-offset: 2px;
  background: var(--marker);
}

.colorir-layout .palette-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(3px, 1vw, 6px);
  width: 100%;
  max-width: 100%;
  padding: 4px 0 6px;
  grid-template-columns: unset;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.eraser-chip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(40px, 11vw, 48px);
  height: clamp(40px, 11vw, 48px);
  padding: 4px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}

.eraser-chip .eraser-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.pot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.pot-actions .pot-btn-compact {
  flex: 1 1 auto;
  max-width: 220px;
}

.eraser-pot {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 6px;
  border-radius: 14px;
}

.colorir-layout .palette-row .swatch-chip {
  flex: 0 0 auto;
  width: clamp(28px, 7.8vw, 34px);
  min-width: clamp(28px, 7.8vw, 34px);
  height: clamp(28px, 7.8vw, 34px);
  min-height: clamp(28px, 7.8vw, 34px);
  padding: 0;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background-color: var(--swatch, #fff);
  box-shadow: 0 2px 0 var(--ink);
  cursor: pointer;
  font-size: 0;
  line-height: 0;
}

.palette-row .swatch-chip[data-ink="branco"] {
  background-color: #fff;
  box-shadow: inset 0 0 0 3px #d9d3c5, 0 4px 0 var(--ink);
}

.palette-row .swatch-chip[aria-pressed="true"] {
  outline: 4px solid var(--ink);
  outline-offset: 2px;
}

.swatch,
.answer,
.choice,
.spot,
.match-item,
.piece,
.mem-card,
.shot,
.fish {
  border: 3px solid var(--ink);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}

.swatch {
  min-height: 72px;
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 8px 4px;
}

.swatch[data-ink="branco"] {
  box-shadow: inset 0 0 0 3px #d9d3c5, 0 4px 0 var(--ink);
}

.swatch[aria-pressed="true"] {
  outline: 4px solid var(--ink);
  outline-offset: 2px;
}

.pot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.pot-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
}

.pot-compact {
  width: 100%;
  max-width: 220px;
  gap: 6px;
}

.pot-slot,
.mix-line {
  min-height: 64px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
  border-radius: 16px;
  border: 3px solid var(--ink);
  background: #fff;
  font-size: 1rem;
}

.pot-compact .pot-slot {
  min-height: 44px;
  padding: 4px 6px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  width: 100%;
  box-shadow: 0 3px 0 var(--ink);
}

.pot-slot[data-filled="0"] {
  background-color: #fff;
}

.pot-slot[data-filled="1"][data-pot-slot="0"],
.pot-slot[data-filled="1"][data-pot-slot="1"] {
  color: var(--ink);
}

.pot-compact .pot-sign {
  font-size: 1.1rem;
}

.pot-btn-compact {
  width: auto !important;
  min-height: 48px;
  padding: 8px 22px;
  font-size: 1rem;
  box-shadow: 0 3px 0 var(--ink);
}

.colorir-layout .mix-line {
  min-height: 48px;
  width: 100%;
  font-size: 0.95rem;
  padding: 6px 8px;
}

.mix-line {
  margin: 0;
  font-family: var(--font-display);
}

.swatch[data-ink="vermelho"],
.swatch[data-ink="azul"] {
  color: #fff;
}

.pot-sign {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.pot-btn {
  width: 100%;
}

.island-map {
  padding: 12px;
  background: linear-gradient(#9fd6ff, #b7eb8f);
}

.island {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spot {
  min-height: 112px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.spot svg,
.match-art svg,
.choice svg,
.count-row svg,
.fish svg,
.shot svg {
  width: 52px;
  height: 52px;
}

.spot.is-open {
  background: #fff8d6;
}

.pond {
  position: relative;
  height: 390px;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg, rgb(255 255 255 / 18%) 0 8px, transparent 8px 18px),
    linear-gradient(#8ed4ff, #1c7ed6 72%);
}

.fish {
  position: absolute;
  left: 0;
  width: 96px;
  height: 72px;
  border-radius: 999px;
  background: rgb(255 255 255 / 20%);
  padding: 4px;
}

.fish.is-caught {
  background: var(--marker);
  opacity: 0.85;
}

.target-wrap {
  position: relative;
  width: min(100%, 340px);
  margin-inline: auto;
}

.target {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: radial-gradient(
    circle at center,
    #ffe14a 0 16%,
    #fff 16% 19%,
    #ff6b6b 19% 36%,
    #fff 36% 39%,
    #4dabf7 39% 56%,
    #fff 56% 59%,
    #ffd43b 59% 100%
  );
}

.shot {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 8px;
}

.hint,
.catch-line,
.step-line,
.phase-line {
  text-align: center;
  font-family: var(--font-display);
  color: var(--ink);
}

.phase-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
}

.phase-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--marker);
  font-size: 1rem;
}

.phase-level {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: #fff;
  font-size: 1rem;
}

.mem-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.island.island-dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.island.island-dense .spot {
  min-height: 96px;
  font-size: 0.92rem;
}

.puzzle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(100%, 380px);
  margin-inline: auto;
}

.piece {
  aspect-ratio: 1;
  min-height: 120px;
  border-radius: 18px;
  padding: 0;
  background-repeat: no-repeat;
  background-size: 200% 200%;
}

.piece[data-piece="0"] { background-position: left top; }
.piece[data-piece="1"] { background-position: right top; }
.piece[data-piece="2"] { background-position: left bottom; }
.piece[data-piece="3"] { background-position: right bottom; }

.piece.is-selected {
  outline: 5px solid var(--marker);
  outline-offset: 2px;
}

.mem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mem-card {
  width: 100%;
  min-height: 112px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  perspective: 700px;
}

.mem-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mem-card.is-up .mem-inner {
  transform: rotateY(180deg);
}

.mem-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 3px solid var(--ink);
  backface-visibility: hidden;
  box-shadow: 0 4px 0 var(--ink);
}

.mem-back {
  background:
    radial-gradient(circle at 30% 30%, #fff6b0 0 18%, transparent 19%),
    linear-gradient(160deg, #ffe14a, #f0c400);
}

.mem-back::after {
  content: "★";
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1;
}

.mem-front {
  background: #fff;
  transform: rotateY(180deg);
}

.mem-front svg {
  width: 58%;
  height: 58%;
}

.mem-card.is-matched .mem-front {
  background: #e7f9ef;
}

.scenes {
  display: grid;
  gap: 14px;
}

.scene {
  margin: 0;
}

.scene-label {
  margin: 0 0 6px;
  font-family: var(--font-display);
  text-align: center;
}

.park {
  position: relative;
  height: 460px;
  overflow: hidden;
  background: linear-gradient(#b9e4ff 0 56%, #8ee08a 56%);
}

.thing {
  position: absolute;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.thing svg {
  width: 100%;
  height: 100%;
  display: block;
}

.park-play .thing {
  border: 3px dashed rgb(43 42 74 / 40%);
  border-radius: 18px;
  background: rgb(255 255 255 / 35%);
}

.park-play .thing.is-found {
  border-style: solid;
  border-color: #0d7a45;
  background: rgb(61 206 139 / 45%);
}

.park-stroll .park-path {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 48%;
  height: 18%;
  border-radius: 999px;
  background: #e9c46a;
  opacity: 0.85;
}

.park-stroll .park-tree {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50% 50% 8px 8px;
  background: #2f9e44;
  border: 3px solid var(--ink);
  box-shadow: inset 0 -12px 0 #1e7b34;
}

.park-stroll .park-tree-a {
  top: 8%;
  left: 4%;
}

.park-stroll .park-tree-b {
  top: 6%;
  right: 6%;
}

.park-stroll .park-bench-bg {
  position: absolute;
  left: 14%;
  top: 54%;
  width: 56px;
  height: 28px;
  border-radius: 6px;
  background: #8d5a32;
  border: 2px solid var(--ink);
  opacity: 0.35;
}

.mem-grid.mem-dense {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mem-grid.mem-dense .mem-card {
  min-height: 88px;
}

.mem-grid.mem-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.mem-grid.mem-wide .mem-card {
  min-height: 76px;
}

.math-board,
.english-board {
  padding: 14px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.prompt,
.en-word {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  text-align: center;
}

.count-row,
.sum-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.sum-sign {
  font-family: var(--font-display);
  font-size: 2rem;
}

.answer,
.choice {
  min-height: 84px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-size: 2rem;
}

.choice {
  font-size: 1rem;
  padding: 8px;
}

.choice.is-right,
.answer.is-right,
.match-item.is-locked {
  background: #c9f7df;
}

.listen-btn,
.pot-btn {
  width: min(100%, 420px);
  justify-self: center;
}

.caption {
  min-height: 3.2em;
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink);
}

.match-board {
  position: relative;
}

.match-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 22px;
}

.col {
  display: grid;
  gap: 10px;
}

.match-item {
  min-height: 92px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.match-item.is-selected {
  outline: 4px solid var(--marker-deep);
  outline-offset: 2px;
  background: #fff8d6;
}

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.wires line {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.is-shake {
  animation: shake 0.34s ease;
}

.coach[hidden] {
  display: none !important;
}

.coach:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgb(43 42 74 / 42%);
}

.coach-card {
  width: min(100%, 440px);
  margin-bottom: env(safe-area-inset-bottom);
  padding: 18px 16px 16px;
  border-radius: 28px;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.coach-card h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.coach-card p {
  margin: 0 0 14px;
}

.coach-card .btn {
  width: 100%;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-8px) rotate(6deg); }
}

@keyframes wobble {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(7deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes fall {
  to { transform: translateY(90px) rotate(80deg); opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .game-card:hover,
  .btn:hover,
  .spot:hover {
    translate: 0 -2px;
  }
}

/* Mobile: um jogo por linha — empilhados verticalmente */
@media (max-width: 699px) {
  .game-grid-hint {
    display: block;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: min(440px, 100%);
    margin-inline: auto;
  }

  .game-grid > li > .game-card {
    width: 100%;
    min-height: 200px;
    padding: 18px 14px 16px;
  }

  .game-figure {
    width: min(100%, 132px);
    min-height: 100px;
  }

  .game-emoji-main {
    font-size: clamp(2.4rem, 11vw, 3rem);
  }
}

@media (min-width: 700px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
  .scenes { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (min-width: 1024px) {
  .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .star-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .sound-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .sound-btn {
    min-width: 52px;
    padding-inline: 10px;
  }
}

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

html[data-e2e] *,
html[data-e2e] *::before,
html[data-e2e] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

html[data-e2e] .pond {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  height: auto;
  min-height: 180px;
  padding: 10px;
}

html[data-e2e] .fish {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

.animal-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.animal-photo-hero {
  margin: 0;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  background: linear-gradient(145deg, #e7f5ff, #fff);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.animal-photo-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.animal-prompt {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.animal-stage .listen-btn {
  align-self: center;
}

.animal-choices {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.animal-choices.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.animal-choices.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.animal-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 108px;
  padding: 10px 8px 12px;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.animal-choice-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #f1f3f5;
}

.animal-choice-name {
  line-height: 1.15;
  text-align: center;
}

.animal-choice.is-right {
  background: #d8f8e8;
}

.race-hud {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.race-track {
  position: relative;
  height: min(52vh, 320px);
  margin: 8px 0;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  background: linear-gradient(180deg, #8ecbff 0%, #8ecbff 42%, #7dde8a 42%, #69db7c 100%);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.race-road {
  background: linear-gradient(90deg, #495057 0%, #868e96 50%, #495057 100%);
  border-color: #343a40;
}

.race-road .race-lanes span {
  border-right-color: rgb(255 255 255 / 0.35);
}

.race-scroll {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 36px,
    rgb(255 255 255 / 0.22) 36px,
    rgb(255 255 255 / 0.22) 72px
  );
  animation: race-scroll 0.9s linear infinite;
}

@keyframes race-scroll {
  from {
    background-position-y: 0;
  }

  to {
    background-position-y: 72px;
  }
}

.space-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.race-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  pointer-events: none;
}

.race-lanes span {
  border-right: 2px dashed rgb(43 42 74 / 0.15);
}

.race-lanes span:last-child {
  border-right: none;
}

.race-entities {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.race-entity {
  position: absolute;
  left: calc(16.66% * var(--lane) + 8.33%);
  top: var(--y);
  width: 52px;
  margin-left: -26px;
  transform: translateY(-50%);
}

.race-entity svg {
  width: 52px;
  height: 52px;
}

.race-car {
  position: absolute;
  bottom: 6%;
  left: calc(16.66% * var(--lane) + 8.33%);
  width: 64px;
  margin-left: -32px;
  transition: left 0.18s ease;
  z-index: 2;
}

.race-car svg {
  width: 64px;
  height: 64px;
}

.race-car.is-hit {
  animation: shake 0.32s ease;
}

.race-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.race-steer {
  font-size: 1.6rem;
  min-height: 72px;
}

.space-field {
  background: linear-gradient(180deg, #1a1b3a 0%, #2d3561 55%, #1a1b3a 100%);
  border-color: #5c7cfa;
}

.space-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff 99%, transparent),
    radial-gradient(2px 2px at 70% 20%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 40% 60%, #fff 99%, transparent),
    radial-gradient(2px 2px at 85% 45%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 15% 75%, #fff 99%, transparent);
  opacity: 0.85;
  pointer-events: none;
}

.space-ship svg {
  filter: drop-shadow(0 4px 0 rgb(0 0 0 / 0.25));
}

.space-meteor svg {
  width: 48px;
  height: 48px;
}

.space-bullet {
  position: absolute;
  left: calc(16.66% * var(--lane) + 8.33%);
  top: var(--y);
  width: 10px;
  height: 22px;
  margin-left: -5px;
  transform: translateY(-50%);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe14a, #ff922b);
  border: 2px solid var(--ink);
  box-shadow: 0 0 8px #ffe14a;
  z-index: 3;
}

.space-controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.space-fire {
  font-size: 1.05rem;
  min-height: 72px;
}

.block-board {
  display: grid;
  gap: 10px;
  margin: 12px auto;
  max-width: 280px;
  padding: 14px;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  background: #fff9e6;
  box-shadow: var(--shadow);
}

.block-board--row2 {
  grid-template-columns: 1fr 1fr;
}

.block-board--tower3 {
  grid-template-columns: 1fr;
  max-width: 160px;
}

.block-board--grid4 {
  grid-template-columns: 1fr 1fr;
}

.block-slot {
  min-height: 72px;
  border-radius: 12px;
  border: 3px dashed var(--ink);
  background: var(--hint, #fff);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.block-slot.is-filled {
  border-style: solid;
  background: var(--block);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.35);
}

.block-slot.is-selected,
.block-piece.is-selected {
  outline: 4px solid #5c7cfa;
  outline-offset: 2px;
}

.block-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.block-piece {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: var(--block);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.block-piece.is-used {
  display: none;
}

/* Blocos — UX visual (3–5 anos, pouca leitura) */
.game-view[data-game-id="blocos"] .blocos-hint-caregiver {
  font-size: 0.78rem;
  opacity: 0.82;
  margin-top: 6px;
}

.game-view[data-game-id="blocos"] .blocos-tray-label {
  margin: 4px 0 0;
  font-size: 1.75rem;
  text-align: center;
  line-height: 1;
}

.game-view[data-game-id="blocos"] .blocos-play-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.game-view[data-game-id="blocos"] .blocos-play-hint__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.35rem;
}

.game-view[data-game-id="blocos"] .blocos-play-hint__emoji {
  font-size: 1.65rem;
  line-height: 1;
}

.game-view[data-game-id="blocos"] .blocos-play-hint__then {
  font-size: 1.5rem;
}

.game-view[data-game-id="blocos"] .blocos-modes {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 0 12px;
}

.game-view[data-game-id="blocos"] .blocos-mode-tab {
  flex: 1 1 7.5rem;
  max-width: 10.5rem;
  min-height: 76px;
  padding: 8px 6px 10px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.game-view[data-game-id="blocos"] .blocos-mode-tab__icon {
  font-size: 2rem;
  line-height: 1;
}

.game-view[data-game-id="blocos"] .blocos-mode-tab__mini {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
}

.game-view[data-game-id="blocos"] .blocos-demo-block {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #ff6b6b;
  border: 2px solid var(--ink);
}

.game-view[data-game-id="blocos"] .blocos-demo-arrow {
  font-size: 0.65rem;
  color: var(--ink);
}

.game-view[data-game-id="blocos"] .blocos-demo-slot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px dashed var(--ink);
  background: #ffe14a55;
}

.game-view[data-game-id="blocos"] .blocos-demo-stack {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.game-view[data-game-id="blocos"] .blocos-demo-stack i {
  display: block;
  width: 18px;
  height: 6px;
  border-radius: 3px;
  border: 2px solid var(--ink);
  background: #74c0fc;
}

.game-view[data-game-id="blocos"] .blocos-mode-tab--encaixar[aria-selected="true"] {
  background: linear-gradient(180deg, #fff3bf, #ffe14a);
}

.game-view[data-game-id="blocos"] .blocos-mode-tab--torres[aria-selected="true"] {
  background: linear-gradient(180deg, #d0ebff, #74c0fc);
}

.game-view[data-game-id="blocos"] .blocos-mode-intro {
  text-align: center;
  padding: 4px 4px 12px;
}

.game-view[data-game-id="blocos"] .blocos-mode-intro__hero {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 3.25rem);
  line-height: 1.1;
}

.game-view[data-game-id="blocos"] .blocos-mode-intro__pick {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1;
  animation: blocos-bounce 1.2s ease-in-out infinite;
}

@keyframes blocos-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

.game-view[data-game-id="blocos"] .blocos-mode-intro__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.game-view[data-game-id="blocos"] .blocos-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 168px;
  padding: 12px 8px 10px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.game-view[data-game-id="blocos"] .blocos-mode-card--encaixar {
  background: linear-gradient(165deg, #fff 0%, #fff9db 100%);
}

.game-view[data-game-id="blocos"] .blocos-mode-card--torres {
  background: linear-gradient(165deg, #fff 0%, #e7f5ff 100%);
}

.game-view[data-game-id="blocos"] .blocos-mode-card__badge {
  font-size: 2.25rem;
  line-height: 1;
}

.game-view[data-game-id="blocos"] .blocos-mode-card__figure {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__pieces {
  display: flex;
  align-items: center;
  gap: 5px;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__block {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 3px solid var(--ink);
  flex-shrink: 0;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__block--a {
  background: #4dabf7;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__block--b {
  background: #9b6bff;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__arrow {
  font-size: 1.25rem;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__targets {
  display: flex;
  align-items: center;
  gap: 5px;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__hole {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 3px dashed var(--ink);
  flex-shrink: 0;
  box-sizing: border-box;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__hole--a {
  background: #4dabf733;
}

.game-view[data-game-id="blocos"] .blocos-figure-fit__hole--b {
  background: #9b6bff33;
}

.game-view[data-game-id="blocos"] .blocos-figure-towers {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 52px;
}

.game-view[data-game-id="blocos"] .blocos-figure-towers__col {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.game-view[data-game-id="blocos"] .blocos-figure-towers__col i {
  display: block;
  width: 22px;
  height: 10px;
  border-radius: 4px;
  border: 2px solid var(--ink);
  background: #ff922b;
}

.game-view[data-game-id="blocos"] .blocos-figure-towers__col--tall i:nth-child(2) {
  background: #ff6b6b;
}

.game-view[data-game-id="blocos"] .blocos-mode-card__steps {
  display: flex;
  gap: 8px;
  font-size: 1rem;
  line-height: 1;
}

.game-view[data-game-id="blocos"] .block-piece {
  position: relative;
}

.game-view[data-game-id="blocos"] .block-piece__emoji {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 2px #fff);
}

.game-view[data-game-id="blocos"] .block-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.game-view[data-game-id="blocos"] .block-slot__want {
  font-size: 1.85rem;
  line-height: 1;
  z-index: 1;
}

.game-view[data-game-id="blocos"] .block-slot__swatch {
  position: absolute;
  inset: 18%;
  border-radius: 10px;
  background: var(--want, #ccc);
  opacity: 0.35;
  z-index: 0;
}

.game-view[data-game-id="blocos"] .block-slot.is-filled .block-slot__want,
.game-view[data-game-id="blocos"] .block-slot.is-filled .block-slot__swatch {
  display: none;
}

.game-view[data-game-id="blocos"] .block-tower-yard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  margin: 12px auto;
  max-width: 360px;
  min-height: min(42vh, 300px);
  padding: 12px 8px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%);
  box-shadow: var(--shadow);
}

.game-view[data-game-id="blocos"] .block-tower-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.game-view[data-game-id="blocos"] .block-tower-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  width: 100%;
  min-height: 180px;
  max-height: min(36vh, 260px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0;
}

.game-view[data-game-id="blocos"] .block-stack-piece {
  display: block;
  width: min(100%, 52px);
  height: 38px;
  border-radius: 8px;
  border: 3px solid var(--ink);
  background: var(--block);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.12);
  flex-shrink: 0;
}

.game-view[data-game-id="blocos"] .block-tower-base {
  width: min(100%, 58px);
  min-height: 36px;
  padding: 4px 0 2px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #495057;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.game-view[data-game-id="blocos"] .block-tower-base__ico {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.95;
}

.game-view[data-game-id="blocos"] .block-tower-base.is-highlight {
  outline: 3px solid #5c7cfa;
  outline-offset: 2px;
}

.game-view[data-game-id="blocos"] .block-tower-base:disabled {
  cursor: default;
  opacity: 0.85;
}

.game-view[data-game-id="blocos"] .block-tower-pop {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.game-view[data-game-id="blocos"] .block-tower-pop:disabled {
  opacity: 0.35;
  cursor: default;
}

.game-view[data-game-id="blocos"] .block-tray--free .block-piece--free {
  opacity: 1;
}

.game-view[data-game-id="blocos"] .blocos-tower-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.game-view[data-game-id="blocos"] .blocos-clear-btn {
  font-size: 1.75rem;
  min-height: 52px;
  min-width: 52px;
  padding: 8px 14px;
}

@media (max-width: 380px) {
  .game-view[data-game-id="blocos"] .blocos-mode-intro__actions {
    grid-template-columns: 1fr;
    max-width: 220px;
  }
  .game-view[data-game-id="blocos"] .block-stack-piece {
    height: 32px;
  }

  .game-view[data-game-id="blocos"] .block-tower-stack {
    min-height: 140px;
  }

  .game-view[data-game-id="blocos"] .blocos-mode-intro__actions {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-view[data-game-id="blocos"] .blocos-mode-intro__pick {
    animation: none !important;
  }
}

.game-view[data-game-id="tetris"] {
  width: 100%;
  max-width: min(100%, 560px);
  margin-inline: auto;
}

.tetris-hud {
  display: flex;
  justify-content: center;
  margin: 6px 0 4px;
}

.tetris-stat {
  margin: 0;
  font-size: 1.05rem;
}

.tetris-stage {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "next"
    "board";
  align-items: center;
  justify-items: center;
  gap: 10px;
  width: 100%;
  max-width: min(100%, 540px);
  margin: 0 auto;
}

.tetris-frame {
  grid-area: board;
  width: 100%;
}

.tetris-queue {
  grid-area: next;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: min(100%, 540px);
  padding: 8px 12px;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: #f1f3f5;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.tetris-queue-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.tetris-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 76px;
  padding: 6px;
  border-radius: 8px;
  background: #0a0a0a;
}

.tetris-mini-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.05);
}

.tetris-mini-cell.is-on {
  background: var(--cell);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.35);
}

.game-view[data-game-id="tetris"] .tetris-frame {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  background: linear-gradient(180deg, #4a4a4a 0%, #2b2b2b 100%);
  box-shadow: var(--shadow);
}

.tetris-frame.is-line-clear {
  animation: tetris-flash 0.34s ease;
}

@keyframes tetris-flash {
  0% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.38);
  }
  100% {
    filter: brightness(1);
  }
}

.game-view[data-game-id="tetris"] .tetris-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  aspect-ratio: 10 / 18;
  max-height: min(72dvh, 580px);
  padding: 6px;
  border-radius: 8px;
  background: #0a0a0a;
  box-sizing: border-box;
}

.game-view[data-game-id="tetris"] .tetris-cell {
  width: 100%;
  height: 100%;
  min-height: 12px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.game-view[data-game-id="tetris"] .tetris-cell.is-live,
.game-view[data-game-id="tetris"] .tetris-cell.is-locked {
  background: var(--cell);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 2px rgb(255 255 255 / 0.35),
    0 2px 0 rgb(0 0 0 / 0.2);
}

.game-view[data-game-id="tetris"] .tetris-cell.is-ghost {
  background: color-mix(in srgb, var(--cell) 26%, transparent);
  border: 2px dashed color-mix(in srgb, var(--cell) 75%, var(--ink));
}

.game-view[data-game-id="tetris"] .tetris-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  max-width: min(100%, 480px);
  margin: 14px auto 0;
}

.game-view[data-game-id="tetris"] .tetris-btn--rotate {
  min-width: 5.5rem;
  justify-self: center;
}

.game-view[data-game-id="tetris"] .tetris-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tetris-btn-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.tetris-btn-text {
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

@media (max-width: 420px) {
  .tetris-stage {
    max-width: 100%;
  }

  .game-view[data-game-id="tetris"] .tetris-grid {
    max-height: min(68dvh, 520px);
  }

  .game-view[data-game-id="tetris"] .tetris-btn-text {
    font-size: 0.55rem;
  }
}

/* Pênalti: ver css/futebol.css */

@media (forced-colors: active) {
  .game-card,
  .btn,
  .spot,
  .swatch,
  .piece,
  .choice,
  .answer {
    border: 2px solid ButtonText;
  }
}
