/* EXO · componentes.
   Parte 1 (v0): piezas que solo usa ya la cámara en vivo (js/camara.js: su pantalla de preparación y su resultado), con
   los tokens de la paleta. Se borran cuando la cámara pase a los componentes de la Parte 2.
   Parte 2 (v1, prefijo c-): el catálogo de la sección 3 de DISENO-EXO-v1.md; se ve completo en public/dev/catalogo.html. */

/* ===================== Parte 1 · v0 (cámara) ===================== */
/* Texto y encabezados */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.title { font-family: var(--display); font-stretch: 125%; font-weight: 900; text-transform: uppercase; font-size: 34px; line-height: 36px; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
.k { font: 600 11px var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.k.r { color: var(--red-ink); }
.mut { color: var(--mut); }
.note { font-size: 13px; color: var(--mut); margin: 0; }

/* Botones (las medidas del principal y del texto de 3.11) */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 17px; padding: 0 18px; }
.btn:disabled { opacity: .35; }
.btn.ghost { background: var(--s-1); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-4); }
.btn.text { background: none; color: var(--text-3); min-height: 44px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ic { width: 44px; height: 44px; border-radius: 50%; background: var(--s-2); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--chip); padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--fg); text-decoration: none; }
.chip.on { background: var(--red); color: #fff; }

/* Tarjetas y lista de repeticiones */
.card { background: var(--card); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.list { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.li:last-child { border-bottom: 0; }
.li > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chip); flex: 0 0 auto; }
.dot.ok { background: var(--fg); } .dot.low { background: var(--gray); box-shadow: inset 0 0 0 2px var(--soft); }

/* ===================== Parte 2 · v1 (c-*) =====================
   Solo tokens (tokens.css): aquí no hay colores hexadecimales (lo comprueba tests/tokens.test.mjs), así cada pieza
   cambia con el modo claro. Los grises de la referencia con tinte azul de iOS (#1C1C1E, #2C2C2E, #3A3A3C, #48484A, #57565D,
   #8E8E93) son tokens neutros (--s-2, --s-4, --line-3, --s-5, --grip, --text-3): la paleta EXO no lleva tinte.
   Los rgba() de blanco y negro que quedan van sobre foto, video o vidrio oscuro. */
.c-red { color: var(--red); }
.c-ink { color: var(--red-ink); }
.c-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
.c-badge-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--glass-strong); }
.c-tone-red { stroke: var(--red); } .c-tone-orange { stroke: var(--orange); } .c-tone-white { stroke: var(--white); } .c-tone-soft { stroke: var(--soft); }

/* 3.27 Carga: gris liso, la imagen entra con fundido; indicador solo si tarda más de 300 ms */
.c-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus-x, 50%) 30%; background: var(--s-2); opacity: 0; transition: opacity 300ms var(--ease-out); }
/* Miniatura chica con encuadre (thumbFrame en ui/states.js): el cuerpo de la persona al centro, acercado */
.c-img--framed { object-position: var(--focus-x, 50%) 50%; transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--z, 1)); }
.c-img.is-in { opacity: 1; }
.c-spinner { width: var(--size, 18px); height: var(--size, 18px); border-radius: 50%; border: 2px solid rgba(154,154,154,.35); border-top-color: var(--soft); display: inline-block; animation: c-spin 800ms linear infinite, c-appear 1ms 300ms both; opacity: 0; }
@keyframes c-spin { to { transform: rotate(360deg); } }
@keyframes c-appear { to { opacity: 1; } }
.c-empty { display: grid; justify-items: center; gap: 16px; padding: 32px 16px; text-align: center; color: var(--text-3); }
.c-empty p { margin: 0; }

/* 3.1 Pestañas flotantes y Santi */
.c-tabbar { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: var(--tabs-bottom); display: flex; gap: 10px; max-width: 448px; margin: 0 auto; }
.c-tabbar__pill { position: relative; flex: 1; height: 60px; border-radius: 30px; padding: 5px; display: flex; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge); }
.c-tab { position: relative; z-index: 1; flex: 1; height: 50px; border-radius: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--tab-off); transition: background var(--d-fast) var(--ease-out), color var(--d-fast); }
.c-tab.is-on { color: var(--white); }
/* Indicador de la pestaña activa: al cambiar se desliza desde la anterior y se infla a scale(1.15) a la mitad (lente) */
.c-tabbar__lens { position: absolute; left: 5px; top: 5px; width: calc((100% - 10px) / 3); height: 50px; border-radius: 25px; background: rgba(62,62,62,.9); transform: translateX(calc(var(--i) * 100%)); }
.c-tabbar__lens.is-moving { animation: c-lens 320ms var(--ease-spring) both; }
@keyframes c-lens {
  from { transform: translateX(calc(var(--from) * 100%)); }
  50% { transform: translateX(calc((var(--from) + var(--i)) * 50%)) scale(1.15); }
  to { transform: translateX(calc(var(--i) * 100%)); } }
.c-tab__icon { position: relative; display: inline-flex; }
.c-santi-fab { position: relative; width: 60px; height: 60px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge); }
.c-santi-fab__s { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--red); color: var(--text-1); font: 900 22px/1 var(--font-display); font-stretch: 125%; }
.c-santi-fab .c-badge-dot { top: 8px; right: 8px; }

/* 3.2 Encabezado fijo con desenfoque progresivo. El velo (degradado + desenfoque + máscara) va en ::before y baja 24 px
   más que el encabezado: así se apaga el contenido que pasa por debajo, no los chips. */
.c-head { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); padding-bottom: 12px; isolation: isolate; }
.c-head::before { content: ""; position: absolute; z-index: -1; inset: 0 0 -24px;
  background: linear-gradient(180deg, var(--bg-1) 0%, color-mix(in srgb, var(--bg-1) 90%, transparent) 70%, color-mix(in srgb, var(--bg-1) 0%, transparent) 100%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.c-head__row { height: 52px; padding: 0 16px; display: flex; align-items: center; gap: 12px; color: var(--text-1); }
.c-glyph { color: var(--text-1); flex: 0 0 auto; }
.c-head__title { flex: 1; margin: 0; display: inline-flex; align-items: center; justify-content: flex-start; text-align: left; transition: opacity var(--d-press); }
.c-head__title .i { margin-left: 6px; color: var(--soft); stroke-width: 2.5; }
.c-head__title:active { opacity: .4; }
.c-head .c-chips { margin-top: 8px; }

/* 3.3 Chips */
.c-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.c-chips::-webkit-scrollbar { display: none; }
.c-chip { flex: 0 0 auto; height: 36px; padding: 0 14px 0 12px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 8px; background: var(--s-1); border: 1px solid var(--line-2); color: var(--text-1); font: 500 14px/18px var(--font-text); white-space: nowrap; transition: transform var(--d-press) var(--ease-out), background var(--d-press); }
.c-chip:active { transform: scale(1.05); background: var(--s-3); }
.c-chip.is-featured { background: transparent; border: 1.5px solid var(--red); }

/* 3.4 Accesorio «Primeros pasos» (16 px sobre las pestañas) */
/* Velo bajo el cromo flotante: en la franja de las pestañas y el accesorio el contenido pasa atenuado (no a medias).
   Llega casi a opaco en el borde de arriba del cromo (16 px sobre él, la medida de --scrim-lead): así una tarjeta oscura que
   pasa por debajo no deja una franja oscura en el borde del accesorio en modo claro. */
.c-chrome-scrim { --scrim-lead: 16px; position: fixed; z-index: 18; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-bottom) + 60px + var(--scrim-lead)); pointer-events: none;
  background: linear-gradient(180deg, transparent 0, color-mix(in srgb, var(--chrome-scrim-to) 92%, transparent) var(--scrim-lead), var(--chrome-scrim-to) 70%); }
.has-acc > .c-chrome-scrim { height: calc(var(--tabs-bottom) + 136px + var(--scrim-lead)); }   /* pestañas 60 + 16 + accesorio 60 */
/* Claro: una tarjeta oscura (bloque, Prueba) debajo dejaba una franja gris sobre el borde del accesorio. El velo empieza 28 px
   arriba y ya es opaco 12 px sobre el cromo. */
