/* Hallmark · shape: app screen · genre: atmospheric · theme: custom "Luna" (docs/DESIGN.md: la noche de Flik; cielo de tinta violeta, luna crema como única luz, naranja de Flik para la acción; superficies lisas sin borde ni sombra, discos y pastillas; de día, papel hueso)
 * nav: sidebar sobre el mismo cielo, la página actual en una pastilla de luna, barra de pestañas por debajo de 60rem · signature: la luna del inicio se llena con los ejercicios del día y la semana se lee en siete lunas; las asignaturas son discos de color
 * states: luna nueva (nada hecho hoy), creciente, llena (objetivo cumplido), próximamente · motion: la luna se llena, Flik cruza por delante, los discos entran girando y flotan, los títulos suben palabra a palabra, amanece o anochece al cambiar de tema; todo apagado con reducir movimiento
 * axes: dark/serif/moon · posture: committed (un cielo, una luz, un naranja) · contrast: pass · v2.0.0 */
/* Hallmark · dismissed 40 · .folder y .folder-mini toman --cover de un token en línea (los colores de asignatura, L 68 a 76%) bajo --cover-ink a L 18%, unos 7:1 medidos a mano */
/* Hallmark · dismissed F7 · la pastilla es la forma del sistema (el disco de la luna): la llevan los controles y también las filas del menú, que son enlaces de navegación; los paneles van con --r-card */
/* Hallmark · dismissed F4 · en la portada de asignatura solo hay un botón relleno; «Preparar el examen» es .btn--text, un enlace sin fondo ni borde */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V5 · weakest: E, un armazón de app hecho a mano; todo color sale de los tokens de :root y el naranja queda para la acción principal y Flik */

:root {
  color-scheme: light;
  /* día: papel hueso y tinta de noche */
  --moon-lit: oklch(84% 0.13 85); --moon-dim: oklch(89% 0.02 86); --moon-crater: oklch(77% 0.13 80); --moon-rim: oklch(66% 0.022 285); --moon-blood: oklch(62% 0.19 30); --moon-blood-2: oklch(48% 0.17 28);
  --bg: oklch(96% 0.014 90); --surface: oklch(98.8% 0.008 90); --surface-2: oklch(93.2% 0.016 88); --surface-3: oklch(89% 0.02 86);
  --line: oklch(86.5% 0.018 86); --star: oklch(60% 0.03 285 / 0);
  --ink: oklch(22% 0.045 285); --edge: oklch(66% 0.022 285); --hard-c: transparent;
  --text: oklch(22% 0.045 285); --text-2: oklch(38% 0.04 285); --text-3: oklch(46% 0.035 285);
  --brand: oklch(72% 0.18 50); --brand-edge: oklch(55% 0.17 45); --brand-ink: oklch(19% 0.04 285); --brand-hover: oklch(76% 0.17 54); --brand-text: oklch(50% 0.17 45);
  --mark: oklch(91% 0.15 98); --note: oklch(92% 0.06 95);
  --ok: oklch(50% 0.15 150); --bad: oklch(54% 0.2 27); --warn: oklch(62% 0.15 70); --bad-ink: oklch(98% 0.01 90);
  --c-java: oklch(72% 0.17 45); --c-bbdd: oklch(74% 0.12 190); --c-ingles: oklch(72% 0.17 0); --c-mates: oklch(68% 0.15 260); --c-historia: oklch(76% 0.11 85); --c-bio: oklch(75% 0.15 140); --c-games: oklch(70% 0.16 300);
  --c-java-text: oklch(47% 0.17 45); --c-bbdd-text: oklch(42% 0.1 195);
  --c-aleman: oklch(71% 0.16 14); --c-aleman-text: oklch(48% 0.18 18);
  /* alemán: el género de cada sustantivo (der azul, die rojo, das verde), como texto sobre papel */
  --g-der: oklch(45% 0.16 255); --g-die: oklch(48% 0.19 22); --g-das: oklch(45% 0.13 150);
  --flik: oklch(73% 0.19 50); --flik-wing: oklch(54% 0.21 302); --flik-ink: oklch(22% 0.06 300); --flik-white: oklch(98% 0.01 90); --flik-mouth: oklch(40% 0.14 20); --flik-belly: oklch(84% 0.11 70); --flik-shade: oklch(64% 0.18 45); --flik-inner: oklch(76% 0.1 20); --flik-bone: oklch(72% 0.15 302); --flik-hat: oklch(55% 0.2 27); --flik-hat-2: oklch(40% 0.14 300); --planta: oklch(66% 0.15 145); --planta-2: oklch(48% 0.12 150); --maceta: oklch(60% 0.12 45); --maceta-2: oklch(50% 0.11 40); --tierra: oklch(36% 0.05 50); --flik-halo: oklch(80% 0.06 300);
  --cover-ink: oklch(18% 0.04 285); --paper-peek: oklch(98% 0.01 90);
  --shadow-float: 0 14px 30px -12px oklch(22% 0.05 268 / 0.4);
  --hard: 0 0 0 0 transparent; --hard-sm: 0 0 0 0 transparent; --hard-lg: 0 0 0 0 transparent;
  /* código: siempre una pizarra de tinta, también en el modo claro */
  --code-bg: oklch(19% 0.035 285); --code-ink: oklch(94% 0.015 88); --code-muted: oklch(68% 0.035 285); --code-hover: oklch(27% 0.04 285);
  --code-kw: oklch(78% 0.14 45); --code-str: oklch(80% 0.13 150); --code-num: oklch(80% 0.1 230); --code-com: oklch(68% 0.035 285); --code-in: oklch(80% 0.16 60);
  --code-ok: oklch(80% 0.17 150); --code-bad: oklch(75% 0.17 25);
  /* type */
  --font-display: "Young Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-md: 1rem; --t-lg: 1.125rem; --t-xl: 1.375rem; --t-2xl: 1.75rem; --t-3xl: 2.25rem; --t-4xl: 3rem; --t-5xl: 4.25rem;
  /* space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-14: 56px; --s-20: 80px;
  /* forma: el disco de la luna manda: botones de pastilla y paneles de esquina amplia */
  --r-tag: 6px; --r-cover: 10px; --r-card: 18px; --r-pill: 999px;
  --side-w: 248px; --now-h: 76px; --tabs-h: 0px;
  --dur-micro: 120ms; --dur-short: 220ms; --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --z-side: 200; --z-now: 300;
}
/* Modo oscuro "tinta": el mismo diseño con la noche azul marino y las líneas de tiza */
/* Noche (por defecto): el cielo de Flik, con la luna como única luz */
:root[data-theme="dark"] {
  color-scheme: dark;
  --moon-lit: oklch(94% 0.05 95); --moon-dim: oklch(23% 0.04 285); --moon-crater: oklch(86% 0.05 92); --moon-rim: oklch(52% 0.04 285); --moon-blood: oklch(64% 0.19 30); --moon-blood-2: oklch(50% 0.17 28);
  --bg: oklch(16% 0.03 285); --surface: oklch(20% 0.035 285); --surface-2: oklch(24% 0.04 285); --surface-3: oklch(29% 0.045 285);
  --line: oklch(30% 0.04 285); --star: oklch(92% 0.03 95 / 0.55);
  --ink: oklch(95% 0.02 92); --edge: oklch(46% 0.04 285); --hard-c: transparent;
  --text: oklch(95% 0.018 92); --text-2: oklch(82% 0.025 285); --text-3: oklch(70% 0.03 285);
  --brand: oklch(77% 0.17 55); --brand-edge: oklch(60% 0.16 48); --brand-ink: oklch(19% 0.04 285); --brand-hover: oklch(80% 0.17 55); --brand-text: oklch(78% 0.17 55);
  --mark: oklch(50% 0.12 90); --note: oklch(30% 0.05 80);
  --ok: oklch(78% 0.17 150); --bad: oklch(70% 0.17 25); --warn: oklch(80% 0.15 70); --bad-ink: oklch(22% 0.06 25);
  --shadow-float: 0 14px 30px -10px oklch(0% 0 0 / 0.6);
  --c-java-text: var(--c-java); --c-bbdd-text: var(--c-bbdd); --c-aleman-text: oklch(78% 0.13 14);
  --g-der: oklch(79% 0.12 250); --g-die: oklch(77% 0.14 22); --g-das: oklch(81% 0.14 150);
  --code-bg: oklch(12.5% 0.03 285); --code-hover: oklch(21% 0.04 285);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { height: 100%; scrollbar-color: var(--surface-3) var(--bg); }
body { margin: 0; min-height: 100%; background-color: var(--bg); background-image: radial-gradient(circle, var(--star) 1px, transparent 1.3px); background-size: 24px 24px; background-attachment: fixed; color: var(--text); font: 400 var(--t-md)/1.55 var(--font-body); -webkit-font-smoothing: antialiased; caret-color: var(--brand); }
::selection { background: color-mix(in oklab, var(--brand) 40%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; overflow-wrap: break-word; min-width: 0; text-wrap: balance; font-synthesis: none; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 18px; height: 18px; }

/* ── Shell ── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: max(var(--s-6), env(safe-area-inset-top, 0px)) var(--s-4) calc(var(--now-h) + var(--s-6)) max(var(--s-4), env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: var(--s-6); background: transparent; border-right: 1px solid var(--line); z-index: var(--z-side); overflow-y: auto; }
.logo { display: inline-flex; align-items: center; gap: var(--s-2); padding-inline: var(--s-3); color: var(--text); text-decoration: none; font: 800 var(--t-2xl)/1 var(--font-display); letter-spacing: -0.04em; }
.logo__mark { display: grid; place-items: center; }
.nav { display: grid; gap: var(--s-1); }
.nav a { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-card); color: var(--text-2); font-weight: 600; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
.nav a[aria-current="page"] .icon { color: var(--brand); }
.side__group { display: grid; gap: var(--s-2); }
.side__label { padding-inline: var(--s-3); font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.side__subject { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-card); text-decoration: none; color: var(--text); font-weight: 600; font-size: var(--t-sm); transition: background-color var(--dur-micro) var(--ease-out); }
.side__subject:hover { background: var(--surface-2); }
.side__subject small { display: block; color: var(--text-3); font-weight: 500; }

.main { min-width: 0; padding: max(var(--s-6), env(safe-area-inset-top, 0px)) max(var(--s-8), env(safe-area-inset-right, 0px)) calc(var(--now-h) + var(--s-14)) var(--s-8); }
.main__in { max-width: 1320px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-10); }
.topbar { display: flex; align-items: center; gap: var(--s-3); }
.search { display: flex; align-items: center; gap: var(--s-2); flex: 1; max-width: 420px; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); outline: none; }
.search input::placeholder { color: var(--text-3); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-pill); background: var(--surface-2); font-weight: 600; font-size: var(--t-sm); white-space: nowrap; }
.chip .num { font: 800 var(--t-md)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.chip--streak .icon { color: var(--brand); }

/* ── Buttons ── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-6); border: 0; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font: 600 var(--t-sm)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; transform: none; }
.btn--primary { background: var(--brand); color: var(--brand-ink); font-weight: 700; box-shadow: inset 0 -4px 0 var(--brand-edge); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--primary:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 var(--brand-edge); }
.btn--text { background: transparent; color: var(--text-2); padding-inline: var(--s-2); }
.btn--text:hover { background: transparent; color: var(--text); text-decoration: underline; }
.btn--sm { min-height: 36px; padding-inline: var(--s-4); }

/* ── Carpetas (asignaturas) ── */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: var(--s-6) var(--s-4); }
.folder-card { display: grid; align-content: start; gap: var(--s-1); text-decoration: none; color: var(--text); border-radius: var(--r-card); }
a.folder-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.folder { position: relative; display: block; aspect-ratio: 5 / 4; max-width: 100%; margin-top: var(--s-4); margin-bottom: var(--s-2); border-radius: 0 var(--r-card) var(--r-card) var(--r-card); background: var(--cover, var(--surface-3)); color: var(--cover-ink); }
.folder::before { content: ""; position: absolute; left: 0; top: -15px; width: 44%; height: 16px; border-radius: 10px 14px 0 0; background: var(--cover, var(--surface-3)); }
.folder::after { content: ""; position: absolute; inset: 10px 10px auto 10px; height: 34%; border-radius: 8px; background: var(--paper-peek); opacity: 0.35; transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out); }
.folder__name { position: absolute; z-index: 1; left: var(--s-4); top: var(--s-3); font: 800 var(--t-lg)/1 var(--font-display); letter-spacing: -0.02em; }
.folder__glyph { position: absolute; z-index: 1; left: var(--s-4); bottom: var(--s-2); font: 800 clamp(3.25rem, 6vw, 4.5rem)/1 var(--font-display); letter-spacing: -0.05em; white-space: nowrap; }
a.folder-card:hover .folder::after { transform: translateY(-12px); opacity: 0.6; }
.folder-card__title { font-weight: 600; }
.folder-card__meta { font-size: var(--t-sm); color: var(--text-3); line-height: 1.4; }
.folder-card--soon .folder { filter: saturate(0.3) brightness(0.62); }
.folder--xl { width: clamp(10rem, 20vw, 15rem); margin: var(--s-4) 0 0; }
.folder--xl .folder__glyph { font-size: clamp(4rem, 8vw, 6rem); }
.folder-mini { position: relative; width: 40px; height: 32px; margin-top: var(--s-2); flex-shrink: 0; display: grid; place-items: center; border-radius: 0 8px 8px 8px; background: var(--cover, var(--surface-3)); color: var(--cover-ink); font: 800 0.95rem/1 var(--font-display); letter-spacing: -0.04em; }
.folder-mini::before { content: ""; position: absolute; left: 0; top: -6px; width: 45%; height: 7px; border-radius: 4px 6px 0 0; background: var(--cover, var(--surface-3)); }
.folder-mini--lg { width: 64px; height: 50px; margin-top: var(--s-2); font-size: 1.3rem; }
.folder-mini--lg::before { top: -8px; height: 9px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--s-2); border-radius: var(--r-tag); background: var(--surface-3); color: var(--text-2); font-size: var(--t-xs); font-weight: 600; width: fit-content; margin-top: var(--s-1); }
.shelf { display: grid; gap: var(--s-4); }
.shelf__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); }
.shelf__head h2 { font-size: var(--t-2xl); }
.shelf__head p { color: var(--text-3); font-size: var(--t-sm); margin-top: var(--s-1); }

