/* Mi Mundo de Aprendizaje — interfaz
   Diseño: superficie clara con un leve tinte violeta; el arcoíris vive en una franja
   y en el color de cada área, nunca de fondo. Menú lateral en compu, barra abajo en celular. */
:root {
  --bg: #f7f6fc; --surface: #ffffff; --surface-2: #efedf8; --ink: #23213a; --muted: #625f7a; --line: #e0ddef;
  --accent: #6a3fd1; --accent-ink: #ffffff; --accent-soft: #ece5ff;
  --rojo: #e53935; --naranja: #fb8c00; --amarillo: #f9a825; --verde: #43a047; --azul: #1e88e5; --indigo: #3949ab; --violeta: #8e24aa;
  --ok: #2e7d32; --ok-soft: #e3f3e4; --warn: #a15c00; --warn-soft: #fff1d6; --bad: #c62828; --bad-soft: #fde4e4;
  --shadow: 0 1px 2px rgba(35, 33, 58, .06), 0 6px 20px rgba(35, 33, 58, .07);
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif; --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px; --tap: 48px; --arco: linear-gradient(90deg, var(--rojo), var(--naranja), var(--amarillo), var(--verde), var(--azul), var(--indigo), var(--violeta));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15141e; --surface: #1f1d2b; --surface-2: #2a2839; --ink: #ecebf5; --muted: #a6a3bd; --line: #353247;
  --accent: #a98bff; --accent-ink: #1a1230; --accent-soft: #2e2550;
  --ok: #7bd389; --ok-soft: #1b3122; --warn: #f0b75c; --warn-soft: #3a2d17; --bad: #ff8a80; --bad-soft: #3d1f1f; --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #15141e; --surface: #1f1d2b; --surface-2: #2a2839; --ink: #ecebf5; --muted: #a6a3bd; --line: #353247;
  --accent: #a98bff; --accent-ink: #1a1230; --accent-soft: #2e2550;
  --ok: #7bd389; --ok-soft: #1b3122; --warn: #f0b75c; --warn-soft: #3a2d17; --bad: #ff8a80; --bad-soft: #3d1f1f; --shadow: none; color-scheme: dark; }
:root.letra-grande { font-size: 118%; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: 1.9rem; font-weight: 800; } h2 { font-size: 1.35rem; font-weight: 700; } h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.arco-franja { height: 6px; background: var(--arco); }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- botones y campos ---------- */
.btn { min-height: var(--tap); padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.07); } .btn:active { transform: scale(.98); } .btn[disabled] { opacity: .55; cursor: default; }
.btn.ancho { width: 100%; }
.btn.sec { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.suave { background: var(--accent-soft); color: var(--ink); }
.btn.peligro { background: var(--bad); color: #fff; }
.btn.chico { min-height: 38px; padding: 0 14px; font-size: .92rem; border-radius: 11px; }
.btn.verde { background: var(--ok); color: #fff; }
.link { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
.volver { background: none; border: 0; color: var(--muted); font-weight: 700; cursor: pointer; padding: 6px 0; display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; }
.campo { display: flex; flex-direction: column; gap: 6px; } .campo label { font-weight: 700; font-size: .95rem; } .campo .ayuda { color: var(--muted); font-size: .86rem; }
.input, select.input, textarea.input { min-height: var(--tap); border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); padding: 10px 14px; width: 100%; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.codigo { font: 800 1.45rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; }
.chip .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip[aria-pressed="true"] .pt { background: #fff; }
.chips.desliza { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .chips.desliza .chip { flex: none; }
.segmento { display: inline-grid; grid-auto-flow: column; background: var(--surface-2); border-radius: 13px; padding: 4px; gap: 4px; }
.segmento button { min-height: 38px; border: 0; border-radius: 10px; background: none; font-weight: 800; padding: 0 14px; cursor: pointer; color: var(--muted); }
.segmento button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.interruptor { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.interruptor input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .2s; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.interruptor input:checked { background: var(--accent); } .interruptor input:checked::after { transform: translateX(18px); }
.aviso { padding: 12px 14px; border-radius: 12px; font-size: .95rem; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.aviso.error { background: var(--bad-soft); border-color: var(--bad); } .aviso.ok { background: var(--ok-soft); border-color: var(--ok); } .aviso.warn { background: var(--warn-soft); border-color: var(--warn); }

/* ---------- pantallas de entrada ---------- */
.entrada { min-height: 100vh; display: flex; flex-direction: column; }
.entrada-centro { flex: 1; display: grid; place-items: center; padding-block: 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tarjeta-entrada { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.marca { display: flex; align-items: center; gap: 12px; }
.marca-logo { width: 52px; height: 52px; flex: none; }
.marca b { font: 800 1.3rem/1.05 var(--display); display: block; } .marca small { color: var(--muted); font-size: .88rem; }
.portada-entrada { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.portada-entrada h1 { font-size: 2.1rem; }
.lista-beneficios { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-beneficios li { display: flex; gap: 10px; align-items: flex-start; font-size: .96rem; }
.lista-beneficios li i { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }
.talon { border: 2px dashed var(--accent); border-radius: 14px; padding: 14px; text-align: center; background: var(--accent-soft); }
.talon b { font: 800 1.6rem ui-monospace, Menlo, monospace; letter-spacing: .1em; overflow-wrap: anywhere; }
.digitos { font: 800 1.8rem ui-monospace, Menlo, monospace; letter-spacing: .45em; text-align: center; padding-left: .45em; }
.opcion-equipo { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.opcion-equipo:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opcion-equipo input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- estructura principal ---------- */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.lateral .arco-franja { flex: none; }
.lateral-interior { padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; overflow: auto; flex: 1; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--muted); text-align: left; }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav button[aria-current="page"] .ico { color: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }
.lateral-pie { font-size: .82rem; color: var(--muted); padding: 0 6px; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.contenido { width: 100%; max-width: 1180px; margin: 0 auto; padding-block: 24px 60px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 22px; }
.barra-abajo { display: none; }
.cabecera-movil { display: none; }
.demo-barra { background: var(--warn-soft); border-bottom: 1px solid var(--line); font-size: .86rem; padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; }
.demo-barra b { color: var(--warn); }
.demo-barra .link { padding: 0; }

@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { display: none; }
  .cabecera-movil { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
  .contenido { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .barra-abajo { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .barra-abajo button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .74rem; font-weight: 800; color: var(--muted); min-height: 52px; justify-content: center; cursor: pointer; }
  .barra-abajo button[aria-current="page"] { color: var(--accent); }
  .barra-abajo .ico { width: 25px; height: 25px; }
}

/* ---------- Mi espacio (inicio) ---------- */
.saludo { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.saludo h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.buscador { position: relative; width: 100%; }
.buscador .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.buscador .input { padding-left: 46px; min-height: 52px; border-radius: 16px; }
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cifra { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; position: relative; overflow: hidden; }
.cifra::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.cifra:hover { border-color: var(--c); }
.cifra span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.cifra b { font: 800 1.9rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.cifra em { font-style: normal; font-size: .8rem; color: var(--muted); }
.tablero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-cab h2 { font-size: 1.15rem; }
.hoy-fichas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cuenta-regresiva { display: flex; gap: 14px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.cuenta-regresiva b { font: 800 2rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--accent); }
.efemeride { display: flex; gap: 12px; align-items: center; border-radius: 14px; padding: 12px 14px; border: 1.5px dashed var(--line); cursor: pointer; background: none; text-align: left; width: 100%; }
.efemeride .fecha-chip { background: var(--accent); color: var(--accent-ink); }
.fecha-chip { font-weight: 800; font-size: .8rem; border-radius: 10px; padding: 6px 8px; min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; background: var(--surface-2); line-height: 1.15; }
.recordatorios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recordatorios li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recordatorios li:last-child { border-bottom: 0; }
.recordatorios input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.recordatorios li.hecho .rec-texto { text-decoration: line-through; color: var(--muted); }
.recordatorios .rec-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rec-nuevo { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.rec-nuevo .input { min-height: 42px; }
.barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.barras li { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 2.5em; gap: 10px; align-items: center; font-size: .9rem; }
.barras .pista { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.barras .pista i { display: block; height: 100%; border-radius: 99px; }
.barras b { text-align: right; font-variant-numeric: tabular-nums; }
.atajos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.atajo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font-weight: 800; font-size: .9rem; }
.atajo .ico { color: var(--c); width: 26px; height: 26px; }
.atajo:hover { border-color: var(--c); }
.vacio { text-align: center; color: var(--muted); padding: 22px 10px; font-size: .95rem; }
@media (max-width: 1050px) { .tablero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hoy-fichas { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tarjetas de fichas ---------- */
.grilla-fichas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ficha-tarjeta { --c: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; transition: border-color .15s, transform .15s; }
.ficha-tarjeta:hover { border-color: var(--c); transform: translateY(-2px); }
.ft-mini { height: 128px; background: var(--surface-2); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.ft-mini .escala { position: absolute; left: 50%; top: 10px; transform-origin: top center; transform: translateX(-50%) scale(.26); pointer-events: none; }
.ft-mini .hoja { box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.ft-cuerpo { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.ft-cuerpo b { font-weight: 800; line-height: 1.25; }
.ft-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .78rem; font-weight: 800; }
.etiqueta { border-radius: 99px; padding: 2px 9px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); }
.etiqueta.nivel { background: var(--surface-2); }
.corazon { margin-left: auto; color: var(--rojo); font-size: 1rem; }
.filtros { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.filtro-fila { display: flex; gap: 10px; align-items: center; min-width: 0; }
.filtro-fila > span { font-weight: 800; font-size: .85rem; color: var(--muted); min-width: 56px; }
.filtro-fila .chips { min-width: 0; }
@media (max-width: 700px) { .filtro-fila { flex-direction: column; align-items: stretch; gap: 6px; } }

/* ---------- detalle de ficha ---------- */
.detalle { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.vista { background: var(--surface-2); border-radius: var(--r); padding: 16px; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.vista-hoja { position: relative; width: 100%; max-width: 640px; }
.vista-hoja .escala { transform-origin: top left; position: absolute; left: 0; top: 0; }
.vista-hoja .hoja { box-shadow: 0 6px 26px rgba(0,0,0,.18); }
.paginador { display: flex; gap: 8px; align-items: center; }
.controles { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.guia { font-size: .95rem; display: flex; flex-direction: column; gap: 8px; }
.guia ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.competencias { display: flex; gap: 6px; flex-wrap: wrap; }
.competencias span { background: var(--surface-2); border-radius: 99px; padding: 3px 10px; font-size: .8rem; font-weight: 700; }
@media (max-width: 1000px) { .detalle { grid-template-columns: minmax(0, 1fr); } .controles { position: static; } }

/* ---------- listas, tablas, modales ---------- */
.lista { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lista-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lista-item:last-child { border-bottom: 0; }
.lista-item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icono-btn { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex: none; }
.icono-btn .ico { width: 18px; height: 18px; }
.icono-btn[disabled] { opacity: .35; cursor: default; }
.tabla-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.tabla-ui { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla-ui th, .tabla-ui td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tabla-ui th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.tabla-ui tr.clic { cursor: pointer; } .tabla-ui tr.clic:hover td { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.activa { background: var(--ok-soft); color: var(--ok); } .pill.sin_usar { background: var(--accent-soft); color: var(--accent); }
.pill.pausada, .pill.anulada { background: var(--bad-soft); color: var(--bad); } .pill.marcada { background: var(--warn-soft); color: var(--warn); }
.velo { position: fixed; inset: 0; background: rgba(15, 12, 30, .5); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--bg); width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; animation: sube .2s ease-out; }
@keyframes sube { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 700px) { .velo { align-items: center; padding: 20px; } .modal { border-radius: 22px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40; background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 18px; font-weight: 700; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; gap: 14px; align-items: center; }
@media (max-width: 899px) { .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 800; cursor: pointer; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .95rem; } .dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.mensaje-wa { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 12px; font-size: .9rem; }
.manual details { border-bottom: 1px solid var(--line); } .manual details:last-child { border-bottom: 0; }
.manual summary { cursor: pointer; font-weight: 800; padding: 15px 30px 15px 0; list-style: none; position: relative; }
.manual summary::-webkit-details-marker { display: none; }
.manual summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; color: var(--accent); }
.manual details[open] summary::after { content: '−'; }
.manual .texto { padding: 0 0 16px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.manual .texto ol, .manual .texto ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.legal { max-width: 70ch; line-height: 1.65; display: flex; flex-direction: column; gap: 10px; } .legal h2 { margin-top: 10px; font-size: 1.1rem; }

/* ---------- taller ---------- */
.herramientas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.herramienta { --c: var(--accent); display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.herramienta:hover { border-color: var(--c); }
.herramienta .ico { color: var(--c); width: 30px; height: 30px; }
.herramienta b { display: block; } .herramienta small { color: var(--muted); font-size: .85rem; line-height: 1.35; display: block; margin-top: 2px; }
.form-taller { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* ---------- juegos ---------- */
.juegos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.juego-tarjeta { --c: var(--accent); border-radius: 18px; padding: 16px; border: 0; cursor: pointer; text-align: left; background: color-mix(in srgb, var(--c) 14%, var(--surface)); display: flex; flex-direction: column; gap: 6px; min-height: 128px; }
.juego-tarjeta:hover { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.juego-tarjeta .emo { font-size: 2rem; line-height: 1; }
.juego-tarjeta b { font: 800 1.1rem var(--display); } .juego-tarjeta small { color: var(--muted); }
.escenario { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; min-height: 420px; }
.escenario .grande { font: 800 clamp(2.4rem, 9vw, 4rem)/1.1 var(--display); }
.escenario .emojis { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.3; letter-spacing: .1em; max-width: 520px; }
.opciones-juego { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; width: 100%; max-width: 520px; }
.opciones-juego button { min-height: 66px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font: 800 1.5rem var(--display); cursor: pointer; }
.opciones-juego button:hover { border-color: var(--accent); }
.opciones-juego button.bien { background: var(--ok-soft); border-color: var(--ok); }
.opciones-juego button.mal { background: var(--bad-soft); border-color: var(--bad); animation: tiembla .3s; }
@keyframes tiembla { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.estrellas { font-size: 1.3rem; letter-spacing: .1em; color: var(--amarillo); min-height: 1.6em; }
.memo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 480px; }
.memo button { aspect-ratio: 1; border-radius: 14px; border: 0; cursor: pointer; font-size: clamp(1.6rem, 6vw, 2.4rem); background: var(--arco); color: transparent; max-width: 100%; }
.memo button.vista, .memo button.par { background: var(--surface-2); color: var(--ink); }
.memo button.par { outline: 3px solid var(--ok); }
.palabra-armada { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 64px; }
.palabra-armada span { min-width: 54px; height: 56px; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; font: 800 1.4rem var(--display); padding: 0 8px; }
.teclado { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 560px; }
.teclado button { width: 42px; height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.teclado button:disabled { opacity: .3; }
.progreso { width: 100%; max-width: 420px; height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progreso i { display: block; height: 100%; background: var(--arco); transition: width .3s; }

/* ---------- planificador e impresión de UI ---------- */
.plan-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-form .ancho { grid-column: 1 / -1; }
@media (max-width: 700px) { .plan-form { grid-template-columns: minmax(0, 1fr); } }
#zona-impresion { display: none; }
.venta-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 800px) { .venta-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metodos { display: flex; gap: 6px; flex-wrap: wrap; } .metodos span { font-size: .8rem; background: var(--surface-2); border-radius: 8px; padding: 3px 8px; }
.instalar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.cargando { min-height: 60vh; display: grid; place-items: center; color: var(--muted); font-weight: 700; }

/* ---------- Mi año ---------- */
.semanas { display: flex; flex-direction: column; gap: 14px; }
.trim-titulo { font-size: 1rem; margin-top: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--body); font-weight: 800; }
.semana.actual { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.semana h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dias { display: flex; flex-direction: column; }
.dia { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.dia .grow b { display: block; }
.dia .grow small { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.dia.hecho .grow b { text-decoration: line-through; color: var(--muted); }
.dia.hoy .fecha-chip { background: var(--accent); color: var(--accent-ink); }
.dia.feriado { opacity: .7; }
.hecho-chk input { width: 22px; height: 22px; accent-color: var(--ok); cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plan-hoy { --c: var(--accent); align-self: flex-start; }