@media (prefers-color-scheme: light) {
  .scr--tab:not([data-theme="dark"]) > .c-chrome-scrim { --scrim-lead: 28px; background: linear-gradient(180deg, transparent 0, var(--chrome-scrim-to) 16px); }
}
.c-setup { position: fixed; z-index: 19; left: 16px; right: 16px; bottom: calc(var(--tabs-bottom) + 76px); max-width: 448px; margin: 0 auto; height: 60px; border-radius: 30px; display: flex; align-items: center; padding: 0 24px 0 7px; gap: 12px; text-align: left;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--line-2); color: var(--text-1); }
.c-setup__txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.c-setup__txt b { font: 700 15px/20px var(--font-text); }
.c-setup__txt .t-chip { color: var(--red-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-setup .c-ring__center { font: 600 13px/1 var(--font-text); }

/* 3.5 Tira semanal */
.c-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 0; }
.c-week__day { position: relative; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font: 400 14px/18px var(--font-text); color: var(--day-off); }
.c-week__day::before { content: ""; position: absolute; inset: 0 calc(50% - 16px); border-radius: 16px; background: var(--line-1); opacity: 0; transition: opacity var(--d-base) var(--ease-out); }
.c-week__day.is-visible::before { opacity: 1; }
.c-week__day > span { position: relative; }
.c-week__day.is-today { color: var(--text-1); font-weight: 700; }
.c-week__day.is-planned:not(.is-done) .c-week__num::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text-3); }
.c-week__done { width: 24px; height: 24px; margin: -3px 0; border-radius: 50%; display: grid; place-items: center; background: var(--red-tint); box-shadow: inset 0 0 0 1.5px var(--red); color: var(--text-1); }
.c-week--next { display: flex; align-items: center; gap: 8px; height: 60px; }   /* el margen de 16 lo pone la pantalla */
.c-week--next b { display: block; font: 700 19px/24px var(--font-text); }
.c-week--next .t-subhead { color: var(--red-ink); }
.c-week__back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text-1); }