/* ── Hoy: continúa y objetivo ── */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: var(--s-4); }
.today__main { display: grid; gap: var(--s-3); padding: var(--s-8); border-radius: var(--r-card); background: var(--surface); }
.today__k { color: var(--text-2); font-weight: 600; }
.today h1 { font-size: var(--t-4xl); }
.today__lead { color: var(--text-2); }
.today__next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface-2); }
.today__next > span:nth-child(2) { display: grid; gap: var(--s-1); min-width: 0; }
.today__nk { font-size: var(--t-xs); font-weight: 600; color: var(--text-3); }
.today__nt { font-weight: 700; }
.today__nd { font-size: var(--t-sm); color: var(--text-3); }
.goal { display: grid; justify-items: center; align-content: center; gap: var(--s-2); padding: var(--s-6); border-radius: var(--r-card); background: var(--surface); text-align: center; }
.goal__ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1turn), var(--surface-3) 0); }
.goal__ring::before { content: ""; grid-area: 1 / 1; width: 76px; height: 76px; border-radius: 50%; background: var(--surface); }
.goal__num { grid-area: 1 / 1; z-index: 1; font: 800 var(--t-2xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.goal__t { font-weight: 700; }
.goal__d { font-size: var(--t-sm); color: var(--text-3); }

/* ── Continúa (aviso flotante) ── */
.resume { position: fixed; right: max(var(--s-4), env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); z-index: var(--z-now); display: flex; align-items: center; gap: var(--s-3); max-width: min(22rem, calc(100% - 32px)); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); text-decoration: none; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); transition: background-color var(--dur-micro) var(--ease-out); }
.resume:hover { background: var(--surface-3); }
.resume .folder-mini { width: 32px; height: 26px; font-size: 0.8rem; }
.resume__text { display: grid; min-width: 0; }
.resume__k { font-size: var(--t-xs); color: var(--text-3); font-weight: 600; }
.resume__t { font-weight: 600; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume__go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex-shrink: 0; box-shadow: inset 0 -3px 0 var(--brand-edge); }

/* ── Página de asignatura: cabecera y ruta ── */
.hero-subject { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-8); align-items: center; padding: var(--s-8); border-radius: var(--r-card); background: var(--surface); color: var(--text); }
.hero-subject small { font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.hero-subject h1 { font-size: clamp(2.5rem, 6vw, var(--t-5xl)); margin-block: var(--s-2); }
.hero-subject p { color: var(--text-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: var(--s-8) var(--s-10); }
.tracks__group { display: grid; gap: var(--s-2); align-content: start; }
.tracks__group h2 { font-size: var(--t-xl); }
.tracks__group > p { color: var(--text-3); font-size: var(--t-sm); }
.route { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; }
.step { position: relative; }
.step > a, .step:not(.is-ready) { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) 0; text-decoration: none; color: var(--text); border-radius: var(--r-card); }
.step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: calc(50% + 20px); height: calc(100% - 40px); width: 2px; background: var(--line); }
.step__dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); font-weight: 700; box-shadow: inset 0 0 0 2px var(--line); }
.step.is-ready .step__dot { background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--brand-edge); }
.step.is-ready .step__dot .icon { fill: currentColor; stroke: none; }
.step__body { display: grid; gap: var(--s-1); min-width: 0; }
.step__t { font-weight: 600; }
.step__d { font-size: var(--t-sm); color: var(--text-3); }
.step__s { font-size: var(--t-sm); color: var(--text-3); white-space: nowrap; }
.step.is-ready .step__s { color: var(--brand); font-weight: 600; }
.step > a { transition: background-color var(--dur-micro) var(--ease-out); }
.step > a:hover { background: var(--surface); }
.step > a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.step:not(.is-ready) .step__t { color: var(--text-2); }
@media (max-width: 60rem) { .today { grid-template-columns: minmax(0, 1fr); } .today h1 { font-size: var(--t-3xl); } .goal { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; } .goal__ring { grid-row: span 2; width: 64px; height: 64px; } .goal__ring::before { width: 50px; height: 50px; } .goal__num { font-size: var(--t-lg); } }
@media (max-width: 40rem) { .hero-subject { grid-template-columns: minmax(0, 1fr); padding: var(--s-6) var(--s-4); } .step__s { display: none; } .step > a, .step:not(.is-ready) { grid-template-columns: 40px minmax(0, 1fr); } .today__main { padding: var(--s-6) var(--s-4); } .today__next { grid-template-columns: auto minmax(0, 1fr); } .today__next .btn { grid-column: 1 / -1; } }

