/* ==========================================================================
   Benayas Coach — hoja de estilos
   Sistema de diseño propio: tokens (claro/oscuro), base, layout, componentes
   y módulos de cada pantalla. Sin dependencias externas.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef5;
  --border: #e2e5ee;
  --border-strong: #cbd0dd;
  --text: #12141c;
  --text-2: #454b5e;
  /* El gris más claro del texto: ≥ 4,5:1 también sobre --bg, --surface-2, --surface-3 y --brand-soft (cabeceras de
     tabla, migas, fechas, «Pronto»…) */
  --text-3: #656b88;

  /* Marca: rojo guante y negro, los del logotipo «AB» (icons.js) y de la propuesta «Benayas · Coach Fight».
     --brand es el rojo de enlaces, iconos, bordes y selecciones; --brand-fill, el de los fondos con texto blanco
     (botones, burbujas, días elegidos). En claro coinciden; en oscuro el de texto se aclara hasta 4,5:1 y el de
     fondo sigue oscuro para que el blanco se lea (≥ 4,5:1). --brand-soft no es rosa sino el negro de la marca muy
     rebajado: así lo destacado no se confunde con los avisos de error, que también son rojos (--bad). */
  --brand: #d31921;
  --brand-hover: #b3151c;
  --brand-fill: #d31921;
  --brand-ink: #ffffff;
  --brand-soft: #eeeef1;
  --brand-soft-ink: #18181a;
  --brand-deep: #7b1018;
  --ink: #18181a;
  --ink-fg: #ffffff;
  --corner: var(--brand);
  --accent: #ff4d55;
  --accent-ink: #18181a;

  /* Estados. --bad-fill es el rojo de aviso de los rellenos con texto blanco (contadores, campana, «Eliminar»), que
     llega a 4,5:1; --bad se queda para bordes, iconos y marcas sin texto */
  --ok: #12a150;   --ok-soft: #e4f6ec;   --ok-ink: #0b6b35;
  --warn: #e09b00; --warn-soft: #fff4d6; --warn-ink: #7a5300;
  --bad: #e5484d;  --bad-soft: #fdecec;  --bad-ink: #a4161a;  --bad-fill: #d63a3f;
  --info: #2a78d6; --info-soft: #e6f0fc; --info-ink: #174a8a;
  /* Rosa: reels guardados (Contenido › Competidores) y cabecera de la ayuda en vídeo */
  --pink: #e0409a;   --pink-soft: #fde6f1;   --pink-ink: #9b1c5a;

  /* Gráficas (paleta categórica validada, orden fijo) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --chart-surface: #ffffff;
  --chart-grid: #e6e5df;
  --chart-axis: #c3c2b7;
  --chart-muted: #898781;
  --status-good: #0ca30c; --status-warning: #fab219; --status-serious: #ec835a; --status-critical: #d03b3b;

  --shadow-sm: 0 1px 2px rgba(18, 20, 28, .06);
  --shadow: 0 1px 2px rgba(18, 20, 28, .05), 0 6px 18px rgba(18, 20, 28, .06);
  --shadow-lg: 0 10px 40px rgba(18, 20, 28, .16);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  /* Foco en negro (no en rojo, que se leería como un error): con el teclado, anillo de 3:1 sobre blanco; en los
     campos, el borde pasa a tinta y el halo es suave */
  --focus-ring: 0 0 0 3px rgba(24, 24, 26, .5);
  --focus-border: #18181a;
  --focus-halo: 0 0 0 3px rgba(24, 24, 26, .14);
  --sidebar-w: 252px;
  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0d12; --surface: #151720; --surface-2: #1b1e29; --surface-3: #232736;
    --border: #2a2e3d; --border-strong: #3b4053;
    --text: #eceef6; --text-2: #b4b9cc; --text-3: #8d93aa;
    --brand: #ff5c63; --brand-hover: #e11b23; --brand-fill: #d31921; --brand-soft: #2b2c33; --brand-soft-ink: #f2f2f5;
    --ink: #e6e6ea; --ink-fg: #141416;
    --ok-soft: #0f2e1d; --ok-ink: #63d892; --warn-soft: #33270a; --warn-ink: #f5c451;
    --bad-soft: #3a1416; --bad-ink: #ff8f92; --bad-fill: #d63a3f; --info-soft: #0f2640; --info-ink: #8fbff6;
    --pink: #f06bb3; --pink-soft: #3a1428; --pink-ink: #ff9ccf;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --chart-surface: #151720; --chart-grid: #2a2d38; --chart-axis: #3b3e4a; --chart-muted: #8d93aa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    --focus-ring: 0 0 0 3px rgba(255, 255, 255, .5);
    --focus-border: #eceef6;
    --focus-halo: 0 0 0 3px rgba(255, 255, 255, .16);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0d12; --surface: #151720; --surface-2: #1b1e29; --surface-3: #232736;
  --border: #2a2e3d; --border-strong: #3b4053;
  --text: #eceef6; --text-2: #b4b9cc; --text-3: #8d93aa;
  --brand: #ff5c63; --brand-hover: #e11b23; --brand-fill: #d31921; --brand-soft: #2b2c33; --brand-soft-ink: #f2f2f5;
  --ink: #e6e6ea; --ink-fg: #141416;
  --ok-soft: #0f2e1d; --ok-ink: #63d892; --warn-soft: #33270a; --warn-ink: #f5c451;
  --bad-soft: #3a1416; --bad-ink: #ff8f92; --bad-fill: #d63a3f; --info-soft: #0f2640; --info-ink: #8fbff6;
  --pink: #f06bb3; --pink-soft: #3a1428; --pink-ink: #ff9ccf;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --chart-surface: #151720; --chart-grid: #2a2d38; --chart-axis: #3b3e4a; --chart-muted: #8d93aa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --focus-ring: 0 0 0 3px rgba(255, 255, 255, .5);
  --focus-border: #eceef6;
  --focus-halo: 0 0 0 3px rgba(255, 255, 255, .16);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
svg.ic { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
.noscript { padding: 24px; text-align: center; font-weight: 600; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: .85rem; }
.xsmall { font-size: .75rem; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-4 .stat { padding: 12px 14px; }
  .grid-4 .stat .stat-value { font-size: 1.35rem; }
  .grid-4 .stat .stat-icon { width: 30px; height: 30px; border-radius: 9px; top: 10px; right: 10px; }
  .grid-4 .stat .stat-icon svg { width: 16px; height: 16px; }
  .grid-4 .stat:has(.stat-icon) .stat-label, .grid-4 .stat:has(.stat-icon) .stat-value { padding-right: 34px; }
}
/* Las rejillas de maquetación nunca empujan la página: sus columnas pueden encoger por debajo de su contenido
   (tablas con scroll propio, selects largos, rutas sin espacios) en vez de desbordar la pantalla del móvil. */
.grid > *, .split > *, .stack > *, .contact-grid > *, .quiz-result > *, .book-grid > *, .about-grid > *, .roles > *,
.intake-grid > *, .session-box > *, .pl-hero > *, .rv-grid > *, .help-player > *, .anat-grid > * { min-width: 0; }
.row.nowrap > h2, .row.nowrap > h3, .row.nowrap > h4 { min-width: 0; overflow-wrap: anywhere; }
/* El título heredaba white-space: nowrap de .nowrap y no se partía (overflow-wrap no actúa con nowrap): su ancho mínimo
   era el de la línea entera y ensanchaba la tarjeta o el panel. Sin especificidad, para que los títulos que se recortan
   con «…» a propósito (.mt-period) sigan en una línea */
:where(.row.nowrap) > :where(h2, h3, h4) { white-space: normal; }
code { overflow-wrap: anywhere; }
.hidden { display: none !important; }
.only-mobile { display: none; }
@media (max-width: 760px) { .only-desktop { display: none !important; } .only-mobile { display: block; } }
.m-list { display: grid; gap: 10px; padding: 12px; }
.m-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
.m-card .client-cell { min-width: 0; color: var(--text); }
.m-card .client-cell:hover { text-decoration: none; }

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface-3); color: var(--text); font-weight: 600; font-size: .92rem;
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; background: var(--border); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand-fill); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--bad-fill); color: #fff; }
.btn-danger:hover { background: #b92f34; }
.btn-soft-danger { background: var(--bad-soft); color: var(--bad-ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-soft-ink); }
.btn-soft:hover { background: var(--brand-soft); filter: brightness(.97); }
/* Botón negro (el otro color de la marca): sobre las bandas rojas de la portada */
.btn-accent { background: #18181a; color: #fff; }
.btn-accent:hover { background: #000; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-icon.btn-sm { width: 32px; } /* antes del bloque táctil, que lo agranda (misma especificidad: gana el último) */
/* En pantallas táctiles, los botones pequeños y las casillas crecen hasta un tamaño cómodo para el dedo, y los de abrir y
   cerrar el menú, cambiar el tema, salir y la campana llegan a 44 px sin encogerse junto a un nombre largo */
@media (pointer: coarse) {
  .btn-sm { min-height: 38px; }
  .btn-icon.btn-sm { width: 38px; }
  .sidebar .sb-head .menu-btn, .sidebar .sb-foot .btn-icon, .topbar .btn-icon { width: 44px; min-height: 44px; flex: none; }
  .sidebar .sb-foot .btn-icon + .btn-icon { margin-left: -10px; } /* juntos (los iconos siguen separados): más sitio para el nombre */
  .check input[type="checkbox"], .check input[type="radio"] { width: 22px; height: 22px; flex: none; }
}
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
/* Los botones de solo icono no se encogen en una fila flex: junto a un título o un subtítulo largo («Cerrar» de los
   modales, ⓘ de las rutinas genéricas, flechas de la semana…) se quedaban en 18-27 px y el icono, aplastado */
.btn-icon { width: 40px; padding: 0; flex-shrink: 0; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 4. Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--bad-ink); margin-left: 2px; }
.field .hint { font-size: .78rem; color: var(--text-3); }
.check + .hint { display: block; font-size: .78rem; color: var(--text-3); margin-top: 4px; }
.field .error { font-size: .8rem; color: var(--bad-ink); }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus-border); box-shadow: var(--focus-halo); }
.input[readonly] { background: var(--surface-2); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.input-sm { min-height: 32px; padding: 4px 8px; border-radius: 8px; font-size: .88rem; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.input-sm { padding-right: 26px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 44px; }
.input-group .input-addon { position: absolute; right: 4px; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; line-height: 1.4; }
.check input[type="checkbox"], .check input[type="radio"] { margin-top: 2px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; flex: none; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] { width: 40px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus-ring); }
.switch input:disabled + .track { opacity: .6; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-grid > .col-12 { grid-column: span 12; } .form-grid > .col-8 { grid-column: span 8; }
.form-grid > .col-6 { grid-column: span 6; } .form-grid > .col-4 { grid-column: span 4; } .form-grid > .col-3 { grid-column: span 3; }
@media (max-width: 760px) { .form-grid > .col-8, .form-grid > .col-6, .form-grid > .col-4 { grid-column: span 12; } .form-grid > .col-3 { grid-column: span 6; } }
.pw-meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pw-meter > span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s, background .2s; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--text-2); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented button[aria-pressed="true"]:focus-visible { box-shadow: var(--focus-ring), var(--shadow-sm); } /* su sombra tapaba el anillo de foco */
/* Escala del 1 al 10 en una sola fila que ocupa el ancho disponible (también en el móvil) */
.scale-pick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; max-width: 520px; }
.scale-pick button { min-width: 0; height: 42px; padding: 0; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: .95rem; cursor: pointer; }
@media (max-width: 380px) { .scale-pick { gap: 3px; } .scale-pick button { border-radius: 8px; font-size: .88rem; } }
.scale-pick button:hover { border-color: var(--brand); }
.scale-pick button[aria-pressed="true"] { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }

/* ---------- 5. Tarjetas, insignias, tablas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .card-pad, .card-body { padding: 16px; } .card-head { padding: 14px 16px; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.section-title h2, .section-title h3 { margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: .76rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.6;
}
.badge svg { width: 13px; height: 13px; }
.badge-brand { background: var(--ink); color: var(--ink-fg); } /* negra (clara en oscuro): no se confunde con .badge-bad */
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge-bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge-info { background: var(--info-soft); color: var(--info-ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-3); }
.dot-ok { background: var(--status-good); } .dot-warn { background: var(--status-warning); } .dot-serious { background: var(--status-serious); } .dot-bad { background: var(--status-critical); } .dot-info { background: var(--info); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-soft-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact th, .table.compact td { padding: 6px 8px; }
.table .sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.table th.sticky-col { z-index: 3; background: var(--surface-2); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: .9rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }
.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: .6; }
.empty h3 { color: var(--text); }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--info-soft); color: var(--info-ink); font-size: .9rem; align-items: flex-start; }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.callout.warn { background: var(--warn-soft); color: var(--warn-ink); }
.callout.bad { background: var(--bad-soft); color: var(--bad-ink); }
.callout.ok { background: var(--ok-soft); color: var(--ok-ink); }
.callout.brand { background: var(--brand-soft); color: var(--brand-soft-ink); display: flex; font-weight: inherit; font-size: .9rem; letter-spacing: normal; } /* sin heredar el estilo del logotipo (.brand) */
.callout.brand > svg { color: var(--brand); }
.callout p:last-child { margin-bottom: 0; }
.stat { padding: 16px 18px; position: relative; }
/* Icono de las tarjetas de cifras (arriba a la derecha), con tono según el estado */
.stat .stat-icon { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); }
.stat .stat-icon svg { width: 20px; height: 20px; }
.stat.stat-ok .stat-icon { background: var(--ok-soft, #e3f5ea); color: var(--ok-ink, #1b7a46); }
.stat.stat-warn .stat-icon { background: var(--warn-soft, #fff1d6); color: var(--warn-ink, #8a5a00); }
.stat.stat-bad .stat-icon { background: var(--bad-soft, #fbe1e1); color: var(--bad-ink, #a12626); }
.stat.stat-info .stat-icon { background: var(--info-soft); color: var(--info-ink); }
.segmented button svg.ic { width: 15px; height: 15px; vertical-align: -0.18em; margin-right: 2px; }
.stat:has(.stat-icon) .stat-label, .stat:has(.stat-icon) .stat-value { padding-right: 52px; }
.stat .stat-label { font-size: .8rem; color: var(--text-3); font-weight: 600; }
.stat .stat-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.stat .stat-sub { font-size: .8rem; color: var(--text-3); }
.kbd { font-family: var(--mono); font-size: .78rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); }

/* ---------- 6. Pestañas, menús, popovers ---------- */
/* overflow-y: hidden recorta el píxel del subrayado de la activa (margin-bottom: -1px) que, si no, haría desplazable la
   barra en vertical y, con la barra de desplazamiento visible, sacaría otra a la derecha */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
/* Con ratón, si las pestañas no caben se ve una barra de desplazamiento fina: indica que hay más y deja llegar a ellas sin
   rueda horizontal. Con el dedo basta con deslizar, y la pestaña cortada en el borde ya lo indica */
@media (pointer: fine) {
  .tabs { scrollbar-width: thin; scrollbar-color: var(--text-3) transparent; } /* pulgar a más de 3:1 en los dos temas */
  .tabs::-webkit-scrollbar { display: block; height: 6px; }
  .tabs::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 999px; }
}
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: .9rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
/* Activa: texto en tinta y subrayado rojo de esquina, como el menú lateral (el texto rojo se leería como un aviso) */
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--corner); }
/* Anillo de foco por dentro de la pestaña: por fuera lo recortaba la propia barra (overflow) arriba, abajo y en los
   bordes. Esquinas rectas abajo para que el subrayado de la activa siga recto */
.tabs a:focus-visible, .tabs button:focus-visible { box-shadow: inset var(--focus-ring); border-radius: 6px 6px 0 0; }
.tabs svg { width: 16px; height: 16px; }
.menu { position: fixed; z-index: 115; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font-size: .9rem; color: var(--text); cursor: pointer; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); text-decoration: none; }
.menu svg { width: 16px; height: 16px; color: var(--text-3); }
.menu .danger { color: var(--bad-ink); }
.menu hr { margin: 6px 0; }
.popover { position: fixed; z-index: 115; max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: .88rem; white-space: pre-wrap; }

/* ---------- 7. Modales y toasts ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 9, 14, .5); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s ease; border: 1px solid var(--border); }
.modal.wide { width: min(880px, 100%); }
.modal.xwide { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 8px; }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-head p { margin: 4px 0 0; color: var(--text-3); font-size: .9rem; }
.modal-body { padding: 12px 22px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal.wide, .modal.xwide { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; bottom: 84px; } }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: #1b1d27; color: #f2f3f8; box-shadow: var(--shadow-lg); font-size: .9rem; animation: pop .18s ease; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.ok svg { color: #63d892; } .toast.bad svg { color: #ff8f92; } .toast.warn svg { color: #f5c451; } .toast.info svg { color: #8fbff6; }

/* ---------- 8. Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.02em; color: var(--text); text-decoration: none; font-size: 1.08rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
/* La loseta negra del logotipo lleva un filete claro sobre fondos oscuros (tema oscuro y cabecera pública) */
.pub-nav .brand-mark .bm-edge, :root[data-theme="dark"] .brand-mark .bm-edge { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark .bm-edge { display: inline; } }
.brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--text-3); letter-spacing: .02em; margin-top: -2px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: var(--surface-2); }

/* ---------- 9. Páginas públicas ---------- */
/* Cabecera pública: negra como el ring de la portada, con una franja roja arriba (las cuerdas del ring)
   y, bajo el nombre, el guante y a qué se dedica */
.pub-nav { position: sticky; top: 0; z-index: 40; color: #fff; background: rgba(20, 20, 22, .9); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pub-nav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #e5262e; }
.pub-nav .inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.pub-nav .brand { color: #fff; }
.pub-nav .brand small { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.pub-nav .brand small svg { width: 13px; height: 13px; color: var(--accent); flex: none; }
.pub-nav nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.pub-nav nav a.link { color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .9rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
@media (max-width: 1000px) { .pub-nav .brand small { display: none; } }
.pub-nav nav a.link:hover, .pub-nav nav a.link[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); text-decoration: none; }
.pub-nav .btn-ghost { color: #fff; }
.pub-nav .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 820px) { .pub-nav nav a.link { display: none; } }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hero { position: relative; overflow: hidden; background: var(--bg); color: var(--text); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 44px; gap: 32px; } }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -.035em; line-height: 1.04; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.12rem; color: var(--text-2); max-width: 560px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: .8rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 18px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-proof { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: .9rem; font-weight: 600; }
.hero-proof li { display: inline-flex; align-items: center; gap: 6px; }
.hero-proof svg { width: 17px; height: 17px; color: var(--brand); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; }
.hero-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); }
.hero-link:hover { color: var(--brand); text-decoration: none; }
.hero-link svg { width: 18px; height: 18px; color: var(--brand); }

/* Animaciones 3D de la portada (sistema Benayas) */
.hero { perspective: 1200px; }
.hero.fx-shake { animation: fxShake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes fxShake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(3px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-5px, 1px, 0); } 40%, 60% { transform: translate3d(5px, -1px, 0); } }
.fx-enter .fx-line { display: inline-block; opacity: 0; transform-origin: 50% 100%; animation: fxSlam .6s cubic-bezier(.2, .9, .25, 1.15) forwards; }
@keyframes fxSlam {
  0% { opacity: 0; transform: perspective(800px) translateZ(460px) rotateX(-75deg) scale(1.6); filter: blur(8px); }
  65% { opacity: 1; transform: perspective(800px) translateZ(-24px) rotateX(7deg) scale(.97); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}
.fx-ring { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--brand); opacity: .9; pointer-events: none; z-index: 2; animation: fxRing .85s ease-out forwards; }
@keyframes fxRing { to { transform: scale(16); opacity: 0; border-width: 1px; } }
.fx-tilt { transition: transform .35s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; will-change: transform; }
.fx-enter .fx-tilt { animation: fxPhotoIn .9s cubic-bezier(.2, .8, .2, 1) .45s both; }
@keyframes fxPhotoIn { 0% { opacity: 0; transform: perspective(1100px) rotateY(-60deg) translateX(160px) translateZ(-260px); } 100% { opacity: 1; transform: none; } }
.fx-tilt .hero-photo { box-shadow: 0 30px 70px rgba(0, 0, 0, .35), 0 0 0 1px rgba(229, 38, 46, .35), 0 0 60px rgba(229, 38, 46, .18); }
.fx-ready .hero-visual::before { animation: fxGlow 5s ease-in-out infinite; }
@keyframes fxGlow { 0%, 100% { opacity: .14; transform: translate3d(0, 0, 0); } 50% { opacity: .3; transform: translate3d(-6px, 6px, 0); } }
.hero .cta .btn-primary { position: relative; overflow: hidden; }
.hero .cta .btn-primary::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -30%; width: 22%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg) translateX(-120%); animation: fxShine 4.5s ease-in-out infinite 2s; pointer-events: none; }
@keyframes fxShine { 0%, 70% { transform: skewX(-20deg) translateX(-120%); } 100% { transform: skewX(-20deg) translateX(720%); } }
.fx-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; }
.fx-idle { animation: fxIdle 8s ease-in-out infinite; }
@keyframes fxIdle { 0%, 100% { transform: perspective(1100px) rotateY(-7deg) rotateX(3deg) translateZ(0); } 50% { transform: perspective(1100px) rotateY(7deg) rotateX(-3deg) translateZ(14px); } }
.fx-reveal { opacity: 0; transform: perspective(900px) rotateX(22deg) translateY(40px) translateZ(-80px); transition: opacity .6s ease, transform .75s cubic-bezier(.2, .8, .2, 1); will-change: transform, opacity; }
.fx-reveal.fx-in { opacity: 1; transform: none; }
.feature, .step { transition: transform .25s ease, box-shadow .25s ease; }
.feature:hover, .step:hover { transform: perspective(800px) rotateX(5deg) rotateY(-5deg) translateY(-6px); box-shadow: var(--shadow-lg); }
.hero .cta .btn-primary { box-shadow: 0 10px 30px rgba(211, 25, 33, .35); transition: transform .15s ease, box-shadow .15s ease; }
.hero .cta .btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 40px rgba(211, 25, 33, .5); }
.hero .cta .btn-primary:active { transform: translateY(1px) scale(.98); }
.hero-strip span { display: inline-block; transition: transform .6s cubic-bezier(.2, .8, .2, 1), color .3s; }
.hero-strip span:hover { transform: perspective(300px) rotateX(360deg); color: var(--brand); }
@media (prefers-reduced-motion: reduce) {
  .fx-enter .fx-line, .fx-enter .fx-tilt, .fx-idle, .fx-ring, .hero.fx-shake, .fx-ready .hero-visual::before, .hero .cta .btn-primary::after { animation: none !important; }
  .fx-enter .fx-line, .fx-reveal { opacity: 1; transform: none; }
  .fx-tilt, .feature:hover, .step:hover, .hero-strip span:hover { transform: none; }
}
.hero-visual { position: relative; justify-self: center; width: min(420px, 100%); }
.hero-visual::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 30px; background: var(--brand); opacity: .14; }
.hero-photo { position: relative; margin: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-3); aspect-ratio: 4 / 5; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: 55% 0 0 0; background: linear-gradient(180deg, transparent, rgba(18, 18, 20, .9)); pointer-events: none; }
.hero-photo figcaption { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; display: grid; gap: 2px; color: #fff; }
.hero-photo figcaption b { font-size: 1.15rem; letter-spacing: -.01em; }
.hero-photo figcaption > span { color: rgba(255, 255, 255, .82); font-size: .85rem; }
.cred-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cred-chips i { font-style: normal; font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--brand-fill); color: #fff; }
.hero-photo.placeholder { display: grid; place-items: center; background: var(--brand-soft); }
.hero-photo .mono { font-size: clamp(4.5rem, 12vw, 7rem); font-weight: 850; letter-spacing: -.06em; color: var(--brand); margin-bottom: 34%; }
.photo-hint { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; color: #fff; }
.photo-hint svg { width: 14px; height: 14px; }
.hero-strip { position: relative; z-index: 1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.hero-strip .container { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 14px 20px; }
.hero-strip span { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .76rem; color: var(--text-3); }
@media (max-width: 560px) { .hero-visual { width: 82%; } .hero-strip span { font-size: .7rem; } }
/* Portada v4: el ring de fondo (oscurecido) y el retrato del gimnasio delante, texto en blanco */
.hero-v4 { color: #fff; background: #121214 url('../img/hero-ring.jpg') center 32% / cover no-repeat; }
.hero-v4::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(16, 16, 18, .94) 0%, rgba(16, 16, 18, .86) 32%, rgba(16, 16, 18, .5) 52%, rgba(16, 16, 18, .3) 66%, rgba(16, 16, 18, .45) 84%, rgba(16, 16, 18, .8) 100%); }
/* En pantallas anchas el texto y el retrato se separan para que el boxeador del fondo quede entre ambos */
.hero-v4 > .container { max-width: 1440px; grid-template-columns: 1.1fr .9fr; }
.hero-v4 h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero-v4 h1 em { color: var(--accent); }
.hero-v4 p.lead { color: rgba(255, 255, 255, .84); }
.hero-v4 .hero-proof { color: rgba(255, 255, 255, .86); }
.hero-v4 .hero-proof svg { color: var(--accent); }
.hero-v4 .btn-secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.hero-v4 .btn-secondary:hover { background: rgba(255, 255, 255, .2); }
.hero-v4 .hero-links { margin-top: 22px; gap: 10px 12px; }
.hero-v4 .hero-link { padding: 9px 16px 9px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-size: .95rem; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.hero-v4 .hero-link:hover { background: rgba(211, 25, 33, .55); border-color: rgba(255, 92, 99, .6); color: #fff; transform: translateY(-1px); }
.hero-v4 .hero-link svg { color: #ff8a8f; width: 20px; height: 20px; }
.hero-v4 .hero-visual { position: relative; width: min(520px, 100%); justify-self: end; align-self: end; margin-bottom: -64px; }
/* Sombra oscura detrás del retrato: separa las dos fotos en vez de mezclarlas */
.hero-v4 .hero-visual::before { display: block; content: ""; position: absolute; inset: -12% -30% -10% -42%; border-radius: 0; opacity: 1; z-index: 0; background: radial-gradient(ellipse 62% 60% at 58% 52%, rgba(16, 16, 18, .92) 0%, rgba(16, 16, 18, .8) 38%, rgba(16, 16, 18, .4) 62%, transparent 78%); pointer-events: none; }
.hero-v4 .hero-photo { position: relative; z-index: 1; border-radius: 0; box-shadow: none; background: transparent; aspect-ratio: 2 / 3; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 20%), linear-gradient(180deg, transparent 0%, #000 10%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 20%), linear-gradient(180deg, transparent 0%, #000 10%); mask-composite: intersect; }
.hero-v4 .hero-photo img { object-position: center top; }
/* Retrato recortado sin fondo: solo la figura sobre el ring, con sombra */
.hero-v4 .hero-photo.cutout { -webkit-mask-image: none; mask-image: none; overflow: visible; }
.hero-v4 .hero-photo.cutout img { object-fit: contain; object-position: center bottom; filter: drop-shadow(0 26px 44px rgba(0, 0, 0, .6)) drop-shadow(0 0 2px rgba(0, 0, 0, .35)); }
.hero-v4 .hero-photo.cutout::after { display: none; }
.hero-v4 .hero-photo::after { inset: 70% 0 0 0; background: linear-gradient(180deg, transparent, rgba(16, 16, 18, .75)); }
.hero-v4 .hero-photo figcaption { left: 34%; right: 12px; bottom: 82px; padding: 10px 14px; border-radius: 14px; background: rgba(16, 16, 18, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.hero-v4 .hero-photo figcaption b { font-size: 1.02rem; }
.hero-v4 .hero-photo figcaption > span { font-size: .78rem; }
.hero-v4 .hero-photo.placeholder { background: rgba(255, 255, 255, .08); -webkit-mask-image: none; mask-image: none; border-radius: 28px; }
.hero-v4 .hero-strip { position: relative; z-index: 1; background: #141416; border-color: rgba(255, 255, 255, .08); }
.hero-v4 .hero-strip span { color: rgba(255, 255, 255, .62); }
.hero-v4 .hero-strip span:hover { color: #ff8a8f; }
.hero-v4 .fx-ring { border-color: var(--accent); }
@media (max-width: 960px) {
  .hero-v4 { background-image: url('../img/hero-ring-m.jpg'); background-position: 62% 18%; }
  .hero-v4::before { background: linear-gradient(180deg, rgba(16, 16, 18, .9) 0%, rgba(16, 16, 18, .82) 52%, rgba(16, 16, 18, .45) 100%); }
  .hero-v4 > .container { grid-template-columns: 1fr; }
  .hero-v4 .hero-visual { justify-self: center; width: min(360px, 78%); margin-bottom: -44px; }
  .hero-v4 .hero-visual::before { inset: -8% -25% -6% -25%; }
  .hero-v4 .hero-photo { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%); mask-image: linear-gradient(180deg, transparent 0%, #000 12%); -webkit-mask-composite: initial; mask-composite: initial; }
  .hero-v4 .hero-photo figcaption { left: 12px; bottom: 60px; }
}
.cta-band .cta-white { background: #fff; color: #18181a; }
.cta-band .cta-white:hover { background: #f1f1f3; }
.cta-band .cta-ghost { background: rgba(255, 255, 255, .14); color: #fff; }

/* Portada: sobre mí */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.about-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.03em; margin: 6px 0 14px; }
.about-bio { font-size: 1.06rem; color: var(--text-2); max-width: 620px; }
.about-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.about-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.about-list svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 3px; }
.cred-card { border-radius: 22px; padding: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.cred-card h3 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; }
.cred-card h3 svg { width: 20px; height: 20px; color: var(--brand); }
.cred-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); color: var(--text-2); font-size: .92rem; }
.cred-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cred-item b { flex: none; min-width: 58px; text-align: center; font-size: .78rem; letter-spacing: .06em; padding: 5px 9px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-soft-ink); display: inline-grid; place-items: center; }
.cred-item b svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

.section { padding: 76px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head .kicker { color: var(--brand); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.03em; margin: 8px 0 12px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 16px; counter-reset: step; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 22px 18px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-fill); color: #fff; font-weight: 750; display: grid; place-items: center; font-size: .9rem; box-shadow: 0 6px 16px rgba(211, 25, 33, .3); }
.step h3 { font-size: 1rem; margin-top: 6px; }
.step p { color: var(--text-2); font-size: .9rem; margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .features, .features.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features, .features.cols-4 { grid-template-columns: 1fr; } }
.feature { padding: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg); }
.section.alt .feature { background: var(--surface-2); }
.feature .ficon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ficon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.02rem; }
.feature p { color: var(--text-2); font-size: .92rem; margin: 0; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }
.role-card { padding: 28px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); }
.role-card.dark { background: #18181a; color: #f2f2f4; border-color: #2c2c30; }
.role-card.dark p, .role-card.dark li { color: #c9c9cf; }
.role-card ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.role-card li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--text-2); }
.role-card li svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 2px; }
.role-card.dark li svg { color: var(--accent); }
.role-card.dark .badge-brand { background: #e5262e; color: #fff; }
.security-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .security-grid { grid-template-columns: 1fr; } }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--text-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); padding-bottom: 6px; }
.cta-band { border-radius: 26px; padding: 44px; background: linear-gradient(120deg, #d31921, #a3121a 55%, #7b1018); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.7rem; letter-spacing: -.02em; }
.cta-band p { color: #fff; margin: 0; }
.pub-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; margin-top: 40px; font-size: .88rem; color: var(--text-3); }
.pub-footer .inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.pub-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.pub-footer a, .pub-footer button.linklike { color: var(--text-2); }
button.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--brand); }
button.linklike:hover { text-decoration: underline; }

/* Acceso / autenticación */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px 56px; }
.auth-card { width: min(460px, 100%); padding: 30px; }
.auth-card.wide { width: min(620px, 100%); }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-3); margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--text-3); }
.recovery-code { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .06em; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); text-align: center; word-break: break-all; user-select: all; }

