/* Forja v6 «Placa» (27 oct 2026, Fable): la app se ve como la placa de instrucciones de la máquina en Katla.
   Gris frío, tinta, rojo señal. Barlow (placas y señalización de carretera). Cero glow, cero degradado, cero tarjeta.
   Profundidad = dos tonos de placa y líneas de 1 px. Movimiento mecánico: 80-160 ms, una sola curva, solo en Y. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: block; src: url("fuentes/Barlow-Regular.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: block; src: url("fuentes/Barlow-Medium.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: block; src: url("fuentes/Barlow-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: block; src: url("fuentes/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: block; src: url("fuentes/BarlowCondensed-Bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: block; src: url("fuentes/BarlowCondensed-ExtraBold.woff2") format("woff2"); }

:root {
  --placa: #D7D8D4;
  --placa-2: #C6C7C3;
  --placa-3: #ECEDEA;
  --tinta: #141414;
  --tinta-2: #55564F;
  --linea: #A3A49F;
  --rojo: #D1261E;
  --estampa: #F5F5F2;
  --r: 2px;
  --curva: cubic-bezier(.2, 0, 0, 1);
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --texto: "Barlow", -apple-system, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--placa); color: var(--tinta); overflow-x: hidden; }
body {
  font: 16px/1.4 var(--texto);
  font-variant-numeric: tabular-nums lining-nums;
  padding: env(safe-area-inset-top) 0 calc(64px + env(safe-area-inset-bottom));
  overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, .ej, .prueba, .opcion, .tabs, .pila-ctl, .reps-ctl, .escala, .titulo { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
img { -webkit-touch-callout: none; -webkit-user-drag: none; pointer-events: none; }
.oculto { display: none !important; }
.cond { font-family: var(--cond); }
.rojo { color: var(--rojo); }
.ojo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); }
.linea-dato { font-size: 14px; font-weight: 500; color: var(--tinta-2); margin: 6px 0; line-height: 1.4; }
.linea-dato b { color: var(--tinta); font-weight: 600; }
.texto { font-size: 17px; line-height: 1.4; margin: 0 0 12px; }
.pasos { margin: 8px 0 12px; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.4; }
.pasos li::marker { font-family: var(--cond); font-weight: 700; color: var(--tinta-2); }
#hap { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ---------- encabezado ---------- */
.tope { padding: 10px 20px 0; }
.fila-marca { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.marca { font-family: var(--cond); font-weight: 800; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.ayuda { background: none; border: 0; padding: 0; height: 32px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); }
.ayuda:active { color: var(--tinta); }
.sub { margin-top: 16px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.titulo { all: unset; display: block; width: 100%; margin-top: 2px; cursor: pointer; }
.titulo h1 { margin: 0; font-family: var(--cond); font-size: 64px; font-weight: 800; line-height: .9; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere; }
.cambiar { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta); text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.titulo:active .cambiar { color: var(--rojo); }
.titulo:disabled { cursor: default; opacity: 1; }
.titulo:disabled .cambiar { display: none; }
.titulo:disabled h1 { font-size: 48px; }
main { padding: 16px 20px 0; }
.vista { display: none; }
.vista.activa { display: block; }

/* ---------- botones ---------- */
.primario {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px; border: 0; border-radius: var(--r);
  background: var(--tinta); color: var(--estampa); font-family: var(--cond); font-weight: 700; font-size: 24px; letter-spacing: .04em; text-transform: uppercase;
  margin: 16px 0 0; transition: transform .08s var(--curva), box-shadow .08s var(--curva);
}
.primario:active { transform: translateY(2px); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .35); }
.primario svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: miter; }
button:disabled { opacity: .5; }
.secundario { width: 100%; height: 48px; background: none; border: 0; color: var(--tinta-2); margin-top: 4px; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.secundario:active { color: var(--tinta); }
.contorno { width: 100%; height: 52px; background: none; border: 2px solid var(--tinta); border-radius: var(--r); color: var(--tinta); font-family: var(--cond); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; margin-top: 12px; }
.contorno:active { background: var(--placa-2); }
.enlace { background: none; border: 0; padding: 0; color: var(--tinta); font-weight: 600; font-size: inherit; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bandera { display: inline-block; margin: 6px 0 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--rojo); color: var(--rojo); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- lista de ejercicios: filas, no tarjetas ---------- */
.lista { margin-top: 20px; border-bottom: 1px solid var(--linea); }
.ej { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 76px; padding: 12px 0; border-top: 1px solid var(--linea); cursor: pointer; }
.ej:active .nombre { color: var(--tinta-2); }
.ej.ahora::before { content: ""; position: absolute; left: -20px; top: -1px; bottom: 0; width: 3px; background: var(--rojo); }
.ej.quieto { cursor: default; }
.placa { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--tinta); border-radius: var(--r); display: block; background: var(--placa-2); flex: none; }
.placa.vacia { border: 1.5px solid var(--linea); background: none; }
.ej.listo .placa, .ej.pausado .placa { opacity: .4; }
.cuerpo { min-width: 0; }
.nombre { font-weight: 600; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.ej.listo .nombre, .ej.pausado .nombre { color: var(--tinta-2); }
.meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; margin-top: 3px; font-family: var(--cond); font-weight: 700; font-size: 28px; line-height: 1; }
.meta small { font-family: var(--texto); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.meta .x { font-weight: 600; color: var(--tinta-2); margin: 0 2px; }
.meta.sube b:first-child { color: var(--rojo); }
.meta .etiqueta { font-family: var(--texto); }
.nota, .hechas { font-size: 13px; color: var(--tinta-2); margin-top: 3px; line-height: 1.35; }
.hechas { font-weight: 500; }
.hechas .pend { opacity: .55; }
.placas { display: flex; gap: 5px; align-self: center; }
.placas i { width: 10px; height: 16px; border: 1.5px solid var(--tinta); border-radius: 1px; }
.placas i.llena { background: var(--tinta); }
.placas i.estampa { animation: estampa .12s var(--curva); }
@keyframes estampa { from { transform: scale(1.3); } }
.ej.pausado .placas i { border-color: var(--linea); }
.etiqueta { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--rojo); white-space: nowrap; }
.pie { margin: 32px 0 8px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); }