/* 3.6 Tarjeta grande */
.c-card { position: relative; width: min(432px, calc(100vw - 48px)); aspect-ratio: 345 / 427; border-radius: var(--r-xl); overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: var(--s-2); color: var(--white); transition: transform var(--d-press) var(--ease-out); }
.c-card:active { transform: scale(.98); }
.c-card--photo::after { content: ""; position: absolute; inset: 0; background: var(--scrim-photo); pointer-events: none; }
.c-card__img { position: absolute; inset: 0; }
.c-card__top { position: absolute; z-index: 1; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 6px; }
.c-card__bottom { position: absolute; z-index: 1; left: 16px; right: 64px; bottom: 16px; }
.c-card__title { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-card__deload { margin: 6px 0 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* una línea */
.c-card__meta { margin: 8px 0 0; color: var(--text-meta); }
.c-card__meta .i { vertical-align: -2px; margin-left: 6px; }
.c-card__tail { white-space: nowrap; }   /* la última palabra y el icono de cámara van juntos */
.c-card__progress { margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.c-card__progress b { font: 700 15px/20px var(--font-text); color: var(--red); }
/* Sesión guardada para después (7.3): barra fina con lo registrado y CONTINUE, de 47 como los secundarios */
.c-card__run { display: block; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--line-4); overflow: hidden; }
.c-card__run i { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.c-card__bottom .c-btn--primary { height: 47px; margin-top: 12px; font-size: 15px; letter-spacing: .05em; }
.c-card__more { position: absolute; z-index: 1; right: 16px; bottom: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: var(--white); }
.c-card--type { background: var(--grad-graphite); border-color: var(--line-card); }
.c-card--test { background: var(--glow-red), var(--grad-graphite); }
.c-card__type { position: absolute; inset: 56px 32px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.c-card__type h3 { margin: 0; }
.c-card__rule { width: 24px; height: 3px; background: var(--red); margin-bottom: 4px; }
.c-card__body { margin: 0; color: var(--text-2); }
.c-card--rest .c-card__type { gap: 14px; }
.c-card--rest .c-checks { align-self: center; }
/* Botones de 147 que crecen si la etiqueta no cabe; la fila usa el ancho de la tarjeta (sale 16 del margen tipográfico) */
.c-card__actions { display: flex; gap: 10px; justify-content: center; margin: 0 -16px; }
.c-card__actions .c-btn { min-width: 147px; padding: 0 12px; }
.c-card--next .c-card__type { justify-content: flex-start; padding-top: 8px; }
.c-card__rows { width: calc(100% + 32px); margin: 0 -16px; display: grid; gap: 4px; text-align: left; }
.c-card__rows .c-row--plan { height: 56px; background: transparent; padding: 4px 8px; }

/* 3.7 Carrusel con asomo */
.c-carousel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: 24px; scroll-padding-inline: 24px; scrollbar-width: none; }
.c-carousel::-webkit-scrollbar { display: none; }
.c-carousel__item { flex: 0 0 auto; scroll-snap-align: center; }
.c-carousel--block { padding-inline: 16px; scroll-padding-inline: 16px; }
.c-carousel--block .c-carousel__item { width: calc(100vw - 32px); max-width: 448px; }
.c-carousel--block .c-carousel__item > .c-block { height: 100%; }

/* 3.8 Etiquetas y pastillas */
.c-tag { height: 24px; padding: 0 8px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--font-text); color: var(--white); white-space: nowrap; }
.c-tag--photo { background: rgba(62,62,62,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.c-tag--today { background: var(--red-tint); }
.c-tag--done { background: rgba(255,255,255,.16); }
.c-tag--deload { background: var(--orange-tint); color: var(--orange); }
.c-micro { height: 16px; padding: 0 5px; border-radius: var(--r-xs); display: inline-flex; align-items: center; gap: 3px; font: 600 11px/1 var(--font-text); letter-spacing: .02em; color: var(--text-1); }
.c-micro--today { background: var(--red-tint); } .c-micro--camera { background: var(--s-3); color: var(--text-1); }
.c-micro--level { background: var(--s-3); color: var(--text-2); }
.c-micro--pain { background: var(--pain-tint); color: var(--pain); }   /* «Hurt last time» (memoria del dolor, 7.3) */
.c-source { height: 22px; padding: 0 8px; border-radius: var(--r-full); display: inline-flex; align-items: center; font: 600 13px/1 var(--font-text); background: var(--s-3); color: var(--text-3); white-space: nowrap; }
.c-source--verified { background: var(--red-tint); color: var(--text-1); }
.c-unread { min-width: 33px; height: 20px; padding: 0 6px; border-radius: var(--r-full); display: inline-grid; place-items: center; background: var(--red); color: var(--white); font: 700 13px/1 var(--font-text); }
.c-pill { height: 24px; padding: 0 8px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--font-text); color: var(--white); }
.c-pill--live { background: rgba(255,255,255,.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.c-pill--done { background: var(--red-tint); } .c-pill--locked { background: var(--s-3); color: var(--text-2); }

/* 3.9 Banner de Santi */
/* Alto 85 con 1 línea de título y 2 de cuerpo (t0012): relleno vertical 12. El título no se parte: el nombre se recorta y la meta
   roja siempre se ve. */
.c-banner { margin: 0 16px; min-height: 85px; border-radius: 16px; background: var(--grad-banner); padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 12px; color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-banner > div { flex: 1; min-width: 0; }
.c-banner p { margin: 0; }
.c-banner__title { font: 700 15px/20px var(--font-text); display: flex; gap: 4px; white-space: nowrap; }
.c-banner__lead { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-banner__title .c-ink { flex: 0 0 auto; }
.c-banner__body { color: var(--text-2); margin-top: 1px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-banner__ask { flex: 0 0 auto; max-width: 96px; height: 33px; padding: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: var(--r-full); background: var(--s-3); color: var(--text-1); font: 800 13px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; }

/* 3.10 Filas con miniatura */
.c-row { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; color: var(--text-1); transition: opacity var(--d-press) var(--ease-out); }
button.c-row:active { opacity: .4; }
.c-row__thumb { position: relative; flex: 0 0 auto; overflow: hidden; background: var(--s-2); }
.c-row__crop { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.c-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.c-row__title { font: 700 17px/22px var(--font-text); letter-spacing: -.005em; hyphens: none; }
.c-row__above, .c-row__below { font: 400 15px/20px var(--font-text); color: var(--text-3); }
.c-row__right { flex: 0 0 auto; color: var(--text-3); display: inline-flex; }
.c-row--plan { height: 80px; padding: 0 12px 0 16px; border-radius: var(--r-lg); background: var(--s-4); }
.c-row--plan + .c-row--plan { margin-top: 13px; }
.c-row--plan .c-row__thumb { width: 48px; height: 48px; border-radius: 8px; }
.c-row__thumb--icon { display: grid; place-items: center; background: var(--s-3); color: var(--text-1); }
.c-row--plan .c-row__above { font-size: 13px; line-height: 16px; }
.c-row--detail { min-height: 86px; padding: 8px 0; }   /* paso 86; una dosis larga baja de línea entre partes y la fila crece 2 px */
.c-row--detail .c-row__thumb { width: 62px; height: 62px; border-radius: 8px; }
.c-row__line2 { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; margin-top: 4px; font: 400 15px/20px var(--font-text); color: var(--text-meta); min-width: 0; }
.c-row__line2 .c-micro { margin-top: 4px; }   /* centrado con el chip de 24 */
/* Dosis en partes enteras («4 × 5 reps», «rest 90 s»). El «·» va 10 px a la izquierda de cada parte, en el hueco: la que
   empieza una línea lo deja fuera de la caja (overflow) y no se ve. Ocupa lo que queda junto al chip; si queda menos de
   7,5 em, baja entera debajo del chip. */
.c-row__dose { flex: 1 1 0; min-width: 7.5em; display: flex; flex-wrap: wrap; column-gap: 14px; overflow: hidden; padding-top: 2px; }
.c-row__dose > span { position: relative; white-space: nowrap; }
.c-row__dose > span::before { content: "·"; position: absolute; left: -10px; }
.c-row__parts { display: flex; flex-wrap: wrap; column-gap: 14px; overflow: hidden; }
.c-row__parts > span { position: relative; white-space: nowrap; }
.c-row__parts > span + span::before { content: "·"; position: absolute; left: -10px; }
.c-row__cat { height: 24px; padding: 0 8px; border-radius: var(--r-sm); display: inline-flex; align-items: center; background: var(--s-2); color: var(--text-2); font: 500 13px/1 var(--font-text); flex: 0 0 auto; }
.c-row--key { height: 120px; border-bottom: 1px solid var(--line-1); }
.c-row--key .c-row__thumb { width: 80px; height: 80px; border-radius: var(--r-md); }
.c-row--key .c-row__title { font-size: 18px; line-height: 23px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-row__play { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; display: grid; place-items: center; background: rgba(40,40,40,.75); box-shadow: inset 0 0 0 2px var(--white); color: var(--white); }
.c-row__play .i { fill: currentColor; margin-left: 2px; }
.c-row--history { min-height: 84px; }
.c-row--history .c-row__thumb { width: 64px; height: 64px; border-radius: var(--r-md); }
.c-row--history .c-row__title { font: 700 20px/25px var(--font-text); letter-spacing: -.01em; }

/* 3.11 Botones */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-full); color: var(--white); white-space: nowrap; transition: transform var(--d-press) var(--ease-out), background var(--d-press), box-shadow var(--d-press); }
.c-btn:disabled { opacity: .35; }
.c-btn--primary { width: 100%; height: 54px; padding: 0 20px; background: var(--red); font: 800 19px/1 var(--font-text); letter-spacing: .04em; text-transform: uppercase; }
.c-btn--primary:active:not(:disabled) { background: var(--red-press); transform: scale(.98); }
.c-btn--primary.is-loading { background: var(--s-5); }
.c-btn--secondary, .c-btn--compact { height: 47px; padding: 0 20px; background: var(--s-1); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line-4); font: 800 15px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; }
.c-btn--compact { height: 36px; padding: 0 16px; }
.c-btn--secondary:active, .c-btn--compact:active { box-shadow: inset 0 0 0 1px var(--line-4), var(--glow-press); }
.c-btn--outline { height: 36px; padding: 0 18px; color: var(--text-1); box-shadow: inset 0 0 0 1.5px var(--text-1); font: 800 15px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; }
.c-btn--outline:active { background: var(--s-3); }
.c-btn--glass { width: 100%; height: 54px; background: rgba(0,0,0,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-4); font: 800 17px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; }
.c-btn--text { height: 44px; padding: 0 12px; color: var(--text-3); font: 600 17px/1 var(--font-text); }
.c-btn--destructive { height: 33px; padding: 0 14px; background: rgba(255,255,255,.08); color: var(--red-ink); font: 400 17px/1 var(--font-text); }
.c-btn--pain { width: 100%; height: 47px; box-shadow: inset 0 0 0 1.5px var(--orange); color: var(--orange); font: 800 15px/1 var(--font-text); letter-spacing: .05em; text-transform: uppercase; }
.c-circle { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--s-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-1); transition: background var(--d-press); }
.c-circle:active { background: var(--press); }
.c-circle--glass, .c-glass-photo { background: var(--glass-photo); backdrop-filter: var(--glass-photo-blur); -webkit-backdrop-filter: var(--glass-photo-blur); box-shadow: var(--glass-photo-edge); color: var(--white); }
.c-circle--confirm { background: var(--red); box-shadow: none; color: var(--white); }
.c-circle--confirm .i { stroke-width: 2.5; }
.c-action { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-2); font: 400 15px/20px var(--font-text); }
.c-action__circle { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--s-1); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-1); }
.c-action__label { font-size: 12px; line-height: 16px; }
/* Avance (Download): anillo rojo de 3 px que se llena con --p; el centro sigue en --s-1 */
.c-action__circle--progress { box-shadow: none; color: var(--text-3); background: radial-gradient(closest-side, var(--s-1) calc(100% - 3px), transparent calc(100% - 2px)), conic-gradient(var(--red) var(--p), var(--line-2) 0); }

/* 3.12 CTA fijo flotante: el contenido pasa por debajo con 96 px de degradado */
.c-cta-float { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: 96px 20px max(16px, env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; background: linear-gradient(180deg, rgba(0,0,0,0) 0, var(--bg-0) 96px); pointer-events: none; }
.c-cta-float .c-btn { pointer-events: auto; }
.c-cta-float--two { display: grid; gap: 4px; padding-bottom: max(8px, calc(env(safe-area-inset-bottom) - 8px)); }   /* con un botón de texto debajo */

/* 3.13 Segmentado: elegido en gris de marca, no rojo */
.c-seg { height: 36px; padding: 3px; border-radius: var(--r-full); background: var(--s-2); display: flex; }
.c-sheet .c-seg { background: var(--s-3); }   /* dentro de una hoja (--s-2), la pista se ve con un escalón más */
.c-seg__opt { flex: 1; border-radius: var(--r-full); font: 600 15px/1 var(--font-text); color: var(--text-3); transition: background var(--d-fast) var(--ease-out), color var(--d-fast); }
.c-seg__opt.is-on { background: var(--gray); color: var(--white); }

/* Interruptor (Ajustes): 51 × 31, encendido en rojo */
.c-switch { position: relative; width: 51px; height: 31px; border-radius: var(--r-full); background: var(--s-5); transition: background var(--d-fast) var(--ease-out); }
.c-switch i { position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform var(--d-base) var(--ease-spring); }
.c-switch.is-on { background: var(--red); }
.c-switch.is-on i { transform: translateX(20px); }
/* Monograma del coach (7.1): inicial en gris de marca con el aro rojo de audio */
.c-mono { width: var(--size, 48px); height: var(--size, 48px); flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--gray); color: var(--white); box-shadow: 0 0 0 2px var(--s-2), 0 0 0 4px var(--red); font: 900 calc(var(--size, 48px) * .5)/1 var(--font-display); font-stretch: 125%; }

/* 3.14 Hojas */
.c-scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim-sheet); }
.c-sheet { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--s-2); color: var(--text-1); box-shadow: var(--shadow-sheet); border-radius: var(--r-2xl) var(--r-2xl) 0 0; animation: c-sheet-in var(--d-sheet) var(--ease-sheet) both; }
.c-sheet--large { top: env(safe-area-inset-top); }
.c-sheet--medium { top: 48%; }
.c-sheet--fit { max-height: 52%; }   /* a la medida de lo que lleva (selector con un solo programa), hasta la mediana */
.c-sheet--fit .c-sheet__body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.c-sheet--dark { background: var(--bg-0); }
.c-sheet--floating { left: 8px; right: 8px; bottom: 8px; border-radius: var(--r-float); background: rgba(58,58,58,.85); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); padding: 20px; }
.c-sheet__grip { width: 36px; height: 5px; border-radius: 3px; background: var(--grip); margin: 5px auto 0; flex: 0 0 auto; }
.c-sheet__grip, .c-sheet__head { touch-action: none; }
.c-sheet__head { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); gap: 8px; align-items: center; padding: 8px 16px; }   /* lados iguales; crecen si «Restaurar» no cabe en 68 */
.c-sheet__title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.c-sheet__title .c-ink { font: 600 17px/22px var(--font-text); }
.c-sheet__right { display: flex; justify-content: flex-end; }
.c-sheet__body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.c-reset { min-width: 68px; height: 41px; padding: 0 14px; white-space: nowrap; border-radius: var(--r-full); background: var(--s-3); color: var(--text-1); font: 600 15px/1 var(--font-text); }
.c-pop { width: 190px; padding: 14px; border-radius: 23px; background: rgba(42,42,42,.8); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); color: var(--white); display: grid; gap: 6px; transform-origin: top right; animation: c-pop-in var(--d-base) var(--ease-spring) both; }
.c-pop p { margin: 0 0 6px; color: var(--text-3); }
.c-pop--menu { width: 270px; max-width: calc(100vw - 32px); padding: 6px 0; gap: 0; }
.c-pop--menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font: 400 17px/22px var(--font-text); color: var(--white); text-align: left; }
.c-pop--menu button + button { border-top: 1px solid rgba(255,255,255,.08); }
@keyframes c-sheet-in { from { transform: translateY(100%); } }
@keyframes c-pop-in { from { transform: scale(.6); opacity: 0; } }

