@font-face {
  font-family: "Baloo 2";
  src: url("assets/fonts/baloo2_regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Baloo 2";
  src: url("assets/fonts/baloo2_bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --naranja: #ff8a3d;
  --naranja-oscuro: #f0641e;
  --azul-cielo: #4fc3f7;
  --azul-profundo: #1e88e5;
  --verde-pasto: #66bb6a;
  --verde-oscuro: #43a047;
  --amarillo-sol: #ffd54f;
  --morado: #7e57c2;
  --rosa: #f06292;
  --texto-titulo: #2b3a67;
  --texto-cuerpo: #4a5578;
  --texto-pista: #9aa3bc;
  --tarjeta-fondo: #fcfdff;
  --campo-fondo: #f2f6fd;
  --campo-borde: #d5def0;
  --sombra: 0 8px 22px rgba(43, 58, 103, 0.20);
  --radio: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--texto-titulo);
  background: #6fc5f5;
}

button,
input,
select {
  font: inherit;
}

#skyCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
}

.screen {
  width: 100%;
  height: 100%;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-screen {
  padding: 18px 24px 18px;
}

.topbar,
.gamebar {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-shadow: 0 2px 5px rgba(43, 58, 103, 0.45);
}

.home-title,
.world-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.home-title strong,
.world-title strong {
  font-size: 22px;
  line-height: 1;
}

.home-title span,
.world-title span {
  font-size: 14px;
  opacity: 0.95;
}

.avatar-ring {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.40);
  box-shadow: 0 2px 8px rgba(43, 58, 103, 0.16);
  cursor: pointer;
}

.header-avatar {
  cursor: default;
}

.avatar-ring canvas,
.avatar-bar canvas,
.avatar-mini canvas,
.avatar-large canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.icon-button img {
  width: 27px;
  height: 27px;
}

.text-button,
.primary-button,
.option-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--azul-profundo);
  box-shadow: 0 4px 10px rgba(30, 136, 229, 0.22);
}

.text-button {
  color: var(--azul-profundo);
  background: #e3f2fd;
}

.option-button {
  width: 100%;
  color: var(--texto-titulo);
  background: var(--campo-fondo);
  min-height: 54px;
  font-size: clamp(19px, 1.25vw, 23px);
}

.option-button:hover,
.world-card:hover,
.menu-card:hover,
.memory-card:hover,
.figure-choice:hover,
.avatar-mini:hover {
  transform: translateY(-2px);
}

.option-button:disabled,
.memory-card:disabled,
.figure-choice.disabled {
  cursor: default;
  transform: none;
}

.option-button.correct,
.memory-card.correct,
.figure-choice.correct {
  color: #fff;
  background: var(--verde-pasto);
}

.option-button.wrong,
.memory-card.wrong,
.figure-choice.wrong {
  color: #fff;
  background: var(--rosa);
}

.home-prompt {
  margin: -2px auto 0;
  position: relative;
  z-index: 2;
  transform: translateY(clamp(44px, 8vh, 86px));
  color: #fff;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(43, 58, 103, 0.45);
}

.world-grid,
.menu-grid {
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 12px;
}

.world-grid {
  width: min(1250px, 100%);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}

.menu-grid {
  width: min(1100px, 100%);
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  align-items: center;
}