/* Legales */
.legal { max-width: 860px; margin: 0 auto; padding: 40px 20px 60px; }
.legal h1 { margin-bottom: 4px; }
.legal .updated { color: var(--text-3); font-size: .9rem; margin-bottom: 28px; }
.legal h2 { margin-top: 32px; font-size: 1.2rem; }
.legal h3 { margin-top: 20px; }
.legal p, .legal li { color: var(--text-2); }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .9rem; }
/* (1.22) break-word y no anywhere: el ancho de cada columna respeta su palabra más larga; con anywhere, en el
   ordenador la primera y la última se estrechaban hasta partir palabras («Formula|rios», «navegad|or») */
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.legal th { background: var(--surface-2); }
.legal .placeholder { background: var(--warn-soft); color: var(--warn-ink); padding: 0 4px; border-radius: 4px; }
@media (max-width: 640px) { .legal table { display: block; overflow-x: auto; } .legal th, .legal td { min-width: 110px; } .pub-nav .brand span { font-size: .95rem; line-height: 1.15; } }

/* Banner de cookies */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; max-width: 980px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 18px 20px; display: flex; gap: 18px; align-items: center; animation: pop .2s ease; }
.cookie-banner .ck-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); display: grid; place-items: center; flex: none; }
.cookie-banner .ck-icon svg { width: 22px; height: 22px; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--text-2); }
.cookie-banner .ck-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
@media (max-width: 760px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-banner .ck-icon { display: none; } .cookie-banner .ck-actions .btn { flex: 1; } }
.ck-cat { padding: 14px; border-radius: 14px; border: 1px solid var(--border); display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; }
.ck-cat + .ck-cat { margin-top: 10px; }
.ck-cat p { margin: 4px 0 0; font-size: .86rem; color: var(--text-3); }

/* ---------- 10. Shell de la aplicación ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 60; transition: transform .2s ease; }
.sidebar .sb-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); min-height: var(--topbar-h); }
.sidebar nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.sidebar .sb-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; padding: 14px 10px 6px; }
.sidebar nav { --tone: var(--brand); --tone-soft: var(--brand-soft); --tone-ink: var(--brand-soft-ink); }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 8px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.sidebar nav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.sidebar nav a[aria-current="page"] { background: var(--tone-soft); color: var(--tone-ink); }
.sidebar nav a svg { width: 19px; height: 19px; flex: none; }
/* Icono de cada entrada del menú. Desde la 1.21 (glifos propios, sin distintivos de color) lo redefine la sección
   «Menús con glifos propios» del final de esta hoja */