/* hombro: una fila, siete cuadros */
.hombro { margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--tinta); }
.hombro h2 { margin: 0; font-size: 26px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.siete { display: flex; gap: 4px; margin: 12px 0 8px; }
.siete i { flex: 1; height: 10px; border: 1.5px solid var(--tinta); border-radius: 1px; }
.siete i.ok { background: var(--tinta); }
.hombro .lista { margin-top: 12px; }

/* ---------- hoja inferior ---------- */
.hoja { position: fixed; inset: 0; background: rgba(20, 20, 20, .5); display: flex; align-items: flex-end; z-index: 20; overscroll-behavior: contain; }
.panel { width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--placa-3); border-top: 2px solid var(--tinta); padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); animation: sube .2s var(--curva); will-change: transform; transition: transform .16s var(--curva); }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }
.hoja.saliendo { background: rgba(20, 20, 20, 0); transition: background .16s; }
.hoja.saliendo .panel { animation: baja .16s ease-in forwards; }
@keyframes baja { to { transform: translateY(100%); } }
.asa { width: 32px; height: 3px; background: var(--tinta); margin: 0 auto 16px; }
.hoja-titulo { margin: 0; font-family: var(--cond); font-size: 40px; font-weight: 800; line-height: .95; text-transform: uppercase; overflow-wrap: anywhere; }
.hoja-cab { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.hoja-cab .ojo { margin-top: 4px; }
.alerta { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--rojo); background: var(--placa-2); font-size: 14px; line-height: 1.4; }
.porque { font-size: 14px; color: var(--tinta-2); margin-top: 8px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip-serie { background: none; border: 1.5px solid var(--tinta); border-radius: var(--r); padding: 6px 10px; font-family: var(--cond); font-size: 18px; font-weight: 700; }
.hist { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--linea); }
.hist-f { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: 15px; }
.hist-f span:first-child { color: var(--tinta-2); }
.pr { color: var(--rojo); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-left: 4px; }
.hist-f .sube { color: var(--rojo); font-weight: 600; }
.fin-linea { margin-top: 10px; font-family: var(--cond); font-size: 28px; font-weight: 700; line-height: 1.1; text-transform: uppercase; }

