/* Tutorial del CRM — estilos.
   Idea: el tutorial es una RUTA. Cada bloque es una parada; el progreso es el camino que se ilumina;
   al final, un agradecimiento. Paleta de Grupo Luxcar (luxcar.com.ar, concesionario
   Volkswagen): azul Luxcar #001E50 de fondo, azules #003368/#264A83/#0E48A4, blanco y grises #D4D8D4.
   Botón principal blanco con texto azul, como en su sitio. El celeste #00B0F0 (acento de la marca VW)
   marca todo lo que indica "acá": recuadros para tocar, progreso, la guía.
   Tipografía Barlow, inspirada en carteles viales y patentes.
   Durante el recorrido la captura del CRM es la protagonista: nada queda fuera de la pantalla. */
:root {
  --asfalto: #001e50; --asfalto-2: #00112e; --panel: #0a2a5e; --panel-2: #163a74; --borde: #264a83;
  --texto: #ffffff; --gris: #b9c4d8; --sol: #00b0f0; --sol-ink: #001e50; --sol-suave: rgba(0,176,240,.14);
  --cta: #ffffff; --cta-ink: #001e50; --cta-hover: #dce3ee;
  --verde: #2ec27e; --verde-ink: #032416; --rojo: #e5484d; --info: #d4d8d4; --azul-mor: #001e50; --papel: #ffffff;
  --sombra: rgba(0,18,46,.45);
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Segoe UI Semibold", "Arial Narrow", system-ui, sans-serif;
  --radius: 12px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --ease: cubic-bezier(.4, 0, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--asfalto); color: var(--texto); font: 16px/1.45 var(--font-body);
  height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2 { font-family: var(--font-head); font-weight: 700; text-wrap: balance; letter-spacing: .005em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--sol); outline-offset: 2px; }
.hidden { display: none !important; }

/* la marca: Grupo Luxcar en texto, con una barra celeste como acento */
.mark { flex: none; width: 4px; height: 18px; border-radius: 2px; background: var(--sol); }
.wordmark { font-family: var(--font-head); font-weight: 700; letter-spacing: .01em; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; white-space: nowrap; font-size: 16px; }
.brand .name { color: var(--gris); font-weight: 600; }
.brand.big { font-size: 22px; color: var(--texto); } .brand.big .mark { height: 24px; }

/* ---------- barra superior ---------- */
header.top { display: flex; align-items: center; gap: 14px; min-width: 0; padding-block: 8px 6px; }
.where { display: flex; flex-direction: column; min-width: 0; flex: 1; padding-left: 14px; border-left: 1px solid var(--borde); line-height: 1.15; }
.where .stop-num { font-size: 12px; font-weight: 600; color: var(--sol); white-space: nowrap; }
.where .chap { font-family: var(--font-head); font-weight: 700; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 6px; }
.icon-btn { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 5px 10px; font-size: 14px; white-space: nowrap; font-weight: 600; }
.icon-btn:hover { background: var(--panel-2); }
.icon-btn[aria-pressed="false"] { opacity: .55; }
.menu-btn[aria-expanded="true"] { border-color: var(--sol); }

