/* ============================================================
   Saludos — Spanish greetings game
   Theme based on the modern “Languages Online” app:
   blue #006BD7 / yellow #FFCC00, rounded friendly UI.
   ============================================================ */

:root {
  --blue:       #006BD7;
  --blue-dark:  #0D47A1;
  --blue-light: #E3F0FC;
  --yellow:     #FFCC00;
  --green:      #2E9E44;
  --green-dark: #1B5E20;
  --red:        #D84343;
  --ink:        #17325C;
  --paper:      #F2F7FC;
  --white:      #FFFFFF;
  --radius:     16px;
  --shadow:     0 4px 14px rgba(13, 45, 90, .14);
  --shadow-lg:  0 12px 32px rgba(13, 45, 90, .25);
  --font: 'Arial Rounded MT Bold', 'Segoe UI', 'Trebuchet MS', Verdana, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #DDEBFA 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 0%, #FFF3CF 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 30px;
}

/* ============================ header ============================ */

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #005BBB 0%, var(--blue) 55%, #2E8AE5 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
}

.titlebar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.flag { font-size: 40px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

.titles h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: .5px;
}

.subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #CFE6FF;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.titlebar-right { display: flex; align-items: center; gap: 10px; }

.score-pill {
  display: flex; align-items: center; gap: 7px;
  background: var(--yellow);
  color: #4A3800;
  font-size: 20px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.score-pill #score { font-size: 22px; min-width: 1ch; text-align: center; }
.score-total { font-size: 14px; opacity: .8; }

.icon-btn {
  font-family: inherit;
  font-size: 19px;
  width: 46px; height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.icon-btn:hover  { background: rgba(255,255,255,.30); transform: scale(1.08); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* progress bar */
.progress-track {
  height: 10px;
  margin: 12px 2px 0;
  background: #DCE8F5;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(13,45,90,.15);
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), #FFB300);
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

/* ============================ board ============================ */

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

/* ---------- target card ---------- */

.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.card.drop-hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--yellow);
}

.card.wrong-shake { animation: shake .5s ease; }
.card.done { box-shadow: var(--shadow), 0 0 0 3px var(--green); }

/* ---------- scene artwork ---------- */

.scene {
  position: relative;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scene-emoji {
  font-size: 62px;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.22));
  animation: floaty 3.2s ease-in-out infinite;
  z-index: 2;
}

/* morning — warm sunrise */
.scene-morning { background: linear-gradient(180deg, #FF8A5C 0%, #FFB75E 45%, #FFD97D 100%); }
.scene-morning::before { /* sun glow */
  content: '';
  position: absolute; inset: auto -30% -70% -30%;
  height: 160%;
  background: radial-gradient(closest-side, rgba(255,236,150,.95), rgba(255,236,150,0));
}

/* afternoon — bright blue day with drifting clouds */
.scene-afternoon { background: linear-gradient(180deg, #4FA8F5 0%, #8FCDF9 70%, #C9E9FF 100%); }
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: .92;
  box-shadow: 0 4px 8px rgba(30,80,140,.15);
  z-index: 1;
  animation: drift 14s linear infinite;
}
.cloud.c1 { width: 52px; height: 18px; top: 18px; left: -60px; }
.cloud.c2 { width: 36px; height: 13px; top: 46px; left: -40px; animation-duration: 20s; animation-delay: -6s; }
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud.c1::before { width: 26px; height: 26px; top: -12px; left: 10px; }
.cloud.c1::after  { width: 18px; height: 18px; top: -8px;  left: 30px; }
.cloud.c2::before { width: 18px; height: 18px; top: -8px; left: 8px; }
.cloud.c2::after  { width: 12px; height: 12px; top: -6px; left: 20px; }

/* hello — fresh green */
.scene-hello { background: linear-gradient(180deg, #3FA34D 0%, #7DC95E 60%, #B9E88A 100%); }
.scene-hello::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 60%);
}

/* goodbye — sunset violet */
.scene-goodbye { background: linear-gradient(180deg, #7E3FF2 0%, #A66BF0 55%, #D5B3F7 100%); }
.scene-goodbye::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 80%, rgba(255,255,255,.28), transparent 55%);
}

/* night — deep indigo with twinkling stars */
.scene-night { background: linear-gradient(180deg, #14206E 0%, #2A218F 55%, #4A3BB8 100%); }
.star {
  position: absolute;
  width: 8px; height: 8px;
  background: #FFE58A;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2.4s ease-in-out infinite;
  z-index: 1;
}
.star.s1 { top: 14px; left: 16%; animation-delay: -.4s; }
.star.s2 { top: 34px; left: 78%; animation-delay: -1.1s; transform: scale(.7); }
.star.s3 { top: 60px; left: 30%; animation-delay: -1.8s; transform: scale(.55); }
.star.s4 { top: 22px; left: 55%; animation-delay: -2.2s; transform: scale(.45); }

/* soon — lively teal */
.scene-soon { background: linear-gradient(180deg, #00919B 0%, #26C6DA 55%, #8AE7F0 100%); }
.scene-soon::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.10) 0deg 12deg, transparent 12deg 24deg);
  animation: spin 22s linear infinite;
}

/* ---------- card body: cue + slot ---------- */

.card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.cue {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  text-align: center;
  letter-spacing: .2px;
}

.slot {
  border: 2.5px dashed #9DC4EE;
  border-radius: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: border-color .15s ease, background .15s ease;
}

.card.drop-hover .slot { border-color: var(--blue); background: var(--blue-light); }
.card.done .slot { border-style: solid; border-color: var(--green); background: #EFF9EF; }

.slot .hint { font-size: 12px; color: #7FA8D9; font-weight: 700; letter-spacing: .4px; }

/* ---------- result badges on cards ---------- */

.badge {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  color: #fff;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}
.badge.ok  { background: var(--green); box-shadow: 0 2px 6px rgba(27,94,32,.4); }
.badge.bad { background: var(--red);   box-shadow: 0 2px 6px rgba(160,30,30,.4); }

.card.done .badge.ok,
.card.show-bad .badge.bad { opacity: 1; animation: pop .35s cubic-bezier(.34,1.56,.64,1); }

/* ============================ chips (draggables) ============================ */

.tray {
  margin-top: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 20px;
}

.tray-title {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--blue-dark);
  text-align: center;
}
.tray-en { font-weight: 600; color: #6C8CB8; font-size: 13px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  min-height: 56px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2.5px solid var(--blue);
  color: var(--blue-dark);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 8px 10px 18px;
  border-radius: 999px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 3px 8px rgba(13,45,90,.16);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .2s ease;
  position: relative;
}

.chip:hover:not(.placed):not(.drag-src) { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 14px rgba(13,45,90,.22); }
.chip:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.chip.selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow), 0 6px 14px rgba(13,45,90,.22);
  transform: translateY(-2px) scale(1.03);
}

.chip.drag-src { opacity: .25; }              /* original while its ghost is out */
.chip.ghost {
  position: fixed;
  left: 0; top: 0;
  z-index: 1000;
  pointer-events: none;
  cursor: grabbing;
  transform: scale(1.07) rotate(2deg);
  box-shadow: var(--shadow-lg);
  margin: 0;
  transition: none;
}
.chip.snap-back { transition: left .28s cubic-bezier(.22,1,.36,1), top .28s cubic-bezier(.22,1,.36,1), transform .28s ease; }

.chip.placed {
  cursor: default;
  border-color: var(--green);
  color: var(--green-dark);
  background: #F2FBF2;
  box-shadow: none;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
}

.chip-speak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-light);
  font-size: 15px;
  cursor: pointer;
  border: none;
  padding: 0;
  flex: none;
}
.chip-speak:hover { background: var(--yellow); }
.chip-speak:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.chip.placed .chip-speak { background: #DDF3DD; }

/* ============================ modals ============================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 60, .55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  animation: fadeIn .2s ease;
}
.modal.hidden { display: none; }

.modal-card {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 30px 34px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}

.modal-card h2 { margin: 0 0 14px; font-size: 28px; color: var(--blue-dark); }
.modal-en { font-size: 15px; color: #6C8CB8; font-weight: 600; }

.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.modal-close:hover { background: var(--yellow); }

.help-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  text-align: left;
}
.help-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 16px;
  border-bottom: 1px dashed #E1ECF8;
}
.help-list li:last-child { border-bottom: none; }
.help-emoji { font-size: 22px; flex: none; }

.btn-primary {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2E8AE5, var(--blue));
  border: none;
  border-radius: 999px;
  padding: 12px 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,107,215,.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0,107,215,.45); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
  background: none;
  border: 2px solid var(--blue);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  margin-left: 10px;
}
.btn-ghost:hover { background: var(--blue-light); }

/* results */
.done-emoji { font-size: 74px; line-height: 1.1; animation: bounceIn .6s cubic-bezier(.34,1.56,.64,1); }
.done-stats { font-size: 17px; color: #4A628A; margin: 6px 0 12px; }
.done-stars { font-size: 34px; letter-spacing: 6px; color: var(--yellow); margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,.15); }

.modal-buttons { display: flex; justify-content: center; align-items: center; }

/* ============================ confetti ============================ */

.confetti {
  position: fixed;
  top: -20px;
  width: 10px; height: 16px;
  z-index: 3000;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-4vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(108vh) rotate(720deg); opacity: .9; }
}

/* ============================ footer ============================ */

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: #8AA5C6;
  padding: 0 10px;
}

.footer .mat-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  background: #fff;
  border: 2px solid #CFE2F7;
  border-radius: 999px;
  padding: 9px 18px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: .15s;
}
.footer .mat-link:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

/* ============================ animations ============================ */

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw)); }
}
@keyframes twinkle {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pop {
  0%   { transform: scale(.3); }
  70%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounceIn {
  0%   { transform: scale(.2); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* ============================ responsive ============================ */

@media (max-width: 760px) {
  .board { grid-template-columns: repeat(2, 1fr); }
  .titles h1 { font-size: 26px; }
  .flag { font-size: 30px; }
  .scene { height: 96px; }
  .scene-emoji { font-size: 48px; }
  .cue { font-size: 15px; }
  .chip { font-size: 16px; }
}

@media (max-width: 480px) {
  .board { grid-template-columns: 1fr; }
  .titlebar { justify-content: center; text-align: center; }
  .btn-ghost { margin-left: 0; margin-top: 10px; }
  .modal-buttons { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   v2 additions — multi-activity app shell
   (menu, song player, typing, composite runner, crossword)
   ============================================================ */

/* generic show/hide utility for screens & header widgets */
.hidden { display: none !important; }

/* ============================ menu screen ============================ */

.menu-screen { animation: fadeIn .25s ease; }

.menu-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #FFF8E1, #FFFDF5);
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.menu-banner-emoji { font-size: 52px; line-height: 1; animation: floaty 3.2s ease-in-out infinite; }
.menu-banner h2 { margin: 0 0 4px; font-size: 24px; color: var(--blue-dark); }
.menu-banner p  { margin: 0; font-size: 15px; color: #5A78A0; }

.menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.menu-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.menu-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--blue), var(--yellow));
}
.menu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.menu-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.menu-num {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,107,215,.35);
}
.menu-icon { font-size: 34px; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.menu-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-card-title { font-size: 20px; font-weight: 700; color: var(--blue-dark); }
.menu-card-sub   { font-size: 14px; color: #6C8CB8; }
.menu-card-type  { font-size: 12px; font-weight: 700; color: #B98A00;
                   text-transform: uppercase; letter-spacing: .5px; }
.menu-go {
  margin-left: auto; flex: none;
  color: var(--blue); font-size: 18px;
  transition: transform .15s ease;
}
.menu-card:hover .menu-go { transform: translateX(4px); }

/* ============================ song player (activity 2) ============================ */

.song-stage {
  position: relative;
  background: linear-gradient(160deg, #14206E 0%, #2A218F 45%, #4A3BB8 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 20px 26px;
  overflow: hidden;
  margin-top: 18px;
}
.song-stage::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(220px 120px at 85% 15%, rgba(255,204,0,.35), transparent 70%),
    radial-gradient(180px 100px at 12% 85%, rgba(38,198,218,.30), transparent 70%);
  pointer-events: none;
}

.song-scene {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 4vw; min-height: 110px; margin-bottom: 18px;
  position: relative; z-index: 2;
}
.song-bounce { font-size: clamp(30px, 6vw, 54px); line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); animation: songBounce 1.6s ease-in-out infinite; animation-play-state: paused; }
.song-bounce.b1 { animation-delay: 0s; }
.song-bounce.b2 { animation-delay: .2s; }
.song-bounce.b3 { animation-delay: .4s; }
.song-bounce.b4 { animation-delay: .6s; }
.song-bounce.b5 { animation-delay: .8s; }
.song-bounce.b6 { animation-delay: 1s; }
.song-stage.playing .song-bounce { animation-play-state: running; }
@keyframes songBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(-16px) scale(1.06); }
  60%      { transform: translateY(2px) scale(.98); }
}

.song-controls {
  display: flex; align-items: center; gap: 16px;
  position: relative; z-index: 2;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 10px 18px;
  max-width: 560px; margin: 0 auto;
}
.song-play {
  flex: none;
  width: 56px; height: 56px;
  border: none; border-radius: 50%;
  background: var(--yellow);
  color: #4A3800;
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255,204,0,.45);
  transition: transform .12s ease;
}
.song-play:hover  { transform: scale(1.08); }
.song-play:active { transform: scale(.94); }
.song-play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.song-progress {
  flex: 1; height: 12px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
}
.song-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--yellow), #FFE082);
  border-radius: 999px;
}
.song-time { flex: none; font-size: 13px; font-weight: 700; color: #E3F0FC; font-variant-numeric: tabular-nums; }

.song-lyrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.song-verse {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px 16px;
}
.song-verse-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.song-verse-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue-dark);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.verse-speak { margin-left: auto; }
.song-line { font-size: 16px; font-weight: 600; color: var(--ink); padding: 2px 0; }

/* ============================ typing (activity 3) ============================ */

.type-panel, .write-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px 24px;
  margin-top: 18px;
}

.type-rows, .write-rows { display: flex; flex-direction: column; gap: 12px; }