/* 3.15 Reproductor (siempre oscuro, a pantalla completa) */
.c-player { position: relative; min-height: 100dvh; overflow: hidden; background: var(--black); color: var(--white);
  --pl-log-bottom: max(16px, calc(env(safe-area-inset-bottom) - 8px));   /* la barra de registro */
  --pl-ui-bottom: calc(var(--pl-log-bottom) + 72px + 32px);              /* fin de la interfaz: la base del cronómetro, 32 sobre la barra */
  --pl-video-h: calc(min(100vw, 480px) * 9 / 16);                        /* alto de un clip ancho (16:9 a todo el ancho) */ }
.c-player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus-x, 50%) 35%; }
/* Clip ancho: completo, 16:9, apoyado justo encima del cronómetro y el coach (72 + 8), así la cola (título, ejercicio,
   descanso, «Next») queda arriba sobre el video borroso y no tapa a Tiago; el calentamiento y la vuelta a la calma traen
   su lista quemada abajo a la izquierda del cuadro, y así tampoco choca con la cola. */
.c-player.is-wide .c-player__video { inset: auto 0 calc(var(--pl-ui-bottom) + 80px) 0; height: auto; aspect-ratio: 16 / 9; object-fit: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
/* Modo ancho: el mismo video en cover, desenfocado, llena arriba y abajo (brillo .45 de la spec); sin el velo plano de .5
   encima, que lo dejaba casi negro: solo los velos de arriba y abajo, para leer la fila superior y la barra de registro. */
.c-player__blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) brightness(.45); transform: scale(1.1); }
.c-player__scrim { position: absolute; inset: 0; background: var(--scrim-player-top), var(--scrim-player-bottom), var(--scrim-player); }
.c-player.is-wide .c-player__scrim { background: var(--scrim-player-top), var(--scrim-player-bottom); }
/* Ficha de EXO sobre la quemada del calentamiento y la vuelta a la calma (en inglés, abajo a la izquierda del cuadro:
   raya roja en x 6.7 %, de y 51 % a 90 %). La caja copia la del clip ancho; la ficha solo se ve (is-on) mientras la
   quemada está en pantalla. Vidrio oscuro opaco para que no se lea el inglés de abajo. */
.c-player__cover { display: none; }
.c-player.is-wide .c-player__cover { display: block; position: absolute; left: 0; right: 0; bottom: calc(var(--pl-ui-bottom) + 80px); aspect-ratio: 16 / 9; pointer-events: none; }
.c-pl-card { position: absolute; left: 5.2%; top: 48.5%; width: 40%; height: 44%; box-sizing: border-box; padding: 6px 10px 6px 12px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden;
  background: rgba(10, 10, 10, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; color: var(--text-1);
  opacity: 0; transform: translateX(-6px); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.c-pl-card.is-on { opacity: 1; transform: none; }
/* «Saltar calentamiento ›»: pastilla de vidrio sobre la esquina de abajo a la derecha del clip ancho (como «Saltar
   intro»). Sin is-on se desvanece y no se puede tocar; queda el ⏭ junto al título. */
.c-pl-skip { position: absolute; right: 12px; bottom: calc(var(--pl-ui-bottom) + 80px + 12px); z-index: 2; height: 40px; padding: 0 12px 0 16px;
  display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-full); font: 600 15px/20px var(--font-text); color: var(--text-1);
  background: rgba(20, 20, 20, .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease-out); }
.c-pl-skip.is-on { opacity: 1; pointer-events: auto; }
.c-player:not(.is-wide) .c-pl-skip { bottom: calc(var(--pl-ui-bottom) + 12px); }
.c-player.is-paused .c-pl-skip { opacity: 0; pointer-events: none; }
.c-pl-card__label { font: 700 9px/12px var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-pl-card__name { font: 800 15px/18px var(--font-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-pl-card__dose { font: 600 12px/16px var(--font-text); color: rgba(255, 255, 255, .78); }
@media (prefers-reduced-motion: reduce) { .c-pl-card { transition: none; transform: none; } }
.c-player__ui { position: relative; min-height: 100dvh; display: flex; flex-direction: column; padding-top: calc(env(safe-area-inset-top) + 8px); padding-bottom: var(--pl-ui-bottom); }
.c-pl-top { position: relative; z-index: 6; height: 44px; margin: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.c-pl-top__right { display: flex; gap: 8px; }
.c-pain-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-tint); box-shadow: inset 0 0 0 1px rgba(255,106,0,.5); color: var(--orange); }
.c-pl-notice { min-height: 36px; margin-top: 12px; padding: 2px 8px 2px 16px; display: flex; align-items: center; gap: 8px; background: rgba(38,38,38,.9); font: 400 14px/18px var(--font-text); }
.c-pl-notice span { flex: 1; } .c-pl-notice b { font-weight: 600; } .c-pl-notice button { display: grid; place-items: center; width: 32px; height: 32px; }   /* 2 + 32 + 2 = 36 */
.c-pl-segs { display: flex; gap: 8px; margin: 12px 20px 0; height: 9px; align-items: center; }
.c-pl-notice + .c-pl-segs { margin-top: 4px; }
.c-pl-seg { position: relative; height: 3px; border-radius: var(--r-full); background: rgba(255,255,255,.18); }
.c-pl-seg.is-done { background: var(--white); }
.c-pl-seg.is-current { background: linear-gradient(90deg, var(--white) var(--at), rgba(255,255,255,.18) var(--at)); }
.c-pl-seg i { position: absolute; top: 50%; left: var(--at); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--red); }
.c-pl-title { display: flex; align-items: center; gap: 12px; margin: 40px 16px 0 24px; }
.c-pl-title h2 { flex: 1; margin: 0; hyphens: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }   /* hasta 2 líneas */
.c-pl-title h2.is-long { font-size: 24px; line-height: 28px; }   /* no cabía en 2 líneas de title-1 (player-runtime.js fitTitle) */
.c-pl-title .c-circle:active { background: var(--white); color: var(--black); }
.c-pl-chip { align-self: flex-start; margin: 8px 0 0 24px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); display: inline-flex; align-items: center; background: rgba(32,32,32,.85); font: 400 15px/1 var(--font-text); }
.c-pl-queue { list-style: none; margin: 12px 0 0; padding: 0; flex: 1; overflow-y: auto; }
/* Con clip ancho, la cola deja libre el video (salvo su borde desvanecido); en pantallas bajas cede hasta tapar su mitad
   de arriba, para que quepan el ejercicio, su descanso y «Next». */
.c-player.is-wide .c-pl-queue { margin-bottom: clamp(0px, 100dvh - 640px, var(--pl-video-h) * .88); }
.c-pl-queue li { position: relative; height: 60px; padding: 0 16px 0 24px; display: flex; flex-direction: column; justify-content: center; transition: background var(--d-base) var(--ease-out); }
.c-pl-queue li.is-active { background: linear-gradient(90deg, var(--red-tint) 0%, var(--red-tint-2) 60%, transparent 100%); }
.c-pl-queue li.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--red); }
.c-pl-queue li.is-next { opacity: .6; }
.c-pl-queue__l1 { font: 500 17px/22px var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .c-pl-queue__l1 b { font-weight: 600; }   /* una línea: la fila mide 60 */
.c-pl-queue__l2 { display: flex; align-items: center; justify-content: space-between; font: 400 15px/20px var(--font-text); color: var(--text-2); }
.c-pl-dots { display: flex; gap: 4px; } .c-pl-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray); }
.c-pl-dots i.is-done { background: var(--white); } .c-pl-dots i.is-current { background: var(--red); }
.c-pl-bottom { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; margin-top: 8px; }
.c-pl-timer { display: flex; align-items: center; gap: 8px; }
.c-pl-adj { width: 36px; height: 36px; border-radius: 50%; background: rgba(28,28,28,.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); font: 700 13px/1 var(--font-text); color: var(--white); }
.c-coach { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.c-coach img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: 55% 30%; box-shadow: 0 0 0 2px var(--black); background: var(--s-2); }
.c-coach__ticks { position: absolute; inset: 0; }
.c-coach__ticks i { position: absolute; left: 50%; top: 50%; width: 3px; height: var(--len, 2px); margin-left: -1.5px; border-radius: 2px; background: var(--red); opacity: var(--o, 1); transform: rotate(var(--a)) translateY(-33px); transform-origin: 50% 0; }
.c-coach.is-silent .c-coach__ticks i { width: 2px; height: 2px; margin-left: -1px; transform: rotate(var(--a)) translateY(-35px); }
.c-log { position: absolute; z-index: 6; left: 24px; right: 24px; bottom: var(--pl-log-bottom); height: 72px; border-radius: 24px; display: flex; align-items: center; gap: 4px; padding: 0 12px 0 16px;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--white); }
.c-log__open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; }
.c-log__txt { display: flex; flex-direction: column; min-width: 0; }
.c-log__txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-log__k { font: 500 13px/16px var(--font-text); color: var(--text-3); }
/* «Last time 5 · Aim 6» / «First time…» (7.3): tercera línea en gris, en una sola línea con «…» si no cabe */
@media (max-width: 385px) { .c-log__txt b { font-size: 15px; } }   /* 375 (SE/mini): la meta cabe junto a − cifra + ✓ */
.c-log__follow { display: inline-flex; align-items: center; gap: 8px; } .c-log__follow .i { color: var(--red); }
.c-swipe { display: inline-flex; flex-direction: column; line-height: 0; }
.c-swipe .i { margin-top: -5px; } .c-swipe .i:nth-child(1) { opacity: 1; margin-top: 0; } .c-swipe .i:nth-child(2) { opacity: .6; } .c-swipe .i:nth-child(3) { opacity: .3; }
.c-log__right { display: flex; align-items: center; gap: 4px; }
.c-log__step { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--s-3); color: var(--white); }
.c-log__value { min-width: 44px; text-align: center; }
.c-log__go { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--white); }
.c-log__left { color: var(--text-3); }