/* ── Ply, la mascota ── */
.ply { display: block; overflow: visible; }
/* Flik: cuerpo naranja, alas, orejas y antifaz morados, trazo grueso y limpio */
.ply__body { fill: var(--flik); stroke: var(--flik-ink); stroke-width: 1.8; }
.ply__wing, .ply__mask { fill: var(--flik-wing); stroke: var(--flik-ink); stroke-width: 1.8; stroke-linejoin: round; }
.ply__mask { stroke-width: 0; }
.ply__belly { fill: var(--flik-belly); }
.ply__shade { fill: var(--flik-shade); }
.ply__inner { fill: var(--flik-inner); }
.ply__nose { fill: var(--flik-shade); stroke: var(--flik-ink); stroke-width: 1.2; }
.ply__bone { fill: none; stroke: var(--flik-bone); stroke-width: 1.3; stroke-linecap: round; }
.ply__claw { fill: none; stroke: var(--flik-ink); stroke-width: 1.3; stroke-linecap: round; }
.ply__white { fill: var(--flik-white); }
.ply__pupil { fill: var(--flik-ink); }
.ply__fang { fill: var(--flik-white); }
.ply__inside { fill: var(--flik-mouth); stroke: var(--flik-ink); stroke-width: 1.6; stroke-linejoin: round; }
.ply__line { fill: none; stroke: var(--flik-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ply__arc { fill: none; stroke: var(--flik-white); stroke-width: 2.6; stroke-linecap: round; }
.ply__spark { fill: var(--flik); }
.ply__spark--2 { fill: var(--flik-wing); }
.ply__static { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ply__z { fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* v20 · párpados con opacidad (funciona igual en Safari, Chrome, Firefox y Samsung Internet) */
.ply__lids { opacity: 0; }
.ply__lid { fill: var(--flik-wing); }
.ply__acc1 { fill: var(--flik-hat); stroke: var(--flik-ink); stroke-width: 1.5; stroke-linejoin: round; }
.ply__acc2 { fill: var(--flik-white); stroke: var(--flik-ink); stroke-width: 1.2; }
.ply__acc3 { fill: var(--flik-hat-2); stroke: var(--flik-ink); stroke-width: 1.2; stroke-linejoin: round; }
.ply__acc4 { fill: var(--flik); stroke: var(--flik-ink); stroke-width: 1.2; stroke-linejoin: round; }
.ply__acc5 { fill: none; stroke: var(--flik-wing); stroke-width: 1.6; stroke-linecap: round; }
@keyframes ply-blink-a { 0%, 93%, 100% { opacity: 1; } 95%, 97% { opacity: 0; } }
@keyframes ply-blink-b { 0%, 93%, 100% { opacity: 0; } 95%, 97% { opacity: 1; } }
/* De noche, un borde claro muy fino para que el contorno oscuro de Flik no se pierda en el cielo */
:root[data-theme="dark"] .ply { filter: drop-shadow(0 0 0.6px var(--flik-halo)) drop-shadow(0 0 0.6px var(--flik-halo)); }
:root[data-theme="dark"] .logo__mark .ply { filter: none; }
.ply--hang { transform-origin: 50% 0; animation: ply-sway 3.2s ease-in-out infinite; }
@keyframes ply-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.ply-face.is-buzz .ply { animation: ply-buzz 90ms linear 6; }
@keyframes ply-buzz { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }
.ply-face { display: block; flex-shrink: 0; }
.ply-face.is-pop .ply { animation: ply-pop 420ms var(--ease-out); }
@keyframes ply-pop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-8px) scale(1.06); } 100% { transform: none; } }
.ply-say { display: flex; align-items: flex-end; gap: var(--s-3); }
.bubble { position: relative; padding: var(--s-3) var(--s-4); border-radius: var(--r-card) var(--r-card) var(--r-card) var(--r-tag); background: var(--surface-2); color: var(--text); font-weight: 500; line-height: 1.45; box-shadow: inset 0 0 0 1px var(--line); max-width: 36ch; }
.ply-say--home { justify-self: start; align-items: flex-start; }
.ply-say--home .bubble { max-width: 44ch; }
.ply-say--home .bubble { background: var(--surface-3); }
.today__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.sound { margin-top: auto; display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-card); background: transparent; color: var(--text-3); font-size: var(--t-sm); font-weight: 600; cursor: pointer; text-align: left; }
.sound:hover { color: var(--text); background: var(--surface-2); }
.sound[aria-pressed="false"] { color: var(--text-3); opacity: 0.7; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 900; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.goal__ring { transition: --p 900ms var(--ease-out); }
@media (prefers-reduced-motion: no-preference) {
  .ply .ply__eyes { animation: ply-blink-a 4.6s linear infinite; }
  .ply .ply__lids { animation: ply-blink-b 4.6s linear infinite; }
}
@media (prefers-reduced-motion: reduce) { .ply--hang, .ply-face.is-pop .ply, .ply-face.is-buzz .ply { animation: none; } .goal__ring { transition: none; } }

/* ── Mobile tab bar ── */
.tabs { display: none; }
@media (max-width: 60rem) {
  :root { --tabs-h: 64px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: max(var(--s-4), env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(var(--now-h) + var(--tabs-h) + var(--s-10)) max(16px, env(safe-area-inset-left, 0px)); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-now); display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); padding: 0 max(var(--s-2), env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(var(--s-2), env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .tabs a { display: grid; place-items: center; align-content: center; gap: var(--s-1); color: var(--text-3); text-decoration: none; font-size: var(--t-xs); font-weight: 600; }
  .tabs a[aria-current="page"] { color: var(--text); }
  .tabs a[aria-current="page"] .icon { color: var(--brand); }
  .search { max-width: none; }
}


/* ── Footer ── */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--line); color: var(--text-3); font-size: var(--t-sm); }

/* ── Código: editor, bloques y consola ── */
.tk-kw { color: var(--code-kw); font-weight: 700; }
.tk-str { color: var(--code-str); }
.tk-num { color: var(--code-num); }
.tk-com { color: var(--code-com); font-style: italic; }
.tk-type { color: var(--code-ink); font-weight: 700; }
.ed { display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-card); overflow: hidden; font: 500 0.875rem/1.6 var(--font-code); min-height: 30rem; box-shadow: inset 0 0 0 1px var(--line); }
.ed__gutter { display: flex; flex-direction: column; padding: var(--s-4) var(--s-2) var(--s-4) var(--s-4); color: var(--code-muted); text-align: right; user-select: none; overflow: hidden; font-variant-numeric: tabular-nums; }
.ed__gutter span { display: block; min-width: 2ch; padding-inline: var(--s-1); border-radius: 4px; }
.ed__gutter .is-err { background: var(--bad); color: var(--bad-ink); font-weight: 700; }
.ed__gutter .is-run { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.ed__body { position: relative; min-width: 0; }
.ed__hl, .ed__ta { margin: 0; padding: var(--s-4); font: inherit; tab-size: 4; white-space: pre; overflow: auto; border: 0; }
.ed__hl { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ed__ta { position: relative; display: block; width: 100%; height: 100%; min-height: 30rem; resize: none; background: transparent; color: transparent; caret-color: var(--brand); outline: none; }
.ed__ta::selection { background: color-mix(in oklab, var(--brand) 30%, transparent); color: transparent; }
.ed:focus-within { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--brand); }
.code { display: block; margin: 0; padding: var(--s-4) 0; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-card); font: 500 0.875rem/1.6 var(--font-code); overflow-x: auto; white-space: pre; }
.code__ln { display: grid; grid-template-columns: 3.5ch minmax(0, 1fr); gap: var(--s-3); padding-inline: var(--s-4); }
.code__n { color: var(--code-muted); text-align: right; font-variant-numeric: tabular-nums; user-select: none; }
.code__ln.is-err { background: color-mix(in oklab, var(--bad) 22%, transparent); }
.code__ln.is-run { background: color-mix(in oklab, var(--brand) 16%, transparent); }
.code__ln.is-pick { background: color-mix(in oklab, var(--brand) 24%, transparent); }
.console { background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-card); padding: var(--s-4); min-height: 13rem; max-height: 28rem; overflow: auto; font: 500 0.875rem/1.6 var(--font-code); box-shadow: inset 0 0 0 1px var(--line); }
.console__out { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.console__hint { font-family: var(--font-body); color: var(--code-muted); font-size: var(--t-sm); }
.c-in { color: var(--code-in); font-weight: 700; }
.c-err { color: var(--bad); }
.c-muted { color: var(--code-muted); }
.c-ok { color: var(--ok); font-weight: 700; }
.c-foot { font-weight: 700; }
.console__ask { display: inline-flex; align-items: baseline; gap: var(--s-3); }
.console__in { min-width: 12ch; width: 22ch; padding: 0 var(--s-1); border: 0; border-bottom: 2px solid var(--brand); background: transparent; color: var(--brand); font: inherit; font-weight: 700; outline: none; }
.console__in:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.console__tip { font-family: var(--font-body); font-size: var(--t-xs); color: var(--code-muted); }

/* ── Pantalla del editor ── */
.page-head { display: grid; gap: var(--s-2); }
.page-head h1 { font-size: var(--t-3xl); }
.page-head p { color: var(--text-2); max-width: 64ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.toolbar .file { font: 700 var(--t-md)/1 var(--font-code); margin-inline-end: auto; }
.toolbar--tight { margin: 0; }
.grow { margin-inline-end: auto; }
.select { min-height: 36px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font: 600 var(--t-sm)/1 var(--font-body); max-width: 100%; cursor: pointer; }
.select:hover { background: var(--surface-3); }
.select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-file { position: relative; overflow: hidden; }
.btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn-file:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.sidepanel { display: grid; gap: var(--s-4); }
.sidepanel h2 { font-size: var(--t-xl); }
.status { min-height: 1.5em; font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.errs { display: grid; gap: var(--s-2); }
.err { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: baseline; text-align: left; padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-cover); background: var(--surface-2); color: var(--text); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.err:hover { background: var(--surface-3); }
.err[aria-pressed="true"] { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--bad); }
.err:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.err__where { font-weight: 700; font-size: var(--t-sm); white-space: nowrap; }
.err__msg { font: 500 0.8125rem/1.45 var(--font-code); overflow-wrap: anywhere; }
.explain { padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-2); display: grid; gap: var(--s-2); box-shadow: inset 0 0 0 1px var(--line); }
.explain h2 { font-size: var(--t-xl); }
.explain [data-where] { font: 600 0.8125rem/1.45 var(--font-code); color: var(--bad); overflow-wrap: anywhere; }
.explain [data-body] { color: var(--text-2); }
.keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); font-size: var(--t-sm); color: var(--text-3); }
kbd { font: 700 0.8125rem/1 var(--font-code); padding: var(--s-1) var(--s-2); border-radius: var(--r-tag); background: var(--surface-2); color: var(--text); }
@media (max-width: 70rem) { .workbench { grid-template-columns: minmax(0, 1fr); } .ed, .ed__ta { min-height: 22rem; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
.search { min-width: 0; }
@media (max-width: 40rem) { .chip__label { display: none; } .chip { padding-inline: var(--s-2); } }

/* ── Caza-errores ── */
.hunt { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.hunt__main { display: grid; gap: var(--s-3); min-width: 0; }
.hunt__bar { display: flex; align-items: center; gap: var(--s-4); font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.hunt__meter { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.hunt__meter > span { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(0); transition: transform var(--dur-short) var(--ease-out); }
.console--short { min-height: 0; margin: 0; white-space: pre-wrap; }
.hcode { list-style: none; margin: 0; padding: var(--s-3) 0; background: var(--code-bg); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; font: 500 0.875rem/1.6 var(--font-code); }
.hline { display: grid; grid-template-columns: 3.5ch minmax(0, 1fr); gap: var(--s-3); width: 100%; padding: 1px var(--s-4); border: 0; background: transparent; color: var(--code-ink); font: inherit; text-align: left; cursor: pointer; white-space: pre; transition: background-color var(--dur-micro) var(--ease-out); }
.hline:hover:not(:disabled) { background: color-mix(in oklab, var(--brand) 10%, transparent); }
.hline:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.hline:disabled { cursor: default; }
.hline__n { color: var(--code-muted); text-align: right; font-variant-numeric: tabular-nums; }
.hline.is-wrong { background: color-mix(in oklab, var(--bad) 22%, transparent); animation: shake 300ms var(--ease-out); }
.hline.is-right { background: color-mix(in oklab, var(--brand) 20%, transparent); }
.hline.is-fixed { background: color-mix(in oklab, var(--ok) 20%, transparent); }
.hline.is-fixed .hline__n { color: var(--ok); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hunt__steps { display: grid; gap: var(--s-3); }
.hstep { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); color: var(--text-2); font-weight: 600; }
.hstep.is-on { color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.hstep.is-done { opacity: 0.6; }
#h-step2 { display: grid; gap: var(--s-3); }
#h-step2[hidden] { display: none; }
.hstep__head { display: flex; align-items: center; gap: var(--s-3); color: var(--text); }
.hstep__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); font-size: var(--t-sm); }
.hstep.is-on .hstep__n { background: var(--brand); color: var(--brand-ink); }
.hstep.is-done .hstep__n { background: var(--ok); color: var(--bad-ink); }
.opts { display: grid; gap: var(--s-2); }
.opt { display: block; width: 100%; padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-cover); background: var(--code-bg); color: var(--code-ink); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; transition: background-color var(--dur-micro) var(--ease-out); }
.opt code { font: 500 0.8125rem/1.5 var(--font-code); white-space: pre; }
.opt:hover:not(:disabled) { background: var(--surface-2); }
.opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt.is-wrong { box-shadow: inset 0 0 0 2px var(--bad); opacity: 0.6; cursor: not-allowed; }
.opt.is-right { box-shadow: inset 0 0 0 2px var(--ok); }
.explain__first { font-size: var(--t-sm); font-weight: 700; color: var(--ok); }
.explain__joke { color: var(--text); font-weight: 600; }
.hunt__end { display: grid; gap: var(--s-3); padding: var(--s-6); border-radius: var(--r-card); background: var(--surface); }
.hunt__big { font: 800 var(--t-4xl)/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hunt__end p:not(.hunt__big) { color: var(--text-2); }
@media (max-width: 70rem) { .hunt { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hline.is-wrong { animation: none; } }

/* ── ¿Qué imprime? ── */
.picks { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-1); scrollbar-width: thin; }
.pick { display: grid; gap: 2px; min-width: 9rem; padding: var(--s-2) var(--s-4); border: 0; border-radius: var(--r-cover); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.pick:hover { background: var(--surface-2); }
.pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick[aria-current="true"] { background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--brand); }
.pick__t { font-weight: 600; font-size: var(--t-sm); white-space: nowrap; }
.pick__s { font-size: var(--t-xs); color: var(--text-3); }
.pick__s.is-done { color: var(--ok); font-weight: 600; }
.trace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.trace__main { display: grid; gap: var(--s-3); min-width: 0; }
.trace__head { display: grid; gap: var(--s-2); }
.trace__head h2 { font-size: var(--t-2xl); }
.trace__focus { color: var(--text-2); }
.field-label { font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.guess { width: 100%; min-height: 9rem; padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-card); background: var(--code-bg); color: var(--code-ink); font: 500 0.875rem/1.6 var(--font-code); resize: vertical; box-shadow: inset 0 0 0 1px var(--line); }
.guess:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tres { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); }
.tres.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.tres.is-bad { box-shadow: inset 3px 0 0 var(--bad); }
.tdiff { display: grid; gap: 2px; font: 500 0.8125rem/1.5 var(--font-code); }
.tdiff__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); padding: 2px var(--s-2); border-radius: var(--r-tag); }
.tdiff__row > span { white-space: pre-wrap; overflow-wrap: anywhere; }
.tdiff__head { font-family: var(--font-body); font-size: var(--t-xs); font-weight: 600; color: var(--text-3); }
.tdiff__row.is-ok .tdiff__g { color: var(--ok); }
.tdiff__row.is-bad { background: color-mix(in oklab, var(--bad) 14%, transparent); }
.tdiff__row.is-bad .tdiff__g { color: var(--bad); }
.stepper { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); }
.stepper__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.stepper__pos { font-size: var(--t-sm); font-weight: 600; color: var(--text-2); text-align: center; }
.stepper__event { padding: var(--s-2) var(--s-3); border-radius: var(--r-cover); background: color-mix(in oklab, var(--brand) 14%, var(--surface)); color: var(--text); font-weight: 600; font-size: var(--t-sm); }
.stepper__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.stepper__grid h3 { font-size: var(--t-md); margin-bottom: var(--s-2); }
.vars { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.vars th, .vars td { padding: var(--s-1) var(--s-2); text-align: left; border-bottom: 1px solid var(--line); }
.vars thead th { font-size: var(--t-xs); color: var(--text-3); font-weight: 600; }
.vars tbody th { padding-top: var(--s-2); font-size: var(--t-xs); color: var(--text-2); font-weight: 700; border-bottom: 0; }
.vars .tval { font: 700 0.8125rem/1.4 var(--font-code); color: var(--brand); }
.vars tr.is-caller td, .vars tr.is-caller th { opacity: 0.55; }
@media (max-width: 70rem) { .trace { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) { .stepper__grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Viaje de un dato ── */
.journey { display: grid; gap: var(--s-4); }
.journey__stage { position: relative; }
.mboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s-4); }
.mbox { display: grid; align-content: start; gap: var(--s-2); min-height: 9rem; padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out); opacity: 0.7; }
.mbox.is-running { opacity: 1; }
.mbox.is-active { box-shadow: inset 0 0 0 2px var(--brand); opacity: 1; }
.mbox__sig { font: 700 0.8125rem/1.4 var(--font-code); color: var(--code-kw); overflow-wrap: anywhere; }
.mbox__idle { font-size: var(--t-sm); color: var(--text-3); }
.mbox .vars td { font-size: var(--t-sm); }
.token { position: absolute; left: 0; top: 0; z-index: 5; display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s-3); border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); font: 700 0.875rem/1 var(--font-code); box-shadow: inset 0 -3px 0 var(--brand-edge), var(--shadow-float); pointer-events: none; white-space: nowrap; opacity: 0; }
.token--ret { background: var(--ok); color: var(--bad-ink); box-shadow: var(--shadow-float); }
.journey__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface-2); }
.journey__cap { font-weight: 600; text-align: center; }
.journey__cap.is-lost { color: var(--bad); }
.journey__pos { font-size: var(--t-sm); color: var(--text-3); text-align: center; }
.journey__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-4); }
.mini-h { font-size: var(--t-md); margin-bottom: var(--s-2); }
@media (max-width: 50rem) { .journey__grid { grid-template-columns: minmax(0, 1fr); } .journey__bar { grid-template-columns: 1fr 1fr; } .journey__cap { grid-column: 1 / -1; grid-row: 1; } }

