/* Trujamán · un camino alegre del abecedario al TOEFL.
   Tipos: Bricolage Grotesque para títulos y Atkinson Hyperlegible Next para el texto (distingue bien I, l y 1,
   que importa cuando se enseña el abecedario). Botones y tarjetas con relieve (borde inferior más oscuro).
   Los colores salen de Truji: el amarillo del pecho en los botones, el negro del plumaje en el texto y, por etapas,
   el pico de la base a la punta (verde, ámbar, rojo), la cola, las patas, el ojo y el plumaje.
   Cada etapa tiene cuatro tonos: --c relleno, --d relieve, --t texto sobre blanco (≥ 4,5:1), --l fondo suave. */
:root {
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --bg: #f8f8f5; --white: #ffffff; --soft: #f0f0ec; --soft-2: #e8e8e3;
  --line: #e3e3dd; --line-d: #cfcfc7;
  --ink: #1a1b20; --muted: #5d6066; --faint: #6c6e74;
  --p: #0a7d74; --pd: #075f58; --pl: #d8f3f0; --ps: #7cc9c1;
  --btn: #ffc91f; --btn-d: #d99e00;
  --ok: #1a8434; --ok-d: #116326; --ok-l: #ddf5cc; --ok-t: #1f6b0a;
  --bad: #d12b2b; --bad-d: #a11d1d; --bad-l: #ffe0e0; --bad-t: #a3171e;
  --gold: #ffc800; --gold-d: #e0a800; --gold-t: #8a6200;
  --fire-t: #b85800;
  --r: 16px; --r-lg: 24px;
  --top: 16px;
  /* gráficos (charts.js) */
  --chart-1: #0a7d74; --chart-muted: #d8f3f0; --grid: #e3e3dd; --axis-ink: #5d6066; --negative: #d12b2b;
  /* etapa por defecto */
  --c: #1c84d0; --d: #1468a6; --t: #125f9a; --l: #dcedfb;
  color-scheme: light;
}
.st-A0, .sec-base { --c: #3d9a1f; --d: #2c7414; --t: #2b7312; --l: #e3f4da; }
.st-A1, .sec-listening { --c: #dd6f00; --d: #ad5600; --t: #9a4d00; --l: #ffeccc; }
.st-A2, .sec-speaking { --c: #e0452b; --d: #b23320; --t: #b5301a; --l: #fde3dc; }
.st-B1, .sec-reading { --c: #c9304f; --d: #9f2340; --t: #a8203f; --l: #fbe0e6; }
.st-B2 { --c: #1c84d0; --d: #1468a6; --t: #125f9a; --l: #dcedfb; }
.st-C1 { --c: #0b9488; --d: #08736a; --t: #08736a; --l: #d8f3f0; }
.st-C2, .sec-writing { --c: #2a2c33; --d: #0f1014; --t: #2a2c33; --l: #e9e9ec; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: 34px; } h2 { font-size: 22px; } h3 { font-size: 20px; }
p { margin: 0 0 .75em; }
a { color: var(--p); text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--p); outline-offset: 3px; border-radius: 6px; }
#main:focus, main:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; }
.center { text-align: center; justify-content: center; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; width: min(100%, 380px); margin: 8px auto 0; }
.err { color: var(--bad-t); font-weight: 700; }
.ok-note { color: var(--ok-t); font-weight: 700; }
.red-text { color: var(--bad-t) !important; }
.eyebrow { display: inline-block; font: 800 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--t); }
.count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; margin-left: 6px; border-radius: 99px; background: var(--soft-2); color: var(--muted); font: 800 14px var(--font); vertical-align: middle; }
.ic { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
.ic.big { width: 48px; height: 48px; }

/* ---------- Truji ---------- */
.truji { display: block; width: 120px; height: auto; user-select: none; pointer-events: none; -webkit-user-drag: none; }
.truji.xs { display: inline-block; width: 30px; margin-right: 8px; vertical-align: middle; }
.truji.mini { width: 64px; }
.truji.md { width: 120px; margin: 0 auto; }
.truji.lg { width: 180px; margin: 0 auto; }
.truji.big { width: 170px; margin: 0 auto; }
.float { animation: float 3.2s ease-in-out infinite; }
.pop-in { animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(209, 43, 43, .45), 0 6px 0 var(--bad-d); } 100% { box-shadow: 0 0 0 26px rgba(209, 43, 43, 0), 0 6px 0 var(--bad-d); } }

.bubble { position: relative; background: var(--white); border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; font-size: 18px; line-height: 1.4; }
.bubble::before { content: ""; position: absolute; left: -11px; top: 50%; width: 18px; height: 18px; background: var(--white); border: 2px solid var(--line); border-right: 0; border-top: 0; transform: translateY(-50%) rotate(45deg); border-radius: 0 0 0 4px; }
.bubble b { display: block; font-weight: 800; }
.bubble span { display: block; color: var(--muted); font-size: 16px; }
.bubble b + span { margin-top: 4px; }
.bubble.big { font-size: 20px; }
.say-row { display: flex; align-items: center; gap: 18px; margin: 4px 0 24px; }
.say-row .truji { width: 104px; flex: none; }
.say-row .bubble { flex: 1; }

/* ---------- botones ---------- */
.btn { --bc: var(--btn); --bd: var(--btn-d); --bt: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border: 0; border-radius: var(--r); background: var(--bc); color: var(--bt); box-shadow: 0 4px 0 var(--bd); font: 700 17px/1.2 var(--font); cursor: pointer; text-align: center; transition: transform .08s, box-shadow .08s, filter .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--bd); }
.btn small { font-size: 14px; opacity: .85; }
.btn .ic { width: 20px; height: 20px; }
.btn.sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; }
.btn.wide { width: 100%; }
.btn.ghost { --bc: var(--white); --bd: var(--line-d); --bt: var(--ink); border: 2px solid var(--line-d); box-shadow: 0 4px 0 var(--line-d); }
.btn.green { --bc: var(--ok); --bd: var(--ok-d); --bt: #fff; }
.btn.red { --bc: var(--bad); --bd: var(--bad-d); --bt: #fff; }
.btn.white { --bc: #fff; --bd: rgba(0, 0, 0, .22); --bt: var(--t); }
.btn.ghost-white { --bc: rgba(0, 0, 0, .2); --bd: rgba(0, 0, 0, .28); --bt: #fff; }
.btn:disabled { --bc: #e7e7e2; --bd: #d2d2cb; --bt: #77776f; cursor: not-allowed; filter: none; border-color: #d2d2cb; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--p); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.x-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--faint); cursor: pointer; }
.x-btn:hover { background: var(--soft); color: var(--ink); }
.x-btn .ic { width: 28px; height: 28px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 16px -6px; padding: 6px; color: var(--muted); font-weight: 800; font-size: 14px; }
.back:hover { color: var(--ink); }

/* ---------- tarjetas y campos ---------- */
.card { background: var(--white); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px; }
.card > h2 { font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; }
.field label, .field legend { font-weight: 800; font-size: 15px; padding: 0; margin-bottom: 4px; }
.input { width: 100%; font: 600 17px/1.4 var(--font); color: var(--ink); padding: 13px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--soft); transition: border-color .15s, background .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--p); background: #fff; box-shadow: 0 0 0 4px rgba(23, 105, 224, .18); }
.input.big { font-size: 22px; padding: 16px 18px; }
textarea.input { resize: vertical; min-height: 110px; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--soft-2); border-radius: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 12px; padding: 10px; font-weight: 800; color: var(--muted); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: #fff; color: var(--p); box-shadow: 0 2px 0 var(--line-d); }
details.more { margin: 14px 0; }
details.more summary { cursor: pointer; color: var(--p); font-weight: 800; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details.more[open] summary::before { transform: rotate(45deg); }
details.more > :not(summary) { margin-top: 10px; }
.pre, .taskbox { white-space: pre-wrap; }
.taskbox { background: var(--soft); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; font: 500 15px/1.6 var(--font); margin: 0 0 16px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 300; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 800; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 400; }

/* ---------- armazón ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 26px/1 var(--display); color: var(--ink); letter-spacing: -.01em; }
.logo img { width: 40px; height: 40px; }
.side { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 240px; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--white); border-right: 2px solid var(--line); }
.side-logo { padding: 4px 12px 22px; }
.side a:not(.side-logo), .tabbar a { position: relative; display: flex; align-items: center; gap: 16px; padding: 9px 14px; border: 2px solid transparent; border-radius: 14px; color: var(--muted); font: 700 16px var(--font); }
.side a .ic { width: 34px; height: 34px; }
.side a:not(.side-logo):hover { background: var(--soft); }
.side a[aria-current="page"], .tabbar a[aria-current="page"] { background: var(--pl); border-color: var(--ps); color: var(--pd); }
.dot { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: auto; border-radius: 99px; background: var(--bad); color: #fff; font: 800 12px var(--font); letter-spacing: 0; }
.tabbar { display: none; }
.mtop { display: none; }
.frame { margin-left: 240px; padding: 0 32px; display: flex; justify-content: center; align-items: flex-start; gap: 48px; }
.main { width: min(600px, 100%); padding: 28px 0 80px; min-width: 0; }
.frame.wide .main { width: min(920px, 100%); }
.rail { position: sticky; top: 0; width: 340px; flex: none; padding: 24px 0 40px; display: flex; flex-direction: column; gap: 16px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
.rail .card { margin: 0; padding: 18px 20px; }
.rail h2 { font-size: 19px; margin-bottom: 2px; }
.rail .muted { font-size: 15px; margin: 0 0 10px; }
.rail-foot { color: var(--faint); font-size: 13px; text-align: center; }
.stats { display: flex; justify-content: space-between; gap: 6px; }
.chip-stat { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; font: 800 18px var(--font); color: var(--ink); }
.chip-stat .ic { width: 28px; height: 28px; }
.chip-stat.fire b { color: var(--fire-t); }
.chip-stat.xp b { color: var(--gold-t); }
.chip-stat.fire.off { filter: grayscale(1); opacity: .6; }
a.chip-stat:hover { background: var(--soft); }
.stage-dot { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 10px; background: var(--t); color: #fff; font: 700 15px var(--display); letter-spacing: .02em; box-shadow: 0 3px 0 var(--d); }
.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal-now { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.goal-now b { color: var(--ink); }
.stage-strip { display: flex; gap: 4px; margin-top: 4px; }
.stage-strip i { flex: 1; height: 10px; border-radius: 99px; background: var(--line) linear-gradient(var(--c), var(--c)) 0 0 / calc(var(--f) * 100%) 100% no-repeat; }
.notebook, .save { display: flex; gap: 14px; align-items: flex-start; }
.notebook .ic.big { width: 44px; height: 44px; }
.ring { --ringc: var(--c); position: relative; width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ringc) calc(var(--p) * 1turn), var(--line) 0); }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--white); }
.ring b { position: relative; font: 700 24px/1 var(--display); }
.ring small { font-size: .6em; color: var(--muted); }
.goal .ring { --ringc: var(--ok); }

/* ---------- el camino ---------- */
.path { position: relative; padding-bottom: 40px; }
.stage { padding-top: 8px; }
.stage + .stage { margin-top: 36px; }
.stage-head { text-align: center; padding: 24px 12px 20px; }
.stage-head h2 { font-size: 30px; margin: 6px 0 4px; }
.stage-head p { color: var(--muted); max-width: 420px; margin: 0 auto 14px; }
.bar { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); min-width: 0; }
.stage-head .bar { max-width: 280px; margin: 0 auto; }
.unit { margin-top: 18px; }
.unit-banner { position: sticky; top: var(--top); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 20px; border-radius: 18px; background: var(--c); color: #fff; box-shadow: 0 5px 0 var(--d); }
.unit-banner h3 { font-size: 21px; font-weight: 700; margin: 6px 0 0; color: #fff; } /* 700 y ≥ 19 px: texto grande, basta 3:1 sobre el color de la etapa */
.unit-banner .eyebrow, .hero-banner .eyebrow { color: #fff; background: rgba(0, 0, 0, .2); padding: 4px 9px; border-radius: 8px; }
.guide-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); color: #fff; font: 800 14px var(--font); box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.guide-btn:hover { background: rgba(0, 0, 0, .28); }
.guide-btn .ic { width: 20px; height: 20px; }
.unit.passed .unit-banner { background: var(--d); }
.nodes { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px 0 28px; }
.node-wrap.tip { margin-top: 50px; }
.node-wrap { position: relative; transform: translateX(calc(var(--x) * 1px)); }
.node-wrap.open { z-index: 5; }
.node { position: relative; display: grid; place-items: center; width: 74px; height: 70px; border: 0; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 7px 0 var(--d); cursor: pointer; transition: transform .08s, box-shadow .08s, filter .15s; -webkit-tap-highlight-color: transparent; }
.node .ic { width: 34px; height: 34px; }
.node:hover { filter: brightness(1.07); }
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--d); }
.node:focus-visible { outline: 4px solid var(--ink); outline-offset: 8px; border-radius: 50%; }
.node.current::before { content: ""; position: absolute; inset: -11px -11px -18px; border-radius: 50%; border: 6px solid var(--l); z-index: -1; }
.node.locked { background: #e3e3de; color: #9a9a92; box-shadow: 0 7px 0 #c9c9c1; }
.node.locked:active { box-shadow: 0 2px 0 #c9c9c1; }
.node.exam { width: 84px; height: 80px; }
.node.exam .ic { width: 40px; height: 40px; }
.node.exam.done { background: var(--gold); color: #8a5a00; box-shadow: 0 7px 0 var(--gold-d); }
.node-wrap.exam { margin-top: 6px; }
.start-tip { position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--t); font: 800 14px var(--font); animation: bob 1.6s ease-in-out infinite; pointer-events: none; }
.start-tip::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: #fff; border: 2px solid var(--line); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }
.unit-art { position: absolute; top: 50%; transform: translateY(-50%); }
.unit-art.left { left: 2%; } .unit-art.right { right: 2%; }
.unit-art .truji { width: 128px; }
.unit-art.right .truji { transform: scaleX(-1); }
.unit:not(.active):not(.passed) .unit-art { opacity: .5; filter: grayscale(.5); }
.pop { position: absolute; z-index: 20; top: calc(100% + 18px); left: 50%; width: min(310px, calc(100vw - 32px)); transform: translateX(calc(-50% - var(--x) * 1px)); padding: 18px; border-radius: 18px; background: var(--t); color: #fff; box-shadow: 0 5px 0 var(--d), 0 12px 32px rgba(0, 0, 0, .14); text-align: left; animation: drop .18s ease-out both; }
@keyframes drop { from { opacity: 0; margin-top: -10px; } }
.pop::before { content: ""; position: absolute; top: -8px; left: calc(50% + var(--x) * 1px); width: 16px; height: 16px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.pop-title { display: block; font: 600 20px/1.2 var(--display); margin-bottom: 4px; }
.pop p { margin: 0 0 14px; font-size: 15px; }
.pop .btn { width: 100%; --bc: #fff; --bt: var(--t); --bd: rgba(0, 0, 0, .25); }
.pop .btn:disabled { --bc: rgba(255, 255, 255, .22); --bt: #fff; --bd: rgba(0, 0, 0, .15); }
.pop.locked { background: var(--soft); color: var(--ink); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line-d); }
.pop.locked::before { background: var(--soft); border: 2px solid var(--line); border-right: 0; border-bottom: 0; top: -9px; }
.pop.locked .btn:disabled { --bc: #e7e7e2; --bt: #77776f; --bd: #d2d2cb; }
.pop-note { font-size: 15px; color: var(--muted); }
.path-end { text-align: center; padding: 48px 16px 24px; }
.path-end h2 { font-size: 28px; margin-top: 12px; }

/* ---------- páginas ---------- */
.page { padding-bottom: 24px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { font-size: 17px; }
.hero-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 28px; margin-bottom: 28px; border-radius: var(--r-lg); background: var(--c); color: #fff; box-shadow: 0 6px 0 var(--d); overflow: hidden; }
.hero-banner.sec { background: var(--t); }
.hero-banner h1 { color: #fff; font-size: 32px; margin: 10px 0 12px; }
.hero-banner p { font-size: 17px; max-width: 560px; }
.hero-banner .truji { width: 150px; flex: none; margin: -6px -6px -40px 0; }
.lead { font-size: 18px; }
.examples li, .vocab li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 2px solid var(--soft-2); }
.examples li:first-child, .vocab li:nth-child(-n + 2) { border-top: 0; }
.examples p { margin: 0; }
.examples p[lang="en"] { font-weight: 800; font-size: 17px; }
.say { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--l); color: var(--t); cursor: pointer; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 35%, transparent); }
.say:hover { filter: brightness(.97); }
.say:active { transform: translateY(3px); box-shadow: none; }
.say .ic { width: 22px; height: 22px; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.letter { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border: 2px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; }
.letter b { font: 600 30px/1 var(--display); color: var(--t); }
.letter span { font-size: 14px; color: var(--muted); font-weight: 700; }
.letter:active { transform: translateY(4px); box-shadow: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.rules li, .mistakes li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 2px solid var(--soft-2); }
.rules li:first-child, .mistakes li:first-child { border-top: 0; }
.rules span { color: var(--muted); }
.mistakes s { color: var(--bad-t); text-decoration-thickness: 2px; }
.mistakes b { color: var(--ok-t); }
.mistakes span { color: var(--muted); font-size: 15px; }
.tipcard { display: flex; gap: 16px; align-items: center; background: var(--l); border-color: transparent; }
.tipcard p { margin: 0; }
.vocab { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.vocab div { display: flex; flex-direction: column; }
.vocab b { font-size: 17px; }
.vocab span { color: var(--muted); }
.vocab em { font-size: 14px; color: var(--faint); }
.topic { margin-bottom: 34px; }
.topic > h2 { font-size: 24px; margin-bottom: 2px; }
.unit-cards, .guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }
.unit-card, .guide-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 0 var(--line); color: var(--ink); transition: transform .1s, border-color .15s; }
.unit-card:hover, .guide-card:hover { border-color: var(--c); transform: translateY(-2px); }
.unit-card b, .guide-card b { font-size: 17px; line-height: 1.3; }
.unit-card .muted, .guide-card .muted { font-size: 14px; }
.uc-badge, .sec-tag { align-self: flex-start; padding: 3px 9px; border-radius: 8px; background: var(--t); color: #fff; font: 700 13px var(--display); letter-spacing: .04em; }
.uc-ok { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; }
.uc-ok .ic { width: 16px; height: 16px; }
.steps { padding-left: 22px; }
.steps li { padding: 6px 0 6px 4px; }
.steps li::marker { font-weight: 800; color: var(--t); }
.traps li { position: relative; padding: 6px 0 6px 24px; }
.traps li::before { content: "!"; position: absolute; left: 0; top: 8px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--bad-l); color: var(--bad-t); font: 800 12px var(--font); }

/* práctica */
.review-hero { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, #fff 55%, var(--bad-l)); }
.review-hero .truji { width: 120px; flex: none; }
.review-hero h2 { font-size: 23px; }
.lv-pick { display: flex; align-items: center; gap: 6px; margin: 26px 0 8px; overflow-x: auto; padding-bottom: 4px; }
.lv-pick .muted { font-weight: 800; margin-right: 6px; }
.lv-pick button { min-width: 50px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: 700 16px var(--display); color: var(--muted); cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.lv-pick button[aria-pressed="true"] { background: var(--pl); border-color: var(--ps); color: var(--pd); box-shadow: 0 3px 0 var(--ps); }
.skill { margin-top: 22px; }
.skill h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.skill h2 i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.skill-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.skill-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; border: 2px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; transition: transform .1s, border-color .15s; }
.skill-tile:hover { border-color: var(--c); }
.skill-tile:active { transform: translateY(4px); box-shadow: none; }
.st-ic { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 14px; background: var(--l); color: var(--t); }
.st-ic .ic { width: 28px; height: 28px; }
.skill-tile b { font-size: 17px; }
.skill-tile .muted { font-size: 14px; }
.skill-tile .n { margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--t); }
.nb-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 2px solid var(--soft-2); }
.nb-list li:first-child { border-top: 0; }
.nb-list div { display: flex; flex-direction: column; min-width: 0; }
.nb-list b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.nb-list span[lang] { color: var(--muted); font-size: 14px; }
.box { color: var(--gold-d); letter-spacing: 2px; font-size: 12px; }
.due { font-size: 14px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.due.now { color: var(--bad-t); }

/* progreso */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 20px; background: #fff; }
.kpi .ic { width: 34px; height: 34px; margin-bottom: 4px; }
.kpi b { font: 600 32px/1.1 var(--display); }
.kpi b small { font-size: .55em; color: var(--muted); }
.kpi span { color: var(--muted); font-size: 14px; font-weight: 700; }
.kpi.units .ic { color: var(--gold-d); }
.kpi.acc .ic { color: var(--ok); }
.stage-list li { display: grid; grid-template-columns: auto 1fr 56px; gap: 14px; align-items: center; padding: 8px 0; }
.stage-list b { display: block; margin-bottom: 4px; }
.stage-list em { font-style: normal; font-weight: 800; color: var(--muted); text-align: right; }
.bands { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.band-row { display: grid; grid-template-columns: 90px 1fr 40px; gap: 12px; align-items: center; }
.band-row span { font-weight: 800; font-size: 15px; }
.band-row em { font: 600 18px var(--display); font-style: normal; text-align: right; }
.band-row.total { --c: var(--ink); }
.band-track { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.band-track i { height: 16px; border-radius: 5px; background: var(--line); }
.band-track i.on { background: var(--c); }
.band-track i.half { background: linear-gradient(90deg, var(--c) 50%, var(--line) 50%); }
.band-track .target { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.placement-card, .setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.placement-card p, .setting p { margin: 0; }
.setting h2 { margin-bottom: 2px; font-size: 19px; }
.danger h2 { color: var(--bad-t); }
.chart { width: 100%; }

/* perfil */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-head h1 { margin: 0 0 2px; }
.profile-head p { margin: 0; }
.avatar { display: grid; place-items: center; width: 84px; height: 84px; flex: none; border-radius: 50%; background: var(--p); color: #fff; font: 600 32px var(--display); box-shadow: 0 5px 0 var(--pd); }
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-pick label { position: relative; cursor: pointer; }
.chips-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips-pick span { display: inline-flex; gap: 6px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); font-weight: 700; box-shadow: 0 3px 0 var(--line); }
.chips-pick b { color: var(--ink); }
.chips-pick input:checked + span { background: var(--pl); border-color: var(--ps); color: var(--pd); box-shadow: 0 3px 0 var(--ps); }
.chips-pick input:checked + span b { color: var(--pd); }
.chips-pick input:focus-visible + span { outline: 3px solid var(--p); outline-offset: 2px; }
.switch { position: relative; width: 56px; height: 32px; flex: none; border: 0; border-radius: 99px; background: var(--line-d); cursor: pointer; transition: background .15s; }
.switch i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"] i { transform: translateX(24px); }

/* ---------- pantallas centradas: carga, examen de nivel, fin ---------- */
.center-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; text-align: center; max-width: 640px; margin: 0 auto; }
.center-screen.narrow { max-width: 540px; }
.center-screen h1 { font-size: 34px; margin: 10px 0 2px; }
.center-screen > p { font-size: 17px; max-width: 480px; }
.start-card { display: flex; flex-direction: column; gap: 2px; width: min(100%, 380px); padding: 16px 20px; margin: 8px 0; border: 2px solid var(--c); border-radius: 20px; background: var(--l); box-shadow: 0 4px 0 var(--c); }
.start-card b { font: 600 20px var(--display); color: var(--t); }
.end-stats { display: flex; gap: 12px; justify-content: center; margin: 12px 0 4px; }
.end-stat { --sc: var(--gold); --st: #5c4300; width: 110px; border: 2px solid var(--sc); border-radius: 18px; overflow: hidden; background: #fff; }
.end-stat span { display: block; padding: 5px 4px; background: var(--sc); color: var(--st); font: 800 12px var(--font); text-transform: uppercase; letter-spacing: .08em; }
.end-stat b { display: block; padding: 10px 4px 12px; font: 600 24px var(--display); color: var(--ink); }
.end-stat.acc { --sc: var(--ok); --st: #fff; }
.end-stat.time { --sc: var(--p); --st: #fff; }
.score.ring.big { width: 140px; height: 140px; margin: 10px 0; --ringc: var(--c); }
.score.ring.big::before { inset: 13px; }
.score.ring.big b { font-size: 40px; }
.wrong-list { width: min(100%, 460px); }
.wrong-list ul { text-align: left; border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 4px 14px; max-height: 280px; overflow: auto; }
.wrong-list li { display: flex; flex-direction: column; padding: 10px 0; border-top: 2px solid var(--soft-2); }
.wrong-list li:first-child { border-top: 0; }
.wrong-list span { color: var(--muted); font-size: 14px; }
.exam-rules { width: min(100%, 460px); text-align: left; margin: 10px 0 12px; }
.exam-rules li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 2px solid var(--soft-2); }
.exam-rules li:first-child { border-top: 0; }
.exam-rules .ic { width: 28px; height: 28px; color: var(--t); flex: none; margin-top: 2px; }

/* ---------- jugar ---------- */
.play, .ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.play-top { display: flex; align-items: center; gap: 16px; width: min(1000px, 100%); margin: 0 auto; padding: 22px 20px 10px; }
.pbar { flex: 1; height: 18px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pbar i { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .4s cubic-bezier(.3, 1.3, .5, 1); }
.pbar i::after { content: ""; position: absolute; left: 10px; right: 10px; top: 4px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .35); }
.is-exam .pbar i { background: var(--gold); }
.combo { display: inline-flex; align-items: center; gap: 4px; min-width: 56px; font: 800 18px var(--font); color: var(--fire-t); animation: popIn .3s ease-out both; }
.combo-ph { min-width: 56px; }
.play-body { flex: 1; padding: 12px 20px 190px; }
.ex { width: min(640px, 100%); margin: 0 auto; }
.ex-tag { margin: 6px 0 2px; font: 800 13px var(--font); color: var(--t); text-transform: uppercase; letter-spacing: .08em; }
.ex-title { font-size: 30px; margin: 4px 0 22px; }
.opts { display: grid; gap: 12px; }
.opts.big { grid-template-columns: 1fr 1fr; }
.opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: 0 4px 0 var(--line); font: 700 18px/1.3 var(--font); color: var(--ink); text-align: left; cursor: pointer; transition: transform .08s, box-shadow .08s, background .12s, border-color .12s; -webkit-tap-highlight-color: transparent; }
.opt:hover:not(:disabled) { background: var(--soft); }
.opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.key { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 2px solid var(--line); border-radius: 9px; color: var(--faint); font: 800 14px var(--font); }
.opts.big .opt { flex-direction: column; justify-content: center; min-height: 116px; font: 600 42px/1 var(--display); }
.opts.big .key { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; font-size: 13px; }
.opt.sel { border-color: var(--ps); background: var(--pl); color: var(--t); box-shadow: 0 4px 0 var(--ps); }
.opt.sel .key { border-color: var(--ps); color: var(--t); }
.opt.right { border-color: #8ccf6b; background: #e5f7d9; color: var(--ok-t); box-shadow: 0 4px 0 #8ccf6b; opacity: 1; }
.opt.right .key { border-color: #8ccf6b; color: var(--ok-t); }
.opt.wrong { border-color: #f09a9c; background: #ffe3e3; color: var(--bad-t); box-shadow: 0 4px 0 #f09a9c; opacity: 1; }
.opt.wrong .key { border-color: #f09a9c; color: var(--bad-t); }
.opt.dim { opacity: .5; }
.opt:disabled { cursor: default; }
.listen { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 8px 0 26px; }
.listen details.more { margin: 0; text-align: center; }
.audio-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.audio-btn { display: grid; place-items: center; width: 92px; height: 92px; border: 0; border-radius: 26px; background: var(--p); color: #fff; box-shadow: 0 6px 0 var(--pd); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.audio-btn .ic { width: 46px; height: 46px; }
.audio-btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--pd); }
.audio-btn.slow { width: 62px; height: 62px; border-radius: 18px; background: #fff; color: var(--p); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.audio-btn.slow .ic { width: 28px; height: 28px; }
.input.answer { font-size: 20px; padding: 16px 18px; background: #fff; }
textarea.input.answer { min-height: 130px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mine { padding: 14px 16px; border-radius: 14px; background: var(--soft); }
.mine p { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.mine span { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mic { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px auto 14px; padding: 0; border: 0; background: none; cursor: pointer; font: 800 16px var(--font); color: var(--p); }
.mic .ic { box-sizing: content-box; width: 46px; height: 46px; padding: 30px; border-radius: 50%; background: var(--p); color: #fff; box-shadow: 0 6px 0 var(--pd); }
.mic.on { color: var(--bad-t); }
.mic.on .ic { background: var(--bad); animation: pulse 1.2s ease-out infinite; }
.dialog { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.dialog p { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 18px; }
.who { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--p); color: #fff; font: 700 15px var(--display); }
.who.b { background: var(--c); }
.answer-line { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; min-height: 128px; padding: 6px 0; margin-bottom: 22px; background: repeating-linear-gradient(transparent 0 60px, var(--line) 60px 62px); }
.placeholder { align-self: center; color: var(--faint); font-weight: 700; padding: 14px 4px; }
.bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile { padding: 11px 15px; border: 2px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--line); font: 700 18px var(--font); color: var(--ink); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.tile:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.tile.ghost { background: var(--soft-2); border-color: var(--soft-2); box-shadow: none; color: transparent; cursor: default; }
.tile:disabled { cursor: default; }
.passage { font-size: 18px; line-height: 2.3; }
.gap { white-space: nowrap; }
.gap input { width: calc(var(--n) * 1ch + 18px); min-width: 34px; padding: 1px 4px; border: 0; border-bottom: 3px solid var(--line-d); background: var(--soft); border-radius: 6px 6px 0 0; font: 700 18px var(--font); color: var(--ink); }
.gap input:focus { outline: none; border-color: var(--p); background: var(--pl); }
.gap.right input { border-color: var(--ok); background: #e5f7d9; color: var(--ok-t); }
.gap.wrong input { border-color: var(--bad); background: #ffe3e3; color: var(--bad-t); text-decoration: line-through; }
.gap em { margin-left: 4px; font-style: normal; font-weight: 800; color: var(--ok-t); }
.checks { border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 16px 0 0; background: #fff; }
.checks legend { font-weight: 800; padding: 0 6px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.checks input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); }

/* tarjeta de palabra o letra nueva */
.flash { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 22px 22px; border: 2px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: 0 5px 0 var(--line); text-align: center; }
.flash-n { font-size: 13px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.flash-word p { margin: 0; }
.flash-word p[lang] { font: 600 46px/1.1 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.flash-es { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
.flash-es b { color: var(--t); }
.note { margin: 0; color: var(--muted); font-size: 15px; }
.flash-ex { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--l); text-align: left; }
.flash-ex p { margin: 0; }
.flash-ex p[lang] { font-weight: 800; font-size: 17px; }
.flash-ex .say { background: #fff; }
mark { background: #ffe58a; color: inherit; border-radius: 4px; padding: 0 2px; }
.big-letter { font: 600 120px/1 var(--display); color: var(--t); }
.big-letter small { font-size: .55em; color: var(--muted); margin-left: 8px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.dots button { padding: 6px 12px; border: 2px solid var(--line); border-radius: 99px; background: #fff; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.dots button.seen { background: var(--l); border-color: transparent; color: var(--t); }
.dots button.on { background: var(--c); border-color: var(--c); color: #fff; }
.letters-dots button { min-width: 40px; font: 600 17px var(--display); }
.examples + details.more, .ex .examples { margin-top: 6px; }
.ex .examples { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 6px 16px; }

/* barra inferior del ejercicio */
.play-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-top: 2px solid var(--line); background: #fff; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); transition: background .15s; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(1000px, 100%); margin: 0 auto; }
.foot-in > .btn { min-width: 180px; }
.kbd { color: var(--faint); font-size: 14px; font-weight: 700; }
.play-foot.ok { background: var(--ok-l); border-color: transparent; }
.play-foot.bad { background: var(--bad-l); border-color: transparent; }
.play-foot.ok .fb-text { color: var(--ok-t); }
.play-foot.bad .fb-text { color: var(--bad-t); }
.fb-text { display: flex; gap: 16px; align-items: center; min-width: 0; }
.fb-text b { display: block; font: 600 24px/1.2 var(--display); }
.fb-text p { margin: 4px 0 0; font-size: 16px; color: var(--ink); }
.fb-text p b { display: inline; font: 800 16px var(--font); }
.fb-text .answer-shown { font-size: 18px; font-weight: 800; color: inherit; }
.fb-ic { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: #fff; }
.fb-ic .ic { width: 34px; height: 34px; }
.play-foot.self .fb-text { display: block; }
.play-foot.self .fb-text > b { font-size: 20px; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(35, 30, 20, .55); animation: fade .15s both; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(100%, 400px); padding: 26px 24px 24px; border-radius: var(--r-lg); background: #fff; text-align: center; animation: popIn .25s ease-out both; }
.modal-card h2 { font-size: 24px; margin-top: 8px; }

/* ---------- registro guiado ---------- */
.ob-body { width: min(620px, 100%); margin: 0 auto; padding: 24px 20px 160px; }
.ob-opts { display: grid; gap: 12px; }
.opt-card { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--line); text-align: left; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.opt-card:hover { background: var(--soft); }
.opt-card:active { transform: translateY(4px); box-shadow: none; }
.opt-card b { display: block; font-size: 18px; }
.opt-card span span { color: var(--muted); font-size: 15px; }
.opt-card[aria-pressed="true"] { border-color: var(--ps); background: var(--pl); box-shadow: 0 4px 0 var(--ps); }
.lvbars { display: flex; align-items: flex-end; gap: 3px; width: 34px; height: 30px; flex: none; }
.lvbars i { flex: 1; border-radius: 3px; background: var(--line); }
.lvbars i:nth-child(1) { height: 30%; } .lvbars i:nth-child(2) { height: 55%; } .lvbars i:nth-child(3) { height: 78%; } .lvbars i:nth-child(4) { height: 100%; }
.lvbars i.on { background: var(--p); }
.lvbars.q { align-items: center; justify-content: center; border-radius: 50%; background: var(--soft-2); font: 700 18px var(--display); color: var(--muted); }

/* ---------- cuenta ---------- */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 96px 20px 40px; background: radial-gradient(circle at 15% 10%, #fff1c2 0 120px, transparent 121px), radial-gradient(circle at 90% 85%, #d8f3f0 0 160px, transparent 161px), var(--bg); }
.auth > .x-btn { position: absolute; top: 18px; left: 18px; }
.auth-card { width: min(100%, 420px); padding: 0 28px 28px; border: 2px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 6px 0 var(--line); text-align: center; }
.auth-card .truji.auth-art { width: 118px; margin: -78px auto 8px; }
.auth-card h1 { font-size: 30px; margin-bottom: 18px; }
.auth-card form { text-align: left; }
.auth-card .row.center { margin-top: 14px; }
.auth-card > .hint { margin: 18px 0 0; }

/* ---------- portada ---------- */
.lp { overflow: hidden; }
.lp-top { display: flex; align-items: center; justify-content: space-between; width: min(1120px, 100%); margin: 0 auto; padding: 20px 24px; }
.lp-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; width: min(1120px, 100%); margin: 0 auto; padding: 24px 24px 56px; }
.lp-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.lp-art::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, #ffeeb3, #fff6d6 60%, transparent 70%); }
.lp-art .truji.hero { position: relative; width: 300px; animation: float 4s ease-in-out infinite; }
.fl { position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; color: #fff; font: 700 26px var(--display); box-shadow: 0 5px 0 rgba(0, 0, 0, .15); animation: float 3.4s ease-in-out infinite; }
.f1 { top: 8%; left: 10%; background: #3d9a1f; transform: rotate(-10deg); }
.f2 { top: 16%; right: 6%; background: #e0452b; width: 76px; font-size: 22px; animation-delay: -.8s; }
.f3 { bottom: 12%; left: 4%; background: #1c84d0; animation-delay: -1.6s; }
.f4 { bottom: 6%; right: 14%; background: #dd6f00; animation-delay: -2.2s; }
.lp-copy h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 18px; }
.lp-copy p { font-size: 20px; color: var(--muted); max-width: 500px; margin-bottom: 28px; }
.lp-cta { display: flex; flex-direction: column; gap: 12px; width: min(100%, 360px); }
.lp-stages { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(1120px, 100%); margin: 0 auto; padding: 22px 24px; border-block: 2px solid var(--line); }
.lp-stages span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border: 2px solid var(--line); border-radius: 99px; background: #fff; font-weight: 800; font-size: 15px; }
.lp-stages b { display: grid; place-items: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 99px; background: var(--t); color: #fff; font: 700 14px var(--display); }
.lp-stages .toefl b { background: var(--ink); color: var(--gold); }
.lp-stages .toefl .ic { width: 18px; height: 18px; }
.lp-feat { width: min(980px, 100%); margin: 0 auto; padding: 40px 24px; }
.lp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; }
.lp-row.flip > :first-child { order: 2; }
.lp-row h2 { font-size: 34px; letter-spacing: -.01em; }
.lp-row p { font-size: 18px; color: var(--muted); }
.lp-demo { display: grid; place-items: center; min-height: 260px; padding: 28px; border: 2px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 6px 0 var(--line); }
.path-demo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.d-node { display: grid; place-items: center; width: 56px; height: 52px; border-radius: 50%; background: #3d9a1f; color: #fff; box-shadow: 0 5px 0 #2c7414; }
.d-node .ic { width: 26px; height: 26px; }
.d-node:nth-child(1) { transform: translateX(-30px); } .d-node:nth-child(2) { transform: translateX(14px); } .d-node:nth-child(3) { transform: translateX(44px); } .d-node:nth-child(4) { transform: translateX(14px); } .d-node:nth-child(5) { transform: translateX(-30px); }
.d-node.cur { background: #dd6f00; box-shadow: 0 5px 0 #ad5600, 0 0 0 7px #fff1c2, 0 5px 0 7px #fff1c2; }
.d-node.r:not(.done) { background: #e3e3de; color: #9a9a92; box-shadow: 0 5px 0 #c9c9c1; }
.d-node.ex { width: 64px; height: 60px; background: var(--gold); color: #8a5a00; box-shadow: 0 5px 0 var(--gold-d); }
.talk { display: flex; align-items: flex-end; gap: 10px; }
.talk .truji { width: 120px; flex: none; }
.talk .bubble { font-size: 17px; margin-bottom: 40px; }
.talk .bubble b { display: inline; }
.talk .bubble::before { top: 70%; }
.exam-demo { display: flex; gap: 20px; align-items: center; justify-content: center; }
.exam-demo .ring { --ringc: var(--ok); width: 110px; height: 110px; }
.exam-demo .ring b { font-size: 32px; }
.exam-demo > div:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.exam-demo > div:last-child b { font: 600 22px var(--display); }
.exam-demo > div:last-child span { color: var(--muted); }
.exam-demo .pill { margin-top: 6px; padding: 4px 12px; border-radius: 99px; background: var(--gold); color: #5c4300 !important; font-weight: 800; }
.types { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: center; }
.ty { padding: 10px 18px; border-radius: 14px; color: #fff; font: 600 19px var(--display); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.ty.t0 { background: #9a4d00; transform: rotate(-4deg); } .ty.t1 { background: #b5301a; transform: rotate(3deg); } .ty.t2 { background: #2a2c33; transform: rotate(-2deg); }
.ty.t3 { background: #125f9a; transform: rotate(4deg); } .ty.t4 { background: #2c7414; transform: rotate(-3deg); } .ty.t5 { background: #a8203f; transform: rotate(2deg); }
.lp-name { display: flex; gap: 32px; align-items: center; width: min(900px, calc(100% - 48px)); margin: 20px auto 60px; padding: 32px; border-radius: 28px; background: #fff6d6; }
.lp-name .truji { width: 170px; flex: none; }
.lp-name h2 { font-size: 30px; }
.lp-name p { font-size: 17px; }
.lp-name .btn { width: auto; margin-top: 8px; }
.lp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; width: min(1120px, 100%); margin: 0 auto; padding: 24px; border-top: 2px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- pantallas medianas: sin columna derecha, menú de iconos ---------- */
@media (max-width: 1159px) {
  .side { width: 92px; align-items: center; padding: 18px 10px; }
  .side-logo { padding: 4px 0 18px; }
  .side-logo .logo { font-size: 0; gap: 0; }
  .side a:not(.side-logo) { padding: 10px; justify-content: center; }
  .side a:not(.side-logo) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side .dot { position: absolute; top: 2px; right: 2px; }
  .frame { margin-left: 92px; padding: 0 24px; }
  .rail { display: none; }
  .mtop { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-left: 92px; padding: 8px 20px; background: rgba(255, 252, 246, .94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
  .mtop .chip-stat { padding: 6px 8px; }
  :root { --top: 72px; }
  .main { padding-top: 20px; }
}

/* ---------- teléfono ---------- */
@media (max-width: 699px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  .side { display: none; }
  .mtop { margin-left: 0; padding: 6px 12px; }
  .frame { margin-left: 0; padding: 0 16px; }
  .main { padding: 16px 0 110px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid var(--line); }
  .tabbar a { flex-direction: column; gap: 2px; padding: 6px 4px; min-width: 60px; font-size: 10px; letter-spacing: .04em; }
  .tabbar a .ic { width: 30px; height: 30px; }
  .tabbar .dot { position: absolute; top: 0; right: 8px; min-width: 18px; height: 18px; font-size: 11px; }
  :root { --top: 66px; }
  .unit-banner { padding: 12px 12px 12px 16px; }
  .unit-banner h3 { font-size: 19px; }
  .guide-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .guide-btn { padding: 10px; }
  .unit-art .truji { width: 86px; }
  .unit-art.left { left: 0; } .unit-art.right { right: 0; }
  .stage-head h2 { font-size: 26px; }
  .hero-banner { flex-direction: column; align-items: flex-start; padding: 22px 20px 0; }
  .hero-banner .truji { width: 120px; align-self: flex-end; margin: -20px 0 -26px; }
  .hero-banner h1 { font-size: 27px; }
  .two, .vocab { grid-template-columns: 1fr; }
  .vocab li:nth-child(2) { border-top: 2px solid var(--soft-2); }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 28px; }
  .card { padding: 18px 16px; border-radius: 20px; }
  .placement-card, .setting { flex-direction: column; align-items: flex-start; }
  .review-hero { flex-direction: column; text-align: center; }
  .review-hero .row { justify-content: center; }
  .band-row { grid-template-columns: 74px 1fr 34px; gap: 8px; }
  .play-top { padding: 14px 12px 6px; gap: 10px; }
  .play-body { padding: 8px 16px 210px; }
  .ex-title { font-size: 24px; margin-bottom: 16px; }
  .say-row { gap: 12px; margin-bottom: 18px; }
  .say-row .truji { width: 78px; }
  .bubble, .bubble.big { font-size: 17px; }
  .opt { min-height: 56px; font-size: 17px; }
  .opts.big .opt { min-height: 100px; font-size: 36px; }
  .flash-word p[lang] { font-size: 38px; }
  .big-letter { font-size: 96px; }
  .pair { grid-template-columns: 1fr; }
  .play-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .foot-in { flex-direction: column; align-items: stretch; gap: 12px; }
  .foot-in > .btn, .foot-in > .row .btn { width: 100%; min-width: 0; }
  .foot-in > .row { flex-wrap: nowrap; }
  .foot-in > .row .btn { flex: 1; padding-inline: 10px; font-size: 14px; }
  .foot-in > span:empty { display: none; }
  .foot-in > .btn.ghost { order: 2; }
  .kbd { display: none; }
  .fb-ic { width: 46px; height: 46px; }
  .fb-ic .ic { width: 26px; height: 26px; }
  .fb-text b { font-size: 21px; }
  .end-stats { gap: 8px; }
  .end-stat { width: 96px; }
  .center-screen h1 { font-size: 28px; }
  .lp-top { padding: 14px 16px; }
  .lp-hero { grid-template-columns: 1fr; gap: 8px; padding: 8px 20px 40px; text-align: center; }
  .lp-art { min-height: 300px; }
  .lp-art::before { width: 280px; height: 280px; }
  .lp-art .truji.hero { width: 210px; }
  .fl { width: 50px; height: 50px; font-size: 20px; border-radius: 14px; }
  .f2 { width: 60px; font-size: 17px; }
  .lp-copy p { font-size: 18px; margin-inline: auto; }
  .lp-cta { margin: 0 auto; }
  .lp-stages { padding: 18px 16px; gap: 8px; }
  .lp-stages span { font-size: 14px; }
  .lp-feat { padding: 16px 20px; }
  .lp-row { grid-template-columns: 1fr; gap: 22px; padding: 28px 0; }
  .lp-row.flip > :first-child { order: 0; }
  .lp-row h2 { font-size: 27px; }
  .lp-demo { min-height: 220px; padding: 22px 16px; }
  .talk .truji { width: 92px; }
  .lp-name { flex-direction: column; text-align: center; padding: 26px 20px; width: calc(100% - 32px); }
  .lp-name .truji { width: 130px; }
  .lp-foot { flex-direction: column; padding: 20px; }
  .auth-card { padding: 0 20px 24px; }
}

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

/* ---------- lecturas, audios largos, cronómetro y simulacro ---------- */
.reading { max-height: 46vh; overflow-y: auto; margin: 0 0 18px; padding: 18px 20px; border: 2px solid var(--line); border-radius: 18px; background: #fff; font-size: 17px; line-height: 1.65; }
.reading h2 { font-size: 19px; margin-bottom: 10px; }
.q-n { margin: 0 0 2px; font-size: 13px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.q { margin: 0 0 14px; font-size: 19px; font-weight: 700; }
.timer { display: inline-block; min-width: 56px; padding: 2px 10px; border-radius: 99px; background: var(--soft-2); color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.timer.over { background: var(--bad-l); color: var(--bad-t); }
.mock-card { display: flex; gap: 20px; align-items: center; }
.mock-card .truji { width: 110px; flex: none; }
.mock-bands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; margin: 14px 0; }
.mock-bands li { padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: center; }
.mock-bands span { display: block; font-size: 13px; font-weight: 700; color: var(--t); }
.mock-bands b { font: 700 26px/1.2 var(--display); }
.mock-bands .total { border-color: var(--ink); }
.mock-bands .total span { color: var(--ink); }
.skill-tile:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 560px) {
  .mock-bands { grid-template-columns: repeat(2, 1fr); }
  .mock-bands .total { grid-column: 1 / -1; }
  .mock-card .truji { display: none; }
}

/* velocidad de los audios */
.speed-btn { min-width: 62px; min-height: 44px; padding: 6px 12px; border: 2px solid var(--line-d); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--line-d); color: var(--ink); font: 800 15px var(--font); font-variant-numeric: tabular-nums; cursor: pointer; flex: none; }
.speed-btn:active { transform: translateY(3px); box-shadow: none; }

/* en qué mejorar */
.weak-list li { display: grid; grid-template-columns: 1fr 56px auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 2px solid var(--soft-2); }
.weak-list li:first-child { border-top: 0; }
.weak-list b { display: block; margin-bottom: 6px; }
.weak-list em { font-style: normal; font-weight: 800; color: var(--bad-t); text-align: right; }
.bar.bad i { background: var(--bad); }
@media (max-width: 560px) { .weak-list li { grid-template-columns: 1fr auto; } .weak-list em { display: none; } }

/* notas en Listening y grabación en Speaking */
.notes textarea { min-height: 84px; font-size: 16px; }
.rec-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin: 12px 0; }
.mine-rec { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 12px 0; }
.mine-rec audio { width: min(100%, 420px); }