/* Reproductor en marcha (pasos 5 y 6): videos que entran con fundido, descanso al 60 %, entrada del 40 % al 100 %,
   corte a negro antes del cierre, coach con monograma, casillas del descanso, latido de los últimos 3 s, indicación de
   Tiago y aviso de deshacer */
.c-player { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.c-player__video, .c-player__blur { opacity: 0; transition: opacity 250ms var(--ease-out), filter var(--d-base) var(--ease-out); }
.c-player__video.is-in, .c-player__blur.is-in { opacity: 1; }
.c-player.is-dim .c-player__video { filter: brightness(.6); }
.c-player.is-entering .c-player__ui { animation: c-pl-enter 1s var(--ease-out) both; }
@keyframes c-pl-enter { from { opacity: .4; } }
.c-player.is-cut::after { content: ""; position: absolute; inset: 0; z-index: 20; background: var(--black); }
.c-coach__mono { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--gray); box-shadow: 0 0 0 2px var(--black); color: var(--white); font-size: 30px; line-height: 1; padding-right: 2px; }
.c-pl-tiles { display: inline-flex; }
/* Casillas del descanso más grandes que las de 3.22 (27 × 40): el descanso conserva el peso del cronómetro y caben con
   −15 / +15 y el coach en 375 */
.c-pl-tiles .c-count__tile { width: 32px; height: 48px; font-size: 40px; background: var(--s-2); box-shadow: none; }
.c-pl-tiles .c-count__sep { height: 48px; font-size: 40px; }
.c-pl-tiles .c-count__label { font-size: 13px; line-height: 16px; }
.c-pl-timer .is-beat { animation: c-beat 600ms var(--ease-out); transform-origin: left center; }
@keyframes c-beat { 30% { transform: scale(1.06); } }
.c-pl-notice--pain { padding-left: 12px; color: var(--pain); box-shadow: inset 0 0 0 1px var(--pain-tint); }   /* memoria del dolor (7.3) */
.c-pl-notice--pain > .i { flex: 0 0 auto; }
.c-pl-notice--pain span { color: var(--text-1); padding: 7px 0; }
.c-pl-notice--pain button { color: var(--text-2); width: 44px; height: 44px; margin: -4px -6px; }   /* 44 de toque (manos sudadas) sin cambiar el alto visible */
@media (prefers-reduced-motion: no-preference) { .c-pl-notice--pain { animation: c-pop-in var(--d-base) var(--ease-out) both; transform-origin: top center; } }
.c-pl-notice .c-pl-notice__msg { flex: 1; width: auto; height: auto; display: flex; align-items: center; gap: 8px; text-align: left; }
/* Indicación de Tiago: encima de la cola (absoluta en un soporte de alto 0: no la mueve), una frase de hasta 3 líneas */
.c-pl-cuewrap { position: relative; z-index: 4; height: 0; }
.c-pl-cue { position: absolute; left: 24px; right: 24px; top: 12px; padding: 10px 13px; border-radius: 18px; display: flex; align-items: flex-start; gap: 10px; text-align: left;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge); color: var(--white); font: 400 15px/20px var(--font-text);
  animation: c-pop-in var(--d-base) var(--ease-out) both; transform-origin: top left; }
.c-pl-cue b { font-weight: 600; }
.c-pl-cue > span:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.c-pl-cue__s { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--gray); font: italic 900 16px/1 var(--font-display); font-stretch: 62%; }
/* «Skipped · Undo»: abajo, 8 sobre la barra de registro (no tapa el aviso, la barra segmentada ni el título) */
.c-pl-toast { position: absolute; z-index: 7; left: 24px; right: 24px; bottom: calc(var(--pl-log-bottom) + 72px + 8px); height: 44px; padding: 0 6px 0 16px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: space-between; background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px var(--line-3); font: 400 15px/20px var(--font-text); }
.c-player:has(.c-pl-toast) .c-pl-bottom { opacity: .2; transition: opacity var(--d-base) var(--ease-out); }   /* el aviso se lee limpio sobre el cronómetro esos 4 s */
.c-pl-toast button { height: 36px; padding: 0 12px; font: 600 15px/1 var(--font-text); color: var(--red-ink); }
@media (prefers-reduced-motion: reduce) {
  .c-player.is-entering .c-player__ui { animation-duration: 150ms; }
  .c-pl-cue { animation: none; }
}