/* ── Ejemplos con pasos ── */
.lesson { display: grid; gap: var(--s-4); }
.lesson__task { font: 700 var(--t-xl)/1.3 var(--font-display); letter-spacing: -0.01em; }
.lesson__own { padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); color: var(--text); font-weight: 500; box-shadow: inset 3px 0 0 var(--brand); }
.tabs4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.tabs4 button { display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--text-2); font-weight: 600; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.tabs4 button:hover { background: var(--surface-2); }
.tabs4 button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tabs4 button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 2px var(--brand); }
.tabs4__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: var(--t-xs); }
.tabs4 button.is-done .tabs4__n { background: var(--ok); color: var(--bad-ink); }
.pane { display: grid; gap: var(--s-4); }
.pane__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.pane__actions .keys { margin: 0; }
.code--parts { white-space: normal; }
.code--parts .code__ln { white-space: pre; }
.code__ln.is-part { box-shadow: inset 3px 0 0 color-mix(in oklab, var(--c-java) 70%, transparent); }
.sg { display: grid; gap: var(--s-1); margin: var(--s-3) var(--s-4) var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-cover); background: color-mix(in oklab, var(--c-java) 16%, var(--code-bg)); font-family: var(--font-body); white-space: normal; }
.sg--small { margin-block: var(--s-2) var(--s-1); padding-block: var(--s-1); }
.sg__label { font-weight: 700; color: var(--c-java); font-size: var(--t-sm); }
.sg__text { color: var(--code-ink); font-size: var(--t-sm); }
.gap { min-width: 12ch; max-width: 100%; padding: 0 var(--s-2); border: 0; border-radius: var(--r-tag); background: var(--surface-2); color: var(--brand); font: 700 0.875rem/1.6 var(--font-code); box-shadow: inset 0 -2px 0 var(--brand); outline: none; }
.gap:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.code--ctx { opacity: 0.55; padding-inline: var(--s-4); }
.code--ctx:empty { display: none; }
.parsons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.plist { list-style: none; margin: 0; padding: var(--s-2); min-height: 6rem; display: grid; align-content: start; gap: var(--s-1); border-radius: var(--r-card); background: var(--surface); }
.plist--ans { box-shadow: inset 0 0 0 2px var(--line); counter-reset: pl; }
.plist li { display: flex; align-items: center; gap: var(--s-2); }
.pline { flex: 1; min-width: 0; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-cover); background: var(--code-bg); color: var(--code-ink); text-align: left; cursor: pointer; overflow-x: auto; transition: background-color var(--dur-micro) var(--ease-out); }
.pline code { font: 500 0.8125rem/1.5 var(--font-code); white-space: pre; }
.pline:hover { background: var(--surface-2); }
.pline:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pempty { color: var(--text-3); font-size: var(--t-sm); padding: var(--s-3); }
.results { display: grid; gap: var(--s-2); }
.results:empty { display: none; }
.trow { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-card); background: var(--surface); }
.trow.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.trow.is-bad { box-shadow: inset 3px 0 0 var(--bad); }
.trow__h { font-weight: 600; font-size: var(--t-sm); }
.muted { color: var(--text-3); font-size: var(--t-sm); }
@media (max-width: 50rem) { .parsons { grid-template-columns: minmax(0, 1fr); } .tabs4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Tarjetas ── */
.flash { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: var(--s-6); align-items: start; }
.flash__main { display: grid; gap: var(--s-4); justify-items: start; }
.flash__count { font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.fcard { width: 100%; min-height: 15rem; display: grid; align-content: start; gap: var(--s-4); padding: var(--s-8); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: inset 0 -4px 0 var(--surface-3); }
.fcard__g { font-size: var(--t-sm); font-weight: 700; color: var(--c-java); }
.fcard__q { font: 700 var(--t-2xl)/1.2 var(--font-display); letter-spacing: -0.01em; }
.fcard__back { display: none; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px dashed var(--line); }
.fcard.is-flipped .fcard__back { display: grid; animation: flipin var(--dur-short) var(--ease-out); }
@keyframes flipin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fcard__a { margin: 0; padding: var(--s-4); border-radius: var(--r-cover); background: var(--code-bg); color: var(--code-ink); font: 500 0.9375rem/1.6 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere; }
.fcard__n { color: var(--text-2); }
.rate { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.rate kbd { margin-left: var(--s-1); }
.kboxes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.kbox { display: flex; align-items: baseline; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-cover); background: var(--surface); }
.kbox__n { min-width: 2ch; font: 800 var(--t-lg)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.kbox__t { font-size: var(--t-sm); color: var(--text-2); }
.kbox.is-top .kbox__n { color: var(--ok); }
@media (max-width: 50rem) { .flash { grid-template-columns: minmax(0, 1fr); } .fcard { padding: var(--s-6) var(--s-4); } }
@media (prefers-reduced-motion: reduce) { .fcard.is-flipped .fcard__back { animation: none; } }

/* ── Simulacro ── */
.exam-start { display: grid; justify-items: start; gap: var(--s-3); padding: var(--s-8); border-radius: var(--r-card); background: var(--surface); }
.exam-start__big { font: 800 var(--t-5xl)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.exam { display: grid; gap: var(--s-4); }
.exam__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.xdots { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.xdot { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: var(--t-sm); cursor: pointer; }
.xdot.is-answered { background: var(--surface-3); color: var(--text); }
.xdot[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--brand); color: var(--text); }
.xdot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.exam__timer { font: 800 var(--t-2xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.exam__timer.is-low { color: var(--bad); }
.xq { display: grid; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-card); background: var(--surface); }
.xq__n { font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.xq__t { font-size: var(--t-xl); line-height: 1.3; max-width: 60ch; }
.xopts { display: grid; gap: var(--s-2); }
.xopt { display: block; width: 100%; padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-cover); background: var(--code-bg); color: var(--code-ink); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
.xopt code { font: 500 0.875rem/1.5 var(--font-code); white-space: pre-wrap; }
.xopt--line { font-weight: 700; width: auto; display: inline-flex; }
.xopts:has(.xopt--line) { display: flex; flex-wrap: wrap; }
.xopt:hover { background: var(--surface-2); }
.xopt[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--brand); }
.xopt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.exam__nav { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.exam__nav #x-send { margin-left: auto; }
.exam-end { display: grid; gap: var(--s-6); }
.exam-end__top { display: grid; justify-items: start; gap: var(--s-3); padding: var(--s-8); border-radius: var(--r-card); background: var(--surface); }
.exam-end__nota { font: 800 6rem/0.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.exam-end__nota small { font-size: var(--t-2xl); color: var(--text-3); margin-left: var(--s-2); letter-spacing: 0; }
.xreview { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.xr { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-card); background: var(--surface); }
.xr.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.xr.is-bad { box-shadow: inset 3px 0 0 var(--bad); }
.xr__t { font-weight: 600; }
.xr__a { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s-3); font-size: var(--t-sm); }
.xr__a span { color: var(--text-3); }
.xr__a code { font: 500 0.8125rem/1.5 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Pie con varios enlaces y páginas de texto (privacidad, 404) */
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.hello { display: grid; gap: var(--s-3); max-width: 68ch; }
.hello h1 { font-size: var(--t-3xl); }
.hello p { margin: 0; color: var(--text-2); }
.legal h2 { font-size: var(--t-xl); margin-top: var(--s-4); }
.legal p { color: var(--text-2); }

/* Práctica del examen de Programación: filtros por tema, pistas, solución y examen en tres partes */
.r-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.r-filt { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.fchip { min-height: 40px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--text-2); font: 600 var(--t-sm)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.fchip:hover { background: var(--surface-2); }
.fchip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fchip[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 2px var(--brand); }
.picks--wrap { flex-wrap: wrap; overflow: visible; }
.r-head { display: grid; gap: var(--s-2); min-width: 0; }
.r-head .lesson__own { margin: 0; max-width: 72ch; }
.r-head .muted { margin: 0; }
.r-hints { margin: 0; padding-left: var(--s-5); display: grid; gap: var(--s-1); color: var(--text); max-width: 72ch; }
.r-hints:empty { display: none; }
.r-sol { display: grid; gap: var(--s-2); min-width: 0; }
.r-sol summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.r-sol summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.z-tabs { grid-template-columns: repeat(3, minmax(0, 8rem)); }
.z-rev { display: grid; gap: var(--s-3); min-width: 0; }
.xopt--txt { font: 500 var(--t-md)/1.4 var(--font-body); }
.exam-start .vars { max-width: 40rem; }
@media (max-width: 40rem) { .z-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Tipo proyecto: enunciado en varias líneas y lista de requisitos */
[data-practica] ~ .lesson #r-task { white-space: pre-line; }
.r-req { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); font-size: var(--t-sm); }
.r-req .is-ok { color: var(--text-2); }
.r-req .is-bad { color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--bad); padding-left: var(--s-2); }

/* ══════════════════════════════════════════════════════════════════════
   v18 · Luna: la noche de Flik. Superficies lisas, discos y una sola luz
   ══════════════════════════════════════════════════════════════════════ */

h1, h2, h3 { font-weight: 400; letter-spacing: -0.012em; line-height: 1.08; }
h3 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; line-height: 1.25; }
body { background-image: none; }
/* El cielo: tres capas de estrellas que no coinciden, para que no se vea el dibujo repetido */
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 22% 31%, var(--star) 0 1px, transparent 1.7px),
    radial-gradient(circle at 71% 64%, var(--star) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 48% 88%, var(--star) 0 1.3px, transparent 2px);
  background-size: 331px 293px, 521px 457px, 787px 691px;
  background-attachment: fixed;
}

/* ── Barra lateral y navegación ── */
.side { background: transparent; border-right: 0; }
.logo { font-weight: 400; letter-spacing: -0.02em; }
.nav a { border-radius: var(--r-pill); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.nav a[aria-current="page"] .icon { color: inherit; }
.side__subject { border-radius: var(--r-pill); transition: background-color var(--dur-micro) var(--ease-out); }
.side__subject .folder-mini { transition: transform var(--dur-short) var(--ease-out); }
.side__subject:hover .folder-mini { transform: rotate(-12deg); }
.logo__mark { transition: transform var(--dur-short) var(--ease-out); }
.logo:hover .logo__mark { transform: rotate(-10deg); }
.sound { border-radius: var(--r-pill); }
.side__luna { margin-top: auto; display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-pill); color: var(--text-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.side__luna:hover { background: var(--surface-2); color: var(--text); }
.side__luna svg { width: 22px; height: 22px; overflow: visible; }
.side__luna + .sound { margin-top: 0; }

/* ── Barra de arriba ── */
.search, .chip { border: 1px solid var(--line); background: transparent; }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.chip--btn { cursor: pointer; font: inherit; color: var(--text); font-weight: 600; font-size: var(--t-sm); transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.chip--btn:hover { background: var(--surface-2); }
.chip--btn:active { transform: scale(0.96); }
.icon--sun { display: none; }
:root[data-theme="dark"] .icon--sun { display: block; }
:root[data-theme="dark"] .icon--moon { display: none; }
.chip--streak .icon { color: var(--brand); fill: color-mix(in oklab, var(--brand) 45%, transparent); }
.chip.is-bump .num { animation: pop 480ms var(--ease-out); }
.chip .num { font-weight: 400; }

/* ── Botones: pastillas que ceden al pulsar ── */
.btn { border: 1.5px solid var(--edge); background: transparent; box-shadow: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); box-shadow: none; }
.btn--primary:hover { background: var(--brand-hover); border-color: transparent; }
.btn--primary:active { transform: scale(0.97); box-shadow: none; }
.btn--text, .btn--text:hover, .btn--text:active { border-color: transparent; background: transparent; transform: none; }
.btn--text:hover { color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); border-color: transparent; color: var(--text-3); cursor: not-allowed; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; background: var(--surface-2); border-color: transparent; }
.select, .tabs4 button, .pick, .tag { border: 1px solid var(--line); background: var(--surface); }
.select:hover { background: var(--surface-2); }
.tag { color: var(--text-2); }
.tabs4 button[aria-selected="true"], .pick[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pick[aria-current="true"] .pick__s { color: var(--bg); }
.tabs4 button[aria-selected="true"] .tabs4__n { background: var(--bg); color: var(--text); border-color: transparent; }
.tabs4__n { border: 1px solid var(--line); background: var(--surface); }
kbd { border: 1px solid var(--edge); border-radius: var(--r-tag); }

/* ── Paneles: una superficie lisa, sin borde ni sombra ── */
.fcard, .exam-start, .hunt__end, .stepper, .tres, .explain { border: 0; background: var(--surface); color: var(--text); box-shadow: none; }
.tres.is-ok { box-shadow: inset 4px 0 0 var(--ok); }
.tres.is-bad { box-shadow: inset 4px 0 0 var(--bad); }
.today__next, .journey__bar { border: 0; background: var(--surface); }
.hstep, .kbox, .trow, .mbox, .plist, .xdot, .err, .opts .opt { border: 1px solid var(--line); }
.hstep.is-on { border-color: var(--text-3); }
.lesson__own { border: 0; box-shadow: inset 4px 0 0 var(--brand); }
.stepper__event { border: 0; background: var(--surface-2); }
.hunt__meter { border: 0; background: var(--surface-3); }
.hunt__meter > span { background: var(--brand); }
.bubble { border: 0; background: var(--surface-2); box-shadow: none; }
.ply-say--home .bubble { background: var(--surface); }

/* ── El inicio: el título a la izquierda y la luna a la derecha ── */
.today { grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: var(--s-10); align-items: center; }
.today__main { padding: 0; background: transparent; gap: var(--s-5); }
.today h1 { font-size: clamp(2.75rem, 6.2vw, 5.25rem); line-height: 0.98; max-width: 11ch; }
.today__k { color: var(--text-3); }
.today__next { margin-top: 0; padding: var(--s-4) var(--s-5); max-width: 40rem; }
.goal { padding: 0; background: transparent; gap: var(--s-2); }
.luna { position: relative; width: min(100%, 19rem); aspect-ratio: 1; margin-bottom: var(--s-3); }
.luna__svg { width: 100%; height: 100%; overflow: visible; }
.luna__dim { fill: var(--moon-dim); stroke: var(--moon-rim); stroke-width: 1.5; }
.luna__lit { fill: var(--moon-lit); }
.luna__crater { fill: var(--moon-crater); }
.luna__ghost { fill: none; stroke: var(--moon-rim); stroke-width: 1.2; opacity: 0.55; }
.luna__bat { position: absolute; left: 0; top: 54%; width: 24%; opacity: 0; pointer-events: none; }
.luna__bat .ply { width: 100%; height: auto; }
.goal__t { font: 400 var(--t-xl)/1.2 var(--font-display); }
.goal__t [data-goal-num] { font-variant-numeric: tabular-nums; }
.semana { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); width: min(100%, 17rem); }
.semana li { display: grid; justify-items: center; gap: var(--s-1); font-size: var(--t-xs); color: var(--text-3); }
.semana svg { width: 22px; height: 22px; overflow: visible; }
.semana .is-hoy { color: var(--text); font-weight: 700; }
.semana__d { fill: var(--moon-dim); stroke: var(--moon-rim); stroke-width: 1.5; }
.semana__l { fill: var(--moon-lit); }

/* ── El plan de hoy: tres pasos que encienden la luna ── */

/* ── Asignaturas: discos de color, como planetas alrededor de la luna ── */
.folders { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: var(--s-8) var(--s-6); }
.folders--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.folders--3 .folder { width: min(100%, 14rem); }
.folder-card { justify-items: center; text-align: center; gap: var(--s-1); }
.folder { aspect-ratio: 1; width: min(100%, 12rem); margin: 0 0 var(--s-3); border: 0; border-radius: 50%; box-shadow: none; display: grid; place-content: center; justify-items: center; gap: var(--s-1); transition: transform var(--dur-short) var(--ease-out); }
.folder::before, .folder::after { content: none; }
.folder__name { position: static; font: 600 var(--t-sm)/1 var(--font-body); letter-spacing: 0; }
.folder__glyph { position: static; font-weight: 400; font-size: clamp(2.5rem, 4.6vw, 3.5rem); letter-spacing: -0.03em; transition: transform var(--dur-short) var(--ease-out); }
a.folder-card:hover .folder { transform: scale(1.06) rotate(-4deg); }
a.folder-card:hover .folder__glyph { transform: rotate(4deg); }
a.folder-card:active .folder { transform: scale(0.97); }
.folder-card__title { font: 400 var(--t-xl)/1.15 var(--font-display); }
.folder-card__meta { max-width: 24ch; }
.folder-card--soon .folder { filter: saturate(0.2); opacity: 0.45; }
.folder-card .tag { justify-self: center; }
.folder--xl { width: clamp(9rem, 17vw, 13rem); margin: 0; }
.folder--xl .folder__glyph { font-size: clamp(3.25rem, 6.5vw, 5rem); }
.folder-mini { width: 36px; height: 36px; margin-top: 0; border: 0; border-radius: 50%; font-weight: 400; font-size: 0.85rem; letter-spacing: -0.04em; }
.folder-mini::before { content: none; }
.folder-mini--lg { width: 56px; height: 56px; margin-top: 0; font-size: 1.25rem; }
.resume .folder-mini { width: 32px; height: 32px; font-size: 0.75rem; }
.shelf__head h2 { font-size: var(--t-3xl); }

/* ── Portada de asignatura y camino de pasos ── */
.hero-subject { padding: 0; background: transparent; gap: var(--s-10); }
.hero-subject h1 { font-size: clamp(2.75rem, 6.5vw, 5.25rem); }
.tracks__group h2 { font-size: var(--t-2xl); }
.step:not(:last-child)::before { width: 1px; background: var(--line); }
.step__dot { border: 1.5px solid var(--edge); background: transparent; box-shadow: none; color: var(--text-2); transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.step.is-ready .step__dot { background: transparent; box-shadow: none; color: var(--text); }
.step.is-ready .step__s { color: var(--brand-text); }
.step > a { border-radius: var(--r-card); padding-left: var(--s-2); transition: background-color var(--dur-micro) var(--ease-out); }
.step:not(:last-child)::before { left: 27px; }
.step > a:hover { background: var(--surface); }
.step > a:hover .step__dot { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.step.is-hecho .step__dot { background: var(--ink); border-color: transparent; color: var(--bg); }
.step.is-sigue > a { background: var(--surface); }
.step.is-sigue .step__dot { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.step__n { font-size: var(--t-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.step__s b { font-weight: 700; }

/* ── Continúa y pestañas del móvil ── */
.resume { border: 1px solid var(--line); background: var(--surface-2); box-shadow: var(--shadow-float); transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.resume:hover { background: var(--surface-3); transform: translateY(-2px); }
.resume__go { box-shadow: none; border: 0; }
.tabs { background: var(--bg); border-top: 1px solid var(--line); }
.tabs a { transition: color var(--dur-micro) var(--ease-out); }
.tabs a[aria-current="page"] { box-shadow: none; }
.foot { border-top: 1px solid var(--line); }

/* ── Código: pizarras de noche ── */
.ed, .console, .hcode, .guess, .code { border: 1px solid var(--line); }
.ed, .console { box-shadow: none; }
.ed:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.opt:hover:not(:disabled), .pline:hover, .gap { background: var(--code-hover); }
.gap { color: var(--code-in); box-shadow: inset 0 -2px 0 var(--code-in); }
.opt, .pline { border: 1px solid color-mix(in oklab, var(--code-ink) 22%, transparent); }
.console .c-ok, .code .c-ok, .ed .c-ok { color: var(--code-ok); }
.console .c-err, .code .c-err, .ed .c-err { color: var(--code-bad); }
.console__in { color: var(--code-in); border-bottom-color: var(--code-in); }
.hline.is-fixed .hline__n { color: var(--code-ok); }
.vars .tval { color: var(--brand-text); }
.mbox.is-active { border-color: var(--text-3); }
.token { border: 1px solid var(--edge); }

/* La palabra marcada de los títulos ya no lleva rotulador: el título va entero en una tinta */
.mk { white-space: nowrap; }
.today h1, .hero-subject h1, .page-head h1 { color: var(--text); }

/* ── Movimiento ── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes word-up { from { transform: translateY(108%); } to { transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes pop-soft { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes glow-ok { from { background-color: color-mix(in oklab, var(--ok) 55%, transparent); } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@keyframes disc-in { from { opacity: 0; transform: scale(0.6) rotate(-24deg); } to { opacity: 1; transform: none; } }
@keyframes flota { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes luna-in { from { opacity: 0; transform: translateY(26px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes luna-llena { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes vuelo { 0% { opacity: 0; transform: translate(-40%, 60%) rotate(-12deg) scale(0.7); } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(430%, -260%) rotate(-12deg) scale(1.05); } }
@keyframes aleteo { from { transform: translateY(-3%) rotate(-5deg); } to { transform: translateY(3%) rotate(5deg); } }
@keyframes titila { from { opacity: 0.25; } to { opacity: 1; } }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.w > span { display: inline-block; }
/* Unas pocas estrellas que titilan, solo de noche */
.cielo { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: none; }
:root[data-theme="dark"] .cielo { display: block; }
.cielo i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--moon-lit); opacity: 0.6; }

@media (prefers-reduced-motion: no-preference) {
  .main__in > * { animation: rise 560ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .main__in > :nth-child(1) { --i: 0; } .main__in > :nth-child(2) { --i: 1; } .main__in > :nth-child(3) { --i: 2; } .main__in > :nth-child(4) { --i: 3; } .main__in > :nth-child(5) { --i: 4; } .main__in > :nth-child(n+6) { --i: 5; }
  .route > .step { animation: rise 560ms var(--ease-out) both; animation-delay: calc(160ms + var(--i, 0) * 55ms); }
  .folders > .folder-card { animation: disc-in 720ms var(--ease-out) both; animation-delay: calc(140ms + var(--i, 0) * 80ms); }
  .folders > :nth-child(1), .route > :nth-child(1) { --i: 0; } .folders > :nth-child(2), .route > :nth-child(2) { --i: 1; } .folders > :nth-child(3), .route > :nth-child(3) { --i: 2; } .folders > :nth-child(4), .route > :nth-child(4) { --i: 3; } .folders > :nth-child(5), .route > :nth-child(5) { --i: 4; } .folders > :nth-child(n+6), .route > :nth-child(n+6) { --i: 5; }
  /* Los discos flotan despacio, cada uno a su ritmo */
  .folder__glyph, .folder__name { animation: flota 3.6s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -700ms); }
  a.folder-card:hover .folder__glyph, a.folder-card:hover .folder__name { animation-play-state: paused; }
  .js .w > span { transform: translateY(108%); animation: word-up 760ms var(--ease-out) forwards; animation-delay: calc(var(--wi, 0) * 70ms + 120ms); }
  .js .rv { opacity: 0; transform: translateY(20px); transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
  .js .rv.is-in { opacity: 1; transform: none; }
  .luna { animation: luna-in 900ms var(--ease-out) 120ms both; }
  .plan__p.is-hecho .plan__n { animation: pop 480ms var(--ease-out) 600ms both; }
  .side__luna.is-bump svg { animation: pop 600ms var(--ease-out); }
  .luna.is-llena .luna__svg { animation: luna-llena 900ms var(--ease-out) 1300ms; }
  .luna.is-vuelo .luna__bat { animation: vuelo 2600ms cubic-bezier(0.4, 0, 0.6, 1) 900ms both; }
  .luna.is-vuelo .luna__bat .ply { animation: aleteo 260ms ease-in-out infinite alternate; }
  .cielo i { animation: titila 2.8s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -900ms); }
  .hline.is-fixed, .tres.is-ok, .trow.is-ok { animation: glow-ok 900ms var(--ease-out); }
  .opt.is-right, .hstep.is-done .hstep__n, .tabs4 button.is-done .tabs4__n { animation: pop-soft 480ms var(--ease-out); }
  .hstep.is-done .hstep__n, .tabs4 button.is-done .tabs4__n { animation-name: pop; }
  .fcard.is-flipped { animation: pop-soft 360ms var(--ease-out); }

  /* De una página a otra: la barra lateral se queda quieta y solo cambia el contenido */
  @view-transition { navigation: auto; }
  .side { view-transition-name: side; }
  .tabs { view-transition-name: tabs; }
  .resume { view-transition-name: resume; }
  .main { view-transition-name: main; }
  ::view-transition-old(main) { animation: vt-out 140ms ease both; }
  ::view-transition-new(main) { animation: vt-in 200ms ease both; }
  /* Cambio de tema: amanece o anochece con un círculo que se abre desde el botón */
  .theme-vt::view-transition-old(root), .theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  .theme-vt::view-transition-new(root) { z-index: 2; }
  .theme-vt::view-transition-old(root) { z-index: 1; }
  .theme-vt .side, .theme-vt .tabs, .theme-vt .resume, .theme-vt .main { view-transition-name: none; }
}
@media (prefers-reduced-motion: reduce) {
  .w > span { transform: none; }
  a.folder-card:hover .folder, a.folder-card:hover .folder__glyph, .btn:active, .resume:hover, .step > a:hover .step__dot { transform: none; }
}
@media (max-width: 60rem) {
  .today { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  .goal { grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: var(--s-5); justify-items: start; align-items: center; text-align: left; }
  .luna { grid-row: span 3; width: 7.5rem; margin: 0; }
  .semana { margin-top: var(--s-2); }
  .folders { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: var(--s-6) var(--s-4); }
  .hero-subject { gap: var(--s-6); }
  .folders--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
  .folders--3 .folder-card__meta { display: none; }
  .folders--3 .folder-card__title { font-size: var(--t-md); }
  .folders--3 .folder__glyph { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .folders--3 .folder__name { font-size: var(--t-xs); }
}
@media (max-width: 40rem) {
  .today h1 { font-size: 2.75rem; }
  .hero-subject { padding: 0; }
  .hero-subject h1 { font-size: 2.5rem; }
  .folder--xl { width: 7rem; }
  .folder--xl .folder__glyph { font-size: 2.75rem; }
  .today__next { padding: var(--s-4); }
}

/* Texto de color de asignatura: más oscuro sobre papel para que se lea */
.fcard__g { color: var(--c-java-text); }

/* v17 · Cuentas, comentarios y anuncios (tokens de arriba) */
html:not([data-cuentas="on"]) [data-solo-cuentas], html[data-cuentas="on"] [data-solo-sin-cuentas] { display: none !important; }
@media (max-width: 60rem) { html[data-cuentas="on"] .tabs { grid-template-columns: repeat(5, 1fr); } }
.tabs [data-cuenta-label], .nav [data-cuenta-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.coment { display: grid; gap: var(--s-3); padding: var(--s-5) var(--s-6); border: 1.5px solid var(--edge); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--hard); }
.co-f { display: grid; gap: var(--s-2); }
.co-t { width: 100%; min-height: 5rem; padding: var(--s-3); border: 1.5px solid var(--edge); border-radius: var(--r-cover); background: var(--surface); color: var(--text); font: 400 var(--t-md)/1.5 var(--font-body); resize: vertical; }
.co-t:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.co-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.co-msg { margin: 0; color: var(--bad); font-size: var(--t-sm); }
.co-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.co-c { display: grid; gap: var(--s-1); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.co-c p { margin: 0; }
.co-meta { font-size: var(--t-sm); }
.co-txt { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--text-2); }
.co-c .btn--text { justify-self: start; padding-inline: 0; }
.anuncio { display: grid; gap: var(--s-1); min-height: 100px; padding: var(--s-3); border: 1px dashed var(--line); border-radius: var(--r-cover); }
.anuncio__k { margin: 0; font-size: var(--t-xs); color: var(--text-3); }
.anuncio__ins { display: block; min-height: 90px; }

/* v19 · aviso de cookies (abajo, sin tapar la barra del móvil) */
.ck { position: fixed; left: max(var(--s-4), env(safe-area-inset-left, 0px)); right: max(var(--s-4), env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); z-index: calc(var(--z-now) + 10); display: grid; gap: var(--s-3); max-width: 34rem; margin-left: auto; padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); animation: ck-in var(--dur-short) var(--ease-out) both; }
.ck__h { margin: 0; font-size: var(--t-lg); }
.ck__t { margin: 0; font-size: var(--t-sm); line-height: 1.55; color: var(--text-2); }
.ck__t a { color: var(--brand-text); }
.ck__b { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-end; }
@keyframes ck-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .ck { animation: none; } }

/* v19 · tablas y listas de las páginas legales y el panel de cookies */
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); color: var(--text-2); line-height: 1.6; }
.legal-tabla { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-cover); }
.legal-tabla:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.legal-tabla table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.legal-tabla th, .legal-tabla td { padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-tabla th { color: var(--text-3); font-weight: 600; }
.legal-tabla tr:last-child td { border-bottom: 0; }
.ck-panel { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-cover); background: var(--surface-2); color: var(--text); }
.ck-panel p { margin: 0; }
.ck-panel .cu-check { display: flex; gap: var(--s-2); align-items: flex-start; line-height: 1.5; }
.ck-panel .cu-check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.ck-panel .cu-check input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ck-panel .btn { justify-self: start; }


/* ── v20 · Vida: Flik reacciona, combos, XP que sube, celebraciones, secretos y «Tu cielo» ── */
.ply-face { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chip--xp.is-bump { animation: pop 520ms var(--ease-out); }
.xp-float { position: fixed; z-index: 950; translate: -50% 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); font-size: var(--t-sm); font-weight: 800; box-shadow: var(--shadow-float); pointer-events: none; animation: xp-sube 1100ms var(--ease-out) forwards; }
@keyframes xp-sube { 0% { opacity: 0; transform: translateY(8px) scale(0.8); } 15% { opacity: 1; transform: translateY(0) scale(1.08); } 100% { opacity: 0; transform: translateY(-60px) scale(1); } }
.flik-dice { position: fixed; z-index: 960; translate: -50% -100%; max-width: min(18rem, calc(100% - 16px)); padding: var(--s-2) var(--s-3); border-radius: var(--r-card); background: var(--text); color: var(--surface); font-size: var(--t-sm); font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-float); pointer-events: none; animation: dice-in 220ms var(--ease-out); }
.flik-dice::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; border-radius: 2px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.flik-dice.is-fuera { opacity: 0; transition: opacity 260ms var(--ease-out); }
@keyframes dice-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
.sonar { position: fixed; z-index: 940; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 2px solid var(--brand); border-radius: 50%; opacity: 0; pointer-events: none; animation: sonar 1400ms var(--ease-out) forwards; }
@keyframes sonar { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(9); } }
.vida-avisos { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); z-index: 970; translate: -50% 0; display: grid; gap: var(--s-2); width: min(26rem, calc(100% - 2rem)); pointer-events: none; }
.vida-aviso { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-card); background: var(--surface-2); color: var(--text); font-size: var(--t-sm); line-height: 1.45; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); pointer-events: auto; animation: aviso-in 360ms var(--ease-out); }
.vida-aviso a { color: var(--brand-text); font-weight: 700; }
.vida-aviso a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vida-aviso.is-fuera { opacity: 0; transform: translateY(8px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.vida-aviso__i { flex: none; display: grid; place-items: center; }
.vida-estrella { fill: var(--moon-lit); stroke: var(--brand-edge); stroke-width: 1; stroke-linejoin: round; }
@keyframes aviso-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.combo { position: fixed; top: calc(var(--s-3) + env(safe-area-inset-top, 0px)); left: 50%; z-index: 930; translate: -50% 0; display: flex; align-items: center; gap: var(--s-2); padding: 4px 16px 4px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font-size: var(--t-sm); box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); pointer-events: none; animation: aviso-in 300ms var(--ease-out); }
.combo b { font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.combo.is-bump svg { animation: pop 420ms var(--ease-out); }
.combo.is-llena { box-shadow: var(--shadow-float), inset 0 0 0 2px var(--moon-lit); }
.combo.is-fuera { opacity: 0; transition: opacity 260ms var(--ease-out); }
.celebra { position: fixed; inset: 0; z-index: 990; display: grid; place-items: center; padding: var(--s-4); }
.celebra__fondo { position: absolute; inset: 0; background: color-mix(in oklab, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: vt-in 240ms var(--ease-out); }
.celebra__c { position: relative; display: grid; justify-items: center; gap: var(--s-3); width: min(24rem, 100%); margin-top: var(--s-10); padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-2); text-align: center; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); animation: celebra-in 520ms var(--ease-out); }
.celebra__flik { position: relative; display: grid; place-items: center; width: 150px; height: 150px; margin-top: -96px; }
.celebra__aro { position: absolute; inset: 0; border-radius: 50%; background: var(--moon-lit); box-shadow: 0 0 0 10px color-mix(in oklab, var(--moon-lit) 22%, transparent), 0 0 60px color-mix(in oklab, var(--moon-lit) 45%, transparent); }
.celebra__flik .ply { position: relative; animation: celebra-flik 1.6s ease-in-out infinite alternate; }
.celebra__t { margin: 0; font: 400 var(--t-2xl)/1.1 var(--font-display); overflow-wrap: break-word; min-width: 0; }
.celebra__p { margin: 0; color: var(--text-2); line-height: 1.5; }
.celebra__nivel { margin: 0; font: 400 var(--t-4xl)/1 var(--font-display); color: var(--brand-text); }
.celebra .btn { margin-top: var(--s-2); }
.celebra.is-fuera { opacity: 0; transition: opacity 240ms var(--ease-out); }
@keyframes celebra-in { from { opacity: 0; transform: translateY(24px) scale(0.94); } }
@keyframes celebra-flik { from { transform: translateY(-4px) rotate(-4deg); } to { transform: translateY(4px) rotate(4deg); } }
.flik-vuela { position: fixed; top: 28%; left: 0; z-index: 980; pointer-events: none; animation: flik-cruza 2600ms cubic-bezier(0.45, 0, 0.55, 1) forwards; }
.flik-vuela .ply { animation: aleteo 220ms ease-in-out infinite alternate; }
@keyframes flik-cruza { 0% { transform: translate(-90px, 40px) rotate(8deg); } 25% { transform: translate(25vw, -30px) rotate(-6deg); } 50% { transform: translate(50vw, 30px) rotate(6deg); } 75% { transform: translate(75vw, -40px) rotate(-8deg); } 100% { transform: translate(calc(100vw + 90px), -20px) rotate(4deg); } }
html.is-murcielago body { transform: rotate(180deg); }
.eclipse { position: fixed; inset: 0; z-index: 975; display: grid; place-items: center; pointer-events: none; animation: eclipse-fondo 3.4s ease-in-out forwards; }
.eclipse__sol, .eclipse__luna { grid-area: 1 / 1; width: min(46vmin, 260px); aspect-ratio: 1; border-radius: 50%; }
.eclipse__sol { background: var(--moon-lit); box-shadow: 0 0 80px 20px color-mix(in oklab, var(--moon-lit) 50%, transparent); animation: eclipse-sol 3.4s ease-in-out forwards; }
.eclipse__luna { background: var(--bg); animation: eclipse-luna 3.4s ease-in-out forwards; }
@keyframes eclipse-fondo { 0%, 100% { background-color: transparent; } 40%, 60% { background-color: color-mix(in oklab, var(--bg) 80%, transparent); } }
@keyframes eclipse-sol { 0% { opacity: 0; transform: scale(0.8); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes eclipse-luna { 0% { opacity: 0; transform: translateX(-120%); } 15% { opacity: 1; } 50% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(120%); } }
.luna__lit, .luna__crater { transition: fill 900ms ease; }
.luna.is-sangre { --moon-lit: var(--moon-blood); --moon-crater: var(--moon-blood-2); }
.luna.is-toque .luna__svg { animation: pop 380ms var(--ease-out); }
.cielo-link { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); color: var(--text-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.cielo-link:hover { color: var(--text); }
.cielo-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--r-tag); }
.cielo-link .icon { color: var(--moon-lit); fill: var(--moon-lit); }
.cielo-pag { display: grid; gap: var(--s-8); max-width: 48rem; }
.cielo-nivel { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-2); }
.cielo-nivel__flik { flex: none; }
.cielo-nivel > div:last-child { flex: 1; min-width: 0; display: grid; gap: var(--s-2); }
.cielo-nivel__k { margin: 0; color: var(--text-3); font-size: var(--t-sm); font-weight: 700; }
.cielo-nivel__t { margin: 0; font: 400 var(--t-2xl)/1.1 var(--font-display); overflow-wrap: break-word; }
.cielo-nivel p { margin: 0; }
.cielo-bar { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cielo-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transform: scaleX(var(--p)); transform-origin: left; animation: bar-in 900ms var(--ease-out) both; }
@keyframes bar-in { from { transform: scaleX(0); } }
.cons { display: grid; gap: var(--s-2); }
.cons h2, .cons__h { font-size: var(--t-xl); }
.cons p { margin: 0; }
.cons__svg { width: 100%; height: auto; margin-top: var(--s-3); overflow: visible; }
.cons__l { stroke: var(--moon-rim); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.35; }
.cons__l.is-on { stroke: var(--moon-lit); stroke-width: 1.4; stroke-dasharray: none; opacity: 0.8; }
.cons__p { fill: var(--moon-rim); }
.cons__e.is-on .cons__p { fill: var(--moon-lit); }
.cons__halo { fill: var(--moon-lit); opacity: 0; }
.cons__e.is-on .cons__halo { opacity: 0.18; }
@keyframes halo { from { opacity: 0.08; } to { opacity: 0.32; } }
.logros { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--s-3); }
.logro { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-cover); background: var(--surface-2); opacity: 0.62; }
.logro.is-on { opacity: 1; }
.logro b { display: block; }
.logro small { display: block; margin-top: 2px; color: var(--text-2); font-size: var(--t-sm); line-height: 1.45; }
.logro__e { flex: none; padding-top: 2px; }
.logro:not(.is-on) .vida-estrella { fill: none; stroke: var(--moon-rim); }
.perdido { position: relative; display: grid; place-items: center; width: 220px; height: 220px; margin: var(--s-6) 0 0; }
.perdido .ply { position: relative; }
.perdido__o { position: absolute; inset: 30%; border: 2px solid var(--moon-rim); border-radius: 50%; opacity: 0; }
@keyframes sonar-404 { 0% { opacity: 0.7; transform: scale(0.6); } 100% { opacity: 0; transform: scale(2.3); } }
@media (prefers-reduced-motion: no-preference) {
  body { transition: transform 700ms var(--ease-out); }
  .cons__e.is-on .cons__halo { animation: halo 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -400ms); }
  .perdido__o { animation: sonar-404 2.4s ease-out infinite; }
  .perdido__o:nth-child(2) { animation-delay: 0.8s; } .perdido__o:nth-child(3) { animation-delay: 1.6s; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-float, .flik-dice, .sonar, .vida-aviso, .combo, .combo.is-bump svg, .chip--xp.is-bump, .celebra__fondo, .celebra__c, .celebra__flik .ply, .flik-vuela, .eclipse, .eclipse__sol, .eclipse__luna, .cielo-bar span, .luna.is-toque .luna__svg { animation: none; }
  .luna__lit, .luna__crater { transition: none; }
}