.sidebar nav a .nav-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--tone-soft); color: var(--tone-ink); transition: transform .15s ease, background .15s ease, color .15s ease; }
.sidebar nav a .nav-ic svg { width: 18px; height: 18px; }
.sidebar nav a:hover .nav-ic { transform: translateY(-1px) scale(1.04); }
.sidebar nav a[aria-current="page"] .nav-ic { background: var(--tone); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tone) 38%, transparent); }
.sidebar nav a .count { margin-left: auto; font-size: .74rem; background: var(--surface-3); color: var(--text-3); padding: 0 7px; border-radius: 999px; }
.sidebar .sb-foot { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar .sb-user { min-width: 0; flex: 1; }
.sidebar .sb-user b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .sb-user span { font-size: .76rem; color: var(--text-3); }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; min-height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 8px 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar .tb-title { min-width: 0; flex: 1; }
.topbar .tb-title h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs { font-size: .78rem; color: var(--text-3); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.topbar .crumbs a { color: var(--text-3); }
.topbar .tb-actions { display: flex; align-items: center; gap: 8px; }
.save-state { font-size: .78rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state svg { width: 15px; height: 15px; }
.save-state.saving { color: var(--warn-ink); }
.save-state.saved { color: var(--ok-ink); }
.content { padding: 24px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; }
.menu-btn { display: none; }
.sb-overlay { display: none; }
.preview-bar { background: var(--warn-soft); color: var(--warn-ink); padding: 8px 24px; font-size: .86rem; display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.bottom-nav { display: none; }
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .sb-overlay { display: block; position: fixed; inset: 0; background: rgba(8, 9, 14, .45); z-index: 55; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 8px 14px; }
  .content { padding: 16px; }
}
@media (max-width: 760px) {
  .shell.role-client .bottom-nav {
    /* tantas columnas iguales como accesos haya (cinco; seis si la nutrición vuelve a abrirse) */
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 650; color: var(--text-3); padding: 4px 0; text-decoration: none; }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .shell.role-client .content { padding-bottom: 92px; }
  .save-state .lbl { display: none; }
}
/* Al recorrer la pantalla con el teclado (o al buscar en la página), lo que queda bajo la cabecera fija (también la de la
   firma del contrato, que va sin menú) y, en el móvil del cliente, bajo la barra inferior no cuenta como visible: el
   navegador desplaza la página para que no tapen el foco */
html:has(.shell), html:has(.ct-top) { scroll-padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 8px); }
@media (max-width: 760px) { html:has(.shell.role-client) { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }

/* Pantalla de bloqueo / carga */
.splash { min-height: 100vh; display: grid; place-items: center; color: var(--text-3); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 11. Gestión de clientes ---------- */
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.client-cell b { display: block; }
/* Los nombres de la lista, en tinta: en rojo parecerían una alerta (el rojo de marca es también el de los avisos) */
a.client-cell { color: var(--text); }
a.client-cell:hover { text-decoration: none; }
a.client-cell:hover b { color: var(--brand); text-decoration: underline; }
.client-cell span { font-size: .78rem; color: var(--text-3); }
.wk-chips { display: flex; gap: 3px; flex-wrap: nowrap; }
.wk-chip { min-width: 26px; height: 24px; padding: 0 5px; border-radius: 6px; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--text-3); font-variant-numeric: tabular-nums; }
.wk-chip.done { background: var(--ok-soft); color: var(--ok-ink); }
.wk-chip.current { background: var(--text-2); color: var(--surface); }
.wk-chip.last { background: var(--bad-fill); color: #fff; }
.wk-chip.future { background: var(--surface-2); color: var(--text-3); border: 1px dashed var(--border-strong); }

/* ---------- 12. Editor de programación ---------- */
.week-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav .select { min-width: 210px; font-weight: 650; }
.week-dates { font-size: .85rem; color: var(--text-3); }
.metrics-panel { margin-top: 16px; }
.mtable { width: 100%; border-collapse: collapse; font-size: .86rem; }
.mtable th { padding: 8px 10px; text-align: left; background: var(--surface-2); font-size: .78rem; color: var(--text-2); border-bottom: 1px solid var(--border); }
.mtable th .select { min-height: 30px; font-size: .8rem; padding: 2px 26px 2px 8px; font-weight: 650; background-color: var(--surface); }
.mtable td { padding: 5px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mtable tr:last-child td { border-bottom: 0; }
.mcell { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; }
.mcell .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lbar { height: 8px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 0; }
.lbar.zero { background: transparent; }
.days { display: grid; gap: 14px; margin-top: 16px; }
.day-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.day-card.drop-target { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.day-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.day-head .day-name { font-weight: 750; font-size: 1rem; min-width: 96px; display: flex; align-items: center; gap: 8px; }
.day-head .day-date { font-size: .78rem; color: var(--text-3); font-weight: 600; }
.day-head .counts { font-size: .78rem; color: var(--text-3); display: inline-flex; gap: 10px; }
.day-head .spacer { flex: 1; }
.int-badge { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--text-3); flex: none; }
.int-alta { background: var(--bad-fill); } .int-media { background: var(--warn); } .int-baja { background: var(--ok); }
.select.int-sel-alta { background-color: var(--bad-soft); color: var(--bad-ink); border-color: transparent; font-weight: 700; }
.select.int-sel-media { background-color: var(--warn-soft); color: var(--warn-ink); border-color: transparent; font-weight: 700; }
.select.int-sel-baja { background-color: var(--ok-soft); color: var(--ok-ink); border-color: transparent; font-weight: 700; }
.day-body { padding: 12px 14px 16px; }
.day-body.collapsed { display: none; }
.sec-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--text-3); margin: 6px 0 8px; display: flex; align-items: center; gap: 8px; }
.wu-row { display: grid; grid-template-columns: 22px minmax(180px, 1.1fr) minmax(160px, 1.4fr) 34px; gap: 8px; align-items: center; padding: 4px 0; }
.ex-row { display: grid; grid-template-columns: 22px minmax(190px, 1.55fr) 34px 54px 34px minmax(150px, 1fr) minmax(320px, 1.75fr) minmax(170px, .85fr) 34px; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px dashed var(--border); }
.ex-row:first-of-type { border-top: 0; }
.ex-row.dragging, .wu-row.dragging { opacity: .45; }
.ex-row.drag-over, .wu-row.drag-over { box-shadow: inset 0 2px 0 var(--brand); }
.ex-head { display: grid; grid-template-columns: 22px minmax(190px, 1.55fr) 34px 54px 34px minmax(150px, 1fr) minmax(320px, 1.75fr) minmax(170px, .85fr) 34px; gap: 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 750; padding: 0 0 4px; }
.ex-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grip { cursor: grab; color: var(--text-3); display: grid; place-items: center; height: 32px; }
.grip svg { width: 16px; height: 16px; }
.cell-c { display: grid; place-items: center; height: 32px; }
.ex-row .textarea { min-height: 32px; height: 32px; padding: 5px 8px; font-size: .84rem; border-radius: 8px; }
.ex-row .textarea:focus { height: 72px; }
.lines { display: grid; gap: 4px; }
.line { display: grid; grid-template-columns: 46px 64px 1fr 1fr 1.15fr 26px; gap: 4px; align-items: center; }
.line-head { display: grid; grid-template-columns: 46px 64px 1fr 1fr 1.15fr 26px; gap: 4px; font-size: .66rem; color: var(--text-3); font-weight: 750; text-transform: uppercase; }
.line .input-sm, .line .select { min-height: 30px; padding: 3px 6px; font-size: .84rem; text-align: center; }
.line .select { padding-right: 20px; text-align: left; background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%; }
.ex-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: .78rem; text-align: center; background: var(--surface-2); border-radius: 10px; padding: 4px; }
.ex-metrics .mk { color: var(--text-3); font-size: .64rem; font-weight: 750; }
.ex-metrics .mv { font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.ex-metrics .mv.multi { font-size: .72rem; }
.ex-metrics.off { opacity: .55; }
.add-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ex-unknown { color: var(--warn-ink); }
.bi-1 { box-shadow: inset 3px 0 0 var(--series-1); } .bi-2 { box-shadow: inset 3px 0 0 var(--series-2); } .bi-3 { box-shadow: inset 3px 0 0 var(--series-3); }
.bi-4 { box-shadow: inset 3px 0 0 var(--series-4); } .bi-5 { box-shadow: inset 3px 0 0 var(--series-5); } .bi-6 { box-shadow: inset 3px 0 0 var(--series-7); }
.bi-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 750; padding: 1px 7px; border-radius: 999px; color: #fff; }
.bi-tag.b1 { background: var(--series-1); } .bi-tag.b2 { background: var(--series-2); } .bi-tag.b3 { background: var(--series-3); }
.bi-tag.b4 { background: var(--series-4); } .bi-tag.b5 { background: var(--series-5); } .bi-tag.b6 { background: var(--series-7); }
/* Fila compacta (con «Opciones») mientras no quepa la rejilla de escritorio: sus columnas piden 1072 px, más 330 de menú
   lateral, márgenes y tarjeta del día (1402) y hasta 17 de la barra de desplazamiento de Windows. Acababa en 1280 y, de
   1281 a 1418 px, el botón ⋮ «Opciones del ejercicio» quedaba fuera de la tarjeta. Con el mismo corte, más abajo, la
   etiqueta y la altura de las notas para el cliente */
@media (max-width: 1420px) {
  .ex-head { display: none; }
  .ex-row { grid-template-columns: 22px 1fr 1fr; grid-template-areas: "g name name" "g opts opts" "g notes notes" "g lines lines" "g mets mets"; padding: 12px 0; }
  .ex-row > .grip { grid-area: g; }
  .ex-row > .c-name { grid-area: name; }
  .ex-row > .c-opts { grid-area: opts; }
  .ex-row > .c-notes { grid-area: notes; }
  .ex-row > .c-lines { grid-area: lines; }
  .ex-row > .c-mets { grid-area: mets; }
  .ex-row > .c-rec, .ex-row > .c-bi, .ex-row > .c-met, .ex-row > .c-del { display: none; }
  .ex-row .textarea, .ex-row .textarea:focus { height: auto; min-height: 56px; }
}
@media (min-width: 1421px) { .ex-row > .c-opts { display: none; } }
.c-opts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .84rem; }
.c-opts .select { width: auto; min-width: 74px; }
@media (max-width: 700px) {
  .wu-row { grid-template-columns: 22px 1fr 34px; grid-template-areas: "g n d" "g p p"; }
  .wu-row > .grip { grid-area: g; } .wu-row > .c-wn { grid-area: n; } .wu-row > .c-wp { grid-area: p; } .wu-row > .c-wd { grid-area: d; }
  .line, .line-head { grid-template-columns: 38px 58px 1fr 1fr 1fr 24px; }
}
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 70; display: flex; flex-direction: column; animation: slidein .18s ease; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.side-panel .sp-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-panel .sp-body { padding: 14px 18px; overflow-y: auto; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.tpl-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface-2); cursor: grab; }
.tpl-card:hover { border-color: var(--brand); }
.tpl-card h4 { margin: 0 0 4px; font-size: .92rem; }
.tpl-card .meta { font-size: .78rem; color: var(--text-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.week-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 700px) { .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.week-grid button { height: 38px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: .84rem; cursor: pointer; position: relative; font-variant-numeric: tabular-nums; }
.week-grid button.has-data::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brand); }
.week-grid button.is-hidden { opacity: .45; text-decoration: line-through; }
.week-grid button[aria-pressed="true"] { background: var(--brand-fill); color: #fff; border-color: var(--brand-fill); }
.week-grid button.is-current { box-shadow: inset 0 0 0 2px var(--warn); }

/* ---------- 13. Vista del cliente ---------- */
.client-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.client-hero h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.client-hero .dates { color: var(--text-3); font-weight: 600; font-size: .9rem; }
/* 3 px de aire alrededor (compensados con el margen) para el anillo de foco de cada día: la barra (overflow) lo recortaba */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 3px 3px 4px; margin: -3px -3px 14px; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; min-width: 64px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.day-tab b { font-size: .86rem; }
.day-tab small { font-size: .7rem; color: var(--text-3); font-weight: 600; }
.day-tab .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.day-tab .pip.alta { background: var(--bad); } .day-tab .pip.media { background: var(--warn); } .day-tab .pip.baja { background: var(--ok); } .day-tab .pip.on { background: var(--brand); }
.day-tab.done { border-color: var(--ok); }
.day-tab.done .pip { background: var(--ok); }
.day-tab[aria-selected="true"] { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.day-tab[aria-selected="true"] small { color: #fff; } /* el blanco translúcido no llegaba a 4,5:1 sobre el rojo */
.day-tab.rest { opacity: .65; }
.day-tab.today:not([aria-selected="true"]) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.day-tab.today:not([aria-selected="true"]):focus-visible { box-shadow: var(--focus-ring), inset 0 0 0 1px var(--brand); } /* sin tapar el anillo de foco */
.day-tab .pip-ok { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.day-tab .pip-ok svg { width: 11px; height: 11px; stroke-width: 3; }
.day-tab[aria-selected="true"] .pip-ok { background: #fff; color: var(--ok); }
/* En el móvil, los 7 días caben sin deslizar */
@media (max-width: 640px) {
  .day-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; overflow: visible; }
  .day-tab { min-width: 0; padding: 8px 2px; border-radius: 12px; }
  .day-tab b { font-size: .8rem; }
  .day-tab small { font-size: .74rem; }
  .client-hero .row, .client-hero .week-nav { width: 100%; }
  .client-hero .week-nav .select { flex: 1; min-width: 0; }
}
/* Tarjeta plegable (p. ej. «Cambiar contraseña» en Mi cuenta) */
details.card-fold > summary { list-style: none; cursor: pointer; border-bottom: 0; }
details.card-fold > summary::-webkit-details-marker { display: none; }
details.card-fold > summary > svg.ic { transition: transform .15s ease; color: var(--text-3); }
details.card-fold[open] > summary { border-bottom: 1px solid var(--border); }
details.card-fold[open] > summary > svg.ic { transform: rotate(180deg); }
.cw-compare { font-size: .86rem; }
.cw-compare summary { cursor: pointer; color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; list-style: none; padding: 6px 0; }
.cw-compare summary::-webkit-details-marker { display: none; }
.cw-compare summary svg { width: 15px; height: 15px; }
.cw-compare[open] summary { color: var(--brand); }
.cw-compare select { margin-top: 4px; }

/* Tarjeta «Hoy» del cliente: lo primero que ve al abrir la app. Negra y con la esquina roja del ring, como el logotipo */
.cw-hero { position: relative; overflow: hidden; margin-bottom: 18px; padding: 18px 18px 16px; border-radius: 0 22px 22px 22px; color: #fff; background: #18181a; border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 12px 32px rgba(24, 24, 26, .22); display: grid; gap: 14px; }
.cw-hero::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; background: #e5262e; clip-path: polygon(0 0, 100% 0, 0 100%); pointer-events: none; }
.cw-hero::after { content: ""; position: absolute; right: -50px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(229, 38, 46, .3), rgba(229, 38, 46, 0) 70%); pointer-events: none; }
.cw-hero > * { position: relative; z-index: 1; }
.cwh-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .95rem; opacity: .95; }
.cwh-top b { font-weight: 800; }
.cwh-date { font-size: .82rem; font-weight: 600; opacity: .85; }
.cwh-main { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.cwh-txt { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.cwh-k { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ff6b71; }
.cwh-t { font-size: 1.5rem; font-weight: 850; letter-spacing: -.02em; line-height: 1.15; display: inline-flex; align-items: center; gap: 8px; }
.cwh-t svg { width: 24px; height: 24px; }
.cwh-s { font-size: .9rem; opacity: .9; }
.cwh-btn { background: #fff; color: #c3171f; border: 0; font-weight: 800; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.cwh-btn:hover { background: #f1f1f3; color: #c3171f; }
.cwh-btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .35); }
.cwh-btn.ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }
/* La tarjeta «Hoy» es negra en los dos temas: anillo de foco claro y, en el botón, sumado a su sombra (si no, la sombra lo
   sustituye). Después de .cwh-btn.ghost, que tiene la misma especificidad */
.cw-hero :focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .75); }
.cw-hero .cwh-btn:not(.ghost):focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .75), 0 6px 16px rgba(0, 0, 0, .3); }
.cwh-prog { display: grid; gap: 6px; font-size: .86rem; }
.cwh-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.cwh-bar i { display: block; height: 100%; border-radius: inherit; background: #e5262e; transition: width .4s ease; }
.cwh-chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-weight: 650; font-size: .88rem; text-decoration: none; }
.cwh-chip:hover { background: rgba(255, 255, 255, .26); color: #fff; text-decoration: none; }
.cwh-chip b { background: #fff; color: #c3171f; border-radius: 999px; padding: 1px 8px; font-size: .74rem; white-space: nowrap; } /* «20 s» en una línea a 320-360 px */
.cwh-chip svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .cwh-btn { width: 100%; justify-content: center; } .cwh-t { font-size: 1.35rem; } }
:root[data-theme="dark"] .cw-hero { box-shadow: 0 12px 32px rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-hero { border-color: rgba(255, 255, 255, .1); } }
.cx { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.cx-head { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.cx-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-title a { color: var(--brand); }
.cx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-notes { margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: .88rem; color: var(--text-2); white-space: pre-wrap; }
.sets { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sets th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 750; padding: 6px 6px; text-align: center; background: var(--surface-2); }
.sets th.plan { background: var(--surface-3); }
.sets th.done { background: var(--warn-soft); color: var(--warn-ink); }
.sets td { padding: 5px 6px; text-align: center; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.sets td.plan { color: var(--text-2); background: var(--surface-2); }
.sets td.done { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.sets .input-sm, .sets .select { min-height: 36px; text-align: center; max-width: 92px; margin: 0 auto; }
.sets .select { padding: 4px 20px 4px 8px; text-align: left; min-width: 70px; }
@media (max-width: 520px) {
  .sets th, .sets td { padding: 4px 3px; }
  .sets .input-sm { max-width: 62px; padding: 4px; }
  .sets .select { min-width: 64px; padding: 4px 15px 4px 5px; font-size: .84rem; background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50%; }
}
.rpe-ok { background: var(--ok-soft) !important; color: var(--ok-ink) !important; border-color: var(--ok) !important; font-weight: 700; }
.rpe-low { background: var(--info-soft) !important; color: var(--info-ink) !important; border-color: var(--info) !important; font-weight: 700; }
.rpe-high { background: var(--bad-soft) !important; color: var(--bad-ink) !important; border-color: var(--bad) !important; font-weight: 700; }
.cx-foot { padding: 10px 14px 14px; display: grid; gap: 10px; }
.cx-compare { margin: 0 14px 12px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--border-strong); font-size: .82rem; color: var(--text-2); }
.cx-compare b { color: var(--text); }
.wu-list { display: grid; gap: 6px; }
.wu-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; flex-wrap: wrap; }
/* Nombre, «Técnica» y consejos (un .row.nowrap en el marcado de Mi semana y de «Entrenando»): si no caben en una línea,
   los botones bajan y un nombre muy largo se parte, en vez de ensanchar la tarjeta y la página */
.wu-item > .row { flex-wrap: wrap; white-space: normal; min-width: 0; }
.wu-item > .row > b { overflow-wrap: anywhere; }
.session-box { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
@media (max-width: 760px) { .session-box { grid-template-columns: 1fr; } }
.dur { display: flex; gap: 6px; align-items: center; }
.dur .input { max-width: 82px; text-align: center; }
.q-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.q-item:last-child { border-bottom: 0; }
.q-item .q-label { font-weight: 650; display: flex; justify-content: space-between; gap: 10px; }
.q-item .q-ends { display: flex; justify-content: space-between; font-size: .76rem; color: var(--text-3); margin-top: 4px; }
.wellness-ring { width: 120px; height: 120px; }

/* Tabla RM */
.rm-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rm-result .stat { border-radius: 14px; background: var(--surface-2); }
.zone { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.zone-max { background: var(--bad-soft); color: var(--bad-ink); }
.zone-fuerza { background: #fde9dd; color: #9a3c0f; }
.zone-mix { background: var(--warn-soft); color: var(--warn-ink); }
.zone-hiper { background: var(--ok-soft); color: var(--ok-ink); }
.zone-res { background: var(--info-soft); color: var(--info-ink); }
:root[data-theme="dark"] .zone-fuerza { background: #3a2215; color: #ffb184; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zone-fuerza { background: #3a2215; color: #ffb184; } }

/* Test / KPIs */
.level { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.level svg { width: 13px; height: 13px; }
.lv-0 { background: var(--bad-soft); color: var(--bad-ink); }
.lv-1 { background: #fdeee4; color: #9a3c0f; }
.lv-2 { background: var(--warn-soft); color: var(--warn-ink); }
.lv-3 { background: var(--ok-soft); color: var(--ok-ink); }
.lv-4 { background: var(--ink); color: var(--ink-fg); } /* el nivel más alto, en negro: el rojo es el del nivel más bajo */
:root[data-theme="dark"] .lv-1 { background: #3a2215; color: #ffb184; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lv-1 { background: #3a2215; color: #ffb184; } }
.lvbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 160px; }
.lvbar span { height: 8px; border-radius: 3px; background: var(--surface-3); }
.lvbar span.on { background: var(--brand); }
.cap-bars { display: grid; gap: 10px; }
.cap-bar { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; font-size: .88rem; }
.cap-bar .track { height: 10px; border-radius: 0 5px 5px 0; background: var(--surface-3); overflow: hidden; }
.cap-bar .fill { height: 100%; background: var(--series-1); border-radius: 0 5px 5px 0; }

/* ---------- 14. Análisis: calendario, ciclos, gráficas ---------- */
.hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.cal { border-collapse: separate; border-spacing: 2px; font-size: .72rem; font-variant-numeric: tabular-nums; }
.cal th, .cal td { min-width: 30px; height: 24px; text-align: center; border-radius: 5px; padding: 0 2px; }
.cal th.rowh { text-align: right; padding-right: 8px; color: var(--text-3); font-weight: 700; min-width: 92px; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.cal td.day { background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.cal td.day.past { background: transparent; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); }
.cal td.day.today { box-shadow: inset 0 0 0 2px var(--brand); color: var(--text); }
.cal td.day.ev { color: #fff; }
.cal td.wk { color: var(--text-3); font-weight: 700; }
.cal td.mon { color: var(--text-3); font-weight: 600; text-transform: lowercase; }
.cal td.wo { font-weight: 700; color: var(--text-2); }
.cal td.blk { font-weight: 700; color: var(--text-2); background: var(--surface-2); }
.cal td.blk.alt { background: var(--surface-3); }
.cal td.trained { background: var(--info-soft); color: var(--info-ink); font-weight: 800; }
.cal td.cyc { cursor: pointer; font-weight: 750; font-size: .7rem; }
.cal td.cyc:hover { outline: 2px solid var(--brand); }
.cal td.span { font-weight: 700; font-size: .72rem; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.cal td.note { font-size: .72rem; text-align: left; padding: 3px 6px; white-space: normal; vertical-align: top; color: var(--text-2); background: var(--surface-2); }
.cal td.empty-cell { background: transparent; }
.chart-card .card-head .row { gap: 8px; }
.chart-box { position: relative; width: 100%; }
.chart-box svg { overflow: visible; }
.chart-box .grid-line { stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart-box .axis-line { stroke: var(--chart-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart-box .tick { fill: var(--chart-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-box .lbl { fill: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-box .hit { fill: transparent; cursor: crosshair; }
.chart-box .xhair { stroke: var(--text-3); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--text-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .key.line { height: 3px; width: 16px; border-radius: 2px; }
.legend .key.dash { height: 0; width: 16px; border-top: 2px dashed currentColor; border-radius: 0; background: none !important; }
.chart-tip { position: fixed; z-index: 130; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: .8rem; min-width: 130px; }
.chart-tip .tt-title { font-size: .72rem; color: var(--text-3); font-weight: 700; margin-bottom: 4px; }
.chart-tip .tt-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chart-tip .tt-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart-tip .tt-row .k i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-tip .tt-row b { font-variant-numeric: tabular-nums; }
.zone-row { display: flex; gap: 0; font-size: .7rem; }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.check-list label { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; cursor: pointer; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border); }
.check-list label .key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; }
.ev-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; border: 1px solid var(--border); background: var(--surface); }
.ev-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rec-table td.best { font-weight: 750; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.metric-pair { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 10px; font-size: .8rem; }

/* ---------- 14b. Contenido externo: vídeos e Instagram ---------- */
.modal.video-modal { width: min(960px, 100%); }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cx-video { font-size: .76rem; padding: 3px 8px; color: var(--brand); }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ig-frame { width: 100%; min-height: 560px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.ig-placeholder { min-height: 260px; border: 1px dashed var(--border-strong, var(--border)); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; color: var(--text-2); background: var(--surface-2, var(--surface)); }
.ig-placeholder svg.ic { width: 34px; height: 34px; color: var(--brand); }
.ig-placeholder p { margin: 0; font-weight: 650; }

/* ---------- 14c. Utilidades nuevas ---------- */
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.warn-text { color: var(--warn-ink); }
.count.hot { background: var(--bad-fill) !important; color: #fff !important; font-weight: 700; }
.count.warn { background: var(--warn-soft) !important; color: var(--warn-ink) !important; font-weight: 700; }
.tabs .count { font-size: .72rem; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.badge-btn { border: 0; cursor: pointer; font: inherit; }
.callout-link { text-decoration: none; align-items: center; }
.callout-link:hover { text-decoration: none; filter: brightness(.98); }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.done-icon svg.ic { width: 54px; height: 54px; color: var(--ok); margin-bottom: 8px; }

/* Campana de avisos */
.tb-actions { display: flex; align-items: center; gap: 6px; }
.bell { position: relative; }
.bell-n { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad-fill); color: #fff; font-size: .66rem; font-weight: 750; display: grid; place-items: center; line-height: 1; }
.bottom-nav a { position: relative; }
.bn-dot { position: absolute; top: 6px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }

/* Público: portada, contacto e Instagram */
.setup-band { background: var(--warn-soft); color: var(--warn-ink); font-size: .9rem; }
.setup-band .container { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
.pub-nav .pub-subnav { display: none; }
@media (max-width: 820px) { .pub-nav .pub-subnav { display: flex; margin: 0; gap: 4px; padding: 0 16px 8px; overflow-x: auto; } .pub-subnav a { padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .78); white-space: nowrap; } .pub-subnav a:hover { color: #fff; text-decoration: none; } .pub-subnav a[aria-current="page"] { background: rgba(229, 38, 46, .55); color: #fff; } }
.coach-photo { position: relative; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); max-width: 460px; justify-self: center; }
.coach-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.coach-tag { position: absolute; left: 14px; right: 14px; bottom: 14px; background: rgba(20, 20, 22, .8); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 14px; display: grid; }
.coach-tag span { font-size: .82rem; color: #cfcfd4; }
.page-pad { padding-top: 40px; padding-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } } /* en el móvil, primero el teléfono y WhatsApp; después el formulario */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.faq.compact details { padding: 0 14px; border-radius: 12px; }
.faq.compact summary { padding: 11px 0; font-size: .92rem; }
.ig-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ig-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); color: #fff; flex: none; }
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-avatar svg.ic { width: 30px; height: 30px; }
.ig-head h1 { font-size: 1.5rem; }

/* Formulario de alta por pasos */
.wizard-wrap { max-width: 860px; margin: 0 auto; padding: 32px 16px 56px; }
.wizard-head { margin-bottom: 18px; }
.wizard-head h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 10px 0 6px; letter-spacing: -.02em; }
.wizard-head .sub { color: var(--text-2); margin-bottom: 14px; }
.wz-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wz-progress span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s ease; }
.wz-steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.wz-steps::-webkit-scrollbar { display: none; }
.wz-steps li { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--text-3); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.wz-steps li svg.ic { width: 14px; height: 14px; }
.wz-steps li.current { background: var(--brand-soft); color: var(--brand-soft-ink); }
.wz-steps li.done { color: var(--ok-ink); background: var(--ok-soft); }
@media (max-width: 640px) { .wz-steps li:not(.current) span { display: none; } }
.wizard-card h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-weight: 600; font-size: .88rem; margin-bottom: 8px; color: var(--text); padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: .88rem; font-weight: 550; color: var(--text-2); transition: background .15s, border-color .15s; }
.choice:hover span { border-color: var(--brand); }
.choice input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-soft-ink); font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--focus-border); outline-offset: 2px; }
.choices.scale .choice span { min-width: 42px; justify-content: center; padding: 7px 10px; }
.yn-field { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.yn-field legend { float: left; width: 100%; font-weight: 550; margin-bottom: 10px; }
.yn-field .choices { clear: both; }
.choices.yn .choice span { min-width: 70px; justify-content: center; }
.inj-list { display: grid; gap: 10px; margin-top: 10px; }
.inj-row { display: grid; grid-template-columns: 1.2fr .8fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.inj-row .inj-desc { grid-column: 1 / -2; }
.inj-row > button { align-self: start; }
@media (max-width: 700px) { .inj-row { grid-template-columns: 1fr 1fr; } .inj-row .inj-desc { grid-column: 1 / -1; } }
.consent-list { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }

/* Cuestionario de alta (vista del entrenador) */
.flag-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: .88rem; }
.flag-list li.bad { color: var(--bad-ink); font-weight: 600; }
.flag-list li.warn { color: var(--warn-ink); }
.intake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .intake-grid { grid-template-columns: 1fr; } }
.intake-sec { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); break-inside: avoid; }
.intake-sec h3 { font-size: .98rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.intake-sec dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px 14px; margin: 0; font-size: .86rem; }
.intake-sec dt { color: var(--text-3); }
.intake-sec dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.intake-sec dd.flag { color: var(--bad-ink); font-weight: 700; }

/* Bandeja y avisos */
.signup-card { background: linear-gradient(120deg, var(--brand-soft), var(--surface)); }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li + li { border-top: 1px solid var(--border); }
.notice { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; text-decoration: none; }
.notice:hover { background: var(--surface-2); text-decoration: none; }
.notice-list li.unread .notice { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.notice-list li.unread .notice b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.notice-list li.high .n-ic { background: var(--bad-soft); color: var(--bad-ink); }
.n-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.n-body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.n-body span { color: var(--text-2); font-size: .88rem; overflow-wrap: anywhere; }
.n-body .badge { justify-self: start; }
.n-time { color: var(--text-3); font-size: .78rem; white-space: nowrap; }

/* Contacto: teléfono y Stripe (próximamente) */
.phone-big { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.phone-big .phone-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); display: grid; place-items: center; flex: none; }
.phone-big .phone-ic svg { width: 22px; height: 22px; }
.phone-big a { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); display: block; }
.phone-big span { font-size: .8rem; color: var(--text-3); }
.soon-card { border-style: dashed; background: var(--surface-2); }
.soon-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9rem; color: var(--text-2); }
.soon-list li { display: flex; gap: 8px; align-items: center; }
.soon-list svg { width: 16px; height: 16px; color: var(--brand); flex: none; }


/* Informe mensual */
.report { display: grid; gap: 14px; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.rp-head h2 { margin: 2px 0 4px; font-size: 1.6rem; letter-spacing: -.02em; }
.rp-brand { display: flex; align-items: center; gap: 10px; text-align: right; }
.rp-brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.rp-brand b { display: block; }
.rp-brand span { font-size: .78rem; color: var(--text-3); }
.rp-stats .stat-value small { font-size: 1rem; color: var(--text-3); }
.rp-ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
.rp-foot { text-align: center; padding-top: 6px; }
@media print {
  .report { gap: 10px; }
  .report .card { break-inside: avoid; box-shadow: none; }
  .report .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .report .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Combate y entrenos técnicos */
.fight-card { border-color: var(--brand); }
.fight-count { display: flex; align-items: baseline; gap: 10px; }
.fight-count b { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--brand); }
.fight-count span { color: var(--text-2); font-size: .9rem; }
.text-bad { color: var(--bad-ink); font-weight: 600; }
.table tr.row-bad td { background: var(--bad-soft); }
.xt-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) 70px 90px minmax(120px, 2fr) auto; gap: 6px; align-items: center; }
@media (max-width: 640px) { .xt-row { grid-template-columns: 1fr 1fr; } .xt-row select:first-child, .xt-row input[data-xt="notes"] { grid-column: 1 / -1; } }

/* Revisiones semanales de antes de la 1.22 (las lee el entrenador) y progreso */
.ck-reply { display: flex; gap: 10px; background: var(--brand-soft); color: var(--brand-soft-ink); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.ck-reply svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ck-card.bad { border-color: var(--bad); }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ck-grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.ck-grid span:first-child { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.ck-grid b { font-variant-numeric: tabular-nums; }
.ck-up { color: var(--warn-ink); font-size: .8rem; font-weight: 600; }
.ck-down { color: var(--ok-ink); font-size: .8rem; font-weight: 600; }
.ck-dots { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 4px; }
.ck-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); display: inline-block; }
.ck-dots i.on { background: var(--brand); }
.ck-notes { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.ph-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ph-col { min-width: 0; }
.ph-date { font-weight: 700; font-size: .9rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ph-grid.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-width: 440px; }
.ph-item { margin: 0; }
.ph-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); cursor: zoom-in; display: block; }
.ph-item figcaption { font-size: .76rem; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
@media (max-width: 640px) { .form-grid > .col-6-m { grid-column: span 6; } }

/* Contenido: calendario mensual */
.pf-instagram { --pf: #c1356b; } .pf-tiktok { --pf: #0b7f86; } .pf-youtube { --pf: #d9251d; } .pf-facebook { --pf: #1d6fdc; } .pf-x { --pf: #4b5262; }
.pf-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--pf, var(--brand-fill)); white-space: nowrap; }
.cc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-nav { gap: 6px; }
.cc-month { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; min-width: 170px; text-align: center; text-transform: capitalize; }
.cc-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-stat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; color: var(--text-2); font: inherit; font-size: .8rem; }
.cc-stat b { color: var(--text); }
.cc-stat svg { width: 14px; height: 14px; }
button.cc-stat { cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cc-stat:hover { border-color: var(--brand); }
.cc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cc-dot.st-programado { background: var(--brand); } .cc-dot.st-publicado { background: var(--ok); } .cc-dot.st-borrador { border: 1.5px dashed var(--text-3); }
.cc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cc-wd { background: var(--surface-2); padding: 8px 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); text-align: center; }
.cc-day { background: var(--surface); min-height: 126px; padding: 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cc-day.out { background: var(--surface-2); }
.cc-day.out .cc-dnum b { opacity: .45; }
.cc-dnum { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: .8rem; color: var(--text-2); min-height: 26px; }
.cc-dnum b { min-width: 24px; height: 24px; padding: 0 4px; display: inline-grid; place-items: center; border-radius: 999px; font-weight: 700; }
.cc-day.today .cc-dnum b { background: var(--brand-fill); color: #fff; }
.cc-dlong { display: none; }
.cc-add { opacity: 0; width: 26px; min-height: 26px; }
.cc-day:hover .cc-add, .cc-add:focus-visible { opacity: 1; }
.cc-item { display: grid; gap: 3px; width: 100%; text-align: left; padding: 6px 7px; border-radius: 9px; border: 1px solid var(--border); border-left: 3px solid var(--pf); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.cc-item:hover { border-color: var(--pf); }
.cc-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cc-item.on { box-shadow: 0 0 0 2px var(--pf); }
.cc-item.st-borrador { border-style: dashed; border-left-style: solid; background: transparent; }
.cc-meta { display: flex; align-items: center; gap: 5px; font-size: .68rem; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; }
.cc-meta time { font-variant-numeric: tabular-nums; color: var(--text-2); }
.cc-meta svg { width: 12px; height: 12px; color: var(--ok); flex: none; }
.cc-meta em { font-style: normal; text-transform: uppercase; letter-spacing: .04em; font-size: .6rem; }
.cc-hook { font-size: .76rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cc-flag, .cc-sample { justify-self: start; font-size: .62rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.cc-flag { color: var(--warn-ink); background: var(--warn-soft); }
.cc-sample { color: var(--text-3); background: var(--surface-3); }
.cc-over { color: var(--bad); }
.cc-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* Panel lateral del contenido */
.side-panel.cc-panel { width: min(520px, 100vw); z-index: 75; }
.cc-when { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.cc-when svg { width: 18px; height: 18px; color: var(--brand); }
.cc-sec h4 { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.cc-hookbig { font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.cc-text { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.cc-tags { margin-top: 10px; color: var(--brand); font-weight: 600; font-size: .85rem; }
.cc-mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc-mgrid div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; }
.cc-mgrid span { font-size: .7rem; color: var(--text-3); font-weight: 600; }
.cc-mgrid b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cc-actions { padding-top: 6px; border-top: 1px solid var(--border); }
.cc-hookopt span { white-space: normal; }

/* ---------- Planificador de reels (Contenido › Planificador) ---------- */
.text-ok { color: var(--ok-ink); font-weight: 600; }
.text-warn { color: var(--warn-ink); font-weight: 600; }
.pl-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; padding: 24px 26px; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); overflow: hidden; }
.pl-hero-main h2 { font-size: 1.45rem; letter-spacing: -.02em; margin: 6px 0 8px; }
.pl-hero-main p { color: var(--text-2); max-width: 560px; }
.pl-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.pl-kicker svg { width: 14px; height: 14px; }
.pl-conns { display: grid; gap: 8px; align-content: start; }
.pl-conn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.pl-conn b { display: block; font-size: .88rem; }
.pl-conn .xsmall { display: block; color: var(--text-3); }
.pl-conn-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pf, var(--brand-fill)); color: #fff; flex: none; }
.pl-conn-ic svg { width: 18px; height: 18px; }
.pl-conn.is-none .pl-conn-ic { background: var(--surface-3); color: var(--text-3); }
.pl-conn.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.pl-list { display: flex; flex-direction: column; }
.pl-job { display: grid; grid-template-columns: 40px 64px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 16px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.pl-job-cover { width: 40px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); flex: none; }
.pl-job-cover svg { width: 18px; height: 18px; }
.pl-cover { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #161618; border-radius: 12px; margin-bottom: 8px; }
.pl-vinfo { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.pl-vinfo span { display: inline-flex; align-items: center; gap: 5px; }
.pl-vinfo .warn { color: var(--warn-ink); }
.pl-vinfo svg { width: 13px; height: 13px; flex: none; }
.pl-video-state { display: flex; align-items: flex-start; gap: 6px; padding: 4px 2px; }
.pl-video-state svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pl-inline-spin { display: inline-block; vertical-align: middle; margin-right: 4px; }
.pl-job:hover { background: var(--surface-2); }
.pl-job.on { background: var(--brand-soft); }
.pl-job:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.pl-job-when { display: flex; flex-direction: column; line-height: 1.15; }
.pl-job-when b { font-size: .95rem; }
.pl-job-when span { font-size: .76rem; color: var(--text-3); }
.pl-job-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-weight: 600; }
.pl-job-pfs { display: flex; gap: 4px; flex-wrap: wrap; }
.pf-badge.ok { background: var(--ok); } .pf-badge.warn { background: var(--warn); } .pf-badge.bad { background: var(--bad-fill); }
.pl-manual { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); flex-wrap: wrap; }
.pl-manual b { color: var(--text); }
.pl-res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.pl-res b { font-size: .88rem; }
.pl-drop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed var(--border-strong); border-radius: 14px; cursor: pointer; background: var(--surface-2); color: var(--text-2); font-weight: 600; transition: border-color .15s, background .15s; }
.pl-drop:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.pl-drop-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-fill); color: #fff; display: grid; place-items: center; flex: none; }
.pl-drop-ic svg { width: 20px; height: 20px; }
.pl-drop .xsmall { margin-left: auto; }
.form-grid > fieldset.field { min-width: 0; border: 0; padding: 0; margin: 0; } /* un fieldset no encoge por debajo de su contenido si no se le indica */
.form-grid > fieldset.field > legend { font-size: .82rem; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 6px; }
.pl-pfs { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-pf span { gap: 8px; }
.pl-pf span small { font-weight: 500; color: var(--text-3); }
.pl-pf span svg { width: 16px; height: 16px; }
.pl-adv summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.pl-progress { display: flex; flex-direction: column; gap: 6px; }
.pl-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pl-bar span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
@media (max-width: 760px) {
  .pl-hero { grid-template-columns: 1fr; padding: 18px; }
  .pl-job { grid-template-columns: 40px 52px 1fr; padding: 10px 12px; }
  .pl-job > .badge { grid-column: 3; justify-self: start; }
}

/* ---------- Competidores (reels de la semana) ---------- */
.cr-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .82rem; font-weight: 600; max-width: 100%; }
.cr-chip a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cr-chip small { color: var(--text-3); }
.cr-chip.has-err { border-color: var(--bad); }
.cr-chip.has-err svg { width: 14px; height: 14px; color: var(--bad); }
.cr-x { border: 0; background: var(--surface-3); color: var(--text-3); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.cr-x svg { width: 12px; height: 12px; }
.cr-x:hover { background: var(--bad-soft); color: var(--bad-ink); }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cr-grid-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.cr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.cr-thumb { position: relative; display: block; aspect-ratio: 9 / 13; background: #161618; color: #fff; }
.cr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .55); background: linear-gradient(160deg, var(--pf, var(--brand-fill)), #161618); }
.cr-noimg svg { width: 42px; height: 42px; }
.cr-thumb .pf-badge { position: absolute; top: 8px; left: 8px; }
.cr-rank { position: absolute; top: 6px; right: 8px; font-size: 1.2rem; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.cr-dur { position: absolute; right: 8px; bottom: 8px; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); }
.cr-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.cr-title { font-size: .86rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-metrics { display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; font-weight: 600; color: var(--text-2); }
.cr-metrics span { display: inline-flex; align-items: center; gap: 4px; }
.cr-metrics svg { width: 13px; height: 13px; color: var(--text-3); }
.cr-actions { margin-top: 4px; gap: 6px; }
.cr-actions .btn-sm.is-on { color: var(--pink); background: var(--pink-soft); }

/* ---------- Asistente del entrenador (Pregúntale · Entrenar · Aprender · Probar) ---------- */
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-soft-ink); }
.as-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.as-chat .chat-log { max-height: 62vh; }
.as-answer { max-width: min(92%, 720px); }
.as-answer .msg-bubble { display: grid; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.as-answer .badge { white-space: normal; text-align: left; line-height: 1.35; height: auto; max-width: 100%; }
.as-sum dd, .as-sum dt { min-width: 0; }
.as-form { align-items: flex-end; }
.as-input-wrap { position: relative; flex: 1; min-width: 220px; display: flex; }
.as-input-wrap textarea { flex: 1; }
.as-mentions { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; gap: 2px; padding: 6px; min-width: 240px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.as-mentions[hidden] { display: none; }
.as-mention-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: none; border-radius: 8px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.as-mention-item:hover, .as-mention-item:focus-visible { background: var(--brand-soft); outline: none; }
.as-mention-item .avatar { width: 26px; height: 26px; font-size: .7rem; }
.as-over { display: grid; gap: 6px; }
.as-over-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.as-over-item:hover { border-color: var(--brand); }
.as-over-item > span:nth-of-type(2) { flex: 1; font-weight: 600; font-size: .9rem; }
.as-over-item svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.as-sum { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .88rem; }
.as-sum dt { color: var(--text-3); font-weight: 600; }
.as-sum dd { margin: 0; }
.as-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.as-items a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; }
.as-items a:hover { border-color: var(--brand); text-decoration: none; }
/* Agenda de «Hoy» y «Esta semana» (17/11/2026) */
.as-agenda a { gap: 8px; }
.as-ag-when { flex: none; min-width: 92px; font-size: .78rem; font-weight: 700; color: var(--text-2); }
.as-ag-h { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ib-today { margin-bottom: 12px; }
/* Programas (18/11/2026) */
.pg-bar .select { width: auto; }
.pg-week { margin-bottom: 14px; }
.pg-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pg-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.pg-day ul { margin: 4px 0 0; padding-left: 18px; font-size: .86rem; }
.pg-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; max-height: 50vh; overflow: auto; }
.ib-today-rows { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ib-today-row { font-size: .84rem; color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.ib-today-row:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 420px) { .as-agenda a { flex-wrap: wrap; } .as-ag-when { min-width: 0; width: 100%; } }
.as-items .grow { display: flex; flex-direction: column; min-width: 0; }
.as-items .avatar { width: 30px; height: 30px; font-size: .72rem; }
.as-inline-chips { padding: 0; flex-wrap: wrap; }
.as-side .as-tips { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.as-train-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.as-train-link > svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
.as-train-link .grow { display: flex; flex-direction: column; }
.as-recips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.as-preview { display: grid; gap: 4px; }
.as-preview .msg-bubble { background: var(--surface-2); }
.as-faq { list-style: none; margin: 0; padding: 0; }
.as-faq li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.as-faq .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-topics td { vertical-align: middle; }
.as-learn { display: flex; flex-direction: column; }
.as-learn-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.as-sim-acts { gap: 4px; }
.as-sim-acts .btn { padding-left: 6px; padding-right: 6px; }
.as-ai-alt { border-style: solid !important; background: var(--info-soft) !important; color: var(--info-ink); }
/* ---------- Ayuda en vídeo (cliente) ---------- */
.help-hero { display: flex; align-items: flex-end; gap: 20px; padding: 22px 24px; background: linear-gradient(135deg, var(--pink-soft), var(--surface) 70%); flex-wrap: wrap; }
.help-hero h2 { font-size: 1.35rem; letter-spacing: -.02em; margin: 6px 0; }
.help-search { display: grid; gap: 4px; width: min(320px, 100%); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.help-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.help-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.help-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.help-thumb { position: relative; display: block; aspect-ratio: 9 / 13; background: #161618; overflow: hidden; }
.help-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.help-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(211, 25, 33, .94); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.help-play svg { width: 26px; height: 26px; margin-left: 3px; }
.help-dur { position: absolute; right: 8px; bottom: 8px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; }
.help-seen { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--ok); color: #fff; }
.help-seen svg { width: 12px; height: 12px; }
.help-txt { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.help-txt b { font-size: .92rem; line-height: 1.25; }
.help-txt span { font-size: .8rem; color: var(--text-3); line-height: 1.35; }
.modal.help { width: min(900px, 100%); }
.help-player { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 20px; align-items: start; }
.help-video video { display: block; height: min(70vh, 640px); width: auto; max-width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; background: #161618; }
.help-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .95rem; line-height: 1.45; }
@media (max-width: 760px) {
  .help-player { grid-template-columns: minmax(0, 1fr); }
  .help-video video { width: 100%; height: auto; max-height: 68vh; margin: 0 auto; }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .help-hero { padding: 18px; }
}
@media (max-width: 960px) {
  .as-layout { grid-template-columns: minmax(0, 1fr); }
  .as-side { display: none; }
}
@media (max-width: 640px) {
  .as-answer { max-width: 100%; }
  .as-sum { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .as-sum dd { margin-bottom: 6px; }
  .as-learn-item > .row { width: 100%; justify-content: flex-end; }
}
@media (max-width: 760px) {
  .cc-cal { display: block; background: none; border: 0; border-radius: 0; }
  .cc-wd, .cc-day.out, .cc-day.empty:not(.today) { display: none; }
  .cc-day { min-height: 0; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; padding: 10px; }
  .cc-dlong { display: inline; flex: 1; font-weight: 600; color: var(--text); }
  .cc-dnum b { display: none; }
  .cc-day.today { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
  .cc-add { opacity: 1; }
  .cc-hook { font-size: .88rem; }
  .cc-meta { font-size: .74rem; }
  .cc-month { min-width: 0; font-size: 1.15rem; }
  .cc-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Propuesta de rutina (editable antes de aplicarla) */
.pe-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pe-weeks { display: flex; gap: 6px; flex-wrap: wrap; }
.pe-weeks button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.pe-weeks button small { color: var(--text-3); font-weight: 600; }
.pe-weeks button.on { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.pe-weeks button.on small { color: #fff; }
.pe-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 12px; }
.pe-day { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface-2); min-width: 0; }
.pe-day-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pe-day-head .select { width: auto; }
.pe-warm { font-size: .78rem; color: var(--text-3); margin-bottom: 8px; display: flex; gap: 6px; align-items: flex-start; }
.pe-warm svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--warn, #e8590c); }
.pe-row { display: grid; grid-template-columns: minmax(150px, 1fr) 52px 74px 52px 56px auto; gap: 6px; align-items: center; padding: 4px 0; }
.pe-row .input { min-width: 0; }
.pe-head { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 0; }
.pe-name { display: flex; gap: 4px; align-items: center; min-width: 0; }
.pe-name .input { flex: 1; }
.pe-tools { display: flex; gap: 0; }
.pe-tools .btn-icon { width: 28px; min-height: 28px; }
@media (max-width: 640px) {
  .pe-head { display: none; }
  .pe-row { grid-template-columns: repeat(4, 1fr); border-bottom: 1px dashed var(--border); padding: 8px 0; }
  .pe-name, .pe-tools { grid-column: 1 / -1; }
  .pe-tools { justify-content: flex-end; }
}

/* Nutrición */
.meal-list { display: grid; gap: 10px; }
.meal-row { display: grid; grid-template-columns: 1fr 90px 80px auto; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.meal-row textarea { grid-column: 1 / -1; }
.meal-view { list-style: none; margin: 0; padding: 0; }
.meal-view li { padding: 14px 16px; }
.meal-view li + li { border-top: 1px solid var(--border); }
.mv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.macro-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.macro-bar span { display: block; height: 100%; }
.mb-p { background: var(--series-1); }
.mb-c { background: var(--series-2); }
.mb-f { background: var(--series-3); }
.legend .key.mb-p, .legend .key.mb-c, .legend .key.mb-f { display: inline-block; }

/* Chat */
.chat-card { display: flex; flex-direction: column; min-height: min(72vh, 760px); min-width: 0; max-width: 100%; overflow: hidden; }
.chat-card > * { min-width: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; min-height: 260px; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chat-empty { margin: auto; text-align: center; color: var(--text-3); }
.chat-empty svg.ic { width: 34px; height: 34px; }
.chat-day { text-align: center; font-size: .74rem; color: var(--text-3); margin: 4px 0; }
.chat-day span { background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
.msg { max-width: min(78%, 560px); align-self: flex-start; display: grid; gap: 4px; }
.msg.mine { align-self: flex-end; }
.msg-meta { font-size: .74rem; color: var(--text-3); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-meta svg.ic { width: 14px; height: 14px; }
.msg-bubble { padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); font-size: .92rem; line-height: 1.45; }
.msg.mine .msg-bubble { background: var(--brand-fill); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.from-bot .msg-bubble { background: var(--surface-2); border-style: dashed; }
.msg.from-trainer:not(.mine) .msg-bubble { background: var(--brand-soft); color: var(--brand-soft-ink); border-color: transparent; }
.msg-links { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg-bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1s infinite ease-in-out; }
.msg-bubble.typing span:nth-child(2) { animation-delay: .15s; } .msg-bubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg-bubble.typing span { animation: none; } }
.import-box { border: 1px dashed var(--border-strong); border-radius: 14px; padding: 12px 14px; }
.import-box summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.chat-form { display: flex; gap: 10px; padding: 12px 14px; align-items: flex-end; flex-wrap: wrap; }
.chat-form textarea { flex: 1; min-width: 220px; resize: vertical; }
.ai-disclosure { margin: 0 14px 10px; font-size: .78rem; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.ai-disclosure svg.ic { width: 14px; height: 14px; flex: none; }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 0; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }

/* ---------- 14d. Modo «Entrenando» (sesión a pantalla completa) ---------- */
main.bare { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.ses { max-width: 640px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.ses.has-rest { padding-bottom: calc(230px + env(safe-area-inset-bottom)); }
.ses-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; min-height: 60px; margin: 0 -16px; padding: 8px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.ses-title { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.ses-title b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ses-title span { font-size: .76rem; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ses-top .save-state .lbl { display: none; }
.ses-elapsed { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .92rem; padding: 5px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ses-sound { position: relative; }
.ses-sound.muted { color: var(--text-3); }
.ses-sound.muted::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 2px; background: var(--bad); transform: translate(-50%, -50%) rotate(-45deg); border-radius: 2px; }
.ses-progress { display: flex; gap: 4px; padding: 3px 0 0; }
/* Barra fina a la vista (8 px) pero con una zona de toque de 24 px para saltar de ejercicio */
.ses-seg { flex: 1; height: 24px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; min-width: 0; background: linear-gradient(var(--seg, var(--surface-3)), var(--seg, var(--surface-3))) center / 100% 8px no-repeat; }
.ses-seg.done { --seg: var(--ok); }
.ses-seg.on { --seg: var(--brand); background-size: 100% 10px; }
.ses-ex { padding-top: 12px; display: grid; gap: 12px; }
.ses-ex h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.ses-ex h2 svg.ic { color: var(--warn); }
.ses-ex-head { display: grid; gap: 8px; }
.ses-ex-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ses-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ses-note { padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: .9rem; white-space: pre-wrap; display: flex; gap: 8px; align-items: flex-start; }
.ses-note svg.ic { flex: none; margin-top: 3px; }
.ses-plan { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 10px 12px; display: grid; gap: 6px; }
.ses-plan-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--text-3); }
.ses-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1rem; }
.ses-line b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ses-rpe { font-weight: 700; color: var(--warn-ink); background: var(--warn-soft); padding: 1px 8px; border-radius: 999px; font-size: .85rem; }
.ses-kg { color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.ses-plan-hint { font-size: .8rem; color: var(--text-3); display: flex; gap: 6px; align-items: flex-start; }
.ses-plan-hint svg.ic { flex: none; margin-top: 2px; }
.ses-sets { display: grid; gap: 8px; }
.ses-set { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.ses-set.compact { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 54px; }
.ses-set.compact > svg.ic { color: var(--text-3); flex: none; }
.ses-set.done { border-color: var(--ok); }
.ses-set-n { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 800; flex: none; }
.ses-set-n svg.ic { width: 18px; height: 18px; }
.ses-set.done .ses-set-n, .ses-set-n.ok { background: var(--ok); color: #fff; }
.ses-set-txt { flex: 1; min-width: 0; font-size: .95rem; overflow-wrap: anywhere; }
.rpe-txt-ok { color: var(--ok-ink); font-weight: 700; } .rpe-txt-low { color: var(--info-ink); font-weight: 700; } .rpe-txt-high { color: var(--bad-ink); font-weight: 700; }
.ses-set.open { padding: 12px; display: grid; gap: 8px; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ses-set.open.done { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.ses-set-head { display: flex; align-items: center; gap: 10px; }
.ses-set-head > div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ses-set-target { font-size: .8rem; color: var(--text-3); font-weight: 600; }
.stp { display: grid; grid-template-columns: 52px 48px minmax(0, 1fr) 48px; align-items: center; gap: 6px; }
.stp label { font-size: .76rem; font-weight: 750; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.stp-btn { height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0; touch-action: manipulation; }
.stp-btn:hover { background: var(--surface-3); }
.stp-btn:active { background: var(--border); transform: translateY(1px); }
.stp-btn svg { width: 22px; height: 22px; }
.stp-val { height: 48px; min-width: 0; width: 100%; text-align: center; font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 0 6px; }
.stp-val:focus { outline: none; border-color: var(--focus-border); box-shadow: var(--focus-halo); }
.stp-val::placeholder { color: var(--text-3); font-weight: 600; opacity: 1; }
.ses-done { margin-top: 4px; }
.ses-exnotes .textarea { min-height: 52px; }
.ses-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.ses-nav > .btn { flex: 1; min-width: 0; padding: 0 12px; }
.ses-nav > .btn-primary { flex: 1.25; }
.ses-nav .ses-count { font-size: .8rem; font-weight: 700; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 680px) { .ses-nav { left: 50%; right: auto; transform: translateX(-50%); width: 640px; border: 1px solid var(--border); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); } }
.ses-rest { position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 29; padding: 0 12px; pointer-events: none; }
.ses-rest-in { pointer-events: auto; max-width: 616px; margin: 0 auto; background: var(--surface); border: 2px solid var(--brand); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.ses-rest.over .ses-rest-in { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-ink); }
.ses-rest-ring { position: relative; width: 92px; height: 92px; grid-row: span 2; }
.ses-rest-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ses-rest-ring circle { fill: none; stroke-width: 9; }
.ses-rest-ring .bg { stroke: var(--surface-3); }
.ses-rest-ring .fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .45s linear; }
.ses-rest.over .ses-rest-ring .fg { stroke: var(--ok); }
.ses-rest-time { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ses-rest-txt { display: grid; line-height: 1.25; min-width: 0; }
.ses-rest-txt b { font-size: 1rem; }
.ses-rest-txt span { font-size: .8rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ses-rest.over .ses-rest-txt span { color: inherit; }
.ses-rest-btns { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ses-rest-btns .btn { min-height: 38px; padding: 0 10px; font-size: .84rem; border-radius: 10px; }
.ses-rest-btns .btn-primary { flex: 1; }
@media (prefers-reduced-motion: reduce) { .ses-rest-ring .fg { transition: none; } }
/* Resumen */
.ses-sum { padding-top: 14px; display: grid; gap: 14px; }
.ses-sum-hero { text-align: center; padding: 6px 0 0; }
.ses-sum-hero svg.ic { width: 52px; height: 52px; color: var(--brand); margin: 0 auto 6px; }
.ses-sum-hero h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -.02em; }
.ses-sum-hero p { margin: 0; color: var(--text-2); }
.ses-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 480px) { .ses-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ses-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; display: grid; min-width: 0; }
.ses-stats span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.ses-stats b { font-size: 1.3rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ses-exrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: .92rem; }
.ses-exrow:first-child { border-top: 0; }
.ses-exrow .grow b { display: block; overflow-wrap: anywhere; }
.ses-exrow .grow span { font-size: .8rem; color: var(--text-3); }
.ses-rec { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-top: 1px solid var(--border); }
.ses-rec:first-child { border-top: 0; }
.ses-rec > svg.ic { width: 22px; height: 22px; color: var(--warn); flex: none; margin-top: 2px; }
.ses-rec b { display: block; }
.ses-rec span { font-size: .84rem; color: var(--text-2); }
/* «Mi semana»: acceso al modo Entrenando */
.cw-start { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--border); }
.cw-start > span { flex: 1 1 260px; min-width: 0; display: inline-flex; gap: 6px; align-items: flex-start; }
.cw-start > span svg.ic { flex: none; margin-top: 2px; color: var(--brand); }
@media (max-width: 520px) { .cw-start .btn { width: 100%; } .stp { grid-template-columns: 44px 46px minmax(0, 1fr) 46px; } }

/* ---------- 15. Impresión ---------- */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: #fff; color: #000; font-size: 11px; }
  .sidebar, .topbar, .bottom-nav, .cookie-banner, .toasts, .no-print, .tabs, .preview-bar { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .print-only { display: block !important; }
  /* Insignias negras de texto blanco («nuevo» del informe, nivel «Excelente» del test): sin «Gráficos de fondo», que es
     lo normal al imprimir, el blanco saldría gris claro sobre el papel. Se imprimen en tinta con un contorno */
  .badge-brand, .lv-4 { background: none !important; color: #18181a !important; box-shadow: inset 0 0 0 1px #18181a; }
}
.print-only { display: none; }

/* ---------- Gestoría (impuestos del autónomo) ---------- */
.gs-qtitle { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; min-width: 210px; text-align: center; }
.gs-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.gs-line > span { min-width: 0; }
.gs-line b { white-space: nowrap; }
.gs-line.total { border-top: 2px solid var(--text); border-bottom: 0; margin-top: 4px; padding-top: 10px; font-size: 1rem; }
.gs-line.total b { font-size: 1.12rem; }
.gs-deadline .card-body { padding: 14px 18px; }
.gs-dl-main { flex: 1 1 260px; min-width: 0; flex-wrap: nowrap; }
.gs-qtitle .gs-short { display: none; }
.gs-dl-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.gs-dl-ic svg { width: 19px; height: 19px; }
.gs-deadline.warn { border-color: var(--warn); }
.gs-deadline.warn .gs-dl-ic { background: var(--warn-soft); color: var(--warn-ink); }
.gs-deadline.bad { border-color: var(--bad); }
.gs-deadline.bad .gs-dl-ic { background: var(--bad-soft); color: var(--bad-ink); }
.gs-deadline.ok .gs-dl-ic { background: var(--ok-soft); color: var(--ok-ink); }
.gs-warn { list-style: none; margin: 0; padding: 0; }
.gs-warn li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.gs-warn li:last-child { border-bottom: 0; }
.gs-warn li > svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.gs-warn li.warn > svg { color: var(--warn-ink); }
.gs-big { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; }
.gs-big span { font-size: .9rem; font-weight: 500; color: var(--text-3); }
.gs-table tr.gs-off td { opacity: .55; }
.gs-cat { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-2); white-space: nowrap; }
.gs-cat svg { width: 15px; height: 15px; flex: none; }
.gs-chips { gap: 6px; }
.gs-doc { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.gs-doc.has { border-style: solid; border-color: var(--border); background: var(--surface); }
.gs-doc img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.gs-doc-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); flex: none; }
.gs-inv { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.gs-inv[hidden] { display: none; }
.gs-prev { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.gs-prev:empty { display: none; }
.gs-doc-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }
.gs-pdf { text-align: center; padding: 30px 10px; }
.gs-pdf > svg { width: 48px; height: 48px; color: var(--text-3); }
.gs-cal-list { list-style: none; margin: 0; padding: 0; }
.gs-cal { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.gs-cal:last-child { border-bottom: 0; }
.gs-cal.done { opacity: .65; }
.gs-cal.open { box-shadow: inset 3px 0 0 var(--warn); }
.gs-cal-date { width: 66px; text-align: center; flex: none; border-radius: 10px; background: var(--surface-3); padding: 6px 4px; }
.gs-cal-date b { display: block; font-size: 1.3rem; line-height: 1.1; }
.gs-cal-date span { font-size: .7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .02em; }
.gs-cal .grow a { color: inherit; }
@media (max-width: 640px) {
  .gs-qtitle { min-width: 0; font-size: 1.05rem; white-space: nowrap; }
  .gs-qtitle .gs-long { display: none; }
  .gs-qtitle .gs-short { display: inline; }
  .gs-cal { padding: 12px 16px; }
  .gs-cal > .row { width: 100%; justify-content: flex-end; }
  .gs-warn li { padding: 10px 16px; flex-wrap: wrap; }
  .gs-big { font-size: 1.5rem; }
}

/* ---------- Reuniones (entrenador y cliente) ---------- */
.mt-split > * { min-width: 0; }
.mt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.mt-nav { gap: 6px; min-width: 0; }
.mt-period { margin: 0 0 0 6px; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-tools { gap: 8px; }
.mt-filters { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.mt-filters .cc-stat { max-width: 100%; }
.mt-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--mt, var(--brand)); }
.mt-dot.block { background: repeating-linear-gradient(135deg, var(--text-3) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--text-3); }
.mt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--text-2); margin-top: 12px; }
.mt-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.mt-avail-key { width: 14px; height: 10px; border-radius: 3px; display: inline-block; background: color-mix(in srgb, var(--ok) 14%, transparent); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 50%, transparent); }
/* Semana y día */
.mt-grid-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: auto; max-height: calc(100vh - 250px); min-height: 360px; }
.mt-grid { --hour: 54px; min-width: calc(56px + var(--cols) * 104px); }
.mt-grid.one { min-width: 0; }
.mt-ghead { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mt-gut { border-right: 1px solid var(--border); }
.mt-dh { border-left: 1px solid var(--border); text-align: center; }
.mt-dh-btn { width: 100%; border: 0; background: none; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--text-2); font: inherit; }
.mt-dh-btn span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mt-dh-btn b { font-size: 1.02rem; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--text); }
.mt-dh-btn small { font-size: .64rem; color: var(--text-3); font-weight: 650; line-height: 1; }
.mt-dh.today .mt-dh-btn b { background: var(--brand-fill); color: #fff; }
.mt-dh.blocked, .cc-day.mt-bl { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--text-3) 10%, transparent) 6px 12px); }
.mt-gbody { position: relative; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); height: var(--h); }
.mt-times { position: relative; border-right: 1px solid var(--border); }
.mt-times span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .68rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mt-times span:first-child { transform: translateY(2px); }
.mt-col { position: relative; border-left: 1px solid var(--border); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour)); }
.mt-col.today { background-color: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.mt-col.past { background-color: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.mt-col.blocked { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--text-3) 9%, transparent) 6px 12px), repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour)); }
.mt-avail { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--ok) 8%, transparent); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 45%, transparent); pointer-events: none; }
.mt-bl-lbl { position: absolute; top: 6px; left: 6px; right: 6px; font-size: .68rem; font-weight: 700; color: var(--text-3); display: flex; gap: 4px; align-items: center; pointer-events: none; }
.mt-bl-lbl svg, .mt-bl-tag svg { width: 12px; height: 12px; }
.mt-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.mt-now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.mt-ev { position: absolute; z-index: 2; border: 0; border-left: 4px solid var(--mt); border-radius: 8px; padding: 3px 6px; text-align: left; overflow: hidden; cursor: pointer; font: inherit; font-size: .74rem; line-height: 1.25; color: var(--text); background: color-mix(in srgb, var(--mt) 16%, var(--surface)); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1px; }
.mt-ev:hover { background: color-mix(in srgb, var(--mt) 26%, var(--surface)); }
.mt-ev:focus-visible, .mt-ev.on { outline: none; box-shadow: 0 0 0 2px var(--mt); }
.mt-ev b, .mt-ev-who, .mt-ev-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-ev b { font-weight: 750; }
.mt-ev-who, .mt-ev-t { display: flex; align-items: center; gap: 3px; }
.mt-ev-who { font-weight: 650; }
.mt-ev-t { color: var(--text-2); }
.mt-ev svg.ic { width: 12px; height: 12px; }
.mt-ev.st-pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--mt) 10%, var(--surface)) 0 6px, color-mix(in srgb, var(--mt) 22%, var(--surface)) 6px 12px); border-left-style: dashed; }
.mt-ev.st-cancelled { opacity: .55; box-shadow: none; }
.mt-ev.st-cancelled b, .mt-ev.st-cancelled .mt-ev-who { text-decoration: line-through; }
.mt-ev.st-done, .mt-ev.st-noshow { opacity: .78; }
.mt-ev.block { background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); border-left-color: var(--text-3); color: var(--text-2); }
.mt-ev-flag { font-style: normal; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--warn-ink); }
/* Mes */
.mt-month .cc-day { min-height: 112px; }
.mt-dnum { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.mt-dnum:hover b { box-shadow: inset 0 0 0 1px var(--brand); }
.mt-bl-tag { font-size: .68rem; font-weight: 700; color: var(--text-3); display: inline-flex; gap: 4px; align-items: center; }
.mt-chip { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; border: 0; border-left: 3px solid var(--mt); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: .74rem; text-align: left; background: color-mix(in srgb, var(--mt) 13%, var(--surface)); color: var(--text); cursor: pointer; }
.mt-chip:hover { background: color-mix(in srgb, var(--mt) 22%, var(--surface)); }
.mt-chip time { font-weight: 750; font-variant-numeric: tabular-nums; flex: none; }
.mt-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-chip.st-pending { border-left-style: dashed; }
.mt-chip.st-cancelled { opacity: .55; text-decoration: line-through; }
.mt-chip.block { background: var(--surface-3); border-left-color: var(--text-3); color: var(--text-2); }
.mt-chip.on, .mt-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--mt); }
/* Lista */
.mt-list { display: grid; gap: 16px; }
.mt-dayblock h3 { font-size: .95rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.mt-rows { display: grid; gap: 8px; }
.mt-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); border-left: 4px solid var(--mt); background: var(--surface); }
.mt-row:hover { border-color: var(--mt); }
.mt-row.on, .mt-row:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--mt); }
.mt-row-time { display: grid; text-align: right; min-width: 44px; font-variant-numeric: tabular-nums; flex: none; }
.mt-row-time small { color: var(--text-3); font-size: .72rem; }
.mt-row-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mt-row-main b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
.mt-row-main > span { font-size: .84rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-row-main svg.ic { width: 14px; height: 14px; }
.mt-row .badge { flex: none; }
.mt-row.st-cancelled { opacity: .6; }
.mt-row.st-cancelled .mt-row-main b { text-decoration: line-through; }
.mt-row.block { border-left-color: var(--text-3); background: var(--surface-2); }
/* Panel de detalle */
.side-panel.mt-panel { width: min(440px, 100vw); z-index: 75; }
.mt-ptitle { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mt-when { display: flex; gap: 8px; align-items: flex-start; font-weight: 650; }
.mt-when > svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 2px; }
.mt-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.mt-who a { color: var(--text); text-decoration: none; min-width: 0; }
.mt-who a:hover b { color: var(--brand); }
.mt-linkbox { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: .82rem; margin-bottom: 8px; min-width: 0; }
.mt-linkbox .cc-ell { flex: 1; }
.mt-panel .cc-sec h4 { display: flex; align-items: center; gap: 6px; }
.mt-panel .cc-sec h4 svg { width: 14px; height: 14px; }
.mt-panel .cc-sec .btn-block { margin-top: 8px; }
.mt-form .choice span { gap: 6px; }
.mt-form .choice svg { width: 16px; height: 16px; }
/* Seguimiento */
.mt-req { border: 1px solid var(--border); border-left: 4px solid var(--mt); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.mt-req > .row.between { flex-wrap: nowrap; }
.mt-close-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); border-left: 4px solid var(--mt); flex-wrap: wrap; }
.mt-close-main { display: grid; text-align: left; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; flex: 1 1 180px; }
.mt-close-main:hover b { color: var(--brand); }
/* Disponibilidad */
.mt-hours { display: grid; gap: 2px; }
.mt-hday { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.mt-ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.mt-range { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mt-range .input { width: 96px; min-height: 30px; padding: 2px 6px; }
.mt-sw { align-items: flex-start; }
.mt-sw .track { margin-top: 2px; }
.mt-rules { display: grid; gap: 8px; }
.mt-rules label { display: flex; justify-content: space-between; align-items: center; gap: 6px 10px; font-size: .88rem; flex-wrap: wrap; }
.mt-prev { display: grid; gap: 2px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: .86rem; }
.mt-prev span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.mt-blrow { padding: 6px 0; border-bottom: 1px dashed var(--border); flex-wrap: nowrap; }
/* Tipos */
.mt-type { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.mt-type .mt-dot { width: 14px; height: 14px; margin-top: 4px; }
.mt-type svg.ic { width: 14px; height: 14px; }
.mt-mini { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); border-left: 3px solid var(--mt); color: var(--text); text-decoration: none; font-size: .86rem; min-width: 0; }
.mt-mini:hover { text-decoration: none; border-color: var(--mt); }
.mt-mini .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Cliente */
.mtc-hero { padding: 20px; border-top: 4px solid var(--mt); display: grid; gap: 12px; }
.mtc-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mtc-kicker { display: inline-flex; gap: 6px; align-items: center; font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.mtc-hero h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mtc-when { display: grid; gap: 2px; }
.mtc-when b { font-size: 1.15rem; }
.mtc-when span { color: var(--text-2); font-size: .9rem; }
.mtc-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }
.mtc-mode-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--mt) 16%, var(--surface)); color: var(--mt); }
.mtc-mode-ic svg { width: 20px; height: 20px; }
.mtc-agenda { padding: 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: .9rem; }
.mtc-agenda b { display: block; margin-bottom: 4px; }
.mtc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mtc-bookbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 1px dashed var(--border-strong); border-radius: 14px; flex-wrap: wrap; }
.mtc-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); border-left: 4px solid var(--mt); }
.mtc-item-main { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.mtc-item-main > span { overflow-wrap: anywhere; }
.mtc-item-main svg.ic { width: 14px; height: 14px; }
.mtc-sum { margin-top: 4px; font-size: .86rem; }
.mtc-sum summary { cursor: pointer; color: var(--brand); font-weight: 650; }
.mtc-sum summary svg { width: 14px; height: 14px; }
.mtc-step { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1rem; }
.mtc-step > span { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-fill); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none; }
.mtc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.mtc-type { display: grid; gap: 3px; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px; border-radius: 14px; border: 1px solid var(--border); border-left: 4px solid var(--mt); background: var(--surface); }
.mtc-type:hover { border-color: var(--mt); }
.mtc-type[aria-pressed="true"] { background: color-mix(in srgb, var(--mt) 12%, var(--surface)); border-color: var(--mt); box-shadow: 0 0 0 2px var(--mt); }
.mtc-type svg.ic { width: 14px; height: 14px; }
.mtc-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.mtc-day { flex: none; width: 72px; display: grid; justify-items: center; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.mtc-day:hover { border-color: var(--brand); }
.mtc-day span { font-size: .7rem; text-transform: uppercase; font-weight: 700; color: var(--text-3); }
.mtc-day b { font-size: 1.3rem; line-height: 1.2; }
.mtc-day small { font-size: .72rem; color: var(--text-3); }
.mtc-day i { font-style: normal; font-size: .62rem; color: var(--ok-ink); font-weight: 700; margin-top: 2px; }
.mtc-day[aria-pressed="true"] { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.mtc-day[aria-pressed="true"] span, .mtc-day[aria-pressed="true"] small, .mtc-day[aria-pressed="true"] i { color: #fff; }
.mtc-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.mtc-time { min-height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--text); }
.mtc-time:hover { border-color: var(--brand); color: var(--brand); }
.mtc-time[aria-pressed="true"] { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.mtc-confirm { display: grid; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--border); }
.mtc-sumbox { display: grid; gap: 2px; padding: 12px; border-radius: 12px; border-left: 4px solid var(--mt); background: color-mix(in srgb, var(--mt) 10%, var(--surface)); }
.mtc-sumbox span { color: var(--text-2); font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mtc-sumbox svg.ic { width: 14px; height: 14px; }
/* Sesiones en grupo y bonos */
.mt-chip span svg.ic, .mt-row-main b svg.ic { width: 13px; height: 13px; }
.mt-check { align-self: end; padding-bottom: 8px; }
.mt-type-meta { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.mt-bonoline { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-soft-ink); font-size: .86rem; }
.mt-bonoline svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.mt-cap { display: grid; gap: 6px; font-size: .88rem; }
.mt-cap-bar, .mt-bono-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mt-cap-bar i, .mt-bono-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.mt-cap-bar i { background: var(--mt, var(--brand)); }
.mt-seats { display: grid; gap: 6px; }
.mt-seat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.mt-seat-who { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; flex: 1 1 140px; }
.mt-seat-who:hover { text-decoration: none; }
.mt-seat-who:hover b { color: var(--brand); }
.mt-seat-who .avatar { width: 30px; height: 30px; font-size: .74rem; }
.mt-pos { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info-ink); font-size: .76rem; font-weight: 800; flex: none; }
.mt-bonos { display: grid; gap: 10px; }
.mt-bono { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.mt-bono.off { background: var(--surface-2); }
.mt-bono.off .mt-bono-bar i { background: var(--text-3); }
.mt-bono-who { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.mt-bono-who:hover { text-decoration: none; color: var(--brand); }
.mt-bono-who .avatar { width: 30px; height: 30px; font-size: .74rem; }
.mt-ended > summary { cursor: pointer; list-style: none; }
.mt-ended > summary::-webkit-details-marker { display: none; }
.mt-ended:not([open]) > summary { border-bottom: 0; }
.mt-pack { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); }
.mt-howto { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.mtc-groups { display: grid; gap: 10px; }
.mtc-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); border-left: 4px solid var(--mt); flex-wrap: wrap; }
.mtc-group-main { display: grid; gap: 3px; min-width: 0; flex: 1 1 220px; }
.mtc-group-main b { overflow-wrap: anywhere; }
.mtc-group-main svg.ic { width: 14px; height: 14px; }
.mtc-group-act { flex: none; }
.mtc-seats { font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mtc-seats.ok { color: var(--ok-ink); }
.mtc-seats.full { color: var(--warn-ink); }
.mtc-wait { border-color: var(--info); }
.mtc-wait .mtc-item { flex-wrap: wrap; }
.mtc-wait .mtc-item-main { flex: 1 1 190px; }
.mtc-wait .mtc-item > .row { margin-left: auto; }
.mtc-item.free { border-color: var(--ok); background: var(--ok-soft); }
.mtc-bono { display: grid; gap: 6px; }
.mtc-bono.off { opacity: .7; }
.mtc-type.locked { opacity: .65; cursor: not-allowed; }
.mtc-bonotag { font-size: .76rem; font-weight: 700; color: var(--brand-soft-ink); display: inline-flex; gap: 4px; align-items: center; }
.mtc-bonotag.no { color: var(--warn-ink); }
@media (max-width: 560px) { .mtc-group-act, .mtc-group-act .btn { width: 100%; } }
@media (max-width: 760px) {
  /* Una sola columna sin saltos (nowrap): con wrap, la línea tomaba el ancho del periodo entero, que no se parte, y a
     320-360 px «Miércoles 30 de septiembre» ensanchaba la página en vez de acabar en «…» */
  .mt-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .mt-period { flex: 1; font-size: 1.05rem; }
  .mt-tools { justify-content: space-between; }
  .mt-tools .segmented { width: 100%; }
  .mt-tools .segmented button { flex: 1; }
  .mt-tools > .btn { flex: 1; }
  .mt-grid-wrap { max-height: calc(100vh - 320px); }
  .mt-month .cc-day { min-height: 0; }
  .mt-type { padding: 12px 16px; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .mt-hday { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mtc-actions .btn { flex: 1 1 100%; }
  .mtc-hero { padding: 16px; }
}

/* ======================= Captación: test, reserva, opiniones, trae a un amigo ======================= */
.hero-quiz { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: inherit; font-size: .9rem; text-decoration: none; max-width: 100%; transition: background .2s, border-color .2s; }
.hero-quiz:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); text-decoration: none; }
.hero-quiz svg { width: 18px; height: 18px; flex: none; color: var(--accent, #ffb347); }
.hero-quiz span { min-width: 0; }
.rv-stars { display: inline-flex; gap: 2px; }
.rv-star { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--border); line-height: 0; }
.rv-star svg { width: 26px; height: 26px; fill: currentColor; stroke: currentColor; }
.rv-star.on { color: #f5b301; }
.rv-stars.static .rv-star { cursor: default; padding: 0; }
.rv-stars.static .rv-star svg { width: 16px; height: 16px; }
.rv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rv-card { margin: 0; padding: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.rv-card blockquote { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--text); flex: 1; }
.rv-card blockquote::before { content: "“"; color: var(--brand); font-weight: 800; margin-right: 2px; }
.rv-card blockquote::after { content: "”"; color: var(--brand); font-weight: 800; margin-left: 2px; }
.rv-card figcaption { display: flex; flex-direction: column; font-size: .85rem; color: var(--text-3); }
.rv-card figcaption b { color: var(--text); }
.quiz-wrap { max-width: 980px; }
.quiz-card { max-width: 680px; margin: 0 auto; }
.quiz-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 14px; }
.quiz-progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.quiz-q { font-size: 1.3rem; letter-spacing: -.02em; margin: 4px 0 16px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.quiz-opt svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.quiz-opt:hover, .quiz-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.quiz-opt:hover svg, .quiz-opt.on svg { color: var(--brand); }
.quiz-opt:active { transform: scale(.99); }
.quiz-result { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.quiz-tips { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--text-2); }
.quiz-tips li::marker { color: var(--brand); font-weight: 700; }
.book-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.book-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.book-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.book-day span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.book-day b { font-size: 1.35rem; color: var(--text); line-height: 1.1; }
.book-day small { font-size: .74rem; }
.book-day:hover, .book-day.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.book-day.on b { color: var(--brand-soft-ink); }
.book-times { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.on { border-color: var(--brand-fill); background: var(--brand-fill); color: #fff; }
.book-pick { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); }
.book-pick svg { width: 18px; height: 18px; }
.lead-booking { border-color: var(--warn); }
.capt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.capt-stat { padding: 12px 14px; border-radius: 14px; background: var(--surface-2, var(--surface-3)); display: flex; flex-direction: column; gap: 2px; }
.capt-stat b { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.1; }
.capt-stat span { font-size: .8rem; color: var(--text-3); font-weight: 600; display: flex; flex-direction: column; }
.capt-stat small { font-weight: 500; }
.ref-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.ref-code b { font-size: 1.35rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.proposal-callout { align-items: center; }
.proposal-callout > .row { flex: none; }
@media (max-width: 900px) {
  .rv-grid { grid-template-columns: 1fr 1fr; }
  .capt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz-result, .book-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rv-grid { grid-template-columns: 1fr; }
  .capt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-quiz { border-radius: 16px; align-items: flex-start; }
  .hero-quiz svg:last-child { display: none; }
  .quiz-q { font-size: 1.15rem; }
  .proposal-callout { flex-wrap: wrap; }
  .proposal-callout > .row { width: 100%; justify-content: flex-end; }
}

/* ======================= Anatomía 3D ======================= */
.anat-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.anat-stage { position: sticky; top: 76px; overflow: hidden; }
.anat-canvas-wrap { position: relative; height: min(72vh, 680px); min-height: 420px; background: radial-gradient(ellipse at 50% 35%, var(--brand-soft) 0%, transparent 60%), linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }
.anat-canvas { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.anat-tip { position: absolute; pointer-events: none; padding: 5px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: .82rem; font-weight: 650; white-space: nowrap; box-shadow: var(--shadow); z-index: 2; }
.anat-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--border); }
.anat-tools .anat-hint { margin-left: auto; }
#anat-rotate[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-soft-ink); }
.anat-nogl { height: 100%; display: grid; place-items: center; padding: 24px; }
.anat-panel { padding: 0; overflow: hidden; }
.anat-search { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.anat-region { display: grid; gap: 5px; }
.anat-region-l { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.anat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.anat-chips .chip { font-size: .8rem; padding: 4px 11px; }
.anat-detail { padding: 16px; min-height: 260px; }
.anat-head { display: flex; align-items: flex-start; gap: 10px; }
.anat-title { font-size: 1.45rem; letter-spacing: -.02em; margin: 6px 0 2px; }
.anat-summary { font-size: 1rem; color: var(--text-2); margin: 10px 0 12px; }
.anat-tabs { margin-bottom: 14px; }
.anat-tabs button { padding: 8px 10px; font-size: .85rem; }
.anat-h { display: flex; align-items: center; gap: 7px; font-size: .95rem; margin: 0 0 8px; }
.anat-h svg { width: 17px; height: 17px; color: var(--brand); }
.anat-h .count { font-size: .72rem; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.anat-list { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--text-2); font-size: .93rem; }
.anat-list li::marker { color: var(--brand); }
.anat-train { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anat-train > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2, var(--surface-3)); display: flex; flex-direction: column; gap: 2px; }
.anat-train span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.anat-train b { font-size: .9rem; }
.anat-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.anat-ex li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); font-size: .9rem; }
.anat-combat { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #18181a, #2e1316); color: #f2f2f4; }
.anat-combat svg { width: 26px; height: 26px; flex: none; color: var(--accent); margin-top: 2px; }
.anat-combat p { margin: 0; color: #e6e6ea; }
@media (max-width: 900px) {
  .anat-grid { grid-template-columns: 1fr; }
  .anat-stage { position: static; }
  .anat-canvas-wrap { height: min(62vh, 520px); min-height: 360px; }
  .anat-tools .anat-hint { margin-left: 0; width: 100%; }
  .anat-train { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .anat-canvas-wrap { height: 58vh; min-height: 320px; }
  .anat-train { grid-template-columns: 1fr; }
  .anat-ex li { flex-wrap: wrap; }
}

/* Pantallas bloqueadas («Próximamente»): Anatomía 3D y, mientras su interruptor esté apagado, Nutrición
   (.soon-screen*, que pinta BC.nutrition.soonHTML con el mismo marcado) */
/* Entradas «Pronto» (menú y pestañas): atenuadas con el color, no con la opacidad, que bajaba el texto, el glifo y el
   chip por debajo del mínimo; el candado y «Pronto» ya dicen que aún no está. La activa y al pasar el ratón, en tinta */
.sidebar a.soon, nav a.soon { color: var(--text-3); }
.sidebar a.soon .count, nav a.soon .count { color: var(--text-2); }
.sidebar a.soon .count svg, nav a.soon .count svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }
.anat-soon, .soon-screen { display: grid; place-items: center; min-height: 60vh; }
.anat-soon-card, .soon-screen-card { max-width: 560px; text-align: center; display: grid; justify-items: center; gap: 6px; padding: 36px 28px; }
.anat-soon-ic, .soon-screen-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand-soft-ink); display: grid; place-items: center; margin-bottom: 8px; }
.anat-soon-ic svg, .soon-screen-ic svg { width: 30px; height: 30px; }
.anat-soon-card .row, .soon-screen-card .row { justify-content: center; margin-top: 8px; }
/* Dentro de una pestaña de la ficha del cliente no hace falta ocupar media pantalla */
#tab-body .soon-screen { min-height: 0; padding: 8px 0 16px; }
@media (max-width: 640px) { .anat-soon-card, .soon-screen-card { padding: 28px 18px; } }

/* ================= v1.20 · Adjuntos del chat, grupos y reloj ================= */
/* Compositor de mensajes: adjuntar, texto, micrófono y enviar */
.chat-form.cmp { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.cmp [hidden], .gd-c[hidden] { display: none !important; }
.cmp-row { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.cmp-row textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; resize: none; line-height: 1.4; padding-top: 10px; padding-bottom: 10px; }
.cmp-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--text-2); }
.cmp-btn:hover { color: var(--brand); background: var(--brand-soft); }
.cmp-send { flex: none; min-height: 44px; }
.cmp-quick { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; align-items: center; }
.cmp-quick::-webkit-scrollbar { display: none; }
.cmp-quick > * { flex: none; }
.cmp-opts { gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.cmp-rec, .cmp-up { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; font-size: .92rem; color: var(--text-2); flex-wrap: wrap; }
.cmp-rec b { font-variant-numeric: tabular-nums; color: var(--text); }
.cmp-up .spinner { width: 18px; height: 18px; border-width: 2px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: recPulse 1.1s ease-in-out infinite; flex: none; }
@keyframes recPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.cmp-locked { display: flex; gap: 8px; align-items: center; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); color: var(--text-3); font-size: .9rem; border-top: 1px solid var(--border); }
.cmp-locked svg.ic { flex: none; width: 16px; height: 16px; }
@media (max-width: 520px) { .cmp-send-lbl { display: none; } .cmp-send { width: 44px; padding: 0; justify-content: center; } .cmp-btn { width: 40px; } }

/* Adjuntos dentro de los mensajes */
.msg-att { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.msg.mine .msg-att { justify-items: end; }
.att-img { position: relative; display: block; width: min(260px, 64vw); max-width: 100%; max-height: 420px; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.att-img.ready img { opacity: 1; }
.att-spin { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.att-img.ready .att-spin { display: none; }
.att-img.failed .att-spin { animation: none; border-color: var(--bad); }
.att-audio { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.att-audio > svg.ic { width: 18px; height: 18px; flex: none; color: var(--brand); }
.att-audio audio { height: 36px; width: min(240px, 52vw); max-width: 100%; }
.att-audio.failed { border-color: var(--bad); }
.att-dur { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--text-3); flex: none; }
.att-file { display: flex; align-items: center; gap: 10px; max-width: min(320px, 72vw); padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.att-file:hover { border-color: var(--brand); }
.att-file > svg.ic { width: 22px; height: 22px; flex: none; color: var(--bad); }
.att-file > svg.ic:last-child { width: 18px; height: 18px; color: var(--text-3); }
.att-file.busy { opacity: .6; pointer-events: none; }
.att-fname { display: grid; min-width: 0; flex: 1; }
.att-fname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.att-fname small { color: var(--text-3); font-size: .76rem; }
.msg-del { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 26px; margin-left: 2px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; opacity: .65; }
.msg-del:hover, .msg-del:focus-visible { opacity: 1; color: var(--bad); background: var(--bad-soft); }
.msg-del svg.ic { width: 14px; height: 14px; }
.photo-modal { width: min(960px, 96vw); max-width: min(960px, 96vw); }
.photo-view { display: grid; place-items: center; min-height: 220px; }
.photo-view img { max-width: 100%; max-height: 72vh; border-radius: 12px; }

/* Grupos */
.chat-tabs { margin-bottom: 12px; }
.g-list { overflow: hidden; }
.g-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; min-width: 0; }
.g-item:last-child { border-bottom: 0; }
.g-item:hover { background: var(--surface-2); }
.g-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.g-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-last { font-size: .86rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item.has-unread .g-last { color: var(--text); font-weight: 600; }
.g-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.g-badge { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: .88rem; letter-spacing: .02em; }
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g-layout { grid-template-columns: minmax(0, 1fr); } }
.g-chat .card-head { gap: 8px; }
.g-head { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.g-head-txt { display: grid; min-width: 0; }
.g-head .g-badge { width: 38px; height: 38px; }
.g-desc { padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.g-members { list-style: none; margin: 0; padding: 0; }
.g-members li { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--border); min-width: 0; flex-wrap: nowrap; }
.g-members li > .badge, .g-members li > .btn { flex: none; }
.g-members li:first-child { border-top: 0; }
.g-members .grow { display: grid; min-width: 0; }
.avatar-sm { width: 30px; height: 30px; font-size: .74rem; }
.g-av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: .58rem; font-weight: 800; flex: none; }
.chat-sys { align-self: center; max-width: 90%; text-align: center; font-size: .78rem; color: var(--text-3); background: var(--surface-2); padding: 3px 12px; border-radius: 999px; }
.chat-new { display: flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.chat-new::before, .chat-new::after { content: ""; flex: 1; height: 1px; background: var(--brand); opacity: .35; }
.msg.notice .msg-bubble, .msg.notice.mine .msg-bubble, .msg.notice.from-trainer:not(.mine) .msg-bubble { background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn); }
.msg-notice { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--warn-ink); }
.msg.mine .msg-notice { justify-self: end; }
.msg-notice svg.ic { width: 14px; height: 14px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.msg.mine .reacts { justify-content: flex-end; }
.react-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: .82rem; cursor: pointer; }
.react-chip b { font-weight: 700; font-size: .76rem; }
.react-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.react-add { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 6px; border: 1px dashed var(--border-strong); border-radius: 999px; background: none; color: var(--text-3); cursor: pointer; opacity: .55; }
.react-add svg.ic { width: 14px; height: 14px; }
.react-add svg.ic + svg.ic { width: 10px; height: 10px; margin-left: -2px; }
.msg:hover .react-add, .react-add:focus-visible { opacity: 1; }
@media (pointer: coarse) { .react-add { opacity: .8; min-height: 32px; } .react-chip { min-height: 32px; } .msg-del { min-width: 32px; min-height: 32px; } }
.gd-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 4px 10px; max-height: 44vh; overflow-y: auto; padding: 2px; }
.gd-c { min-height: 36px; }
.g-inv-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.g-inv-head b { overflow-wrap: anywhere; }

/* Reloj y descanso */
.dev-stats .stat-value { font-size: 1.45rem; }
.dev-acts { list-style: none; margin: 0; padding: 0; }
.dev-acts li { display: flex; align-items: center; gap: 10px 14px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dev-acts li:first-child { border-top: 0; }
.dev-act-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dev-act-ctl .select { width: auto; }
.dev-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.dev-link:last-of-type { border-bottom: 0; padding-bottom: 0; }
.dev-link > .grow { flex: 1 1 180px; min-width: 0; } /* en el móvil, el logo y el texto en la misma línea; el botón debajo */
.dev-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.dev-polar { background: #d10a11; } .dev-strava { background: #fc4c02; } .dev-demo { background: #18181a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); } /* en negro: el rojo ya es el de Polar */
.seg-scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { flex: none; }

/* ================= v1.20 · Propuesta de la IA (desde la 1.22, el informe de la semana) ================= */
.ai-draft { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); background: var(--brand-soft); color: var(--text); }
.ai-draft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--brand-soft-ink); }
.ai-badge svg.ic { width: 16px; height: 16px; }
.ai-draft .text-2 { color: var(--text-2); }
.badge.dec-progresar { background: var(--ok-soft); color: var(--ok-ink); }
.badge.dec-mantener { background: var(--info-soft); color: var(--info-ink); }
.badge.dec-descargar { background: var(--warn-soft); color: var(--warn-ink); }
.ai-adj { display: grid; gap: 6px; }
.ai-adj .label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.ai-adj-item { align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.ai-adj-item > span { display: grid; gap: 2px; min-width: 0; }
.ai-adj-item small { color: var(--text-2); font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.ai-adj-item input { margin-top: 3px; flex: none; }
.ai-note { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; color: var(--text-2); padding: 6px 2px; }
.ai-note svg.ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--info); }
.ai-applied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); font-size: .88rem; }
.ai-applied svg.ic { width: 18px; height: 18px; flex: none; }
.ai-applied .grow { min-width: 0; overflow-wrap: anywhere; }

/* ================= App instalable: aviso «Instala la app» (push.js) ================= */
.modal.install { width: min(480px, 100%); }
.ins-app { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ins-app img { width: 52px; height: 52px; border-radius: 13px; box-shadow: var(--shadow); flex: none; }
.ins-app b { display: block; font-size: 1rem; }
.ins-app span { font-size: .82rem; color: var(--text-3); }
.ins-perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ins-perks li { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 10px 6px 11px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-soft-ink); text-align: center; font-size: .76rem; line-height: 1.3; }
.ins-perks li svg { width: 20px; height: 20px; }
.ins-perks b { display: block; font-size: .8rem; }
.ins-perks small { font-size: inherit; }
.ins-h { margin: 18px 0 0; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.ins-steps { list-style: none; counter-reset: ins; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.ins-steps li { counter-increment: ins; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .92rem; line-height: 1.55; }
.ins-steps li::before { content: counter(ins); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-fill); color: var(--brand-ink); font-weight: 700; font-size: .8rem; }
/* El botón tal y como se ve en el navegador (Compartir, Añadir a pantalla de inicio, ⋯) */
.ins-key { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-2); font-weight: 650; font-size: .86rem; line-height: 1.6; white-space: nowrap; }
.ins-key svg { width: 15px; height: 15px; color: var(--info); }
.ins-url { font-family: var(--mono); font-size: .86rem; overflow-wrap: anywhere; }
.ins-pc { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }
.ins-note { margin: 16px 0 0; font-size: .8rem; color: var(--text-3); }
@media (max-width: 360px) { .ins-key { white-space: normal; } }
/* Móviles bajos (iPhone SE en Safari): los pasos, a la vista sin desplazar la hoja */
@media (max-height: 720px) {
  .modal.install .modal-head p, .ins-perks small { display: none; }
  .ins-app img { width: 40px; height: 40px; border-radius: 10px; }
  .ins-perks li { padding: 8px 4px; }
  .ins-h { margin-top: 14px; }
}
@media (max-height: 600px) { .ins-app { display: none; } .ins-perks { margin-top: 0; } }

/* App instalada en iPhone: la barra de estado es translúcida (index.html) y la página llega hasta arriba del todo.
   Se reserva la franja de la hora y la cámara con el negro de la marca, sobre el que se lee el texto blanco de iOS,
   y abajo, el espacio de la barra de inicio. En el navegador, en Android y en el ordenador estos márgenes miden 0. */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: #18181a; z-index: 130; pointer-events: none; } /* el theme-color de index.html y del manifiesto */
.main, main.bare { padding-top: env(safe-area-inset-top, 0px); }
.topbar, .ses-top { top: env(safe-area-inset-top, 0px); }
.pub-nav { padding-top: env(safe-area-inset-top, 0px); }
.sidebar { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (max-width: 760px) { .shell.role-client .content { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 640px) {
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .modal-body:last-child { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* ================= Entrar con Face ID o huella (bio.js) ================= */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; color: var(--text-3); font-size: .82rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.modal.bio { width: min(440px, 100%); }
.bio-hero { display: grid; place-items: center; width: 72px; height: 72px; margin: 2px auto 14px; border-radius: 22px; background: var(--brand-soft); color: var(--brand-soft-ink); }
.bio-hero svg { width: 38px; height: 38px; }

/* ---------- v1.21 · Contrato y firma (grupo B: contract.js, views/contract.js y views/trainer-contract.js) ---------- */
/* Pantalla del cliente (#/c/contrato, sin menú): columna de lectura cómoda en el móvil, con hueco abajo para que el aviso
   de cookies o la barra de inicio del iPhone no tapen «Firmar el contrato» */
.contract-gate { max-width: 760px; margin: 0 auto; padding: 0 16px calc(160px + env(safe-area-inset-bottom, 0px)); }
.ct-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 60px; margin: 0 -16px 4px; padding: 8px 12px 8px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.ct-top .brand { flex: 1 1 auto; min-width: 0; font-size: 1rem; }
.ct-top .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-top .brand small { color: var(--text-2); } /* sobre la cabecera translúcida, con margen por lo que pase por debajo */
.ct-top .save-state .lbl { display: none; }
.ct-hero { padding: 18px 2px 14px; }
.ct-hero h1 { font-size: clamp(1.35rem, 5.2vw, 1.85rem); margin: 6px 0 6px; overflow-wrap: anywhere; }
.ct-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--brand-soft-ink); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }
.ct-kicker svg.ic { width: 15px; height: 15px; }
.ct-step { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ct-step > svg.ic { color: var(--brand); }
.ct-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-fill, var(--brand)); color: var(--brand-ink, #fff); font-size: .85rem; font-weight: 800; flex: none; }
.ct-sum { padding-bottom: 6px; }
.ct-essentials { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ct-essentials li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-2); line-height: 1.45; }
.ct-essentials li > svg.ic { flex: none; margin-top: 2px; color: var(--brand); }
/* Texto del contrato: letra de más de 2,5 mm (art. 80 TRLGDCU) y una caja con desplazamiento propio para no perder el formulario */
.contract-doc.legal { max-width: none; margin: 0; padding: 6px 20px 18px; max-height: min(58vh, 560px); overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--border); overscroll-behavior: contain; }
.contract-doc.legal h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--text); }
.contract-doc.legal p, .contract-doc.legal li { font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.contract-doc.legal ul { padding-left: 20px; margin: 0 0 1em; }
.contract-doc:focus-visible { box-shadow: inset var(--focus-ring); border-radius: 0; } /* el anillo en tinta de toda la app, por dentro de la caja */
.ct-foot { justify-content: flex-start; }
.ct-foot .btn, .sig-actions .btn { white-space: normal; text-align: left; }
.ct-docin { text-transform: uppercase; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.ct-err { display: block; font-size: .85rem; font-weight: 600; color: var(--bad-ink); }
.ct-err:empty { display: none; }
/* Recuadro de firma: siempre blanco (también en oscuro), sin que el dedo desplace la página */
.sig-wrap { display: grid; gap: 6px; }
.sig-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sig-pad { position: relative; height: 180px; background: #fff; border: 2px dashed var(--border-strong); border-radius: 14px; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sig-pad .sig-hint { position: absolute; left: 0; right: 0; top: 42%; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; gap: 6px; color: #656b88; font-size: .95rem; pointer-events: none; } /* el --text-3 del tema claro, fijo: el recuadro es blanco también en oscuro (5,2:1) */
.sig-pad .sig-line { position: absolute; left: 22px; right: 22px; bottom: 40px; border-bottom: 1.5px solid #c9ccd6; pointer-events: none; }
.sig-pad.has-ink .sig-hint { display: none; }
.sig-pad.is-invalid { border-color: var(--bad); }
.sig-typed-box { display: flex; align-items: center; justify-content: center; padding: 0 16px 24px; }
.sig-typed { font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", "Apple Chancery", cursive; font-style: italic; font-size: clamp(1.5rem, 7vw, 2.2rem); color: #16181d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sig-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.sig-actions .linklike { text-align: right; }
@media (pointer: coarse) { .sig-actions .linklike { min-height: 38px; } }
/* Dudas antes de firmar: hilo corto con las respuestas del entrenador */
.ct-thread { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.ct-msg { justify-self: start; max-width: 92%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.ct-msg.me { justify-self: end; border-radius: 14px 14px 4px 14px; background: var(--brand-soft); color: var(--brand-soft-ink); border-color: transparent; }
.ct-msg > span { display: block; font-size: .72rem; font-weight: 700; color: var(--text-3); margin-bottom: 2px; white-space: normal; }
.ct-msg.me > span { color: inherit; opacity: .8; }
/* Firmado */
.contract-done { text-align: center; display: grid; justify-items: center; gap: 4px; }
.contract-done h1 { font-size: 1.5rem; margin: 0 0 4px; }
.contract-done p { max-width: 520px; margin: 0 auto 6px; }
.ct-done-actions { justify-content: center; margin-top: 8px; }
@media (max-width: 480px) { .ct-done-actions .btn { width: 100%; } }
.ct-hash { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; word-break: break-all; }
.ct-sigs { display: grid; gap: 12px; }
.ct-sig-imgs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ct-sig-img { width: 220px; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.ct-renewals { justify-content: flex-start; align-items: center; gap: 6px; }
.ct-renewals .label { margin-right: 4px; }
/* Ficha del cliente: los datos a la izquierda y las firmas a la derecha. Si los datos se fueran a quedar en menos de
   280 px (el móvil o una tarjeta estrecha, como las de dos columnas de la ficha hasta unos 1280 px), las firmas bajan
   debajo de los datos; con una columna fija para las firmas, los datos llegaban a 0-145 px y se partían letra a letra */
.ct-card-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.ct-card-grid > .kv { flex: 1 1 280px; min-width: 0; }
.ct-card-grid .ct-sig-img { width: 150px; }
/* Con dos firmas (menor y su madre, padre o tutor), una debajo de otra: en fila ocupaban 310 px */
@media (min-width: 521px) { .ct-card-grid .ct-sig-imgs { flex-direction: column; flex-wrap: nowrap; } }
.ct-evidence th { width: 34%; text-transform: none; letter-spacing: 0; font-size: .8rem; white-space: normal; position: static; }
.ct-evidence td { overflow-wrap: anywhere; word-break: break-word; font-size: .85rem; }
.ct-modal-doc.legal { max-height: none; border: 1px solid var(--border); border-radius: 12px; }
/* Ajustes › Contrato */
.ct-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-vars .chip { font-family: var(--mono); font-size: .76rem; cursor: pointer; }
.ct-editor { align-items: start; }
.ct-text { min-height: 420px; font-family: var(--mono); font-size: .84rem; line-height: 1.5; }
.ct-preview .contract-doc.legal { max-height: 560px; border: 1px solid var(--border); border-radius: 12px; }
.ct-publish { align-items: center; }
.ct-publish-note { padding-top: 0; }
.ct-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ct-stat b { font-size: 1.5rem; line-height: 1.1; }
.ct-stat span { font-size: .8rem; color: var(--text-3); }
.ct-stat.warn b { color: var(--warn-ink); }
.ct-pend { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
@media (max-width: 760px) { .ct-text { min-height: 300px; } .ct-publish .btn { flex: 1 1 auto; } }
/* Copia imprimible (plan B mientras no hay PDF propio): solo se imprime el contrato */
.ct-print { display: none; }
@media print {
  body.ct-printing > *:not(.ct-print) { display: none !important; }
  body.ct-printing > .ct-print { display: block !important; max-width: none; padding: 0; color: #000; }
  .ct-print .ct-sig-img { width: 60mm; border: 0; padding: 0; }
  .contract-doc.legal { max-height: none; overflow: visible; }
}

/* ---------- v1.21 · Informe de progreso y revisión semanal (grupo D) ---------- */
/* Pestaña «Informe de progreso» (entrenador): opciones y vista previa */
.pr-secs-box { border: 0; padding: 0; margin: 0; min-width: 0; }
.pr-secs-box > legend { padding: 0; margin-bottom: 8px; }
.pr-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.pr-range .small { display: block; line-height: 1.5; padding-top: 9px; }
@media (max-width: 760px) { .pr-range .small { padding-top: 0; } }
.pr-actions .btn { flex: 0 1 auto; }
.pr-report { grid-template-columns: minmax(0, 1fr); } /* las tablas y gráficas anchas no ensanchan la página en el móvil */
.pr-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pr-photos .ph-item img { cursor: default; }
@media (max-width: 520px) {
  .pr-actions .btn { flex: 1 1 100%; }
  .pr-secs { grid-template-columns: minmax(0, 1fr); }
}

/* Impresión (informe mensual, informe de progreso sin motor de PDF y test): gráficas al ancho de la página,
   fotos acotadas y el comentario como texto (los cuadros de texto no se imprimen) */
@media print {
  .chart-box svg { width: 100% !important; height: auto !important; }
  .chart-box { min-height: 0 !important; }
  .pr-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-photos img { max-height: 70mm; }
  .report textarea { display: none !important; }
  .report .legend { break-inside: avoid; }
  .pr-report .stat-value { white-space: nowrap; font-size: 1.3rem; }
}

/* ---------- v1.21 · E1: calculadora de RM con Brzycki, RPE de la semana, indicaciones del entrenador y combate en «Mi ficha» ---------- */
/* Calculadora: las notas van debajo de cada tabla, fuera de su desplazamiento horizontal, y el botón
   «Guardar como mi 1RM de …» admite nombres de ejercicio largos sin salirse de la pantalla */
.rm-note { margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .rm-note { padding: 10px 16px 12px; } }
.btn.rm-save { white-space: normal; text-align: left; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }

/* «RPE de la semana @x» (Mi semana y «Entrenando»): chip que explica el valor al tocarlo */
.cw-wrpe { margin-top: 6px; }
.rpe-week { font-size: .76rem; font-weight: 650; line-height: 1.6; }
.rpe-week b { font-weight: 800; }
@media (pointer: coarse) { .rpe-week { min-height: 28px; padding: 3px 11px; } }

/* «Indicaciones de Benayas:» en las anotaciones de cada ejercicio */
.cx-notes > svg.ic { color: var(--brand); }
.cx-notes .note-by { color: var(--text); font-weight: 750; }
.ses-note .note-by { font-weight: 800; }

/* Tarjeta del próximo combate en «Mi ficha»: el espacio entre tarjetas ya lo pone .stack */
.stack > .fight-card { margin-bottom: 0; }

/* ---------- v1.21 · Programación: duración de la rutina, RPE por semana y notas para el cliente (E2) ---------- */

/* Notas para el cliente en cada ejercicio: más altas y, cuando tienen texto, con una franja de marca a la
   izquierda (no un borde rojo entero, que con la paleta roja parecería un error) */
.c-notes-lbl { display: flex; align-items: center; gap: 5px; margin: 0 0 4px; font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.c-notes-lbl svg { width: 13px; height: 13px; flex: none; }
.ex-row .c-notes .textarea { min-height: 52px; height: 52px; }
.ex-row .c-notes .textarea:focus { height: 96px; }
.ex-row .c-notes .textarea:not(:placeholder-shown):not(:focus) { box-shadow: inset 3px 0 0 var(--brand); }
@media (min-width: 1421px) { .c-notes-lbl { display: none; } } /* con la rejilla ya lo dice la cabecera de columnas (sección 12) */
@media (max-width: 1420px) {
  .ex-row .c-notes .textarea { height: auto; min-height: 56px; }
  .ex-row .c-notes .textarea:focus { height: auto; min-height: 96px; }
}

/* Barra de la semana: en el móvil el selector de semana ocupa su fila y «Bloque» y «RPE semana» van juntos */
@media (max-width: 640px) {
  .week-bar .week-nav { width: 100%; }
  .week-bar .week-nav .select { flex: 1; min-width: 0; }
}
.metrics-panel .wk-rpe-mean { white-space: nowrap; }

/* Modal «Duración de la rutina»: una tarjeta por semana (4 por fila; 2 en el móvil con .col-3) */
.wr-week { gap: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.wr-week > label:first-child { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-week .check { font-size: .82rem; }
.wr-week.is-deload { border-style: dashed; border-color: var(--border-strong); background: var(--surface); }
.wr-modes .check { align-items: flex-start; }
.wr-modes .badge { vertical-align: 1px; }
.wr-quick .btn { flex: 0 1 auto; }

/* Propuesta de «Generar rutina»: la anotación para el cliente ocupa toda la fila del ejercicio */
.pe-row .pe-notes { grid-column: 1 / -1; font-size: .82rem; }
.pe-row .pe-notes:not(:placeholder-shown):not(:focus) { box-shadow: inset 3px 0 0 var(--brand); }

/* Análisis › ciclos: fila «RPE pautado / hecho» */
.cal td.rpe-ph { height: auto; padding: 2px 3px; line-height: 1.15; font-size: .68rem; }
.cal td.rpe-ph b { font-weight: 750; color: var(--text-2); }
.cal td.rpe-ph b.calc { font-style: italic; font-weight: 600; color: var(--text-3); }

/* ==========================================================================
   v1.21 · F · Biblioteca de ejercicios con la base de Benayas: filtros con
   recuento, etiquetas del entrenador, aviso tras la fusión y tabla del móvil
   (sin las columnas técnicas y con el nombre acotado; la tabla sigue
   desplazándose dentro de .table-wrap)
   ========================================================================== */
.lib-filters { gap: 8px; }
.lib-filters .lib-q { flex: 1 1 240px; max-width: 360px; }
.lib-filters > .select { width: auto; flex: 0 1 auto; max-width: 240px; min-width: 0; }
.lib-actions { gap: 8px; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.lib-tags .badge { font-size: .72rem; font-weight: 600; line-height: 1.5; padding: 1px 8px; white-space: normal; text-align: left; background: var(--surface-3); color: var(--text-2); }
.lib-tags .badge:hover { background: var(--brand-soft); color: var(--brand-soft-ink); }
.lib-tags .badge:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lib-notice { padding-bottom: 0; }
.lib-notice .callout .row { gap: 8px; }
/* Tabla: el nombre se parte en varias líneas y su columna se acota (la base trae nombres de más de 100 letras), para que
   quepan las demás columnas. En pantallas anchas, «Editar» y «Eliminar» se quedan además fijos a la derecha aunque la
   tabla tenga que desplazarse (en el móvil taparían el bloque y el grupo, que es lo que se ve sin desplazar) */
.lib-table td:first-child > .row { min-width: 200px; max-width: 360px; flex-wrap: wrap; row-gap: 2px; white-space: normal; }
.lib-table td:first-child > .lib-tags { max-width: 360px; }
.lib-table td:first-child b { overflow-wrap: anywhere; }
@media (min-width: 641px) {
  .lib-table th:last-child, .lib-table td:last-child { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(0, 0, 0, .18); }
  .lib-table th:last-child { z-index: 2; background: var(--surface-2); }
}
@media (max-width: 640px) {
  .lib-filters, .lib-actions { width: 100%; }
  .lib-filters .lib-q { flex: 1 1 100%; max-width: none; }
  .lib-filters > .select { flex: 1 1 calc(50% - 4px); max-width: none; padding-left: 10px; }
  .lib-actions > .btn { flex: 1 1 auto; justify-content: center; }
  .lib-table .lib-hide-m { display: none; }
  /* El nombre ocupa como mucho dos tercios de la pantalla: se ven el bloque y el grupo sin desplazar */
  .lib-table td:first-child > .row, .lib-table td:first-child > .lib-tags { max-width: 62vw; }
  .lib-table td:first-child > .row { min-width: 150px; }
}

/* ================= v1.21 · Menús con glifos propios (punto 9) ================= */
/* Un solo acento, el rojo de esquina del logotipo (--corner; mientras no exista, --brand). Fuera los distintivos de
   color (.t-*), la sombra y el saltito: glifos en gris, la entrada activa en tinta y negrita con una barra roja a la
   izquierda y la pieza maciza del glifo en rojo. Los glifos son de navicons.js (svg.ic-nav). */

/* Piezas macizas de los glifos (el dibujo ya lleva su relleno; esto lo mantiene aunque cambie el color) */
svg.ic-nav .f, svg.ic-nav .acc { fill: currentColor; stroke: none; }
/* En la entrada activa (menú, barra inferior y pestañas) la pieza del glifo se pone roja */
[aria-current="page"] .ic-nav .acc, [aria-current="page"] .ic-nav .acs,
[aria-selected="true"] .ic-nav .acc, [aria-selected="true"] .ic-nav .acs { color: var(--corner, var(--brand)); }

/* Menú lateral */
.sidebar nav a { position: relative; gap: 12px; padding: 8px 10px 8px 12px; border-radius: 6px; }
.sidebar nav a .nav-ic { width: 22px; height: 22px; background: none; border-radius: 0; box-shadow: none; color: var(--text-3); transition: color .12s ease; }
.sidebar nav a .nav-ic svg { width: 20px; height: 20px; }
.sidebar nav a:hover { background: var(--surface-2); }
.sidebar nav a:hover .nav-ic { transform: none; color: var(--text); }
/* Activa: fondo «destacado» neutro de la marca (no rosa, para no leerse como un error), tinta y negrita */
.sidebar nav a[aria-current="page"] { background: var(--brand-soft, var(--surface-3)); color: var(--text); font-weight: 700; }
.sidebar nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; background: var(--corner, var(--brand)); }
.sidebar nav a[aria-current="page"] .nav-ic { background: none; box-shadow: none; color: var(--text); }
.sidebar nav a[aria-current="page"] .count:not(.hot) { background: var(--surface); }
/* Dedo en vez de ratón: filas de 44 px como mínimo */
@media (pointer: coarse) { .sidebar nav a { min-height: 44px; } }

/* Campana de la cabecera y pestañas con glifo propio */
.bell svg.ic-nav { width: 20px; height: 20px; }
.tabs svg.ic-nav { width: 18px; height: 18px; }

/* Barra inferior del cliente: tantas columnas como accesos (cinco, o seis con la nutrición abierta) */
@media (max-width: 760px) {
  .shell.role-client .bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a[aria-current="page"] { color: var(--text); }
  .bottom-nav a[aria-current="page"] span { font-weight: 750; }
  .bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 28%; right: 28%; height: 3px; background: var(--corner, var(--brand)); }
}

/* ==========================================================================
   v1.22 · A · Ficha › Cuestionarios (preguntas de 1 a 7): en el móvil la tabla
   del editor se desplaza dentro de .table-wrap con los campos a un ancho legible
   ========================================================================== */
.q-editor .input[data-q="label"] { min-width: 168px; }
.q-editor .select[data-q="polarity"] { min-width: 136px; }
.q-editor .input[data-q="lo"], .q-editor .input[data-q="hi"] { min-width: 118px; }

/* ==========================================================================
   v1.22 · B · Feedback semanal del cliente (#/c/feedback): su último feedback
   arriba, la semana en curso y las semanas anteriores; dos columnas desde 1100 px
   ========================================================================== */
.fb-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .fb-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); } }
/* Nivel: alto (verde), normal (azul), bajo (ámbar: más cansado de lo habitual, no un error) y sin datos (gris) */
.fb-hero { border-top: 4px solid var(--border-strong); }
.fb-hero-alto { border-top-color: var(--ok); }
.fb-hero-normal { border-top-color: var(--info); }
.fb-hero-bajo { border-top-color: var(--warn); }
.fb-hero-top { display: flex; align-items: center; gap: 12px; }
.fb-hero-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.fb-hero-ic svg.ic { width: 28px; height: 28px; }
.fb-hero-alto .fb-hero-ic { background: var(--ok-soft); color: var(--ok-ink); }
.fb-hero-normal .fb-hero-ic { background: var(--info-soft); color: var(--info-ink); }
.fb-hero-bajo .fb-hero-ic { background: var(--warn-soft); color: var(--warn-ink); }
.fb-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.fb-hero h2 { font-size: 1.7rem; letter-spacing: -.02em; }
/* Medidor: una barra en tres tramos (bajo, normal, alto) con el de la semana en color y su nombre en negrita */
.fb-meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 16px 0 12px; }
.fb-m { display: flex; flex-direction: column; gap: 6px; text-align: center; font-size: .76rem; font-weight: 650; color: var(--text-3); }
.fb-m::before { content: ""; height: 8px; border-radius: 999px; background: var(--surface-3); }
.fb-m.on { font-weight: 800; }
.fb-m.on.fb-m-bajo { color: var(--warn-ink); }
.fb-m.on.fb-m-bajo::before { background: var(--warn); }
.fb-m.on.fb-m-normal { color: var(--info-ink); }
.fb-m.on.fb-m-normal::before { background: var(--info); }
.fb-m.on.fb-m-alto { color: var(--ok-ink); }
.fb-m.on.fb-m-alto::before { background: var(--ok); }
.fb-msg { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.fb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--text-2); }
.fb-chips li { display: inline-flex; align-items: center; gap: 6px; }
.fb-chips svg.ic { color: var(--text-3); }
.fb-chips b { color: var(--text); }
.fb-lv { display: inline-flex; align-items: center; justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.fb-lv-alto { background: var(--ok-soft); color: var(--ok-ink); }
.fb-lv-normal { background: var(--info-soft); color: var(--info-ink); }
.fb-lv-bajo { background: var(--warn-soft); color: var(--warn-ink); }
/* Semana en curso */
.fb-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 10px; font-size: .95rem; }
.fb-h label { display: inline-flex; align-items: center; gap: 8px; }
.fb-h svg.ic { width: 18px; height: 18px; color: var(--brand); }
.fb-count { margin-left: auto; font-size: .84rem; font-weight: 600; color: var(--text-2); }
.fb-count b { color: var(--text); }
.fb-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fb-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .74rem; color: var(--text-3); }
.fb-day b { font-weight: 700; }
.fb-day i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .8rem; font-weight: 650; color: var(--text-3); border: 1.5px dashed var(--border-strong); }
.fb-day-ok i { border: 0; background: var(--ok); color: #fff; }
.fb-day-ok i svg.ic { width: 16px; height: 16px; stroke-width: 3; }
.fb-day-today b { color: var(--text); }
.fb-day-today i { border: 2px solid var(--brand); color: var(--text); }
.fb-day-miss i { border-style: solid; background: var(--surface-2); }
.fb-ses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fb-srow, .fb-xrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; text-align: left; }
.fb-srow { cursor: pointer; }
.fb-srow:hover { background: var(--surface-2); border-color: var(--border-strong); }
.fb-srow > svg.ic:last-child { width: 16px; height: 16px; color: var(--text-3); }
.fb-sday { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fb-sday b { font-size: .9rem; }
.fb-sday small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-sub { margin: 12px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.fb-wrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-kg { position: relative; width: 150px; }
.fb-kg .input { padding-right: 40px; }
.fb-kg span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .86rem; color: var(--text-3); pointer-events: none; }
/* Peso de los lunes (#/c/peso, 17/11/2026) */
.wg-gate .wg-kg { width: 100%; max-width: 220px; }
.wg-gate .wg-kg .input { font-size: 1.35rem; font-weight: 700; padding-block: 12px; }
.fb-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .86rem; color: var(--text-2); }
.fb-note svg.ic { margin-top: 2px; color: var(--text-3); }
/* Semanas anteriores */
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-list li + li { border-top: 1px solid var(--border); }
.fb-row { display: grid; grid-template-columns: minmax(88px, auto) auto minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 12px 20px; color: inherit; }
.fb-row:hover { background: var(--surface-2); text-decoration: none; }
.fb-row.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--corner, var(--brand)); }
.fb-row-w { display: flex; flex-direction: column; line-height: 1.3; }
.fb-row-w small { color: var(--text-3); }
.fb-row-n { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-size: .84rem; color: var(--text-2); }
.fb-row-n b { color: var(--text); }
@media (max-width: 640px) {
  .fb-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .fb-row-n { grid-column: 1 / -1; justify-content: flex-start; }
  .fb-hero h2 { font-size: 1.5rem; }
}
@media (max-width: 380px) { .fb-day i { width: 30px; height: 30px; } }
/* «Mi semana»: día con la sesión a medias (algún dato, sin llegar al 80 % de las series ni a «Terminar sesión») */
.day-tab.part { border-color: var(--warn); }

/* ==========================================================================
   v1.22 · C · Entrenador: ficha › Feedback semanal (semana elegida, lectura de
   la semana, informe de la semana, cuestionario, entrenamientos y peso) y
   Bandeja › Feedback. Reutiliza las piezas del cliente (.fb-*) y de la IA (.ai-*)
   ========================================================================== */
.fbt-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.fbt-week { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; max-width: 380px; min-width: 0; }
.fbt-week .select { width: 100%; }
.fbt-score { margin-left: 4px; font-size: 1.1rem; font-weight: 700; letter-spacing: 0; color: var(--text-2); white-space: nowrap; }
.fbt-score small { font-size: .78rem; font-weight: 600; color: var(--text-3); }
.fbt-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fbt-notes li { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; color: var(--text-2); overflow-wrap: anywhere; }
.fbt-notes svg.ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-3); }
.fbt-notes li.warn svg.ic { color: var(--warn); }
/* Informe de la semana */
.wr-h { margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.wr-points { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .88rem; }
.wr-report p, .wr-points li { overflow-wrap: anywhere; }
/* Cuestionario: tabla de lunes a domingo, cada respuesta en verde (bien) o ámbar (mal) según el sentido de su pregunta */
.fbt-qt th[scope="row"] { min-width: 112px; max-width: 168px; white-space: normal; font-size: .84rem; font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--text); background: var(--surface); position: static; }
.fbt-ql { display: block; line-height: 1.25; }
.fbt-pol { display: block; font-size: .7rem; font-weight: 500; color: var(--text-3); }
.fbt-qt thead th small { display: block; font-size: .68rem; font-weight: 500; color: var(--text-3); }
.fbt-qt td.num, .fbt-qt th.num { padding-left: 3px; padding-right: 3px; text-align: center; }
.fbq { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.fbq-g { background: var(--ok-soft); color: var(--ok-ink); }
.fbq-b { background: var(--warn-soft); color: var(--warn-ink); }
.fbt-total th, .fbt-total td { border-top: 2px solid var(--border-strong); }
.fbt-foot { padding: 10px 16px 14px; }
.fbt-load { margin: 0; }
.fbt-kg { font-size: 1.4rem; letter-spacing: -.01em; }
.fbt-old .card-head { align-items: flex-start; }
/* Bandeja › Feedback */
.fbt-intro h2 { font-size: 1.15rem; }
.fbt-intro h2 svg { width: 22px; height: 22px; vertical-align: -4px; }
.fbt-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; font-size: .72rem; vertical-align: 2px; background: var(--surface-3); color: var(--text-3); }
.fbt-list { list-style: none; margin: 0; padding: 0; }
.fbt-list li + li { border-top: 1px solid var(--border); }
.fbt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; padding: 12px 16px; color: inherit; }
.fbt-row:hover { background: var(--surface-2); text-decoration: none; }
.fbt-row.new { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.fbt-row > svg.ic:last-child { width: 16px; height: 16px; color: var(--text-3); }
.fbt-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fbt-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbt-who small { font-size: .8rem; color: var(--text-3); }
.fbt-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 640px) {
  /* La tabla del cuestionario cabe a 390 px: pregunta más estrecha y celdas más juntas */
  .fbt-qt th[scope="row"] { min-width: 88px; padding-right: 4px; }
  .fbt-qt td.num, .fbt-qt th.num { padding-left: 1px; padding-right: 1px; }
  .fbq { min-width: 23px; height: 24px; padding: 0 2px; border-radius: 7px; }
  .fbt-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; }
  .fbt-row > .avatar { grid-row: 1 / span 2; align-self: start; }
  .fbt-tags { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .fbt-row > svg.ic:last-child { grid-column: 3; grid-row: 1 / span 2; }
  .fbt-week { max-width: none; }
}

/* ==========================================================================
   v1.22 · D · Formularios «Antes de empezar»: pantalla del cliente
   (#/c/formularios, sin menú, como la del contrato: usa .contract-gate, .ct-top,
   .ct-hero y .ct-step), sus respuestas (también en «Mis formularios» y en la
   ficha) y la pestaña Formularios de la ficha del cliente
   ========================================================================== */
.fm-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-note { display: flex; align-items: flex-start; gap: 6px; }
.fm-note svg.ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.fm-intro { margin: 0; font-size: .93rem; line-height: 1.5; color: var(--text-2); }
.fm-disc { margin: 0; font-size: .92rem; color: var(--text-2); overflow-wrap: anywhere; }
.fm-disc b { color: var(--text); }
/* Cada pregunta del documento: la pregunta en negrita, su aclaración y la respuesta; separadas por una línea */
.fm-qs { display: grid; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--border); }
.fm-q { display: grid; gap: 8px; min-width: 0; }
.fm-q + .fm-q { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
/* Preguntas de varias partes o de una opción: fieldset sin marco; la leyenda deja el mismo hueco que una etiqueta */
.fm-fs { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.fm-fs > .fm-ql { margin-bottom: 8px; }
.fm-qb { display: grid; gap: 8px; min-width: 0; }
.fm-ql { display: block; float: none; width: 100%; padding: 0; margin: 0; font-size: .95rem; font-weight: 650; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.fm-hint { margin: -4px 0 0; font-size: .8rem; line-height: 1.4; color: var(--text-3); }
.fm-q .form-grid { gap: 12px 14px; }
.fm-q > .field { margin-top: 4px; }
/* Peso y edad con su unidad dentro del campo */
.fm-unit { position: relative; }
.fm-unit .input { padding-right: 52px; }
.fm-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .86rem; color: var(--text-3); pointer-events: none; }
/* Pregunta 3 del psicológico: una opción por fila, toda la fila se puede tocar */
.fm-opts { display: grid; gap: 8px; }
.fm-opt { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: .92rem; line-height: 1.45; }
.fm-opt:hover { border-color: var(--text-3); }
.fm-opt input { margin-top: 2px; }
.fm-opt span { min-width: 0; overflow-wrap: anywhere; }
.fm-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.fm-opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.fm-opts.is-invalid .fm-opt { border-color: var(--bad); }
/* Vista previa del entrenador: el formulario tal cual, sin poder tocarlo */
.fm-lock { min-width: 0; margin: 0; padding: 0; border: 0; }
.fm-send { display: grid; gap: 10px; margin-top: 6px; }
@media (pointer: coarse) { .fm-opt { min-height: 48px; } }
/* Respuestas enviadas */
.fm-ans { display: grid; gap: 14px; }
.fm-qa { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fm-qa li { padding-top: 12px; border-top: 1px solid var(--border); }
.fm-qa b { display: block; margin-bottom: 4px; font-size: .86rem; font-weight: 650; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.fm-qa p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
/* Ficha › Formularios: qué ha enviado y qué le falta; los dos formularios en dos columnas desde 1100 px */
.fmt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fmt-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.fmt-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; background: var(--surface-3); color: var(--text-2); }
.fmt-ic svg.ic { width: 18px; height: 18px; }
.fmt-done { background: var(--ok-soft); color: var(--ok-ink); }
.fmt-pending, .fmt-redo { background: var(--warn-soft); color: var(--warn-ink); }
.fmt-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fmt-name small { font-size: .8rem; color: var(--text-3); overflow-wrap: anywhere; }
.fmt-row .badge { flex: none; }
.fmt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .fmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fmt-prev { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
@media (max-width: 420px) { .fmt-row { flex-wrap: wrap; } .fmt-row .badge { margin-left: 46px; } } /* en el móvil, la insignia debajo del nombre */
/* Al imprimir, el cuerpo baja a 11 px: la respuesta, al menos del tamaño de su pregunta */
@media print { .fmt-grid { grid-template-columns: minmax(0, 1fr); } .fm-qa li { break-inside: avoid; } .fm-qa b { font-size: .78rem; } .fm-qa p { font-size: .82rem; } }

/* ==== v1.22 · arreglos de la verificación: F1a (cierre de la semana y feedback del cliente) ==== */
/* ==== fin F1a ==== */
/* ==== v1.22 · arreglos de la verificación: F1b (ficha y Bandeja del entrenador, informe de la semana) ==== */
/* Entrenamientos (ficha › Feedback semanal y pantalla del cliente): la columna de la lista encoge con su tarjeta. Sin
   esto la fila medía lo que su subtítulo en una sola línea y desbordaba la página a 320 y 360 px (V4-02, V7-01) */
.fb-ses { grid-template-columns: minmax(0, 1fr); }
/* En la ficha, el subtítulo de cada sesión (series, minutos y UA; «pautada el …») se parte en vez de cortarse con «…» */
.fbt-ses .fb-sday small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.fbt-ses .fb-xrow > .badge { flex: none; }
/* Informe de la semana mientras se prepara: botón ocupado con su indicador (sigue así aunque la vista se repinte) */
.wr-busy .spinner { width: 16px; height: 16px; border-width: 2px; flex: none; }
/* Bandeja › Feedback: el aviso de «Se cierra hoy a las 12:00» dentro de la cabecera */
.fbt-intro .callout svg.ic { flex: none; margin-top: 2px; }
/* ==== fin F1b ==== */
/* ==== v1.22 · arreglos de la verificación: F2 (cuestionario, sesiones y preguntas) ==== */
/* Cuestionario: los extremos («1 · Muy malo», «Muy bueno · 7») y la cifra elegida, a lo ancho de los botones (que no
   pasan de 520 px), no al borde de la tarjeta (V1-08, V7-07) */
.q-item .q-label, .q-item .q-ends { max-width: 520px; }
/* Tabla de la semana: «Score» junto al día, cabeceras cortas y relleno compacto: cabe a 1180-1366 px (V1-05) */
.table.compact.q-week th, .table.compact.q-week td { padding: 6px 5px; }
.q-week th { white-space: nowrap; }
.q-week tbody tr.q-sel td { background: var(--brand-soft); }
/* Móvil estrecho: botones 1-7 de 40 px o más; la tarjeta del cuestionario encoge su relleno y el hueco entre botones y,
   a 320 px, la fila de botones ocupa todo el ancho de la tarjeta (V1-09) */
@media (max-width: 380px) {
  .q-card > .card-head, .q-card > .card-body { padding-left: 8px; padding-right: 8px; }
  .q-card .scale-pick { gap: 2px; }
}
@media (max-width: 340px) { .q-card .q-item .scale-pick { margin-inline: -8px; gap: 1px; } }
@media (pointer: coarse) { .q-card .q-date, .q-forgot .btn { min-height: 40px; } }
/* «Mi semana»: «Marcar sesión como hecha» / «Quitar la marca» junto a «Empezar / Repasar sesión» (V1-01) */
.cw-start-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .cw-start-btns { width: 100%; } .cw-start-btns .btn { flex: 1 1 100%; } }
/* Serie de tiempo o distancia dada por hecha en «Entrenando», sin números en la tabla */
.cw-set-ok { color: var(--ok-ink); display: inline-flex; vertical-align: -2px; }
.cw-set-ok svg { width: 14px; height: 14px; }
/* ==== fin F2 ==== */
/* ==== v1.22 · arreglos de la verificación: F3 (formularios, sin conexión y actualización) ==== */
/* «Antes de empezar», preguntas de varias partes (disciplina y días; días y minutos): los campos de una misma fila
   comparten las filas de la rejilla (subgrid), así que sus desplegables quedan a la misma altura aunque una etiqueta
   ocupe dos líneas (a 320 px, «Días de técnico-táctico») o uno de los dos enseñe su error. La etiqueta va abajo de su
   fila. Estos campos no llevan aclaración: etiqueta, control y error (tres filas). Sin subgrid, como antes. */
@supports (grid-template-rows: subgrid) {
  .fm-q .form-grid > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; }
  .fm-q .form-grid > .field > label { align-self: end; }
}
/* Indicador de guardado: sin conexión o con error, en rojo; en el móvil (donde la etiqueta larga no cabe), además una
   etiqueta corta («Sin conexión», «Sin guardar»), también en las cabeceras sin menú (contrato, formularios, «Entrenando») */
.save-state.bad { color: var(--bad-ink); }
.save-state .lbl-m { display: none; }
@media (max-width: 760px) { .save-state.bad .lbl-m { display: inline; font-weight: 650; } }
.ct-top .save-state.bad .lbl-m, .ses-top .save-state.bad .lbl-m { display: inline; font-weight: 650; }
/* «Sin conexión» al abrir la app (instalación con servidor, app.js) */
.offline-card { text-align: center; }
.offline-ic { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--warn-soft); color: var(--warn-ink); }
.offline-ic svg.ic { width: 32px; height: 32px; }
.offline-card h1 { margin-bottom: 8px; }
.offline-card .btn .spinner { flex: none; }
/* «Hay una versión nueva de la app» (app.js): su aspecto. Dónde va (abajo, sin tapar nunca la cabecera), su ancho y su
   z-index (por debajo de los diálogos), en la zona G5 de la segunda verificación */
.app-update { position: fixed; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
.app-update > svg.ic { flex: none; width: 20px; height: 20px; color: var(--brand); }
.app-update .au-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.app-update .au-txt small { font-size: .8rem; color: var(--text-3); }
.app-update .btn { flex: none; }
@media (max-width: 420px) { .app-update .au-txt small { display: none; } }
@media print { .app-update { display: none !important; } }
/* ==== fin F3 ==== */
/* ==== v1.22 · arreglos de la verificación: F4 (ajuste de pantalla general y accesibilidad) ==== */
/* Texto dentro de una fila .row.nowrap: .nowrap pone white-space: nowrap y se hereda a todo lo de dentro, y la excepción
   de arriba solo alcanzaba a los títulos que son hijos directos. Las columnas de texto (un <div> hijo: el nombre y los
   datos de la cabecera de la ficha, el subtítulo del chat, los contactos web y las reseñas de la Bandeja) vuelven a
   partir líneas, y un nombre larguísimo sin espacios se parte donde haga falta. Sin especificidad: lo que pide nowrap
   con su propia clase sigue igual (V7-02, V4-12) */
:where(.row.nowrap) > div { white-space: normal; }
:where(.row.nowrap) > div > :where(h2, h3, h4) { overflow-wrap: anywhere; }
/* Lista de clientes del móvil: la rejilla encoge con la pantalla y el nombre de cada tarjeta parte línea (V7-02) */
.m-list { grid-template-columns: minmax(0, 1fr); }
.m-card .client-cell > div { min-width: 0; white-space: normal; }
.m-card .client-cell b { overflow-wrap: anywhere; }

/* Texto de ayuda de los campos (placeholder): el gris de la app, que llega a 4,5:1 también en oscuro (el del navegador,
   #757575, se quedaba en 3,9:1 sobre las superficies oscuras). Sin especificidad, para no pisar los que tienen el suyo
   (V7-03) */
:where(input, textarea)::placeholder { color: var(--text-3); opacity: 1; }

/* Contraste de texto sobre color (V7-04):
   - insignias de intensidad (Programación, Rutinas): tinta oscura sobre el ámbar y el verde, donde el blanco no llegaba a
     4,5:1, y, sin intensidad, el color de la superficie (blanco en claro, casi negro en oscuro, sobre el gris);
   - colores fijos de la app con texto encima (grupos, días con evento, «weeks out» y tipos de microciclo del Análisis y su
     leyenda): sobre los claros, texto negro (el blanco se quedaba entre 2,2:1 y 4,4:1; el negro pasa de 4,5:1). El color
     va en el style de cada elemento (groups.js y trainer-analysis.js) y es uno de G.COLORS, SEED.eventColors o
     SEED.microTypes: si se cambian esas listas, hay que cambiar también esta; en el Análisis, la tinta de los eventos y de
     los tipos de microciclo (también un color propio, elegido en Ajustes › Metodología) la elige ya trainer-analysis.js
     con U.inkOn, por contraste;
   - «weeks out» sin la transparencia, que bajaba aún más el contraste;
   - días de descanso de «Mi semana» y días de fuera del mes de Contenido, atenuados con el gris de la app y no con
     transparencia (se quedaban en 2,6:1 y 2,8:1) */
.int-badge.int-media, .int-badge.int-baja { color: #18181a; }
.int-badge:not(.int-alta):not(.int-media):not(.int-baja):not([style]) { color: var(--surface); }
:is(.g-badge, .int-badge, .cal td.day.ev, .cal td.wo, .cal td.cyc):is([style*="#e5484d" i], [style*="#12a150" i], [style*="#e09b00" i], [style*="#0091ff" i], [style*="#d6409f" i], [style*="#0f9b9b" i], [style*="#ec835a" i], [style*="#eb6834" i], [style*="#e34948" i], [style*="#2a78d6" i], [style*="#1baf7a" i], [style*="#eda100" i], [style*="#e87ba4" i], [style*="#898781" i]) { color: #000 !important; }
.cal td.wo { opacity: 1 !important; }
.day-tab.rest { opacity: 1; }
.day-tab.rest:not([aria-selected="true"]) { color: var(--text-3); }
.day-tab.rest:not([aria-selected="true"]) .pip { opacity: .6; }
.cc-day.out .cc-dnum b { opacity: 1; color: var(--text-3); font-weight: 500; }

/* Pantallas táctiles: los botones pequeños, los de solo icono y los campos pequeños llegan a 40 px (también las horas de
   las franjas de Reuniones › Disponibilidad), y en los diálogos cada casilla tiene toda su fila para el dedo (p. ej.
   «Pedir que los rellene de nuevo»). Las tablas con campos (series de «Mi semana», pauta del entrenador) conservan su
   alto propio, más específico (V7-05, V1-09, V5-09) */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; }
  .btn-icon.btn-sm { width: 40px; }
  .input-sm, .mt-range .input { min-height: 40px; }
  .modal .check { min-height: 44px; align-items: center; }
  .modal .check input[type="checkbox"], .modal .check input[type="radio"] { margin-top: 0; }
}

/* En el móvil, mientras hay un diálogo abierto (una hoja abajo), los avisos emergentes pasan arriba: iban abajo, por encima
   de la hoja (z-index 120 frente a 90), y tapaban su texto («¿Deshacer los ajustes?») (V4-11) */
@media (max-width: 640px) {
  body:has(.modal-backdrop) .toasts { top: calc(env(safe-area-inset-top, 0px) + 12px); bottom: auto; }
}

/* Llamada con un botón (Ajustes › Automatización › «Entrénalo en «Asistente»…»): si no cabe en una fila, el botón pasa
   debajo y el texto usa todo el ancho (se quedaba en una columna de 30 px a 320 y el botón lo tapaba). En el móvil, el
   icono y el texto en la primera fila y el botón debajo, alineado con el texto (icono de 20 px + hueco de 12) (V7-08) */
.callout-link:has(> .btn) { flex-wrap: wrap; }
.callout-link:has(> .btn) > .grow { flex: 1 1 200px; }
.callout-link:has(> .btn) > .btn { margin-left: auto; }
@media (max-width: 480px) {
  .callout-link:has(> .btn) > .grow { flex: 1 1 calc(100% - 32px); }
  .callout-link:has(> .btn) > .btn { margin-left: 32px; }
}

/* Desbordes a 320 y 360 px (V7-09): la insignia «Contactado» de los contactos web no encoge (el texto de al lado ya parte
   línea); los botones de texto largo de las cabeceras de tarjeta y de los estados vacíos («Responder preguntas pendientes
   con IA», «Compartir mi enlace de alta») parten línea si no caben; y «Recuperar el acceso» tiene una tarjeta más compacta
   en el móvil estrecho */
.badge-btn { flex: none; }
.card-head > .btn, .empty .btn { white-space: normal; max-width: 100%; text-align: center; }
.auth-wrap > .auth-card { min-width: 0; }
@media (max-width: 400px) { .auth-card { padding: 24px 18px; } }

/* Textos que se cortaban a 320 px sin «…» (V7-10): la última miga de la cabecera y el subtítulo de la marca de «Antes de
   empezar» y del contrato («Área de cliente») */
.topbar .crumbs > * { flex: none; }
.topbar .crumbs > :last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ct-top .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ==== fin F4 ==== */
/* ==== v1.22 · segunda verificación: G1 (cierre de la semana y feedback del cliente) ==== */
/* ==== fin G1 ==== */
/* ==== v1.22 · segunda verificación: G2 (ficha, Bandeja, Asistente e informe de la semana) ==== */
/* Bandeja › Feedback: «Cerrando» (la semana se está cerrando desde este dispositivo) con un indicador pequeño dentro de
   la etiqueta, a la altura del texto */
.fb-lv .spinner { width: 11px; height: 11px; border-width: 2px; flex: none; margin-right: 5px; }
/* ==== fin G2 ==== */
/* ==== v1.22 · segunda verificación: G3 (sesiones, cuestionario y preguntas) ==== */
/* ==== fin G3 ==== */
/* ==== v1.22 · segunda verificación: G4 (formularios) ==== */
/* Ficha › Formularios en el móvil (R2-V5-04): el nombre y su nota ocupan el resto de la primera línea, junto al icono
   (34 px + 12 de hueco), y la insignia baja debajo, alineada con el nombre (margin-left: 46px de la regla de 420 px).
   Antes, si la nota no cabía en una línea al lado del icono, el bloque entero bajaba y el icono se quedaba solo arriba */
@media (max-width: 420px) { .fmt-row .fmt-name { flex: 1 1 calc(100% - 46px); } }
/* ==== fin G4 ==== */
/* ==== v1.22 · segunda verificación: G5 (aviso de versión, sin conexión, cabeceras y avisos) ==== */
/* «Hay una versión nueva de la app» (app.js) abajo, sin tapar nunca la cabecera (R2-V7-01; cambia lo de F3): en el
   ordenador y la tableta, en la esquina de abajo a la derecha, como los avisos emergentes; en el móvil (≤ 760 px), a lo
   ancho y encima de la barra inferior del cliente (63 px) o de la de «Entrenando» (.ses-nav, 69 px). Por debajo de los
   diálogos (85 frente a 90) y oculto mientras haya uno abierto (también los paneles laterales), el menú lateral, el
   aviso de cookies o el descanso entre series de «Entrenando». Con el aviso a la vista, los avisos emergentes salen por
   encima de él y el contenido gana hueco abajo para poder verse entero (--au-h: lo que mide; app.js lo pone al día con
   lo que mide de verdad y, sin ResizeObserver, se queda en 80 px, lo más que mide en el móvil) */
:root { --au-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); --au-h: 80px; }
body:has(.ses-nav) { --au-bottom: calc(77px + env(safe-area-inset-bottom, 0px)); }
.app-update { top: auto; bottom: var(--au-bottom); left: auto; right: 20px; width: min(480px, calc(100vw - 40px)); max-width: none; margin: 0; z-index: 85; }
@media (max-height: 500px) { .app-update .au-txt small { display: none; } } /* móvil en horizontal: solo el título */
body:has(.modal-backdrop, .side-panel, .shell.nav-open, .cookie-banner, .ses-rest) .app-update { display: none; }
@media (max-width: 760px) {
  :root { --au-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body:has(.shell.role-client .bottom-nav) { --au-bottom: calc(71px + env(safe-area-inset-bottom, 0px)); }
  .app-update { left: 12px; right: 12px; width: auto; }
}
body:has(> .app-update):not(:has(.modal-backdrop, .side-panel, .shell.nav-open, .cookie-banner, .ses-rest)) .toasts { top: auto; bottom: calc(var(--au-bottom) + var(--au-h) + 8px); }
body:has(> .app-update) .shell .content { padding-bottom: calc(var(--au-bottom) + var(--au-h) + 16px); }
body:has(> .app-update) .ses:not(.has-rest) { padding-bottom: calc(var(--au-bottom) + var(--au-h) + 16px); }
body:has(> .app-update) .pub-footer { padding-bottom: calc(var(--au-bottom) + var(--au-h) + 16px); }

/* Cabecera propia del contrato y de «Antes de empezar» / «Mis formularios» (.ct-top) en el móvil estrecho: con el aviso
   de guardado («Sin conexión», «Sin guardar»), el nombre de la marca no cabe junto a él y a «Cerrar sesión» (se quedaba en
   una letra cortada): queda el logo (R2-V7-03) */
@media (max-width: 360px) { .ct-top:has(.save-state.bad) .brand > span { display: none; } }

/* Cabecera de las páginas públicas con la sesión iniciada: en el móvil estrecho, «Mi panel» en vez de «Ir a mi panel»
   (desbordaba 16 px a 320; ahora ocupa lo mismo que «Iniciar sesión» y el nombre de la marca sigue partiéndose en
   líneas como sin sesión) (R2-V6-08) */
.pub-panel .pp-short { display: none; }
@media (max-width: 360px) { .pub-panel .pp-long { display: none; } .pub-panel .pp-short { display: inline; } }

/* «Avisos» del cliente y Bandeja › Avisos (R2-V7-02): la regla de esta zona (solo hasta 420 px) la sustituye la regla
   fluida de la zona H6 (tercera verificación, R3-W6-01), para cualquier ancho */
/* ==== fin G5 ==== */
/* ==== v1.22 · segunda verificación: G6 (asistente del chat y ayuda) ==== */
/* ==== fin G6 ==== */
/* ==== v1.22 · segunda verificación: INT (integración) ==== */
/* Avisos (Bandeja › Avisos y «Avisos» del cliente): la etiqueta de semana del título («Feedback bajo · semana del 9–15
   nov») va en un <span class="nowrap"> (BC.feedback.keepWeeks) y no debe tomar el gris y el tamaño del texto del aviso
   (.n-body span) */
.n-body > b .nowrap { color: inherit; font-size: inherit; }
/* ==== fin INT ==== */
/* ==== v1.22 · tercera verificación: H1 («Entrenando» y «Mi semana») ==== */
/* «Entrenando» en el móvil (R3-W1-03). Barra de ejercicios: cada segmento es un objetivo táctil de 40 × 40 px como
   mínimo y lo que se ve sigue siendo una raya fina (::before). La barra ocupa casi todo el ancho y, si aun así no caben
   todos (muchos ejercicios o 320 px), se desplaza de lado, sin barra de desplazamiento, y el ejercicio en curso queda
   siempre a la vista (client-session.js, mount) */
.ses-progress { gap: 0; margin: 0 -16px; padding: 0 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.ses-progress::-webkit-scrollbar { display: none; }
.ses-seg { position: relative; flex: 1 0 40px; min-width: 40px; height: 40px; background: none; border-radius: 10px; }
.ses-seg::before { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 8px; margin-top: -4px; border-radius: 999px; background: var(--seg, var(--surface-3)); }
.ses-seg.on::before { height: 10px; margin-top: -5px; }
.ses-seg:focus-visible { box-shadow: inset var(--focus-ring); border-radius: 10px; } /* hacia dentro: la barra recorta lo de fuera */
/* Descanso: botones de 44 px de alto; el texto (ejercicio · siguiente serie · «1:30 por defecto») parte líneas en vez de
   cortarse (hasta 4; «…» solo si un nombre larguísimo no cabe). Hasta 369 px de ancho, donde los tres botones no caben
   junto al anillo (a 320 y 360 se partían en dos filas), van en una fila propia, a todo el ancho. La tarjeta es algo más
   alta: el contenido deja más sitio debajo para poder ver entero «Serie hecha» */
.ses-rest-btns .btn { min-height: 44px; }
.ses-rest-txt span { white-space: normal; overflow: hidden; text-overflow: ellipsis; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.ses.has-rest { padding-bottom: calc(270px + env(safe-area-inset-bottom)); }
@media (max-width: 369px) {
  .ses-rest-ring { grid-row: auto; }
  .ses-rest-btns { grid-column: 1 / -1; flex-wrap: nowrap; }
}
/* Cabecera: a 400 px o menos, menos relleno y huecos, y el título («Miércoles · Semana 11») parte en dos líneas por el
   punto si no cabe, en vez de cortarse con «…»: client-session.js lo pinta en dos trozos (<b class="ses-tp"> dentro del
   <b>, para que «.ses-title span» siga siendo el subtítulo) que no se parten por dentro */
.ses-title > b > .ses-tp { display: inline; font: inherit; color: inherit; white-space: nowrap; overflow: visible; text-overflow: clip; }
@media (max-width: 400px) {
  .ses-top { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .ses-elapsed { padding: 5px 8px; }
  .ses-title > b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
}
/* ==== fin H1 ==== */
/* ==== v1.22 · tercera verificación: H2 (cierre de la semana y seguimiento) ==== */
/* ==== fin H2 ==== */
/* ==== v1.22 · tercera verificación: H3 (entrenador: ficha, Asistente, informes) ==== */
/* Asistente (R3-W3-02): la respuesta usa el ancho que le toca (.as-answer: 92 % y, en el móvil, todo el chat). .msg va
   después con la misma especificidad y la dejaba siempre al 78 %: con .msg.as-answer gana. Su contenido no la desborda:
   una sola columna que puede encogerse (la implícita crecía hasta el botón más ancho, que no se partía), las palabras
   enteras (break-word, no anywhere: «molestias» o «Bajo» ya no se parten por cualquier letra) y los botones de acción y
   las sugerencias pasan a dos líneas si no caben. */
.msg.as-answer { max-width: min(92%, 720px); }
.as-answer .msg-bubble { grid-template-columns: minmax(0, 1fr); overflow-wrap: break-word; }
.as-answer .msg-bubble > * { min-width: 0; }
.as-answer .msg-links .btn { white-space: normal; height: auto; max-width: 100%; justify-content: flex-start; text-align: left; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; }
.as-answer .chip { white-space: normal; max-width: 100%; text-align: left; }
.as-over-item { min-width: 0; }
.as-over-item > span:nth-of-type(2) { min-width: 0; }
.as-items .badge { flex: none; max-width: 50%; }
@media (max-width: 640px) {
  .msg.as-answer { max-width: 100%; }
}
/* Ficha › Feedback semanal: «Se ha cerrado mientras la tenías abierta» (R3-W3-01) */
.fbt-justclosed .row { gap: 8px; }
/* ==== fin H3 ==== */
/* ==== v1.22 · tercera verificación: H4 (formularios y preguntas) ==== */
/* ==== fin H4 ==== */
/* ==== v1.22 · tercera verificación: H5 (asistente del chat y política) ==== */
/* ==== fin H5 ==== */
/* ==== v1.22 · tercera verificación: H6 (ajuste de pantalla general) ==== */
/* «Avisos» del cliente y Bandeja › Avisos, en cualquier ancho (R3-W6-01; sustituye a la regla de G5, que solo actuaba
   hasta 420 px: de 421 en adelante, también en los móviles grandes de 428-440 px y en horizontal, la hora volvía a dejar
   el título y el texto en una columna estrecha). Regla fluida, sin cortes por ancho: el título y la hora comparten la
   primera línea solo si el título cabe entero junto a ella; si no, la hora baja debajo del título. El texto y la
   insignia van siempre debajo, a todo el ancho que deja el icono (fijo arriba a la izquierda, como antes). Una palabra
   del título que no cabe en una línea (un nombre de alta escrito como email, sin espacios) se parte en vez de salirse
   del aviso (desbordaba la página 90 px a 320 y 20 a 390) */
button.notice { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 0; min-height: 60px; padding-left: 64px; }
button.notice::after { content: ""; order: 3; flex: 0 0 100%; height: 0; } /* salto de línea: el texto y la insignia, debajo */
button.notice > .n-ic { position: absolute; left: 16px; top: 12px; }
button.notice > .n-body { display: contents; }
button.notice > .n-body > b { order: 1; flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
button.notice > .n-time { order: 2; flex: none; margin-top: 3px; white-space: nowrap; }
button.notice > .n-body > span:not(.badge) { order: 4; flex: 1 1 100%; min-width: 0; margin-top: 3px; }
button.notice > .n-body > .badge { order: 5; margin-top: 3px; }

/* Botones de bloque (a todo el ancho) cuyo texto no cabe en una línea (R3-W6-02: en la lista de espera, «Mientras tanto,
   haz el test de 2 minutos» se salía 23 px de su botón a 320 y 3 a 360): el texto parte línea, sin dejar una palabra
   sola abajo, con aire arriba y abajo. Con una línea, el botón mide y se ve igual que antes (icono y texto centrados);
   con dos, las líneas van alineadas a la izquierda, pegadas a su icono (centradas, el icono se quedaba suelto en el
   borde). Un texto sin espacios (un email largo) también parte antes de salirse. El fantasma (sin fondo ni borde) no
   reserva el margen lateral, que no se ve: así no parte línea mientras el texto quepa en la caja (a 375 y 390 px
   «Mientras tanto…» sigue en una línea, como antes) */
.btn-block { white-space: normal; text-wrap: pretty; text-align: left; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; overflow-wrap: anywhere; }
.btn-block.btn-ghost { padding-left: 0; padding-right: 0; }

/* Desplegables cuyo valor elegido no cabe en su caja (R3-W6-03): acaba en «…» en vez de cortarse a media palabra. En
   Ajustes › Automatización, «Al activar un cliente» (con «Aprobación») y «Modelo» (con la clave de API) van uno junto al
   otro solo si caben los dos (columnas de 19rem como mínimo, lo que pide la opción más larga); si no, uno debajo del
   otro, a todo el ancho («Modelo» tenía 90-150 px en el ordenador y enseñaba «Claude Opus 5.»; «Al activar un cliente»,
   166-188, con «Generar su plan inicial (4 sem») */
.select { text-overflow: ellipsis; }
.form-grid:has(> .field > #au-plan), .form-grid:has(> .field > #ai-model) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.form-grid:has(> .field > #au-plan) > *, .form-grid:has(> .field > #ai-model) > * { grid-column: 1 / -1; }
.form-grid > .field:has(> #au-appr), .form-grid > .field:has(> #au-plan), .form-grid > .field:has(#ai-key), .form-grid > .field:has(> #ai-model) { grid-column: auto; }
/* ==== fin H6 ==== */
/* ==== v1.22 · tercera verificación: INT (integración) ==== */
/* «Entrenando» › resumen de la sesión, a 340 px de ancho o menos: «Guardar y volver» (o «Terminar sesión») con su
   icono llegaba a 3 px del borde del botón. Ese botón crece algo más que «‹ Ejercicios» (1,5 en vez de 1,25) y los dos
   quedan con 8-12 px a cada lado (a 320 px: 8 y 12; antes, 3 y 17) */
@media (max-width: 340px) { .ses-nav > .btn-primary[data-action="ss-finish"] { flex: 1.5; } }
/* ==== fin INT ==== */
/* ==== v1.22 · comprobación final (F-X1-01, F-X1-02, F-X1-03 y F-X2-01) ==== */
/* «Mi semana» en el móvil: «Comparar con otra semana» llega a 40 px de alto, para tocarlo bien con el dedo (medía 33) */
@media (max-width: 640px) { .cw-compare summary { min-height: 40px; } }
/* Por debajo de 360 px: las pestañas de los días pasan de 36,9 a 41,7 px de ancho a 320 (menos hueco entre ellas y la
   rejilla a 8 px de los bordes), y la barra de arriba deja 173 px al título en vez de 157, así que «Cuestionario
   diario» y «Calculadora de RM» ya no se cortan con «…» */
@media (max-width: 359px) {
  .day-tabs { gap: 2px; margin-left: -8px; margin-right: -8px; padding-left: 0; padding-right: 0; }
  .topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
}
/* La pastilla «Pronto» de las pestañas (Nutrición, en la ficha) no encoge: el candado (un svg con max-width en %) no
   contaba en su ancho mínimo y «Pronto» se salía 4 px de la pastilla en todos los anchos */
.tabs .count { flex: none; }
/* ==== fin comprobación final ==== */
/* ==== v1.22 · cambios del 14/11: G1 (evaluación de rendimiento y test) ==== */
/* Niveles de los test: los 4 de la hoja de Benayas (BC.tests.badge, con la forma de .level). Bajo en rojo, Moderado en
   ámbar, Alto en verde y Muy alto en negro (el más alto, como el «Excelente» de antes); al imprimir, en tinta con contorno */
.tlv-0 { background: var(--bad-soft); color: var(--bad-ink); }
.tlv-1 { background: var(--warn-soft); color: var(--warn-ink); }
.tlv-2 { background: var(--ok-soft); color: var(--ok-ink); }
.tlv-3 { background: var(--ink); color: var(--ink-fg); }
@media print { .tlv-3 { background: none !important; color: #18181a !important; box-shadow: inset 0 0 0 1px #18181a; } }
.tlv-cell { display: inline-flex; align-items: center; gap: 8px; }
.tlvbar { display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 64px; flex: none; }
.tlvbar span { height: 8px; border-radius: 3px; background: var(--surface-3); }
.tlvbar span.on { background: var(--brand); }
/* Perfil de capacidades: el pentágono (BC.tests.pentagon), con los colores de las gráficas y del tema */
.pent { margin: 0; display: grid; gap: 6px; justify-items: center; }
.pent-svg { width: 100%; max-width: 380px; height: auto; }
.pent-ring { fill: none; stroke: var(--chart-grid); stroke-width: 1; }
.pent-ring.out { stroke: var(--chart-axis); }
.pent-axis { stroke: var(--chart-grid); stroke-width: 1; }
.pent-area { fill: var(--series-1); fill-opacity: .2; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; }
.pent-dot { fill: var(--series-1); stroke: var(--chart-surface); stroke-width: 1.5; }
.pent-lbl { fill: var(--text); font-size: 13.5px; font-weight: 700; }
.pent-lv { fill: var(--text-3); font-size: 12.5px; font-weight: 600; }
.pent-lv.l0 { fill: var(--bad-ink); } .pent-lv.l1 { fill: var(--warn-ink); } .pent-lv.l2 { fill: var(--ok-ink); } .pent-lv.l3 { fill: var(--text); }
.pent figcaption { max-width: 340px; text-align: center; }
/* Ficha › Test: comparación de las evaluaciones (la hoja de registro) y sus resultados */
.table.evr-cmp { width: auto; min-width: min(100%, 560px); } /* con una o dos evaluaciones, sus cifras cerca de cada prueba */
.evr-cmp td { vertical-align: top; }
.evr-cmp td:first-child { min-width: 150px; }
.evr-cmp th.evr-col { vertical-align: bottom; }
.evr-coln { display: block; }
.evr-cmp th .btn-icon { margin: 2px 0 0; }
.evr-cmp td .level { margin-top: 4px; }
.evr-notes { min-width: 150px; max-width: 260px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; color: var(--text-2); }
.evr-res { list-style: none; margin: 0; padding: 0; display: grid; }
.evr-res li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.evr-res li:first-child { border-top: 0; padding-top: 0; }
.evr-res li:last-child { padding-bottom: 0; }
.evr-res-n { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; line-height: 1.35; }
.evr-res-n .xsmall { overflow-wrap: anywhere; }
.evr-res-v { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Pantalla del cliente (#/c/evaluacion): el protocolo del PDF y la hoja de registro */
.evr-page { max-width: 860px; }
.evr-hero h2 { margin: 6px 0 8px; font-size: 1.35rem; }
.evr-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.evr-rules { margin: 0 0 12px; display: grid; }
.evr-rules > div { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 2px 14px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.evr-rules dt { font-weight: 650; }
.evr-rules dt span { margin-right: 4px; color: var(--text-3); font-weight: 600; }
.evr-rules dd { margin: 0; color: var(--text-2); }
@media (max-width: 560px) { .evr-rules > div { grid-template-columns: minmax(0, 1fr); } }
.evr-why { margin-bottom: 10px; padding: 6px 12px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--surface-2); }
.evr-why summary { display: flex; align-items: center; gap: 6px; min-height: 30px; cursor: pointer; font-weight: 650; font-size: .9rem; list-style: none; }
.evr-why summary::-webkit-details-marker { display: none; }
.evr-why summary svg.ic { color: var(--text-3); transition: transform .15s ease; }
.evr-why[open] summary svg.ic { transform: rotate(180deg); }
.evr-why p { margin: 4px 0 6px; }
.evr-lockn { display: flex; align-items: flex-start; gap: 6px; }
.evr-lockn svg.ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.evr-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin: 18px 0 10px; font-size: 1.05rem; }
.evr-block span { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.evr-test .card-head h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin: 0; min-width: 0; }
.evr-code { font-size: .78rem; font-weight: 800; color: var(--text-3); }
.evr-code.alt { color: var(--brand); }
.evr-sub { font-size: .86rem; font-weight: 500; color: var(--text-3); }
.evr-tag { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.evr-proto { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px 18px; align-items: start; }
@media (max-width: 640px) { .evr-proto { grid-template-columns: minmax(0, 1fr); } }
.evr-k { margin: 0 0 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.evr-steps ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.evr-note { margin: 10px 0 0; padding-left: 10px; border-left: 3px solid var(--brand); font-size: .86rem; color: var(--text-2); }
.evr-box { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.evr-box dl { margin: 0; display: grid; }
.evr-box dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--border); font-size: .86rem; }
.evr-box dl > div:first-child { border-top: 0; padding-top: 0; }
.evr-box dt { color: var(--text-2); }
.evr-box dd { margin: 0; font-weight: 700; text-align: right; }
.evr-goal { margin: 0; font-size: .9rem; font-weight: 700; }
.evr-fs { min-width: 0; margin: 0; padding: 0; border: 0; }
.evr-fs + .evr-fs { margin-top: 4px; }
.evr-legend { margin-bottom: 8px; padding: 0; font-size: .86rem; font-weight: 650; color: var(--text-2); }
.evr-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .evr-opts { grid-template-columns: minmax(0, 1fr); } }
.evr-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.evr-opt:hover { border-color: var(--text-3); }
.evr-opt input { flex: none; margin-top: 3px; }
.evr-opt span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.evr-opt small { font-size: .8rem; color: var(--text-3); overflow-wrap: anywhere; }
.evr-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.evr-opt:has(input:checked) small { color: inherit; }
.evr-opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.evr-att { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.evr-rm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .evr-rm { grid-template-columns: minmax(0, 1fr); } }
.evr-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.evr-one { max-width: 260px; }
.evr-unit { position: relative; }
.evr-unit .input { padding-right: 46px; }
.evr-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .86rem; color: var(--text-3); pointer-events: none; }
.evr-err { display: block; font-size: .8rem; font-weight: 600; color: var(--bad-ink); }
.evr-err:empty { display: none; }
.evr-live { margin: 0; font-size: .82rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.evr-live:empty { display: none; }
p.evr-live { margin-top: 8px; }
.evr-lock { min-width: 0; margin: 0; padding: 0; border: 0; }
.evr-send { display: grid; gap: 10px; margin: 6px 0 12px; }
.evr-done { text-align: center; }
.evr-done h2 { margin-bottom: 8px; }
.evr-actions { justify-content: center; margin: 4px 0 16px; }
@media (pointer: coarse) { .evr-why summary { min-height: 40px; } }
/* Ajustes › KPIs de test (en el móvil la tabla se desplaza de lado; la prueba, con sitio para leerse) */
.kpi-in { width: 76px; text-align: right; }
.kpi-warn { color: var(--warn-ink); font-weight: 600; }
.kpi-t td:first-child { min-width: 150px; }
/* ==== fin G1 ==== */
/* ==== v1.22 · cambios del 14/11: G4 (informes, historial y contrato) ==== */
/* Ficha › Informe mensual: en el móvil, «Imprimir», «Descargar PDF» y «Enviar por el chat» uno debajo de otro y a todo
   el ancho, como los de «Informe de progreso» (.pr-actions) */
@media (max-width: 520px) { .rp-bar > .pr-actions { flex: 1 1 100%; } }
/* ==== fin G4 ==== */
/* ==== v1.22 · cambios del 14/11: G5 (asistente del chat y ayuda) ==== */
/* «Ayuda en vídeo»: el acceso al manual interactivo (client-help.js), entre la cabecera y los vídeos. En el móvil, el
   botón baja debajo del texto, a todo el ancho y con 44 px de alto para el dedo; el texto sigue al lado del icono
   también a 320 px (le quedan unos 198 px) */
.help-tour { display: flex; align-items: center; gap: 12px 14px; padding: 16px 18px; flex-wrap: wrap; }
.help-tour .grow { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.help-tour .grow span { color: var(--text-2); font-size: .9rem; }
.help-tour-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; align-self: flex-start; }
.help-tour-ic svg { width: 22px; height: 22px; }
.help-tour > .btn { flex: none; }
@media (max-width: 520px) { .help-tour > .btn { flex: 1 1 100%; min-height: 44px; justify-content: center; } }
/* ==== fin G5 ==== */
/* ==== v1.22 · cambios del 14/11: G3 (manual interactivo y menú del cliente) ==== */
/* «Manual interactivo» en el menú lateral (tour.js, BC.tour.navItem): un botón con el aspecto de las entradas del menú
   (las de «Menús con glifos propios») y su glifo propio */
.sidebar nav .sb-tour { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 8px 10px 8px 12px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font: inherit; font-size: .92rem; font-weight: 600; text-align: left; cursor: pointer; }
.sidebar nav .sb-tour:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav .sb-tour .nav-ic { width: 22px; height: 22px; display: grid; place-items: center; flex: none; color: var(--text-3); transition: color .12s ease; }
.sidebar nav .sb-tour .nav-ic svg { width: 20px; height: 20px; }
.sidebar nav .sb-tour:hover .nav-ic { color: var(--text); }
@media (pointer: coarse) { .sidebar nav .sb-tour { min-height: 44px; } }

/* Recorrido guiado (tour.js): una capa que no deja tocar la página, el resaltado (un hueco con una sombra enorme que
   oscurece el resto) y el globo. Por encima del menú lateral, las barras y el aviso de versión nueva; por debajo de los
   avisos emergentes y del aviso de cookies (detrás de un diálogo de la app, espera escondido) */
:root { --tour-dim: rgba(8, 9, 14, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tour-dim: rgba(0, 0, 0, .7); } }
:root[data-theme="dark"] { --tour-dim: rgba(0, 0, 0, .7); }
.tour-back { position: fixed; inset: 0; z-index: 95; }
.tour-back.dim { background: var(--tour-dim); }
.tour-spot { position: fixed; z-index: 96; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(255, 255, 255, .22), 0 0 0 9999px var(--tour-dim); transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-spot.tour-still { transition: none; }
/* Recortado (lo señalado es más alto que lo que queda libre junto al globo): el borde de abajo, recto */
.tour-spot.is-cut { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tour-pop { position: fixed; z-index: 97; left: 0; top: 0; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 16px); overflow: auto; overscroll-behavior: contain; padding: 16px 16px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); animation: fade .15s ease; }
.tour-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tour-n { flex: none; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.tour-prog { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.tour-prog i { display: block; height: 100%; border-radius: inherit; background: var(--corner, var(--brand)); }
.tour-title { margin: 0 0 6px; font-size: 1.08rem; line-height: 1.3; }
.tour-text { margin: 0; color: var(--text-2); font-size: .93rem; line-height: 1.5; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-gap { flex: 1; }
.tour-foot .btn { padding: 0 14px; }
/* En el móvil (vertical u horizontal): abajo, a todo el ancho; arriba si lo señalado queda abajo (lo decide tour.js) */
.tour-pop.is-sheet { top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.tour-pop.is-sheet.at-top { top: calc(8px + env(safe-area-inset-top, 0px)); bottom: auto; }
@media (max-width: 760px), (pointer: coarse) { .tour-foot .btn { min-height: 44px; } }
/* Muy estrecho: «Anterior» solo con su flecha (los lectores de pantalla siguen oyendo «Anterior») */
@media (max-width: 380px) { .tour-foot .tour-prev { width: 44px; padding: 0; } .tour-prev .tour-lbl { display: none; } }
/* Móvil en horizontal: el globo, bajo y ancho, con los botones a la derecha del texto */
@media (max-height: 500px) and (min-width: 641px) {
  .tour-pop.is-sheet { padding: 12px 16px; }
  .tour-pop.is-sheet .tour-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; align-items: end; }
  .tour-pop.is-sheet .tour-head, .tour-pop.is-sheet .tour-title, .tour-pop.is-sheet .tour-text { grid-column: 1; }
  .tour-pop.is-sheet .tour-foot { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .tour-pop.is-sheet .tour-head { margin-bottom: 4px; }
}
/* ==== fin G3 ==== */
/* ==== v1.22 · cambios del 14/11: G2 (formularios: gimnasio o combate, días, material y editor de preguntas) ==== */
/* «Antes de empezar», paso 1 (C10): gimnasio o deporte de combate con dos opciones grandes (toda la tarjeta se toca),
   una al lado de la otra si caben (240 px cada una) y, si no, una debajo de otra. La marcada lleva el borde y el icono
   de la marca y su ✓ (no solo el color); con error, el borde en rojo */
.fm-tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.fm-track { position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; min-height: 72px; padding: 14px 44px 14px 14px; border: 1.5px solid var(--border-strong); border-radius: 14px; background: var(--surface); cursor: pointer; }
.fm-track:hover { border-color: var(--text-3); }
.fm-track input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fm-track-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--surface-3); color: var(--text-2); }
.fm-track-ic svg.ic { width: 24px; height: 24px; }
.fm-track-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fm-track-txt b { font-size: 1rem; line-height: 1.3; color: var(--text); }
.fm-track-txt small { font-size: .84rem; line-height: 1.4; color: var(--text-3); overflow-wrap: anywhere; }
.fm-track-ok { position: absolute; top: 12px; right: 12px; display: grid; color: var(--brand); opacity: 0; }
.fm-track-ok svg.ic { width: 22px; height: 22px; }
.fm-track:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.fm-track:has(input:checked) .fm-track-ic { background: var(--brand-fill); color: var(--brand-ink); }
.fm-track:has(input:checked) .fm-track-ok { opacity: 1; }
.fm-track:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.fm-tracks.is-invalid .fm-track { border-color: var(--bad); }
.fm-track-note { margin: 10px 0 0; }
/* Para marcar (C7: qué días puede entrenar y qué material tiene; y las preguntas de varias opciones de Benayas): las
   etiquetas del alta, de 40 px de alto como mínimo para el dedo, con su leyenda encima; con error, el borde en rojo */
.fm-more { margin-top: 4px; }
.fm-sub { display: block; float: none; width: 100%; padding: 0; margin: 0 0 8px; font-size: .82rem; font-weight: 600; color: var(--text-2); }
.fm-choices .choice span { min-height: 40px; }
.fm-choices.is-invalid .choice span { border-color: var(--bad); }
.fm-more > .ct-err, .fm-qb > .ct-err { margin-top: 6px; }

/* Ajustes › Formularios (C8): las cuatro plantillas (cuatro en una fila; dos por fila hasta 900 px) y cada pregunta en
   su recuadro, con el número, de dónde es y, a la derecha, subir, bajar y quitar (40 px en las pantallas táctiles) */
.fe-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .fe-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fe-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fe-tpl:hover { border-color: var(--text-3); }
.fe-tpl b { font-size: .92rem; }
.fe-tpl small { font-size: .8rem; color: var(--text-2); overflow-wrap: anywhere; }
.fe-tpl .fe-st { font-size: .74rem; color: var(--text-3); overflow-wrap: anywhere; }
.fe-tpl[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.fe-tpl:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.fe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fe-q { min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.fe-q .form-grid { gap: 10px 14px; }
.fe-q-head { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 8px; }
.fe-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--surface-3); color: var(--text); font-size: .82rem; font-weight: 800; }
.fe-tag { min-width: 0; font-size: .78rem; font-weight: 650; color: var(--text-3); overflow-wrap: anywhere; }
.fe-tools { display: flex; gap: 4px; flex: none; margin-left: auto; }
.fe-req { min-height: 40px; }
.fe-gone { display: grid; gap: 8px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.fe-gone-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fe-readd { max-width: 100%; height: auto; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; line-height: 1.3; }
@media (max-width: 640px) { .fe-q { padding: 10px 12px 12px; } }
/* La pregunta, su aclaración y las opciones se ven enteras: el cuadro mide lo que su texto (y crece al escribir) donde el
   navegador lo admite; si no, las líneas que calcula trainer-forms-editor.js (rows). Sin el alto mínimo de 84 px de los
   cuadros de texto: una aclaración de una línea mide una línea (44 px, cómodo para el dedo) */
.fe-q .textarea { min-height: 44px; field-sizing: content; }
/* ==== fin G2 ==== */
/* ==== v1.22 · cambios del 14/11: INT (integración) ==== */
/* Respuestas rápidas del chat del cliente (entre ellas, «Pedir mi informe de progreso», que es como pide ahora sus
   informes): 40 px de alto para el dedo en las pantallas táctiles */
@media (pointer: coarse) { .quick-replies .chip { min-height: 40px; } }
/* ==== fin INT ==== */
/* ==== v1.22 · arreglos del 14/11: K3 ==== */
/* Informe mensual › «Test físicos» (Y2-01): una fila por prueba, todas, en una tabla de 5 columnas. En el móvil no cabe:
   se desplaza dentro de su recuadro con el nombre de la prueba fijo a la izquierda (sticky-col), y el informe no se
   ensancha (como .pr-report: sin esto, la tabla ensanchaba toda la página). Al imprimir, la tarjeta puede ser alta, así
   que se parte entre páginas (las demás tarjetas del informe no se parten), pero no sus filas */
.report { grid-template-columns: minmax(0, 1fr); }
.rp-tests td { vertical-align: top; }
.rp-tests td.sticky-col { min-width: 120px; }
@media print {
  .report .rp-tests { break-inside: auto; }
  .report .rp-tests .table-wrap { overflow: visible; }
  .report .rp-tests > .card-head { break-after: avoid; }
  .report .rp-tests tr { break-inside: avoid; }
  /* Las cabeceras de las tablas del informe y la columna fija, en su sitio: con position: sticky, al imprimir con la
     página desplazada (Ctrl+P a media página), la cabecera salía encima de la última fila y la tapaba */
  .report .table th, .report .table .sticky-col { position: static; }
}
/* ==== fin K3 ==== */
/* ==== v1.22 · arreglos del 14/11: K2 ==== */
/* «Añadir resultado» de la ficha › Test (Y3-03): las casillas que no son de la prueba elegida (las medidas o, en el 1 km,
   los minutos y los segundos) se ocultan con [hidden], que .field (display: flex) no respetaba */
.form-grid > .field[hidden] { display: none; }
/* Ficha › Test, «Imprimir / PDF» en A4 (Y2-03): la regla general no deja partir ninguna tarjeta, así que la evaluación
   (más alta que lo que quedaba de la página 1) saltaba entera a la 2 y dejaba la 1 casi en blanco, y la nota final se
   quedaba sola en la última página. La evaluación y las tablas de cada capacidad se parten entre páginas (con la tabla
   entera: en el papel .table-wrap no se desplaza), pero no sus filas ni la cabecera de cada tarjeta, que va con lo que
   sigue; la nota va pegada a la última tabla. Las cabeceras de esas tablas, en su sitio (sin position: sticky): con la
   tabla desplegada, al imprimir con la página desplazada salían corridas, encima de otras filas y tarjetas */
@media print {
  .evr-card, .tt-group { break-inside: auto; }
  .evr-card .table-wrap, .tt-group .table-wrap { overflow: visible; }
  .evr-card .table th, .tt-group .table th { position: static; }
  .evr-cmp tr, .tt-group tr { break-inside: avoid; }
  .evr-card > .card-head, .tt-group > .card-head { break-after: avoid; }
  .tt-note { break-before: avoid; }
}
/* ==== fin K2 ==== */
/* ==== v1.22 · IA propia: A4 (pantalla del Asistente con la IA) ==== */
/* «Pregúntale» con tu IA (trainer-assistant.js): el estado de la IA arriba del chat, sus respuestas con formato sencillo,
   el «Pensando…» con «Cancelar» y las tarjetas de propuesta (un bloque por semanas y días, los bloques de varios clientes,
   los cambios de una rutina antes → después y los mensajes en borrador). Todo con las variables del tema (claro y
   oscuro); en el móvil, las tablas se desplazan dentro de su recuadro (con el ejercicio fijo a la izquierda) y los
   botones miden 40 px en las pantallas táctiles (.btn-sm ya lo hace). */
.asi-status { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 8px 14px; font-size: .86rem; line-height: 1.35; min-width: 0; color: var(--text-2); }
.asi-status > .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: break-word; }
.asi-status.is-on { background: var(--ok-soft); color: var(--ok-ink); }
.asi-status.is-off { background: var(--warn-soft); color: var(--warn-ink); }
.asi-status .spinner { width: 14px; height: 14px; border-width: 2px; flex: none; }
.asi-status .btn-ghost { color: inherit; }
.asi-status .btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.asi-status-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.asi-model { font-family: var(--mono); font-size: .82rem; }
/* Respuesta de tu IA: borde continuo (las de siempre van con borde de puntos) */
.msg.asi-answer .msg-bubble { border-style: solid; background: var(--surface); }
.asi-err { margin: 0; }
/* «Pensando…» */
.asi-think { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
.asi-think > .grow { min-width: 0; }
.asi-dots { display: inline-flex; gap: 4px; flex: none; }
.asi-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1s infinite ease-in-out; }
.asi-dots i:nth-child(2) { animation-delay: .15s; }
.asi-dots i:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .asi-dots i { animation: none; } }
.asi-live { font-size: .9rem; color: var(--text); max-height: 40vh; overflow-y: auto; }
.asi-live[hidden], #asi-step[hidden], #asi-slow[hidden] { display: none; }
/* Texto con formato sencillo */
.asi-md { display: grid; gap: 8px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.asi-md > * { min-width: 0; }
.asi-md p, .asi-md ul, .asi-md ol { margin: 0; }
.asi-md ul, .asi-md ol { padding-left: 20px; display: grid; gap: 3px; }
.asi-md .asi-h { font-weight: 750; }
.asi-md code, .asi-howto code { font-family: var(--mono); font-size: .85em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.asi-md hr { border: 0; border-top: 1px solid var(--border); margin: 2px 0; }
.asi-md-table { border: 1px solid var(--border); background: var(--surface); }
.asi-md-table th { text-transform: none; letter-spacing: 0; font-size: .78rem; }
/* Tarjetas de propuesta */
.asi-prop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.asi-prop > * { min-width: 0; }
.asi-prop.is-gone { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; background: none; border-style: dashed; }
/* Cabecera: icono, título y estado; en el móvil, el estado pasa debajo del título (no le quita el ancho) */
.asi-prop-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; min-width: 0; }
.asi-prop-head > svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 1px; }
.asi-prop-head .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: break-word; }
.asi-prop-head > .badge { max-width: 45%; }
.asi-weeks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.asi-weeks li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .8rem; }
.asi-weeks li > :last-child:not(.badge) { padding-right: 5px; }
.asi-wk { font-weight: 700; white-space: nowrap; }
.asi-warn { display: flex; align-items: flex-start; gap: 6px; color: var(--warn-ink); font-weight: 600; }
.asi-warn svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.asi-warn-soft { display: flex; align-items: flex-start; gap: 6px; }
.asi-warn-soft svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--text-3); }
/* El bloque: una fila por ejercicio y una columna por semana */
.asi-plan-wrap { border: 1px solid var(--border); background: var(--surface); }
.asi-plan { font-size: .8rem; }
.asi-plan th, .asi-plan td { vertical-align: top; }
.asi-plan thead th { text-transform: none; letter-spacing: 0; font-size: .76rem; color: var(--text-2); white-space: normal; }
.asi-plan thead th .asi-wk { display: block; }
.asi-plan thead th .badge { margin-top: 2px; }
.asi-plan td { min-width: 92px; font-variant-numeric: tabular-nums; }
.asi-plan tbody th { position: sticky; left: 0; top: auto; text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--text); white-space: normal; }
.asi-plan tbody th.asi-ex { background: var(--surface); font-weight: 600; min-width: 118px; max-width: 170px; overflow-wrap: break-word; }
.asi-plan tr.asi-day th, .asi-plan tr.asi-day td { background: var(--surface-2); font-weight: 800; color: var(--text-2); }
.asi-plan tbody tr:hover th.asi-ex { background: var(--surface-2); }
.asi-swap { display: block; font-weight: 700; }
/* Bloques de varios clientes */
.asi-plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.asi-plans-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.asi-plans-item > * { min-width: 0; }
.asi-plans-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.asi-plans-row .grow { display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; }
.asi-plans-row .avatar { width: 30px; height: 30px; font-size: .72rem; flex: none; }
.asi-plans-item .asi-weeks li { background: var(--surface-2); }
.asi-more > summary { cursor: pointer; font-weight: 650; color: var(--text-2); padding: 6px 0; }
.asi-more > summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
.asi-more[open] > summary { margin-bottom: 4px; }
@media (pointer: coarse) { .asi-more > summary { padding: 10px 0; } }
/* «Avisar a … al aplicar» y botones de cada propuesta */
.asi-notify { font-size: .84rem; color: var(--text-2); }
@media (pointer: coarse) { .asi-notify { min-height: 40px; align-items: center; } .asi-notify input[type="checkbox"] { margin-top: 0; } }
.asi-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.asi-acts-all { padding-top: 10px; border-top: 1px dashed var(--border-strong); }
/* Cambios de una rutina: antes → después */
.asi-diff { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.asi-diff li { display: grid; gap: 3px; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow-wrap: break-word; }
.asi-where { font-size: .76rem; font-weight: 700; color: var(--text-3); }
.asi-chg { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: .88rem; min-width: 0; }
.asi-chg > span { min-width: 0; }
.asi-chg svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.asi-before { color: var(--text-3); text-decoration: line-through; }
.asi-after { color: var(--ok-ink); font-weight: 650; }
.asi-avisos { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.asi-avisos li { display: flex; align-items: flex-start; gap: 6px; overflow-wrap: break-word; min-width: 0; }
.asi-avisos svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--text-3); }
/* Mensaje en borrador */
.asi-draft { padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface); font-size: .9rem; }
/* «Cómo encender tu IA» */
.asi-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 640px) {
  .asi-status { padding: 8px 12px; }
  .asi-status-acts { margin-left: 0; width: 100%; }
  .asi-status-acts .btn { flex: 1 1 auto; }
  .asi-status .asi-hide-sm { display: none; } /* «Cómo funciona»: solo el icono (con su nombre para el lector) */
  .asi-status.is-on .btn { min-width: 40px; justify-content: center; }
  .asi-status.is-on > .grow { flex-basis: 0; }
  /* Más ancho para las respuestas y las tablas: el chat del Asistente, con menos margen a los lados */
  .as-chat .chat-log { padding: 12px 10px; }
  .asi-prop { padding: 10px; }
  .asi-prop-head { grid-template-columns: auto minmax(0, 1fr); }
  .asi-prop-head > .badge { grid-column: 2; justify-self: start; max-width: 100%; }
  .asi-acts .btn { flex: 1 1 auto; }
  /* Escribir: el cuadro y el botón de enviar (solo el icono) en la misma línea, y el cuadro, de dos líneas */
  .as-form { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .as-form .as-input-wrap { min-width: 0; }
  .as-form .textarea { min-width: 0; min-height: 66px; } /* dos líneas enteras (8 px de margen arriba y abajo) */
  .as-form > .btn-primary { width: 48px; min-width: 48px; padding: 0; flex: none; }
  .as-form > .btn-primary .asi-send-txt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* En los móviles estrechos, las semanas del bloque en menos líneas: sin su RPE (está en la tabla) */
@media (max-width: 480px) { .asi-weeks li > .muted { display: none; } .asi-weeks li { padding-right: 4px; } }
/* ==== fin A4 ==== */
/* ==== v1.22 · IA propia: A2 (generador de bloques: intensidad de cada semana en «Generar rutina») ==== */
/* «Generar rutina» › Intensidad de cada semana: los atajos en una fila que se parte en el móvil y una casilla por semana
   en rejilla (en el ordenador, en una fila; en el móvil, de dos en dos). Cada casilla lleva el color de su intensidad
   (los .int-sel-* del editor de la semana; la descarga, en gris) y en pantallas táctiles todo mide 40 px de alto */
.pd-int-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pd-int-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 7.2rem), 1fr)); gap: 8px; }
.pd-int-w { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: .78rem; font-weight: 600; color: var(--text-3); }
.pd-int-w .select { width: 100%; min-width: 0; }
.select.int-sel-descarga { background-color: var(--surface-3); color: var(--text-2); border-color: transparent; font-weight: 700; }
@media (pointer: coarse) { .pd-int-quick .chip, .pd-int-w .select { min-height: 40px; } }
/* ==== fin A2 ==== */
/* ==== v1.22 · IA propia, arreglos: R3 ==== */
/* Ajustes › Metodología › Intensidad de cada semana (Z1-10). Donde cabe, la tabla de siempre (las casillas con su ancho
   de antes); donde no (el móvil, y en el ordenador entre 1101 y unos 1340 px, con la tarjeta en media pantalla), cortaba
   columnas sin que se notara que se desplaza: con el recuadro por debajo de 480 px (lo que mide la tabla), cada intensidad
   pasa a ser una tarjeta con sus cuatro casillas de dos en dos, cada una con su etiqueta encima (data-label: RPE,
   Básicos, Secundarios, Accesorios), y en la descarga el «− … % de series» va debajo de su RPE, a todo el ancho */
.irx-wrap { container: irx / inline-size; }
.irx-table .irx-in { width: 76px; }
.irx-table .irx-in-sets { width: 64px; }
@container irx (max-width: 480px) {
  .table.irx-table, .irx-table tbody, .irx-table tr, .table.irx-table th, .table.irx-table td { display: block; }
  .irx-table thead { display: none; }
  .irx-table tbody { display: grid; gap: 10px; }
  .irx-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 10px 12px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
  .table.irx-table tbody th { grid-column: 1 / -1; position: static; padding: 0; border: 0; background: none; color: var(--text-2); }
  .table.irx-table td { min-width: 0; padding: 0; border: 0; background: none; }
  .table.irx-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
  .irx-table .irx-in { width: 100%; }
  .table.irx-table td.irx-sets { grid-column: 1 / -1; }
  .irx-table td.irx-sets label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; white-space: normal; }
  .table.irx-table tbody tr:hover td { background: none; }
}
/* ==== fin R3 ==== */
/* === Tu IA fase 1 === */
/* Tu IA sin ningún modelo (trainer-assistant.js e ia-respuestas.js): la marca discreta de dónde sale cada respuesta («al
   momento», «tu respuesta» o «modelo»), sus respuestas rápidas (chips: en las pantallas táctiles miden 40 px, como todas
   las de .quick-replies), «Guardar como respuesta mía» y la tarjeta «Tus respuestas para tu IA» de Entrenar. Con las
   variables del tema (claro y oscuro) y sin anchos fijos: cabe a 320 px. */
.asi-src { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; padding: 1px 8px 1px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: .72rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.asi-src svg { width: 12px; height: 12px; flex: none; color: var(--text-3); }
.asi-src-referencia svg { color: var(--brand); }
/* «Pensando…»: con tu IA sin modelo la respuesta llega al momento, así que la burbuja de espera solo se ve si tarda (si no,
   parpadearía); al repintarse mientras espera (la del modelo del servidor) ya no lleva el retraso */
@keyframes asi-appear { from { opacity: 0; } to { opacity: 1; } }
.asi-pending.asi-fresh { animation: asi-appear .15s ease-out .4s both; }
/* Respuestas rápidas (y las sugerencias de las respuestas de siempre) pegadas al texto: .quick-replies, más abajo en el
   archivo, les ponía su margen de la fila de sugerencias y le ganaba a .as-inline-chips */
.quick-replies.as-inline-chips { padding: 0; }
.asi-opts { gap: 6px; }
/* «Guardar como respuesta mía», al final de la respuesta */
.asi-ref-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }
.asi-ref-acts .btn { color: var(--text-2); }
.asi-ref-acts .btn, .asi-refs-foot .btn { white-space: normal; text-align: left; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }
.asi-saved { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }
.asi-saved svg { width: 14px; height: 14px; color: var(--ok-ink); flex: none; }
/* Barra de estado: «Tu IA: lista · al momento…»; en el móvil, la versión corta */
.asi-status-txt { overflow-wrap: break-word; }
.asi-status-short { display: none; }
@media (max-width: 480px) { .asi-status-txt { display: none; } .asi-status-short { display: inline; } }
/* «Cómo funciona tu IA»: la lista de lo que entiende y el modelo opcional (plegado) */
.asi-howto .asi-steps { margin: 4px 0 0; }
.asi-opt-model > .stack { gap: 8px; padding: 2px 0 4px; }
/* Entrenar › «Tus respuestas para tu IA»: cada respuesta, en dos líneas como mucho */
.asi-refs-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.asi-refs-head .xsmall { overflow-wrap: break-word; }
.asi-refs-list li > .grow > b { overflow-wrap: anywhere; }
.asi-refs-list li > .grow > span.small { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asi-refs-list .badge { margin-top: 2px; }
.asi-refs-foot { padding-top: 10px; padding-bottom: 12px; border-top: 1px solid var(--border); }
@media (pointer: coarse) { .asi-saved { min-height: 40px; } }
@media (max-width: 640px) {
  .asi-refs-list li { padding: 10px 12px; gap: 4px; }
  .asi-ref-acts .btn { flex: 1 1 auto; }
}
/* Revisión de la fase 1 (V3): las sugerencias de arriba, en el ordenador, en dos líneas (todas a la vista); en el móvil, una
   fila que se desliza con un difuminado a la derecha (se ve que sigue). Con 4 px de margen, el anillo de foco de los chips
   no se corta; los de dentro de una respuesta ya se parten en líneas y no necesitan desplazarse (sin recorte) */
.quick-replies.asi-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 4px; }
.quick-replies.as-inline-chips { overflow: visible; }
@media (max-width: 640px) {
  .quick-replies.asi-chips { flex-wrap: nowrap; overflow-x: auto; padding: 8px 12px 6px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .quick-replies.asi-chips .chip { flex: none; }
  /* Al abrir Pregúntale en el móvil, el cuadro de escribir cabe en la pantalla: sin el subtítulo de la tarjeta (está en
     «Cómo funciona») y con el chat a la altura que queda */
  .as-chat > .card-head .xsmall { display: none; }
  .as-chat .chat-log { max-height: max(180px, calc(100dvh - 360px)); min-height: 180px; }
}
/* Las tarjetas de sus clientes en una respuesta de tu IA (como las de «Pregúntale» de siempre) y sus botones */
.asi-items { margin: 0; }
.asi-links .btn { white-space: normal; text-align: left; }
/* «Desliza la tabla para ver las semanas…»: solo en el móvil, donde la tabla del bloque no cabe */
.asi-swipe { display: none; align-items: center; gap: 4px; }
.asi-swipe svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 640px) { .asi-swipe { display: flex; } }
/* Objetivos táctiles de 40 px: la lista de @menciones, los destinatarios del borrador, «Eliminar este mensaje» del chat,
   los botones segmentados (RM, métricas del reloj…) y las casillas de series de «Mi semana» */
@media (pointer: coarse) {
  .as-mention-item, .choice span, .segmented button, .as-over-item { min-height: 40px; }
  .msg-del { min-width: 40px; min-height: 40px; }
  .sets .input-sm, .sets .select { min-height: 40px; }
}
/* === fin Tu IA fase 1 === */
/* ==== v1.22 · Perfil de atleta (16/11/2026; perfil.js) ==== */
/* El tipo de atleta con el cuadro fuerza-velocidad: en la ficha › Test (Benayas), en los resultados de la evaluación y en
   Ajustes › KPIs de test (sus textos). Colores del tema (claro y oscuro) y de las gráficas, como el pentágono */
.pa-card .pa-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.pa-who { min-width: 0; }
.pa-type { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.pa-pick { margin: 0; min-width: 0; flex: 0 1 230px; }
.pa-pick .select { width: 100%; }
.pa-split { align-items: center; }
.pa-split > * { min-width: 0; }
.pa-fig { margin: 0; display: grid; gap: 6px; justify-items: center; }
.pa-fig figcaption { max-width: 340px; text-align: center; }
.pa-svg { width: 100%; max-width: 340px; height: auto; }
.pa-q { fill: var(--surface-2); }
.pa-q.on { fill: var(--info-soft); } /* el cuadrante del punto (el tipo calculado) */
.pa-frame { fill: none; stroke: var(--chart-axis); stroke-width: 1; }
.pa-mid { stroke: var(--chart-axis); stroke-width: 1; stroke-dasharray: 4 4; }
/* Los nombres de los cuadrantes van encima de los puntos, con un borde del color de su fondo para que se lean */
.pa-qlbl { fill: var(--text-3); font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: var(--surface-2); stroke-width: 4px; stroke-linejoin: round; }
.pa-qlbl.on { fill: var(--text); stroke: var(--info-soft); }
.pa-qlbl.sm { font-size: 10.5px; }
.pa-txt { white-space: pre-line; }
.pa-eyebrow { margin: 0 0 2px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.pa-elegido { color: var(--text-2); }
.pa-elegido svg { width: 14px; height: 14px; vertical-align: -2px; }
.pa-tick { fill: var(--text-3); font-size: 11px; }
.pa-ax { fill: var(--text-2); font-size: 12.5px; font-weight: 700; }
.pa-path { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 3 3; }
.pa-dot { fill: var(--text-3); stroke: var(--chart-surface); stroke-width: 1.5; }
.pa-dot.now { fill: var(--series-1); stroke: var(--chart-surface); stroke-width: 2.5; }
.pa-axes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pa-axes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pa-axes li:last-child { border-bottom: 0; }
.pa-axn { display: grid; gap: 2px; min-width: 0; }
.pa-axv { display: inline-flex; align-items: baseline; gap: 6px; flex: none; }
.pa-axv b { font-size: 1.15rem; }
.pa-cli summary { cursor: pointer; color: var(--text-2); }
.pa-set-t { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 4px; margin: 0; min-width: 0; }
.pa-set-t legend { padding: 0 6px; }
/* Imágenes de los superhéroes (17/11/2026) */
.pa-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pa-hero { width: 104px; height: 104px; flex: none; border-radius: 24px; object-fit: cover; box-shadow: 0 6px 18px rgba(20, 16, 30, .18); }
.pa-hero.sm { width: 76px; height: 76px; border-radius: 18px; }
.pa-set-img { display: flex; align-items: center; gap: 14px; margin: 4px 0 10px; }
.pa-set-img-b { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pa-set-img-b .row:has(input:focus-visible) > label.btn { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 420px) { .pa-hero { width: 84px; height: 84px; border-radius: 20px; } .pa-hero.sm { width: 64px; height: 64px; border-radius: 16px; } }
@media (max-width: 1100px) { .pa-split { grid-template-columns: 1fr; } }
/* Al imprimir (también con Ctrl+P en tema oscuro), colores de papel */
@media print {
  .pa-q { fill: #f6f7fb !important; }
  .pa-q.on { fill: #e6f0fc !important; }
  .pa-qlbl, .pa-ax { fill: #454b5e !important; stroke: #f6f7fb !important; }
  .pa-ax { stroke: none !important; }
  .pa-qlbl.on { fill: #12141c !important; stroke: #e6f0fc !important; }
  .pa-tick { fill: #656b88 !important; }
  .pa-frame, .pa-mid { stroke: #c3c2b7 !important; }
  .pa-dot { fill: #656b88 !important; stroke: #ffffff !important; }
  .pa-dot.now { fill: #2a78d6 !important; }
}
/* ==== fin Perfil de atleta ==== */
/* ==== v1.22 · Alta obligatoria (16/11/2026; alta.js): formularios → tests → perfil de atleta → rutinas ==== */
.alta-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.alta-steps li { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3); font-size: .82rem; font-weight: 600; }
.alta-steps .alta-lbl { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.alta-steps .alta-n { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: .75rem; }
.alta-steps .alta-n svg { width: 12px; height: 12px; }
.alta-steps li.done { color: var(--ok-ink); background: var(--ok-soft); }
.alta-steps li.done .alta-n { background: var(--ok-ink); color: var(--surface); }
.alta-steps li.now { color: var(--text); background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info); }
.alta-steps li.now .alta-n { background: var(--info); color: #fff; }
.alta-lock > .stack > .row.top > svg { width: 22px; height: 22px; flex: none; color: var(--text-2); margin-top: 2px; }
.alta-lock .alta-lock-h { flex-wrap: nowrap; align-items: flex-start; }
.alta-lock .alta-lock-h > .grow { min-width: 0; }
@media (max-width: 420px) { .alta-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Batería de tests (evaluation.js): «Asignar tests» (trainer-tests.js), Ajustes › KPIs de test y la hoja del cliente */
.evb-quick { gap: 6px; margin-bottom: 10px; }
.evb-fs { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
.evb-fs legend { margin-bottom: 6px; padding: 0; font-size: .86rem; font-weight: 650; color: var(--text-2); }
.evb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 6px; }
.evb-item { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; min-width: 0; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.evb-item:hover { border-color: var(--text-3); }
.evb-item input { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.evb-item span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; font-size: .9rem; }
.evb-item small { font-size: .78rem; color: var(--text-3); overflow-wrap: anywhere; }
.evb-item:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); }
.evb-item:has(input:checked) small { color: inherit; }
.evb-item:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.evb-more { margin: 0 0 4px; }
.evb-more > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 600; color: var(--text-2); list-style: none; }
.evb-more > summary::-webkit-details-marker { display: none; }
.evb-more > summary svg { width: 16px; height: 16px; transition: transform .15s; }
.evb-more[open] > summary svg { transform: rotate(180deg); }
.evb-more[open] > summary { margin-bottom: 8px; }
.evb-t td:last-child { min-width: 200px; }
.evb-t .evb-ej { width: 100%; }
.evr-ex { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: .86rem; color: var(--text-2); }
.evr-ex > span { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.evr-ex b { color: var(--text); font-weight: 600; }
.evr-exl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.evr-att.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 420px) { .evb-t td:last-child { min-width: 160px; } }
/* ==== fin Alta obligatoria ==== */