/* 3.16 Pausa */
.c-pause { position: absolute; inset: 0; z-index: 5; background: var(--scrim-pause); color: var(--white); }
.c-pause__center { position: absolute; left: 0; right: 0; top: 40%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.c-pause__center b { font: 800 30px/1 var(--font-text); }
.c-pause__center > span { font: 400 17px/1 var(--font-text); }
.c-pause__play { width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; background: rgba(70,70,70,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); color: var(--white); }
.c-pause__play .i { fill: currentColor; margin-left: 4px; }
.c-pause__hint { position: absolute; top: 40%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }   /* a la altura del play: el gesto se lee de lado */
.c-pause__hint b { font: 700 15px/1 var(--font-text); letter-spacing: .04em; text-transform: uppercase; }
.c-pause__hint > span { display: flex; align-items: center; gap: 6px; font: 400 15px/1 var(--font-text); }
.c-pause__hint.is-prev { left: 16px; } .c-pause__hint.is-next { right: 16px; align-items: flex-end; }
.c-pause__hint.is-next .c-pause__arrows { transform: scaleX(-1); order: -1; }
.c-pause__arrows i { font-style: normal; font-weight: 700; }
.c-pause__replay { position: absolute; left: 16px; bottom: calc(var(--pl-log-bottom) + 72px + 16px + 47px + 44px + 24px); display: flex; align-items: center; gap: 10px; }
.c-pause__replay > span { display: flex; flex-direction: column; } .c-pause__replay b { font: 600 17px/22px var(--font-text); } .c-pause__replay .c-ink { font: 400 15px/20px var(--font-text); }
.c-pause__actions { position: absolute; left: 24px; right: 24px; bottom: calc(var(--pl-log-bottom) + 72px + 16px); display: grid; gap: 4px; }
/* En pausa, lo de abajo se apaga entero (texto, rojos, puntos, rayitas y foto del coach): solo se leen la pausa y sus botones */
.c-player.is-paused .c-pl-queue, .c-player.is-paused .c-pl-title, .c-player.is-paused .c-pl-chip, .c-player.is-paused .c-pl-timer,
.c-player.is-paused .c-pl-queue .c-ink { color: var(--line-3); }
.c-player.is-paused .c-pl-queue li.is-active { background: none; }
.c-player.is-paused .c-pl-queue li.is-active::before, .c-player.is-paused .c-pl-dots i { background: var(--line-3); }
.c-player.is-paused .c-pl-segs, .c-player.is-paused .c-coach, .c-player.is-paused .c-pl-title .c-circle,
.c-player.is-paused .c-pl-tiles, .c-player.is-paused .c-pl-adj { opacity: .25; }   /* también las casillas y −15/+15 del descanso */
/* …y más al fondo: cola, título, chip y cronómetro casi desaparecen, el clip se oscurece y la ficha de EXO del
   calentamiento se esconde, para que «En pausa» y sus botones no compitan con nada (revisión final, detalle 5). */
.c-player.is-paused .c-pl-queue, .c-player.is-paused .c-pl-title, .c-player.is-paused .c-pl-chip, .c-player.is-paused .c-pl-timer { opacity: .35; }
.c-player.is-paused .c-player__video { filter: brightness(.4); }
.c-player.is-paused .c-pl-card { filter: brightness(.4); }   /* sigue tapando la quemada, oscura y sin texto */
.c-player.is-paused .c-pl-card > * { visibility: hidden; }

/* 3.17 Hoja de registro */
.c-logsheet { position: relative; border-radius: 27px 27px 0 0; background: var(--s-2); color: var(--text-1); padding: 18px 16px 96px; }
.c-logsheet__head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.c-logsheet__head b { flex: 1; font: 600 20px/25px var(--font-text); }
.c-logsheet__head .c-ink { font: 600 15px/20px var(--font-text); }
.c-logsheet__body { display: grid; gap: 16px; }
.c-logsheet__body h4 { margin: 8px 0 0; }
.c-logx { display: grid; gap: 12px; }
.c-logx.is-current { background: var(--s-4); border-radius: 19px; padding: 20px; }
.c-logx__head { display: flex; align-items: center; gap: 12px; }
.c-logx__thumb { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; background: var(--s-2); }
.c-logx__last { justify-self: start; height: 35px; padding: 0 12px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 6px; background: var(--line-3); color: var(--text-meta); font: 500 15px/1 var(--font-text); }
.c-logt { width: 100%; border-collapse: separate; border-spacing: 0 8px; table-layout: fixed; }   /* columnas fijas: la misma rejilla en cada ejercicio y en los dos idiomas */
.c-logt th:nth-child(1) { width: 56px; } .c-logt th:nth-child(2) { width: 60px; } .c-logt th:nth-child(3) { width: 80px; }
.c-logt th { font: 400 15px/20px var(--font-text); color: var(--text-3); text-align: left; }
.c-logt td { padding: 0; }
.c-logt__n { width: 27px; height: 27px; border-radius: 50%; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--text-1); font: 400 14px/1 var(--font-text); }
.c-logt__cell { width: 64px; height: 40px; border-radius: 8px; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--s-5); font-size: 22px; }
.c-logt__goal { display: inline-block; min-width: 40px; color: var(--text-3); }   /* la meta es referencia, no se edita: sin caja */
input.c-logt__cell { padding: 0; border: 0; background: transparent; color: var(--text-1); text-align: center; -moz-appearance: textfield; appearance: textfield; }
input.c-logt__cell::-webkit-inner-spin-button, input.c-logt__cell::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input.c-logt__cell:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--red); }
.c-logx__note { margin-left: auto; font: 500 13px/16px var(--font-text); color: var(--text-3); }
.c-logsheet__notice { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px 8px 10px 12px; border-radius: var(--r-lg); background: var(--orange-tint); font: 400 15px/20px var(--font-text); }
.c-logsheet__notice > span { flex: 1; }
.c-logsheet__notice .i { color: var(--orange); }
.c-logsheet__notice button { height: 36px; padding: 0 12px; border-radius: var(--r-full); font: 600 15px/1 var(--font-text); color: var(--orange); }
.c-logsheet__foot { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px; }
.c-logsheet__foot > span { flex: 1; display: flex; flex-direction: column; align-items: center; font: 600 15px/20px var(--font-text); color: var(--text-meta); }
.c-logsheet__foot .c-ink { font-weight: 400; }
.c-logsheet__foot .c-circle { width: 40px; height: 40px; }

/* 3.18 Anillo de progreso */
.c-ring { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; }
.c-ring > svg { grid-row: 1; }
.c-ring svg { display: block; }
.c-ring__arc { animation: c-ring-fill var(--d-slow) var(--ease-out) both; }
@keyframes c-ring-fill { from { stroke-dashoffset: var(--c); } }
/* Anillo en rayitas (minutos, repeticiones comprobadas): las encendidas entran una tras otra */
.c-ring__tick { animation: c-tick-in 240ms var(--ease-out) calc(var(--i) * 8ms) both; }
@keyframes c-tick-in { from { opacity: 0; } }
.c-ring__center { position: absolute; top: 0; left: 0; right: 0; height: var(--size); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-1); }
.c-ring--74 .c-ring__center { font: italic 900 26px/26px var(--font-display); font-stretch: 62%; }
.c-ring__label { display: block; margin-top: 6px; text-align: center; font: 400 15px/20px var(--font-text); color: var(--text-3); grid-row: 2; }
.c-ring--180 .c-ring__center small { font: 400 13px/16px var(--font-text); color: var(--text-3); }

/* 3.19 Estadísticas */
.c-stats { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 12px; margin: 0; padding: 0 16px; }
/* dt va antes en el HTML (lo pide <dl>) y se dibuja debajo; flex-end en column-reverse ancla el valor ARRIBA, así los valores
   de una fila quedan en línea aunque una etiqueta baje a 2 líneas */
.c-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-height: 52px; }
.c-stats dt { color: var(--text-3); } .c-stats dd { margin: 0; color: var(--text-1); }
.c-stats .c-stats__extra { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }

/* 3.20 Calendario */
.c-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; }
.c-cal__head h3 { margin: 0; }
.c-cal__month { display: flex; align-items: center; gap: 4px; font: 500 17px/22px var(--font-text); color: var(--text-1); }
.c-cal__month button { width: 36px; height: 36px; display: grid; place-items: center; }
.c-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 40px; margin: 12px 16px 0; }
.c-cal__day { justify-self: center; align-self: center; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 400 18px/1 var(--font-text); color: var(--text-1); }
.c-cal__day.is-out { color: var(--text-4); }
.c-cal__day.is-complete { background: var(--red-tint); box-shadow: inset 0 0 0 1.5px var(--red); font-weight: 700; }
.c-cal__day.is-partial { outline: 1.5px dashed var(--soft); outline-offset: -1.5px; }
.c-cal__day.is-logged { box-shadow: inset 0 0 0 1.5px var(--soft); }   /* completa sin cumplir todo: el rojo es solo para «todo cumplido» */
.c-cal__day.is-today { background: var(--s-3); color: var(--red-ink); font-weight: 700; }