/* ── v21 · Flor de luna (crece con la racha) ── */
.planta { display: block; overflow: visible; }
.pl__tallo { fill: none; stroke: var(--planta-2); stroke-width: 3; stroke-linecap: round; }
.pl__hoja { fill: var(--planta); stroke: var(--planta-2); stroke-width: 1.2; stroke-linejoin: round; }
.pl__nervio { fill: none; stroke: var(--planta-2); stroke-width: 0.9; stroke-linecap: round; }
.pl__semilla { fill: var(--maceta-2); stroke: var(--flik-ink); stroke-width: 1; }
.pl__capullo { fill: var(--planta); stroke: var(--planta-2); stroke-width: 1.2; }
.pl__capullo.is-mustio { fill: var(--moon-rim); }
.pl__petalo { fill: var(--moon-lit); stroke: var(--moon-crater); stroke-width: 0.8; }
.pl__centro { fill: var(--brand); }
.pl__aura { fill: var(--moon-lit); opacity: 0.16; }
.pl__luz { fill: var(--moon-lit); }
.pl__maceta { fill: var(--maceta); stroke: var(--flik-ink); stroke-width: 1.6; stroke-linejoin: round; }
.pl__borde { fill: var(--maceta-2); stroke: var(--flik-ink); stroke-width: 1.6; }
.pl__luna { fill: var(--moon-lit); }
.pl__tierra { fill: var(--tierra); }
.planta.is-dormida .pl__hoja { fill: var(--moon-rim); }
.planta.is-dormida .pl__tallo, .planta.is-dormida .pl__nervio, .planta.is-dormida .pl__hoja { stroke: var(--text-3); }
.planta__fig { position: relative; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-card); background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--dur-micro) var(--ease-out); }
.planta__fig:hover { transform: translateY(-2px); }
.planta__fig:active { transform: scale(0.96); }
.planta__fig:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.planta__fig.is-riego .planta { animation: pop 520ms var(--ease-out); }
.gota { position: absolute; top: 4%; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c-mates); pointer-events: none; opacity: 0; animation: gota 900ms ease-in forwards; }
@keyframes gota { 0% { opacity: 0; transform: translateY(-8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(70px); } }
@media (prefers-reduced-motion: reduce) { .planta__fig, .planta__fig.is-riego .planta, .gota { animation: none; transition: none; } }

/* ── v21 · Herramientas del inicio ── */
.herr { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--s-4); }
.herr__c { display: flex; align-items: center; gap: var(--s-4); min-height: 136px; padding: var(--s-4) var(--s-5); border-radius: var(--r-card); background: var(--surface-2); color: var(--text); text-decoration: none; transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
a.herr__c:hover { background: var(--surface-3); transform: translateY(-2px); }
a.herr__c:active { transform: scale(0.98); }
a.herr__c:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.herr__c h3 { margin: 0 0 var(--s-1); font-size: var(--t-md); }
.herr__c p { margin: 0; color: var(--text-2); font-size: var(--t-sm); line-height: 1.45; }
.herr__c small { display: block; margin-top: var(--s-1); font-size: var(--t-xs); line-height: 1.4; }
.herr__txt { min-width: 0; }
.herr__i { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--moon-dim); color: var(--moon-lit); box-shadow: inset 0 0 0 1px var(--moon-rim); }
.herr__i .icon { width: 30px; height: 30px; }
.herr__c--planta { padding-block: var(--s-2); }
.cielo-planta { display: flex; align-items: center; gap: var(--s-5); max-width: 48rem; margin-bottom: var(--s-8); padding: var(--s-4) var(--s-5); border-radius: var(--r-card); background: var(--surface-2); }
.cielo-planta > div { display: grid; gap: var(--s-1); min-width: 0; }
.cielo-planta p { margin: 0; }