.world-card,
.menu-card {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: var(--radio);
  padding: 10px;
  box-shadow: var(--sombra);
  color: var(--texto-cuerpo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  animation: cardIn 320ms ease both;
  overflow: hidden;
}

.world-card {
  height: min(100%, clamp(230px, 58vh, 540px));
}

.menu-card {
  height: min(100%, clamp(230px, 52vh, 460px));
}

.world-card img,
.menu-card img,
.mascot {
  object-fit: contain;
}

.world-card img,
.menu-card img {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
}

.world-card img {
  width: clamp(62px, 5vw, 78px);
  height: clamp(62px, 5vw, 78px);
  margin-bottom: 10px;
}

.menu-card img {
  width: clamp(58px, 4.6vw, 74px);
  height: clamp(58px, 4.6vw, 74px);
  margin-bottom: 10px;
}

.mascot {
  width: 70px;
  height: 58px;
}

.world-card strong,
.menu-card strong {
  min-height: 2.1em;
  color: var(--texto-titulo);
  font-size: 16px;
  line-height: 1.05;
}

.world-card strong,
.world-card span {
  max-width: 100%;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.world-card strong {
  min-height: 0;
  font-size: clamp(20px, 1.7vw, 25px);
  line-height: 1.02;
}

.world-card span {
  min-height: 0;
  max-width: 19ch;
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.08;
}

.menu-card strong {
  min-height: 0;
  max-width: 100%;
  font-size: clamp(19px, 1.35vw, 23px);
  line-height: 1.04;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.menu-card span {
  min-height: 3em;
  max-width: 21ch;
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.chips {
  min-height: 46px;
  margin-top: 6px;
  display: grid;
  gap: 6px;
  place-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  color: var(--texto-cuerpo);
  background: rgba(255, 255, 255, 0.62);
}

.chip.score {
  color: var(--azul-profundo);
  background: #fff8e1;
  font-weight: 700;
}

.gamebar {
  width: 100%;
  margin: 0;
}

.game-progress {
  flex: 1;
  text-align: center;
  font-size: clamp(17px, 1.15vw, 21px);
  font-weight: 700;
}

.level-chip {
  white-space: nowrap;
  font-size: clamp(13px, 0.95vw, 16px);
  font-weight: 700;
}

.star-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(17px, 1.1vw, 21px);
  font-weight: 700;
}

.star-inline img {
  width: 32px;
  height: 32px;
}

.game-avatar {
  width: 54px;
  height: 54px;
}

.avatar-bar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.40);
}

.game-card {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  height: auto;
  max-height: calc(100vh - 98px);
  margin: auto;
  flex: 0 1 auto;
  min-height: 0;
  border-radius: var(--radio);
  background: var(--tarjeta-fondo);
  box-shadow: var(--sombra);
  overflow: auto;
  animation: gameIn 230ms ease both;
}

.game-scroll,
.game-pad {
  width: 100%;
  height: auto;
  padding: clamp(18px, 2vw, 30px);
}

.game-scroll {
  overflow: auto;
}

.game-pad {
  min-height: clamp(340px, 42vh, 500px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.3vw, 20px);
}

.question {
  width: 100%;
  margin: 0;
  text-align: center;
  line-height: 1.22;
  color: var(--texto-titulo);
  font-size: clamp(18px, 1.2vw, 23px);
  font-weight: 700;
}

.hint,
.response {
  min-height: 24px;
  margin: 0;
  text-align: center;
  color: var(--texto-pista);
  font-weight: 700;
  font-size: clamp(16px, 1.05vw, 19px);
}

.response.success {
  color: var(--verde-oscuro);
}

.response.warn {
  color: var(--naranja-oscuro);
}

.response.info {
  color: var(--azul-profundo);
}

.response.neutral {
  color: var(--texto-cuerpo);
}

.options-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fraction-line,
.domino-line,
.factory-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fraction-block {
  min-width: 86px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: var(--texto-cuerpo);
  font-weight: 700;
  font-size: 19px;
}

.fraction-block canvas {
  width: clamp(72px, 5.2vw, 92px);
  height: clamp(72px, 5.2vw, 92px);
}

.math-sign {
  color: var(--texto-titulo);
  font-size: clamp(34px, 2.3vw, 44px);
  font-weight: 700;
}

.canvas-flex {
  width: 100%;
  flex: 0 1 auto;
  height: clamp(220px, 32vh, 340px);
  min-height: 220px;
  display: grid;
  place-items: center;
}

.canvas-flex canvas {
  width: 100%;
  height: 100%;
  min-height: 220px;
}

.reparto-flex {
  height: clamp(250px, 34vh, 360px);
}

.bloques-flex {
  height: clamp(260px, 34vh, 380px);
}

.domino-options,
.loteria-board,
.memory-board,
.figure-grid {
  display: grid;
  gap: 10px;
  justify-content: center;
}

.domino-options {
  grid-template-columns: repeat(3, minmax(120px, 150px));
}

.domino-card {
  border: 3px solid var(--campo-borde);
  border-radius: 14px;
  padding: 10px 0;
  background: #fff;
  box-shadow: 0 3px 8px rgba(43, 58, 103, 0.13);
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 7px;
}

.domino-card canvas {
  width: 78px;
  height: 78px;
}

.domino-card strong {
  font-size: 21px;
}

.domino-card .separator {
  width: 70%;
  height: 2px;
  background: var(--campo-borde);
}

.loteria-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(250px, 340px) 1fr;
  gap: clamp(18px, 2vw, 30px);
  align-items: center;
  justify-content: center;
}

.loteria-card {
  border-radius: 18px;
  padding: 18px;
  background: #fff8e1;
  text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255, 213, 79, 0.65);
}

.loteria-board {
  grid-template-columns: repeat(3, clamp(84px, 7vw, 104px));
}

.loteria-cell {
  width: clamp(84px, 7vw, 104px);
  height: clamp(84px, 7vw, 104px);
  border: 2px solid var(--campo-borde);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(43, 58, 103, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--texto-titulo);
  font-weight: 700;
}

.loteria-cell canvas {
  width: 56px;
  height: 56px;
}

.loteria-cell.found {
  color: #fff;
  background: var(--verde-pasto);
  font-size: 24px;
}