/* 3.21 Cuadrícula del bloque */
.c-block { border-radius: var(--r-xl); background: var(--s-1); border: 1px solid var(--line-2); overflow: hidden; color: var(--text-1); padding-bottom: 24px; }
/* Con candado: el módulo y la rejilla vacíos y apagados, del mismo alto que las demás tarjetas del carrusel */
.c-block.is-locked .c-block__module, .c-block.is-locked > .c-block__grid { opacity: .4; }
.c-block__hero { position: relative; height: 210px; padding: 16px; background: var(--glow-red-inset), var(--grad-graphite); display: flex; flex-direction: column; }
.c-block__hero h3 { margin: auto 0; text-align: center; }
.c-block__range b { display: block; font: 700 17px/22px var(--font-text); }
.c-block__range small { font: 400 12px/16px var(--font-text); color: var(--text-meta); }
.c-block .c-pill { align-self: flex-start; }
.c-block__module { margin: 16px; min-height: 98px; padding: 16px; border-radius: var(--r-lg); background: var(--s-3); display: flex; align-items: center; gap: 16px; }
.c-block__module > div { flex: 1; display: grid; gap: 6px; }
.c-block__module b { font: 700 17px/22px var(--font-text); }
.c-block__module p { margin: 0; font: 400 15px/20px var(--font-text); color: var(--text-2); }
.c-bar { display: block; height: 4px; border-radius: var(--r-full); background: var(--s-5); overflow: hidden; }
.c-bar i { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.c-block__grid { display: grid; grid-template-columns: 28px repeat(6, 33px); gap: 8px; justify-content: center; align-items: center; margin: 8px 16px 0; }
.c-block__col, .c-block__cycle { font: 400 15px/1 var(--font-text); color: var(--text-2); text-align: center; }
.c-block__cycle { font-size: 14px; text-align: left; } .c-block__cycle.is-deload { color: var(--orange); }
.c-block__cell { position: relative; width: 33px; height: 33px; border-radius: var(--r-sm); display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.04), transparent), var(--s-3); color: var(--text-1); }
.c-block__cell.is-done { background: var(--red); } /* is-logged: contó sin cumplir todo, rojo sin palomita */ .c-block__cell.is-partial { background: var(--red-tint); }
.c-block__cell.is-next { box-shadow: inset 0 0 0 1.5px var(--text-1); }
.c-block__cell.is-deload::after { content: ""; position: absolute; top: 3px; right: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.c-block__foot { display: flex; justify-content: center; margin-top: 24px; }
.c-block.is-footless { padding-bottom: 20px; }
/* Celda nueva (cierre, 4.9): entra con 300 ms */
.c-block__cell.is-fresh { animation: c-cell-in 300ms var(--ease-out) var(--d-slow) both; }
@keyframes c-cell-in { from { opacity: 0; transform: scale(.6); } }
/* Versión compacta de Hoy: cabecera de 120 y módulo, sin rejilla ni nota; toda la tarjeta es un botón a Progreso */
.c-block--compact { display: block; width: 100%; text-align: left; padding-bottom: 0; transition: transform var(--d-press) var(--ease-out); }
.c-block--compact:active { transform: scale(.98); }
.c-block--compact .c-block__hero { height: 120px; }
.c-block--compact .c-block__hero h3 { margin: auto 0 2px; text-align: left; font-size: 34px; line-height: 36px; }
.c-block--compact .c-block__range small { display: none; }

/* 3.22 Casillas de cuenta regresiva */
.c-count { display: inline-flex; align-items: flex-start; }
.c-count__group { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.c-count__pair { display: flex; gap: 4px; }
.c-count__sep { height: 40px; margin: 0 6px; display: grid; place-items: center; font-size: 34px; line-height: 1; color: var(--white); }
.c-count__tile { position: relative; width: 27px; height: 40px; border-radius: var(--r-xs); background: var(--s-3); box-shadow: inset 0 0 0 1px var(--line-3); display: grid; place-items: center; font-size: 34px; line-height: 1; color: var(--text-1); }
.c-count__tile::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.6); }
.c-count__label { color: var(--red-ink); }
.c-count__tile.is-flip::before { content: attr(data-old); position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; border-radius: inherit; background: inherit; box-shadow: inherit;
  clip-path: inset(0 0 50% 0); transform-origin: 50% 50%; animation: c-flap 180ms var(--ease-in) both; }
@keyframes c-flap { to { transform: perspective(160px) rotateX(-90deg); } }
@media (prefers-reduced-motion: reduce) { .c-count__tile.is-flip::before { animation: c-fade-out 150ms both; } }
@keyframes c-fade-out { to { opacity: 0; } }

/* 3.23 Lista de verificación */
.c-checks { list-style: none; margin: 0; padding: 0; display: grid; text-align: left; }
.c-checks li { min-height: 29px; display: flex; align-items: center; gap: 10px; font: 400 16px/21px var(--font-text); color: var(--text-1); }
.c-checks .i { color: var(--red); } .c-checks b { font-weight: 700; }

/* 3.24 Chat (Santi) */
.c-chat { position: relative; background: var(--bg-0); color: var(--text-1); }   /* su contenedor lleva data-theme="dark" */
.c-chat__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; height: 62px; padding: 8px 16px; }
.c-chat__head > .c-circle { position: absolute; left: 16px; top: 9px; }
/* Cápsula centrada (~220 × 46, spec 3.24); nunca toca la X: deja 60 px a cada lado. El subtítulo va en una línea. */
.c-chat__who { height: 46px; max-width: calc(100% - 120px); min-width: 0; padding: 0 16px 0 6px; border-radius: var(--r-full); display: flex; align-items: center; gap: 8px; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge); }
.c-chat__who-txt { display: flex; flex-direction: column; min-width: 0; } .c-chat__who b { font: 700 16px/20px var(--font-text); }
.c-chat__who .c-ink { font: 400 13px/16px var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-santi-av { width: var(--size); height: var(--size); border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--red); color: var(--white); font: 900 calc(var(--size) * .45)/1 var(--font-display); font-stretch: 125%; }
.c-chat__list { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px 16px; }
.c-chat__legal { margin: 0 0 12px; color: var(--text-3); text-align: center; text-wrap: pretty; text-wrap: balance; }
.c-chat__day { align-self: center; height: 26px; padding: 0 12px; margin: 12px 0; border-radius: var(--r-full); display: inline-flex; align-items: center; background: var(--s-0); box-shadow: inset 0 0 0 1px var(--line-2); font: 400 15px/1 var(--font-text); }
.c-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.c-msg p { margin: 0; padding: 10px 13px; border-radius: 18px; background: var(--s-2); }
.c-msg--santi p { border-bottom-left-radius: 4px; }
.c-msg__gap { width: 28px; flex: 0 0 auto; }
.c-msg__about { display: block; margin-bottom: 4px; font: 600 13px/16px var(--font-text); color: var(--red-ink); }   /* «About: Strict Pull-Up» */
.c-msg--me { align-self: flex-end; } .c-msg--me p { background: var(--gray); border-bottom-right-radius: 4px; }
.c-msg.is-last + .c-msg { margin-top: 12px; }
.c-chat__pain { margin: 8px 16px; padding: 16px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--orange); display: grid; gap: 12px; }
.c-chat__pain p { margin: 0; }
.c-compose { display: grid; gap: 8px; padding: 8px 0 16px; }
.c-compose__bar { display: flex; align-items: center; gap: 8px; margin: 0 16px; height: 41px; padding: 0 4px 0 16px; border-radius: var(--r-full); background: var(--s-0); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-compose__bar input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text-1); font: 400 17px/1 var(--font-text); outline: none; }
.c-compose__bar input::placeholder { color: var(--text-3); }
.c-compose__send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--white); }
.c-compose:has(input:placeholder-shown) .c-compose__send { opacity: .45; }
.c-msg__busy { display: grid; place-items: center; min-width: 56px; min-height: 44px; }
/* 4.11 Hoja de Santi: el encabezado flota sobre la conversación (sin barra), la lista corre por debajo y el compositor
   queda abajo, arriba del teclado (--kb, app.js con visualViewport). */