/* ── v21 · Enfoque (pomodoro) ── */
.enf { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; max-width: 64rem; }
.enf__reloj { display: grid; justify-items: center; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-card); background: var(--surface-2); }
.enf__luna { position: relative; width: min(100%, 18rem); aspect-ratio: 1; }
.enf__luna svg { width: 100%; height: 100%; }
.enf .luna__dim { fill: var(--moon-dim); stroke: var(--moon-rim); stroke-width: 1.5; }
.enf .luna__lit { fill: var(--moon-lit); }
.enf__centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.enf__t { margin: 0; font: 400 var(--t-4xl)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); text-shadow: 0 1px 12px var(--bg); }
.enf__f { margin: var(--s-1) 0 0; color: var(--text-2); font-size: var(--t-sm); font-weight: 700; text-shadow: 0 1px 8px var(--bg); }
.enf.is-descanso .luna__lit { fill: var(--c-bbdd); }
.enf__rondas { display: flex; gap: var(--s-2); }
.enf-r { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--moon-rim); }
.enf-r.is-hecha { background: var(--moon-lit); box-shadow: none; }
.enf-r.is-ahora { box-shadow: inset 0 0 0 2px var(--brand); }
.enf__tarea { width: min(100%, 22rem); }
.enf__tarea .cu-i { width: 100%; }
.enf__btns { justify-content: center; }
.enf__lado { display: grid; gap: var(--s-4); }
.enf__lado h2, .enf__ajustes summary { font-size: var(--t-lg); }
.enf__ajustes { display: grid; gap: var(--s-3); }
.enf__ajustes summary { cursor: pointer; font-weight: 700; }
.enf__ajustes summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--r-tag); }
.enf__ajustes[open] summary { margin-bottom: var(--s-3); }
.enf__presets { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
.enf__num { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.enf__num label { color: var(--text-2); font-size: var(--t-sm); }
.enf__paso { display: flex; align-items: center; gap: var(--s-1); }
.enf__paso .cu-i { width: 4.5rem; text-align: center; -moz-appearance: textfield; }
.enf__paso .cu-i::-webkit-outer-spin-button, .enf__paso .cu-i::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.enf__lunas { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-3); font-size: var(--t-sm); }
.enf-chip { position: fixed; left: calc(var(--side-w) + var(--s-4)); bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); z-index: var(--z-now); display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); }
.enf-chip:hover { background: var(--surface-3); }
.enf-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.enf-chip__p { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.enf-chip.is-descanso .enf-chip__p { background: var(--c-bbdd); }
@media (prefers-reduced-motion: no-preference) { .enf-chip__p { animation: titila 1s ease-in-out infinite alternate; } }
@media (max-width: 60rem) { .enf { grid-template-columns: minmax(0, 1fr); } }

/* ── v21 · Crea con IA ── */
.gen { display: grid; gap: var(--s-5); max-width: 48rem; }
.gen-form { display: grid; gap: var(--s-3); }
.gen-tipos { display: flex; gap: var(--s-2); }
.gen-tipo { min-height: 40px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font: inherit; font-weight: 700; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.gen-tipo:hover { color: var(--text); }
.gen-tipo:active { transform: scale(0.97); }
.gen-tipo:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gen-tipo[aria-pressed="true"] { background: var(--text); color: var(--surface); }
.gen-t { width: 100%; min-height: 12rem; resize: vertical; line-height: 1.5; }
.gen-fila { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: calc(var(--s-2) * -1); }
.gen-cupo { margin: 0; }
[data-gen-ia].is-cargando { opacity: 0.8; cursor: progress; }
.gen-cab { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.gen-cab__t { margin: 0; font-size: var(--t-lg); overflow-wrap: break-word; min-width: 0; }
.gen-barra { height: 6px; margin: var(--s-3) 0 var(--s-4); border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.gen-barra span { display: block; height: 100%; background: var(--brand); transform: scaleX(var(--p)); transform-origin: left; transition: transform 300ms var(--ease-out); }
.gen-carta { display: grid; place-content: center; gap: var(--s-2); min-height: 12rem; padding: var(--s-6) var(--s-5); border-radius: var(--r-card); background: var(--surface-3); text-align: center; }
.gen-carta.is-vuelta { box-shadow: inset 0 0 0 2px var(--moon-lit); }
.gen-carta__k { margin: 0; color: var(--text-3); font-size: var(--t-xs); font-weight: 700; }
.gen-carta__t { margin: 0; font: 400 var(--t-xl)/1.3 var(--font-display); overflow-wrap: break-word; }
.gen-carta__f { margin: 0; font-size: var(--t-sm); }
.gen-q { margin: 0; padding: 0; border: 0; min-width: 0; }
.gen-q__t { padding: 0; margin-bottom: var(--s-3); font: 400 var(--t-xl)/1.3 var(--font-display); overflow-wrap: break-word; }
.gen-ops { display: grid; gap: var(--s-2); }
.gen-op { display: flex; align-items: flex-start; gap: var(--s-3); width: 100%; text-align: left; }
.gen-op__l { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); font-size: var(--t-sm); font-weight: 800; }
.gen-exp:not(:empty) { margin-top: var(--s-3); }
.gen-fin { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-5) 0; text-align: center; }
.gen-fin p { margin: 0; }
.gen-fin__n { font: 400 var(--t-4xl)/1 var(--font-display); color: var(--brand-text); }
.gen-sets { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.gen-set { display: flex; align-items: center; gap: var(--s-2); }
.gen-set__b { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 0; border-radius: var(--r-cover); background: var(--surface-3); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.gen-set__b:hover { background: var(--line); }
.gen-set__b:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gen-set__b b, .gen-set__b small { display: block; overflow-wrap: break-word; }
.gen-set__b small { color: var(--text-2); font-size: var(--t-xs); }
.gen-set__i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--moon-dim); color: var(--moon-lit); font-size: var(--t-sm); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .herr__c, .gen-barra span, .gen-tipo { transition: none; } }
@media (max-width: 60rem) { .enf-chip { left: max(var(--s-4), env(safe-area-inset-left, 0px)); } }
.enf .cu-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.gen .gen-t { border-radius: var(--r-cover); }
.herr__c--planta .planta__fig { flex: none; }

/* v24 · términos y condiciones: índice, subapartados y medida de lectura */
.terminos p, .terminos ul { max-width: 72ch; }
.legal h3 { font-size: var(--t-lg); margin-top: var(--s-2); }
.legal h2[id], .legal h3[id] { scroll-margin-top: var(--s-6); }
.legal-indice { padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-cover); background: var(--surface-2); }
.legal-indice ol { margin: 0; padding-left: 1.4em; columns: 2 16rem; column-gap: var(--s-8); line-height: 1.8; }
.legal-indice li { break-inside: avoid; }
.legal-indice a { color: var(--text-2); }
.legal-indice a:hover { color: var(--text); }
.legal-indice a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

/* ── v26 · Caminos guiados, bienvenida y «Sigue aquí» ── */
/* Inicio: la bienvenida (tres preguntas) y la tarjeta del siguiente paso. Un solo botón naranja por pantalla. */
.guia, .sigue { display: grid; gap: var(--s-4); max-width: 44rem; padding: var(--s-6); border-radius: var(--r-card); background: var(--surface); }
.guia__paso { font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.guia__cuerpo { display: grid; gap: var(--s-4); }
.guia__cuerpo h2 { font-size: var(--t-2xl); }
.guia__cuerpo h2:focus { outline: none; }
.guia__ayuda { margin-top: calc(var(--s-2) * -1); color: var(--text-3); font-size: var(--t-sm); }
.guia__ops { display: grid; gap: var(--s-2); }
.guia__ops--asig, .guia__ops--meta { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.guia__ops--lista { max-height: 24rem; overflow-y: auto; padding: 2px; }
.guia__op { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-3) var(--s-4); border: 1.5px solid var(--line); border-radius: var(--r-card); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.guia__op > span:last-child { display: grid; gap: 2px; min-width: 0; }
.guia__op b { font-weight: 700; }
.guia__op .muted { font-size: var(--t-sm); color: var(--text-3); }
.guia__op .folder-mini { margin-top: var(--s-1); }
.guia__op:hover { background: var(--surface-2); }
.guia__op:active { transform: scale(0.98); }
.guia__op:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.guia__op[aria-pressed="true"], .guia__op[aria-checked="true"] { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.guia__n { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--edge); font: 400 var(--t-md)/1 var(--font-display); color: var(--text-2); }
.guia__op[aria-checked="true"] .guia__n { background: var(--moon-lit); border-color: transparent; color: var(--cover-ink); }
.guia__acc, .sigue__acc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

.sigue__top { display: flex; align-items: center; gap: var(--s-3); }
.sigue__top > div { display: grid; min-width: 0; flex: 1; }
.sigue__k { font-weight: 700; }
.sigue__pct { font-size: var(--t-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }
.sigue__ver { font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.sigue__ver:hover { color: var(--text); }
.sigue__u { font-size: var(--t-sm); font-weight: 600; color: var(--text-3); }
.sigue__t { font-size: var(--t-2xl); }
.sigue__t:focus { outline: none; }
.sigue__d { color: var(--text-2); max-width: 52ch; }
.sigue__pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.sigue__pasos li { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--edge); color: var(--text-3); }
.sigue__pasos li.is-hecho { background: var(--moon-lit); border-color: transparent; color: var(--cover-ink); }
.sigue__pasos li.is-aqui { border-color: var(--brand); color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 25%, transparent); }
.sigue__tipo { font-size: var(--t-sm); color: var(--text-3); }
.sigue__otras { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.sigue__otras a { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: var(--s-2) var(--s-3); border-radius: var(--r-card); color: var(--text); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.sigue__otras a:hover { background: var(--surface-2); }
.sigue__otras a > span:last-child { display: grid; min-width: 0; }
.sigue__otras .folder-mini { margin-top: var(--s-1); }
.sigue__otras .muted { font-size: var(--t-sm); color: var(--text-3); }
.sigue__cambia { justify-self: start; }

/* Portada de asignatura: el camino de unidades */
.camino { display: grid; gap: var(--s-5); scroll-margin-top: var(--s-6); }
.camino__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); }
.camino__head h2 { font-size: var(--t-3xl); }
.camino__head p { color: var(--text-3); max-width: 60ch; margin-top: var(--s-1); }
.camino__pct { flex-shrink: 0; font-weight: 600; white-space: nowrap; }
.camino__pct span { font: 800 var(--t-2xl)/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.camino__u { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.cam-u { border-radius: var(--r-card); background: var(--surface); }
.cam-u > summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-card); cursor: pointer; list-style: none; transition: background-color var(--dur-micro) var(--ease-out); }
.cam-u > summary::-webkit-details-marker { display: none; }
.cam-u > summary:hover { background: var(--surface-2); }
.cam-u > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cam-u__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--text); font: 400 var(--t-lg)/1 var(--font-display); }
.cam-u.is-actual .cam-u__n { background: var(--cover); color: var(--cover-ink); }
.cam-u.is-hecha .cam-u__n { background: var(--moon-lit); color: var(--cover-ink); }
.cam-u__b { display: grid; gap: var(--s-1); min-width: 0; }
.cam-u__t { font-weight: 700; font-size: var(--t-lg); }
.cam-u__d { font-size: var(--t-sm); color: var(--text-3); }
.cam-u__bar { display: block; height: 4px; margin-top: var(--s-1); max-width: 18rem; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cam-u__bar > span { display: block; height: 100%; background: var(--moon-lit); transform: scaleX(0); transform-origin: left center; transition: transform var(--dur-short) var(--ease-out); }
.cam-u__s { font-size: var(--t-sm); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cam-u.is-actual .cam-u__s { color: var(--brand-text); font-weight: 600; }
.cam-u__flecha { color: var(--text-3); transition: transform var(--dur-short) var(--ease-out); }
.cam-u[open] .cam-u__flecha { transform: rotate(180deg); }
.cam-u.is-actual { box-shadow: inset 0 0 0 1.5px var(--cover); }
.cam-p { list-style: none; margin: 0; padding: 0 var(--s-5) var(--s-4); display: grid; }
.cam-p li { position: relative; }
.cam-p li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 50px; bottom: -6px; width: 1.5px; background: var(--line); }
.cam-p a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-2) var(--s-3) var(--s-2) 0; border-radius: var(--r-card); color: var(--text); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.cam-p a:hover { background: var(--surface-2); }
.cam-p a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cam-p__i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--edge); color: var(--text-2); background: var(--surface); position: relative; }
.cam-p__b { display: grid; gap: 2px; min-width: 0; }
.cam-p__k { font-size: var(--t-xs); font-weight: 600; color: var(--text-3); }
.cam-p__t { font-weight: 700; }
.cam-p__d { font-size: var(--t-sm); color: var(--text-3); }
.cam-p__s { font-size: var(--t-sm); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cam-p li.is-hecho .cam-p__i { background: var(--moon-lit); border-color: transparent; color: var(--cover-ink); }
.cam-p li.is-hecho .cam-p__s { color: var(--ok); font-weight: 600; }
.cam-p li.is-aqui a { background: var(--surface-2); }
.cam-p li.is-aqui .cam-p__i { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.cam-p li.is-aqui .cam-p__s { color: var(--brand-text); font-weight: 700; }
.todo-head { display: grid; gap: var(--s-1); padding-top: var(--s-6); border-top: 1px solid var(--line); scroll-margin-top: var(--s-6); }
.todo-head h2 { font-size: var(--t-2xl); }
.todo-head p { color: var(--text-3); font-size: var(--t-sm); }
@media (max-width: 40rem) {
  .today h1 { max-width: none; font-size: var(--t-3xl); }
  .guia, .sigue { padding: var(--s-5) var(--s-4); }
  .camino__head { flex-direction: column; align-items: start; }
  .cam-u > summary { grid-template-columns: 40px minmax(0, 1fr) 18px; padding: var(--s-4); gap: var(--s-3); }
  .cam-u__n { width: 40px; height: 40px; }
  .cam-u__s { display: none; }
  .cam-p { padding: 0 var(--s-2) var(--s-3); }
  .cam-p a { grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); }
  .cam-p__i { width: 40px; height: 40px; }
  .cam-p li:not(:last-child)::before { left: 19px; top: 46px; }
  .cam-p__s { grid-column: 2; justify-self: start; margin-top: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  .guia__op, .cam-u > summary, .cam-u__bar > span, .cam-u__flecha, .cam-p a, .sigue__otras a { transition: none; }
}

/* ── v28 · Racha que perdona y cierre del día (inicio) ── */
.semana .is-escudo .semana__d { stroke: var(--moon-lit); stroke-dasharray: 3 2; }
.semana .is-descanso { opacity: 0.55; }
.racha { display: grid; gap: var(--s-2); width: min(100%, 20rem); margin-top: var(--s-3); }
.racha__d { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.racha__d div { display: grid; gap: 2px; }
.racha__d dt { font-size: var(--t-xs); color: var(--text-3); }
.racha__d dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.racha__mas { font-size: var(--t-sm); color: var(--text-2); text-align: left; }
.racha__mas > summary { cursor: pointer; font-weight: 600; color: var(--text-2); text-align: center; border-radius: var(--r-tag); }
.racha__mas > summary:hover { color: var(--text); }
.racha__mas > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.racha__mas p { margin: var(--s-2) 0 0; }
.racha__dias { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-2); }
.racha__dia { min-width: 40px; min-height: 40px; padding: 0 var(--s-2); }
.manana { display: grid; gap: var(--s-2); width: min(100%, 20rem); margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-card); background: var(--surface-2); text-align: left; }
.manana__k { margin: 0; font-size: var(--t-xs); font-weight: 700; color: var(--text-3); }
.manana__t { margin: 0; font: 400 var(--t-lg)/1.3 var(--font-display); overflow-wrap: break-word; }
.manana__acc { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.manana__f { display: grid; gap: var(--s-2); }
.manana__l { font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.manana__i { min-height: 44px; width: 100%; padding: 0 var(--s-3); border: 1.5px solid var(--edge); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: 500 var(--t-md)/1 var(--font-body); }
.manana__i:hover { background: var(--surface-3); }
.manana__i:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.manana__f .btn { justify-self: start; }
.manana__ok { margin: 0; font-size: var(--t-sm); }
.manana__ok:empty { display: none; }

/* ── v28 · Enfoque: ideas aparcadas y pantalla encendida ── */
.enf-aparca { display: grid; gap: var(--s-3); }
.enf-aparca__f { display: flex; gap: var(--s-2); }
.enf-aparca__f .cu-i { flex: 1; min-width: 0; }
.enf-aparca__l { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.enf-aparca__l li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-cover); background: var(--surface-2); overflow-wrap: anywhere; }
.enf-aparca__l li span { min-width: 0; }