.type-row, .write-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1.2fr) minmax(150px, 1fr) 34px 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}
.type-row.wrong, .write-row.wrong { border-color: var(--red); background: #FFF4F4; animation: shake .5s ease; }
.type-row.done,  .write-row.done  { border-color: var(--green); background: #F2FBF2; }

.type-mask { font-size: 17px; font-weight: 700; color: var(--blue-dark); letter-spacing: 1px; }
.write-prompt { font-size: 17px; font-weight: 700; color: var(--blue-dark); }

.type-input, .write-input {
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 10px 14px;
  border: 2.5px solid #9DC4EE;
  border-radius: 12px;
  outline: none;
  min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.type-input:focus, .write-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.type-input:disabled, .write-input:disabled { background: #F2FBF2; border-color: var(--green); color: var(--green-dark); font-weight: 700; }

.type-row .badge, .write-row .badge {
  position: static;
  width: 30px; height: 30px;
  font-size: 15px;
  opacity: 0;
}
.type-row.done  .badge.ok,  .write-row.done  .badge.ok,
.type-row.wrong .badge.bad, .write-row.wrong .badge.bad { opacity: 1; animation: pop .35s cubic-bezier(.34,1.56,.64,1); }

.type-actions { margin-top: 18px; text-align: center; }

/* ============================ composite runner (activity 4) ============================ */

.runner-bar {
  display: flex; gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.runner-step {
  flex: 1;
  min-width: 150px;
  display: flex; align-items: center; gap: 10px;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  background: #E4ECF6;
  color: #6C86AC;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.runner-step.locked { opacity: .55; cursor: not-allowed; }
.runner-step.unlocked { background: #DFEFFF; color: var(--blue-dark); }
.runner-step.active { background: var(--blue); color: #fff; transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,107,215,.35); }
.runner-step.done .runner-step-state { color: #B7F0BE; }
.runner-step.done:not(.active) { background: #E5F6E7; color: var(--green-dark); }
.runner-step:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.runner-step-num {
  flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: var(--blue-dark);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.runner-step.active .runner-step-num { background: var(--yellow); color: #4A3800; }
.runner-step-name { font-weight: 700; font-size: 15px; }
.runner-step-state { margin-left: auto; font-size: 16px; font-weight: 700; }

.runner-panels { margin-top: 4px; }
.runner-panel { animation: fadeIn .25s ease; }
.runner-hint { margin: 14px 2px 0; font-size: 15px; color: #5A78A0; }

.board-compact { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.board-compact .scene { height: 84px; }
.board-compact .scene-emoji { font-size: 44px; }
.tray-compact { margin-top: 14px; padding: 12px 14px 16px; }

.runner-next { margin-top: 20px; text-align: center; }

/* write/listen sections inside panels reuse .type-panel look */
.runner-panel .write-rows { margin-top: 12px; }

/* ============================ crossword (activity 5) ============================ */

.cw-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: 18px;
}
.cw-variants { display: flex; gap: 8px; }
.cw-variant {
  font-family: inherit;
  font-size: 15px; font-weight: 700;
  border: 2px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all .15s ease;
}
.cw-variant:hover { background: var(--blue-light); }
.cw-variant.active { background: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(0,107,215,.35); }
.cw-check { font-size: 16px; padding: 9px 22px; }

.cw-wrap {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(240px, 1fr);
  gap: 18px;
  margin-top: 14px;
  align-items: start;
}

.cw-grid-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.cw-grid {
  --cw: clamp(24px, 8.2vw, 36px);
  display: grid;
  grid-template-columns: repeat(var(--cw-dim, 12), var(--cw));
  gap: 3px;
  width: fit-content;
  margin: 0 auto;
}
.cw-cell {
  position: relative;
  width: var(--cw); height: var(--cw);
}
.cw-cell.block { background: #17325C; border-radius: 4px; }
.cw-cell:not(.block) {
  background: var(--blue-light);
  border-radius: 6px;
  border: 2px solid #C4DBF3;
  transition: border-color .12s ease, background .12s ease;
}
.cw-cell.word-hi { border-color: var(--blue); background: #FFF6D6; }
.cw-cell.good { background: #E5F6E7; border-color: var(--green); }
.cw-cell.bad  { border-color: var(--red); background: #FFF4F4; animation: shake .4s ease; }

.cw-in {
  width: 100%; height: 100%;
  border: none; background: transparent;
  font-family: inherit;
  font-size: calc(var(--cw) * .52);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0;
  outline: none;
  caret-color: var(--blue);
}
.cw-in:focus { background: #FFF2BF; border-radius: 6px; }
.cw-in:disabled { color: var(--green-dark); }

.cw-num {
  position: absolute; top: -1px; left: 2px;
  font-size: 10px; font-weight: 700; color: var(--blue);
  pointer-events: none;
}

.cw-clues {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.cw-clues-title { margin: 0 0 10px; font-size: 18px; color: var(--blue-dark); }
.cw-clue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cw-clue {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 2px solid #E1ECF8;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.cw-clue:hover { border-color: var(--blue); background: var(--blue-light); }
.cw-clue.active { border-color: var(--blue); background: #FFF6D6; }
.cw-clue:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.cw-clue-emoji { font-size: 22px; flex: none; }
.cw-clue-text { flex: 1; min-width: 0; }
.cw-speak { flex: none; }

/* ============================ responsive v2 ============================ */

@media (max-width: 820px) {
  .cw-wrap { grid-template-columns: 1fr; }
  .cw-grid { --cw: clamp(22px, 7.4vw, 34px); }
}

@media (max-width: 560px) {
  .type-row, .write-row {
    grid-template-columns: 40px 1fr 34px 34px;
    grid-template-areas: "speak prompt ok bad" "input input input input";
    row-gap: 6px;
  }
  .type-speak, .write-speak { grid-area: speak; }
  .type-mask, .write-prompt { grid-area: prompt; }
  .type-input, .write-input { grid-area: input; }
  .type-row .badge.ok, .write-row .badge.ok { grid-area: ok; }
  .type-row .badge.bad, .write-row .badge.bad { grid-area: bad; }
  .runner-step { min-width: 100%; }
  .menu-banner h2 { font-size: 20px; }
}

/* ==================== Spanish accents mini-keyboard ====================
   Shown at the bottom of every writing activity (3, 4 write/listen, 5).
   Lets students tap á é í ó ú instead of hunting for the accent key. */
.accents-bar {
  margin: 16px auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  width: fit-content;
  max-width: 100%;
  background: var(--blue-light);
  border: 2px dashed rgba(0, 109, 215, .4);
  border-radius: var(--radius);
}
.accents-label {
  font-size: .9rem;
  font-weight: bold;
  color: var(--blue-dark);
  margin-right: 4px;
  white-space: nowrap;
}
.accents-flag { font-size: 1rem; }
.accents-sep {
  width: 1px;
  height: 26px;
  margin: 0 3px;
  background: rgba(0, 109, 215, .3);
}
.accent-key {
  min-width: 46px;
  min-height: 44px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
  color: var(--blue-dark);
  background: var(--white);
  border: 2px solid var(--blue);
  border-bottom-width: 4px;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
.accent-key:hover { background: #FFF6D6; border-color: var(--blue-dark); }
.accent-key:active { transform: translateY(2px); border-bottom-width: 2px; }
.accent-key:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.runner-panel .accents-bar { margin-top: 12px; }

@media (max-width: 560px) {
  .accents-bar { gap: 6px; padding: 8px 10px; }
  .accent-key { min-width: 42px; min-height: 46px; font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .accent-key { transition: none; }
}

/* ============================================================
   TOPIC 02 — ¿Cómo te llamas?  (added 2026-09-14)
   Games: names · builder · wordsearch · pairs · fill · pacman
   Reuses the topic-1 tokens: --blue, --yellow, --green, --red,
   --ink, --radius, cards/chips/badges/type-rows/menu-card.
   ============================================================ */

/* ---------------- menu: topic sections ---------------- */
.menu-list-root { display: flex; flex-direction: column; gap: 8px; }
.menu-topic-head {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 4px 2px;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}
.menu-topic-icon { font-size: 30px; line-height: 1; }
.menu-topic-body { display: flex; flex-direction: column; }
.menu-topic-title { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.menu-topic-sub  { font-size: 14px; opacity: .92; }

/* ---------------- shared cast avatars ----------------
   Consistent kid cast: ring colour identifies the character
   across every topic-2 activity. */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; font-size: 28px;
  background: var(--white);
  border-radius: 50%;
  border: 4px solid var(--blue);
  box-shadow: 0 3px 8px rgba(13,45,90,.18);
  flex: none;
}
.av-me       { border-color: var(--yellow); }
.av-her      { border-color: #9C27B0; }
.av-him      { border-color: var(--blue); }
.av-roberto  { border-color: #1E88E5; }
.av-sofia    { border-color: #9C27B0; }
.av-victoria { border-color: var(--green); }
.av-begona   { border-color: #FF9800; }
.av-julian   { border-color: #F6C700; }
.av-rafael   { border-color: var(--red); }
.chip-avatar { width: 40px; height: 40px; font-size: 22px; border-width: 3px; }

/* ---------------- game 1 · names ---------------- */
.names-wrap { display: flex; flex-direction: column; gap: 16px; }
.names-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}
.name-card .name-scene {
  display: flex; align-items: center; justify-content: center;
  height: 92px;
  background: linear-gradient(180deg, #E8F2FD 0%, #F6FBFF 100%);
  border-bottom: 2px solid #EDF4FC;
}
.name-q { font-size: 15.5px; font-weight: 700; color: var(--blue-dark); line-height: 1.25; }
.name-q .q-en { display: block; font-size: 12.5px; font-weight: 600; color: #7A8BA6; }
.name-mask {
  margin-top: 6px; font-size: 16.5px; font-weight: 700; color: var(--ink);
}
.mask-gap {
  display: inline-block; min-width: 74px;
  border-bottom: 3px dashed var(--blue);
  color: var(--blue-dark);
  text-align: center;
  padding: 0 4px;
}
.mask-gap.filled { border-bottom-style: solid; color: var(--green-dark); }
.names-tray {
  background: var(--white); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.names-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.name-chip.placed { cursor: default; }
.name-placed { border-color: var(--green); color: var(--green-dark); }

/* ---------------- game 2 · builder ---------------- */
.builder-panel {
  max-width: 760px; margin: 0 auto;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 26px 26px 30px;
}
.builder-head { display: flex; align-items: center; justify-content: space-between; }
.builder-round {
  font-weight: 800; color: var(--blue-dark);
  background: var(--blue-light); padding: 6px 14px; border-radius: 999px;
  font-size: 15px;
}
.builder-cue { margin: 10px 0 18px; font-size: 15px; color: #7A8BA6; font-weight: 600; }
.builder-cue .q-en { font-weight: 500; }
.builder-sentence {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  min-height: 96px; padding: 14px;
  background: var(--paper); border: 2px dashed #C9DCF2;
  border-radius: 12px; margin-bottom: 18px;
}
.b-tile {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 10px 14px;
  border-radius: 10px; font-size: 18px; font-weight: 700;
}
.b-fixed { background: var(--blue-light); color: var(--blue-dark); }
.b-blank {
  background: var(--white); border: 2.5px dashed var(--blue);
  color: #9FB4D0; cursor: pointer; min-width: 68px;
  transition: transform .12s ease, border-color .12s ease, background .2s ease;
}
.b-blank.b-filled {
  border-style: solid; border-color: var(--blue);
  color: var(--blue-dark); background: var(--white);
  cursor: pointer; box-shadow: 0 2px 6px rgba(13,45,90,.14);
}
.b-blank.b-good { border-color: var(--green); color: var(--green-dark); background: #F2FBF2; }
.b-blank.b-bad  { border-color: var(--red);   color: var(--red);       background: #FFF4F4; }
.b-word {
  font-family: inherit; cursor: pointer; border: 2.5px solid var(--yellow);
  background: #FFF8E1; color: #6B5300;
  box-shadow: 0 3px 8px rgba(13,45,90,.12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.b-word:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(13,45,90,.2); }
.builder-bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.b-empty { font-size: 14px; color: #9FB4D0; font-weight: 600; }

/* ---------------- game 3 · word search ---------------- */
.ws-wrap {
  display: grid; grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 18px; align-items: start; max-width: 980px; margin: 0 auto;
}
.ws-clues {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.ws-title { margin: 0 0 10px; font-size: 17px; color: var(--blue-dark); }
.ws-title .q-en { display: block; font-size: 12.5px; color: #7A8BA6; font-weight: 500; }
.ws-clue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ws-clue {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: var(--paper); font-size: 14.5px; font-weight: 600;
  transition: background .25s ease;
}
.ws-clue.done { background: #EAF7EC; color: var(--green-dark); }
.ws-clue .chip-speak { flex: none; }
.ws-gap {
  display: inline-block; min-width: 46px; text-align: center;
  border-bottom: 2px dashed var(--blue); color: var(--blue-dark);
  letter-spacing: 1px; font-weight: 800;
}
.ws-gap.filled { border-bottom-style: solid; color: var(--green-dark); }
.ws-grid-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px; }
.ws-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(21px, 1fr));
  gap: 2px; min-width: 380px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ws-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: none; border-radius: 6px; padding: 0;
  cursor: pointer;
}
.ws-cell:hover { background: #E1EEFC; }
.ws-cell.ws-sel  { background: var(--yellow); color: #5B4700; transform: scale(1.06); }
.ws-cell.ws-bad  { background: var(--red); color: #fff; }
.ws-cell.ws-found {
  background: var(--ws-c, var(--blue)); color: #fff;
  animation: ws-pop .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes ws-pop {
  0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); }
}

/* ---------------- game 4 · pairs ---------------- */
.pairs-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  max-width: 860px; margin: 0 auto;
}
.pairs-col { display: flex; flex-direction: column; gap: 10px; }
.pairs-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 12px;
  font-family: inherit; font-size: 16.5px; font-weight: 700;
  cursor: pointer; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .2s ease;
}
.pairs-es { background: var(--white); border: 2.5px solid var(--blue); color: var(--blue-dark);
  box-shadow: 0 3px 8px rgba(13,45,90,.14); }
.pairs-en { background: var(--white); border: 2.5px solid var(--yellow); color: #6B5300;
  box-shadow: 0 3px 8px rgba(13,45,90,.14); }
.pairs-card.selected { transform: translateY(-2px) scale(1.02); border-color: var(--green); }
.pairs-es.selected { background: var(--blue-light); }
.pairs-en.selected { background: #FFF6D6; }
.pairs-card.done { border-color: var(--green); background: #F2FBF2; color: var(--green-dark); cursor: default; }
.pairs-card.pulse { animation: pop .35s cubic-bezier(.34,1.56,.64,1); }

/* ---------------- game 5 · fill (typing) ---------------- */
.fill-panel { max-width: 780px; }
.fill-demo {
  display: flex; align-items: center; gap: 10px;
  background: #FFF8E1; border: 2px solid var(--yellow);
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px;
  font-size: 15px; color: var(--ink);
}
.fill-demo-badge { font-size: 20px; }
.fill-demo .q-en { color: #7A8BA6; }
.fill-row .fill-mask { font-size: 16px; font-weight: 700; min-width: 200px; }
.fill-row.done .fill-mask { color: var(--green-dark); }

/* ---------------- game 6 · pacman ---------------- */
.pm-wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.pm-hud {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 16px;
}
.pm-lives { font-size: 18px; letter-spacing: 2px; }
.pm-qcount { font-weight: 800; color: var(--blue-dark); }
.pm-hint { font-size: 12.5px; color: #7A8BA6; margin-left: auto; }
.pm-maze-wrap {
  position: relative;
  background: var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.pm-maze {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 0; aspect-ratio: 15 / 13;
}
.pm-cell { position: relative; }
.pm-wall { background: #22437A; border-radius: 3px; margin: 1px;
  box-shadow: inset 0 0 0 1.5px #2E5FA8; }
.pm-dot::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 22%; height: 22%; border-radius: 50%;
  background: #FFE9A8;
}
.pm-q {
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(11px, 2.6vw, 16px);
  animation: q-pulse 1.2s ease-in-out infinite;
}
@keyframes q-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: 1; } }
.pm-sprite {
  position: absolute;
  left:  calc(10px + var(--px, 0) * (100% - 20px) / 15);
  top:   calc(10px + var(--py, 0) * (100% - 20px) / 13);
  width:  calc((100% - 20px) / 15);
  height: calc((100% - 20px) / 13);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(13px, 3.4vw, 22px);
  transition: left .13s linear, top .13s linear;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.pm-ghost { transition-duration: .19s; }
.pm-hit { animation: shake .5s ease; }
.pm-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pm-pad button {
  width: 58px; height: 44px; border-radius: 12px;
  border: 2.5px solid var(--blue); background: var(--white);
  color: var(--blue-dark); font-size: 18px; font-weight: 800;
  cursor: pointer; box-shadow: 0 3px 8px rgba(13,45,90,.16);
  font-family: inherit;
}
.pm-pad button:active { transform: scale(.94); background: var(--blue-light); }
.pm-pad-mid { display: flex; gap: 6px; justify-content: center; }

.pm-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(13, 45, 90, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pm-overlay.hidden { display: none; }
.pm-qcard {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 480px; width: 100%; padding: 24px;
  text-align: center;
  animation: pop .3s cubic-bezier(.34,1.56,.64,1);
}
.pm-q-speak { margin: 0 auto 8px; }
.pm-q-prompt { font-size: 22px; font-weight: 800; color: var(--blue-dark); margin: 4px 0 18px; }
.pm-q-options { display: flex; flex-direction: column; gap: 10px; }
.pm-opt {
  font-family: inherit; font-size: 16.5px; font-weight: 700;
  padding: 12px 16px; border-radius: 12px; cursor: pointer;
  border: 2.5px solid var(--blue); background: var(--white); color: var(--ink);
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.pm-opt:hover { transform: translateY(-1px); background: var(--blue-light); }
.pm-opt.good { border-color: var(--green); background: #F2FBF2; color: var(--green-dark); }
.pm-opt.bad  { border-color: var(--red);   background: #FFF4F4; color: var(--red); }

/* ---------------- responsive ---------------- */
@media (max-width: 720px) {
  .ws-wrap { grid-template-columns: 1fr; }
  .ws-grid { min-width: 340px; }
  .pairs-wrap { grid-template-columns: 1fr; }
  .name-card .name-scene { height: 72px; }
  .avatar { width: 44px; height: 44px; font-size: 24px; }
  .builder-sentence { gap: 6px; padding: 10px; }
  .b-tile { font-size: 16px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-q, .ws-cell.ws-found, .pm-sprite { transition: none; animation: none; }
}

/* ============================================================
   TOPIC 03 — ¿Cómo estás? (How are you?)
   Four new engines + karaoke support for the song player.
   Same tokens & visual language as Topics 1–2.
   ============================================================ */

/* ---------------- game 1 · listen & choose ---------------- */
.listen-wrap {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.listen-stage {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.listen-prompt-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--blue-light) 0%, #F3F9FF 100%);
  border: 2.5px solid var(--blue);
  border-radius: 18px; padding: 18px 26px;
}
.listen-prompt-text {
  font-size: 30px; font-weight: 800; color: var(--blue-dark);
}
.listen-prompt-text.pop { animation: pop .4s cubic-bezier(.34,1.56,.64,1); }
.listen-replay { width: 46px; height: 46px; font-size: 22px; flex: none; }
.listen-round { font-size: 14.5px; color: #7A8BA6; font-weight: 700; }
.listen-round strong { color: var(--blue-dark); }
.listen-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.listen-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 10px 16px;
  background: var(--white); border: 2.5px solid #D5E4F5;
  border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--font); cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .2s ease;
}
.listen-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.listen-face { font-size: 52px; line-height: 1; }
.listen-text { font-size: 17px; font-weight: 700; color: var(--ink); text-align: center; }
.listen-card .badge { opacity: 0; pointer-events: none; }
.listen-card.done {
  border-color: var(--green); background: #EDFAEE; cursor: default;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}
.listen-card.done .badge { opacity: 1; }
.listen-card.shake { animation: shake .5s ease; border-color: var(--red); }

/* ---------------- game 2 · pick the phrase ---------------- */
.pick-wrap {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.pick-stage {
  display: flex; gap: 20px; align-items: stretch;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px;
}
.pick-frame {
  flex: none; width: 190px; min-height: 170px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(140px 90px at 50% 30%, #FFF7DA 0%, transparent 70%),
    linear-gradient(180deg, #E8F2FD 0%, #F6FBFF 100%);
  border: 2px solid #EDF4FC; border-radius: 14px;
}
.pick-face { font-size: 96px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(13,45,90,.18)); }
.pick-face.pop { animation: pop .45s cubic-bezier(.34,1.56,.64,1); }
.pick-side {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.pick-round { font-size: 14.5px; color: #7A8BA6; font-weight: 700; }
.pick-round strong { color: var(--blue-dark); }
.pick-replay {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; padding: 10px 18px;
}
.pick-hint { margin: 0; font-size: 14px; color: #7A8BA6; font-weight: 600; }
.pick-opts {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.pick-chip {
  font-family: var(--font);
  font-size: 18px; font-weight: 800; color: var(--blue-dark);
  background: var(--white); border: 2.5px solid #C9DCF2;
  border-radius: 999px; padding: 12px 22px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .2s ease;
}
.pick-chip:hover { transform: translateY(-2px); border-color: var(--blue); }
.pick-chip.done {
  border-color: var(--green); background: #EDFAEE; color: var(--green-dark);
  cursor: default; animation: pop .35s cubic-bezier(.34,1.56,.64,1);
}
.pick-chip.shake { animation: shake .5s ease; border-color: var(--red); }

/* ---------------- game 4 · unscramble ---------------- */
.unsc-wrap {
  max-width: 820px; margin: 0 auto;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px 24px 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.unsc-top { display: flex; align-items: center; justify-content: space-between; }
.unsc-hint {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; padding: 9px 16px;
}
.unsc-round { font-size: 14.5px; color: #7A8BA6; font-weight: 700; }
.unsc-round strong { color: var(--blue-dark); }
.unsc-slots {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; min-height: 62px;
  padding: 10px; border-radius: 12px;
  background: var(--paper); border: 2.5px dashed #C9DCF2;
}
.unsc-slot {
  width: 46px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #B9C9E0;
  background: var(--white); border: 2px dashed #C9DCF2;
  border-radius: 9px;
}
.unsc-slot.filled {
  color: var(--blue-dark); border-style: solid; border-color: var(--blue);
}
.unsc-slots.solved .unsc-slot {
  border-color: var(--green); color: var(--green-dark); background: #EDFAEE;
}
.unsc-slots.shake { animation: shake .5s ease; }
.unsc-tray {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  min-height: 58px; padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, #E8F2FD 0%, #F6FBFF 100%);
}
.unsc-tile {
  width: 46px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 24px; font-weight: 800;
  color: var(--blue-dark);
  background: var(--white); border: 2.5px solid var(--blue);
  border-radius: 9px; box-shadow: 0 3px 0 rgba(13,75,150,.35);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.unsc-tile:hover { transform: translateY(-3px); }
.unsc-tile:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(13,75,150,.35); }
.unsc-tile.in-slot {
  display: none;   /* the letter lives in its slot now */
}
.unsc-answers {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  min-height: 10px;
}
.unsc-done {
  font-size: 15px; font-weight: 800; color: var(--green-dark);
  background: #EDFAEE; border: 2px solid var(--green);
  border-radius: 999px; padding: 5px 14px;
  animation: bounceIn .45s cubic-bezier(.34,1.56,.64,1);
}

/* ---------------- game 6 · conversation ---------------- */
.convo-wrap {
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
}
.convo-thread {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px;
  max-height: 380px; overflow-y: auto;
}
.convo-row { display: flex; align-items: flex-end; gap: 10px; }
.convo-row.convo-roberto { flex-direction: row-reverse; }
.convo-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; font-size: 25px; flex: none;
  background: var(--white); border-radius: 50%;
  border: 3.5px solid var(--blue); box-shadow: 0 3px 8px rgba(13,45,90,.18);
}
.convo-ava-sofia   { border-color: #9C27B0; }
.convo-ava-roberto { border-color: #1E88E5; }
.convo-bubble {
  position: relative;
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px; font-size: 17.5px; font-weight: 700; line-height: 1.45;
  background: #F4E9FB; color: #6A1B9A;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 6px rgba(13,45,90,.10);
  animation: fadeIn .3s ease;
}
.convo-roberto .convo-bubble {
  background: #E7F1FD; color: #0D47A1;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.convo-gap { color: inherit; opacity: .95; }
.convo-filled { color: var(--green-dark); }
.convo-bubble.convo-reveal { animation: pop .4s cubic-bezier(.34,1.56,.64,1); }
.convo-full { font-weight: 800; }
.convo-typing { display: inline-flex; gap: 4px; margin-left: 8px; }
.convo-typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .5;
  animation: q-pulse 1.1s infinite;
}
.convo-typing i:nth-child(2) { animation-delay: .18s; }
.convo-typing i:nth-child(3) { animation-delay: .36s; }
.convo-panel {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
}
.convo-choices {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  min-height: 48px; align-items: center;
}
.convo-chip {
  font-family: var(--font);
  font-size: 16.5px; font-weight: 800; color: var(--blue-dark);
  background: var(--white); border: 2.5px solid #C9DCF2;
  border-radius: 999px; padding: 10px 18px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .2s ease;
}
.convo-chip:hover { transform: translateY(-2px); border-color: var(--blue); }
.convo-choices.convo-locked .convo-chip { display: none; }
.convo-chip.shake { animation: shake .5s ease; border-color: var(--red); }
.convo-wait { font-size: 22px; color: var(--green); font-weight: 800; }

/* ---------------- song karaoke (topic 3) ---------------- */
.song-line { transition: background .25s ease, color .25s ease, padding .25s ease; border-radius: 8px; }
.song-line.karaoke-on {
  background: var(--yellow);
  color: var(--ink);
  padding-left: 10px; padding-right: 10px;
  box-shadow: 0 2px 8px rgba(255, 204, 0, .45);
}

/* ---------------- responsive v3 ---------------- */
@media (max-width: 720px) {
  .listen-cards { grid-template-columns: 1fr; }
  .pick-stage { flex-direction: column; align-items: center; }
  .pick-frame { width: 100%; }
  .unsc-slot, .unsc-tile { width: 36px; height: 44px; font-size: 19px; }
  .listen-prompt-text { font-size: 23px; }
  .convo-bubble { max-width: 86%; font-size: 16px; }
}

/* ============================================================
   Topic 04 · Los Colores — styles
   Same theme tokens; paint pots, parking lot, splat wall,
   colour quiz, typing card, crossword/ws colour patches.
   ============================================================ */

/* ---------------- game 1 · parking lot painting ---------------- */
.pl-wrap { max-width: 900px; margin: 0 auto; }

.pl-stage {
  position: relative;
  background: linear-gradient(180deg, #BBDEFB 0%, #E3F2FD 34%, #90A4AE 34%, #607D8B 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 54px 16px 18px;
  overflow: hidden;
}
.pl-deco { position: absolute; top: 6px; left: 0; right: 0; height: 34px;
  display: flex; justify-content: space-around; align-items: center;
  font-size: 26px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.pl-deco .pl-sun   { margin-right: auto; margin-left: 4%; }
.pl-deco .pl-cloud { margin-right: auto; }
.pl-deco .pl-tree  { margin-right: 4%; }

.pl-lot {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  position: relative; z-index: 1;
}
.pl-spot {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px 6px 12px;
  background: rgba(255,255,255,.10);
  border: 2px dashed rgba(255,255,255,.38);
  border-radius: 12px;
  min-height: 92px;
  transition: border-color .2s ease, background .2s ease;
}
.pl-spot.active {
  border-color: var(--yellow);
  background: rgba(255,204,0,.14);
  animation: plGlow 1.2s ease-in-out infinite;
}
@keyframes plGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,204,0,.55); }
  50%      { box-shadow: 0 0 0 6px rgba(255,204,0,0); }
}
.pl-num {
  position: absolute; top: 4px; left: 8px;
  font-size: 13px; font-weight: 800; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.22);
  border-radius: 8px; padding: 1px 7px;
}

/* CSS-art car: cab + body + window + wheels */
.pl-car { position: relative; width: 78px; height: 54px; display: block; }
.pl-car-body, .pl-car-cab {
  position: absolute;
  background: #ECEFF1;
  border: 2px dashed #90A4AE;
  transition: background .45s ease, border-color .45s ease;
}
.pl-car-cab { bottom: 28px; left: 15px; right: 15px; height: 18px;
  border-radius: 12px 14px 0 0; }
.pl-car-body { bottom: 10px; left: 3px; right: 3px; height: 26px;
  border-radius: 9px 13px 5px 5px; }
.pl-car-win { position: absolute; bottom: 30px; left: 21px; right: 21px;
  height: 11px; background: #B3E5FC; border-radius: 5px;
  opacity: 0; transition: opacity .45s ease; }
.pl-wheel { position: absolute; bottom: 1px; width: 17px; height: 17px;
  border-radius: 50%; background: #263238;
  box-shadow: inset 0 0 0 3px #37474F, inset 0 0 0 5px #90A4AE; }
.pl-w1 { left: 7px; } .pl-w2 { right: 7px; }

.pl-spot.painted { border-style: solid; border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.16); }
.pl-spot.painted .pl-car-body,
.pl-spot.painted .pl-car-cab {
  background: var(--car-c, #90A4AE);
  border-style: solid;
  border-color: rgba(0,0,0,.28);
}
.pl-spot.painted .pl-car-cab { filter: brightness(.9); }
.pl-spot.painted .pl-car-win { opacity: 1; }

.pl-tick {
  position: absolute; top: -8px; right: -6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  opacity: 0; transform: scale(0);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.pl-spot.painted .pl-tick { opacity: 1; transform: scale(1); }

.pl-prompt {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px; margin-top: 14px;
  font-size: 17px;
}
.pl-prompt-text.pop, .splat-prompt-text.pop, .wq-question-text.pop,
.wq-object.pop, .tc-splat.pop { animation: pop .45s cubic-bezier(.34,1.56,.64,1); }
.q-en { font-size: 13px; font-weight: 600; color: #7A8CA6; }

.pl-pots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 9px; margin-top: 14px;
}
.pl-pot {
  position: relative;
  background: var(--white); border: 2px solid #E1ECF8;
  border-radius: 12px; padding: 8px 6px 7px;
  font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  box-shadow: 0 3px 8px rgba(13,45,90,.10);
}
.pl-pot:hover { transform: translateY(-2px); border-color: var(--blue); }
.pl-pot:active { transform: scale(.96); }
.pl-pot-brush { font-size: 15px; line-height: 1; }
.pl-pot-paint {
  width: 34px; height: 34px; border-radius: 50% 45% 52% 48% / 48% 52% 46% 54%;
  border: 3px solid rgba(0,0,0,.14);
  box-shadow: inset -3px -4px 8px rgba(0,0,0,.22), inset 3px 4px 6px rgba(255,255,255,.35);
}
.pl-pot-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.pl-pot-tick {
  position: absolute; top: -7px; right: -5px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.pl-pot.done { border-color: var(--green); background: #F2FBF2; cursor: default; }
.pl-pot.done .pl-pot-tick { opacity: 1; transform: scale(1); }
.pl-pot.shake { animation: shake .5s ease; border-color: var(--red); }

/* ---------------- game 3 · splat wall ---------------- */
.splat-wrap { max-width: 860px; margin: 0 auto; }
.splat-prompt {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px; margin-bottom: 14px;
  font-size: 18px;
}
.splat-wall {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background:
    radial-gradient(300px 140px at 12% 8%, #FFF3CF 0%, transparent 60%),
    radial-gradient(340px 160px at 92% 92%, #E3F0FC 0%, transparent 60%),
    #FFFDF7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.splat {
  position: relative; aspect-ratio: 1;
  border: none; cursor: pointer;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.5), rgba(255,255,255,0) 42%),
    var(--splat-c, #999);
  box-shadow: inset -5px -7px 12px rgba(0,0,0,.16),
              inset 2px 3px 6px rgba(255,255,255,.25),
              inset 0 0 0 1px rgba(0,0,0,.06),
              0 6px 14px rgba(13,45,90,.16);
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  transition: transform .15s ease;
}
.splat:nth-child(2n)  { border-radius: 58% 42% 47% 53% / 44% 56% 44% 56%; transform: rotate(3deg); }
.splat:nth-child(3n)  { border-radius: 52% 48% 60% 40% / 55% 43% 57% 45%; transform: rotate(-4deg); }
.splat:nth-child(4n)  { transform: rotate(6deg) scale(1.03); }
.splat:nth-child(5n)  { transform: rotate(-7deg) scale(.97); }
.splat:hover { transform: scale(1.06) rotate(0deg); z-index: 2; }
.splat-word {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(12px, 1.8vw, 16px); font-weight: 800;
  color: var(--splat-ink, #fff);
  opacity: 0; transform: scale(.4);
  transition: opacity .2s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
  pointer-events: none;
}
.splat.found { cursor: default; }
.splat.found .splat-word { opacity: 1; transform: scale(1); }
.splat.found::after {
  content: '✓';
  position: absolute; top: 4%; right: 8%;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--green-dark);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.splat.shake { animation: shake .5s ease; }

/* ---------------- game 5 · ¿Qué color? ---------------- */
.wq-wrap { max-width: 720px; margin: 0 auto; }
.wq-stage {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
  text-align: center;
}
.wq-object {
  min-height: 150px;
  display: flex; align-items: center; justify-content: center;
}
.wq-emoji { font-size: clamp(84px, 17vw, 132px); line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(13,45,90,.22)); }
.wq-ball {
  position: relative; display: inline-block;
  width: clamp(110px, 22vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.65), rgba(255,255,255,0) 44%), var(--ball-c, #E53935);
  box-shadow: 0 10px 24px rgba(13,45,90,.25), inset -8px -10px 18px rgba(0,0,0,.16);
  overflow: hidden;
}
.wq-ball-shine { position: absolute; top: 10%; left: 12%;
  width: 30%; height: 22%; background: #fff; opacity: .85;
  border-radius: 50%; transform: rotate(-22deg); }
.wq-ball-stripe { position: absolute; left: -8%; right: -8%; top: 45%;
  height: 13%; background: rgba(255,255,255,.9);
  transform: rotate(-15deg); border-radius: 999px; }
.wq-question {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 8px; font-size: 18px;
}
.wq-question-text strong { color: var(--blue-dark); }
.wq-choices {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 14px;
}
.wq-chip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--white); border: 2.5px solid var(--blue);
  border-radius: 14px; padding: 14px 12px;
  font-family: inherit; font-size: 17px; font-weight: 700; color: var(--blue-dark);
  cursor: pointer; box-shadow: 0 3px 8px rgba(13,45,90,.14);
  transition: transform .12s ease, border-color .12s ease, background .2s ease;
}
.wq-chip:hover { transform: translateY(-2px); background: var(--blue-light); }
.wq-dot { flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.14); box-shadow: inset -2px -3px 5px rgba(0,0,0,.18); }
.wq-chip.done { border-color: var(--green); background: #F2FBF2; color: var(--green-dark); cursor: default; }
.wq-chip.shake { animation: shake .5s ease; border-color: var(--red); }

/* ---------------- game 7 · listen & type ---------------- */
.tc-wrap { max-width: 640px; margin: 0 auto; }
.tc-round {
  text-align: center; font-size: 15px; color: #7A8CA6;
  margin-bottom: 10px;
}
.tc-round strong { color: var(--blue-dark); font-size: 17px; }
.tc-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 20px;
  align-items: center;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.tc-splat {
  width: 128px; height: 128px; justify-self: center;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.5), rgba(255,255,255,0) 42%),
    var(--splat-c, #999);
  box-shadow: inset -5px -7px 12px rgba(0,0,0,.16), 0 8px 18px rgba(13,45,90,.18);
  position: relative;
}
.tc-splat.painted::after {
  content: '✓';
  position: absolute; top: -8px; right: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.22);
}
.tc-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tc-right .chip-speak { font-size: 18px; }
.tc-input-row { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.tc-input {
  flex: 1; min-width: 150px;
  font-family: inherit; font-size: 20px; font-weight: 700;
  color: var(--ink); text-align: center;
  border: 2.5px solid #C4DBF3; border-radius: 12px;
  padding: 11px 12px; outline: none;
  background: var(--paper);
  transition: border-color .12s ease, background .12s ease;
}
.tc-input:focus { border-color: var(--blue); background: #FFF6D6; }
.tc-input.done { border-color: var(--green); background: #F2FBF2; color: var(--green-dark); }
.tc-input.wrong { animation: shake .5s ease; border-color: var(--red); }
.tc-check { padding: 11px 18px; font-size: 16px; }
.tc-hint {
  background: #FFF8E1; border: 2px solid var(--yellow);
  border-radius: 12px; padding: 8px 12px;
  font-size: 15px; color: var(--ink);
}

/* ---------------- crossword 4 + wordsearch 4 shared bits ---------------- */
.cw-clue-patch, .ws-patch {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #CFD8DC;
  box-shadow: inset -2px -3px 5px rgba(0,0,0,.18), inset 1px 2px 3px rgba(255,255,255,.4);
}
.ws-patch { width: 18px; height: 18px; }
.cw-dice { font-size: 15px; }
.ws4-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ws4-rounds { display: flex; gap: 8px; flex-wrap: wrap; }
.ws4-count {
  margin-left: auto;
  font-weight: 800; font-size: 14px; color: var(--blue-dark);
  background: var(--blue-light);
  padding: 7px 14px; border-radius: 999px;
}
.ws-clue.done .ws-word { text-decoration: line-through; opacity: .6; }
.ws4-wrap .ws-grid { gap: 3px; }
.ws4-wrap .ws-cell { font-size: 14px; border-radius: 7px; }

/* ---------------- responsive + motion ---------------- */
@media (max-width: 680px) {
  .pl-lot { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .pl-spot { min-height: 84px; }
  .pl-car { width: 64px; height: 48px; }
  .pl-car-cab { left: 12px; right: 12px; bottom: 25px; height: 16px; }
  .pl-car-body { bottom: 9px; height: 23px; }
  .pl-car-win { bottom: 27px; height: 9px; left: 18px; right: 18px; }
  .splat-wall { grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px; }
  .wq-choices { grid-template-columns: 1fr; }
  .tc-card { grid-template-columns: 1fr; justify-items: center; }
  .tc-right { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-spot.active, .pl-car, .splat, .wq-object.pop, .tc-splat.pop { animation: none; transition: none; }
}

/* ============================================================
   Topic 05 — Mis cosas
   1 explore room · 2 frog pond · 4 word search 10×10
   5 carnival shooter · 6 typed blanks
   ============================================================ */

/* ---------- 1. Mi habitación (explore + quiz) ---------- */

.th-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 1fr);
  gap: 16px;
  align-items: start;
}

.th-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.th-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}
.th-title .q-en { display: block; font-size: .78rem; font-weight: 400; }

.th-quiz-btn { font-size: .95rem; padding: 10px 16px; }
.th-quiz-btn:disabled { opacity: .75; cursor: default; }
.th-quiz-btn.th-quiz-on {
  animation: th-glow 1.6s ease-in-out infinite alternate;
}
@keyframes th-glow {
  from { box-shadow: 0 4px 14px rgba(13, 45, 90, .14); }
  to   { box-shadow: 0 0 0 6px rgba(255, 204, 0, .35); }
}

.th-room {
  position: relative;
  height: 430px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(#FFF6E3 0 62%, #F5E3C3 62% 100%);
  box-shadow: var(--shadow);
  border: 3px solid #E8D3AC;
}

.th-wall {
  position: absolute; inset: 0 0 38% 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.03) 0 2px, transparent 2px 56px),
    linear-gradient(#FFF6E3, #FDF0D5);
}
.th-floor {
  position: absolute; inset: 62% 0 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(146,104,52,.16) 0 3px, transparent 3px 64px),
    linear-gradient(#EACD9C, #DDbA82);
}
.th-window {
  position: absolute; left: 8%; top: 8%;
  width: 120px; height: 92px;
  background: linear-gradient(160deg, #9FD8FF, #D8F1FF 70%);
  border: 7px solid #FFF;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(13,45,90,.16);
}
.th-sun { position: absolute; right: 8px; top: 6px; font-size: 30px; }

.th-shelf {
  position: absolute; left: 42%; width: 46%; height: 10px;
  background: linear-gradient(#B77B44, #96613B);
  background: linear-gradient(#B77B44, #96613B);
  border-radius: 4px;
  box-shadow: 0 3px 6px rgba(90,55,20,.25);
}
.th-shelf-1 { top: 34%; }
.th-shelf-2 { top: 52%; }

.th-desk {
  position: absolute; left: 56%; top: 52%; width: 34%; height: 12px;
  background: linear-gradient(#C98A4B, #A96B33);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(90,55,20,.22);
}
.th-desk::after {
  content: '';
  position: absolute; left: 6%; right: 6%; top: 12px; bottom: -58px;
  background: linear-gradient(90deg,
    #A96B33 0 8%, transparent 8% 86%, #A96B33 86% 100%);
}
.th-cup { position: absolute; left: 70%; top: 43%; font-size: 26px; }

.th-rug {
  position: absolute; left: 30%; top: 74%; width: 56%; height: 20%;
  background: radial-gradient(closest-side, #F4B8C4 0 62%, #E897A8 62% 78%, #F4B8C4 78%);
  border-radius: 50%;
  opacity: .9;
}
.th-rob { position: absolute; left: 4%; top: 40%; font-size: 44px; }

.th-item {
  position: absolute;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  line-height: 1;
  border-radius: 12px;
}
.th-item-emoji {
  display: inline-block;
  font-size: 42px;
  filter: drop-shadow(0 3px 3px rgba(90,55,20,.3));
  transition: transform .15s ease;
}
.th-item:hover .th-item-emoji { transform: scale(1.12) rotate(-4deg); }
.th-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.th-item.th-pop .th-item-emoji { animation: th-pop .55s ease; }
@keyframes th-pop {
  30% { transform: scale(1.35) rotate(6deg); }
  60% { transform: scale(.94) rotate(-3deg); }
}

/* heard dot + quiz star */
.th-dot {
  position: absolute; right: -2px; top: -2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  opacity: 0; transform: scale(0);
  transition: transform .25s ease, opacity .25s ease;
}
.th-item.heard .th-dot { opacity: 1; transform: scale(1); }

.th-star {
  position: absolute; left: -8px; top: -14px;
  font-size: 22px;
  opacity: 0; transform: scale(0) rotate(-40deg);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
}
.th-item.starred .th-star { opacity: 1; transform: scale(1) rotate(0deg); }
.th-item.starred .th-item-emoji { filter: drop-shadow(0 0 8px rgba(255,193,7,.8)); }

.th-item.th-shake { animation: th-shake .5s ease; }
@keyframes th-shake {
  20%, 60% { transform: translate(-50%, -50%) translateX(-7px); }
  40%, 80% { transform: translate(-50%, -50%) translateX(7px); }
}

.th-bubble {
  position: absolute;
  left: 50%; top: 8px;
  transform: translateX(-50%);
  background: #fff;
  border: 3px solid var(--yellow);
  border-radius: 14px;
  padding: 7px 14px;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  z-index: 5;
  white-space: nowrap;
  animation: th-bubble-in .25s ease;
}
.th-bubble .q-en { margin-left: 8px; font-size: .8rem; }
.th-bubble.hidden { display: none; }
@keyframes th-bubble-in {
  from { transform: translateX(-50%) scale(.6); opacity: 0; }
}

/* word list */
.th-list {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 10px;
}
.th-title-list { margin-bottom: 8px; }
.th-list ul { list-style: none; margin: 0; padding: 0; }
.th-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px dashed #E3EDF7;
  font-size: .98rem;
}
.th-row:last-child { border-bottom: none; }
.th-row-emoji { font-size: 22px; width: 26px; text-align: center; }
.th-row-es { flex: 1; min-width: 0; }
.th-row-es .q-en { font-size: .75rem; }
.th-row-check {
  color: var(--green);
  font-weight: 700;
  opacity: 0; transform: scale(0);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s;
}
.th-row.heard .th-row-check { opacity: 1; transform: scale(1); }
.th-row.heard .th-row-es { color: var(--green-dark); }

/* ---------- 2. ¡Salta! (frog pond) ---------- */

.salta-stage { display: grid; gap: 12px; }

.salta-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
}
.salta-say { width: 44px; height: 44px; font-size: 22px; flex: none; }
.salta-prompt-text { flex: 1; min-width: 0; font-size: 1.02rem; }
.salta-prompt-text .q-en { display: block; font-size: .78rem; font-weight: 400; }
.salta-round {
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--blue-light);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

.salta-pond {
  position: relative;
  height: 470px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(140px 60px at 20% 90%, rgba(255,255,255,.25), transparent 70%),
    radial-gradient(180px 70px at 75% 15%, rgba(255,255,255,.22), transparent 70%),
    linear-gradient(180deg, #7ED4F0 0%, #4FA8DC 55%, #3E8FC9 100%);
  box-shadow: var(--shadow-lg);
  border: 4px solid #2F7AB3;
  cursor: pointer;
}

.salta-grass {
  position: absolute; left: 0; right: 0; height: 26px;
  background: repeating-linear-gradient(90deg, #58B24A 0 26px, #4CA23F 26px 52px);
}
.salta-grass-t { top: 0; clip-path: polygon(0 0, 100% 0, 100% 55%, 0 100%); }
.salta-grass-b { bottom: 0; clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 100%); }

.salta-bank {
  position: absolute; left: -4%; top: 38%;
  width: 17%; height: 17%;
  background: linear-gradient(#8D6E63, #6D4C41);
  border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
  box-shadow: 0 6px 10px rgba(20,40,60,.3);
}

.salta-pad {
  position: absolute;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.salta-lily {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 30%, #6FCF6F, #3E9E4E 70%);
  border-radius: 50%;
  clip-path: polygon(0 0, 62% 0, 38% 34%, 0 100%);
  box-shadow: 0 5px 10px rgba(10,50,80,.35), inset 0 0 0 4px rgba(255,255,255,.14);
}
.salta-pad .salta-word {
  position: relative;
  display: inline-block;
  min-width: 86px;
  padding: 9px 13px;
  background: rgba(255,255,255,.94);
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(10,50,80,.3);
}
.salta-pad:hover .salta-word { background: #FFF3C4; }
.salta-pad:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 12px; }

.salta-ripple {
  position: absolute; inset: -14px;
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.salta-ripple.go { animation: salta-ripple .8s ease-out; }
@keyframes salta-ripple {
  from { opacity: .9; transform: scale(.5); }
  to   { opacity: 0;  transform: scale(1.5); }
}

.salta-pad.right .salta-word { background: #C8F3C4; color: var(--green-dark); }
.salta-pad.wobble { animation: salta-wobble .5s ease; }
@keyframes salta-wobble {
  25% { transform: translate(-50%, -50%) rotate(-6deg); }
  75% { transform: translate(-50%, -50%) rotate(6deg); }
}

.salta-frog {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 52px;
  z-index: 3;
  transition: left .75s cubic-bezier(.45,.05,.45,1), top .75s cubic-bezier(.45,.05,.45,1);
  filter: drop-shadow(0 5px 5px rgba(10,50,80,.4));
  pointer-events: none;
}
.salta-frog.salta-hop { animation: salta-hop .75s ease; }
@keyframes salta-hop {
  45% { margin-top: -56px; }
  70% { margin-top: 4px; }
}

.salta-speech {
  position: absolute;
  left: 12%; top: 12%;
  background: #fff;
  border: 3px solid var(--yellow);
  border-radius: 14px;
  padding: 7px 14px;
  font-weight: 700;
  z-index: 4;
  box-shadow: var(--shadow);
  animation: th-bubble-in .25s ease;
}
.salta-speech.hidden { display: none; }

/* ---------- 4. word search 10×10 (shares ws-* with t2/t4) ---------- */

.ws5-emoji { font-size: 20px; width: 24px; text-align: center; flex: none; }
.ws4-wrap .ws-clue { gap: 8px; }

/* ---------- 5. Dispara (carnival shooter) ---------- */

.shoot-stage { display: grid; gap: 0; }

.shoot-awning {
  position: relative;
  height: 34px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: repeating-linear-gradient(90deg, #E53935 0 26px, #fff 26px 52px);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.12);
}
.shoot-lights {
  position: absolute; left: 0; right: 0; bottom: -9px; height: 18px;
  background: radial-gradient(circle at 10px 0, #FFD54F 5px, transparent 6px) repeat-x;
  background-size: 30px 18px;
}

.shoot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 6px;
  background: linear-gradient(#FFF7E0, #FFF);
}
.shoot-title { margin: 0; font-size: 1.12rem; }
.shoot-title .q-en { display: block; font-size: .78rem; font-weight: 400; }

.shoot-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 64px;
  margin: 0 16px;
  padding: 10px 16px;
  background: #17325C;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  transition: background .3s ease;
}
.shoot-sign.solved { background: var(--green-dark); }
.shoot-sign.miss { animation: shoot-miss .45s ease; }
@keyframes shoot-miss {
  25%, 75% { transform: translateX(-7px) rotate(-1deg); }
  50%      { transform: translateX(7px) rotate(1deg); }
}
.shoot-part { white-space: pre; }

.shoot-slot {
  display: inline-block;
  min-width: 4ch;
  padding: 1px 10px;
  border-bottom: 4px dashed #FFCC00;
  color: #FFD54F;
  text-align: center;
  white-space: pre;
  transition: color .2s ease;
}
.shoot-slot.filled { border-bottom-style: solid; color: #C8F3C4; }

.shoot-sky {
  position: relative;
  height: 320px;
  margin: 12px 16px 0;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(90px 40px at 85% 18%, rgba(255,255,255,.5), transparent 70%),
    linear-gradient(#BFE7FF, #E8F6FF 70%, #DFF3E3 70% 100%);
  border: 3px solid #CDE3F2;
  cursor: crosshair;
  box-shadow: var(--shadow);
}

.shoot-balloon {
  position: absolute;
  left: 100%;
  width: var(--size, 76px);
  height: calc(var(--size, 76px) * 1.18);
  background: none;
  border: none;
  padding: 0;
  cursor: crosshair;
  animation: shoot-drift var(--dur, 11s) linear forwards;
  z-index: 2;
}
@keyframes shoot-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100vw - 200px)); }
}

.shoot-balloon-body {
  position: absolute; inset: 0 0 14% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 26%,
    hsl(var(--hue, 200), 85%, 78%),
    hsl(var(--hue, 200), 78%, 52%) 68%);
  border-radius: 50% 50% 48% 52% / 55% 55% 45% 45%;
  box-shadow: inset -4px -6px 10px rgba(0,0,0,.16), 0 4px 8px rgba(20,40,60,.18);
}
.shoot-balloon-body::after {
  content: '';
  position: absolute; bottom: -7px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: 9px solid hsl(var(--hue, 200), 70%, 45%);
}
.shoot-word {
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shoot-string {
  position: absolute;
  bottom: -8%; left: 50%;
  width: 2px; height: 16%;
  background: rgba(90,60,30,.55);
  transform: translateX(-50%);
}

.shoot-balloon.popped { animation-play-state: paused; pointer-events: none; }
.shoot-balloon.popped .shoot-balloon-body {
  animation: shoot-burst .45s ease forwards;
}
@keyframes shoot-burst {
  40% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(.1); opacity: 0; }
}
.shoot-balloon.popped .shoot-word { opacity: 0; }

.shoot-counter {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--blue-dark);
}

/* ---------- 6. Escribe (typed blanks) ---------- */

.write-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-light);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: .95rem;
}
.write-hint-badge { font-size: 22px; }
.write-hint-text .q-en { display: block; font-size: .78rem; font-weight: 400; }

.write-row { flex-wrap: wrap; row-gap: 6px; }
.write-sentence {
  flex: 1;
  min-width: 200px;
  font-size: 1.18rem;
  line-height: 2;
}
.write-input {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  border: none;
  border-bottom: 3px dashed var(--blue);
  background: #F2F8FF;
  border-radius: 6px 6px 0 0;
  padding: 2px 8px;
  margin: 0 2px;
  text-align: center;
  min-width: 0;
}
.write-input:focus { outline: none; background: #FFF6D6; }
.write-row.done .write-sentence { color: var(--green-dark); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .th-layout { grid-template-columns: 1fr; }
  .th-room { height: 380px; }
  .salta-pond { height: 430px; }
  .salta-pad .salta-word { min-width: 70px; font-size: .84rem; padding: 7px 10px; }
  .shoot-sign { font-size: 1.15rem; }
  .shoot-sky { height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .th-item.th-pop .th-item-emoji, .th-quiz-btn.th-quiz-on,
  .salta-frog.salta-hop, .salta-ripple.go, .salta-pad.wobble,
  .shoot-balloon, .shoot-balloon.popped .shoot-balloon-body,
  .th-item.th-shake, .shoot-sign.miss { animation: none; transition: none; }
}

/* song echo lines (call-and-response, Topic 05) */
.song-echo { color: #6B7FA3; font-size: .92em; }

/* ============================================================
   TOPIC 06 — Números 1-10 (Numbers 1-10)
   1 drag words→digits · 2 song+quiz · 3 count & choose
   4 beat-the-clock · 5 tic-tac-toe · 6 type the numbers
   Same tokens & visual language as Topics 1–5.
   ============================================================ */

/* ---------------- 1. Arrastra los números ---------------- */
.dn-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}
.dn-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  background: var(--white);
  border: 2px solid #D7E6F7;
  border-radius: var(--radius);
  padding: 12px 8px 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dn-card.drop-hover { border-color: var(--yellow); box-shadow: 0 0 0 4px #FFCC0055; transform: scale(1.04); }
.dn-card.done { border-color: var(--green); background: #EAF7EC; cursor: default; }
.dn-digit {
  font-size: 2.1rem; font-weight: 800; line-height: 1;
  color: var(--blue);
  text-shadow: 0 2px 0 #FFFFFF88;
}
.dn-dots {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px; max-width: 110px; min-height: 12px;
}
.dn-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow) 0%, #FFB300 100%);
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.18);
}
.dn-slot {
  width: 100%; min-height: 40px;
  border: 2px dashed #B9CFE8; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #F6FAFF;
}
.dn-slot .hint { font-size: .62rem; letter-spacing: .08em; color: #8FA9C9; font-weight: 700; }
.dn-chip {
  min-width: 84px;
  justify-content: center;
  font-size: 1.05rem;
  padding: 9px 14px;
}
.dn-chip.placed { cursor: default; margin: 2px; }

/* ---------------- 3. ¿Cuántos? ¿Cuántas? ---------------- */
.cq-wrap { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cq-bank-hint {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--blue-light);
  border-radius: 12px; padding: 10px 14px;
  font-size: .95rem; color: var(--ink);
}
.cq-bank-hint .q-en { display: block; width: 100%; color: #5A708F; font-size: .8rem; }
.cq-bank {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: var(--white); border: 2px solid #D7E6F7;
  border-radius: var(--radius); padding: 10px 12px;
  position: sticky; top: 8px; z-index: 5;
  box-shadow: var(--shadow);
}
.cq-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--white);
  border: 2px solid #B9CFE8; border-radius: 999px;
  padding: 7px 14px 7px 8px;
  font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cq-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cq-chip .cq-chip-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: .8rem;
}
.cq-chip.selected { border-color: var(--yellow); box-shadow: 0 0 0 4px #FFCC0066; background: #FFF9E3; }
.cq-chip.used { opacity: .38; text-decoration: line-through; cursor: default; transform: none; box-shadow: none; }
.cq-board {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.cq-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--white); border: 2px solid #D7E6F7;
  border-radius: var(--radius); padding: 30px 12px 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cq-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cq-card.pick-target { border-color: var(--yellow); box-shadow: 0 0 0 4px #FFCC0066; }
.cq-card.done { border-color: var(--green); background: #EAF7EC; cursor: default; }
.cq-speak { position: absolute; top: 8px; right: 8px; }
.cq-scene {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  min-height: 58px; align-content: center;
  background: #F6FAFF; border-radius: 12px; padding: 8px;
}
.cq-obj { font-size: 1.5rem; line-height: 1; }
.cq-q { font-size: .98rem; line-height: 1.3; }
.cq-how { color: var(--blue-dark); }
.cq-answer { font-size: 1.05rem; font-weight: 700; color: #5A708F; }
.cq-gap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; padding: 2px 10px;
  border-bottom: 3px solid #B9CFE8;
  color: #B9CFE8; font-weight: 800;
}
.cq-gap.filled { color: var(--green-dark); border-color: var(--green); }

/* ---------------- 4. Presiona el botón (beat the clock) ---------------- */
.bt-wrap {
  position: relative;
  max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.bt-top { display: flex; justify-content: space-between; gap: 10px; }
.bt-score-chip, .bt-clock-chip {
  background: var(--white); border-radius: 999px;
  padding: 8px 18px; font-size: 1.15rem; font-weight: 800;
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px;
}
.bt-clock-chip b { color: var(--blue-dark); min-width: 2ch; text-align: center; }
.bt-timer-track {
  height: 12px; border-radius: 999px; background: #D7E6F7; overflow: hidden;
}
.bt-timer-fill {
  height: 100%; width: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 0%, var(--yellow) 70%, var(--red) 100%);
  transition: width .12s linear;
}
.bt-screen {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-lg);
  transition: background .2s ease;
}
.bt-screen.bt-good { background: linear-gradient(180deg, #2E9E44 0%, #1B5E20 100%); }
.bt-screen.bt-bad  { background: linear-gradient(180deg, #D84343 0%, #8E1B1B 100%); }
.bt-screen.bt-over { background: linear-gradient(180deg, #455A64 0%, #263238 100%); }
.bt-repeat {
  width: 58px; height: 58px; border-radius: 50%;
  border: 3px solid #FFFFFFAA; background: #FFFFFF22;
  font-size: 1.5rem; cursor: pointer; color: #fff;
  transition: transform .12s ease;
}
.bt-repeat:hover { transform: scale(1.08); }
.bt-prompt { color: #fff; font-size: 1.3rem; font-weight: 800; text-shadow: 0 2px 3px rgba(0,0,0,.3); }
.bt-buttons {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.bt-btn {
  aspect-ratio: 1 / 1;
  border: none; border-radius: var(--radius);
  background: linear-gradient(180deg, #FFFFFF 0%, #EAF2FC 100%);
  box-shadow: 0 4px 0 #B9CFE8, var(--shadow);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .2s ease;
}
.bt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #B9CFE8; }
.bt-btn-n { font-size: 1.9rem; font-weight: 800; color: var(--blue-dark); }
.bt-btn.bt-hit  { background: linear-gradient(180deg, #66BB6A 0%, #2E9E44 100%); }
.bt-btn.bt-hit .bt-btn-n { color: #fff; }
.bt-btn.bt-miss { animation: bt-shake .35s ease; background: #F8D7DA; }
.bt-btn.bt-miss .bt-btn-n { color: var(--red); }
@keyframes bt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); }
}
.bt-start-overlay {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center;
  background: rgba(242, 247, 252, .82); border-radius: var(--radius);
  backdrop-filter: blur(3px);
}
.bt-start-card {
  text-align: center; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px 34px; max-width: 400px;
}
.bt-start-emoji { font-size: 3rem; }
.bt-start-card h2 { margin: 6px 0 8px; color: var(--blue-dark); }
.bt-start-card p { margin: 0 0 16px; color: #45607F; line-height: 1.45; }

/* ---------------- 5. Tres en raya ---------------- */
.ttt-wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.ttt-scorebar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--white); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow);
}
.ttt-player { font-weight: 800; font-size: .98rem; }
.ttt-player b { font-size: 1.1rem; }
.ttt-you { color: var(--red); }
.ttt-cpu { color: var(--blue-dark); }
.ttt-status { font-size: .92rem; color: #5A708F; text-align: center; flex: 1; }
.ttt-board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.ttt-board.ttt-lock { pointer-events: none; }
.ttt-cell {
  position: relative; aspect-ratio: 1 / 1;
  border: 2px solid #D7E6F7; border-radius: var(--radius);
  background: var(--white); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ttt-cell:hover:not(.taken) { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--yellow); }
.ttt-cell.taken { cursor: default; background: #F6FAFF; }
.ttt-mark { font-size: 2rem; line-height: 1; min-height: 2rem; }
.ttt-num {
  position: absolute; top: 6px; left: 8px;
  font-size: .8rem; font-weight: 800; color: #B9CFE8;
}
.ttt-word { font-size: .95rem; font-weight: 800; color: var(--green-dark); }
.ttt-cell.ttt-win { border-color: var(--yellow); background: #FFF9E3; box-shadow: 0 0 0 4px #FFCC0066; }
.ttt-ask {
  background: var(--white); border: 2px solid #D7E6F7;
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
}
.ttt-ask-head { display: flex; align-items: center; gap: 12px; }
.ttt-hear {
  width: 46px; height: 46px; font-size: 1.3rem; border-radius: 50%;
  border: none; background: var(--blue-light); cursor: pointer;
  transition: transform .12s ease;
}
.ttt-hear:hover { transform: scale(1.1); }
.ttt-ask-text { font-weight: 800; }
.ttt-ask-text .q-en { display: block; font-size: .8rem; color: #5A708F; font-weight: 400; }
.ttt-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ttt-chip { font-size: 1.02rem; padding: 9px 18px; }
.ttt-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ttt-games { font-size: .88rem; color: #5A708F; }

/* ---------------- 6. Escribe los números ---------------- */
.wn-panel { max-width: 560px; }
.wn-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
}
.wn-digit {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  border-radius: 12px; font-size: 1.35rem; font-weight: 800;
}
.wn-dots {
  display: flex; flex-wrap: wrap; gap: 3px;
  width: 96px; min-width: 96px; align-content: center;
}
.wn-row .dn-dot { width: 9px; height: 9px; }
.wn-input { flex: 1; min-width: 90px; }
.wn-hint {
  min-width: 56px; font-weight: 800; color: var(--blue-dark);
  font-size: .95rem; visibility: hidden;
}
.wn-hint.show { visibility: visible; }
.wn-row.done .wn-hint { color: var(--green-dark); }

/* ---------------- 2. song quiz extension ---------------- */
.song-quiz-btn {
  margin-top: 12px;
  align-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--ink);
  border: none; border-radius: 999px;
  padding: 10px 22px; font-family: var(--font); font-size: 1.05rem; font-weight: 800;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.song-quiz-btn:hover { transform: scale(1.05); }
.song-quiz-btn.pulse { animation: songquiz-pulse 1.1s ease infinite; }
@keyframes songquiz-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #FFCC0099; }
  50% { box-shadow: 0 0 0 12px #FFCC0000; }
}
.song-quiz { animation: fadeIn .25s ease; }
.song-quiz-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.song-quiz-head h2 { margin: 4px 0 10px; color: var(--blue-dark); }
.song-quiz-body {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--white); border: 2px solid #D7E6F7;
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.song-quiz-round { font-size: .85rem; font-weight: 800; color: #8FA9C9; letter-spacing: .06em; }
.song-quiz-scene {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  max-width: 460px; min-height: 60px; align-content: center;
  background: #F6FAFF; border-radius: 12px; padding: 12px;
}
.song-quiz-obj { font-size: 1.7rem; line-height: 1; }
.song-quiz-q { font-size: 1.1rem; font-weight: 800; text-align: center; }
.song-quiz-q .q-en { display: block; font-size: .82rem; color: #5A708F; font-weight: 400; }
.song-quiz-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.song-quiz-chip { font-size: 1.05rem; padding: 9px 20px; }
.song-quiz-chip.song-quiz-hit { border-color: var(--green); background: #EAF7EC; }
.song-quiz-chip.song-quiz-miss { border-color: var(--red); background: #F8D7DA; }
.song-quiz-done { text-align: center; font-size: 1.1rem; font-weight: 700; }
.song-quiz-done-emoji { font-size: 3rem; }

/* ---------------- responsive ---------------- */
@media (max-width: 760px) {
  .bt-buttons { grid-template-columns: repeat(4, 1fr); }
  .bt-prompt { font-size: 1.05rem; }
  .cq-board { grid-template-columns: 1fr 1fr; }
  .ttt-mark { font-size: 1.6rem; }
  .ttt-scorebar { flex-wrap: wrap; }
  .ttt-status { order: 3; width: 100%; }
  .wn-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .song-quiz-btn.pulse, .bt-btn.bt-miss { animation: none; }
  .bt-timer-fill { transition: none; }
}

/* ============================================================
   Topic 07 · Números 11-20 — styles
   (suma · countthings · ski · math · song-quiz dense)
   ============================================================ */

/* ---------------- 3. Suma los números ---------------- */
.suma-wrap { max-width: 620px; margin: 0 auto; display: grid; gap: 16px; }
.suma-screen {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  min-height: 132px; padding: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #EAF3FD 100%);
  border: 3px solid var(--blue-light); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .25s, background .25s;
}
.suma-screen.suma-good { border-color: var(--green); background: #EDFAEE; }
.suma-screen.suma-bad  { border-color: var(--red);   background: #FDEDED; }
.suma-prompt { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.suma-word { font-size: 1.5rem; font-weight: 800; color: var(--blue-dark); }
.suma-choices { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.suma-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 18px; font-family: var(--font);
  font-size: 1.5rem; font-weight: 800; color: var(--ink);
  background: var(--white); border: 3px solid var(--blue-light);
  border-radius: 14px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, background .15s;
}
.suma-btn:hover { transform: translateY(-2px); border-color: var(--blue); }
.suma-plus { color: var(--blue); font-size: 1.1rem; }
.suma-btn.suma-hit { border-color: var(--green); background: #EAF7EC; color: var(--green-dark); }
.suma-btn.suma-miss { border-color: var(--red); background: #F8D7DA; }
.suma-btn.wrong-shake { animation: shake .5s ease; }

/* ---------------- 5. Cuenta cada cosa ---------------- */
.ct-wrap { max-width: 640px; margin: 0 auto; }
.ct-top { display: flex; align-items: center; justify-content: space-between; }
.ct-round { font-size: 1.05rem; font-weight: 800; color: #5A708F; }
.ct-round strong { color: var(--blue-dark); font-size: 1.3rem; }
.ct-q { font-size: 1.1rem; font-weight: 800; text-align: center; color: var(--ink); }
.ct-q .q-en { display: block; font-size: .82rem; color: #5A708F; font-weight: 400; }
.ct-field {
  position: relative; height: 230px; margin: 12px 0; overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, #FFFFFF 0 26px, transparent 27px),
    radial-gradient(circle at 80% 20%, #FFFFFF 0 20px, transparent 21px),
    linear-gradient(180deg, #DCF0FF 0%, #F3FAFF 58%, #E8F6E8 58%, #F7FCF7 100%);
  border: 3px solid var(--blue-light); border-radius: var(--radius);
}
.ct-obj {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 1.9rem; line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(13,45,90,.25));
  user-select: none;
}
.ct-obj-sm { font-size: 1.55rem; }
.ct-field.ct-party .ct-obj { animation: ct-hop .5s ease infinite alternate; }
@keyframes ct-hop { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -62%) scale(1.12); } }
.ct-answer { display: flex; gap: 10px; align-items: stretch; }
.ct-input { flex: 1; font-size: 1.25rem; text-align: center; }
.ct-input.wrong { border-color: var(--red); background: #FDEDED; }
.ct-hint {
  min-height: 22px; text-align: center; font-weight: 800;
  color: var(--blue-dark); font-size: 1rem; opacity: 0; transition: opacity .3s;
}
.ct-hint.show { opacity: 1; }

/* ---------------- 6. ¡Vamos a esquiar! ---------------- */
.ski-wrap { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.ski-hill {
  position: relative; height: 250px; overflow: hidden;
  background: linear-gradient(180deg, #8FC7F5 0%, #BFE2FA 34%, #F4FBFF 34.5%, #FFFFFF 100%);
  border-radius: var(--radius); border: 3px solid var(--blue-light);
}
.ski-sun { position: absolute; top: 8px; right: 18px; font-size: 2rem; }
.ski-lodge { position: absolute; top: 6px; left: 12px; font-size: 1.7rem; }
.ski-pine { position: absolute; bottom: 46px; font-size: 1.6rem; }
.ski-pine.p1 { left: 6%; } .ski-pine.p2 { left: 47%; font-size: 1.25rem; } .ski-pine.p3 { right: 7%; }
.ski-trail {
  position: absolute; left: 0; right: 0; top: 34%; bottom: 0;
  background: linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,.55) 46% 56%, transparent 56%);
}
.ski-trail.ski-bump { animation: none; }
.ski-gate-flag {
  position: absolute; bottom: 4%; transform: translateX(-50%);
  font-size: 1.15rem; opacity: .85;
}
.ski-skier {
  position: absolute; left: 4%; top: 12%;
  font-size: 2rem; transform: translateX(-50%);
  transition: left .45s ease, top .45s ease;
  filter: drop-shadow(0 3px 3px rgba(13,45,90,.3));
  z-index: 2;
}
.ski-skier.ski-wave { animation: ct-hop .45s ease infinite alternate; }
.ski-spray {
  position: absolute; left: 4%; top: 12%; transform: translate(-50%, -20%);
  font-size: 1.4rem; opacity: 0; pointer-events: none; z-index: 1;
}
.ski-spray.show { opacity: 1; animation: ski-poof .5s ease; }
.ski-spray::after { content: '❄️'; position: absolute; left: 14px; top: -8px; font-size: 1rem; }
.ski-spray.ski-puff::after { content: '💨'; }
@keyframes ski-poof {
  0% { transform: translate(-50%, -20%) scale(.5); }
  60% { transform: translate(-50%, -70%) scale(1.15); }
  100% { transform: translate(-50%, -20%) scale(.9); }
}
.ski-sign {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: var(--ink); font-weight: 800;
  padding: 5px 16px; border-radius: 999px; font-size: .95rem;
  border: 2px solid #E0A800; box-shadow: var(--shadow);
}
.ski-prompt-row {
  display: flex; align-items: center; gap: 12px; justify-content: center;
}
.ski-prompt { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.ski-gates { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.ski-gate {
  width: 84px; height: 74px; font-family: var(--font); cursor: pointer;
  background: var(--white); border: 3px solid var(--blue-light);
  border-radius: 12px 12px 4px 4px; box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, border-color .15s, background .15s;
  position: relative;
}
.ski-gate::before {
  content: ''; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 16px solid var(--red);
}
.ski-gate:hover { transform: translateY(-2px); border-color: var(--blue); }
.ski-gate-n { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.ski-gate.ski-hit { border-color: var(--green); background: #EAF7EC; }
.ski-gate.ski-hit::before { border-bottom-color: var(--green); }
.ski-gate.ski-miss { border-color: var(--red); background: #F8D7DA; }
.ski-gate.wrong-shake { animation: shake .5s ease; }

/* ---------------- 7. Juego matemático ---------------- */
.math-wrap { max-width: 620px; margin: 0 auto; display: grid; gap: 16px; }
.math-screen {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  min-height: 148px; padding: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7DC 100%);
  border: 3px solid #F5E6A8; border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .25s, background .25s;
}
.math-screen.math-good { border-color: var(--green); background: #EDFAEE; }
.math-screen.math-bad  { border-color: var(--red);   background: #FDEDED; }
.math-equation {
  display: flex; align-items: center; gap: 14px;
  font-size: 2.6rem; font-weight: 800; color: var(--ink);
}
.math-op { color: var(--blue); }
.math-q {
  min-width: 64px; text-align: center; color: var(--blue-dark);
  background: var(--blue-light); border-radius: 12px; padding: 0 10px;
}
.math-q-done { color: var(--green-dark); background: #EAF7EC; }
.math-words {
  font-size: 1.05rem; font-weight: 800; color: #5A708F;
  letter-spacing: .4px;
}
.math-choices { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.math-btn {
  width: 108px; padding: 10px 0 8px; font-family: var(--font); cursor: pointer;
  background: var(--white); border: 3px solid #F5E6A8;
  border-radius: 14px; box-shadow: var(--shadow);
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .15s, border-color .15s, background .15s;
}
.math-btn:hover { transform: translateY(-2px); border-color: var(--yellow); }
.math-n { font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.math-w { font-size: .85rem; font-weight: 700; color: #5A708F; }
.math-btn.math-hit { border-color: var(--green); background: #EAF7EC; }
.math-btn.math-hit .math-n { color: var(--green-dark); }
.math-btn.math-miss { border-color: var(--red); background: #F8D7DA; }
.math-btn.wrong-shake { animation: shake .5s ease; }

/* ---------------- song quiz: dense scenes for 11-20 ---------------- */
.song-quiz-scene.dense { max-width: 520px; }
.song-quiz-scene.dense .song-quiz-obj { font-size: 1.3rem; }

@media (max-width: 560px) {
  .suma-btn { font-size: 1.2rem; padding: 11px 13px; }
  .ct-field { height: 200px; }
  .ct-obj { font-size: 1.55rem; }
  .ct-obj-sm { font-size: 1.3rem; }
  .ski-hill { height: 210px; }
  .ski-gate { width: 70px; height: 62px; }
  .ski-gate-n { font-size: 1.4rem; }
  .math-equation { font-size: 2rem; gap: 10px; }
  .math-btn { width: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-field.ct-party .ct-obj, .ski-skier.ski-wave, .ski-spray.show { animation: none; }
}

/* ============================================================
   Topic 08 · ¿Cuántos años tienes? — age, memory, drag-answers,
   Tetris  (age-*, mem-*, da-*, tet-*)
   ============================================================ */

/* ---------- 1. age: birthday scene + digit buttons ---------- */
.age-panel { max-width: 660px; margin: 0 auto; text-align: center; }

.age-scene {
  position: relative;
  background: linear-gradient(160deg, #FFF4D6 0%, #FFE3EC 100%);
  border-radius: var(--radius);
  padding: 26px 12px 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.age-deco { position: absolute; font-size: 1.6rem; animation: age-float 3s ease-in-out infinite; }
.age-deco-1 { left: 8%;  top: 12%; }
.age-deco-2 { right: 9%; top: 18%; animation-delay: .7s; }
.age-deco-3 { left: 14%; bottom: 12%; animation-delay: 1.4s; }
@keyframes age-float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-9px) rotate(6deg); }
}
.age-char {
  font-size: 4.4rem; line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 6px 8px rgba(13,45,90,.2));
  animation: age-bounce 1.6s ease-in-out infinite;
}
@keyframes age-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.age-cake {
  display: inline-block; margin-left: 18px; position: relative;
  font-size: 4.2rem; line-height: 1; vertical-align: bottom;
  transition: transform .25s;
}
.age-cake-hit { transform: scale(1.14) rotate(-4deg); }
.age-num {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 1.05rem; padding: 2px 11px; box-shadow: var(--shadow);
}
.age-bubble {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 2px solid var(--blue-light);
  border-radius: 999px; padding: 10px 18px; margin: 16px auto 14px;
  width: fit-content; max-width: 92%;
  box-shadow: var(--shadow);
  font-size: 1.06rem;
}
.age-btns {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-bottom: 12px;
}
.age-btn {
  font-family: var(--font); font-size: 1.7rem; font-weight: 700;
  color: var(--blue-dark); background: var(--white);
  border: 3px solid var(--blue); border-radius: 16px;
  min-width: 86px; padding: 14px 10px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s, background .15s, border-color .15s;
}
.age-btn:hover { transform: translateY(-3px); background: var(--blue-light); }
.age-btn.age-hit {
  background: var(--green); border-color: var(--green-dark); color: #fff;
  transform: scale(1.08);
}
.age-status { min-height: 1.5em; color: var(--ink); opacity: .85; }

/* ---------- 2. memory cards ---------- */
.mem-panel { max-width: 720px; margin: 0 auto; }
.mem-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.mem-moves { font-size: 1.02rem; color: var(--ink); opacity: .9; }
.mem-hint { font-size: 1.02rem; }
.mem-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.mem-card {
  perspective: 700px; background: none; border: 0; padding: 0;
  cursor: pointer; min-height: 118px;
}
.mem-inner {
  position: relative; width: 100%; height: 100%; min-height: 118px;
  transition: transform .45s; transform-style: preserve-3d;
  display: block;
}
.mem-card.open .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 8px;
}
.mem-back {
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-dark) 100%);
  font-size: 2.3rem; color: #fff; box-shadow: var(--shadow);
}
.mem-card:not(.open):not(.done):hover .mem-back { filter: brightness(1.12); }
.mem-front {
  transform: rotateY(180deg);
  background: var(--white); border: 2px solid var(--blue-light);
  box-shadow: var(--shadow);
}
.mem-face-es { font-size: .98rem; font-weight: 700; color: var(--ink); text-align: center; }
.mem-face-pic { gap: 4px; }
.mem-who { font-size: 2rem; line-height: 1; }
.mem-cake { font-size: 1.7rem; line-height: 1; position: relative; }
.mem-cake b {
  position: absolute; top: -9px; right: -13px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: .82rem; padding: 1px 7px;
}
.mem-candles { display: flex; gap: 2px; margin-top: 4px; }
.mem-candle {
  width: 4px; height: 10px; border-radius: 2px;
  background: repeating-linear-gradient(45deg, #FF7043 0 3px, #fff 3px 6px);
}
.mem-card.done .mem-front { border-color: var(--green); background: #EDF7EF; }

/* ---------- 4. drag answers ---------- */
.da-wrap { display: block; }
.da-board { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.da-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 2px solid var(--blue-light);
  border-radius: var(--radius); padding: 10px 14px;
  box-shadow: var(--shadow); transition: border-color .15s;
}
.da-row.drop-hover { border-color: var(--blue); background: var(--blue-light); }
.da-row.done { border-color: var(--green); background: #EDF7EF; }
.da-row.wrong { border-color: var(--red); animation: da-nudge .35s; }
@keyframes da-nudge { 25% { transform: translateX(-5px);} 75% { transform: translateX(5px);} }
.da-q { font-size: 1.05rem; font-weight: 700; min-width: 205px; }
.da-q .q-en { display: block; font-size: .82rem; font-weight: 400; }
.da-slot {
  flex: 1; min-height: 46px; border: 2px dashed #B9CFE8; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.da-slot .hint { font-size: .78rem; color: #90A8C4; letter-spacing: .06em; }
.da-locked { font-size: 1rem; font-weight: 700; color: var(--green-dark); }
.da-chip { max-width: 100%; }
.da-chip .chip-text { white-space: normal; text-align: left; line-height: 1.25; }

/* ---------- 7. Tetris block drop ---------- */
.tet-panel { max-width: 700px; margin: 0 auto; }
.tet-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  flex-wrap: wrap;
}
.tet-wave {
  background: var(--yellow); color: var(--ink); font-weight: 700;
  border-radius: 999px; padding: 5px 14px; font-size: .95rem;
  box-shadow: var(--shadow); white-space: nowrap;
}
.tet-status { flex: 1; font-size: 1rem; min-width: 180px; }
.tet-headers {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 4px;
}
.tet-head {
  background: var(--white); border: 2px solid var(--blue-light);
  border-radius: 10px 10px 4px 4px; padding: 6px 4px;
  font-size: .72rem; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  justify-content: space-between; min-height: 84px;
  transition: border-color .15s, background .15s;
}
.tet-head:hover { border-color: var(--blue); }
.tet-head-txt { line-height: 1.25; }
.tet-gap { color: var(--red); font-weight: 700; letter-spacing: .1em; }
.tet-filled { color: var(--green-dark); font-weight: 700; }
.tet-head.tet-done { border-color: var(--green); background: #EDF7EF; }
.tet-head.tet-locked { opacity: .55; cursor: default; }
.tet-well {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr);
  gap: 3px; background: #123058; border-radius: 12px; padding: 8px;
  box-shadow: var(--shadow-lg);
}
.tet-cell {
  background: rgba(255, 255, 255, .07);
  border-radius: 6px; transition: background .15s;
}
.tet-cell.tet-hover { background: rgba(255, 204, 0, .22); }
.tet-block {
  position: absolute; width: calc(100% / 6 - 2px); height: calc(100% / 6 - 2px);
  left: 0; top: 0; z-index: 2;
  background: linear-gradient(150deg, var(--yellow) 0%, #FFB300 100%);
  border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--ink);
  transition: left .16s ease, top .16s ease;
  pointer-events: none;
}
.tet-block.tet-listen { background: linear-gradient(150deg, #E35BA5 0%, #B03A85 100%); color: #fff; }
.tet-block.tet-good { background: linear-gradient(150deg, #66BB6A 0%, #2E9E44 100%); color: #fff; }
.tet-block.tet-burst { animation: tet-burst .5s ease; }
@keyframes tet-burst {
  0% { transform: scale(1); }
  40% { transform: scale(1.25) rotate(14deg); }
  100% { transform: scale(.6); opacity: .2; }
}
.tet-controls {
  display: flex; justify-content: center; gap: 14px; margin-top: 14px;
}
.tet-ctl {
  font-size: 1.25rem; padding: 10px 22px; border-radius: 14px;
  border: 2px solid var(--blue); background: var(--white); cursor: pointer;
  font-family: var(--font); font-weight: 700; color: var(--blue-dark);
  box-shadow: var(--shadow);
}
.tet-ctl:active { transform: translateY(2px); }
.tet-ctl.tet-drop { background: var(--blue); color: #fff; border-color: var(--blue-dark); }

/* ============================================================
   Topic 09 · Mi Familia — tree, pick, drag-word
   (fam-*, fp-*, fw-*)
   ============================================================ */

/* ---------- 1. family tree ---------- */
.fam-panel { max-width: 680px; margin: 0 auto; }
.fam-bubble {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 2px solid var(--blue-light);
  border-radius: 999px; padding: 10px 18px; margin: 0 auto 16px;
  width: fit-content; max-width: 95%; box-shadow: var(--shadow);
  font-size: 1.05rem; min-height: 48px;
}
.fam-tree { display: flex; flex-direction: column; gap: 22px; padding: 8px 0 4px; }
.fam-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.fam-couple { display: flex; gap: 10px; }
.fam-row-1 { position: relative; }
.fam-member {
  position: relative; border: 3px solid transparent; border-radius: 18px;
  background: var(--white); box-shadow: var(--shadow);
  padding: 10px 12px 8px; cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 92px; transition: transform .15s, border-color .15s;
}
.fam-member:hover { transform: translateY(-3px); border-color: var(--blue-light); }
.fam-emoji { font-size: 2.6rem; line-height: 1; }
.fam-name { font-weight: 700; color: #90A8C4; font-size: .95rem; }
.fam-member.heard .fam-name { color: var(--ink); }
.fam-check {
  position: absolute; top: -8px; right: -6px;
  background: var(--green); color: #fff; border-radius: 999px;
  width: 24px; height: 24px; display: none; align-items: center; justify-content: center;
  font-size: .85rem; box-shadow: var(--shadow);
}
.fam-member.heard .fam-check { display: flex; }
.fam-member.quiz-hit { border-color: var(--green); background: #EDF7EF; transform: scale(1.06); }
.fam-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 16px; font-size: 1rem; flex-wrap: wrap;
}

/* ---------- 6. select the word ---------- */
.fp-panel { max-width: 660px; margin: 0 auto; }
.fp-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.fp-scene {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(160deg, #E7F3FF 0%, #F3EAFF 100%);
  border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.fp-pic {
  font-size: 4.6rem; line-height: 1;
  background: var(--white); border-radius: 50%;
  width: 108px; height: 108px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.fp-body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.fp-q {
  display: flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 700;
}
.fp-sentence { font-size: 1.2rem; }
.fp-gap {
  display: inline-block; min-width: 96px; text-align: center;
  border-bottom: 3px dotted var(--blue); color: var(--red);
  font-weight: 700; letter-spacing: .05em;
}
.fp-sentence.fp-done .fp-gap { color: var(--green-dark); border-bottom-style: solid; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- 8. drag the words ---------- */
.fw-panel { max-width: 680px; margin: 0 auto; }
.fw-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 8px; }
.fw-q {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.08rem; font-weight: 700; margin-bottom: 14px; flex-wrap: wrap;
}
.fw-sentence {
  background: var(--white); border: 2px solid var(--blue-light);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px; font-size: 1.25rem; line-height: 2.1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; row-gap: 12px;
  justify-content: center;
}
.fw-sentence.fw-done { border-color: var(--green); background: #EDF7EF; }
.fw-lit { padding: 4px 2px; }
.fw-slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 84px; min-height: 40px; padding: 4px 10px;
  border: 2px dashed var(--blue); border-radius: 10px;
  color: #90A8C4; cursor: pointer; font-weight: 700;
  background: var(--blue-light); transition: border-color .15s;
}
.fw-slot.fw-filled {
  border-style: solid; color: var(--ink); background: var(--white);
  box-shadow: var(--shadow);
}
.fw-bank {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 16px; min-height: 54px;
}

/* ---------- shared small bits ---------- */
.write-emoji { font-size: 1.5rem; line-height: 1; }
.ttt-emoji { font-size: 2.7rem !important; }
.cw-clue-emoji {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--blue-light);
}

/* ============================================================
   Topic 10 — Hablando de familia · Topic 11 — Los números
   ordinales  (de- dl- wi- tf- od- ord- cars-)
   ============================================================ */

/* ---------- 1. describe — pick the true sentences ---------- */
.de-panel { max-width: 680px; margin: 0 auto; }
.de-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.de-stage {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(160deg, #FFF3E0 0%, #F3EAFF 100%);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.de-frame {
  background: var(--white); border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow); border: 3px solid #FFD8A8; flex-shrink: 0;
  min-width: 128px;
}
.de-photo {
  font-size: 3.6rem; line-height: 1;
  width: 92px; height: 92px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #FFF8EF, #F0E6FF); border-radius: 50%;
}
.de-tag { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.de-age {
  background: var(--yellow); color: #6B4E00; font-weight: 800;
  border-radius: 999px; padding: 2px 12px; font-size: .92rem;
}
.de-age .de-age-en { font-weight: 600; }
.de-age-pair { font-size: .92rem; }
.de-hint { flex: 1; font-size: 1.06rem; color: #43598A; }
.de-chips { display: flex; flex-direction: column; gap: 9px; }
.de-chip { width: 100%; text-align: left; justify-content: flex-start; }
.de-chip .chip-text { flex: 1; }
.de-chip.de-ok {
  border-color: var(--green); background: #EDF7EF;
  box-shadow: inset 0 0 0 2px var(--green);
}
.de-chip.de-ok::after { content: '✓'; color: var(--green-dark); font-weight: 900; }
.de-chip.de-off { opacity: .42; filter: grayscale(.7); }

/* ---------- 2. dragline — él or ella bins ---------- */
.dl-panel { max-width: 680px; margin: 0 auto; }
.dl-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.dl-cardwrap { display: flex; justify-content: center; margin-bottom: 18px; }
.dl-card {
  position: relative; background: var(--white); border-radius: 14px;
  box-shadow: var(--shadow); border: 2px solid #CFE0F3;
  padding: 18px 52px 18px 20px; max-width: 460px; width: 100%;
  font-size: 1.18rem; font-weight: 700; color: var(--ink);
  touch-action: none; user-select: none; cursor: grab;
  transition: box-shadow .15s;
}
.dl-card:active { cursor: grabbing; }
.dl-speak { position: absolute; top: 10px; right: 10px; }
.dl-text { display: block; }
.dl-card.dl-wrong { border-color: var(--red); animation: shake .6s ease; }
.dl-card.dl-gone { opacity: 0; transform: scale(.6); transition: all .45s; }
.dl-bins { display: flex; gap: 16px; justify-content: center; }
.dl-bin {
  flex: 1; max-width: 300px; min-height: 150px;
  border-radius: var(--radius); border: 3px dashed #A9C4E2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; position: relative;
  transition: border-color .15s, background .15s, transform .15s;
  background: rgba(255, 255, 255, .55);
}
.dl-bin-m { background: linear-gradient(170deg, #E3F0FC, #F4FAFF); }
.dl-bin-f { background: linear-gradient(170deg, #FCE9F6, #FFF5FB); }
.dl-bin-ava { font-size: 2.9rem; line-height: 1.15; }
.dl-bin-name { font-weight: 800; color: var(--ink); }
.dl-bin-pron {
  font-style: italic; font-weight: 800; color: var(--blue);
  background: var(--white); border-radius: 999px; padding: 1px 14px;
  border: 1.5px solid #CFE0F3;
}
.dl-bin-count {
  position: absolute; top: 8px; right: 12px;
  background: var(--green); color: var(--white); font-weight: 800;
  border-radius: 999px; min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.dl-bin.dl-over { border-color: var(--blue); transform: scale(1.04); border-style: solid; }
.dl-bin.dl-hit { border-color: var(--green); border-style: solid; background: #EDF7EF; }
.dl-bin.dl-miss { border-color: var(--red); border-style: solid; animation: shake .6s ease; }

/* ---------- 3. whois — photo wall ---------- */
.wi-panel { max-width: 680px; margin: 0 auto; }
.wi-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.wi-wall {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 14px;
}
.wi-frame {
  background: var(--white); border-radius: 12px; border: 3px solid #CFE0F3;
  box-shadow: var(--shadow); padding: 10px 6px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: transform .15s, border-color .15s;
}
.wi-frame:hover { transform: translateY(-2px); }
.wi-emoji { font-size: 2.6rem; line-height: 1.2; }
.wi-name { font-weight: 800; color: var(--ink); font-size: .95rem; }
.wi-age {
  background: var(--yellow); color: #6B4E00; font-weight: 800;
  border-radius: 999px; padding: 0 10px; font-size: .82rem;
}
.wi-age-unk { background: #E3EAF3; color: #7B8CA6; }
.wi-rel { color: #7B8CA6; font-size: .8rem; font-style: italic; }
.wi-frame.wi-ok { border-color: var(--green); background: #EDF7EF; transform: scale(1.05); }
.wi-frame.wi-bad { border-color: var(--red); }
.wi-frame.wi-off { opacity: .45; filter: grayscale(.8); }
.wi-caption {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--blue-light); border-radius: 12px; padding: 12px 14px;
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
  min-height: 58px; opacity: .75; transition: opacity .4s;
}
.wi-caption.wi-shown { opacity: 1; }

/* ---------- 4. truefalse — Verdadero o Falso ---------- */
.tf-panel { max-width: 680px; margin: 0 auto; }
.tf-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.tf-speaker {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(160deg, #E7F3FF 0%, #FFF6E5 100%);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.tf-ava {
  font-size: 3rem; line-height: 1; flex-shrink: 0;
  width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
  background: var(--white); border-radius: 50%; box-shadow: var(--shadow);
}
.tf-say { flex: 1; }
.tf-para { margin: 8px 0 0; font-size: 1.04rem; line-height: 1.5; color: var(--ink); }
.tf-rows { display: flex; flex-direction: column; gap: 9px; }
.tf-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 2px solid #DCE7F2; border-radius: 12px;
  padding: 9px 12px; transition: border-color .15s, background .15s;
}
.tf-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .88rem;
}
.tf-text { flex: 1; font-weight: 600; color: #33507A; }
.tf-btns { display: flex; gap: 8px; flex-shrink: 0; }
.tf-btn {
  border: 2px solid #C9D8E8; background: var(--paper); color: #33507A;
  border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: .92rem;
  cursor: pointer; transition: all .15s;
}
.tf-btn:hover { border-color: var(--blue); color: var(--blue-dark); }
.tf-btn.tf-true:hover { background: #EDF7EF; border-color: var(--green); }
.tf-btn.tf-false:hover { background: #FDEDED; border-color: var(--red); }
.tf-row.tf-done .tf-btn { cursor: default; }
.tf-row.tf-right { border-color: var(--green); background: #EDF7EF; }
.tf-row.tf-right .tf-mark { color: var(--green-dark); font-weight: 900; }
.tf-row.tf-wrong { border-color: var(--red); background: #FDEDED; }
.tf-row.tf-wrong .tf-mark { color: var(--red); font-weight: 900; }
.tf-mark { width: 22px; text-align: center; font-size: 1.05rem; flex-shrink: 0; }

/* ---------- 5. ordinal — hear & tap ---------- */
.od-panel { max-width: 680px; margin: 0 auto; }
.od-round { text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 10px; }
.od-banner {
  background: linear-gradient(160deg, #FFF8E1 0%, #FFFDF6 100%);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 16px; text-align: center; margin-bottom: 12px;
}
.od-sentence { font-size: 1.65rem; font-weight: 800; color: var(--ink); }
.od-gap {
  display: inline-block; min-width: 150px; text-align: center;
  border-bottom: 3px dotted var(--blue); color: var(--red);
}
.od-gap.od-filled { color: var(--green-dark); border-bottom-style: solid; }
.od-hear {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 14px;
}
.od-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.od-chip { flex-direction: column; gap: 0; padding: 8px 16px; }
.od-chip-en { font-size: .78rem; color: #7B8CA6; font-weight: 600; }

/* ---------- 6. order — primero → décimo ---------- */
.ord-panel { max-width: 680px; margin: 0 auto; }
.ord-round {
  text-align: center; color: #5A7CA6; font-size: .95rem; margin-bottom: 12px;
}
.ord-slots {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.ord-slot {
  background: var(--white); border: 2px dashed #C9D8E8; border-radius: 12px;
  min-height: 74px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; padding: 6px 4px;
}
.ord-pos {
  font-weight: 900; color: #90A8C4; font-size: 1.1rem; line-height: 1;
}
.ord-sup { font-size: .7em; }
.ord-word { font-weight: 800; color: var(--ink); font-size: .95rem; }
.ord-slot.ord-got {
  border-style: solid; border-color: var(--green); background: #EDF7EF;
}
.ord-slot.ord-got .ord-pos { color: var(--green-dark); }
.ord-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ord-tile.ord-used {
  opacity: .32; pointer-events: none; filter: grayscale(.8);
}

/* ---------- 7. cars — the race finish ---------- */
.cars-panel { max-width: 700px; margin: 0 auto; }
.cars-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  justify-content: center;
}
.cars-flag { font-size: 2rem; }
.cars-title { font-weight: 800; color: var(--ink); font-size: 1.06rem; }
.cars-title .tray-en { display: block; font-weight: 600; color: #7B8CA6; }
.cars-bays {
  display: flex; flex-direction: column; gap: 7px;
  background: linear-gradient(160deg, #E7F3FF 0%, #F3EAFF 100%);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  margin-bottom: 14px; position: relative;
}
.cars-bays::before {
  content: '≈≈≈ meta ≈≈≈'; position: sticky; top: 0;
  display: block; text-align: center; color: #90A8C4;
  font-size: .8rem; letter-spacing: .3em; margin-bottom: 2px;
}
.cars-bay {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .85); border: 2px dashed #C9D8E8;
  border-radius: 10px; padding: 6px 10px; min-height: 52px;
  transition: border-color .15s, background .15s;
}
.cars-pos {
  font-weight: 900; color: var(--blue-dark); font-size: 1.15rem; width: 34px;
  text-align: center; flex-shrink: 0;
}
.cars-sup { font-size: .68em; }
.cars-speak { flex-shrink: 0; }
.cars-bay-car { font-size: 1.7rem; width: 44px; text-align: center; flex-shrink: 0; }
.cars-sentence { font-weight: 700; color: #33507A; font-size: .98rem; }
.cars-bay.cars-parked {
  border-style: solid; border-color: var(--green); background: #EDF7EF;
}
.cars-bay.cars-parked .cars-sentence { color: var(--green-dark); }
.cars-bay.cars-over { border-color: var(--blue); border-style: solid; transform: scale(1.02); }
.cars-bay.cars-bad { border-color: var(--red); border-style: solid; animation: shake .6s ease; }
.cars-lane {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  min-height: 60px;
}
.cars-car {
  --tint: #E53935;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  background: linear-gradient(165deg, #FFFFFF 15%, var(--tint) 130%);
  border: 2.5px solid var(--tint); border-radius: 12px;
  padding: 8px 14px 6px; cursor: grab; touch-action: none;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
  user-select: none;
}
.cars-car:active { cursor: grabbing; }
.cars-emoji { font-size: 1.8rem; line-height: 1.25; }
.cars-name { font-weight: 800; color: var(--ink); font-size: .9rem; }
.cars-car.cars-sel {
  border-color: var(--blue-dark); box-shadow: 0 0 0 3px var(--blue-light), var(--shadow);
  transform: scale(1.07);
}
.cars-car.cars-parked { opacity: .25; pointer-events: none; filter: grayscale(1); }
.cars-car.cars-bad { border-color: var(--red); }
.cars-pit {
  background: #F7FAFD; border-radius: var(--radius); border: 2px solid #E3ECF5;
  padding: 12px;
}

/* narrow screens: wall 2-up, statement rows stack */
@media (max-width: 620px) {
  .wi-wall { grid-template-columns: repeat(2, 1fr); }
  .tf-row { flex-wrap: wrap; }
  .tf-btns { width: 100%; justify-content: flex-end; }
  .ord-slots { grid-template-columns: repeat(2, 1fr); }
  .de-stage { flex-direction: column; text-align: center; }
  .dl-bins { flex-direction: column; align-items: stretch; }
}

/* generic shake for the new T10/T11 components */
.de-chip.wrong-shake, .dl-card.wrong-shake, .wi-frame.wrong-shake,
.tf-mark.wrong-shake, .od-chip.wrong-shake, .ord-tile.wrong-shake,
.cars-car.wrong-shake { animation: shake .5s ease; }

/* ============================================================
   Topics 12-13 — listen&pick cards, driving street, tetris
   wave-3 scramble, prompts
   ============================================================ */
.lp-panel { display: flex; flex-direction: column; gap: 14px; }
.lp-round {
  align-self: center; background: var(--white); border: 2px solid var(--blue-light);
  border-radius: 999px; padding: 4px 18px; font-weight: 700; color: var(--blue-dark);
}
.lp-hear {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lp-en { max-width: 560px; text-align: center; }
.lp-cards {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.lp-card {
  background: var(--white); border: 3px solid var(--blue-light);
  border-radius: 16px; padding: 14px 18px; min-width: 128px; max-width: 220px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.lp-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.lp-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.lp-emoji { font-size: 2rem; line-height: 1.15; }
.lp-label { font-weight: 700; font-size: 1.02rem; color: var(--ink); text-align: center; }
.lp-sub { font-size: .78rem; color: var(--ink-soft); text-align: center; }
.lp-card-answer { min-width: 220px; }
.lp-card-answer .lp-emoji { font-size: 1.5rem; }
.lp-card.lp-hit {
  border-color: var(--green); background: #EDF7EF;
  box-shadow: 0 0 0 4px rgba(46, 158, 68, .18);
}
.lp-status { text-align: center; font-weight: 600; color: var(--ink-soft); min-height: 1.4em; }

.dr-panel { display: flex; flex-direction: column; gap: 12px; }
.dr-round {
  align-self: center; background: var(--white); border: 2px solid var(--blue-light);
  border-radius: 999px; padding: 4px 18px; font-weight: 700; color: var(--blue-dark);
}
.dr-char {
  display: flex; align-items: center; gap: 12px; justify-content: center;
}
.dr-ava {
  font-size: 3rem; background: var(--white); border: 3px solid var(--blue-light);
  border-radius: 50%; width: 84px; height: 84px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.dr-say { max-width: 560px; }
.dr-line { margin: 0; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.dr-en { display: block; }
.dr-street { position: relative; }
.dr-road {
  height: 46px; background: #4A5568; border-radius: 10px; position: relative;
  margin-bottom: 6px;
  background-image: repeating-linear-gradient(90deg, #F6D860 0 26px, transparent 26px 52px);
  background-size: 100% 6px; background-position: 0 50%; background-repeat: no-repeat;
}
.dr-car {
  position: absolute; top: 50%; left: calc(12.5% - 22px); transform: translateY(-50%);
  font-size: 1.9rem; transition: left .5s cubic-bezier(.34,.9,.4,1);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); z-index: 2;
}
.dr-houses {
  display: flex; gap: 10px;
}
.dr-house {
  flex: 1; background: var(--white); border: 3px solid var(--blue-light);
  border-radius: 14px 14px 8px 8px; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: border-color .15s, transform .15s;
  box-shadow: var(--shadow-sm);
}
.dr-house:hover { border-color: var(--blue); transform: translateY(-2px); }
.dr-house:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.dr-house-emoji { font-size: 2.1rem; line-height: 1.2; }
.dr-house-label { font-weight: 700; font-size: .86rem; text-align: center; }
.dr-house.dr-open {
  border-color: var(--green); background: #EDF7EF;
  box-shadow: 0 0 0 4px rgba(46, 158, 68, .18);
}
.dr-status { text-align: center; font-weight: 600; color: var(--ink-soft); min-height: 1.4em; }

/* tetris wave 3 — scramble block + wave-1 prompt line */
.tet-block.tet-scramble {
  background: linear-gradient(150deg, #7C5BD4 0%, #5436A8 100%); color: #fff;
  font-size: clamp(.5rem, 1.6vw, 1rem); letter-spacing: .06em; word-break: break-all;
  padding: 0 2px; line-height: 1.1; text-align: center;
}
.tet-head-word { font-weight: 800; font-size: .8rem; color: var(--blue-dark); }
.tet-prompt {
  display: block; font-size: .62rem; color: var(--ink-soft); line-height: 1.2;
  border-bottom: 1px dashed var(--blue-light); padding-bottom: 2px; width: 100%;
}

/* generic shake for the new T12/T13 components */
.lp-card.wrong-shake, .dr-house.wrong-shake { animation: shake .5s ease; }

/* ============================================================
   Topic 14 · ActWordWall — hear the paragraph, tap its words
   ============================================================ */
.wl-panel { display: flex; flex-direction: column; gap: 14px; width: min(860px, 100%); margin: 0 auto; }
.wl-round { text-align: center; font-weight: 800; color: var(--blue-dark); font-size: 1.05rem; }
.wl-hear { display: flex; align-items: center; gap: 10px; justify-content: center; }
.wl-caption { text-align: center; }
.wl-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px; padding: 12px; border-radius: 16px;
  background: #F4F7FD; border: 2px dashed var(--blue-light);
}
.wl-tile {
  font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink);
  padding: 10px 8px; border-radius: 12px; cursor: pointer;
  background: #fff; border: 2px solid var(--blue-light);
  box-shadow: 0 2px 0 rgba(37, 64, 143, .12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.wl-tile:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(37, 64, 143, .16); }
.wl-tile.wl-hit {
  background: #EDF7EF; border-color: var(--green); color: var(--green-dark, #1E7A34);
  cursor: default; box-shadow: none; animation: wl-pop .35s ease;
}
@keyframes wl-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.wl-tile.wrong-shake { animation: shake .5s ease; }
.wl-status { text-align: center; font-weight: 600; color: var(--ink-soft); min-height: 1.4em; }

/* Topic 15 · memory pet-picture card (emoji, no cake) */
.mem-who.mem-pet { font-size: clamp(2.1rem, 7vw, 3rem); line-height: 1.1; }
