/* Estilos de la app del piloto: tema D «Vidrio y lima», tomado del prototipo (prototipo/index.html). */
:root {
  color-scheme: dark;
  --bg: #0E0F11;
  --surface: #1A1C20;
  --surface2: #22252A;
  --line: #2A2D33;
  --line2: #3A3D44;
  --fg: #F2F2F0;
  --muted: #A3A6AD;
  --ok: #7FD69B;
  --okbg: #16261C;
  --rep: #F4A27A;
  --repbg: #2B1A12;
  --accent: #F26B1D;
  --on-accent: #0E0F11;
  --principal: #0E4D5C;
  --ptext: #7CC3D0;
  --paper: #FAF8F3;
  --ink: #1A1A1A;
  --ink2: #4D4D4D;
  --demo: #F2F2F0;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gl: max(20px, env(safe-area-inset-left, 0px));
  --gr: max(20px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
#app { max-width: 480px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; position: relative; background: var(--bg); }
@media (min-width: 520px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.ic { flex-shrink: 0; }
.scr { flex: 1; display: flex; flex-direction: column; gap: 24px; padding-block: 20px 28px; padding-left: var(--gl); padding-right: var(--gr); }
.brand { display: flex; align-items: center; gap: 10px; background: var(--principal); padding-block: 14px; padding-left: var(--gl); padding-right: var(--gr); color: var(--fg); font-weight: 600; font-size: 15px; }
.brand.logo { background: #FFFFFF; padding-block: 10px; border-bottom: 3px solid var(--principal); }
.logoplate { background: #FFFFFF; border-radius: 16px; padding: 12px 18px; display: inline-flex; }
.mono { width: 30px; height: 30px; border-radius: 9px; background: var(--fg); color: var(--principal); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.over { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.title { font-size: 28px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 200; }
.title b { font-weight: 800; }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.xs { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.btn { min-height: 56px; border-radius: 16px; font-weight: 800; font-size: 17px; width: 100%; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; text-align: center; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:disabled { background: var(--surface2); color: var(--muted); cursor: not-allowed; }
.btn-sec { background: transparent; border: 1px solid var(--line2); color: var(--fg); font-weight: 600; }
.btn-sec:disabled { color: var(--muted); cursor: not-allowed; }
.link { background: none; border: 0; color: var(--ptext); font-weight: 600; min-height: 48px; padding: 0; display: inline-flex; align-items: center; gap: 6px; text-align: left; font-size: 16px; }
.reason { font-size: 14px; color: var(--muted); text-align: center; }
.dock { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gl); padding-right: var(--gr); z-index: 5; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.input { min-height: 56px; width: 100%; background: var(--surface); border: 1.5px solid var(--line2); border-radius: 14px; padding: 0 16px; font-size: 18px; }
.input:focus { outline: none; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--rep); }
.inwrap { position: relative; }
.inwrap .input { padding-right: 104px; }
.inwrap .show { position: absolute; right: 4px; top: 4px; height: 48px; min-width: 92px; border: 0; background: none; color: var(--ptext); font-weight: 600; font-size: 15px; }
textarea.input { min-height: 96px; padding: 14px 16px; resize: vertical; }
select.input { appearance: none; background-image: none; }
.err { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; color: var(--rep); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 99px; line-height: 1.2; white-space: nowrap; }
.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.rep { background: var(--repbg); color: var(--rep); }
.pill.lock { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.pill.cur { background: var(--accent); color: var(--on-accent); }
.pill.av { border: 1px solid var(--accent); color: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.block { background: var(--surface); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 15px; }
.banner.rep { background: var(--repbg); color: var(--rep); }
.banner.info { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.offline { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; gap: 10px; align-items: center; background: var(--repbg); color: var(--rep); font-size: 14px; font-weight: 600; padding-block: 10px; padding-left: var(--gl); padding-right: var(--gr); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); padding-block: 8px 12px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: var(--gr); display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.top .row { gap: 6px; }
.exit { min-height: 48px; min-width: 48px; background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; color: var(--fg); padding: 0 8px; }
.top .ctx { font-size: 13px; color: var(--muted); flex: 1; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .bar { margin-left: 8px; }
.tabs { position: sticky; bottom: 0; z-index: 8; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabs button { flex: 1; min-height: 64px; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.tabs button[aria-current="page"] { color: var(--accent); }
/* Inicio */
.routeitem { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.routeitem.late { border-color: var(--rep); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.meta b { color: var(--fg); font-weight: 600; }
.next { background: var(--surface); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); }
.next .thumb { display: flex; gap: 14px; align-items: center; }
.tiny-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tiny-video { width: 54px; height: 96px; border-radius: 10px; overflow: hidden; flex-shrink: 0; position: relative; background: var(--principal); }
.tiny-video svg.scene { width: 100%; height: 100%; display: block; }
/* Ruta */
.path { display: flex; flex-direction: column; }
.node { display: flex; gap: 14px; }
.rail { width: 48px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.dot { width: 44px; height: 44px; border-radius: 99px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dot.done { border: 2px solid var(--accent); color: var(--accent); }
.dot.cur { border: 1px dashed var(--accent); }
.dot.cur span { width: 34px; height: 34px; border-radius: 99px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.dot.av { border: 2px solid var(--accent); color: var(--fg); font-weight: 800; font-size: 15px; }
.dot.lock { border: 2px solid var(--line2); color: var(--muted); }
.trail { flex: 1; width: 0; border-left: 2px dotted var(--line2); min-height: 20px; margin: 4px 0; }
.trail.done { border-left-color: var(--accent); }
.ncontent { flex: 1; min-width: 0; padding: 4px 0 24px; display: flex; flex-direction: column; gap: 8px; }
.lessonbtn { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 56px; display: flex; align-items: center; gap: 12px; }
.lessonbtn .t { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.lockbtn { width: 100%; text-align: left; background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-height: 48px; }
/* Video */
.video { position: relative; aspect-ratio: 9 / 16; width: min(100%, calc(62vh * 9 / 16)); max-width: 100%; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #000; }
.vslot, .vslot video { position: absolute; inset: 0; width: 100%; height: 100%; }
.vslot video { object-fit: cover; display: block; }
.video svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.vchip { position: absolute; left: 10px; top: 10px; background: rgba(14, 15, 17, .82); color: var(--fg); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; }
.vdur { position: absolute; right: 10px; bottom: 10px; background: rgba(14, 15, 17, .82); color: var(--fg); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.vplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 99px; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.vcap { position: absolute; left: 12px; right: 12px; top: 48px; text-align: center; }
.vcap span { background: rgba(0, 0, 0, .78); color: #FFFFFF; font-size: 15px; line-height: 1.4; padding: 3px 8px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.vmsg { position: absolute; inset: 0; background: rgba(14, 15, 17, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; font-size: 15px; }
.vtouch { position: absolute; inset: 0; background: none; border: 0; }
.vctrl { display: flex; flex-direction: column; gap: 10px; }
.vctrl .row { gap: 8px; flex-wrap: wrap; }
.chip { min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ailabel { background: none; border: 0; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0; }
details.sum { background: var(--surface); border-radius: 16px; border: 1px solid var(--line); }
details.sum summary { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; font-weight: 600; cursor: pointer; list-style: none; }
details.sum summary::-webkit-details-marker { display: none; }
details.sum ul { margin: 0; padding: 0 16px 16px 36px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: #D8DADF; }
/* Reto y evaluación */
.q { font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { width: 100%; min-height: 56px; text-align: left; background: var(--surface); border: 1.5px solid var(--line2); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.35; }
.opt .rad { width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--line2); flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; }
.opt[aria-checked="true"] { border-color: var(--accent); }
.opt[aria-checked="true"] .rad { border-color: var(--accent); }
.opt[aria-checked="true"] .rad::after { content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--accent); }
.opt.right { border-color: var(--ok); }
.opt.wrong { border-color: var(--rep); }
.opt .tag { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-top: 6px; }
.opt.right .tag { color: var(--ok); }
.opt.wrong .tag { color: var(--rep); }
.opt:disabled { cursor: default; color: var(--fg); }
.fb { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.fb.ok { background: var(--okbg); }
.fb.rep { background: var(--repbg); }
.fb .h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.fb.ok .h { color: var(--ok); }
.fb.rep .h { color: var(--rep); }
.fb p { font-size: 16px; color: var(--fg); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rule { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.rule .big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.rule .ic { color: var(--accent); }
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qitem { width: 100%; min-height: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; text-align: left; }
.qitem .n { width: 32px; height: 32px; border-radius: 99px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.qitem .t { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.score .big { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.seal { width: 64px; height: 64px; border-radius: 99px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.orbwrap { display: flex; justify-content: center; }
.orbwrap canvas { border-radius: 50%; box-shadow: 0 0 90px -10px var(--accent); }
/* Certificado */
.cert { background: var(--paper); color: var(--ink); border-radius: 16px; border-top: 8px solid var(--principal); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.cert .hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cert .mono { background: var(--principal); color: #F2F2F0; }
.cert .co { font-weight: 800; font-size: 15px; color: var(--principal); }
.cert .kind { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); font-weight: 600; }
.cert .name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.cert .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border-top: 1px solid #E2DED6; padding-top: 12px; font-size: 12px; color: var(--ink2); }
.cert .grid b { display: block; font-size: 15px; color: var(--ink); }
.cert .foot { font-size: 11px; color: var(--ink2); }
.certitem { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.certitem .ic-wrap { width: 48px; height: 48px; border-radius: 14px; background: var(--principal); color: #F2F2F0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* Perfil */
.dl { display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; }
.dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; text-align: right; font-weight: 600; }
.logo-hit { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Reglas de contraseña */
.prules { list-style: none; margin: 0; padding: 16px; background: var(--surface); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.prules li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.prules li .st { margin-left: auto; font-size: 13px; font-weight: 600; }
.prules li[data-ok="true"] .st { color: var(--ok); }
.prules li[data-ok="false"] .st { color: var(--muted); }
.prules li[data-ok="miss"] .st { color: var(--rep); }
.prules li .ic { color: var(--muted); }
.prules li[data-ok="true"] .ic { color: var(--ok); }
.codebox { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.codebox input { min-height: 56px; text-align: center; font-size: 22px; font-weight: 800; padding: 0; }
/* Hojas y avisos */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 40; }
.sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; z-index: 41; display: flex; flex-direction: column; gap: 16px; padding-block: 12px calc(20px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gl); padding-right: var(--gr); }
.sheet .grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line2); align-self: center; }
.radio { min-height: 56px; width: 100%; text-align: left; background: var(--bg); border: 1.5px solid var(--line2); border-radius: 14px; padding: 0 16px; display: flex; align-items: center; gap: 12px; font-size: 16px; }
.radio[aria-checked="true"] { border-color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 50; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; width: max-content; max-width: calc(100% - 32px); display: flex; gap: 8px; align-items: center; }
.sk { background: var(--surface2); border-radius: 14px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 8px; }
.empty .ic { color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line2); font-size: 14px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dlabel { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.switch { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 0 14px; font-size: 15px; font-weight: 600; }
.switch .knob { width: 44px; height: 26px; border-radius: 99px; background: var(--line2); position: relative; flex-shrink: 0; }
.switch .knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 99px; background: var(--muted); }
.switch[aria-checked="true"] .knob { background: var(--fg); }
.switch[aria-checked="true"] .knob::after { left: 21px; background: var(--bg); }
.creds { font-size: 13px; color: var(--muted); line-height: 1.6; font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Corte 2: sin señal, descargas y avance pendiente */
:root { --demo-h: 0px; }
#app { padding-bottom: var(--demo-h); }
.tabs, .dock { bottom: var(--demo-h); }
.toast { bottom: calc(84px + var(--demo-h) + env(safe-area-inset-bottom, 0px)); }
.offline { background: var(--surface2); color: var(--fg); font-weight: 600; }
.conn { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-left: var(--gl); padding-right: var(--gr); background: var(--surface); border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 14px; font-weight: 600; text-align: left; }
.conn .t { flex: 1; min-width: 0; }
.conn.ok .ic:first-child { color: var(--ok); }
.conn.warn { color: var(--rep); }
.flash { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); width: min(448px, calc(100% - 32px)); z-index: 45; background: var(--surface2); border: 1px solid var(--line2); color: var(--fg); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; }
.dlrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dlb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dlb.ready { color: var(--ok); }
.dlb.err { color: var(--rep); }
.dlb.dl { color: var(--fg); }
.minibar { width: 64px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; display: inline-block; }
.minibar i { display: block; height: 100%; background: var(--accent); }
.mini { min-height: 48px; padding: 0 12px; border-radius: 12px; background: none; border: 1px solid var(--line2); color: var(--fg); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pill.pend { background: var(--surface2); color: var(--fg); border: 1px dashed var(--line2); }
.lessonbtn.need { border-style: dashed; }
.lessonbtn.need .t { color: var(--muted); }
.lgroup { display: flex; flex-direction: column; gap: 6px; }
.btn-google { background: #FFFFFF; color: #1F1F1F; border: 1px solid #DADCE0; font-weight: 600; }
.btn-google:disabled { background: var(--surface2); color: var(--muted); border-color: var(--line); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.chkrow { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-align: left; }
.chkrow .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--on-accent); }
.chkrow[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.chkrow:disabled { cursor: default; }
.chkrow:disabled .box { background: var(--surface2); border-color: var(--line2); color: var(--ok); }
.chkrow.sub { margin-left: 24px; width: calc(100% - 24px); }
.dlcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
/* ===== Tema D · Vidrio y lima =====
   Vidrio esmerilado sobre fondo oliva casi negro; el acento del cliente (lima en Nivia) solo en la acción y el avance.
   Números grandes y livianos, cápsulas y botones circulares. */
:root {
  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #0B0D09; --surface: rgba(30, 36, 24, .58); --surface2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .10); --line2: rgba(255, 255, 255, .18);
  --fg: #F4F6EE; --muted: #A9AF9C; --ok: #B8F26B; --okbg: rgba(184, 242, 107, .12);
  --rep: #F4A27A; --repbg: rgba(244, 162, 122, .13); --on-accent: #11140C; --blur: blur(22px) saturate(140%);
  --sheet: rgba(20, 24, 16, .94);
}
body { background: var(--bg); }
body::before { background: transparent; }
#app { background: radial-gradient(130% 55% at 50% 0%, color-mix(in srgb, var(--principal) 60%, #0B0D09) 0%, #12160D 42%, #0B0D09 75%); }
@media (min-width: 520px) { #app { border-color: rgba(255, 255, 255, .06); } }
.glass, .block, .routeitem, .lessonbtn, .dlcard, .certitem, .next, .rule, .qitem, .opt, details.sum, .banner.info, .chkrow, .dl, .prules, .conn, .offline {
  background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line);
}
.block, .routeitem, .dlcard, .certitem, .next, .rule, details.sum, .dl, .prules { border-radius: 26px; }
.lessonbtn, .qitem, .chkrow { border-radius: 20px; }
.title { font-weight: 300; letter-spacing: -.03em; } .title b { font-weight: 600; }
.h2 { font-weight: 600; } .q { font-weight: 600; letter-spacing: -.02em; }
.over { color: var(--muted); letter-spacing: .18em; }
.btn { border-radius: 99px; font-weight: 600; }
.btn-sec { background: var(--surface2); border: 1px solid var(--line2); }
.btn-google { border-radius: 99px; }
.input { background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); border-radius: 18px; }
.bar { height: 6px; background: rgba(255, 255, 255, .12); }
.brand { background: transparent; padding-block: 12px 4px; }
.brand .mono { width: 40px; height: 40px; border-radius: 99px; }
.brand.logo { background: transparent; border-bottom: 0; }
.brand.logo img { background: #FFFFFF; padding: 6px 12px; border-radius: 99px; box-sizing: content-box; }
.conn { width: auto; margin: 8px var(--gr) 0 var(--gl); border-radius: 99px; min-height: 44px; padding: 6px 14px; font-size: 13px; top: calc(env(safe-area-inset-top, 0px) + 8px); }
.offline { border-radius: 99px; margin: 8px var(--gr) 0 var(--gl); padding: 8px 14px; font-size: 13px; }
.top { background: transparent; border-bottom: 0; padding-block: 10px 8px; }
.exit { background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 99px; padding: 0 14px 0 10px; }
.dock { background: linear-gradient(180deg, rgba(11, 13, 9, 0), rgba(11, 13, 9, .94) 28%); border-top: 0; }
.pill { border-radius: 99px; }
.dot.done { background: var(--accent); color: var(--on-accent); border: 0; }
.dot.cur { border: 0; box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 99px; }
.trail { border-left-style: dotted; }
.trail.done { border-left: 3px solid var(--accent); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)); }
.seal { box-shadow: 0 0 40px -6px var(--accent); }
.sheet { background: var(--sheet); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-bottom: 0; border-radius: 30px 30px 0 0; }
.radio { background: rgba(255, 255, 255, .05); border-radius: 18px; }
.chip { background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 99px; }
.video { border-radius: 28px; }
.toast { border-radius: 99px; }
.empty .ic { color: var(--accent); }
/* Barra inferior flotante */
.tabs { position: sticky; bottom: calc(var(--demo-h) + 14px); align-self: center; width: auto; margin: 0 auto 14px; gap: 6px; padding: 6px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(20, 24, 16, .78); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); padding-bottom: 6px; }
.tabs button { flex: none; min-width: 84px; min-height: 58px; border-radius: 99px; font-size: 11px; gap: 2px; padding: 6px 12px; }
.tabs button[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
/* Piezas del tema */
.circ { width: 48px; height: 48px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--fg);
  background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.circ[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.circ.ok { color: var(--ok); }
.hero-t { font-size: 40px; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; }
.hero-t span { display: block; font-weight: 300; color: var(--muted); } .hero-t b { display: block; font-weight: 600; }
.seg2 { display: flex; gap: 4px; padding: 5px; border-radius: 99px; background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.seg2 button { flex: 1; min-height: 44px; border-radius: 99px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.seg2 button[aria-pressed="true"] { background: var(--fg); color: var(--bg); font-weight: 600; }
.ring2 { --p: 0; width: 50px; height: 50px; border-radius: 99px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); }
.ring2 span { width: 41px; height: 41px; border-radius: 99px; background: #151910; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.heroc { border-radius: 32px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.heroc-h { display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px; }
.heroc-m { position: relative; height: 330px; border-radius: 26px; overflow: hidden; background: #000 center 22% / cover no-repeat; }
.heroc-m::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 13, 9, .25) 0%, rgba(11, 13, 9, 0) 30%, rgba(11, 13, 9, .55) 100%); }
.heroc-m > * { position: relative; z-index: 1; }
.heroc-in { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.stats { display: flex; gap: 8px; }
.stat { flex: 1; border-radius: 20px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(20, 24, 16, .62); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.stat b { font-size: 17px; font-weight: 600; } .stat small { font-size: 11px; color: var(--muted); }
.cta { width: 100%; min-height: 60px; border-radius: 99px; display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; font-weight: 600; font-size: 16px; text-align: left; color: var(--fg);
  background: rgba(20, 24, 16, .66); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.cta .knob { width: 48px; height: 48px; border-radius: 99px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta:disabled { color: var(--muted); cursor: not-allowed; } .cta:disabled .knob { background: rgba(255, 255, 255, .12); color: var(--muted); }
.num { font-weight: 300; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
/* Ruta como mapa */
.map { position: relative; }
.map svg { width: 100%; height: auto; display: block; overflow: visible; }
.map .lbl { font-size: 12.5px; fill: var(--fg); font-family: var(--font); }
.map .lbl.m { fill: var(--muted); } .map .lbl.a { fill: var(--accent); font-weight: 600; }
.map .hit { cursor: pointer; }
.panel { border-radius: 30px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
/* Lección inmersiva */
.lx { position: relative; flex: 1; min-height: 100dvh; overflow: hidden; background: #000; }
.lx .vslot { position: absolute; inset: 0; }
.lx-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 13, 9, .45) 0%, rgba(11, 13, 9, 0) 22%, rgba(11, 13, 9, 0) 48%, rgba(11, 13, 9, .8) 100%); }
.lx-top { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); left: var(--gl); right: var(--gr); display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 3; }
.lx-segs { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 72px); left: var(--gl); right: var(--gr); display: flex; gap: 4px; z-index: 3; }
.lx-segs i { flex: 1; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .25); }
.lx-segs i.on { background: var(--accent); }
.lx-side { position: absolute; right: var(--gr); top: calc(env(safe-area-inset-top, 0px) + 104px); display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.lx-panel { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--demo-h)); border-radius: 32px; padding: 16px; display: flex; flex-direction: column; gap: 12px; z-index: 3;
  background: rgba(20, 24, 16, .66); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); }
.lx .vplay { z-index: 2; width: 76px; height: 76px; box-shadow: 0 0 50px -6px var(--accent); }
.lx .vmsg { z-index: 2; }
.lx .vcap { top: calc(env(safe-area-inset-top, 0px) + 96px); z-index: 2; }
.lx .vtouch { z-index: 1; }
#vtime { color: var(--fg); }
/* Reto: el "por qué" queda fijo abajo, siempre visible */
.dock.fbdock { background: var(--sheet); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--line); border-radius: 30px 30px 0 0; padding-top: 18px; }
.dock .fb { background: transparent; padding: 0; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
/* ===== Solo app del piloto ===== */
.gbtn { min-height: 56px; display: flex; justify-content: center; align-items: center; }
.gbtn > div { width: 100%; display: flex; justify-content: center; }
.netbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 20; display: flex; gap: 10px; align-items: center; border-radius: 99px; margin: 8px var(--gr) 0 var(--gl); padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: var(--repbg); color: var(--rep); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.spin { width: 22px; height: 22px; border-radius: 99px; border: 2.5px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { flex: 1; display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.netbar[hidden] { display: none; }

/* ===== Etapa 1 de accesibilidad ===== */
/* El dock es sólido: nada de texto que se lea a medias detrás de los botones. */
.dock { background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -16px 24px -8px var(--bg); }
/* El contenido termina por encima de la barra flotante. */
.scr:has(+ .tabs) { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
/* Lección: controles con nombre, 48 px, fondo sólido para leerlos sobre el video. */
.lx-act { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; border-radius: 99px;
  background: rgba(11, 13, 9, .86); color: var(--fg); border: 1px solid var(--line2); font-size: 15px; font-weight: 600; white-space: nowrap; }
.lx-side { gap: 12px; align-items: flex-end; }
/* Reto: la marca de correcta o incorrecta lleva ícono y palabra; borde más grueso. */
.opt.right, .opt.wrong { border-width: 2.5px; }
.opt .tag { font-size: 15px; gap: 6px; margin-top: 8px; }
/* Ayuda */
.lessonbtn.help { color: inherit; text-decoration: none; }

/* ===== Etapa 2 · Lectura cómoda =====
   Cuerpo 18 px, secundario 16 px, nada bajo 14 px, peso mínimo 400, sin mayúsculas espaciadas.
   Todo lo que se lee va sobre fondo sólido: el vidrio y el desenfoque se apagan. */
:root {
  --surface: #1A1F15; --surface2: #262C20; --sheet: #161A12;
  --line: rgba(255, 255, 255, .14); --line2: rgba(255, 255, 255, .32);
  --blur: none;
  --atext: var(--accent);   /* color de la empresa cuando se usa como texto */
}
.over { font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--muted); }
.xs { font-size: 14px; }
.small { font-size: 16px; }
.title { font-weight: 400; } .title b { font-weight: 700; }
.h2 { font-weight: 700; } .q { font-weight: 700; }
.num { font-weight: 400; }
.hero-t { text-transform: none; } .hero-t span { font-weight: 400; }
.pill { font-size: 14px; padding: 6px 12px; }
.pill.av, .chip[aria-pressed="true"], .empty .ic, .rule .ic, .map .lbl.a { color: var(--atext); fill: var(--atext); }
.stat small { font-size: 14px; }
.map .lbl { font-size: 15px; }
.time, .top .ctx { font-size: 15px; }
.conn, .offline, .netbar { font-size: 15px; }
.conn { min-height: 48px; }
.vchip, .vdur, .creds, .dlb { font-size: 14px; }
.prules li .st { font-size: 15px; }
.dlabel { font-size: 15px; letter-spacing: 0; text-transform: none; }
.btn { font-size: 18px; }
.field label { font-size: 16px; }
.link { font-size: 17px; }
.link.quiet { color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.inwrap .show { font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
details.sum ul { color: var(--fg); }
/* Campos con borde visible: ya no son bloques negros. */
.input { background: var(--surface); border: 1.5px solid var(--line2); }
/* Toques de 48 px con 12 px entre uno y otro. */
.seg2 button, .seg button { min-height: 48px; }
.seg2 button { font-size: 16px; }
.row, .opts, .qlist, .vctrl { gap: 12px; }
.mini, .chip { font-size: 15px; }
.ailabel { min-height: 48px; font-size: 15px; color: var(--fg); }
.switch { min-height: 64px; font-size: 17px; text-align: left; padding: 8px 16px; background: var(--surface); }
.tabs { gap: 12px; background: var(--surface); }
.tabs button { font-size: 14px; min-width: 92px; }
.cta, .stat { background: var(--surface); }
.ring2 span { background: var(--bg); font-size: 14px; }
.lx-panel { background: #12160D; }
/* Perfil y datos: cada dato en su propia línea, el correo no se parte. */
.dl > div { flex-direction: column; gap: 2px; }
.dl dt { font-size: 15px; }
.dl dd { text-align: left; overflow-wrap: anywhere; }

/* ===== Fondo claro (Perfil → Lectura) ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F6F0; --surface: #FFFFFF; --surface2: #E9ECE2; --sheet: #FFFFFF;
  --line: rgba(17, 20, 12, .14); --line2: rgba(17, 20, 12, .36);
  --fg: #14170F; --muted: #4A5040;
  --ok: #2E6A10; --okbg: #E3F1D6; --rep: #9C3D0C; --repbg: #FBE7DC;
  --atext: color-mix(in srgb, var(--accent) 38%, #000);
}
html[data-theme="light"] body, html[data-theme="light"] #app { background: var(--bg); }
html[data-theme="light"] .link, html[data-theme="light"] .inwrap .show { color: var(--atext); }
html[data-theme="light"] .link.quiet { color: var(--muted); }
html[data-theme="light"] .brand .mono { background: var(--principal); color: #F4F6EE; }
html[data-theme="light"] .tabs { box-shadow: 0 6px 24px rgba(17, 20, 12, .14); }
html[data-theme="light"] .dock { box-shadow: 0 -10px 20px -10px rgba(17, 20, 12, .2); }
html[data-theme="light"] .orbwrap canvas { box-shadow: none; }
html[data-theme="light"] .btn-primary { box-shadow: inset 0 0 0 1.5px rgba(17, 20, 12, .25); }
/* La lección sigue oscura: el video manda. */
.lx { --fg: #F4F6EE; --muted: #A9AF9C; --line: rgba(255, 255, 255, .14); --line2: rgba(255, 255, 255, .32); --surface: #1A1F15; --surface2: #262C20; --atext: var(--accent); color: var(--fg); }

/* ===== Letra grande (Perfil → Lectura) ===== */
html[data-size="lg"] #app { zoom: 1.15; }

/* ===== Etapa 3 · Pantalla por pantalla ===== */
/* Inicio: la portada va sola, sin texto encima. */
.heroc-m { height: 190px; }
.heroc .panel { padding: 14px 10px 10px; }
/* Lección: barra que se arrastra con el dedo y nota en vez de un botón gris. */
.vrow { align-items: center; }
.vseek { flex: 1; min-width: 0; height: 48px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.vseek::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), rgba(255, 255, 255, .28) var(--p, 0%)); }
.vseek::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 99px; background: var(--fg); border: 0; }
.vseek::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .28); }
.vseek::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.vseek::-moz-range-thumb { width: 26px; height: 26px; border-radius: 99px; background: var(--fg); border: 0; }
.vseek:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
.vtime { font-size: 16px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lx-note { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--fg); }
.lx-note .ic { color: var(--muted); margin-top: 2px; }
/* Preguntas de práctica: la explicación debajo de las opciones. */
.opt { scroll-margin-top: 96px; }
/* Reglas del examen como frases. */
.rlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rlist li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; font-size: 17px; line-height: 1.4; }
.rlist .ic { color: var(--atext); margin-top: 1px; }
/* Reloj del examen: discreto; se destaca en los últimos 2 minutos. */
.etime { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.etime.warn { color: var(--rep); background: var(--repbg); border-radius: 99px; padding: 6px 12px; font-weight: 700; }
/* Revisar: el texto de cada pregunta se lee en dos líneas. */
.qitem .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px; line-height: 1.3; }
/* Certificado: código en una sola línea, seleccionable, y aviso legible. */
.cert .kind { font-size: 14px; letter-spacing: 0; text-transform: none; }
.cert .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 14px; }
.cert .grid b { font-size: 16px; }
.cert .ccode { border-top: 1px solid #E2DED6; padding-top: 12px; font-size: 14px; color: var(--ink2); }
.cert .ccode b { display: block; font-size: 19px; color: var(--ink); letter-spacing: .02em; white-space: nowrap; overflow-x: auto; -webkit-user-select: all; user-select: all; font-variant-numeric: tabular-nums; }
.cert .foot { font-size: 14px; line-height: 1.45; }
/* La barra superior es sólida: al desplazar, el contenido no se mezcla con ella. */
.top { background: var(--bg); box-shadow: 0 10px 16px -12px var(--bg); }
.qitem { align-items: flex-start; padding: 14px; }
.qitem .qt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.qitem .t { -webkit-line-clamp: 3; line-clamp: 3; }
.seal { flex-shrink: 0; }
html[data-size="lg"] .tabs button { min-width: 80px; padding: 6px 10px; }
.pill { white-space: normal; text-align: left; }

/* ===== Etapa 4 · Recorrido guiado ===== */
.tourcatch { position: fixed; inset: 0; z-index: 60; background: transparent; }
.tourhole { position: fixed; z-index: 61; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .72); outline: 3px solid var(--accent); outline-offset: 2px; }
.tourbox { position: fixed; z-index: 62; display: flex; flex-direction: column; gap: 8px; padding: 18px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line2); border-radius: 24px;
  font-size: 17px; line-height: 1.45; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.tourbox .h2 { font-size: 20px; }
.tourrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.tourrow .btn { width: auto; flex: 0 0 auto; min-width: 136px; }
html[data-size="lg"] .tourbox { font-size: 19px; }
html[data-size="lg"] .tourbox .h2 { font-size: 23px; }

/* ===== Ajuste visual tras revisión en celular =====
   Vuelve el vidrio (con más opacidad que el tema D original para que el texto se lea)
   y la tipografía de tarjetas y botones baja un punto: más fina, menos tosca. */
:root {
  --surface: rgba(30, 36, 24, .64); --surface2: rgba(255, 255, 255, .08); --sheet: rgba(20, 24, 16, .9);
  --line: rgba(255, 255, 255, .12); --line2: rgba(255, 255, 255, .24);
  --blur: blur(22px) saturate(140%);
}
html[data-theme="light"] {
  --surface: rgba(255, 255, 255, .7); --surface2: rgba(17, 20, 12, .06); --sheet: rgba(255, 255, 255, .92);
  --line: rgba(17, 20, 12, .10); --line2: rgba(17, 20, 12, .26);
}
html[data-theme="light"] #app { background: radial-gradient(130% 55% at 50% 0%, color-mix(in srgb, var(--accent) 22%, #F5F6F0) 0%, #EEF0E6 45%, #F5F6F0 80%); }
.tabs, .cta, .stat, .input, .rlist li, .exit, .circ, .switch, .lx-act { -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.top { background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: none; }
.dock { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: none; }
.lx { --surface: rgba(30, 36, 24, .64); --surface2: rgba(255, 255, 255, .08); --line: rgba(255, 255, 255, .12); --line2: rgba(255, 255, 255, .24); }
.lx-panel { background: rgba(20, 24, 16, .7); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.lx-act { background: rgba(11, 13, 9, .6); min-height: 44px; font-size: 14px; padding: 0 14px 0 10px; }
.switch { background: var(--surface); }

/* Tipografía: base 17, tarjetas 15, secundario 14. */
body { font-size: 17px; }
.title { font-size: 26px; }
.h2 { font-size: 18px; }
.q { font-size: 21px; }
.over { font-size: 13px; }
.small { font-size: 15px; }
.xs { font-size: 13px; }
.pill { font-size: 13px; padding: 5px 10px; }
.btn { font-size: 16px; min-height: 52px; }
.link { font-size: 15px; }
.input { font-size: 16px; min-height: 52px; }
.field label { font-size: 15px; }
.lessonbtn { min-height: 52px; padding: 10px 14px; }
.lessonbtn .t { font-size: 15px; }
.opt { font-size: 16px; padding: 12px 14px; min-height: 52px; }
.opt .tag { font-size: 14px; }
.fb .h { font-size: 16px; } .fb p { font-size: 15px; }
.banner { font-size: 14px; padding: 12px 14px; }
.rlist li { font-size: 15px; padding: 14px; gap: 12px; }
.dl > div { font-size: 15px; padding: 12px 16px; }
.dl dt { font-size: 13px; }
.switch { min-height: 56px; font-size: 15px; padding: 8px 14px; }
.seg2 button { font-size: 14px; min-height: 44px; }
.tabs button { font-size: 12px; min-width: 84px; min-height: 54px; }
.etime { font-size: 14px; }
.vtime { font-size: 14px; }
.qitem .t { font-size: 15px; }
.cert .grid b { font-size: 15px; } .cert .ccode b { font-size: 17px; } .cert .foot { font-size: 12.5px; }
.reason { font-size: 13px; }

/* Recorrido: burbuja de vidrio y botones más chicos. */
.tourbox { background: var(--sheet); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); padding: 14px 16px; gap: 6px; font-size: 15px; border-radius: 20px; }
.tourbox .h2 { font-size: 17px; }
.tourbox .small { font-size: 13px; }
.tourrow { margin-top: 4px; }
.tourrow .btn { min-height: 40px; min-width: 0; padding: 0 18px; font-size: 14px; }
.tourrow .link { min-height: 40px; font-size: 13px; }
html[data-size="lg"] .tourbox { font-size: 16px; }
html[data-size="lg"] .tourbox .h2 { font-size: 18px; }

/* Video en marcha: controles ocultos para ver los subtítulos del video (ver quietLater en app.js). */
.lx .lx-top, .lx .lx-segs, .lx .lx-side, .lx .lx-panel, .lx .lx-shade { transition: opacity .3s ease; }
.lx.quiet .lx-top, .lx.quiet .lx-segs, .lx.quiet .lx-side, .lx.quiet .lx-panel, .lx.quiet .lx-shade { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .lx .lx-top, .lx .lx-segs, .lx .lx-side, .lx .lx-panel, .lx .lx-shade { transition: none; } }

/* ---------- Avance y tablero «Mi progreso» ---------- */
.pill.nt { background: var(--surface2); color: var(--fg); border: 1px solid var(--line); }
.pill.warn { background: color-mix(in srgb, #E8A33A 18%, transparent); color: #F3B85A; border: 1px solid color-mix(in srgb, #E8A33A 45%, transparent); }
html[data-theme="light"] .pill.warn { color: #8A5300; }
.ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.ring svg { position: absolute; inset: 0; }
.ring .trk { fill: none; stroke: var(--line); }
.ring .val { fill: none; stroke: var(--accent); stroke-linecap: round; }
.ring b { position: relative; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.ring b.lg { font-size: 22px; }
.ring b small { font-size: .6em; font-weight: 600; margin-left: 1px; color: var(--muted); }
.cardbtn { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; text-align: left; color: inherit; }
.heroc-h.cardbtn { background: none; border: 0; }
.routeitem.cardbtn { padding: 16px; }
.cc { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-t { font-weight: 600; font-size: 17px; line-height: 1.25; }
.cc-p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.segbar { display: flex; gap: 4px; align-items: center; }
.segbar i { flex: 1; height: 8px; border-radius: 99px; background: var(--line); }
.segbar i.on { background: var(--accent); }
.segbar i.ex { flex: none; width: 22px; height: 22px; display: grid; place-items: center; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); }
.segbar i.ex.ready { border-color: var(--accent); color: var(--atext); }
.segbar i.ex.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.kpi .ic { color: var(--atext); }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi b small { font-size: 15px; font-weight: 600; color: var(--muted); }
.kpi span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.pcourse { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 24px; border: 1px solid var(--line); }
.pc-h { display: flex; align-items: center; gap: 16px; }
.pmods { list-style: none; display: flex; flex-direction: column; gap: 14px; padding: 0; }
.pm { display: flex; flex-direction: column; gap: 6px; }
.pm-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pm-t { font-weight: 600; font-size: 15px; line-height: 1.3; display: flex; align-items: center; gap: 6px; }
.pm-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
/* Cuatro pestañas en 375 px */
.tabs { gap: 4px; }
.tabs button { min-width: 70px; padding: 6px 8px; }
html[data-size="lg"] .tabs button { min-width: 62px; padding: 6px 4px; }
.pm-h .pill { white-space: nowrap; flex-shrink: 0; }