/* ---------- la ruta (progreso) ---------- */
.road { position: relative; height: 14px; margin: 2px 0 8px; border-radius: 7px; background: var(--asfalto-2); box-shadow: inset 0 0 0 1px #1a3a6e; }
.road::before { content: ""; position: absolute; left: 8px; right: 8px; top: 6px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(241,244,250,.22) 0 12px, transparent 12px 22px); }
.road .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: linear-gradient(90deg, #0e48a4, var(--sol)); transition: width .6s var(--ease); }
.road .leg { position: absolute; top: -6px; bottom: -6px; border: 0; padding: 0; background: transparent; }
.road .leg:hover + .pt, .road .leg:focus-visible + .pt { transform: translate(-50%, -50%) scale(1.35); }
.road .pt { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #2b4a7e; transform: translate(-50%, -50%); pointer-events: none; transition: transform .15s; }
.road .pt.done { background: var(--verde); }
.road .rider { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, #8fe0ff 0 30%, var(--sol) 32% 100%); border: 3px solid var(--asfalto); box-shadow: 0 0 0 2px var(--sol), 0 0 14px rgba(0,176,240,.6);
  transition: left .6s var(--ease); }

/* ---------- cuerpo: captura arriba (todo el alto que sobra) y franja abajo ---------- */
main { display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; min-width: 0; padding-block: 2px 10px; }
main.card-mode .dock { display: none; }
main.card-mode { grid-template-rows: minmax(0, 1fr); }
main.card-mode .stage { visibility: hidden; }
.stage-area { position: relative; min-height: 0; min-width: 0; display: grid; place-items: center; container-type: size; }
/* 16:10 que entra entero: el menor entre el ancho disponible y lo que permite el alto */
.stage { position: relative; width: min(100cqw, 100cqh * 1.6); aspect-ratio: 1440 / 900;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.5), 0 0 0 1px #1d3c72; background: #fff; }
.stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.stage > img.layer { opacity: 0; transition: opacity .28s var(--ease); pointer-events: none; }
.stage > img.layer.show { opacity: 1; }
.spot { position: absolute; border-radius: 10px; box-shadow: 0 0 0 9999px var(--sombra); outline: 2px solid var(--sol);
  pointer-events: none; transition: all .35s var(--ease); }
.hot { position: absolute; border: 3px solid var(--sol); border-radius: 10px; background: rgba(0,176,240,.10);
  padding: 0; animation: pulse 1.6s infinite; min-width: 22px; min-height: 22px; z-index: 2; }
.hot:hover { background: rgba(0,176,240,.24); }
.hot:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }
.hot.ok { border-color: var(--verde); background: rgba(51,194,122,.25); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,176,240,.75); } 70% { box-shadow: 0 0 0 16px rgba(0,176,240,0); } 100% { box-shadow: 0 0 0 0 rgba(0,176,240,0); } }
.ripple { position: absolute; z-index: 3; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(51,194,122,.55); pointer-events: none; animation: ripple .5s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(7); opacity: 0; } }
.praise { position: absolute; z-index: 4; transform: translate(-50%, -100%); margin-top: -12px; background: var(--verde); color: var(--verde-ink);
  font-family: var(--font-head); font-weight: 700; font-size: 20px; padding: 4px 14px; border-radius: 99px; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); animation: praise .7s var(--ease) forwards; white-space: nowrap; }