.factory-numbers {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.number-tile {
  min-width: 108px;
  border-radius: 16px;
  padding: 14px 24px;
  color: #fff;
  background: var(--morado);
  font-size: clamp(30px, 2.2vw, 42px);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--sombra);
}

.toys {
  min-height: 48px;
  font-size: clamp(30px, 2.2vw, 42px);
  letter-spacing: 3px;
}

.status-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-row .response {
  flex: 1;
  font-size: clamp(14px, 0.95vw, 17px);
}

.lives {
  color: var(--rosa);
  font-weight: 700;
}

.streak {
  min-width: 54px;
  color: var(--naranja-oscuro);
  font-weight: 700;
  text-align: right;
}

.geo-layout,
.enteros-layout {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(18px, 2vw, 32px);
  align-items: center;
}

.geo-canvas,
.object-canvas {
  width: 100%;
  height: 100%;
  min-height: clamp(260px, 38vh, 420px);
}

.formula {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 14px;
  color: var(--azul-profundo);
  background: #e3f2fd;
  font-weight: 700;
}

.figure-grid {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-choice {
  min-height: clamp(260px, 38vh, 380px);
  border: 0;
  border-radius: 18px;
  padding: 8px;
  background: var(--campo-fondo);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.figure-choice canvas {
  width: 100%;
  flex: 1;
  min-height: 150px;
}

.figure-choice span {
  min-height: 24px;
  color: var(--texto-cuerpo);
  font-weight: 700;
  font-size: 18px;
}

.memory-intro,
.count-badge {
  text-align: center;
  color: var(--azul-profundo);
  font-weight: 700;
  font-size: clamp(17px, 1.1vw, 21px);
}

.count-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: min(24vw, 150px);
  color: rgba(30, 136, 229, 0.23);
}

.memory-board {
  width: min(900px, 100%);
  margin: 0 auto;
  flex: 0 1 auto;
  grid-template-columns: repeat(4, minmax(120px, 180px));
  align-content: center;
}

.memory-card {
  min-height: 86px;
  aspect-ratio: 1.55;
  border: 0;
  border-radius: 14px;
  padding: 8px 10px;
  background: var(--azul-profundo);
  color: #fff;
  box-shadow: 0 3px 7px rgba(43, 58, 103, 0.13);
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  transition: transform 160ms ease;
}

.memory-card:not(.face) {
  font-size: 24px;
  font-weight: 700;
}

.memory-card.face {
  color: var(--texto-titulo);
}

.memory-card small {
  display: block;
  color: var(--naranja-oscuro);
  font-size: 12px;
  line-height: 1;
}

.memory-card small.capital {
  color: var(--azul-profundo);
}

.memory-card strong {
  font-size: clamp(15px, 1.45vw, 21px);
  line-height: 1.05;
}

.profile-card {
  width: min(1080px, calc(100% - 48px));
  margin: clamp(6px, 1.5vh, 14px) auto auto;
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100vh - 100px);
  border-radius: var(--radio);
  background: var(--tarjeta-fondo);
  box-shadow: var(--sombra);
  padding: clamp(24px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: clamp(26px, 3vw, 42px);
  align-items: center;
  overflow: auto;
}

.profile-preview-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
}

.avatar-large {
  width: clamp(178px, 15vw, 220px);
  height: clamp(178px, 15vw, 220px);
  border-radius: 34px;
  background: var(--campo-fondo);
  border: 3px solid var(--campo-borde);
  justify-self: center;
}

.profile-meta {
  text-align: center;
  color: var(--texto-cuerpo);
}

.profile-meta strong {
  font-size: clamp(20px, 1.5vw, 25px);
  line-height: 1;
}

.profile-controls {
  min-width: 0;
}

.profile-name-field {
  width: min(430px, 100%);
  display: grid;
  gap: 6px;
  color: var(--texto-titulo);
  font-weight: 700;
  font-size: clamp(18px, 1.2vw, 22px);
}

.profile-name-field input {
  width: 100%;
  min-height: 52px;
  border: 3px solid var(--campo-borde);
  border-radius: 18px;
  padding: 8px 14px;
  color: var(--texto-titulo);
  background: var(--campo-fondo);
  font-size: clamp(20px, 1.35vw, 24px);
  font-weight: 700;
  outline: none;
}

.profile-name-field input:focus {
  border-color: var(--azul-profundo);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
}

.selector-title {
  margin: 18px 0 8px;
  font-size: clamp(19px, 1.35vw, 24px);
  font-weight: 700;
}

.avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.avatar-mini {
  width: clamp(64px, 5vw, 76px);
  height: clamp(64px, 5vw, 76px);
  border: 3px solid var(--campo-borde);
  border-radius: 17px;
  padding: 0;
  background: var(--campo-fondo);
  cursor: pointer;
}

