/* MenteViva — pensada para personas mayores y con acabado premium (estética Axial: pasteles cálidos + vidrio sutil).
   Criterios: WCAG 2.2 AA/AAA (texto ≥ 7:1, objetivos táctiles ≥ 64 px, sin arrastrar, sin límites de tiempo, foco visible,
   respeta reducir movimiento / transparencia / contraste alto / texto ampliado), una tarea por pantalla, lenguaje claro,
   nunca una "X" roja ni un sonido de error. El texto crece sin romper la pantalla: la cuadrícula es fluida y nada se corta. */
:root {
    --ink: #1a2233;           /* ~15:1 sobre el vidrio */
    --ink-soft: #384459;      /* ~9:1 */
    --primary: #2c4690;       /* blanco encima ~9:1 */
    --primary-2: #4b63b8;
    --calm: #1d6a5c;
    --ok: #1f6b45;
    --gold: #c98a1b;
    --glass: rgba(255, 255, 255, .72);
    --glass-strong: rgba(255, 255, 255, .94);
    --line: rgba(26, 34, 51, .14);
    --radius: 30px;
    --target: 68px;
    --fs: 1;
    --pad: clamp(16px, 4.2vw, 26px);
    font-size: calc(20px * var(--fs));
}
html[data-texto="grande"] { --fs: 1.15; }
html[data-texto="enorme"] { --fs: 1.25; }
@media (min-width: 700px) { :root { font-size: calc(22px * var(--fs)); } }
html[data-contraste="alto"] { --glass: #ffffff; --glass-strong: #ffffff; --line: #1a2233; --ink-soft: #1a2233; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body {
    margin: 0; min-height: 100dvh; color: var(--ink); overflow-x: hidden;
    font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5; letter-spacing: .005em; font-variant-numeric: lining-nums;
    background: #fbf6ef;
}
/* aurora de fondo: cambia con la hora del día (data-franja) */
body::before {
    content: ""; position: fixed; inset: -20% -10% auto -10%; height: 90vh; z-index: -1; pointer-events: none;
    background:
        radial-gradient(520px 380px at 12% 18%, var(--a1, #ffd9bd), transparent 70%),
        radial-gradient(560px 420px at 88% 8%, var(--a2, #e3d8ff), transparent 70%),
        radial-gradient(600px 420px at 55% 62%, var(--a3, #d3efe4), transparent 72%);
    filter: blur(8px); animation: aurora 26s ease-in-out infinite alternate;
}
html[data-franja="manana"] { --a1: #ffd7b0; --a2: #ffe9b3; --a3: #fde0e6; }
html[data-franja="tarde"]  { --a1: #ffdcc2; --a2: #dcd6ff; --a3: #cdeee3; }
html[data-franja="noche"]  { --a1: #cfc8ff; --a2: #b9cdf5; --a3: #e1d3f7; }
@keyframes aurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2%, 3%, 0) scale(1.06); } }
h1, h2, h3 { line-height: 1.18; margin: 0; letter-spacing: -.005em; }
h1 { font-size: 1.55rem; font-weight: 800; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; font-weight: 800; overflow-wrap: anywhere; }
p { margin: 0; overflow-wrap: anywhere; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* columna fluida y de alto completo: cada pantalla cabe sin scroll (solo hace scroll como último recurso) */
html, body { height: 100%; }
#app { width: 100%; max-width: 720px; height: 100dvh; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) var(--pad) max(16px, env(safe-area-inset-bottom));
    display: flex; flex-direction: column; overflow: hidden; }
.pantalla { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.8dvh, 16px); overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; animation: entra .42s cubic-bezier(.2, .8, .2, 1) both; }
.pantalla::-webkit-scrollbar { display: none; }
.pantalla > * { flex: 0 0 auto; min-width: 0; }
.pantalla > .relleno { flex: 1 1 auto; min-height: 0; }
@keyframes entra { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulso { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pantalla > * { animation: aparece .5s cubic-bezier(.2, .8, .2, 1) both; }
.pantalla > *:nth-child(2) { animation-delay: .05s; } .pantalla > *:nth-child(3) { animation-delay: .1s; }
.pantalla > *:nth-child(4) { animation-delay: .15s; } .pantalla > *:nth-child(5) { animation-delay: .2s; }
@media (min-width: 900px) { #app { max-width: 860px; padding-top: 24px; } }

/* vidrio premium */
.vidrio {
    position: relative; min-width: 0; padding: var(--pad); border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(255, 255, 255, .86), var(--glass));
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 22px 50px -18px rgba(70, 60, 140, .28), 0 2px 6px rgba(70, 60, 140, .06), inset 0 1px 0 rgba(255, 255, 255, .95);
    -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .vidrio { background: var(--glass-strong); } }
@media (prefers-reduced-transparency: reduce) { .vidrio { background: var(--glass-strong); -webkit-backdrop-filter: none; backdrop-filter: none; } body::before { display: none; } }

/* barra superior */
.barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 12px 14px; border-radius: 26px; }
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 800; font-size: 1.05rem; }
.marca img { width: 50px; height: 50px; flex: 0 0 auto; filter: drop-shadow(0 6px 10px rgba(90, 80, 200, .35)); }

/* botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: var(--target); min-width: 0;
    padding: 14px 20px; border-radius: 22px; border: 2px solid var(--line); background: var(--glass-strong); color: var(--ink);
    font: inherit; font-weight: 800; line-height: 1.25; cursor: pointer; text-align: center; white-space: normal; overflow-wrap: anywhere;
    -webkit-tap-highlight-color: transparent; box-shadow: 0 6px 16px -10px rgba(40, 50, 90, .45);
    transition: transform .14s ease, box-shadow .14s ease;
}
.btn:active { transform: scale(.985); }
.btn--primario { background: linear-gradient(135deg, var(--primary-2), var(--primary)); border-color: transparent; color: #fff; box-shadow: 0 16px 28px -14px rgba(44, 70, 144, .75); }
.btn--calma { background: linear-gradient(135deg, #3f9e8b, var(--calm)); border-color: transparent; color: #fff; box-shadow: 0 16px 28px -14px rgba(29, 106, 92, .7); }
.btn--chico { width: auto; min-height: 56px; padding: 10px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.btn .ico { font-size: 1.3em; line-height: 1; }
:focus-visible { outline: 5px solid #ffb703; outline-offset: 3px; border-radius: 14px; }
.fila { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.fila--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fila--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* héroe de saludo */
.heroe { overflow: hidden; background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .62)); }
.heroe::after {
    content: ""; position: absolute; right: -40px; top: -40px; width: 190px; height: 190px; border-radius: 50%; opacity: .55; pointer-events: none;
    background: radial-gradient(circle at 35% 35%, var(--sol1, #ffe3a3), var(--sol2, #ffbd7a) 55%, transparent 72%);
}
html[data-franja="noche"] .heroe::after { --sol1: #ffffff; --sol2: #b8b8ff; opacity: .5; }
.etiqueta { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.saludo-nombre { font-size: clamp(1.9rem, 5.2vw, 2.7rem); font-weight: 800; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); font-weight: 800; font-size: .92rem; }
.fecha { margin-top: 8px; font-size: 1rem; color: var(--ink-soft); }

/* opciones grandes (ánimo, sueño) */
.opcion {
    display: grid; justify-items: center; align-content: center; gap: 8px; padding: 16px 10px; min-height: 124px; min-width: 0; border-radius: 26px;
    border: 3px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; font-weight: 800; line-height: 1.2; cursor: pointer; text-align: center;
    overflow-wrap: anywhere; box-shadow: 0 10px 20px -14px rgba(40, 50, 90, .5);
}
.opcion .cara { font-size: 2.8rem; line-height: 1; }
.opcion[aria-pressed="true"] { border-color: var(--primary); background: linear-gradient(160deg, #f1f4ff, #e4eaff); box-shadow: 0 0 0 5px rgba(44, 70, 144, .2); }

/* rutina */
.anillo-fila { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.anillo { width: 92px; height: 92px; flex: 0 0 auto; }
.anillo text { font: 800 22px "Atkinson Hyperlegible", system-ui, sans-serif; fill: var(--ink); }
.rutina { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.tarea {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; text-align: left; width: 100%;
    min-height: 92px; padding: 14px 18px; border-radius: 26px; border: 2px solid var(--line); background: var(--glass-strong); color: var(--ink);
    font: inherit; cursor: pointer; box-shadow: 0 14px 26px -18px rgba(40, 50, 90, .55);
}
.tarea .icono { width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; font-size: 1.9rem; background: linear-gradient(145deg, #fff3e2, #ffe0c8); }
.tarea[data-ej="pastillero"] .icono { background: linear-gradient(145deg, #e9efff, #d3dcff); }
.tarea[data-ej="secuencia"] .icono { background: linear-gradient(145deg, #e6f6ee, #cdeedd); }
.tarea .titulo { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.tarea .sub { color: var(--ink-soft); font-size: .88rem; margin-top: 2px; }
.tarea .estado { font-weight: 800; font-size: 1rem; padding: 6px 12px; border-radius: 999px; background: rgba(26, 34, 51, .07); white-space: nowrap; }
.tarea[data-hecha="true"] { border-color: var(--ok); background: linear-gradient(160deg, #f1fbf5, #e4f6ec); }
.tarea[data-hecha="true"] .estado { background: var(--ok); color: #fff; }

/* ejercicios */
.cabecera-ej { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.puntos { display: flex; gap: 8px; }
.puntos i { width: 14px; height: 14px; border-radius: 50%; background: rgba(26, 34, 51, .16); }
.puntos i.hecho { background: var(--ok); }
.puntos i.actual { background: var(--primary); box-shadow: 0 0 0 4px rgba(44, 70, 144, .22); }
.enunciado { font-size: clamp(1.5rem, 4.4vw, 2.1rem); font-weight: 800; margin-top: 10px; }
.consigna { font-size: 1rem; color: var(--ink-soft); margin-top: 6px; }

/* dinero */
.total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; font-size: 1.05rem; }
.total strong { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.bandeja { min-height: 88px; display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; margin-top: 12px; border-radius: 22px; border: 3px dashed rgba(26, 34, 51, .22); background: rgba(255, 255, 255, .55); align-content: flex-start; }
.dinero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.4rem), 1fr)); gap: 12px; }
.billete, .moneda {
    display: grid; place-items: center; font: inherit; font-weight: 800; color: #10151f; cursor: pointer; min-width: 0;
    transition: opacity .35s ease, transform .2s ease, box-shadow .2s ease;
}
.billete { min-height: 104px; border-radius: 16px; font-size: 1.25rem; padding: 10px; border: 3px solid rgba(16, 21, 31, .55);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%); box-shadow: 0 12px 22px -16px rgba(16, 21, 31, .7); }
.moneda { aspect-ratio: 1; width: min(100%, 8.5rem); justify-self: center; border-radius: 50%; font-size: 1.15rem; border: 4px solid rgba(16, 21, 31, .5);
    background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 55%); box-shadow: 0 12px 22px -14px rgba(16, 21, 31, .7); }
.mini { min-height: 52px; min-width: 88px; padding: 6px 10px; font-size: .95rem; cursor: default; box-shadow: none; }
.mini.moneda { min-width: 0; width: 56px; font-size: .8rem; }
.b1000 { background-color: #bcd8ff; } .b2000 { background-color: #e0c9ff; } .b5000 { background-color: #ffc6c6; } .b10000 { background-color: #bff0c8; } .b20000 { background-color: #ffd9a8; }
.m100 { background-color: #dfe2e8; } .m500 { background-color: #f1d98a; }

/* pastillero */
.receta { display: grid; gap: 10px; padding: 14px 16px; margin-top: 12px; border-radius: 20px; background: rgba(255, 255, 255, .7); border: 2px solid var(--line); }
.pastilla { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; }
.bolita { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(16, 21, 31, .5); display: inline-block; flex: 0 0 auto; }
.casillero { min-height: 116px; flex-direction: column; font-size: 1.15rem; }
.casillero .puestas { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 34px; }

/* secuencia */
.tarjetas { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.tarjeta { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 88px; justify-content: flex-start; }
.tarjeta .num { min-width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.2rem; }
.tarjeta[data-puesta="true"] { border-color: var(--ok); background: linear-gradient(160deg, #f1fbf5, #e4f6ec); }

/* aprendizaje sin error */
.atenuar { opacity: .28; transform: scale(.97); }
.resaltar { border-color: var(--ok) !important; box-shadow: 0 0 0 7px rgba(31, 107, 69, .32), 0 16px 30px -12px rgba(31, 107, 69, .45) !important; opacity: 1 !important; }

/* respiración */
.respira { display: grid; place-items: center; padding: 18px 0; }
.circulo { width: min(64vw, 300px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 14px; font-size: 1.35rem; font-weight: 800; color: #fff;
    background: radial-gradient(circle at 35% 28%, #6fc7b4, var(--calm)); box-shadow: 0 30px 60px -20px rgba(29, 106, 92, .6), inset 0 2px 0 rgba(255, 255, 255, .35); transition: transform 4s ease-in-out; }
.circulo[data-fase="inhala"] { transform: scale(1.12); }
.circulo[data-fase="exhala"] { transform: scale(.88); }
@media (prefers-reduced-motion: reduce) { .circulo, .btn, .billete, .moneda { transition: none; } body::before { animation: none; } }

/* racha */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.semana span { text-align: center; font-weight: 800; font-size: .85rem; }
.semana span i { display: block; width: 100%; aspect-ratio: 1; max-width: 42px; margin: 6px auto 0; border-radius: 50%; border: 3px solid var(--line); }
.semana span i.hecho { background: var(--ok); border-color: var(--ok); }

/* PIN */
.pin { display: flex; justify-content: center; gap: 16px; margin: 14px 0 6px; }
.pin i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); }
.pin i.lleno { background: var(--ink); }
.teclado { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.teclado .btn { min-height: 78px; font-size: 1.7rem; padding: 8px; }
.aviso { padding: 14px 16px; margin-top: 12px; border-radius: 18px; background: #fff3d6; border: 2px solid #e0b24a; font-weight: 700; }

/* ajustes */
.vista-previa { margin-top: 14px; padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .75); border: 2px dashed var(--line); font-size: 1rem; }

/* diálogo propio (sin alert/confirm nativos) */
.velo { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(20, 25, 40, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialogo { width: min(560px, 100%); background: #fff; border-radius: var(--radius); padding: var(--pad); display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }

@media (forced-colors: active) { .vidrio, .btn, .opcion, .tarea { border: 2px solid CanvasText; } }

/* ─────── inicio rediseñado ─────── */
.barra { padding: 8px 12px; }
.circular { width: 60px; min-width: 60px; padding: 0; border-radius: 50%; }
.heroe { padding: clamp(14px, 3.4vw, 22px); }
.heroe .fila-heroe { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.saludo-nombre { font-size: clamp(1.7rem, 7.4vw, 2.5rem); margin-top: 2px; }
.mensaje { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 16px; border-radius: 24px; }
.mensaje .avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #e9efff, #cfd9ff); font-size: 1.3rem; }
.mensaje p { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mensaje .de { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.panel-rutina { display: grid; gap: 14px; }
.cabeza-rutina { display: flex; align-items: center; gap: 16px; }
.cabeza-rutina .anillo { width: clamp(78px, 22vw, 96px); height: clamp(78px, 22vw, 96px); }
.anillo .pista { fill: none; stroke: rgba(26, 34, 51, .12); stroke-width: 9; }
.anillo .avance { fill: none; stroke: url(#grad-anillo); stroke-width: 9; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.siguiente { min-height: 84px; font-size: 1.15rem; border-radius: 26px; gap: 14px; justify-content: space-between; padding: 12px 20px; }
.siguiente .ico { font-size: 1.7rem; }
.siguiente .flecha { font-size: 1.6rem; margin-left: auto; }
.mini-tareas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-tarea { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; min-height: 84px; border-radius: 22px; border: 2px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.mini-tarea .ic { font-size: 1.7rem; line-height: 1; }
.mini-tarea .tx { font-size: .78rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.mini-tarea[data-hecha="true"] { border-color: var(--ok); background: linear-gradient(160deg, #f1fbf5, #e4f6ec); }
.mini-tarea[data-hecha="true"] .tx::after { content: " ✔"; color: var(--ok); }

/* check-in en pasos de un toque */
.paso-checkin { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.paso-checkin .opcion { flex: 1 1 0; min-height: 0; grid-template-columns: auto minmax(0, 1fr); justify-items: start; padding: 10px 22px; gap: 18px; font-size: 1.2rem; text-align: left; align-content: center; }
.paso-checkin .opcion .cara { font-size: clamp(2.4rem, 9dvh, 3.6rem); }
.opcion:active { animation: pulso .3s ease; }
.omitir { background: transparent; border: 0; box-shadow: none; text-decoration: underline; min-height: 58px; color: var(--ink-soft); }

/* ejercicios compactos */
.cabecera-ej { flex-wrap: nowrap; }
.enunciado { font-size: clamp(1.35rem, 6vw, 2rem); margin-top: 2px; }
.total { margin-top: 0; }
.bandeja { min-height: 66px; padding: 10px; margin-top: 0; }
.relleno.dinero { grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.relleno.dinero .billete { min-height: 0; height: 100%; }
.relleno.dinero .moneda { height: auto; max-height: 100%; }
.fila-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fila-3.relleno { grid-auto-rows: minmax(0, 1fr); }
.fila-3 .casillero { min-height: 0; height: 100%; padding: 8px 4px; font-size: 1rem; }
.tarjetas.relleno { display: grid; grid-auto-rows: minmax(64px, 1fr); }
.tarjeta { min-height: 0; padding: 8px 16px; font-size: 1.05rem; }
.puesto { animation: pulso .45s ease; }
.billete:active, .moneda:active { transform: scale(.96); }
@media (max-height: 700px) { .heroe::after { display: none; } .siguiente { min-height: 72px; } .mini-tarea { min-height: 72px; } }

/* ajustes finos tras revisión visual */
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }
.relleno.dinero .moneda { width: min(100%, 8rem); height: auto; aspect-ratio: 1; align-self: center; justify-self: center; max-height: 100%; }
.relleno.dinero .billete { align-self: stretch; }
.mini-tarea .tx { overflow-wrap: break-word; word-break: normal; hyphens: auto; font-size: .8rem; }
.zona-quitar { display: flex; gap: 10px; align-items: stretch; margin-top: 10px; }
.zona-quitar .bandeja { flex: 1 1 auto; margin: 0; min-height: 60px; }
.zona-quitar .btn { align-self: stretch; width: auto; white-space: normal; }
html[data-texto="enorme"] .mini-tareas { display: none; }
html[data-texto="enorme"] .mensaje p { -webkit-line-clamp: 2; }
.ajustes .opcion { min-height: 88px; padding: 8px 6px; gap: 2px; }
.ajustes .fila--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ajustes .btn { min-height: 64px; font-size: .95rem; padding: 10px 14px; }
.ajustes .vista-previa { margin-top: 10px; padding: 10px 14px; }

/* compactación del inicio y monedas redondas */
.relleno.dinero .moneda { width: auto; height: min(100%, 7.4rem); aspect-ratio: 1; max-height: none; max-width: 100%; }
.frase-fecha { margin-top: 6px; font-size: 1.02rem; }
.heroe .saludo-nombre { margin-top: 0; }
html[data-texto="grande"] .mini-tareas, html[data-texto="enorme"] .mini-tareas { display: none; }
html[data-texto="grande"] .cabeza-rutina .fecha, html[data-texto="enorme"] .cabeza-rutina .fecha { display: none; }
html[data-texto="grande"] .mensaje p, html[data-texto="enorme"] .mensaje p { -webkit-line-clamp: 2; }
html[data-texto="grande"] .cabeza-rutina .anillo, html[data-texto="enorme"] .cabeza-rutina .anillo { width: 68px; height: 68px; }
html[data-texto="grande"] .saludo-nombre, html[data-texto="enorme"] .saludo-nombre { font-size: clamp(1.5rem, 6.2vw, 2rem); }
.panel-rutina { gap: 10px; }
.cabeza-rutina .anillo { width: clamp(64px, 17vw, 84px); height: clamp(64px, 17vw, 84px); }
.heroe::after { width: 150px; height: 150px; right: -34px; top: -34px; }

/* ─────── ilustraciones, billetes reales y piezas nuevas ─────── */
.i { width: 1em; height: 1em; display: block; }
.ico { display: inline-flex; align-items: center; justify-content: center; }
.heroe::after { display: none; }
.heroe { overflow: hidden; }
.heroe .ilu { position: absolute; inset: 0 0 0 auto; width: 54%; opacity: .9; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.heroe .ilu svg, .escena { width: 100%; height: 100%; display: block; }
.heroe > *:not(.ilu) { position: relative; z-index: 1; }

/* billetes y monedas SVG */
.billete, .moneda { background: none !important; border: 0 !important; padding: 0; box-shadow: none; filter: drop-shadow(0 10px 14px rgba(16, 21, 31, .28)); }
.billete { min-height: 0; border-radius: 12px; display: block; }
.billete .billete-svg, .moneda .moneda-svg { width: 100%; height: auto; display: block; }
.moneda { width: min(100%, 7.4rem); justify-self: center; aspect-ratio: 1; }
.moneda .moneda-svg { height: 100%; }
.relleno.dinero .billete { height: auto; align-self: center; }
.relleno.dinero .moneda { height: min(100%, 7.4rem); width: auto; }
.mini.billete { width: 92px; min-width: 0; min-height: 0; padding: 0; }
.mini.moneda { width: 54px; min-width: 0; }
.billete.atenuar, .moneda.atenuar { filter: grayscale(.7) drop-shadow(0 4px 6px rgba(16, 21, 31, .15)); }
.billete.resaltar, .moneda.resaltar { border-radius: 14px; }
.puesto { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.chispa { position: fixed; z-index: 90; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; animation: chispa .7s ease-out forwards; }
@keyframes chispa { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .puesto, .chispa, .sonando, .caminante { animation: none !important; transition: none !important; } }

/* caras */
.cara-svg { width: clamp(52px, 9dvh, 72px); height: auto; display: block; }
.paso-checkin .opcion .cara { font-size: 0; }

/* mensaje de familia */
.mensaje-familia { justify-content: flex-start; gap: 14px; min-height: 76px; border-radius: 26px; }
.mensaje-familia .avatar, .mensaje .avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #ffe9d6, #ffd0b0); color: #8a3d12; flex: 0 0 auto; }
.mensaje-familia .flecha { margin-left: auto; }
.postal { display: grid; gap: 10px; padding: 12px; }
.postal img { width: 100%; max-height: 38dvh; object-fit: cover; border-radius: 18px; border: 6px solid #fff; box-shadow: 0 14px 28px -16px rgba(40, 50, 90, .6); }
.postal audio { width: 100%; height: 56px; }
.postal .texto-postal { font-size: 1.1rem; font-weight: 700; }

/* estafas */
.llamada-entrante { text-align: center; display: grid; gap: 8px; justify-items: center; }
.llamada-entrante .cabecera-ej { width: 100%; }
.ilu-llamada { width: clamp(72px, 14dvh, 110px); }
.ilu-llamada svg { width: 100%; height: auto; display: block; }
.sonando circle:first-child { animation: late 1.6s ease-in-out infinite; transform-origin: 60px 60px; }
@keyframes late { 0%, 100% { transform: scale(.92); opacity: .5; } 50% { transform: scale(1.05); opacity: .8; } }
.dice { font-size: 1.12rem; font-weight: 700; line-height: 1.35; }
.opcion-llamada { min-height: 0; flex: 1 1 0; font-size: 1.15rem; border-radius: 26px; }

/* mi barrio */
.mapa { position: relative; border-radius: 28px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .9); min-height: 240px;
    background:
        linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, .75) 47% 53%, transparent 53%),
        linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, .75) 47% 53%, transparent 53%),
        linear-gradient(160deg, #d9efd8, #c8e6d9 55%, #e3f1cf); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 18px 30px -22px rgba(40, 60, 50, .6); }
.lugar { position: absolute; transform: translate(-50%, -50%); width: clamp(76px, 22vw, 108px); aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 2px; padding: 6px;
    border-radius: 24px; border: 3px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 14px 22px -14px rgba(20, 40, 30, .7); }
.lugar .nm { font-size: .78rem; font-weight: 800; line-height: 1.1; text-align: center; }
.lugar.visitado { border-color: var(--ok); background: linear-gradient(160deg, #f1fbf5, #e4f6ec); }
.caminante { position: absolute; transform: translate(-50%, -50%); font-size: 26px; line-height: 1; color: var(--primary); text-shadow: 0 4px 10px rgba(44, 70, 144, .55); transition: left .8s ease, top .8s ease; pointer-events: none; }

/* consultorio */
.consultorio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; }
.tile-ej { flex-direction: column; min-height: 0; height: 100%; border-radius: 26px; font-size: 1rem; }

/* familia */
.muro h2 { margin-bottom: 8px; }
.medallas { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr)); gap: 10px; }
.medalla { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 20px; border: 2px solid var(--line); background: rgba(255, 255, 255, .7); text-align: center; color: #9aa3b5; }
.medalla small { font-size: .74rem; font-weight: 800; line-height: 1.15; color: var(--ink-soft); }
.medalla[data-logrado="true"] { border-color: var(--gold); background: linear-gradient(160deg, #fff7df, #ffeab0); color: var(--gold); }
.privacidad { font-size: .85rem; color: var(--ink-soft); text-align: center; padding: 0 8px; }
.campo { width: 100%; min-height: 60px; margin-top: 12px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.vista-foto { margin-top: 12px; min-height: 140px; display: grid; place-items: center; border: 3px dashed var(--line); border-radius: 22px; padding: 10px; text-align: center; }
.vista-foto img { max-width: 100%; max-height: 32dvh; border-radius: 14px; }
.zona-grabar { display: grid; place-items: center; margin: 14px 0; }
.btn--grabar { width: 112px; height: 112px; min-height: 0; border-radius: 50%; background: linear-gradient(135deg, #5b7ad6, #2c4690); color: #fff; border: 0; }
.btn--grabar.grabando { background: linear-gradient(135deg, #e0626f, #a83a46); animation: late 1.2s ease-in-out infinite; }
.vista-audio audio { width: 100%; margin-top: 8px; }
.cl-q { border: 0; padding: 0; margin: 14px 0 0; }
.cl-q legend { font-weight: 800; margin-bottom: 8px; }
.fin { display: grid; align-content: center; justify-items: center; text-align: center; gap: 6px; }
.fin .flor { width: 120px; }
.fin .flor svg { width: 100%; height: auto; }
.respira .circulo { animation: respira-quieto 6s ease-in-out infinite; }
@keyframes respira-quieto { 0%, 100% { box-shadow: 0 30px 60px -20px rgba(29, 106, 92, .5); } 50% { box-shadow: 0 30px 80px -10px rgba(29, 106, 92, .8); } }

/* la ilustración no debe restar contraste al texto */
.heroe .ilu { opacity: .34; width: 46%; }
html[data-franja="noche"] .heroe .ilu { opacity: .26; }

/* ─────── imágenes generadas: contenedores ─────── */
.ilu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.con-ilu { position: relative; overflow: hidden; }
.con-ilu > *:not(.ilu) { position: relative; z-index: 1; }
.con-ilu > .ilu { position: absolute; inset: 0 0 0 auto; width: 52%; opacity: .5; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%); }
.heroe .ilu { opacity: .62; }
html[data-franja="noche"] .heroe .ilu { opacity: .5; }
.fin .flor { width: min(46vw, 190px); aspect-ratio: 1; }
.fin .flor img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px 34px 100px 34px; box-shadow: 0 22px 40px -22px rgba(60, 50, 120, .6); }
.postal { background: url('/menteviva/img/postal.webp') center / cover no-repeat, #fbf3e4; padding: 22px; }
.postal img { border-width: 8px; }

/* el check-in debe caber en pantallas de 844 px de alto incluso con textos largos */
.pantalla { gap: clamp(8px, 1.5dvh, 14px); }
.paso-checkin .opcion { padding: 8px 18px; font-size: 1.1rem; gap: 14px; }
.paso-checkin .opcion .cara-svg { width: clamp(46px, 8dvh, 64px); }
.paso-checkin { gap: 10px; }
.omitir { min-height: 56px; }

/* ─────── corrección tras revisión en pantalla ─────── */
/* la ilustración del ejercicio es una miniatura: nunca debe tapar montos ni botones */
.con-ilu > .ilu { inset: auto; top: 12px; right: 86px; left: auto; width: 58px; height: 58px; opacity: 1; border-radius: 18px; overflow: hidden;
    -webkit-mask-image: none; mask-image: none; box-shadow: 0 10px 18px -12px rgba(40, 50, 90, .7); border: 2px solid rgba(255, 255, 255, .95); }
.heroe .ilu { width: 40%; opacity: .5; }
/* billetes: llenan su celda y se leen de un vistazo */
.billete .billete-svg { width: 100%; height: auto; }
.relleno.dinero .billete { align-self: center; width: 100%; }
.dinero { align-content: space-evenly; }
/* ajustes: las etiquetas no se parten a ningún tamaño */
.ajustes .opcion { font-size: 15px; line-height: 1.15; word-break: keep-all; overflow-wrap: normal; hyphens: manual; padding: 8px 4px; }
.ajustes .opcion .cara { line-height: 1; }
@media (max-width: 360px) { .ajustes .opcion { font-size: 13.5px; } }
/* texto «muy grande»: títulos y cifras se contienen para que todo siga cabiendo */
html[data-texto="enorme"] .enunciado { font-size: clamp(1.25rem, 5.4vw, 1.7rem); }
html[data-texto="enorme"] .total strong { font-size: clamp(1.7rem, 7vw, 2.2rem); }
html[data-texto="enorme"] .btn { padding: 10px 14px; }
html[data-texto="enorme"] .siguiente { font-size: 1.05rem; }
html[data-texto="enorme"] .bandeja { min-height: 54px; }
html[data-texto="enorme"] .consigna, html[data-texto="enorme"] .fecha { font-size: .92rem; }
html[data-texto="enorme"] .pantalla { gap: 8px; }
html[data-texto="enorme"] .vidrio { padding: 14px; }
html[data-texto="enorme"] .opcion { min-height: 0; }
html[data-texto="enorme"] .tarjeta { padding: 6px 12px; font-size: .98rem; }

/* casilleros del pastillero: la etiqueta no se parte a ningún tamaño de texto */
.casillero { font-size: 15px; line-height: 1.15; word-break: keep-all; overflow-wrap: normal; }
.casillero .ico { font-size: 2rem !important; }
html[data-texto="enorme"] .ajustes .btn { min-height: 56px; padding: 8px 12px; font-size: .92rem; }
html[data-texto="enorme"] .ajustes .vista-previa { margin-top: 8px; padding: 8px 12px; }
html[data-texto="enorme"] .ajustes h1 { font-size: 1.5rem; }
html[data-texto="enorme"] .ajustes h2 { margin-top: 8px !important; }

/* ─────── textos completos, respiración y mapa del barrio ─────── */
.mensaje p, html[data-texto="grande"] .mensaje p, html[data-texto="enorme"] .mensaje p { display: block; -webkit-line-clamp: unset; overflow: visible; }
.mini-tareas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-tarea { min-height: 74px; }
.mini-tarea .tx { font-size: .74rem; }

.heroe.compacto { padding: 12px 18px; }
.heroe.compacto .saludo-nombre { font-size: clamp(1.4rem, 6vw, 1.9rem); }
.respira-card { display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; position: relative; overflow: hidden; }
.respira-card .circulo { position: relative; z-index: 2; width: min(58vw, 250px); gap: 2px; align-content: center; }
.circulo .fase-txt { font-size: clamp(1.3rem, 6vw, 1.7rem); font-weight: 800; letter-spacing: .02em; }
.circulo .cuenta { font-size: clamp(3rem, 15vw, 4.6rem); font-weight: 800; line-height: 1; min-height: 1em; font-variant-numeric: tabular-nums; }
.halo { position: absolute; left: 50%; top: 42%; width: min(58vw, 250px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; }
.halo i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(31, 107, 95, .35); animation: onda 4s ease-out infinite; }
.halo i:nth-child(2) { animation-delay: 1.3s; } .halo i:nth-child(3) { animation-delay: 2.6s; }
@keyframes onda { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.ciclos { justify-content: center; margin-top: 4px; }
.msg-final { font-size: clamp(1.25rem, 5vw, 1.6rem); margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .halo i { animation: none; opacity: .35; } }

.mapa { background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)), url('/menteviva/img/mapa-barrio.webp') center / cover no-repeat, #d9efd8; }
.mapa .ruta { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lugar { width: clamp(84px, 24vw, 116px); border-radius: 26px; background: rgba(255, 255, 255, .96); border: 3px solid #fff; box-shadow: 0 16px 24px -14px rgba(20, 40, 30, .8), 0 0 0 2px rgba(44, 70, 144, .18); }
.lugar .ic { color: var(--primary); }
.lugar .nm { font-size: .84rem; }
.lugar .orden { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 800; font-size: .95rem; }
.lugar.visitado { background: linear-gradient(160deg, #f1fbf5, #dff3e7); border-color: var(--ok); }
.caminante { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: 0 8px 16px -6px rgba(44, 70, 144, .8); z-index: 3; }
.ahora-ve { margin-top: 8px; font-size: 1.1rem; font-weight: 800; }
.ahora-ve .etiqueta { margin-right: 6px; }

/* pulido final: saludo sin ruido, etiquetas del mapa y aro de respiración centrado */
.heroe .ilu { inset: 0 0 auto auto; height: 62%; width: 46%; }
.lugar { width: clamp(92px, 26vw, 124px); padding: 6px 4px; }
.lugar .nm { font-size: .78rem; letter-spacing: -.01em; white-space: nowrap; }
.aro { position: relative; display: grid; place-items: center; width: min(68vw, 300px); aspect-ratio: 1; }
.aro .halo { inset: 0; left: auto; top: auto; transform: none; width: 100%; height: 100%; }
.aro .circulo { width: 78%; }

/* preguntas iniciales: cada opción lleva su ilustración */
.paso-checkin .opcion.con-foto {
    position: relative; overflow: hidden; align-items: center; align-content: center; justify-items: start; grid-template-columns: auto minmax(0, 1fr);
    background: linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .95) 55%, rgba(255, 255, 255, .5) 82%, rgba(255, 255, 255, 0) 100%), var(--img) right center / cover no-repeat, #fff;
    font-size: 1.28rem; padding: 10px 22px;
}
.paso-checkin .opcion.con-foto[aria-pressed="true"], .paso-checkin .opcion.con-foto:active { box-shadow: 0 0 0 5px rgba(44, 70, 144, .25); }
.paso-checkin .opcion.con-foto .cara { z-index: 1; }
/* etiquetas del mapa: caben siempre dentro de su baldosa */
.lugar { width: clamp(104px, 29vw, 134px); }
.lugar .nm { font-size: .78rem; max-width: 100%; overflow: hidden; text-overflow: clip; }
@media (min-width: 700px) { .lugar { width: 140px; } .lugar .nm { font-size: .8rem; } }

/* ─────── v11: sin parpadeo, transiciones suaves, destacado sin recortes, bandeja agrupada ─────── */
/* holgura para que el anillo de ayuda nunca se corte con el borde de la pantalla */
.pantalla { padding: 10px; margin: -10px; }
.resaltar { border-color: var(--ok) !important; opacity: 1 !important;
    box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--ok), 0 14px 24px -14px rgba(31, 107, 69, .55) !important; transition: box-shadow .25s ease, opacity .25s ease; }
.billete.resaltar { border-radius: 10px; }
.moneda.resaltar { border-radius: 50%; }
.atenuar { opacity: .32; transform: none; transition: opacity .3s ease; }
/* repintar un paso del mismo ejercicio no vuelve a animar ni a «parpadear» */
.pantalla.mismo, .pantalla.mismo > * { animation: none !important; }
/* salida y logro */
@keyframes sale { to { opacity: 0; transform: translateY(-10px) scale(.985); } }
.pantalla.saliendo { animation: sale .38s ease both !important; pointer-events: none; }
.pantalla.logrado { pointer-events: none; }
.pantalla.logrado .vidrio:not(.barra) { box-shadow: 0 0 0 4px rgba(31, 107, 69, .35), 0 22px 50px -18px rgba(31, 107, 69, .4); transition: box-shadow .35s ease; }
.acierto { box-shadow: 0 0 0 4px rgba(31, 107, 69, .4), 0 22px 50px -18px rgba(31, 107, 69, .45) !important; transition: box-shadow .3s ease; }
.acierto .total strong { color: var(--ok); }
.acierto::after { content: "✔"; position: absolute; right: 18px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
/* dinero: billetes en 2 columnas, monedas en una fila; todo cabe sin recortarse */
.dinero.relleno { display: flex; flex-direction: column; justify-content: space-evenly; gap: 10px; padding: 8px 6px; overflow: visible; }
.dinero .grupo-billetes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: center; }
.dinero .grupo-monedas { display: flex; justify-content: center; gap: clamp(12px, 5vw, 26px); flex-wrap: wrap; }
.dinero .grupo-billetes .billete { width: 100%; height: auto; }
.dinero .grupo-monedas .moneda { width: clamp(64px, 17dvh, 96px); height: auto; aspect-ratio: 1; }
.billete:disabled, .moneda:disabled { opacity: .55; cursor: default; }
.billete, .moneda { transition: opacity .3s ease, transform .15s ease, filter .2s ease; }
/* bandeja agrupada */
.zona-quitar { align-items: center; }
.zona-quitar .btn { white-space: nowrap; overflow-wrap: normal; flex: 0 0 auto; gap: 8px; }
.bandeja { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow: hidden; align-items: center; gap: 12px; min-height: 64px; max-height: 76px; }
.grupo-puesto { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; }
.grupo-puesto .cant { position: absolute; right: -8px; top: -9px; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--primary); color: #fff;
    font-size: .9rem; display: grid; place-items: center; border: 2px solid #fff; font-variant-numeric: tabular-nums; }
.grupo-puesto .mini.billete { width: 72px; }
.grupo-puesto .mini.moneda { width: 44px; }
.vacia-txt { color: var(--muted, #5c6577); font-size: .92rem; font-weight: 600; }
/* solo lo recién colocado se anima; sin crecer fuera de la pantalla */
.puesto { animation: none; }
.nuevo { animation: asienta .38s cubic-bezier(.2, .9, .3, 1) both; }
.puesto.nuevo, .grupo-puesto.nuevo { animation: asienta .38s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes asienta { from { opacity: .4; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
.tarjetas, .fila-3 { overflow: visible; }
.tarjeta .btn, .tarjeta { transform-origin: center; }
/* iconos: fichas suaves y trazo más firme */
.btn .ico, .opcion-llamada .ico { width: 1.9em; height: 1.9em; border-radius: 14px; background: rgba(44, 70, 144, .1); color: var(--primary); flex: 0 0 auto; }
.btn--primario .ico { background: rgba(255, 255, 255, .22); color: #fff; }
.btn--chico .ico { width: 1.6em; height: 1.6em; border-radius: 12px; }
.i path, .i circle, .i rect, .i ellipse { stroke-width: 2.4; }
.cabecera-ej .btn, .cabecera-ej button { box-shadow: 0 10px 20px -12px rgba(40, 50, 90, .55); }
.cabecera-ej .ico { background: none; }
@media (prefers-reduced-motion: reduce) { .nuevo, .acierto::after, .pantalla.saliendo { animation: none !important; } }

/* rostros ilustrados */
.cara-img { width: clamp(52px, 9dvh, 72px); height: clamp(52px, 9dvh, 72px); display: block; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(60, 50, 120, .28)); }
.paso-checkin .opcion .cara { flex: 0 0 auto; display: grid; place-items: center; }

.barra .ico, .btn-redondo .ico, button[aria-label] > .ico { background: none; width: auto; height: auto; }

/* v14: textos que no se parten ni se recortan */
.siguiente { text-align: left; overflow-wrap: break-word; }
.siguiente > span:not(.ico):not(.flecha) { flex: 1 1 0; min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: none; }
.siguiente .ico { width: 44px; height: 44px; font-size: 1.5rem; }
.vacia-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; max-width: 100%; }
.bandeja { overflow: hidden; }

/* ═════════ v15: motor de escenas (30 días sin repetir) ═════════ */
img.obj { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; filter: drop-shadow(0 6px 8px rgba(60, 50, 120, .22)); }
img.obj.grande { max-width: 120px; max-height: 120px; }
img.obj.mini-obj { width: 34px; height: 34px; flex: 0 0 auto; }
.opciones { display: grid; gap: 16px; align-content: stretch; grid-auto-rows: minmax(0, 1fr); padding: 10px 8px; }
.opciones.cols-1 { grid-template-columns: minmax(0, 1fr); }
.opciones.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opciones.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opciones.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.opciones.cols-1 .opc { min-height: 64px; padding: 12px 16px; }
.lb-cal { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 8px; margin: 4px 0 8px; }
.lb-cal b { display: block; text-align: center; font-size: 1.05rem; text-transform: capitalize; margin-bottom: 4px }
.lb-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-variant-numeric: tabular-nums }
.lb-cal-g span { padding: 4px 0; border-radius: 8px; font-weight: 700; font-size: .95rem }
.lb-cal-g .d { font-size: .75rem; color: var(--muted, #5c6577) }
.lb-cal-g .hoy { background: var(--primary); color: #fff }
.opc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 0; padding: 8px 6px;
    border-radius: 22px; border: 2px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; font-weight: 800; line-height: 1.15; cursor: pointer; text-align: center;
    box-shadow: 0 8px 18px -12px rgba(40, 50, 90, .5); -webkit-tap-highlight-color: transparent; transition: transform .14s ease, opacity .3s ease, box-shadow .2s ease, border-color .2s ease; }
.opc:active { transform: scale(.97); }
.opc .nm { font-size: .95rem; overflow-wrap: break-word; word-break: normal; hyphens: manual; max-width: 100%; }
.opc > img.obj { flex: 1 1 0; min-height: 0; width: auto; max-width: 78%; }
.opc.vacio { visibility: hidden; border: 0; box-shadow: none; }
.opc.elegida { border-color: var(--ok); background: linear-gradient(160deg, #f1fbf5, #e4f6ec); opacity: 1; animation: asienta .35s cubic-bezier(.2, .9, .3, 1) both; }
.opc.elegida::after { content: "✔"; position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .95rem; }
.opc:disabled { cursor: default; }
.opc:disabled:not(.elegida) { opacity: .6; }
.opciones.compacto .opc .nm { font-size: .82rem; }
.opciones.textos .opc, .opciones.decide .opc { flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px 16px; font-size: 1.1rem; }
.opciones.decide .opc.si { background: linear-gradient(135deg, #3f9e6c, var(--ok)); color: #fff; border-color: transparent; }
.opciones.decide .opc.no { background: linear-gradient(135deg, #8a95b5, #5c6a94); color: #fff; border-color: transparent; }
.opciones.montos .opc .monto { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.opc.hoy { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(75, 99, 184, .25); }
.opciones.calendario .opc { padding: 2px; border-radius: 12px; font-size: 1.05rem; }
.opciones.calendario { grid-auto-rows: minmax(36px, 1fr); }
.cal-cab { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 8px 6px 0; font-weight: 800; text-align: center; color: var(--muted, #5c6577); }
/* teclado gigante (emergencia / cajero) */
.opciones.teclado-emerg { grid-auto-rows: minmax(0, 1fr); padding: 6px 12px; }
.opc.tecla { font-size: 2rem; border-radius: 24px; font-variant-numeric: tabular-nums; }
.visor-wrap { margin-top: 8px; display: flex; justify-content: center; }
.visor { min-width: 160px; text-align: center; padding: 6px 18px; border-radius: 16px; background: #10151f; color: #8ff0c2; font-size: 2rem; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
/* boleta */
.opciones.boleta { background: #fffdf7; border-radius: 22px; padding: 10px; border: 2px dashed var(--line); gap: 6px; }
.opciones.boleta .opc { flex-direction: row; justify-content: space-between; border-radius: 14px; padding: 10px 14px; background: #fff; }
.fila-boleta { display: flex; justify-content: space-between; align-items: baseline; width: 100%; gap: 10px; }
.fila-boleta .tt { font-size: .95rem; color: var(--muted, #5c6577); text-align: left; }
.fila-boleta .vv { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.fila-boleta.total .tt { color: var(--ink); font-weight: 800; }
.fila-boleta.total .vv { font-size: 1.5rem; }
/* llaves, cajas, tótem, contactos */
.opciones.llaves .opc { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 8px 16px; }
.llave { display: flex; align-items: center; gap: 14px; width: 100%; }
.llave-svg { width: 96px; height: 52px; flex: 0 0 auto; }
.opciones.cajas .opc { padding: 6px 10px; }
.caja-med { display: flex; flex-direction: column; width: 100%; border-radius: 14px; overflow: hidden; border: 2px solid #1f2433; background: #fff; }
.caja-med .banda { padding: 6px 10px; color: #fff; font-size: 1.15rem; text-align: left; }
.caja-med .cuerpo { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px; font-size: 1rem; }
.caja-med small { font-size: .85rem; font-weight: 700; }
.fila-totem { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.fila-totem small { color: var(--muted, #5c6577); font-weight: 600; }
.ticket-ejemplo { display: none; }
.opciones.agenda .contacto { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.avatar-img { width: clamp(56px, 11dvh, 92px); height: clamp(56px, 11dvh, 92px); border-radius: 50%; object-fit: cover; background: #e9e5ff; border: 3px solid #fff; box-shadow: 0 8px 16px -8px rgba(40, 50, 90, .55); }
.avatar-img.vacio { display: inline-grid; place-items: center; color: var(--primary); }
/* escena de clima, heladera, presupuesto, pesa, bip */
.clima-ic, .etiqueta-vence { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.clima-ic img.obj.grande { max-height: 64px; }
.etiqueta-vence { padding: 10px 14px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.etiqueta-vence img.obj.grande { max-height: 74px; max-width: 74px; }
.etiqueta-vence b { display: block; font-size: 1.15rem; }
.etiqueta-vence .nm { font-size: .95rem; font-weight: 700; color: var(--muted, #5c6577); }
.prod { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 0; }
.prod > img.obj { max-height: 58px; }
.prod.grande > img.obj { max-height: 110px; }
.prod .pr { font-size: .95rem; font-variant-numeric: tabular-nums; }
.tarjeta-svg, .perilla-svg, .llama-svg { width: 100%; max-width: 110px; height: auto; display: block; }
.presupuesto { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; padding: 6px 14px; border-radius: 16px; background: #eef7f1; border: 2px solid #bfe2cc; }
.presupuesto b { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--ok); }
.balanza { margin-top: 8px; display: flex; align-items: baseline; justify-content: space-between; padding: 8px 16px; border-radius: 16px; background: #10151f; color: #8ff0c2; }
.visor-pesa { font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.balanza small { color: #cfd6e8; font-size: .95rem; }
.tarjeta-bip { display: inline-flex; flex-direction: column; margin-top: 6px; padding: 8px 18px; border-radius: 16px; background: linear-gradient(135deg, #2f8f5b, #1d6e3f); color: #fff; }
.tarjeta-bip b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
/* cocina y gestos */
.opciones.cocina .quemador { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.hornilla { height: 56px; width: 56px; border-radius: 50%; border: 5px solid #5c6577; background: #2b2f3c; display: grid; place-items: center; }
.hornilla .llama-svg { width: 34px; }
.zona-gesto { display: grid; place-items: center; align-content: center; gap: 12px; padding: 8px; touch-action: none; }
.dial-zona { display: grid; justify-items: center; gap: 12px; width: 100%; }
.dial { width: min(64vw, 40dvh, 280px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none;
    background: radial-gradient(circle at 35% 30%, #fff, #e9ecf7); border: 4px solid #fff; box-shadow: 0 22px 40px -20px rgba(70, 60, 140, .5), inset 0 0 0 3px rgba(75, 99, 184, .18); }
.dial > * { width: 62%; height: 62%; display: grid; place-items: center; transition: none; }
.dial svg, .dial img { width: 100%; height: 100%; }
.dial-prog { width: min(64vw, 280px); height: 12px; border-radius: 8px; background: rgba(26, 34, 51, .12); overflow: hidden; }
.dial-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--ok)); transition: width .1s linear; }
.olla-zona { position: relative; display: grid; place-items: center; width: 100%; }
.olla-zona .olla-fondo { position: absolute; width: min(70vw, 44dvh, 320px); height: min(70vw, 44dvh, 320px); opacity: .55; }
.olla-zona .dial { background: transparent; border: 0; box-shadow: none; }
.olla-giro img { transform-origin: 50% 50%; }
.trazo-zona { width: 100%; display: grid; place-items: center; }
.trazo-svg { width: min(100%, 52dvh); aspect-ratio: 1; touch-action: none; background: rgba(255, 255, 255, .7); border-radius: 28px; border: 3px dashed var(--line); }
.trazo-svg .guia { stroke: #aab3d0; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 12; }
.trazo-svg .huella { stroke: var(--ok); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.trazo-svg .inicio { fill: var(--ok); stroke: #fff; stroke-width: 1.5; }
.trazo-svg .dedo-ayuda { fill: #ffb703; stroke: #fff; stroke-width: 1.5; }
.flor-zona { display: grid; justify-items: center; gap: 10px; width: 100%; }
.flor-tactil { position: relative; width: min(60vw, 36dvh, 250px); aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; border-radius: 50%; }
.flor-tactil .petalo { position: absolute; left: 50%; top: 50%; width: 34%; height: 46%; margin: -46% 0 0 -17%; border-radius: 50% 50% 46% 46%; transform-origin: 50% 100%;
    background: linear-gradient(180deg, #ffd0dc, #ff9fbc); transform: rotate(var(--r)) scale(.55); transition: transform 4s ease-in-out; box-shadow: inset 0 -6px 12px rgba(200, 80, 120, .25); }
.flor-tactil .centro { position: absolute; left: 50%; top: 50%; width: 26%; height: 26%; margin: -13% 0 0 -13%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, #f2b705); }
.flor-tactil.abriendo .petalo { transform: rotate(var(--r)) scale(1.05) translateY(-6%); }
.flor-tactil.cerrando .petalo { transition-duration: 1.2s; }
.flor-txt { text-align: center; }
/* simulador de llamada real */
.llamada-cab { justify-content: center; }
.llamada-real { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 18px 20px; border-radius: 34px; overflow: hidden;
    color: #fff; background: linear-gradient(170deg, #1b2447 0%, #2b3a78 52%, #1a2b4f 100%); box-shadow: 0 30px 60px -28px rgba(20, 30, 70, .8); text-align: center; animation: aparece .4s ease both; }
.llamada-fondo { position: absolute; inset: 0; background: radial-gradient(circle at 50% 22%, rgba(255, 255, 255, .16), transparent 55%); pointer-events: none; }
.llamada-real > * { position: relative; }
.llamada-estado { font-size: 1rem; font-weight: 700; letter-spacing: .04em; color: #cfd8ff; font-variant-numeric: tabular-nums; }
.llamada-avatar { position: relative; width: clamp(110px, 24dvh, 170px); height: clamp(110px, 24dvh, 170px); display: grid; place-items: center; margin: 4px 0; }
.llamada-avatar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); animation: onda-llamada 2.4s ease-out infinite; }
.llamada-avatar i:nth-child(2) { animation-delay: .8s; } .llamada-avatar i:nth-child(3) { animation-delay: 1.6s; }
.llamada-avatar .avatar-img { width: 100%; height: 100%; border: 4px solid rgba(255, 255, 255, .9); }
@keyframes onda-llamada { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.llamada-nombre { font-size: clamp(1.5rem, 7vw, 2.1rem); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; color: #fff; }
.llamada-sub { font-size: 1.05rem; color: #cfd8ff; font-variant-numeric: tabular-nums; }
.llamada-texto { font-size: 1.15rem; line-height: 1.3; font-weight: 700; padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .25); }
.llamada-botones { display: flex; justify-content: center; align-items: flex-start; gap: clamp(20px, 9vw, 54px); width: 100%; margin-top: auto; }
.redondo-llamada { display: grid; justify-items: center; gap: 8px; background: none; border: 0; color: #fff; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; max-width: 40%; -webkit-tap-highlight-color: transparent; }
.redondo-llamada .disco { width: clamp(68px, 18vw, 84px); height: clamp(68px, 18vw, 84px); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .6); transition: transform .15s ease, box-shadow .2s ease; }
.redondo-llamada.rojo .disco { background: linear-gradient(145deg, #ff6b61, #d93025); }
.redondo-llamada.rojo .disco svg { transform: rotate(135deg); }
.redondo-llamada.verde .disco { background: linear-gradient(145deg, #4fd88a, #1f9d57); }
.redondo-llamada.gris .disco { background: linear-gradient(145deg, #9aa3c4, #5c6a94); }
.redondo-llamada:active .disco { transform: scale(.94); }
.redondo-llamada.resaltar { box-shadow: none !important; }
.redondo-llamada.resaltar .disco { box-shadow: 0 0 0 4px #fff, 0 0 0 9px #7fe3a6, 0 14px 24px -12px rgba(0, 0, 0, .6); }
.redondo-llamada.atenuar { opacity: .35; }
.redondo-llamada .txt { max-width: 11ch; line-height: 1.15; }
/* secuencia multimodal */
.seq-lista { display: grid; gap: 10px; grid-auto-rows: minmax(64px, 1fr); align-content: stretch; padding: 6px; }
.seq-card { justify-content: flex-start; gap: 14px; min-height: 0; padding: 6px 14px; font-size: 1.05rem; text-align: left; }
.seq-card .seq-obj { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 16px; background: rgba(255, 255, 255, .8); padding: 4px; }
.seq-card.volando { animation: sube-seq .26s ease-in both; }
@keyframes sube-seq { to { transform: translateY(-34px) scale(.96); opacity: 0; } }
.seq-hechas { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.seq-hechas li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 16px; background: #eef7f1; border: 2px solid #bfe2cc; font-weight: 800; font-size: .95rem; }
.seq-hechas li.nuevo { animation: entra-fila .4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes entra-fila { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.seq-hechas .num { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.seq-hechas .tx { flex: 1 1 auto; min-width: 0; }
.seq-hechas .chk { color: var(--ok); }
.memoria { display: grid; justify-items: center; align-content: center; gap: 12px; width: 100%; }
.memoria .tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
/* agenda de la familia */
.contactos-lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.contacto-fila { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 20px; background: rgba(255, 255, 255, .8); border: 2px solid var(--line); }
.contacto-fila .avatar-img { width: 56px; height: 56px; flex: 0 0 auto; }
.cf-txt { flex: 1 1 auto; min-width: 0; display: grid; }
.cf-txt small { color: var(--muted, #5c6577); font-weight: 700; }
.vista-avatar { min-height: 110px; }
.vista-avatar .avatar-img { width: 110px; height: 110px; }
html[data-texto="enorme"] .opc .nm { font-size: .9rem; }
html[data-texto="enorme"] .opciones.textos .opc, html[data-texto="enorme"] .opciones.decide .opc { font-size: 1rem; }
@media (max-height: 700px) { .avatar-img { width: 54px; height: 54px; } .opc.tecla { font-size: 1.6rem; } }

/* ═════════ v16: botones redondos de verdad, dinero que cabe, letras legibles en móvil ═════════ */
.circular, .btn.circular { width: 64px; min-width: 64px; height: 64px; min-height: 64px; aspect-ratio: 1; padding: 0; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center; }
.circular .ico, .btn.circular .ico { width: auto; height: auto; background: none; border-radius: 0; font-size: 1.7rem; }
.circular .i { width: 28px; height: 28px; }
/* dinero: todo cabe en la vista; las piezas se reparten el alto disponible */
.dinero.relleno { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 8px 6px; min-height: 0; overflow: hidden; }
.dinero .grupo-billetes { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px 12px; align-content: center; align-items: center; }
.dinero .grupo-billetes .billete { width: 100%; height: 100%; max-height: 96px; display: grid; place-items: center; }
.dinero .grupo-billetes .billete .billete-svg { width: 100%; height: 100%; }
.dinero .grupo-monedas { flex: 0 0 auto; gap: clamp(14px, 6vw, 30px); }
.dinero .grupo-monedas .moneda { width: clamp(58px, 12dvh, 90px); height: clamp(58px, 12dvh, 90px); }
/* bandeja agrupada: la cantidad va al lado, no encima */
.bandeja { flex-wrap: wrap; align-content: center; max-height: 124px; min-height: 72px; gap: 8px 14px; }
.grupo-puesto { gap: 6px; }
.grupo-puesto .cant { position: static; min-width: 0; height: auto; padding: 2px 9px; border-radius: 12px; font-size: 1.05rem; border: 0; }
.grupo-puesto .mini.billete { width: 84px; }
.grupo-puesto .mini.moneda { width: 50px; }
.bandeja.denso .grupo-puesto .mini.billete { width: 62px; }
.bandeja.denso .grupo-puesto .mini.moneda { width: 40px; }
.bandeja.denso .grupo-puesto .cant { font-size: .9rem; padding: 1px 7px; }
.vacia-txt { white-space: normal; font-size: .9rem; line-height: 1.2; text-overflow: clip; }
@media (max-width: 430px) { .zona-quitar .btn.btn--chico { padding: 0; width: 60px; min-width: 60px; } .zona-quitar .btn.btn--chico > span:not(.ico) { display: none; } }
/* mapa: letras grandes y legibles, "Consultorio" completo */
.lugar { width: clamp(112px, 31vw, 150px); padding: 4px; }
.lugar .nm { font-size: clamp(13.5px, 3.8vw, 17px); white-space: nowrap; overflow: visible; letter-spacing: -.01em; }
.lugar .ic svg { width: 34px; height: 34px; }
/* ajustes y botones anchos: textos grandes sin romperse */
.btn { font-size: clamp(1rem, 4.4vw, 1.2rem); }

.dinero .grupo-billetes .billete { max-height: clamp(84px, 17dvh, 138px); }
.acierto::after { content: none; }
.acierto .total span::after { content: " ✔"; color: var(--ok); font-weight: 800; }

.consultorio.relleno { overflow-y: auto; grid-auto-rows: minmax(84px, auto); align-content: start; padding: 8px; scrollbar-width: thin; }
.tile-ej { min-height: 84px; font-size: 1rem; }

/* ═════════ v17: ilustraciones generadas en vez de dibujos propios ═════════ */
.llave { display: flex; align-items: center; gap: 16px; width: 100%; }
.llave img.obj, .llave-img { width: 92px; height: 64px; flex: 0 0 auto; object-fit: contain; max-width: none; }
.llave-gira img { width: 100%; height: 100%; object-fit: contain; }
.caja-med { display: flex; flex-direction: row; align-items: center; gap: 14px; width: 100%; border: 0; background: none; border-radius: 0; text-align: left; overflow: visible; }
.caja-med img.obj { width: 76px; height: 76px; flex: 0 0 auto; max-width: none; }
.caja-med .cuerpo { display: grid; gap: 2px; padding: 0; justify-content: start; }
.caja-med .cuerpo b { font-size: 1.15rem; }
.caja-med .dosis { font-weight: 700; color: var(--primary); font-size: .98rem; }
.opciones.cajas .opc { flex-direction: row; justify-content: flex-start; padding: 8px 14px; }
.tarjeta-bip { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; background: none; padding: 0; color: var(--ink); margin-top: 4px; }
.tarjeta-bip img.obj, .bip-img { width: 92px; height: 64px; flex: 0 0 auto; max-width: none; }
.bip-txt { display: grid; }
.bip-txt b { font-size: 1.8rem; font-variant-numeric: tabular-nums; color: var(--ok); }
.hornilla { width: 70px; height: 70px; border: 0; background: none; border-radius: 0; }
.hornilla img.obj { width: 100%; height: 100%; max-width: none; }
.quemador img.perilla-img, .perilla-img { width: 54px; height: 54px; max-width: none; }
.perilla-giro img { width: 100%; height: 100%; object-fit: contain; }
.pildora { width: 30px; height: 30px; object-fit: contain; display: inline-block; vertical-align: middle; flex: 0 0 auto; filter: drop-shadow(0 3px 4px rgba(40, 50, 90, .3)); }
.pastilla .pildora { width: 30px; height: 30px; }
.puestas .pildora { width: 32px; height: 32px; }
.prod > img.obj { object-fit: contain; }

/* Sin botón de voz (VOZ_DISPONIBLE=false): el icono de la actividad va al borde y la fila de arriba le deja su espacio, para que nunca tape el título. */
.con-ilu .cabecera-ej { min-height: 56px; }
html[data-voz="no"] .con-ilu > .ilu { right: 14px; }

/* Libro MenteViva (QR del cuaderno) */
.lb-fig{display:grid;justify-items:center;gap:8px;margin:6px 0 2px}
.lb-tabla{width:min(100%,420px);background:#fff;border:2px solid #14223a;border-radius:14px;padding:10px 14px}
.lb-tabla>b{display:block;border-bottom:2px solid #14223a;padding-bottom:6px;margin-bottom:6px;font-size:1rem}
.lb-fila{display:flex;justify-content:space-between;gap:12px;padding:3px 0;font-variant-numeric:tabular-nums}
.lb-total{border-top:2px solid #14223a;margin-top:6px;padding-top:6px;font-weight:800;font-size:1.15rem}
.lb-cuadricula{display:grid;gap:6px;width:100%;max-width:440px;margin:6px auto}
.lb-cuadricula .obj.chica{width:100%;max-width:54px;height:auto;margin:auto}
.lb-texto{font-size:1.25rem;line-height:1.55;background:#fff;border:2px solid #cdd8e1;border-radius:14px;padding:12px 14px}
.lb-monto{font-size:2.4rem;font-weight:800;color:#2f855a;font-variant-numeric:tabular-nums;text-align:center}
.lb-opc{display:grid;place-items:center}
.opciones.sopa-app{display:grid;gap:4px}.opciones.sopa-app.s8{grid-template-columns:repeat(8,1fr)}.opciones.sopa-app.s10{grid-template-columns:repeat(10,1fr)}
.opciones.sopa-app .opc.celda-sopa{min-height:0;aspect-ratio:1;padding:0;font-size:1.15rem;font-weight:800;border-radius:10px}
.reloj-lb{max-width:100%;height:auto}

/* ═════════ tutorial de primera vez ═════════ */
.t-capa { position: fixed; inset: 0; z-index: 200; touch-action: none; }
.t-capa.t-oscuro { background: rgba(16, 21, 31, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.t-hueco { position: fixed; border-radius: 26px; box-shadow: 0 0 0 100vmax rgba(16, 21, 31, .78), 0 0 0 4px #f5b820, 0 0 26px 6px rgba(245, 184, 32, .75); pointer-events: none; animation: t-brilla 1.4s ease-in-out infinite; transition: left .25s, top .25s, width .25s, height .25s; }
@keyframes t-brilla { 50% { box-shadow: 0 0 0 100vmax rgba(16, 21, 31, .78), 0 0 0 6px #f5b820, 0 0 38px 12px rgba(245, 184, 32, .95); } }
.t-dedo { position: fixed; font-size: 2.6rem; line-height: 1; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); animation: t-toca .9s ease-in-out infinite; z-index: 2; }
@keyframes t-toca { 50% { transform: translateY(-10px) scale(1.08); } }
.t-tarj { position: fixed; left: 12px; right: 12px; max-width: 520px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: 26px; padding: .9rem 1rem 1rem; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: .5rem; z-index: 3; overflow: hidden; }
.t-cuerpo { display: grid; gap: .5rem; overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.t-bar, .t-btns { flex: none; }
.t-tarj.centro { top: 50%; bottom: auto; transform: translateY(-50%); }
.t-cab { display: flex; align-items: center; gap: .7rem; }
.guia-av { width: 56px; height: 56px; flex: none; display: block; } .guia-av svg { width: 100%; height: 100%; display: block; }
.t-cab b { display: block; font-size: 1.3rem; line-height: 1.1; } .t-cab small { color: var(--ink-soft); font-weight: 700; }
.t-tarj p { font-size: clamp(1rem, 4.2vw, 1.12rem); line-height: 1.3; }
.t-pista { font-weight: 800; color: #8a3a08; background: #fff1c4; border-radius: 12px; padding: .35rem .7rem; font-size: .95rem !important; }
.t-bar { height: 8px; background: #e4e9f0; border-radius: 8px; overflow: hidden; } .t-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2c4690, #1f6b45); border-radius: 8px; transition: width .25s; }
.t-btns { display: grid; grid-template-columns: 1fr 1.5fr; gap: .6rem; } .t-btns .btn { min-height: 56px; font-size: clamp(.95rem, 4vw, 1.1rem); justify-content: center; white-space: nowrap; padding-inline: 10px; }
.t-cab b { font-size: clamp(1.1rem, 4.6vw, 1.3rem); }
body.en-tutorial { overflow: hidden; }
@media (max-height: 700px) { .t-tarj p { font-size: 1rem; } .guia-av { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .t-hueco, .t-dedo { animation: none; } }

html[data-texto="enorme"] .t-tarj p { font-size: 1.02rem; } html[data-texto="enorme"] .t-cab b { font-size: 1.1rem; } html[data-texto="enorme"] .t-btns .btn { min-height: 50px; font-size: 1rem; }

/* ═════════ Vivi, la ayudante de MenteViva ═════════ */
.barra-der { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.vivi-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 4px 16px 4px 5px; border-radius: 30px; font: inherit; font-weight: 800; font-size: .95rem; color: var(--ink); cursor: pointer;
    background: linear-gradient(180deg, #fff, #fff3cf); border: 2px solid #f5b820; box-shadow: 0 4px 0 #d9980a, 0 10px 16px -8px rgba(168, 119, 8, .55); -webkit-tap-highlight-color: transparent; animation: vv-late 3.2s ease-in-out infinite; }
.vivi-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9980a; }
.vv-av-b { width: 44px; height: 44px; flex: none; display: block; } .vv-av-b svg { width: 100%; height: 100%; display: block; }
.vivi-et { display: grid; text-align: left; line-height: 1.05; } .vivi-et small { font-weight: 700; color: var(--ink-soft); font-size: .78rem; }
@keyframes vv-late { 0%, 88%, 100% { box-shadow: 0 4px 0 #d9980a, 0 10px 16px -8px rgba(168, 119, 8, .55); } 94% { box-shadow: 0 4px 0 #d9980a, 0 0 0 7px rgba(245, 184, 32, .38); } }
html[data-texto="grande"] .vivi-et, html[data-texto="enorme"] .vivi-et { display: none; } html[data-texto="grande"] .vivi-btn, html[data-texto="enorme"] .vivi-btn { padding: 4px; }
.t-hueco.t-vivi { box-shadow: 0 0 0 100vmax rgba(16, 21, 31, .82), 0 0 0 5px #fff, 0 0 0 9px #f5b820, 0 0 40px 12px rgba(245, 184, 32, .9); }

.vv-capa { position: fixed; inset: 0; z-index: 150; background: rgba(16, 21, 31, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.vv-hoja { width: 100%; max-width: 640px; max-height: 92dvh; display: flex; flex-direction: column; background: #fffdf8; border-radius: 30px 30px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .4); overflow: hidden; }
@media (min-width: 700px) { .vv-capa { align-items: center; } .vv-hoja { border-radius: 30px; max-height: 88dvh; } }
.vv-cab { display: flex; align-items: center; gap: 12px; padding: 12px 14px 8px; }
.vv-cab h2 { flex: 1; font-size: 1.25rem; margin: 0; }
.vv-av { width: 56px; height: 56px; flex: none; display: block; } .vv-av svg { width: 100%; height: 100%; display: block; }
.vv-x { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font: inherit; font-size: 1.2rem; font-weight: 800; color: var(--ink); cursor: pointer; }
.vv-cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 14px 10px; overscroll-behavior: contain; }
.vv-burbuja { background: #eef5fc; border: 2px solid #cfe0f2; border-radius: 22px; padding: 12px 16px; margin-bottom: 12px; display: grid; gap: 8px; }
.vv-burbuja p { font-size: 1.08rem; line-height: 1.35; margin: 0; }
.vv-pasos { margin: 0; padding-left: 1.3rem; display: grid; gap: 8px; font-size: 1.08rem; line-height: 1.35; }
.vv-ops { display: grid; gap: 10px; }
.vv-op { display: flex; align-items: center; justify-content: flex-start; gap: 14px; text-align: left; min-height: 64px; padding: 10px 16px; font-size: 1.05rem; text-decoration: none; }
.vv-ic { font-size: 1.7rem; line-height: 1; flex: none; width: 2.2rem; text-align: center; }
.vv-pie { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 8px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffdf8; }
.vv-pie .btn { min-height: 58px; justify-content: center; white-space: nowrap; }
body.con-vivi { overflow: hidden; }
@media (max-height: 700px) { .vv-av { width: 44px; height: 44px; } .vv-op { min-height: 56px; } }
@media (prefers-reduced-motion: reduce) { .vivi-btn { animation: none; } }

.barra:has(.vivi-btn) { flex-wrap: nowrap; }
.barra:has(.vivi-btn) .marca { min-width: 0; flex: 1 1 auto; } .barra:has(.vivi-btn) .marca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
@media (max-width: 440px) { .barra:has(.vivi-btn) .marca img { width: 38px; height: 38px; } .vivi-btn { padding-right: 12px; } .vv-av-b { width: 40px; height: 40px; } .barra-der { gap: 8px; } }
@media (max-width: 560px) { .barra:has(.vivi-btn) .marca span { display: none; } .barra:has(.vivi-btn) .marca { flex: 0 0 auto; } .barra-der { margin-left: auto; } }

.rapida-btn { width: 56px; height: 56px; flex: none; border-radius: 50%; font: inherit; font-size: 1.9rem; font-weight: 900; line-height: 1; color: #fff; cursor: pointer; background: linear-gradient(180deg, #4b63b8, #2c4690); border: 3px solid #fff; box-shadow: 0 4px 0 #1f3270, 0 10px 16px -8px rgba(31, 50, 112, .6); -webkit-tap-highlight-color: transparent; }
.rapida-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1f3270; }
.barra:has(.rapida-btn) { flex-wrap: nowrap; }

/* marca en dos líneas y colores serenos */
.marca-nom { display: inline-block; line-height: 1.02; font-size: .98rem; letter-spacing: .01em; }
.marca-nom em { font-style: normal; font-weight: 800; color: #1f2d4d; } .marca-nom strong { font-weight: 800; color: #1d6a5c; }
.marca-nom br { display: none; }
@media (max-width: 560px) { .barra:has(.vivi-btn) .marca span.marca-nom { display: inline-block; } .marca-nom br { display: inline; } .marca-nom { font-size: .92rem; } .barra:has(.vivi-btn) .marca { flex: 1 1 auto; } }
/* llamadas: transiciones suaves */
.llamada-real { animation: llam-entra .5s ease both; }
@keyframes llam-entra { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.llamada-real.despide .llamada-texto { animation: llam-entra .6s ease both; }
.llamada-real.cierre { background: linear-gradient(180deg, #24566a, #1d4a50 60%, #183f45); }
.llamada-real.cierre .llamada-avatar i { animation: none; opacity: .25; }
.llamada-real.cierre .llamada-estado { color: #cfeee4; } .llamada-real.cierre .llamada-texto { background: rgba(255, 255, 255, .16); }
@media (prefers-reduced-motion: reduce) { .llamada-real, .llamada-real.despide .llamada-texto { animation: none; } }

/* ═════ letra grande/enorme: todo cabe sin recortar (pantallas bajas) ═════ */
@media (max-height: 720px) {
    html[data-texto="enorme"] .barra, html[data-texto="grande"] .barra { padding: 5px 10px; border-radius: 22px; }
    html[data-texto="enorme"] .barra .marca img { width: 34px; height: 34px; }
    html[data-texto="enorme"] .barra .vivi-btn, html[data-texto="enorme"] .barra .rapida-btn { min-height: 46px; height: 46px; } html[data-texto="enorme"] .rapida-btn { width: 46px; font-size: 1.5rem; }
    html[data-texto="enorme"] .con-ilu .ilu { display: none; }
    html[data-texto="enorme"] .con-ilu .enunciado { font-size: 1.45rem; line-height: 1.12; }
    html[data-texto="enorme"] .con-ilu .consigna { font-size: 1.02rem; line-height: 1.22; }
    html[data-texto="enorme"] .teclado-emerg { gap: 6px; } html[data-texto="enorme"] .teclado-emerg .opc { min-height: 44px; font-size: 1.5rem; padding: 2px; }
}
/* llamadas: con letra grande el texto y el avatar se achican para que los botones siempre se vean */
html[data-texto="grande"] .llamada-real, html[data-texto="enorme"] .llamada-real { gap: 6px; padding: 14px 14px 14px; overflow-y: auto; }
html[data-texto="grande"] .llamada-avatar, html[data-texto="enorme"] .llamada-avatar { width: clamp(76px, 15dvh, 120px); height: clamp(76px, 15dvh, 120px); margin: 0; }
html[data-texto="grande"] .llamada-nombre, html[data-texto="enorme"] .llamada-nombre { font-size: 1.45rem; }
html[data-texto="grande"] .llamada-texto { font-size: 1.08rem; padding: 10px 12px; } html[data-texto="enorme"] .llamada-texto { font-size: 1.02rem; padding: 8px 12px; line-height: 1.25; }
html[data-texto="enorme"] .llamada-sub, html[data-texto="enorme"] .llamada-estado { font-size: .95rem; }
html[data-texto="enorme"] .llamada-botones { gap: 18px; } html[data-texto="enorme"] .llamada-botones .redondo-llamada .disco { width: 58px; height: 58px; }
html[data-texto="enorme"] .llamada-botones .redondo-llamada .txt { font-size: .95rem; }
/* ajuste fino: «enorme» ya multiplica la tipografía base (--fs 1.3), por eso estos valores son pequeños */
@media (max-height: 720px) {
    html[data-texto="enorme"] .con-ilu .enunciado { font-size: clamp(.95rem, 4.3vw, 1.12rem); }
    html[data-texto="enorme"] .con-ilu .consigna { font-size: .78rem; line-height: 1.2; }
    html[data-texto="enorme"] .visor-wrap { transform: none; } html[data-texto="enorme"] .visor-wrap > * { max-height: 62px; }
    html[data-texto="enorme"] .teclado-emerg .opc { font-size: 1.05rem; min-height: 40px; }
    html[data-texto="enorme"] .llamada-texto { font-size: .8rem; padding: 6px 10px; } html[data-texto="enorme"] .llamada-nombre { font-size: 1.15rem; }
    html[data-texto="enorme"] .llamada-avatar { width: clamp(60px, 11dvh, 90px); height: clamp(60px, 11dvh, 90px); }
    html[data-texto="enorme"] .llamada-botones .redondo-llamada .disco { width: 50px; height: 50px; } html[data-texto="enorme"] .llamada-botones .redondo-llamada .txt { font-size: .78rem; }
    html[data-texto="enorme"] .llamada-sub, html[data-texto="enorme"] .llamada-estado { font-size: .8rem; }
}
@media (max-height: 720px) { html[data-texto="enorme"] .zona-gesto { overflow-y: auto; } html[data-texto="enorme"] .zona-gesto .memoria { font-size: .9rem; gap: 8px; } html[data-texto="enorme"] .zona-gesto .memoria p { font-size: .95rem; line-height: 1.3; } html[data-texto="enorme"] .zona-gesto .memoria img { max-height: 70px; } }

/* ═════ biblioteca, ejercicios del libro y barra inferior ═════ */
.nav-inf { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 6px; margin-top: 8px; border-radius: 26px; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: 0 10px 24px -14px rgba(40, 50, 90, .5); }
.nav-it { display: grid; justify-items: center; gap: 1px; padding: 6px 4px; border-radius: 20px; text-decoration: none; color: var(--ink-soft); font-weight: 800; font-size: .82rem; min-height: 58px; align-content: center; }
.nav-it .nav-ic { font-size: 1.45rem; line-height: 1; }
.nav-it.on { background: linear-gradient(160deg, #e9eefc, #dbe5fb); color: var(--primary); box-shadow: inset 0 0 0 2px rgba(44, 70, 144, .25); }
html[data-texto="enorme"] .nav-it { font-size: .72rem; min-height: 50px; }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lib-card { display: grid; grid-template-rows: auto 1fr; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--glass-strong); border: 2px solid var(--line); box-shadow: 0 10px 22px -14px rgba(40, 50, 90, .5); border-bottom: 6px solid var(--c); }
.lib-card img { width: 100%; aspect-ratio: 3 / 3.6; object-fit: cover; object-position: top; background: var(--t); display: block; }
.lib-tx { display: grid; gap: 2px; padding: 8px 10px 10px; }
.lib-tx b { font-size: 1rem; line-height: 1.15; }
.lib-tx small { color: var(--ink-soft); font-size: .78rem; line-height: 1.2; }
.lib-tx em { font-style: normal; font-weight: 800; color: var(--cd); font-size: .8rem; }
.lib-nota { font-size: .95rem; color: var(--ink-soft); text-align: center; padding: 8px 12px; background: rgba(255, 255, 255, .6); border-radius: 18px; }
.lib-hero { display: grid; grid-template-columns: 38% 1fr; gap: 14px; align-items: center; }
.lib-portada { width: 100%; border-radius: 14px; box-shadow: 0 12px 24px -12px rgba(20, 30, 70, .5); border-bottom: 6px solid var(--c); display: block; }
.lib-hero-tx { display: grid; gap: 4px; min-width: 0; }
.lib-prog { font-weight: 800; color: var(--cd); font-size: .95rem; }
.lib-acciones { display: grid; gap: 12px; }
.lib-big { display: flex; align-items: center; gap: 14px; justify-content: flex-start; text-align: left; min-height: 82px; text-decoration: none; }
.lib-big small, .mis-libros small { display: block; font-weight: 600; font-size: .82rem; opacity: .9; margin-top: 2px; }
.lib-big-ic { font-size: 2rem; line-height: 1; flex: none; }
.mis-libros { display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; text-decoration: none; min-height: 68px; }
.lib-grupo h2 { font-size: 1.05rem; margin-bottom: 8px; }
.lib-grupo small { color: var(--ink-soft); font-weight: 700; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-chip { display: inline-flex; align-items: center; gap: 2px; min-width: 62px; min-height: 52px; justify-content: center; padding: 6px 10px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.lib-chip small { font-size: .7rem; color: var(--ink-soft); }
.lib-chip.ok { background: #e6f5ec; border-color: var(--ok); color: var(--ok); }
@media (min-width: 560px) { .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* visor «Hojear» */
.hj { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: radial-gradient(90% 60% at 50% 0%, #2a3a58, #131b2b); color: #fff; }
.hj-top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: calc(.5rem + env(safe-area-inset-top)) .7rem .5rem; background: rgba(16, 21, 31, .7); transition: transform .25s; }
.hj-top .btn { min-height: 46px; padding: .2rem .8rem; font-size: .95rem; }
.hj-top .hj-x { order: 1; }
.hj-top .hj-ind { order: 2; margin-left: auto; }
.hj-tit { order: 3; flex: 1 0 100%; display: grid; gap: .1rem; text-align: center; }
.hj-tit b { font-size: 1.25rem; color: #fff; }
.hj-tit small { font-size: .8rem; font-weight: 600; color: #cfdcec; }
.hj-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; display: grid; place-items: center; perspective: 1400px; outline: none; cursor: grab; }
.hj-pag { display: grid; place-items: center; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.hj-pag.vuelve, .hj-pag.zoom { transition: transform .22s ease; }
.hj-hojas { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .55)); }
.hj-hojas img { display: block; max-width: 100%; max-height: calc(100dvh - 200px); width: auto; height: auto; object-fit: contain; background: #fff; pointer-events: none; border-radius: 2px; }
.hj-hojas.dos img { max-width: 50%; }
.hj-pag.entra-der { animation: hj-der .28s ease both; }
.hj-pag.entra-izq { animation: hj-izq .28s ease both; }
@keyframes hj-der { from { opacity: .3; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes hj-izq { from { opacity: .3; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.hj-base { padding: .5rem .8rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(16, 21, 31, .78); display: grid; gap: .5rem; transition: transform .25s; }
.hj-rec[hidden] { display: none !important; }
.hj-rec { width: 100%; min-height: 54px; font-size: 1.02rem; justify-content: center; }
.hj-ctl { display: flex; align-items: center; gap: .6rem; }
.hj-ctl input { flex: 1; accent-color: #f5b820; min-width: 0; }
.hj-num { min-width: 5.2rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; }
.hj-ctl .btn { min-height: 46px; width: 46px; padding: 0; font-size: 1.5rem; flex: none; justify-content: center; }
.hj.sin-barras .hj-top { transform: translateY(-110%); }
.hj.sin-barras .hj-base { transform: translateY(110%); }
.hj-indice { position: absolute; inset: 0; background: rgba(251, 248, 241, .98); color: var(--ink); display: flex; flex-direction: column; z-index: 5; }
.hj-ind-cab { display: flex; align-items: center; justify-content: space-between; padding: calc(.8rem + env(safe-area-inset-top)) 1rem .6rem; border-bottom: 1.5px solid var(--line); }
.hj-ind-cab b { font-size: 1.3rem; }
.hj-indice .cerrar-m { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.hj-indice ul { list-style: none; overflow: auto; padding: .3rem 1rem 2rem; margin: 0; }
.hj-indice li button { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; border-bottom: 1px solid #e7ebf2; color: var(--ink); min-height: 56px; text-align: left; font: inherit; font-weight: 800; font-size: 1.02rem; cursor: pointer; }
.hj-indice li small { color: var(--ink-soft); font-weight: 700; }
body.hojeando #app, body.hojeando .vv-capa { visibility: hidden; }
body.hojeando .hj { visibility: visible; }

a.btn, a.lib-big, a.mis-libros, a.hj-rec, a.hj-x { text-decoration: none; }
.hj-top .btn { width: auto; flex: none; }
.hj-top .hj-x, .hj-top .hj-ind { background: #fff; color: var(--primary); }

@media (max-height: 720px) { .nav-inf { padding: 4px; margin-top: 4px; border-radius: 20px; } .nav-it { min-height: 44px; padding: 3px; font-size: .7rem; } .nav-it .nav-ic { font-size: 1.15rem; } }
@media (max-height: 720px) {
    html[data-texto="enorme"] .heroe .ilu { display: none; }
    html[data-texto="enorme"] .heroe .frase-fecha { font-size: .85rem; line-height: 1.2; margin-top: 2px; }
    html[data-texto="enorme"] .heroe .saludo-nombre { font-size: 1.5rem; }
    html[data-texto="enorme"] .heroe { padding-block: 10px; }
    html[data-texto="enorme"] .panel-rutina { padding: 10px 12px; }
    html[data-texto="enorme"] .panel-rutina .siguiente { font-size: .9rem; min-height: 0; padding: 8px 12px; }
    html[data-texto="enorme"] .panel-rutina .cabeza-rutina h2 { font-size: 1rem; }
}

/* ═════ v2: biblioteca con portadas grandes, ficha del libro, selector de ejercicios y visor más amplio ═════ */
.lib-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 560px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lib-card { display: grid; grid-template-rows: auto auto; gap: 0; border-radius: 26px; overflow: hidden; background: var(--glass-strong); border: 0; border-bottom: 0; box-shadow: 0 18px 34px -18px rgba(20, 30, 70, .55), 0 0 0 3px var(--t); }
.lib-marco { position: relative; display: block; background: var(--t); padding: 14px 14px 0; }
.lib-card img { width: 100%; aspect-ratio: auto; height: auto; object-fit: contain; border-radius: 12px 12px 0 0; box-shadow: 0 -2px 0 rgba(255, 255, 255, .6), 0 10px 22px -10px rgba(20, 30, 70, .55); background: #fff; display: block; }
.lib-tomo { position: absolute; left: 24px; top: 24px; background: var(--c); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 99px; padding: 4px 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.lib-tx { display: grid; gap: 4px; padding: 14px 16px 16px; background: #fff; }
.lib-tx b { font-size: 1.35rem; line-height: 1.12; color: var(--cd); }
.lib-tx small { color: var(--ink-soft); font-size: 1rem; line-height: 1.25; }
.lib-tx em { font-style: normal; font-weight: 800; color: var(--ink); font-size: .95rem; }
.lib-barra { display: block; height: 8px; border-radius: 8px; background: #e5eaf3; overflow: hidden; margin-top: 4px; } .lib-barra i { display: block; height: 100%; background: var(--c); border-radius: 8px; transition: width .4s; }
.lib-barra.grande { height: 12px; }
/* ficha del libro */
.lib-hero { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; padding: 20px 16px 18px; position: relative; overflow: hidden; background: linear-gradient(180deg, var(--t), rgba(255, 255, 255, .92) 62%); }
.lib-halo { position: absolute; inset: -30% -10% auto; height: 70%; background: radial-gradient(closest-side, var(--c), transparent); opacity: .22; pointer-events: none; }
.lib-portada { position: relative; width: min(64%, 270px); border-radius: 14px; box-shadow: 0 26px 40px -18px rgba(20, 30, 70, .65), 0 0 0 4px #fff, 0 0 0 7px var(--c); border-bottom: 0; margin-bottom: 14px; display: block; }
.lib-titulo { position: relative; font-size: clamp(1.9rem, 8vw, 2.5rem); line-height: 1.05; color: var(--cd); }
.lib-bajada { position: relative; font-size: 1.15rem; line-height: 1.3; color: var(--ink-soft); max-width: 24ch; }
.lib-prog-bloque { position: relative; width: 100%; max-width: 320px; display: grid; gap: 4px; margin-top: 6px; }
.lib-prog { font-weight: 800; color: var(--ink); font-size: 1rem; }
.lib-hero .etiqueta { position: relative; background: var(--c); color: #fff; border-radius: 99px; padding: 4px 14px; }
/* selector de ejercicios */
.lib-filtros { display: grid; gap: 10px; padding: 12px; }
.lib-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 18px; background: #e8edf6; }
.lib-seg button { min-height: 48px; border: 0; border-radius: 14px; background: transparent; font: inherit; font-weight: 800; font-size: .98rem; color: var(--ink-soft); cursor: pointer; }
.lib-seg button.on { background: #fff; color: var(--primary); box-shadow: 0 3px 10px -4px rgba(20, 30, 70, .4); }
.lib-sel { min-height: 54px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: 1rem; padding: 0 12px; color: var(--ink); width: 100%; }
.lib-cuenta { font-weight: 800; color: var(--ink-soft); font-size: .95rem; text-align: center; }
.lib-lista { display: grid; gap: 8px; }
.lib-fila { display: grid; grid-template-columns: 64px 1fr 24px; gap: 12px; align-items: center; min-height: 72px; padding: 8px 14px 8px 10px; border-radius: 20px; background: #fff; border: 2px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: 0 8px 18px -14px rgba(40, 50, 90, .5); }
.lib-fila:active { transform: scale(.985); }
.lib-num { display: grid; place-items: center; height: 52px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.lib-fila-tx { display: grid; gap: 2px; min-width: 0; } .lib-fila-tx b { font-size: 1.05rem; line-height: 1.15; } .lib-fila-tx small { color: var(--ink-soft); font-size: .88rem; font-weight: 700; }
.lib-ir { font-size: 1.8rem; color: var(--ink-soft); line-height: 1; }
.lib-fila.ok { background: #effaf3; border-color: var(--ok); } .lib-fila.ok .lib-num { background: var(--ok); font-size: 1.5rem; }
/* visor: más página, menos marco */
.hj-top { padding: calc(.3rem + env(safe-area-inset-top)) .6rem .3rem; gap: .2rem .4rem; }
.hj-top .btn { min-height: 42px; padding: .1rem .7rem; font-size: .9rem; }
.hj-tit { gap: 0; } .hj-tit b { font-size: 1.1rem; line-height: 1.1; } .hj-tit small { font-size: .74rem; }
.hj-base { padding: .35rem .7rem calc(.4rem + env(safe-area-inset-bottom)); gap: .35rem; }
.hj-rec { min-height: 48px; font-size: .95rem; } .hj-ctl .btn { min-height: 42px; width: 42px; } .hj-num { font-size: .85rem; min-width: 4.6rem; }
.hj-hojas img { max-height: 100%; max-width: 100%; }
.hj-stage { padding: 4px; }
html[data-texto="enorme"] .hj-lab, html[data-texto="grande"] .hj-lab { display: none; }
html[data-texto="enorme"] .hj-tit small { display: none; }
html[data-texto="enorme"] .hj-top .btn { min-width: 52px; font-size: 1.15rem; justify-content: center; }
html[data-texto="enorme"] .hj-rec { font-size: .85rem; min-height: 44px; }
.hj-indice li button { gap: 12px; padding: 6px 4px; min-height: 68px; }
.hj-i-num { flex: none; display: grid; place-items: center; width: 56px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hj-i-tx { flex: 1; display: grid; gap: 1px; min-width: 0; text-align: left; } .hj-i-tx b { font-size: 1.02rem; line-height: 1.15; } .hj-i-tx small { font-size: .82rem; color: var(--ink-soft); font-weight: 700; }
.hj-i-pg { flex: none; font-weight: 800; color: var(--ink-soft); font-size: .9rem; }

.est { white-space: nowrap; letter-spacing: .05em; } .est i { font-style: normal; color: #e0a020; } .est i.off { color: #c9d1de; }
.lib-tomo { position: static; display: inline-block; justify-self: start; background: var(--c); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; border-radius: 99px; padding: 3px 12px; box-shadow: none; margin-bottom: 2px; }
html[data-texto="enorme"] .lib-seg button { font-size: .78rem; padding: 0 2px; min-height: 44px; } html[data-texto="enorme"] .lib-sel { font-size: .9rem; min-height: 48px; }
html[data-texto="enorme"] .hj-num { min-width: 0; font-size: .78rem; } html[data-texto="enorme"] .hj-ctl { gap: .35rem; } html[data-texto="enorme"] .hj-ctl input { min-width: 40px; } html[data-texto="enorme"] .hj-ctl .btn { width: 40px; min-height: 40px; }
html[data-texto="enorme"] .hj-i-tx b { font-size: .92rem; } html[data-texto="enorme"] .hj-i-num { width: 48px; height: 44px; font-size: .9rem; } html[data-texto="enorme"] .hj-i-pg { font-size: .75rem; }
html[data-texto="enorme"] .lib-fila-tx b { font-size: .95rem; } html[data-texto="enorme"] .lib-fila { grid-template-columns: 52px 1fr 16px; gap: 8px; } html[data-texto="enorme"] .lib-num { height: 44px; font-size: .95rem; }

.lib-ediciones h2 { font-size: 1.15rem; margin-bottom: 2px; }
.lib-ed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.lib-ed { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: #fff; border-radius: 18px; padding: 8px; border: 2px solid var(--line); text-align: center; }
.lib-ed img { width: 100%; border-radius: 10px; box-shadow: 0 8px 16px -10px rgba(20, 30, 70, .55); display: block; background: var(--t); }
.lib-ed b { font-size: 1rem; margin-top: 4px; } .lib-ed small { color: var(--ink-soft); font-weight: 700; font-size: .85rem; }
@media (min-width: 560px) { .lib-ed-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* opción destacada del bot (instalar la app) */
.vv-op.destacada { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(44, 70, 144, .35); }
.vv-op.destacada::after { content: 'Recomendado'; margin-left: auto; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--primary); flex: none; }
.vv-burbuja .nx-ins { --primary-dd: #1f3470; --surface: #e8edfb; --line: rgba(26, 34, 51, .18); }
.vv-burbuja .nx-ins li.nx-p { font-size: .95rem; }

/* ===== carrusel de portadas de la biblioteca ===== */
.car { padding: 14px 8px 12px; text-align: center; }
.car-tit { margin: 0 8px 2px; font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.car-ayuda { margin: 0 12px 8px; color: var(--ink-soft); font-size: .95rem; line-height: 1.25; }
.car-marco { position: relative; }
.car-pista { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px calc(50% - 98px) 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.car-pista::-webkit-scrollbar { display: none; }
.car-it { flex: 0 0 196px; scroll-snap-align: center; display: grid; gap: 6px; justify-items: center; text-decoration: none; color: var(--ink); }
.car-it img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 14px 26px -12px rgba(20, 30, 70, .6), 0 0 0 3px #fff, 0 0 0 5px var(--c); background: #fff; }
.car-tag { margin-top: 4px; padding: 2px 12px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
.car-it b { font-size: 1.05rem; line-height: 1.15; color: var(--cd); }
.car-fl { position: absolute; top: 38%; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; background: var(--ink, #14223a); color: #fff; font-size: 2rem; line-height: 1; display: grid; place-items: center; padding: 0 0 4px; box-shadow: 0 6px 14px rgba(20, 30, 70, .35); cursor: pointer; }
.car-fl.izq { left: 2px; } .car-fl.der { right: 2px; }
.car-fl:disabled { opacity: .3; cursor: default; }
.car-cont { margin: 2px 0 6px; font-weight: 800; color: var(--ink); font-size: 1rem; }
.car-pts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.car-pt { width: 14px; height: 14px; min-width: 14px; padding: 0; border-radius: 50%; border: 2px solid var(--ink, #14223a); background: transparent; }
.car-pt.on { background: var(--ink, #14223a); width: 26px; border-radius: 8px; }
.car-lista-tit { margin: 14px 4px 6px; font-size: 1.1rem; }
@media (min-width: 700px) { .car-pista { padding-inline: calc(50% - 118px); } .car-it { flex-basis: 236px; } }
@media (prefers-reduced-motion: reduce) { .car-pista { scroll-behavior: auto; } }

/* ===== v2 carrusel (controles fuera de las portadas), volver y ediciones ===== */
.car-marco { display: none; }
.car-pista { padding: 8px calc(50% - 108px) 6px; gap: 12px; }
.car-it { flex: 0 0 216px; transition: transform .25s ease, opacity .25s ease; transform: scale(.88); opacity: .62; }
.car-it.act { transform: scale(1); opacity: 1; }
.car-cont { margin: 6px 0 4px; }
.car-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 6px 4px; }
.car-fl { position: static; width: auto; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; font-size: 1rem; font-weight: 800; border: 0; background: var(--ink, #14223a); color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
.car-fl span { font-size: 2.1rem; line-height: 1; padding-bottom: 4px; } .car-fl i { font-style: normal; }
.car-fl:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.car-ed { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 4px 2px; }
.car-ed span { padding: 4px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--line, #d7dde6); font-weight: 800; font-size: .82rem; color: var(--ink); }
@media (min-width: 700px) { .car-pista { padding-inline: calc(50% - 130px); } .car-it { flex-basis: 260px; } }
@media (prefers-reduced-motion: reduce) { .car-it { transition: none; } }
.lib-volver { margin: 2px 0 8px; align-self: flex-start; min-height: 52px; font-weight: 800; }
.lib-ediciones { display: grid; gap: 12px; }
.ed-tipo { background: #fff; border-radius: 20px; padding: 12px; border: 3px solid var(--c, #1E6FB8); display: grid; gap: 6px; text-align: left; }
.ed-tipo.regalo { border-color: #E8A000; background: #FFFBEF; }
.ed-tipo header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.ed-ic { font-size: 2rem; } .ed-tipo h3 { margin: 0; font-size: 1.15rem; } .ed-tipo header small { color: var(--ink-soft); font-weight: 700; }
.ed-etq { padding: 3px 10px; border-radius: 999px; background: #1E6FB8; color: #fff; font-weight: 800; font-size: .8rem; white-space: nowrap; }
.ed-tipo.regalo .ed-etq { background: #E8A000; color: #14223a; }
.ed-pts { margin: 2px 0; padding-left: 1.2rem; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.ed-elige { margin: 4px 0 0; font-weight: 800; font-size: .9rem; color: var(--ink-soft); }
.ed-fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .ed-fila { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ed-diseno { display: grid; gap: 4px; text-decoration: none; color: var(--ink); justify-items: center; }
.ed-diseno img { width: 100%; border-radius: 10px; box-shadow: 0 8px 16px -10px rgba(20, 30, 70, .6); background: #eef; display: block; }
.ed-diseno b { font-size: .9rem; }
.ed-tienda { display: flex; align-items: center; gap: 12px; justify-content: center; min-height: 64px; text-align: left; }
.ed-tienda small { display: block; font-weight: 600; opacity: .9; }

/* v3: nada se corta en el borde (cada columna puede encogerse) y tarjetas más compactas */
.car, .car > *, .lib-ediciones, .lib-ediciones > *, .ed-tipo, .ed-tipo > * { min-width: 0; box-sizing: border-box; }
.car { overflow: hidden; }
.car-ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 4px 2px; }
.car-fl { gap: 6px; padding: 0 8px; font-size: .95rem; white-space: nowrap; }
.car-fl span { font-size: 1.8rem; }
.car-ed span { font-size: .8rem; padding: 3px 9px; }
.lib-ediciones { grid-template-columns: minmax(0, 1fr); padding: 14px 12px; }
.lib-ediciones h2, .lib-ediciones .fecha { margin-left: 2px; margin-right: 2px; }
.ed-tipo { padding: 12px 10px; }
.ed-tipo header { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
.ed-tipo header > div { min-width: 0; } .ed-tipo h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
.ed-etq { grid-column: 1 / -1; justify-self: start; white-space: normal; }
.ed-pts { padding-left: 1.1rem; }
.ed-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-diseno b { font-size: .85rem; text-align: center; overflow-wrap: anywhere; }
.ed-tienda { padding: 8px 12px; min-height: 64px; max-width: 100%; }
.ed-tienda > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* v2 (igual que MesaViva): solo dos tamaños, el bot no se corta y los botones del pie se leen */
.ajustes .fila--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vv-op, .vv-op > span:not(.vv-ic) { min-width: 0; }
.vv-op > span:not(.vv-ic) { flex: 1; overflow-wrap: break-word; line-height: 1.2; }
.vv-op.destacada { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
.vv-op.destacada::after { grid-column: 2; justify-self: start; margin: 4px 0 0; }
.vv-pie { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.vv-pie .btn { white-space: normal; line-height: 1.1; font-size: .95rem; font-weight: 800; padding: 6px 8px; }
.vv-pie .btn:not(.primario):not(.btn--primario) { border: 3px solid var(--ink, #14223a); color: var(--ink, #14223a); background: #fff; }
.vv-x { width: 52px; height: 52px; min-width: 48px; border: 3px solid var(--ink, #14223a); font-weight: 900; }

/* emergencias de Vivi: mismos pictogramas, caja de advertencia y botón rojo que Mesi */
.pasos-e{list-style:none;margin:.2rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem;counter-reset:pe}
.pasos-e li{counter-increment:pe;display:flex;align-items:center;gap:.6rem;font-weight:800;font-size:1rem;line-height:1.2}
.pasos-e li::before{content:counter(pe);flex:none;display:grid;place-items:center;width:1.9rem;height:1.9rem;border-radius:50%;background:#12305f;color:#fff;font-weight:900;font-size:1rem}
.pasos-e .pic{flex:none;font-size:1.6rem;line-height:1}.pasos-e .pt{flex:1;min-width:0}
.alerta-e{display:flex;gap:.6rem;align-items:flex-start;margin:.5rem 0;padding:.5rem .7rem;border:3px solid #B71C1C;background:#FFF1C4;border-radius:14px;color:#14223a}
.alerta-e .al-ic{font-size:1.6rem;line-height:1;flex:none}.alerta-e b{display:block;color:#B71C1C;font-weight:900}.alerta-e p{margin:.1rem 0 0;font-weight:800}
.vv-op.peligro{background:#C62828;background-image:none;color:#fff;font-weight:900;border:0;min-height:64px;box-shadow:0 4px 0 #7f1313}
.campo{width:100%;box-sizing:border-box;min-height:52px;margin:.3rem 0;padding:.4rem .8rem;border:3px solid #12305f;border-radius:12px;font:inherit;font-weight:700;color:var(--ink);background:#fff}
.campo-err{color:#B71C1C;font-weight:800;margin:.2rem 0;min-height:1.2em}.privado{font-size:.85rem;color:var(--ink-soft);margin:.3rem 0 0}
/* emergencias de Vivi en pantallas bajas: compacto y, en horizontal, pasos a la izquierda y botones a la derecha */
@media (max-height: 780px) {
  .pasos-e { gap: .3rem; } .pasos-e li { font-size: .92rem; } .pasos-e li::before { width: 1.6rem; height: 1.6rem; font-size: .9rem; } .pasos-e .pic { font-size: 1.35rem; }
  .alerta-e { padding: .35rem .6rem; margin: .3rem 0; } .alerta-e .al-ic { font-size: 1.4rem; } .alerta-e p { font-size: .9rem; }
  .vv-op.peligro { min-height: 56px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .vv-hoja { max-height: 100dvh; }
  .vv-cuerpo:has(.pasos-e) { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; align-items: center; }
  .pasos-e li { font-size: .82rem; } .pasos-e .pic { font-size: 1.2rem; } .alerta-e p { font-size: .8rem; } .vv-op { min-height: 52px; }
}
.vv-cuerpo:has(.peligro) > .vv-ops { position: sticky; bottom: 0; background: #fffdf8; padding: 8px 0 4px; box-shadow: 0 -10px 12px -8px rgba(20, 30, 70, .25); z-index: 2; }

/* Vistas limpias: sin barras de desplazamiento visibles */
* { scrollbar-width: none; -ms-overflow-style: none; } *::-webkit-scrollbar { display: none; width: 0; height: 0; }
