/* ─────────────────────────────────────────────────────────────
   MateAventura · interfaz infantil
   Identidad propia: tonos cálidos, la mascota Axo (ajolote),
   botones "de juguete" con relieve y tipografía redondeada.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #2a2250;
  --ink-soft: #5a5480;
  --paper: #fff8ec;
  --paper-2: #fff1dc;
  --card: #ffffff;
  --line: #eadfce;

  --violet: #6247e8;
  --violet-dark: #4a31c9;
  --violet-soft: #ece8ff;
  --coral: #ff6f61;
  --coral-dark: #e0493b;
  --pink: #ff8fb8;
  --mint: #22a565;
  --mint-dark: #17824e;
  --mint-soft: #ddf6e8;
  --sun: #ffb400;
  --sun-dark: #d88f00;
  --sun-soft: #fff1c9;
  --sky: #2d8cf0;
  --sky-soft: #e0efff;
  --berry: #d6336c;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 0 rgba(42, 34, 80, 0.08), 0 10px 30px rgba(42, 34, 80, 0.08);
  --focus: 0 0 0 4px #fff, 0 0 0 7px var(--sky);
  --font: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --tap: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 143, 184, 0.18) 0 120px, transparent 121px),
    radial-gradient(circle at 92% 18%, rgba(98, 71, 232, 0.12) 0 160px, transparent 161px),
    radial-gradient(circle at 80% 95%, rgba(34, 165, 101, 0.12) 0 140px, transparent 141px),
    var(--paper);
  background-attachment: fixed;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ── Estructura ── */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.25rem; }
.brand img { width: 44px; height: 44px; }
.brand span b { color: var(--violet); }
.header-stats { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line);
  font-weight: 600; font-size: 0.95rem; white-space: nowrap;
}
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 2px solid var(--line); background: var(--card); font-size: 1.3rem;
}
.profile-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line); font-weight: 600;
}
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--violet-soft); font-size: 1.5rem; }
.avatar.big { width: 84px; height: 84px; font-size: 3rem; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 80px; }
.view { animation: pop-in 0.35s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-soft); }

/* ── Botones "de juguete" ── */
.btn {
  --bg: var(--violet); --bg-dark: var(--violet-dark); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 12px 26px;
  border: 0; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 1.15rem; text-decoration: none;
  box-shadow: 0 6px 0 var(--bg-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
  user-select: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bg-dark); }