.praise.below { transform: translate(-50%, 0); margin-top: 12px; animation-name: praiseDown; }
@keyframes praise { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.8); } 25% { opacity: 1; transform: translate(-50%, -100%) scale(1.05); } 100% { opacity: 1; transform: translate(-50%, -110%); } }
@keyframes praiseDown { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 100% { opacity: 1; transform: translate(-50%, 6%); } }
.stage.nudge .hot { animation: pulse .5s 3; border-color: #fff; }
.hint { position: absolute; z-index: 3; transform: translate(-50%, -100%); margin-top: -10px; background: var(--asfalto); color: var(--texto); font-size: 14px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.hint::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--asfalto); }
.hint.below { transform: translate(-50%, 0); margin-top: 10px; }
.hint.below::after { bottom: auto; top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--asfalto); }
.chip { position: absolute; left: 12px; top: 12px; z-index: 3; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 99px;
  background: var(--verde); color: var(--verde-ink); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.chip.otro { background: var(--info); color: #071533; }
.badge { position: absolute; left: 10px; bottom: 10px; z-index: 3; background: var(--asfalto); color: var(--texto); opacity: .9; font-size: 12px; padding: 4px 8px; border-radius: 8px; }

/* scroll animado: la zona de la página que se desplaza, con la pantalla de antes y la de después en una tira */
.scroller { position: absolute; overflow: hidden; z-index: 1; }
.scroller .track { position: absolute; inset: 0; will-change: transform; }
.scroller .pane { position: absolute; left: 0; width: 100%; height: 100%; overflow: hidden; background: #f6f8fb; }
.scroller .pane img { position: absolute; max-width: none; }
.scroller .bar { position: absolute; right: 3px; top: 6px; bottom: 6px; width: 7px; border-radius: 99px; background: rgba(15,23,42,.10); }
.scroller .thumb { position: absolute; left: 0; right: 0; height: 26%; border-radius: 99px; background: rgba(15,23,42,.5); }
.wheel { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  background: var(--asfalto); color: var(--texto); font-size: 14px; font-weight: 600; padding: 8px 14px 8px 10px; border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); white-space: nowrap; pointer-events: none; }
.wheel .mouse { width: 18px; height: 28px; border: 2px solid var(--texto); border-radius: 10px; position: relative; flex: none; }
.wheel .dot { position: absolute; left: 50%; top: 5px; width: 4px; height: 6px; margin-left: -2px; border-radius: 2px; background: var(--sol); animation: wheel 1.1s infinite; }
.wheel.up .dot { animation-name: wheelUp; top: 13px; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
@keyframes wheelUp { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(-9px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- presentación y cierre de cada parada ---------- */
.block-card { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 12px; overflow: auto; }
.bc-body { position: relative; width: min(600px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--borde); border-radius: 20px;
  padding: 28px 30px 24px; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.block-card.in .bc-body { animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.bc-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.bc-icon { flex: none; width: 60px; height: 60px; border-radius: 18px; background: var(--sol-suave); color: var(--sol); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,176,240,.4); }
.bc-icon svg { width: 30px; height: 30px; }
.bc-icon.done { background: var(--verde); color: #fff; box-shadow: 0 0 0 8px rgba(51,194,122,.16); animation: popCheck .5s var(--ease); }
@keyframes popCheck { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
.bc-kicker { margin: 0 0 2px; color: var(--sol); font-size: 15px; font-weight: 600; }
.bc-body h1 { margin: 0; font-size: 36px; line-height: 1.02; }
.bc-lead { margin: 0 0 10px; color: var(--gris); font-size: 16px; }
.bc-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.bc-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 17px; font-weight: 500; }
.bc-list li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--sol); }
.bc-list.done li::before { content: "✓"; border: 0; background: var(--verde); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.bc-list.done li { animation: rise .35s var(--ease) both; }
.bc-list.done li:nth-child(2) { animation-delay: .07s; } .bc-list.done li:nth-child(3) { animation-delay: .14s; }
.bc-list.done li:nth-child(4) { animation-delay: .21s; } .bc-list.done li:nth-child(5) { animation-delay: .28s; }
.bc-meta { margin: 0; color: var(--gris); font-size: 15px; }
.mini-road { position: relative; height: 18px; margin: 6px 0 12px; border-radius: 9px; background: var(--asfalto-2); box-shadow: inset 0 0 0 1px #1a3a6e; }
.mini-road::before { content: ""; position: absolute; left: 10px; right: 10px; top: 8px; height: 2px; background: repeating-linear-gradient(90deg, rgba(241,244,250,.22) 0 12px, transparent 12px 22px); }
.mini-road .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #0e48a4, var(--sol)); transition: width 1.1s var(--ease); }
.mini-road .pt { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #2b4a7e; transform: translate(-50%, -50%); }
.mini-road .pt.done { background: var(--verde); }
.mini-road .rider { position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #8fe0ff 0 30%, var(--sol) 32% 100%); border: 3px solid var(--panel); box-shadow: 0 0 0 2px var(--sol), 0 0 16px rgba(0,176,240,.6); transition: left 1.1s var(--ease); }
.block-card .row { margin-top: 18px; }
.block-card .row .back { margin-right: auto; }

/* ---------- franja de abajo: guía, texto y botones ---------- */
.dock { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: min(100%, 1240px); margin-inline: auto; background: var(--panel); border: 1px solid var(--borde);
  border-radius: 16px; padding: 10px 12px; }
.guide { position: relative; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8fe0ff, var(--sol) 60%, #0e48a4);
  display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(0,176,240,.2); align-self: start; margin-top: 2px; }
.guide .face { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--sol-ink); }
.guide .eq { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--panel); }
.guide .eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--gris); }
.guide.talking .eq i { background: var(--sol); animation: eq .9s infinite ease-in-out; }
.guide.talking .eq i:nth-child(2) { animation-delay: .15s; } .guide.talking .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.caption { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.stepline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gris); font-weight: 600; }
.stepline .who { color: var(--texto); }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--borde); transition: all .25s var(--ease); }
.dots i.done { background: var(--verde); } .dots i.cur { background: var(--sol); width: 18px; border-radius: 99px; }
/* el texto de la voz scrollea si es largo; la indicación queda siempre a la vista */
.voz { margin: 0; font-size: 17px; line-height: 1.42; max-height: 5.7em; overflow-y: auto; }
.todo { margin: 0; font-size: 15px; font-weight: 700; color: var(--sol); }
.todo:empty { display: none; }
.todo.ok { color: var(--verde); } .todo.info { color: var(--info); }
.controls { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.btn { background: var(--panel-2); border: 1px solid var(--borde); border-radius: 10px; padding: 8px 13px; white-space: nowrap; font-size: 15px; font-weight: 600; transition: background .15s, transform .1s; }
.btn:hover:not(:disabled) { background: #1f4686; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); font-weight: 700; padding-inline: 18px; }
.btn.primary:hover:not(:disabled) { background: var(--cta-hover); }
/* mientras hay un recuadro para tocar, "Siguiente" pasa a segundo plano (sirve para saltear) */
.btn.primary.soft { background: var(--panel-2); border-color: var(--borde); color: var(--texto); font-weight: 600; }
.btn.quiet { background: transparent; color: var(--gris); }
.btn.big { font-size: 19px; padding: 14px 28px; border-radius: 12px; }
.btn:disabled { opacity: .4; cursor: default; }

/* ---------- inicio y final: pantalla completa ---------- */
.start { position: fixed; inset: 0; z-index: 10; overflow: auto; background:
  radial-gradient(1200px 600px at 100% 0%, rgba(0,176,240,.12), transparent 60%), var(--asfalto); }
.start-in { width: min(1180px, 100%); margin: 0 auto; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(24px, 5vh, 56px) clamp(16px, 4vw, 40px); }
.intro { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.headline { margin: 6px 0 0; font-size: clamp(46px, 6.4vw, 84px); line-height: .92; letter-spacing: -.01em; }
.lead { margin: 0; font-size: 19px; color: var(--gris); max-width: 50ch; line-height: 1.5; }
.lead b { color: var(--texto); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-weight: 600; font-size: 15px; }
.field input { background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; font-size: 18px; max-width: 360px; }
.field input::placeholder { color: #7f93b8; }
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.unit { text-align: left; background: var(--panel); border: 2px solid var(--borde); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.unit:hover { border-color: #4f73ad; }
.unit b { font-weight: 700; font-size: 16px; }
.unit small { grid-column: 1; color: var(--gris); font-size: 13px; }
/* radio: círculo vacío; el elegido, con un punto adentro */
.unit .ck { grid-column: 2; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #4f73ad; display: grid; place-items: center; }
.unit .ck::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sol); transform: scale(0); transition: transform .15s var(--ease); }
.unit[aria-checked="true"] { border-color: var(--sol); background: #0e3a78; }
.unit[aria-checked="true"] .ck { border-color: var(--sol); }
.unit[aria-checked="true"] .ck::after { transform: scale(1); }
.finish .start-in { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.fine { margin: 0; color: #93a4c4; font-size: 14px; }

/* la ruta del inicio: un camino vertical con una parada por bloque */
.route-wrap { align-self: center; }
.route-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-left: 64px; }
.route-head h2 { margin: 0; font-size: 28px; }
.route-head span { color: var(--gris); font-size: 15px; }
.route { list-style: none; margin: 0; padding: 0 0 0 64px; position: relative; display: grid; gap: 2px; }
.route::before { content: ""; position: absolute; left: 17px; top: 4px; bottom: 4px; width: 24px; border-radius: 12px; background: var(--asfalto-2); box-shadow: inset 0 0 0 1px #1a3a6e; }
.route::after { content: ""; position: absolute; left: 28px; top: 14px; bottom: 14px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--sol) 0 10px, transparent 10px 20px); opacity: .55; }
.stop { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 12px; }
.stop:hover { background: rgba(255,255,255,.03); }
.stop .pin { position: absolute; left: -62px; top: 50%; transform: translateY(-50%); z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel); border: 3px solid var(--sol); color: var(--sol); display: grid; place-items: center; }
.stop .pin svg { width: 17px; height: 17px; }
.stop .t { min-width: 0; }
.stop .t b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.stop .t small { color: var(--gris); font-size: 13px; }
.stop.done .pin { background: var(--verde); border-color: var(--verde); color: #fff; }
.stop.next .pin { box-shadow: 0 0 0 5px rgba(0,176,240,.25); }
.stop.off .t, .stop.off .pin { opacity: .38; }
.stop.off .pin { border-color: var(--gris); color: var(--gris); }
.stop.finish .pin { border-color: var(--texto); background: repeating-conic-gradient(var(--texto) 0 25%, var(--asfalto) 0 50%) 0 0 / 10px 10px; }
.stop.finish .t b { font-family: var(--font-head); font-size: 20px; }
/* interruptor para sacar o incluir una parada */
.tog { position: relative; width: 40px; height: 22px; flex: none; }
.tog input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tog span { position: absolute; inset: 0; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--borde); transition: background .15s; pointer-events: none; }
.tog span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--gris); transition: transform .15s, background .15s; }
.tog input:checked + span { background: rgba(0,176,240,.16); border-color: #2f5d9a; }
.tog input:checked + span::after { transform: translateX(18px); background: var(--sol); }
.tog input:focus-visible + span { outline: 2px solid var(--sol); outline-offset: 2px; }

/* ---------- pregunta de repaso ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,12,24,.8); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.card { background: var(--panel); border: 1px solid var(--borde); border-radius: 20px; padding: 26px 28px; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; animation: rise .3s var(--ease); }
.card h1 { margin: 2px 0 12px; font-size: 30px; line-height: 1.05; }
.quiz .opt { display: block; width: 100%; text-align: left; margin: 8px 0; font-size: 18px; font-weight: 500; background: var(--panel-2); border: 2px solid var(--borde); border-radius: 12px; padding: 12px 14px; }
.quiz .opt:hover:not(:disabled) { border-color: #4f73ad; }
.quiz .opt.ok { border-color: var(--verde); background: rgba(51,194,122,.12); } .quiz .opt.bad { border-color: var(--rojo); background: rgba(239,68,68,.1); }
.feedback { margin-top: 10px; font-size: 18px; font-weight: 600; }
.row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; align-items: center; }

/* ---------- menú del recorrido ---------- */
.menu { position: fixed; top: calc(58px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 78px); overflow: auto;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; padding: 8px; z-index: 6; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.menu .m-head { padding: 8px 10px 10px; font-size: 14px; color: var(--gris); }
.menu .m-head b { color: var(--texto); font-family: var(--font-head); font-size: 22px; display: block; }
.menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 10px; }
.menu button:hover, .menu button.cur { background: var(--panel-2); }
.menu .st { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--borde); display: grid; place-items: center; color: var(--gris); }
.menu .st svg { width: 14px; height: 14px; }
.menu .done .st { background: var(--verde); border-color: var(--verde); color: #fff; }
.menu .cur .st { border-color: var(--sol); color: var(--sol); }
.menu .t { flex: 1; min-width: 0; font-weight: 600; }
.menu .t small { display: block; color: var(--gris); font-size: 12px; font-weight: 500; }
.menu .reset { margin-top: 6px; border-top: 1px solid var(--borde); border-radius: 0; color: var(--gris); font-weight: 600; }

/* ---------- tamaños ---------- */
@media (max-width: 1100px) { .controls .btn:not(.primary) { padding-inline: 10px; } }
@media (max-width: 900px) {
  .start-in { grid-template-columns: 1fr; align-items: start; }
  .route-wrap { align-self: start; }
}
/* angosto o celular: texto arriba, botones abajo a lo ancho */
@media (max-width: 760px) {
  header.top { gap: 8px; }
  .brand .name, .menu-btn .lbl { display: none; }
  .where { padding-left: 8px; }
  .where .chap { font-size: 17px; }
  .icon-btn { padding: 4px 8px; }
  .dock { grid-template-columns: 1fr; gap: 8px; padding: 10px 12px; }
  .guide, .stepline .who { display: none; }
  .voz { font-size: 16px; }
  .controls { justify-content: stretch; }
  .controls .btn { flex: 1 1 0; min-width: 0; padding-inline: 6px; font-size: 14px; }
  .controls .btn.primary { flex: 3 1 0; }
  #prev .lbl, #replay .lbl, #play .lbl { display: none; }
  .bc-body { padding: 20px 18px; } .bc-body h1 { font-size: 28px; }
  .bc-icon { width: 48px; height: 48px; border-radius: 14px; } .bc-icon svg { width: 24px; height: 24px; }
  .bc-list li { font-size: 16px; }
  .wheel { font-size: 12px; padding: 6px 10px 6px 8px; bottom: 8px; }
  .lead { font-size: 17px; }
  .route-head { padding-left: 0; }
}
/* pantallas bajas (notebook con barra de tareas, ventana achicada): todo más compacto */
@media (max-height: 720px) {
  header.top { padding-block: 5px 4px; }
  main { padding-block: 2px 6px; gap: 6px; }
  .dock { padding-block: 6px; }
  .guide { width: 38px; height: 38px; } .guide .face { font-size: 18px; }
  .voz { font-size: 15px; max-height: 4.3em; }
  .todo { font-size: 14px; }
  .btn { padding-block: 6px; }
  .bc-body { padding: 16px 20px; } .bc-body h1 { font-size: 28px; }
  .bc-head { margin-bottom: 8px; } .bc-icon { width: 46px; height: 46px; } .bc-icon svg { width: 22px; height: 22px; }
  .bc-list { gap: 4px; margin-bottom: 8px; } .bc-list li { font-size: 15px; }
  .mini-road { margin: 2px 0 8px; }
  .block-card .row { margin-top: 10px; }
}
/* muy bajas (celular acostado): dos renglones de texto */
@media (max-height: 480px) { .voz { max-height: 2.9em; } .stepline { display: none; } }
/* celular parado: sobra alto, el texto puede ocupar más */
@media (max-width: 760px) and (min-height: 560px) { .voz { max-height: 8.7em; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hot { box-shadow: 0 0 0 4px var(--sol); }
}