/* la pila: columna de placas con scroll-snap y un pin rojo fijo al centro */
.pila-ctl, .reps-ctl { display: grid; grid-template-columns: 48px 1fr 48px; gap: 12px; align-items: center; margin: 16px 0 8px; }
.reps-ctl { margin: 20px 0 8px; }
.pila-ctl > button, .reps-ctl > button { height: 48px; border: 2px solid var(--tinta); border-radius: var(--r); background: none; font-family: var(--cond); font-size: 30px; font-weight: 600; line-height: 1; padding: 0; transition: background .08s; }
.pila-ctl > button:active, .reps-ctl > button:active { background: var(--tinta); color: var(--estampa); }
.pila-marco { position: relative; }
.pila-marco::before { content: ""; position: absolute; left: 0; top: 96px; width: 6px; height: 48px; background: var(--rojo); z-index: 1; pointer-events: none; }
.pila-marco::after { content: ""; position: absolute; left: 0; right: 0; top: 96px; height: 48px; border-top: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); pointer-events: none; }
.pila { height: 240px; padding: 96px 0; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.pila::-webkit-scrollbar { display: none; }
.placa-v { height: 48px; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1; color: var(--tinta-2); }
.placa-v small { font-family: var(--texto); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.placa-v.sel { color: var(--tinta); font-size: 40px; font-weight: 800; }
.reps-ctl > div { text-align: center; }
.reps-ctl b { display: inline-block; font-family: var(--cond); font-size: 56px; font-weight: 800; line-height: 1; }
.reps-ctl b.tic { animation: tic .1s var(--curva); }
@keyframes tic { 50% { transform: scale(1.06); } }
.reps-ctl small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.leer-foto { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.leer-foto svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.leer-foto.leyendo { color: var(--tinta-2); animation: late 1s infinite; }
@keyframes late { 50% { opacity: .35; } }

/* opciones (día, ejercicio de la foto) y escala de dolor */
.opciones { margin-top: 12px; border-bottom: 1px solid var(--linea); }
.opcion { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 0; margin: 0; border: 0; border-top: 1px solid var(--linea); background: none; font-weight: 600; font-size: 17px; }
.opcion small { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); white-space: nowrap; }
.opcion.sel { color: var(--rojo); }
.opcion:active { color: var(--tinta-2); }
.escala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 8px; }
.escala button { height: 56px; border: 1.5px solid var(--tinta); border-radius: var(--r); background: none; font-family: var(--cond); font-size: 28px; font-weight: 700; padding: 0; }
.escala button.alto { border-top: 4px solid var(--rojo); }
.escala button:active, .escala button.sel { background: var(--tinta); color: var(--estampa); }
.escala button.alto:active, .escala button.alto.sel { background: var(--rojo); border-color: var(--rojo); }

/* ---------- cerrar (✕): cabecera del modo entrenamiento y del visor ---------- */
.g-x { background: none; border: 0; color: var(--tinta-2); height: 44px; padding: 0; display: grid; place-items: center; justify-content: start; }
.g-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.tecnica { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--linea); }
.tecnica summary { list-style: none; cursor: pointer; display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta); text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tecnica summary::-webkit-details-marker { display: none; }
.tecnica ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 16px; line-height: 1.4; }
.tecnica li::marker { font-family: var(--cond); font-weight: 700; color: var(--tinta-2); }
.tec-hombro { margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--rojo); font-size: 14px; font-weight: 500; line-height: 1.4; }
.fin-titulo { margin: 0; font-family: var(--cond); font-size: 96px; font-weight: 800; line-height: .9; text-transform: uppercase; letter-spacing: -.01em; }

/* ---------- v8: modo entrenamiento — una pantalla, dos caras ----------
   Placa (claro) = levanta · invertida (tinta) = descansa. Misma retícula: cabecera · número grande · barra del pulgar. */
.entreno { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; background: var(--placa); color: var(--tinta); padding-top: env(safe-area-inset-top); overscroll-behavior: contain; }
.entreno.invertida { background: var(--tinta); color: var(--placa); }
.entreno.invertida .ojo, .entreno.invertida .g-x { color: inherit; }
.entreno.invertida .ojo { opacity: .7; }
.entreno.alarma { animation: parpadeo .5s steps(1, end) 3; }
@keyframes parpadeo { 0%, 100% { background: var(--tinta); color: var(--placa); } 50% { background: var(--placa); color: var(--tinta); } }
.e-cab { flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; height: 44px; padding: 0 20px; }
.e-titulo { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.e-titulo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-fotito { width: 28px; height: 28px; flex: none; object-fit: cover; border: 1.5px solid currentColor; border-radius: var(--r); }
.e-der { display: flex; justify-content: flex-end; }
.e-mapa { flex: none; display: flex; gap: 6px; padding: 2px 20px 0; }
.e-mapa span { flex: 1; display: flex; gap: 2px; }
.e-mapa i { flex: 1; height: 4px; background: rgba(128, 128, 128, .35); }
.e-mapa i.hecho { background: currentColor; }
.e-mapa i.ahora { background: var(--rojo); }
.e-dbarra { flex: none; height: 4px; margin: 2px 20px 0; background: rgba(128, 128, 128, .35); }
.e-dbarra i { display: block; height: 100%; width: 100%; background: currentColor; transform-origin: left center; transition: transform .25s linear; }
.e-cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 20px 16px; }
.e-banner { display: block; width: 100%; height: clamp(112px, 18dvh, 180px); object-fit: cover; border: 2px solid currentColor; border-radius: var(--r); background: var(--placa-2); }
.e-nombre { margin: 10px 0 0; font-family: var(--cond); font-size: 40px; font-weight: 800; line-height: .95; text-transform: uppercase; overflow-wrap: anywhere; }
.e-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; min-height: 44px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.e-link { background: none; border: 0; padding: 0; min-height: 44px; color: inherit; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; touch-action: manipulation; }
.e-links .e-link { color: var(--tinta); }
.e-link:active { color: var(--rojo); }
.e-clave { margin-top: 2px; padding-left: 10px; border-left: 3px solid var(--rojo); font-size: 14px; font-weight: 500; line-height: 1.4; }
.e-hechas { display: grid; gap: 2px; margin-top: 4px; font-family: var(--cond); font-size: 22px; font-weight: 700; text-transform: uppercase; line-height: 1.2; }
.e-hechas div { display: flex; align-items: center; gap: 6px; }
.e-hechas svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; }
.e-ultima { margin-top: 8px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.entreno.invertida .e-ultima { color: inherit; opacity: .75; }
.e-nota { margin: 0 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--rojo); }
.entreno .pila-ctl { margin: 4px 0 0; }
.entreno .reps-ctl { margin: 4px 0 0; }
.entreno .porque { margin: 4px 0 8px; }