.btn[disabled], .btn.coral[disabled], .btn.mint[disabled], .btn.sun[disabled], .btn.ghost[disabled] { --bg: #d9d3ea; --bg-dark: #bdb5d6; --fg: #5a5480; cursor: not-allowed; filter: none; }
.btn.coral { --bg: var(--coral); --bg-dark: var(--coral-dark); }
.btn.mint { --bg: var(--mint); --bg-dark: var(--mint-dark); }
.btn.sun { --bg: var(--sun); --bg-dark: var(--sun-dark); --fg: var(--ink); }
.btn.ghost { --bg: var(--card); --bg-dark: var(--line); --fg: var(--ink); border: 2px solid var(--line); }
.btn.small { min-height: 48px; padding: 8px 16px; font-size: 1rem; }
.btn.block { width: 100%; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }

/* ── Tarjetas ── */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 2px solid var(--line); box-shadow: var(--shadow);
  padding: 22px;
}
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.tile {
  --accent: var(--violet);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 150px; padding: 20px; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--ink); text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tile:hover { transform: translateY(-3px); }
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tile .tile-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem;
  background: color-mix(in srgb, var(--accent) 16%, white);
}
.tile strong { font-size: 1.25rem; }
.tile small { color: var(--ink-soft); font-size: 0.95rem; }
.tile .badge { position: absolute; top: 14px; right: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--violet-soft); color: var(--violet-dark);
}
.badge.mint { background: var(--mint-soft); color: var(--mint-dark); }
.badge.sun { background: var(--sun-soft); color: #8a5a00; }
.badge.coral { background: #ffe3df; color: #b32d20; }

/* ── Héroe / mascota ── */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-bottom: 24px; }
.hero .mascot { width: clamp(110px, 18vw, 170px); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.bubble {
  position: relative; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
}
.bubble::before {
  content: ""; position: absolute; left: -14px; top: 30px; width: 24px; height: 24px;
  background: var(--card); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg);
}

/* ── Formularios ── */
label.field { display: grid; gap: 6px; font-weight: 600; }
input.text, select.text {
  min-height: 56px; padding: 10px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: #fff; font-size: 1.15rem;
}
input.text:focus { border-color: var(--sky); }
.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  min-width: var(--tap); min-height: var(--tap); padding: 8px 16px;
  border-radius: var(--radius-sm); border: 3px solid var(--line); background: #fff;
  font-weight: 600; font-size: 1.1rem;
}
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); }
.form-error { color: #b32d20; font-weight: 600; }

/* ── Niveles de dificultad ── */
.level-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.level-option { border: 3px solid var(--line); background: #fff; border-radius: var(--radius); padding: 14px; text-align: center; font-weight: 700; }
.level-option .dot { font-size: 1.8rem; display: block; }
.level-option small { display: block; font-weight: 500; color: var(--ink-soft); }
.level-option[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); }

/* ── Jugar ── */
.play-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.progress-track { flex: 1; height: 18px; background: #efe6d6; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--mint), #57d38c); border-radius: 999px; transition: width 0.4s ease; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--coral-dark); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.1); } }

.exercise { padding: clamp(18px, 3vw, 32px); }
.exercise-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.prompt { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; margin-bottom: 18px; }
.visuals { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; margin: 8px 0 22px; }
.visual { max-width: 100%; }
.visual svg { display: block; max-width: 100%; height: auto; }
.interaction { margin-top: 8px; }
.play-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.bigtext { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 700; letter-spacing: 0.02em; text-align: center; padding: 8px 20px; background: var(--sun-soft); border-radius: var(--radius); }
.frac { display: inline-grid; grid-template-rows: auto auto; justify-items: center; vertical-align: middle; line-height: 1; margin: 0 0.1em; }
.frac > span:first-child { border-bottom: 0.08em solid currentColor; padding: 0 0.15em 0.05em; }
.frac > span:last-child { padding-top: 0.05em; }

/* Opción múltiple */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.option {
  display: flex; align-items: center; gap: 14px;
  min-height: 76px; padding: 12px 16px; text-align: left;
  background: #fff; border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--line); font-size: 1.35rem; font-weight: 600;
  transition: transform 0.08s, border-color 0.15s, background 0.15s;
}
.option:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.option .key { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-dark); font-size: 1.05rem; }
.option[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 5px 0 var(--violet); }
.option.with-visual { flex-direction: column; justify-content: center; }
.option.with-visual .visual svg { max-height: 150px; }
.option.correct { border-color: var(--mint); background: var(--mint-soft); box-shadow: 0 5px 0 var(--mint); }
.option.wrong { border-color: var(--coral); background: #ffe8e4; }

/* Completar */
.fill { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; white-space: pre-wrap; }
.blank {
  width: calc(var(--len, 3) * 0.75em + 1.2em); min-width: 2.4em; max-width: 7em; height: 1.7em;
  text-align: center; font: inherit; font-weight: 700;
  border: 3px dashed var(--violet); border-radius: 14px; background: var(--violet-soft); color: var(--ink);
}
.blank:focus { border-style: solid; background: #fff; }
.keypad { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; max-width: 520px; margin: 22px auto 0; }
.keypad button { min-height: 60px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 1.5rem; font-weight: 700; box-shadow: 0 4px 0 var(--line); }
.keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

/* Verdadero / falso */
.statement { text-align: center; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; padding: 18px; background: var(--sky-soft); border-radius: var(--radius); margin-bottom: 18px; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tf .option { justify-content: center; font-size: 1.5rem; }

/* Ordenar */
.order-list { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 10px; max-width: 560px; }
.order-label { text-align: center; font-weight: 700; color: var(--ink-soft); margin: 6px 0; }
.order-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: #fff; border: 3px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1.5rem; font-weight: 700; touch-action: none; user-select: none;
}
.order-item .grip { cursor: grab; font-size: 1.4rem; color: var(--ink-soft); padding: 0 6px; }
.order-item .text { flex: 1; }
.order-item.dragging { opacity: 0.85; border-color: var(--violet); box-shadow: var(--shadow); position: relative; z-index: 3; }
.order-item .arrows { display: flex; gap: 6px; }
.order-item .arrows button { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-size: 1.2rem; }

/* Relacionar */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; max-width: 720px; margin: 0 auto; }
.match-col { display: grid; gap: 12px; align-content: start; }
.match-item {
  position: relative; min-height: 64px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 3px solid var(--line); background: #fff; font-size: 1.35rem; font-weight: 700;
}
.match-item[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); }
.match-item.paired { border-style: solid; }
.match-item .pair-tag {
  position: absolute; top: -12px; right: -12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 700;
}

/* Agrupar / repartir */
.group-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 14px; min-height: 80px; border: 3px dashed var(--line); border-radius: var(--radius); background: var(--paper-2); }
.group-plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.plate {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 170px; padding: 12px;
  border-radius: 50% / 28%; background: radial-gradient(circle, #fff 55%, #f2e9da 56%);
  border: 3px solid var(--line); text-align: center;
}
.plate.selected-target, .plate.drop-hover { border-color: var(--violet); background: radial-gradient(circle, #fff 55%, var(--violet-soft) 56%); }
.plate .plate-items { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.plate .plate-count { font-weight: 700; }
.token {
  width: 58px; height: 58px; padding: 4px; border-radius: 14px; border: 2px solid transparent;
  background: transparent; touch-action: none; display: grid; place-items: center; font-size: 2rem;
}
.token img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.token[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); transform: scale(1.08); }
.token.floating { position: fixed; z-index: 50; pointer-events: none; }

/* Plano cartesiano */
.grid-wrap { display: grid; justify-items: center; gap: 10px; }
.grid-wrap svg { width: min(100%, 560px); height: auto; touch-action: none; }
.grid-hint { font-weight: 700; }

/* Monedas */
.coin-palette, .coin-tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.coin-tray { min-height: 110px; padding: 14px; margin-top: 16px; border: 3px dashed var(--line); border-radius: var(--radius); background: var(--paper-2); }
.money-btn { background: none; border: 0; padding: 4px; border-radius: 14px; }
.money-btn svg { display: block; }

/* Reloj */
.clock-set { display: grid; justify-items: center; gap: 14px; }
.clock-controls { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 24px; align-items: center; }
.clock-controls .ctl { display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* ── Retroalimentación ── */
.feedback {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 4px solid var(--line);
  box-shadow: 0 -10px 30px rgba(42, 34, 80, 0.15);
  animation: slide-up 0.3s ease both;
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
.feedback-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.feedback img.mascot { width: 96px; height: 96px; object-fit: contain; }
.feedback.good { background: #eafbf1; border-color: var(--mint); }
.feedback.almost { background: #fff7e0; border-color: var(--sun); }
.feedback.learn { background: #eef4ff; border-color: var(--sky); }
.feedback h2 { margin-bottom: 6px; }
.feedback .explanation { font-size: 1.05rem; }
.feedback .gains { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ── Resumen ── */
.summary { text-align: center; }
.summary .stars { font-size: 3.4rem; letter-spacing: 8px; }
.summary .stars .off { filter: grayscale(1); opacity: 0.3; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.kpi { background: var(--paper-2); border-radius: var(--radius-sm); padding: 14px; }
.kpi b { display: block; font-size: 1.8rem; }

/* ── Progreso ── */
.meter { height: 16px; border-radius: 999px; background: #efe6d6; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; }
.topic-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.bars-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--ink-soft); }
.bars-chart .bar i { display: block; width: 100%; border-radius: 8px 8px 0 0; background: var(--violet); min-height: 2px; }
.bars-chart .bar i.ok { background: var(--mint); }

.table-grid { display: grid; grid-template-columns: auto repeat(10, minmax(28px, 1fr)); gap: 4px; font-size: 0.9rem; }
.table-grid .cell { text-align: center; padding: 6px 0; border-radius: 8px; background: #f1ebe0; font-weight: 600; }
.table-grid .cell.s1 { background: #ffe3a3; }
.table-grid .cell.s2 { background: #bdecd0; }
.table-grid .head { font-weight: 700; text-align: center; padding: 6px 4px; }

/* ── Logros ── */
.medal { text-align: center; }
.medal .medal-icon { font-size: 3rem; width: 88px; height: 88px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); border: 4px solid var(--sun); }
.medal.locked .medal-icon { background: #eee; border-color: #ccc; filter: grayscale(1); opacity: 0.55; }

/* ── Avisos ── */
.toast-area { position: fixed; top: 84px; right: 16px; z-index: 60; display: grid; gap: 10px; max-width: min(92vw, 380px); }
.toast { background: var(--card); border: 3px solid var(--sun); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); animation: pop-in 0.3s ease both; font-weight: 600; }
.error-box { background: #ffe8e4; border: 2px solid var(--coral); border-radius: var(--radius-sm); padding: 14px; }
.loading { text-align: center; padding: 40px; color: var(--ink-soft); }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 6px solid var(--violet-soft); border-top-color: var(--violet); margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ── Responsivo ── */
@media (max-width: 720px) {
  body { font-size: 18px; }
  .app-header { padding: 8px 12px; gap: 8px; }
  .brand span:not(#brand-logo-slot) { display: none; }
  .header-stats .stat-pill[title="Nivel"] { display: none; }
  .stat-pill { padding: 4px 9px; font-size: 0.85rem; }
  main { padding: 16px 16px 120px; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .mascot { margin: 0 auto; }
  .bubble::before { display: none; }
  .feedback-inner { grid-template-columns: 1fr; text-align: center; }
  .feedback img.mascot { margin: 0 auto; width: 72px; height: 72px; }
  .match { gap: 12px; }
  .tf { grid-template-columns: 1fr; }
  .play-actions .btn { flex: 1; }
}

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

/* ── Visuales ── */
.objects-visual { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.objects-visual .op { font-size: 2.6rem; font-weight: 700; color: var(--violet); }
.obj-group { display: grid; grid-template-columns: repeat(5, 48px); gap: 6px; padding: 10px; background: var(--paper-2); border-radius: var(--radius-sm); }
.obj { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.obj img { width: 44px; height: 44px; object-fit: contain; }
.obj.crossed img, .obj.crossed .emoji { opacity: 0.35; }
.obj.crossed::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #c92a2a; font-size: 2.4rem; font-weight: 700; }
.money-visual { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.array-visual { display: grid; gap: 6px; padding: 12px; background: var(--paper-2); border-radius: var(--radius-sm); }
.array-visual img { width: 40px; height: 40px; }
.vertical-op { display: inline-grid; gap: 4px; padding: 16px 24px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vertical-op .vrow { display: grid; grid-template-columns: 1.2ch repeat(calc(var(--w) - 1), 1.1ch); justify-items: center; gap: 2px; }
.vertical-op .vop { color: var(--violet); }
.vertical-op .vline { height: 5px; background: var(--ink); border-radius: 3px; }
.image-visual { margin: 0; }
.image-visual img { width: 160px; height: 160px; object-fit: contain; }
.shade-wrap svg { width: min(100%, 320px); }