.c-sheet--chat { bottom: var(--kb, 0px); overflow: hidden; }
.c-sheet--chat .c-chat__head { position: absolute; top: 2px; left: 0; right: 0; }
.c-sheet--chat .c-sheet__body { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.c-sheet--chat .c-chat__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 64px;
  mask-image: linear-gradient(180deg, transparent 0, #000 64px); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px); }
.c-sheet--chat .c-chat__pain { margin: 12px 0 0 36px; }
/* 7.3 Santi que actúa: tarjeta de acción debajo de su pregunta (portada pequeña, texto y dos botones) y la tarjeta del día
   en pequeño con START. Usada o vieja: apagada. El aviso «Moved · Undo» va 5 s sobre el compositor
   (sin animación: la hoja se vuelve a dibujar con cada toque y la repetiría). */
.c-chat__act, .c-chat__next { margin: 8px 0 0 36px; max-width: min(320px, calc(100% - 36px)); display: grid; gap: 12px; }
.c-chat__act { padding: 12px; border-radius: var(--r-lg); background: var(--s-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-chat__act-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-chat__act-img { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: var(--s-2); }
.c-chat__act-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-chat__act-txt b { font: 600 17px/22px var(--font-text); overflow-wrap: anywhere; } .c-chat__act-txt .t-subhead { color: var(--text-3); }
.c-chat__act-btns { display: grid; grid-template-columns: 1fr; gap: 8px; }   /* siempre apilados: «Move to Wednesday» entero a 375 */
.c-chat__act-btns .c-btn { width: auto; min-width: 0; height: 44px; padding: 0 14px; font-size: 14px; }
.c-chat__act-btns .c-btn span { overflow: hidden; text-overflow: ellipsis; }
.c-chat__next .c-card { width: 100%; aspect-ratio: 4 / 3; }
.c-chat__next .c-card__title { font-size: 22px !important; }
.c-chat__next > .c-btn--primary { height: 47px; font-size: 15px; }
.c-chat__act.is-used, .c-chat__next.is-used { opacity: .6; }
.c-chat__next.is-used .c-card { pointer-events: none; }
.c-chat__toast { position: relative; z-index: 3; margin: 0 16px; height: 48px; padding: 0 6px 0 16px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px var(--line-3); font: 400 15px/20px var(--font-text); }
.c-chat__toast > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-chat__toast button { flex: 0 0 auto; height: 44px; padding: 0 12px; font: 600 15px/1 var(--font-text); color: var(--red-ink); }
.c-sheet--chat .c-compose { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.c-sheet--chat .c-compose__sug { mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }

/* 3.25 Opción de pregunta */
.c-option { width: calc(100% - 40px); margin: 0 20px; min-height: 68px; padding: 12px 16px; border-radius: 15px; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--s-2); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--text-1); hyphens: none; transition: transform var(--d-press) var(--ease-out); }
.c-option:active { transform: scale(.98); }
.c-option > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.c-option b { font: 600 17px/22px var(--font-text); } .c-option .t-subhead { color: var(--text-3); }
.c-option__mark { width: 27px; height: 27px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.c-option.is-on .c-option__mark { background: var(--red); box-shadow: none; color: var(--white); }
.c-step { width: 224px; height: 6px; margin: 0 auto; border-radius: 3px; background: var(--s-5); overflow: hidden; }
.c-step i { display: block; height: 100%; background: var(--red); border-radius: inherit; transition: width var(--d-base) var(--ease-out); }

/* 4.2 y 4.13 Días de entreno: 7 círculos de 40 con la inicial; elegido en tinte rojo con borde rojo */
.c-days { display: flex; justify-content: space-between; gap: 6px; }
.c-days__day { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--s-2); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--text-3); font: 600 15px/1 var(--font-text); transition: transform var(--d-press) var(--ease-out), background var(--d-fast); }
.c-days__day.is-on { background: var(--red-tint); box-shadow: inset 0 0 0 1.5px var(--red); color: var(--text-1); }
.c-days__day:active { transform: scale(.94); }

/* 3.26 Sello de sesión: plano, sin metal ni giro; rayitas una vez solo si se cumplió todo */
.c-seal { position: relative; width: 180px; height: 180px; border-radius: 50%; background: var(--s-1); display: grid; place-items: center; }
.c-seal > .c-ring { position: absolute; inset: 0; }
.c-seal .c-ring svg { width: 180px; height: 180px; transform: scale(.74); }
.c-seal__edge { position: absolute; inset: 0; width: 180px; height: 180px; }
.c-seal__edge text { font: 700 9px var(--font-text); letter-spacing: .3em; fill: var(--text-3); }
.c-seal__n { display: block; line-height: 1; }
.c-seal.is-met .c-ring__arc { animation-name: c-seal-fill; }
.c-seal.is-met .c-seal__n { animation: c-seal-pulse 320ms var(--ease-out) var(--d-slow) both; }
@keyframes c-seal-fill { from { stroke-dashoffset: calc(var(--c) * (1 - var(--from) / 100)); } }
@keyframes c-seal-pulse { 50% { transform: scale(1.08); } }
.c-seal__ticks { position: absolute; inset: 0; pointer-events: none; }
.c-seal__ticks i { position: absolute; left: 50%; top: 50%; width: 2px; height: 10px; margin-left: -1px; background: var(--red); border-radius: 1px; transform: rotate(var(--a)) translateY(-78px); transform-origin: 50% 0; opacity: 0; animation: c-seal-ray 700ms var(--ease-out) var(--d-slow) both; }
/* Antes de salir (mientras el arco se llena) las rayitas no se ven: aparecen en el anillo, viajan hacia afuera y se apagan */
@keyframes c-seal-ray { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-70px); } 12% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-104px); } }
/* Quieto: sin cumplir (gris) nunca se mueve; cumplido y ya visto (se vuelve a abrir o se redibuja), el estado final */
.c-seal:not(.is-met):not(.c-seal--64) .c-ring__arc, .c-seal.is-still .c-ring__arc, .c-seal.is-still .c-seal__n { animation: none; }
.c-seal--64 { width: 64px; height: 64px; background: none; }
.c-seal--64 .c-ring svg { transform: none; width: 64px; height: 64px; }
.c-seal--64 .t-num-s-it { font-size: 22px; }

/* Movimiento reducido: fundidos cortos, sin rebote, sin rayitas */
@media (prefers-reduced-motion: reduce) {
  .c-sheet, .c-pop { animation: c-appear 150ms both; opacity: 0; }
  .c-seal__ticks { display: none; }
  .c-tabbar__lens.is-moving { animation: c-appear 150ms both; opacity: 0; }
  .c-seal.is-met .c-seal__n { animation: none; }
  .c-ring__tick, .c-block__cell.is-fresh { animation: none; }
  .c-chip:active, .c-card:active, .c-option:active, .c-days__day:active, .c-btn:active, .c-block--compact:active { transform: none; }
}

/* La misma hoja que se vuelve a dibujar (app.js): ni entra otra vez ni parpadea, con o sin movimiento reducido */
.c-sheet.is-still, .c-scrim.is-still { animation: none !important; opacity: 1 !important; }

/* 7.3 Tarjeta de prueba 9:16 (screens/close.js shareCardSheet): la vista previa a 0.3 (324 × 576) de la PNG de 1080 × 1920,
   el segmentado y los dos botones. En un teléfono bajo o acostado, la vista previa se achica (sin perder el 9:16) y los
   controles van a su lado. */
.c-sheet--share .c-sheet__body { padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px); }
.shc { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* El tamaño sale del alto (aspect-ratio manda el ancho): en un iPhone bajo se achica entera, sin recortar el pie ni las cifras. */
.shc__preview { margin: 0; height: min(var(--h), calc(100dvh - env(safe-area-inset-top) - 300px)); width: auto; max-width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-0); box-shadow: inset 0 0 0 1px var(--line-4); display: grid; place-items: center; }
.shc__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shc__ph { display: grid; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--text-3); }
.shc__ph.is-error { color: var(--text-2); }
.shc__seg { width: 100%; max-width: 324px; }
.shc__actions { width: 100%; max-width: 324px; display: grid; gap: 8px; }
.shc__actions .c-btn { width: 100%; }
.shc__note { margin: 0; color: var(--text-3); text-align: center; }
@media (orientation: landscape) and (max-height: 520px) {
  .shc { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
  .shc__preview { width: auto; height: calc(100dvh - env(safe-area-inset-top) - 120px); max-height: none; }
  .shc__seg, .shc__actions, .shc__note { max-width: 280px; }
}

/* 7.3 Medidor del siguiente escalón: casillas de 3.22 en pequeño; las comprobadas, rellenas en rojo. Quieto. */
.c-rungbox { display: flex; flex-wrap: wrap; gap: 4px; }
.c-rungbox i { width: 16px; height: 22px; border-radius: var(--r-xs); background: var(--s-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.c-rungbox i.is-on { background: var(--red); box-shadow: none; }
.c-nextrung { display: grid; gap: 6px; }
.c-nextrung p { margin: 0; }
.c-nextrung__txt { color: var(--text-2); }
.c-nextrung__when { color: var(--red-ink); }
.c-nextrung.is-declared { color: var(--text-3); }
.c-nextrung.is-top { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.c-nextrung.is-top .i { color: var(--red-ink); }
/* 7.3 Carrusel de rutas de habilidad en Progreso: tarjetas tipográficas más bajas que las de Hoy, con asomo */
.c-carousel--skill { padding-inline: 16px; scroll-padding-inline: 16px; }
/* Todas a la altura de la más alta (las de checkpoint de 2 líneas): anillos y sellos a la misma altura. */
.c-carousel--skill .c-carousel__item { display: flex; }
.c-carousel--skill .c-card--skill { height: auto; align-self: stretch; }