.avatar-mini.selected {
  border-width: 6px;
  border-color: var(--azul-profundo);
}

.profile-controls p {
  margin: 22px 0 0;
}

.profile-controls .primary-button {
  min-height: 56px;
  padding: 10px 26px;
  font-size: clamp(20px, 1.35vw, 24px);
}

.final-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(43, 58, 103, 0.88);
}

.final-card {
  max-width: min(94vw, 460px);
  border-radius: var(--radio);
  padding: 20px;
  text-align: center;
  background: var(--tarjeta-fondo);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  animation: finalPop 320ms cubic-bezier(.2, 1.45, .4, 1) both;
}

.final-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(30, 136, 229, 0.14);
}

.final-avatar canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.final-card h2 {
  margin: 6px 0 2px;
  font-size: 24px;
}

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

#toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 6;
  transform: translateX(-50%) translateY(20px);
  max-width: min(90vw, 520px);
  border-radius: 999px;
  padding: 9px 18px;
  color: #fff;
  background: rgba(43, 58, 103, 0.92);
  box-shadow: var(--sombra);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.shake {
  animation: shake 380ms ease;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gameIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes finalPop {
  from {
    transform: scale(0.6);
  }
  to {
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(14px); }
  34% { transform: translateX(-14px); }
  50% { transform: translateX(10px); }
  66% { transform: translateX(-10px); }
  82% { transform: translateX(5px); }
}

@media (max-width: 840px) {
  body {
    overflow: auto;
  }

  #app,
  .screen {
    min-height: 100vh;
    height: auto;
  }

  .world-grid,
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
  }

  .world-grid,
  .menu-grid {
    align-items: stretch;
  }

  .home-prompt {
    margin: 4px auto 6px;
    transform: translateY(12px);
  }

  .world-card,
  .menu-card {
    height: auto;
    min-height: 220px;
  }

  .game-card {
    width: min(760px, 100%);
    height: auto;
    max-height: none;
    min-height: 560px;
    flex: none;
  }

  .game-scroll,
  .game-pad {
    min-height: 560px;
  }

  .loteria-layout,
  .geo-layout,
  .enteros-layout,
  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-card {
    width: min(680px, calc(100% - 24px));
    max-height: none;
    padding: 22px;
    gap: 18px;
  }

  .avatar-large {
    width: 160px;
    height: 160px;
  }

  .profile-name-field {
    width: 100%;
  }

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

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

  .figure-choice {
    min-height: 220px;
  }

  .memory-board {
    width: min(620px, 100%);
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }
}

@media (max-width: 560px) {
  .screen {
    padding: 8px 10px 14px;
  }

  .home-screen {
    padding: 14px 14px 14px;
  }

  .home-title strong,
  .world-title strong {
    font-size: 19px;
  }

  .world-grid,
  .menu-grid {
    grid-template-columns: 1fr;
  }

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

  .memory-card {
    min-height: 64px;
    aspect-ratio: 1.35;
    padding: 4px;
  }

  .memory-card strong {
    font-size: clamp(12px, 3.2vw, 15px);
  }

  .memory-card small {
    font-size: 10px;
  }

  .world-card,
  .menu-card {
    min-height: 210px;
  }

  .profile-card {
    width: 100%;
    padding: 16px;
    gap: 14px;
  }

  .avatar-large {
    width: 136px;
    height: 136px;
    border-radius: 26px;
  }

  .profile-meta strong {
    font-size: 20px;
  }

  .selector-title {
    margin: 14px 0 7px;
  }

  .avatar-row {
    gap: 8px;
  }

  .avatar-mini {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .profile-name-field input {
    min-height: 48px;
  }

  .profile-controls .primary-button {
    width: 100%;
    min-height: 52px;
    padding: 9px 16px;
  }

  .gamebar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .game-avatar {
    width: 48px;
    height: 48px;
  }

  .game-progress {
    order: 3;
    flex-basis: 100%;
  }

  .game-card {
    width: 100%;
    min-height: 520px;
  }

  .game-scroll,
  .game-pad {
    padding: 12px;
    min-height: 520px;
  }

  .domino-options {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

  .domino-card canvas {
    width: 60px;
    height: 60px;
  }

  .loteria-board {
    grid-template-columns: repeat(3, 78px);
  }

  .loteria-cell {
    width: 78px;
    height: 78px;
  }

  .loteria-cell canvas {
    width: 44px;
    height: 44px;
  }

  .options-row,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .figure-choice {
    height: clamp(112px, 17vh, 145px);
    min-height: 0;
  }

  .figure-choice canvas {
    flex: 0 0 auto;
    height: clamp(72px, 12vh, 92px);
    min-height: 0;
  }
}