/* descanso: el número grande es el tiempo */
.e-reloj { font-family: var(--cond); font-size: clamp(112px, 21dvh, 160px); font-weight: 800; line-height: .9; letter-spacing: -.02em; margin: 2px 0 8px; }
.e-fila-t { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.e-hecha { border-top: 1px solid rgba(128, 128, 128, .5); }
.e-hecha .e-link { font-size: 12px; }
.e-ajuste { display: grid; grid-template-columns: 56px 56px minmax(64px, auto) 56px 1fr; align-items: center; gap: 10px; min-height: 64px; }
.e-ajuste button { width: 56px; height: 56px; padding: 0; border: 2px solid currentColor; border-radius: var(--r); background: none; color: inherit; font-family: var(--cond); font-size: 30px; font-weight: 600; line-height: 1; touch-action: manipulation; }
.e-ajuste button:active { background: var(--placa); color: var(--tinta); }
.e-ajuste b { font-family: var(--cond); font-size: 48px; font-weight: 800; line-height: 1; text-align: center; }
.e-ajuste small, .e-x { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.e-hombro { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; border-top: 1px solid rgba(128, 128, 128, .5); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.e-hombro.abierta { display: block; padding-bottom: 8px; }
.e-hombro.alto { color: var(--rojo); }
.e-dolio { flex: none; height: 56px; padding: 0 16px; border: 2px solid currentColor; border-radius: var(--r); background: none; color: inherit; font-family: var(--cond); font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; touch-action: manipulation; }
.e-dolio:active { background: var(--tinta); color: var(--estampa); }
.entreno.invertida .e-dolio:active { background: var(--placa); color: var(--tinta); }
.entreno .escala { margin: 4px 0 0; }
.entreno .escala button { border-color: currentColor; color: inherit; }
.entreno .escala button.alto { border-top-color: var(--rojo); }
.entreno.invertida .escala button:active { background: var(--placa); color: var(--tinta); }
.e-sig { display: flex; align-items: baseline; gap: 10px; padding: 16px 0 4px; border-top: 1px solid rgba(128, 128, 128, .5); font-family: var(--cond); font-size: 22px; font-weight: 700; text-transform: uppercase; }
.e-sig small { font-family: var(--texto); font-size: 12px; font-weight: 600; letter-spacing: .08em; opacity: .7; }
.e-transito { padding-top: 12px; border-top: 1px solid rgba(128, 128, 128, .5); }
.e-transito .e-nombre { margin: 2px 0 10px; }
.e-transito .e-banner { height: clamp(88px, 14dvh, 160px); background: rgba(128, 128, 128, .25); }

/* la barra del pulgar: 80 px, borde a borde, siempre en el mismo lugar (HECHO = YA = VOLVER) */
.e-barra { flex: none; display: grid; grid-template-columns: 1fr; gap: 12px; padding: 8px 20px calc(12px + env(safe-area-inset-bottom)); }
.e-barra.doble { grid-template-columns: 1fr 2fr; }
.e-barra button { height: 80px; margin: 0; border-radius: var(--r); font-family: var(--cond); font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: transform .08s var(--curva); }
.e-barra button:active { transform: translateY(2px); }
.e-p { border: 0; background: var(--tinta); color: var(--estampa); }
.entreno.invertida .e-p { background: var(--placa); color: var(--tinta); }
.e-s { border: 2px solid currentColor; background: none; color: inherit; }
.e-fin .fin-titulo { margin-top: 8px; }
.e-fin .hist { margin-top: 12px; }
.e-deshacer-ult { margin-top: 8px; color: var(--tinta-2); }

/* ---------- récord: pantalla roja de 1.5 s ---------- */
.flash { position: fixed; inset: 0; z-index: 35; background: var(--rojo); color: var(--estampa); display: flex; flex-direction: column; justify-content: center; padding: 0 24px; pointer-events: none; animation: aparece .12s var(--curva); }
.flash.saliendo { animation: desaparece .16s var(--curva) forwards; }
@keyframes aparece { from { opacity: 0; } }
@keyframes desaparece { to { opacity: 0; } }
.flash .ojo { color: inherit; opacity: .85; }
.record-n { font-family: var(--cond); font-size: 160px; font-weight: 800; line-height: .9; letter-spacing: -.02em; }
.record-n small { font-family: var(--texto); font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-left: 10px; }
.record-t { margin-top: 10px; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- pestañas: tres palabras ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--placa); border-top: 1px solid var(--linea); padding: 0 0 env(safe-area-inset-bottom); z-index: 10; }
.tabs button { position: relative; background: none; border: 0; height: 48px; padding: 0; color: var(--tinta-2); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.tabs button.activa { color: var(--tinta); }
.tabs button.activa::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 24px; margin-left: -12px; height: 2px; background: var(--rojo); }

/* ---------- aviso ---------- */
.aviso { position: fixed; left: 20px; right: 20px; top: calc(env(safe-area-inset-top) + 10px); background: var(--tinta); color: var(--estampa); padding: 12px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; z-index: 40; animation: baja-aviso .16s var(--curva); }
@keyframes baja-aviso { from { transform: translateY(-12px); opacity: 0; } }
.sin-llave { padding: 60px 20px; display: grid; gap: 14px; }
.sin-llave .marca { font-size: 48px; }

/* ---------- foto al pin ---------- */
.camara.primario { margin-top: 12px; }
.leyendo { margin: 20px 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); animation: late 1s infinite; }
.lectura { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--tinta); }
.lect-cab { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.lect-cab .placa { width: 72px; height: 72px; }
.grande-num { font-family: var(--cond); font-size: 56px; font-weight: 800; line-height: .95; }
.grande-num small { font-family: var(--texto); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-left: 6px; color: var(--tinta-2); }
.lectura .ojo { margin: 16px 0 0; }
.lectura .opcion:last-child { border-bottom: 1px solid var(--linea); }
.error { color: var(--rojo); font-weight: 500; }
select, input { width: 100%; padding: 12px; border-radius: var(--r); border: 2px solid var(--tinta); background: var(--placa-3); font-size: 16px; }

/* ---------- progreso ---------- */
.espejo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.espejo small { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); }
.espejo b { display: block; font-family: var(--cond); font-size: 96px; font-weight: 800; line-height: .9; margin-top: 4px; }
.espejo b.sin { color: var(--linea); }
.segmentos { display: flex; gap: 4px; margin: 12px 0 8px; }
.segmentos i { flex: 1; height: 10px; border: 1.5px solid var(--tinta); border-radius: 1px; }
.segmentos i.ok { background: var(--tinta); }
.bloque { margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--tinta); }
.bloque-t { margin: 0; font-family: var(--cond); font-size: 28px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.bloque .lista { margin-top: 8px; }
.cifra-x { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 2px; font-family: var(--cond); font-size: 48px; font-weight: 800; line-height: 1; }
.cifra-x small { font-family: var(--texto); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); font-weight: 500; }
.cifra-x span { margin-left: auto; font-family: var(--texto); font-size: 13px; color: var(--tinta-2); text-align: right; font-weight: 500; line-height: 1.3; }
.cifra-x span.bien { color: var(--tinta); }
.graf { width: 100%; height: auto; margin: 6px 0; display: block; }
.graf polyline { fill: none; stroke: var(--tinta); stroke-width: 2.5; stroke-linejoin: miter; }
.graf polygon { fill: var(--placa-2); }
.graf circle { fill: var(--tinta); }
.graf .meta { stroke: var(--rojo); stroke-dasharray: 4 4; }
.graf text { fill: var(--rojo); font-size: 10px; font-family: var(--texto); font-weight: 600; letter-spacing: .08em; }
.fila-in { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.fila-in label { display: grid; gap: 4px; font-size: 11px; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.fila-in input, .in-prueba { font-family: var(--cond); font-size: 32px; font-weight: 700; text-align: center; padding: 8px; color: var(--tinta); }
.fila-in .contorno { grid-column: 1 / -1; margin-top: 2px; }
.in-prueba { margin: 16px 0 0; }
.prueba { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linea); cursor: pointer; }
.prueba > div:first-child { min-width: 0; }
.prueba b { font-size: 16px; font-weight: 600; }
.prueba small { display: block; line-height: 1.35; margin-top: 2px; color: var(--tinta-2); font-size: 13px; }
.prueba .valor { font-family: var(--cond); font-size: 28px; font-weight: 700; white-space: nowrap; }
.prueba .valor small { display: inline; font-family: var(--texto); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-left: 4px; }
.prueba .anotar { font-family: var(--texto); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; }
#pruebas { scroll-margin-top: 20px; }

/* ---------- bienvenida: una pantalla ---------- */
.bienvenida { position: fixed; inset: 0; z-index: 50; background: var(--placa); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 24px) 20px calc(24px + env(safe-area-inset-bottom)); }
.b-cuerpo { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.b-marca { font-family: var(--cond); font-size: 128px; font-weight: 800; line-height: .85; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 10px; }
.b-texto { font-size: 24px; line-height: 1.25; font-weight: 500; margin: 40px 0 8px; }
.b-pie { padding-top: 24px; }

/* ---------- ayuda ---------- */
.ayuda-sec { margin-top: 18px; }
.ayuda-sec > b { display: block; font-family: var(--cond); font-size: 22px; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.ayuda-sec p, .ayuda-sec ol { margin: 0; color: var(--tinta-2); font-size: 15px; line-height: 1.45; }
.ayuda-sec ol { padding-left: 20px; }
.ayuda-sec li { margin: 2px 0; }
.ayuda-sec b { color: var(--tinta); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v7: acciones de texto (cámara al pin, dictar) ---------- */
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin: 10px 0 2px; }
button.leer-foto { background: none; border: 0; padding: 0; height: 36px; color: var(--tinta); }
button.leer-foto:active { color: var(--rojo); }

/* ---------- v7: coach del lunes (filas, no tarjeta) ---------- */
.coach { margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--tinta); }
.coach h2 { margin: 0; font-size: 26px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.coach .contorno { margin-top: 8px; }
.c-lineas { list-style: none; margin: 12px 0 0; padding: 0; border-bottom: 1px solid var(--linea); }
.c-lineas li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--linea); }
.c-lineas li > span { padding-top: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); overflow-wrap: anywhere; }
.c-lineas p { margin: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.c-sub { margin-top: 18px; }
.c-cambios { margin-top: 6px; }
.c-cambios li > span { color: var(--tinta); }
.c-pred { margin-top: 16px; padding: 2px 0 2px 12px; border-left: 3px solid var(--rojo); }
.c-pred b { display: block; margin-top: 3px; font-family: var(--cond); font-size: 28px; font-weight: 700; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.c-pred small { display: block; margin-top: 4px; font-size: 13px; color: var(--tinta-2); line-height: 1.35; }
.marcador { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 12px; font-family: var(--cond); font-weight: 800; line-height: 1; text-transform: uppercase; }
.marcador b { font-size: 48px; font-weight: 800; }
.marcador small { font-family: var(--texto); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--tinta-2); }
.c-preds { margin-top: 10px; }
.pred-f { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--linea); }
.pred-f > i { font-style: normal; font-family: var(--cond); font-size: 22px; font-weight: 700; line-height: 1; color: var(--tinta); }
.pred-f > i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linejoin: miter; stroke-linecap: square; display: block; }
.pred-f b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pred-f small { display: block; margin-top: 2px; font-size: 13px; color: var(--tinta-2); }
.pred-f.falla > i, .pred-f.falla small { color: var(--rojo); }
.pred-f.abierta > i { color: var(--tinta-2); }
.c-hist { margin-top: 0; padding: 10px 0 8px; }
.c-sub + .c-hist { margin-top: 6px; }
.c-hist .c-lineas { margin-top: 8px; }

/* ---------- v7: dictar ---------- */
.dic-vivo { margin: 14px 0 6px; min-height: 2.1em; font-family: var(--cond); font-size: 44px; font-weight: 800; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.dic-vivo.vacio { color: var(--linea); }
.dic-in { margin: 14px 0 0; font-family: var(--cond); font-size: 30px; font-weight: 700; padding: 10px 12px; text-transform: uppercase; }
.dic-in::placeholder { color: var(--linea); }
.dic-titulo { font-size: 34px; margin-top: 6px; }
.dic-cambiar { margin-top: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; height: 32px; }
.dic-campos { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.dic-campos.sin-peso { grid-template-columns: minmax(0, 1fr); }
.dic-peso, .dic-reps { display: grid; gap: 6px; align-content: start; }
.dic-campos input { height: 56px; padding: 0 4px; font-family: var(--cond); font-size: 30px; font-weight: 700; text-align: center; color: var(--tinta); }
.dic-campos input::placeholder { color: var(--linea); }
.dic-in:focus, .dic-campos input:focus { outline: none; border-color: var(--rojo); }
.dic-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.dic-fila input { width: 56px; border-width: 1.5px; }
.dic-mas { width: 56px; height: 56px; border: 1.5px solid var(--linea); border-radius: var(--r); background: none; font-family: var(--cond); font-size: 30px; font-weight: 600; color: var(--tinta-2); padding: 0; }
.dic-mas:active { background: var(--tinta); color: var(--estampa); border-color: var(--tinta); }

/* ---------- v7: fotos de progreso ---------- */
.foto-f .placa { object-fit: cover; }
.foto-cmp { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; height: 36px; }
.visor { position: fixed; inset: 0; z-index: 25; background: var(--tinta); color: var(--placa); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top) + 4px) 20px calc(14px + env(safe-area-inset-bottom)); }
.visor .ojo { color: inherit; opacity: .75; }
.visor .linea-dato { color: inherit; opacity: .7; }
.visor .texto { color: inherit; }
.v-cab { display: flex; align-items: center; justify-content: space-between; height: 44px; flex: none; }
.v-cab .g-x { width: 44px; justify-content: end; color: var(--placa); }
.v-marco { position: relative; flex: 1 1 auto; min-height: 320px; margin-top: 4px; border: 2px solid var(--placa); border-radius: var(--r); overflow: hidden; background: var(--tinta); }
.v-video, .v-fantasma, .v-captura { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.v-video.espejo { transform: scaleX(-1); }
.v-fantasma { opacity: .35; }
.v-cuenta { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--cond); font-size: 160px; font-weight: 800; line-height: 1; color: var(--estampa); }
.v-falla { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.v-falla .primario { background: var(--placa); color: var(--tinta); }
.v-ctl { flex: none; margin-top: 12px; }
.v-rango { display: grid; grid-template-columns: auto minmax(0, 1fr) 48px; gap: 12px; align-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.v-rango b { font-family: var(--cond); font-size: 20px; font-weight: 700; text-align: right; letter-spacing: 0; }
.v-botones { display: grid; grid-template-columns: 1fr 80px 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.v-botones > button:not(.v-disparo) { height: 48px; background: none; border: 0; color: var(--placa); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.v-botones > button.sel { text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.v-disparo { width: 80px; height: 80px; padding: 6px; border: 2px solid var(--placa); border-radius: var(--r); background: none; transition: transform .08s var(--curva); }
.v-disparo i { display: block; width: 100%; height: 100%; background: var(--placa); border-radius: 1px; }
.v-disparo:active { transform: translateY(2px); }
.v-disparo:active i { background: var(--rojo); }
.v-nativa { display: block; width: max-content; margin: 6px auto 0; padding: 8px 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.v-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.v-fila .contorno, .v-fila .primario { margin: 0; height: 64px; }
.v-fila .contorno { border-color: var(--placa); color: var(--placa); }
.v-fila .contorno:active { background: rgba(128, 128, 128, .3); }
.v-fila .primario { background: var(--placa); color: var(--tinta); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: currentColor; border: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 32px; margin-top: -15px; background: var(--rojo); border: 0; border-radius: 1px; }
input[type="range"]::-moz-range-track { height: 2px; background: currentColor; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 32px; background: var(--rojo); border: 0; border-radius: 1px; }
.v-modos { display: flex; gap: 22px; margin-top: 4px; flex: none; }
.v-modos button { height: 40px; padding: 0; background: none; border: 0; color: var(--placa); opacity: .6; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.v-modos button.activa { opacity: 1; text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cmp-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cmp-lado figure { margin: 0; min-width: 0; }
.cmp-img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 2px solid var(--placa); border-radius: var(--r); background: rgba(128, 128, 128, .25); }
.cmp-lado figcaption { margin-top: 6px; font-family: var(--cond); font-size: 24px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.cmp-cortina { margin-top: 8px; }
.cmp-marco { position: relative; aspect-ratio: 3 / 4; max-height: 62dvh; margin: 0 auto; border: 2px solid var(--placa); border-radius: var(--r); overflow: hidden; }
.cmp-marco .cmp-img { position: absolute; inset: 0; height: 100%; border: 0; border-radius: 0; }
.cmp-arriba { clip-path: inset(0 50% 0 0); }
.cmp-linea { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--rojo); }
.cmp-et { position: absolute; top: 8px; padding: 2px 6px; background: var(--tinta); color: var(--placa); font-family: var(--cond); font-size: 18px; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.cmp-et.izq { left: 8px; }
.cmp-et.der { right: 8px; }
.cmp-cortina input[type="range"] { margin-top: 8px; }
.v-pie { margin-top: 12px; }

/* ---------- v8b: modos, cierre con cardio, esfuerzo, cambiar ejercicio, video, preguntar ---------- */
.modo-link { font-size: inherit; font-weight: 600; color: var(--tinta); text-transform: uppercase; letter-spacing: .04em; min-height: 32px; }
.opcion.modo { align-items: flex-start; }
.opcion.modo > span { display: grid; gap: 3px; }
.opcion.modo small { white-space: normal; text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.35; }
.opcion.modo.sel b { color: var(--rojo); }
.opcion.modo.sel small { color: var(--tinta); }
.nota.cambio { color: var(--rojo); font-weight: 600; }
.e-sube { margin: 6px 0 2px; padding-left: 10px; border-left: 3px solid var(--rojo); font-family: var(--cond); font-size: 28px; font-weight: 800; line-height: 1.05; text-transform: uppercase; color: var(--rojo); }

/* esfuerzo: tres celdas en una fila, opcional */
.e-esfuerzo { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 64px; border-top: 1px solid rgba(128, 128, 128, .5); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.e-esfuerzo > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.e-esfuerzo button { height: 48px; padding: 0 4px; border: 1.5px solid currentColor; border-radius: var(--r); background: none; color: inherit; font-family: var(--cond); font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; touch-action: manipulation; }
.e-esfuerzo button.sel { background: var(--placa); color: var(--tinta); border-color: var(--placa); }

/* cierre: ¿cómo quedaste? = tres barras de 72 px; receta de cardio con el número grande */
.c-pregunta { margin-top: 16px; }
.c-energias { display: grid; gap: 8px; margin-top: 12px; }
.c-energias button { height: 72px; border: 2px solid var(--tinta); border-radius: var(--r); background: none; color: var(--tinta); font-family: var(--cond); font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.c-energias button:active { background: var(--tinta); color: var(--estampa); }
.c-min { font-family: var(--cond); font-size: 96px; font-weight: 800; line-height: .9; text-transform: uppercase; letter-spacing: -.01em; margin-top: 2px; }
.c-ya { font-size: 64px; margin-top: 12px; }
.entreno.invertida .c-claro { color: inherit; opacity: .75; }
.entreno.invertida .fin-linea { color: inherit; }

/* cambiar ejercicio */
.opcion.alt { padding: 10px 0; }
.alt-fila { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; }
.alt-fila > span { display: grid; gap: 3px; min-width: 0; }
.alt-fila b { font-weight: 600; overflow-wrap: anywhere; }
.alt-fila small { white-space: normal; }
.opcion.alt.sel b { color: var(--rojo); }
.opcion.alt.actual .placa { outline: 2px solid var(--rojo); outline-offset: 1px; }
small.h-ok { color: var(--tinta); }
small.h-cuidado { color: var(--rojo); }
.cambio-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.cambio-botones .contorno, .cambio-botones .primario { margin: 0; height: 64px; }

/* video: 16:9, solo al tocar; si no carga, los pasos y el enlace */
.video { margin-top: 12px; }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 2px solid var(--tinta); border-radius: var(--r); background: var(--tinta); }
.video.falla { padding: 2px 0 2px 12px; border-left: 3px solid var(--rojo); }
.video .contorno { margin-top: 0; }
.credito { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--tinta-2); }
.credito a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--rojo); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ayuda-sec a.enlace { font-size: inherit; }

/* preguntar: hoja de 70 dvh con el velo transparente, para que el reloj siga a la vista */
.hoja.chat { background: transparent; }
.hoja.chat .panel { display: flex; flex-direction: column; height: 70dvh; max-height: 70dvh; overflow: hidden; }
.chat-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex: none; }
.chat-reloj { font-family: var(--cond); font-size: 28px; font-weight: 800; text-transform: uppercase; }
.hoja.chat .panel > .ojo { flex: none; margin-top: 4px; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 10px; padding-bottom: 6px; }
.chat-q { margin-top: 12px; font-family: var(--cond); font-size: 20px; font-weight: 700; line-height: 1.15; text-transform: uppercase; }
.chat-a { margin-top: 4px; padding-left: 10px; border-left: 3px solid var(--tinta); font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-a.leyendo { border-left-color: var(--linea); margin: 4px 0 0; }
.chat-rapidas { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.chat-rapidas::-webkit-scrollbar { display: none; }
.chat-rapidas .chip-serie { flex: none; font-size: 16px; white-space: nowrap; }
.chat-in { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 8px; }
.chat-in input { height: 56px; font-size: 17px; }
.chat-in input:focus { outline: none; border-color: var(--rojo); }
.chat-mic, .chat-enviar { height: 56px; border: 2px solid var(--tinta); border-radius: var(--r); background: none; color: var(--tinta); font-family: var(--cond); font-size: 20px; font-weight: 700; text-transform: uppercase; padding: 0 14px; touch-action: manipulation; }
.chat-enviar { background: var(--tinta); color: var(--estampa); }
.chat-mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; display: block; }
.chat-mic.leyendo { color: var(--rojo); border-color: var(--rojo); animation: late 1s infinite; }
.leer-foto svg path { vector-effect: non-scaling-stroke; }
