/* ── _01-tokens.css ── */
/* ── _01-tokens.css ── */
/* ============================================
   NULLUM — Design System
   High impact · Red hierarchy · Grain backdrop
   Fonts: cargadas desde index.html (sin @import bloqueante)
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colores base — NULLUM Guía Maestra v2.1 (burdeos & blanco perla) */
  --color-bg:             #FAF8F6; /* --bg-pearl */
  --color-bg-deep:        #F3EFEB; /* --surface-panel */
  --color-surface:        #FFFFFF;
  --color-surface-hover:  #F3EFEB;
  --color-surface-raised: #FFFFFF;
  /* Capas quiet luxury — variaciones milimétricas, sin bordes gruesos */
  --color-surface-float:  #FFFFFF;
  --color-surface-inset:  #F3EFEB;
  --color-layer-hairline: rgba(92, 36, 48, 0.06);

  /* Bordes — técnicos, tintados de marca (Guía 04: border: 1px solid rgba(92,36,48,.15)) */
  --color-border:         rgba(92, 36, 48, 0.15);
  --color-border-strong:  rgba(92, 36, 48, 0.32);

  /* Texto — WCAG AA ≥ 4.5:1 vs bg/surface */
  --color-text-primary:   #1A1A1A; /* --text-carbon */
  --color-text-secondary: #4A4238; /* grafito neutro — guía exige grises, no tintes de acento */
  --color-text-muted:     #6B6058; /* ratio ~5.1:1 vs #FAF8F6 — WCAG AA */

  /* Acentos — --accent-burgundy oficial de la Guía Maestra v2.1 (nunca rojo láser) */
  --color-accent:           #5C2430;
  --color-accent-hover:     #471B24;
  --color-accent-soft:      rgba(92, 36, 48, 0.08);
  --color-accent-red:       #5C2430;
  --color-accent-red-hover: #471B24;
  --color-accent-gold:      #8B5A3A;
  --color-accent-gold-dim:  #A07050;
  --color-red-vibrant:      #5C2430;
  --color-red-muted:        #8A5560;
  /* Tirador check-in: núcleo visual mínimo (hitbox sigue en --touch-*) */
  --color-slider-thumb:     #471B24;
  --slider-thumb-visual-w:  6px;
  --slider-thumb-visual-h:  14px;
  --color-on-accent:        #FFFFFF;
  /* Sin glow neón — "aparición sutil de marcos estructurales" (Guía 05), no halo láser */
  --glow-red:               0 0 0 1px rgba(92, 36, 48, 0.18);
  --glow-red-soft:          0 0 0 1px rgba(92, 36, 48, 0.12);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C2430' d='M6 8L0 0h12z'/%3E%3C/svg%3E");

  /* Estado */
  --color-error:          #5C2430;
  --color-error-bg:       rgba(92, 36, 48, 0.08);
  --color-success:        #2F6B5E;
  --color-success-bg:     rgba(47, 107, 94, 0.1);
  --color-cal-planned:    #3B6F8C;
  --color-cal-planned-bg: rgba(59, 111, 140, 0.12);
  --color-cal-missed:     #A66B2E;
  --color-cal-missed-bg:  rgba(166, 107, 46, 0.12);
  --color-cal-rest:       #9AA1AA;

  /* Tipografías — sans geométrica de alta legibilidad, sin serif ni cursiva (Guía Maestra).
     --font-display y --font-handwritten quedan alias de la misma sans: cualquier regla que
     aún las referencie (var() o literal más abajo) hereda la sans, nunca Instrument Serif. */
  --font-heading:     'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-display:     'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-mono:        'Plus Jakarta Sans', 'Archivo', monospace;
  --font-typewriter:  'Plus Jakarta Sans', 'Archivo', sans-serif;
  --font-handwritten: 'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body:        'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;

  /* Escala tipográfica — legibilidad móvil prioritaria
     1 display · 2 título · 3 subtítulo · 4 cuerpo · 5 apoyo · 6 CTA */
  --text-display:   clamp(1.5rem, 4vw, 2.5rem);
  --text-title:     clamp(1.1rem, 3.2vw, 1.35rem);
  --text-subtitle:  clamp(0.93rem, 2.6vw, 1rem);
  --text-body:      clamp(0.95rem, 2.6vw, 1rem);
  --text-support:   clamp(0.82rem, 2.2vw, 0.875rem);
  --text-cta:       0.875rem;
  --text-eyebrow:   0.72rem;
  --text-metric:    clamp(1.5rem, 4vw, 2.5rem);
  --weight-display: 800;
  --weight-title:   700;
  --weight-subtitle: 500;
  --weight-body:    400;
  --weight-cta:     700;
  --weight-metric:  800;
  --track-display:  0.06em;
  --track-title:    0.04em;
  --track-eyebrow:  0.12em;
  --track-cta:      0.06em;
  --leading-tight:    1.2;
  --leading-snug:     1.35;
  --leading-body:     1.65;
  --leading-relaxed:  1.8;
  --weight-eyebrow:   500;

  /* Espaciado — módulo 4pt */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   64px;
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;

  /* Radios — técnicos/rectos por defecto (Guía 04); la píldora es la excepción
     deliberada reservada a CTAs, nunca el default de tarjetas o paneles. */
  --radius-none: 0;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;
  /* Radios v2 — paneles dark glassmorphic (módulos check-in, trainer, sesión, perfil) */
  --radius-xl:    20px;
  --radius-2xl:   28px;
  --radius-panel: 32px;
  --border-width: 1px;
  --border-width-strong: 2px;
  /* Sombra editorial más dimensional — profundidad sin ruido */
  --shadow-card:  0 1px 3px rgba(92, 36, 48, 0.06), 0 8px 24px rgba(26, 26, 26, 0.07);
  --shadow-heavy: 0 2px 6px rgba(92, 36, 48, 0.08), 0 16px 40px rgba(26, 26, 26, 0.10);
  /* Sombra brutalista real: bloque sólido sin difuminar, sin blur — firma neofuturista */
  --shadow-brutalist:       4px 4px 0 0 var(--color-text-primary);
  --shadow-brutalist-sm:    3px 3px 0 0 var(--color-text-primary);
  --shadow-brutalist-accent: 4px 4px 0 0 var(--color-accent);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(26,26,26,0.08), 0 2px 6px rgba(92,36,48,0.05);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 18px 44px rgba(26,26,26,0.11), 0 4px 10px rgba(92,36,48,0.07);

  /* Transiciones — curva oficial NULLUM (Guía 05: cubic-bezier(0.16,1,0.3,1), 200–350ms) */
  --transition-fast:   200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base:   280ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-view:   var(--transition-base);
  --transition-drawer: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Motion — sistema de dopamina visual */
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);   /* overshoot ligero */
  --ease-snappy:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-back:  cubic-bezier(0.36, 0, 0.66, -0.56);
  --dur-instant:  80ms;
  --dur-fast:    150ms;
  --dur-normal:  250ms;
  --dur-slow:    400ms;
  --dur-xslow:   600ms;

  /* Alias de color de texto (algunos módulos usan --color-text) */
  --color-text: var(--color-text-primary);

  /* Sidebar */
  --sidebar-width: 270px;

  /* Layout móvil — 48px = mínimo Material / WCAG 2.5.5; gym = fat-finger */
  --page-pad-x: 1rem;
  --touch-min: 48px;
  --touch-comfortable: 56px;
  --touch-gym: 56px;
  --touch-gym-cta: 64px;
  --touch-gap-gym: 12px;
  --keyboard-inset: 0px;
  --vv-height: 100dvh;
  --vv-offset-top: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --press-scale: 0.97;
  --press-opacity: 0.82;
  --press-ms: 90ms;

  /* Tokens de estado para escenario dark — evitan hardcode en módulos v2 */
  --color-success-dark:  #5fcfba;
  --color-warning-dark:  #f5c06a;
  --color-error-dark:    #e07080;
  --color-neon-primary:  #8A5560;
  --color-neon-soft:     #ffd0da;

  /* === Mejora 6: color-mix precalculados — evitan recalculo en cada repaint === */
  --cm-accent-4:   color-mix(in srgb, var(--color-accent) 4%,  var(--color-surface));
  --cm-accent-5:   color-mix(in srgb, var(--color-accent) 5%,  var(--color-surface));
  --cm-accent-8:   color-mix(in srgb, var(--color-accent) 8%,  var(--color-surface));
  --cm-accent-10:  color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
  --cm-accent-12:  color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
  --cm-accent-16:  color-mix(in srgb, var(--color-accent) 16%, var(--color-surface));
  --cm-accent-18:  color-mix(in srgb, var(--color-accent) 18%, var(--color-surface));
  --cm-accent-28t: color-mix(in srgb, var(--color-accent) 28%, transparent);
  --cm-border-80:  color-mix(in srgb, var(--color-border)  80%, transparent);
  --cm-border-88:  color-mix(in srgb, var(--color-border)  88%, transparent);
  --cm-gold-8:     color-mix(in srgb, var(--color-accent-gold) 8%, var(--color-surface));

  /*
    --- Component tokens ---
    Contrato: nuevas secciones usan .btn / .form__input / .card y --modal-*.
    No hardcodear border-radius ni hex en botones, inputs o chrome de modal.
    Variantes = modificadores BEM (btn--primary, btn--sm), no copiar el bloque.
    CTA sólido → --color-accent / --btn-primary-*; énfasis tipográfico → --color-red-vibrant.
  */
  --control-radius: var(--radius-sm);
  --control-border-width: 1px;
  --control-bg: var(--color-surface);
  --control-border: var(--color-border);
  --control-border-hover: var(--color-border-strong);
  --control-border-focus: var(--color-red-vibrant);
  --control-focus-ring: 0 0 0 3px var(--color-accent-soft), var(--glow-red-soft);
  --control-error-ring: 0 0 0 1px color-mix(in srgb, var(--color-error) 45%, transparent);
  --control-min-height: var(--touch-min);
  --control-pad-y: var(--space-md);
  --control-pad-x: var(--space-md);
  --control-font: var(--font-heading);
  --control-label-color: var(--color-red-muted);
  --control-label-weight: 700;
  --control-label-tracking: 0.08em;
  --control-support-color: var(--color-red-muted);

  --btn-radius: var(--radius-md);
  --btn-font-size: 0.9rem;
  --btn-letter-spacing: 0.06em;
  --btn-font-weight: 800;
  --btn-pad-y: 0.9rem;
  --btn-pad-x: 1.25rem;
  --btn-border: 1px solid transparent;
  --btn-primary-bg: var(--color-red-vibrant);
  --btn-primary-hover: var(--color-accent-hover);
  --btn-primary-shadow: var(--glow-red-soft);
  --btn-danger-fg: var(--color-error);
  --btn-danger-border: color-mix(in srgb, var(--color-error) 55%, transparent);
  --btn-danger-bg-hover: color-mix(in srgb, var(--color-error) 18%, transparent);
  --btn-danger-fg-hover: color-mix(in srgb, var(--color-error) 55%, #fff 45%);

  --card-radius: 0;
  --card-gap: var(--space-xl);
  --card-divider: 1px solid var(--color-border);

  --modal-backdrop: rgba(0, 0, 0, 0.55);
  --modal-radius: var(--radius-md);
  --modal-dialog-bg: var(--color-surface);
  --modal-border: 1px solid var(--color-border-strong);
  --modal-shadow: var(--shadow-elev-2);
  --modal-header-pad: var(--space-lg);
  --modal-close-size: var(--touch-min);
  --modal-title-size: var(--text-title);
  --modal-title-color: var(--color-text-primary);
}

/* ── Fuentes por tema ──────────────────────────────────────────────────────
   Cada bloque activa la fuente cargada dinámicamente en index.html para ese
   tema. Solo se sobreescriben los tokens de fuente; los colores siguen
   siendo los de cada tema (definidos en _02-base.css / _12-polish-themes.css).
   ───────────────────────────────────────────────────────────────────────── */

/* classic + burgundy-dark: Guía Maestra — Plus Jakarta Sans (sin serif/cursiva) */
html[data-theme="classic"],
html[data-theme="burgundy-dark"] {
  --font-heading:    'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-display:    'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body:       'Plus Jakarta Sans', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-mono:       'Plus Jakarta Sans', 'Archivo', monospace;
  --font-typewriter: 'Plus Jakarta Sans', 'Archivo', sans-serif;
  --weight-display:  800;
  --weight-title:    700;
}

/* jungle-fire: Barlow Condensed (headings) + DM Sans (body) */
html[data-theme="jungle-fire"] {
  --font-heading:    'Barlow Condensed', 'Archivo', sans-serif;
  --font-display:    'Barlow Condensed', 'Archivo', sans-serif;
  --font-body:       'DM Sans', 'Plus Jakarta Sans', sans-serif;
  --font-mono:       'DM Sans', monospace;
  --weight-display:  800;
  --weight-title:    700;
  --track-title:     0.06em;
  --track-display:   0.08em;
}

/* blueprint / blueprint-light: Barlow Condensed (headings) + Space Mono (mono) + Inter (body) */
html[data-theme="blueprint"],
html[data-theme="blueprint-light"] {
  --font-heading:    'Barlow Condensed', 'Archivo', sans-serif;
  --font-display:    'Barlow Condensed', 'Archivo', sans-serif;
  --font-body:       'Inter', 'Plus Jakarta Sans', sans-serif;
  --font-mono:       'Space Mono', 'Courier New', monospace;
  --font-typewriter: 'Space Mono', 'Courier New', monospace;
  --weight-display:  800;
  --weight-title:    700;
  --track-title:     0.06em;
  --track-display:   0.08em;
}

/* coastal: Poppins (headings+body) + Lavishly Yours (decorativo, --font-handwritten) */
html[data-theme="coastal"] {
  --font-heading:     'Poppins', 'Plus Jakarta Sans', sans-serif;
  --font-display:     'Poppins', 'Plus Jakarta Sans', sans-serif;
  --font-body:        'Poppins', 'Plus Jakarta Sans', sans-serif;
  --font-handwritten: 'Lavishly Yours', cursive;
  --weight-display:   700;
  --weight-title:     600;
}

/* miami: Bodoni Moda (headings) + Space Grotesk (body) */
html[data-theme="miami"] {
  --font-heading:    'Bodoni Moda', 'Georgia', serif;
  --font-display:    'Bodoni Moda', 'Georgia', serif;
  --font-body:       'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-mono:       'Space Grotesk', monospace;
  --weight-display:  700;
  --weight-title:    700;
}

/* void-violet: IM Fell English (headings) + DM Sans (body) */
html[data-theme="void-violet"] {
  --font-heading:    'IM Fell English', 'Georgia', serif;
  --font-display:    'IM Fell English', 'Georgia', serif;
  --font-body:       'DM Sans', 'Plus Jakarta Sans', sans-serif;
  --font-mono:       'DM Sans', monospace;
  --weight-display:  400;
  --weight-title:    400;
}

/* ── Contexto dark-scene ──────────────────────────────────────────────────
   Clase compartida por todos los paneles v2 (check-in, trainer, sesión,
   perfil, biblioteca). Sustituye los bloques de tokens hardcodeados en
   _26/_27/_28/_29. Uso: añadir class="dark-scene" al wrapper del panel.
   Los !important de módulos v2 se eliminan al ganar especificidad con
   el selector de contexto: .dark-scene .card { ... } gana sin !important.
   ─────────────────────────────────────────────────────────────────────── */
.dark-scene {
  --color-bg:              #0a0506;
  --color-bg-deep:         #0a0506;
  --color-surface:         rgba(255, 255, 255, 0.055);
  --color-surface-hover:   rgba(255, 255, 255, 0.10);
  --color-surface-raised:  rgba(255, 255, 255, 0.07);
  --color-surface-inset:   rgba(255, 255, 255, 0.04);
  --color-surface-float:   rgba(255, 255, 255, 0.07);
  --color-border:          rgba(255, 255, 255, 0.13);
  --color-border-strong:   rgba(255, 255, 255, 0.26);
  --color-text-primary:    #fff;
  --color-text-secondary:  rgba(255, 255, 255, 0.74);
  --color-text-muted:      rgba(255, 255, 255, 0.52);
  --color-text:            #fff;
  --color-success:         var(--color-success-dark);
  --color-cal-missed:      var(--color-warning-dark);
  --color-error:           var(--color-error-dark);
  color-scheme: dark;
}


/* ── _02-base.css ── */
/* --- Skip-to-content --- */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  z-index: 99999;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent, #5C2430);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fallback global de focus: garantiza que cualquier elemento enfocable con
   teclado tenga un ring visible si el componente no define uno propio.
   Los componentes pueden sobreescribir con su propio outline/box-shadow. */
:focus-visible {
  outline: 2px solid var(--color-accent, #5C2430);
  outline-offset: 2px;
}

html {
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  /* svh a propósito, NO dvh: dvh recalcula el min-height de TODO el
     documento cada vez que la barra de direcciones de Safari se
     oculta/aparece — incluso en gestos de scroll normales, no solo al
     entrar/salir del hero. Es la misma clase de bug de scroll pillado que
     ya tuvimos en el hero (ver comentario en .nlm-hero), así que ningún
     contenedor de layout en html/body/.app usa dvh. */
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto; /* scroll vertical del documento (móvil táctil) */  overscroll-behavior-x: none; /* evita bounce horizontal */
  overscroll-behavior-y: none; /* sin rebote elástico de página (Android Chrome) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
  /* NO scroll-behavior:smooth aquí: hace que window.scrollTo()/scroll nativo
     (rueda, teclado, swipe) se quede bloqueado en 0 si la animación de scroll
     suave no progresa (WebViews lentos, navegadores in-app de redes sociales,
     pestañas en segundo plano) — bug reproducido y confirmado durante
     desarrollo. El scroll suave puntual (CTA "desliza", anclas) se pide caso
     a caso con scrollIntoView({behavior:'smooth'}), que no depende de esto. */
}

html[data-theme-mode="light"] {
  color-scheme: light;
}

/* ═══════════════════════════════════════════════
   PANEL HEADER + ABOUT — default vars (burdeos)
   Se sobreescriben por cada html[data-theme="…"]
   ═══════════════════════════════════════════════ */
:root {
  /* panel__header */
  --ph-bg:           #0e0407;
  --ph-text:         #fff;
  --ph-orb-c1:       rgba(92, 36, 48, 0.88);
  --ph-orb-c2:       rgba(130, 24, 44, 0.50);
  --ph-orb-c3:       rgba(55, 10, 20, 0.75);
  --ph-spark-1:      rgba(210, 70, 70, 0.18);
  --ph-spark-2:      rgba(255, 195, 170, 0.08);
  --ph-text-primary:   #f5f0ee;
  --ph-text-secondary: rgba(245, 240, 238, 0.68);
  --ph-text-muted:     rgba(245, 240, 238, 0.42);
  --ph-border:         rgba(255, 255, 255, 0.14);
  --ph-border-strong:  rgba(255, 255, 255, 0.22);
  --ph-surface:        rgba(255, 255, 255, 0.07);
  --ph-gold:           #e8c87a;
  /* about-panel-immersive */
  --ab-bg:           #0b0306;
  --ab-nw-c1:        rgba(130, 35, 58, 0.72);
  --ab-nw-c2:        rgba(75,  18, 32, 0.55);
  --ab-nw-c3:        rgba(180, 55, 75, 0.45);
  --ab-nw-c4:        rgba(45,   6, 18, 0.80);
  --ab-noise-opacity: 0.038;
  /* Noise Wash global (shell) — classic/light: velo burdeos suave sobre perla */
  --nw-c1:           rgba(92, 36, 48, 0.16);
  --nw-c2:           rgba(139, 90, 58, 0.10);
  --nw-c3:           rgba(180, 80, 90, 0.12);
  --nw-c4:           rgba(243, 239, 235, 0.50);
  --nw-noise-opacity: 0.022;
  --ab-orb-c1:       rgba(110, 30, 50, 0.80);
  --ab-orb-c2:       rgba(150, 24, 48, 0.60);
  --ab-orb-c3:       rgba(60, 10, 22, 0.70);
  --ab-wm-color:     rgba(180, 60, 80, 0.22);
  --ab-dot-color:    rgba(220, 120, 120, 0.55);
  --ab-line-clr:     rgba(180, 60, 80, 0.30);
  --ab-ring-from:    rgba(140, 30, 55, 0.85);
  --ab-ring-mid:     rgba(220, 90, 80, 0.70);
  --ab-ring-gold:    rgba(230, 200, 120, 0.60);
  --ab-eyebrow:      rgba(230, 160, 120, 0.85);
  --ab-cred-bg:      rgba(140, 30, 55, 0.18);
  --ab-cred-bd:      rgba(180, 60, 80, 0.32);
  --ab-cred-tx:      rgba(245, 220, 210, 0.90);
  --ab-cred-bg-hover: rgba(160, 40, 65, 0.30);
  --ab-cred-bd-hover: rgba(220, 100, 100, 0.55);
  --ab-cred-glow:     rgba(160, 30, 55, 0.30);
  --ab-text-primary:   #f5f0ee;
  --ab-text-secondary: rgba(245, 240, 238, 0.70);
  --ab-text-muted:     rgba(245, 240, 238, 0.40);
  --ab-border:         rgba(255, 255, 255, 0.12);
  --ab-gold:           #e8c87a;
}

html[data-theme-mode="dark"] {
  color-scheme: dark;

  /* ── Dark mode token overrides ── NULLUM v2.1 dark palette
     Burdeos sobre carbón: el acento permanece, los fondos invierten.
     Ratios WCAG AA mantenidos. */

  /* panel-header & about-panel: burdeos carbón */
  --ph-bg:      #0e0407;
  --ph-orb-c1:  rgba(92, 36, 48, 0.88);
  --ph-orb-c2:  rgba(130, 24, 44, 0.50);
  --ph-orb-c3:  rgba(55, 10, 20, 0.75);
  --ph-spark-1: rgba(210, 70, 70, 0.18);
  --ph-spark-2: rgba(255, 195, 170, 0.08);
  --ab-bg:        #0b0306;
  --ab-nw-c1:     rgba(140, 38, 62, 0.72);
  --ab-nw-c2:     rgba(80,  20, 35, 0.55);
  --ab-nw-c3:     rgba(190, 60, 80, 0.45);
  --ab-nw-c4:     rgba(50,   8, 20, 0.80);
  --ab-noise-opacity: 0.038;
  --nw-c1:        rgba(140, 38, 62, 0.55);
  --nw-c2:        rgba(80,  20, 35, 0.42);
  --nw-c3:        rgba(190, 60, 80, 0.35);
  --nw-c4:        rgba(50,   8, 20, 0.60);
  --nw-noise-opacity: 0.030;
  --ab-orb-c1:    rgba(110, 30, 50, 0.80);
  --ab-orb-c2:    rgba(150, 24, 48, 0.60);
  --ab-orb-c3:    rgba(60, 10, 22, 0.70);
  --ab-wm-color:  rgba(180, 60, 80, 0.22);
  --ab-dot-color: rgba(220, 120, 120, 0.55);
  --ab-line-clr:  rgba(180, 60, 80, 0.30);
  --ab-ring-from: rgba(140, 30, 55, 0.85);
  --ab-ring-mid:  rgba(220, 90, 80, 0.70);
  --ab-ring-gold: rgba(230, 200, 120, 0.60);
  --ab-eyebrow:   rgba(230, 160, 120, 0.85);
  --ab-cred-bg:   rgba(140, 30, 55, 0.18);
  --ab-cred-bd:   rgba(180, 60, 80, 0.32);
  --ab-cred-tx:   rgba(245, 220, 210, 0.90);
  --ab-cred-bg-hover: rgba(160, 40, 65, 0.30);
  --ab-cred-bd-hover: rgba(220, 100, 100, 0.55);
  --ab-cred-glow:     rgba(160, 30, 55, 0.30);

  /* Fondos */
  --color-bg:             #0F0E0D;
  --color-bg-deep:        #161411;
  --color-surface:        #1C1917;
  --color-surface-hover:  #252119;
  --color-surface-raised: #1C1917;
  --color-surface-float:  #252119;
  --color-surface-inset:  #161411;
  --color-layer-hairline: rgba(255, 255, 255, 0.05);

  /* Bordes */
  --color-border:         rgba(255, 255, 255, 0.10);
  --color-border-strong:  rgba(255, 255, 255, 0.22);

  /* Texto */
  --color-text-primary:   #F2EDE8;
  --color-text-secondary: #C4B9B0;
  --color-text-muted:     #8C7F76;
  --color-text:           #F2EDE8;

  /* Acentos — burdeos más luminoso para contraste sobre oscuro */
  --color-accent:           #B04A5A;
  --color-accent-hover:     #C75E6F;
  --color-accent-soft:      rgba(176, 74, 90, 0.15);
  --color-accent-red:       #B04A5A;
  --color-accent-red-hover: #C75E6F;
  --color-accent-gold:      #C4875A;
  --color-accent-gold-dim:  #A06840;
  --color-red-vibrant:      #B04A5A;
  --color-red-muted:        #9A7078;
  --color-slider-thumb:     #C75E6F;
  --glow-red:               0 0 0 1px rgba(176, 74, 90, 0.28);
  --glow-red-soft:          0 0 0 1px rgba(176, 74, 90, 0.18);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23B04A5A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");

  /* Estado */
  --color-error:          #E05C6A;
  --color-error-bg:       rgba(224, 92, 106, 0.12);
  --color-success:        #4A9B8C;
  --color-success-bg:     rgba(74, 155, 140, 0.12);
  --color-cal-planned:    #5A9AB8;
  --color-cal-planned-bg: rgba(90, 154, 184, 0.14);
  --color-cal-missed:     #C88840;
  --color-cal-missed-bg:  rgba(200, 136, 64, 0.14);
  --color-cal-rest:       #6A7380;

  /* Sombras */
  --shadow-card:  0 1px 3px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-heavy: 0 2px 6px rgba(0, 0, 0, 0.32), 0 16px 40px rgba(0, 0, 0, 0.44);
  --shadow-brutalist:        4px 4px 0 0 var(--color-text-primary);
  --shadow-brutalist-sm:     3px 3px 0 0 var(--color-text-primary);
  --shadow-brutalist-accent: 4px 4px 0 0 var(--color-accent);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.18);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 18px 44px rgba(0,0,0,0.38), 0 4px 10px rgba(0,0,0,0.24);
}

/* ── Classic theme is always light — lock overrides any stale data-theme-mode ── */
html[data-theme="classic"] {
  color-scheme: light !important;
  /* panel-header — burdeos claro sobre blanco roto */
  --ph-bg:          #1a0509;
  --ph-text:        #f8f3f0;
  --ph-orb-c1:      rgba(92, 36, 48, 0.92);
  --ph-orb-c2:      rgba(130, 24, 44, 0.55);
  --ph-orb-c3:      rgba(55, 10, 20, 0.80);
  --ph-spark-1:     rgba(210, 70, 70, 0.20);
  --ph-spark-2:     rgba(255, 195, 170, 0.09);
  --ph-text-primary:   #f8f3f0;
  --ph-text-secondary: rgba(248, 243, 240, 0.70);
  --ph-text-muted:     rgba(248, 243, 240, 0.44);
  --ph-border:         rgba(255, 255, 255, 0.15);
  --ph-border-strong:  rgba(255, 255, 255, 0.24);
  --ph-surface:        rgba(255, 255, 255, 0.08);
  --ph-gold:           #e8c87a;
  /* about panel — classic: mantiene burdeos oscuro (es la marca) */
  --ab-bg:        #0e0306;
  --ab-nw-c1:     rgba(140, 38, 62, 0.72);
  --ab-nw-c2:     rgba(80,  20, 35, 0.55);
  --ab-nw-c3:     rgba(190, 60, 80, 0.45);
  --ab-nw-c4:     rgba(50,   8, 20, 0.80);
  --ab-noise-opacity: 0.038;
  /* shell global — velo suave sobre perla (no el wash immersivo del about) */
  --nw-c1:        rgba(92, 36, 48, 0.16);
  --nw-c2:        rgba(139, 90, 58, 0.10);
  --nw-c3:        rgba(180, 80, 90, 0.12);
  --nw-c4:        rgba(243, 239, 235, 0.50);
  --nw-noise-opacity: 0.022;
  --ab-orb-c1:    rgba(92, 36, 48, 0.85);
  --ab-orb-c2:    rgba(140, 24, 48, 0.62);
  --ab-orb-c3:    rgba(55, 10, 20, 0.72);
  --ab-wm-color:  rgba(180, 60, 80, 0.22);
  --ab-dot-color: rgba(220, 120, 120, 0.55);
  --ab-line-clr:  rgba(180, 60, 80, 0.30);
  --ab-ring-from: rgba(140, 30, 55, 0.88);
  --ab-ring-mid:  rgba(220, 90, 80, 0.70);
  --ab-ring-gold: rgba(230, 200, 120, 0.60);
  --ab-eyebrow:   rgba(230, 160, 120, 0.85);
  --ab-cred-bg:   rgba(140, 30, 55, 0.18);
  --ab-cred-bd:   rgba(180, 60, 80, 0.32);
  --ab-cred-tx:   rgba(245, 220, 210, 0.90);
  --ab-cred-bg-hover: rgba(160, 40, 65, 0.30);
  --ab-cred-bd-hover: rgba(220, 100, 100, 0.55);
  --ab-cred-glow:     rgba(160, 30, 55, 0.30);
}

/* ══════════════════════════════════════════════════════════════════
   PALETAS POR TEMA — sobreescriben los tokens base tras dark-mode
   Orden: siempre después de html[data-theme-mode="dark"] para ganar
   ══════════════════════════════════════════════════════════════════ */

/* ── Burgundy Dark — dark derivado de Guía (#5C2430), sin rosa neón ── */
html[data-theme="burgundy-dark"] {
  --color-bg:             #0A0608;
  --color-bg-deep:        #100810;
  --color-surface:        #160D14;
  --color-surface-hover:  #1E1219;
  --color-surface-raised: #160D14;
  --color-surface-float:  #1E1219;
  --color-surface-inset:  #100810;
  --color-layer-hairline: rgba(92, 36, 48, 0.10);
  --color-border:         rgba(92, 36, 48, 0.28);
  --color-border-strong:  rgba(92, 36, 48, 0.45);
  --color-text-primary:   #F5F0EC;
  --color-text-secondary: #C4B8B0;
  --color-text-muted:     #9A8E86;
  --color-accent:           #5C2430;
  --color-accent-hover:     #7A3342;
  --color-accent-soft:      rgba(92, 36, 48, 0.28);
  --color-accent-red:       #5C2430;
  --color-accent-red-hover: #7A3342;
  --color-accent-gold:      #A07050;
  --color-accent-gold-dim:  #8B5A3A;
  --color-red-vibrant:      #8A5560;
  --color-red-muted:        #6B4A52;
  --color-slider-thumb:     #7A3342;
  --color-on-accent:        #FFFFFF;
  --glow-red:               0 0 0 1px rgba(92, 36, 48, 0.40);
  --glow-red-soft:          0 0 0 1px rgba(92, 36, 48, 0.24);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C2430' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  /* panel-header */
  --ph-bg:      #08030A;
  --ph-orb-c1:  rgba(92, 36, 48, 0.92);
  --ph-orb-c2:  rgba(71, 27, 36, 0.60);
  --ph-orb-c3:  rgba(40, 12, 18, 0.80);
  --ab-bg:      #06020A;
  --ab-nw-c1:   rgba(140, 38, 62, 0.72);
  --ab-nw-c2:   rgba(80,  20, 35, 0.55);
  --ab-nw-c3:   rgba(190, 60, 80, 0.45);
  --ab-nw-c4:   rgba(50,   8, 20, 0.80);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(140, 38, 62, 0.58);
  --nw-c2:      rgba(80,  20, 35, 0.44);
  --nw-c3:      rgba(190, 60, 80, 0.36);
  --nw-c4:      rgba(50,   8, 20, 0.62);
  --nw-noise-opacity: 0.030;
  --ab-ring-from: rgba(92, 36, 48, 0.90);
  --ab-ring-mid:  rgba(122, 51, 66, 0.70);
}

/* ── Jungle Fire — selva oscura, acento verde lima + naranja ── */
html[data-theme="jungle-fire"] {
  --color-bg:             #080F08;
  --color-bg-deep:        #0C150A;
  --color-surface:        #111A0E;
  --color-surface-hover:  #172112;
  --color-surface-raised: #111A0E;
  --color-surface-float:  #172112;
  --color-surface-inset:  #0C150A;
  --color-layer-hairline: rgba(80, 180, 80, 0.08);
  --color-border:         rgba(80, 180, 80, 0.14);
  --color-border-strong:  rgba(80, 180, 80, 0.28);
  --color-text-primary:   #E8F2E0;
  --color-text-secondary: #A8C49A;
  --color-text-muted:     #6A8860;
  --color-accent:           #7EC850;
  --color-accent-hover:     #98E060;
  --color-accent-soft:      rgba(126, 200, 80, 0.15);
  --color-accent-red:       #E07830;
  --color-accent-red-hover: #F08E48;
  --color-accent-gold:      #D49040;
  --color-accent-gold-dim:  #A87030;
  --color-red-vibrant:      #E07830;
  --color-red-muted:        #A07050;
  --color-slider-thumb:     #98E060;
  --color-error:            #E07830;
  --color-error-bg:         rgba(224, 120, 48, 0.12);
  --color-success:          #7EC850;
  --color-success-bg:       rgba(126, 200, 80, 0.12);
  --glow-red:               0 0 0 1px rgba(126, 200, 80, 0.28);
  --glow-red-soft:          0 0 0 1px rgba(126, 200, 80, 0.18);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237EC850' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #04090A;
  --ph-orb-c1:  rgba(60, 140, 40, 0.85);
  --ph-orb-c2:  rgba(200, 100, 20, 0.55);
  --ph-orb-c3:  rgba(20, 80, 20, 0.75);
  --ab-bg:      #030708;
  --ab-nw-c1:   rgba(55,  88, 22, 0.75);
  --ab-nw-c2:   rgba(200, 100, 20, 0.42);
  --ab-nw-c3:   rgba(22,  44,  8, 0.65);
  --ab-nw-c4:   rgba(8,   20,  2, 0.82);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(55,  88, 22, 0.58);
  --nw-c2:      rgba(200, 100, 20, 0.32);
  --nw-c3:      rgba(22,  44,  8, 0.50);
  --nw-c4:      rgba(8,   20,  2, 0.62);
  --nw-noise-opacity: 0.030;
  --ab-ring-from: rgba(60, 160, 50, 0.88);
  --ab-ring-mid:  rgba(200, 120, 30, 0.70);
}

/* ── Void Violet — vacío profundo, acento violeta/índigo ── */
html[data-theme="void-violet"] {
  --color-bg:             #06040F;
  --color-bg-deep:        #0A0818;
  --color-surface:        #100D20;
  --color-surface-hover:  #161228;
  --color-surface-raised: #100D20;
  --color-surface-float:  #161228;
  --color-surface-inset:  #0A0818;
  --color-layer-hairline: rgba(140, 80, 220, 0.08);
  --color-border:         rgba(140, 80, 220, 0.16);
  --color-border-strong:  rgba(140, 80, 220, 0.32);
  --color-text-primary:   #EAE6F8;
  --color-text-secondary: #B0A8D8;
  --color-text-muted:     #706898;
  --color-accent:           #9B6AE8;
  --color-accent-hover:     #B080FF;
  --color-accent-soft:      rgba(155, 106, 232, 0.16);
  --color-accent-red:       #9B6AE8;
  --color-accent-red-hover: #B080FF;
  --color-accent-gold:      #8060C0;
  --color-accent-gold-dim:  #604890;
  --color-red-vibrant:      #9B6AE8;
  --color-red-muted:        #7858A8;
  --color-slider-thumb:     #B080FF;
  --color-error:            #E05880;
  --color-error-bg:         rgba(224, 88, 128, 0.12);
  --color-success:          #60B890;
  --color-success-bg:       rgba(96, 184, 144, 0.12);
  --glow-red:               0 0 0 1px rgba(155, 106, 232, 0.32);
  --glow-red-soft:          0 0 0 1px rgba(155, 106, 232, 0.20);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239B6AE8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #040210;
  --ph-orb-c1:  rgba(120, 60, 200, 0.88);
  --ph-orb-c2:  rgba(80, 30, 160, 0.55);
  --ph-orb-c3:  rgba(40, 10, 100, 0.78);
  --ab-bg:      #03010C;
  --ab-nw-c1:   rgba(100, 30, 180, 0.72);
  --ab-nw-c2:   rgba(138, 43, 226, 0.50);
  --ab-nw-c3:   rgba(60,  10, 110, 0.65);
  --ab-nw-c4:   rgba(20,   4,  50, 0.82);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(100, 30, 180, 0.55);
  --nw-c2:      rgba(138, 43, 226, 0.38);
  --nw-c3:      rgba(60,  10, 110, 0.50);
  --nw-c4:      rgba(20,   4,  50, 0.62);
  --nw-noise-opacity: 0.030;
  --ab-ring-from: rgba(120, 60, 200, 0.90);
  --ab-ring-mid:  rgba(180, 100, 255, 0.65);
}

/* ── Coastal — luz de mar, acento azul océano ── */
html[data-theme="coastal"] {
  --color-bg:             #F0F8FF;
  --color-bg-deep:        #E2F0FA;
  --color-surface:        #FFFFFF;
  --color-surface-hover:  #EBF5FC;
  --color-surface-raised: #FFFFFF;
  --color-surface-float:  #FFFFFF;
  --color-surface-inset:  #E2F0FA;
  --color-layer-hairline: rgba(30, 110, 180, 0.07);
  --color-border:         rgba(30, 110, 180, 0.16);
  --color-border-strong:  rgba(30, 110, 180, 0.32);
  --color-text-primary:   #0D2A40;
  --color-text-secondary: #2E5870;
  --color-text-muted:     #5080A0;
  --color-accent:           #1E6EB4;
  --color-accent-hover:     #1558A0;
  --color-accent-soft:      rgba(30, 110, 180, 0.10);
  --color-accent-red:       #1E6EB4;
  --color-accent-red-hover: #1558A0;
  --color-accent-gold:      #2890A8;
  --color-accent-gold-dim:  #5AAAC0;
  --color-red-vibrant:      #1E6EB4;
  --color-red-muted:        #5A90B8;
  --color-slider-thumb:     #1558A0;
  --color-error:            #C0303A;
  --color-error-bg:         rgba(192, 48, 58, 0.08);
  --color-success:          #1E7A5A;
  --color-success-bg:       rgba(30, 122, 90, 0.10);
  --glow-red:               0 0 0 1px rgba(30, 110, 180, 0.20);
  --glow-red-soft:          0 0 0 1px rgba(30, 110, 180, 0.12);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231E6EB4' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #0A1E30;
  --ph-orb-c1:  rgba(30, 110, 180, 0.90);
  --ph-orb-c2:  rgba(20, 80, 150, 0.55);
  --ph-orb-c3:  rgba(5, 40, 80, 0.78);
  --ab-bg:      #060F1E;
  /* about immersivo oscuro; shell claro costero */
  --ab-nw-c1:   rgba(30, 110, 180, 0.70);
  --ab-nw-c2:   rgba(20,  80, 150, 0.50);
  --ab-nw-c3:   rgba(80, 180, 220, 0.42);
  --ab-nw-c4:   rgba(5,   40,  80, 0.78);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(30, 110, 180, 0.14);
  --nw-c2:      rgba(14, 116, 144, 0.10);
  --nw-c3:      rgba(186, 230, 253, 0.28);
  --nw-c4:      rgba(226, 240, 250, 0.48);
  --nw-noise-opacity: 0.020;
  --ab-ring-from: rgba(30, 110, 200, 0.90);
  --ab-ring-mid:  rgba(80, 180, 220, 0.65);
}

/* ── Blueprint — técnico oscuro, acento azul eléctrico ── */
html[data-theme="blueprint"] {
  --color-bg:             #0C0E18;
  --color-bg-deep:        #0F1220;
  --color-surface:        #161928;
  --color-surface-hover:  #1E2235;
  --color-surface-raised: #161928;
  --color-surface-float:  #1E2235;
  --color-surface-inset:  #0F1220;
  --color-layer-hairline: rgba(60, 140, 240, 0.08);
  --color-border:         rgba(60, 140, 240, 0.16);
  --color-border-strong:  rgba(60, 140, 240, 0.32);
  --color-text-primary:   #E8EEF8;
  --color-text-secondary: #9AAAC8;
  --color-text-muted:     #5C6A88;
  --color-accent:           #3C8CF0;
  --color-accent-hover:     #5AA4FF;
  --color-accent-soft:      rgba(60, 140, 240, 0.15);
  --color-accent-red:       #3C8CF0;
  --color-accent-red-hover: #5AA4FF;
  --color-accent-gold:      #4090C8;
  --color-accent-gold-dim:  #2870A8;
  --color-red-vibrant:      #3C8CF0;
  --color-red-muted:        #5C80B8;
  --color-slider-thumb:     #5AA4FF;
  --color-error:            #E05A5A;
  --color-error-bg:         rgba(224, 90, 90, 0.12);
  --color-success:          #40B890;
  --color-success-bg:       rgba(64, 184, 144, 0.12);
  --glow-red:               0 0 0 1px rgba(60, 140, 240, 0.30);
  --glow-red-soft:          0 0 0 1px rgba(60, 140, 240, 0.18);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233C8CF0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #060810;
  --ph-orb-c1:  rgba(40, 120, 220, 0.88);
  --ph-orb-c2:  rgba(20, 70, 170, 0.55);
  --ph-orb-c3:  rgba(10, 30, 90, 0.80);
  --ab-bg:      #04060E;
  --ab-nw-c1:   rgba(40, 120, 220, 0.72);
  --ab-nw-c2:   rgba(20,  70, 170, 0.50);
  --ab-nw-c3:   rgba(100, 180, 255, 0.40);
  --ab-nw-c4:   rgba(10,  30,  90, 0.80);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(40, 120, 220, 0.55);
  --nw-c2:      rgba(20,  70, 170, 0.38);
  --nw-c3:      rgba(100, 180, 255, 0.30);
  --nw-c4:      rgba(10,  30,  90, 0.62);
  --nw-noise-opacity: 0.030;
  --ab-ring-from: rgba(40, 120, 230, 0.90);
  --ab-ring-mid:  rgba(100, 180, 255, 0.65);
}

/* ── Blueprint Light — técnico claro, acento azul ── */
html[data-theme="blueprint-light"] {
  --color-bg:             #F4F6FA;
  --color-bg-deep:        #E8EDF8;
  --color-surface:        #FFFFFF;
  --color-surface-hover:  #EDF0FA;
  --color-surface-raised: #FFFFFF;
  --color-surface-float:  #FFFFFF;
  --color-surface-inset:  #E8EDF8;
  --color-layer-hairline: rgba(40, 100, 200, 0.07);
  --color-border:         rgba(40, 100, 200, 0.16);
  --color-border-strong:  rgba(40, 100, 200, 0.30);
  --color-text-primary:   #0A1428;
  --color-text-secondary: #2A4470;
  --color-text-muted:     #4A6090;
  --color-accent:           #2860D8;
  --color-accent-hover:     #1A50C8;
  --color-accent-soft:      rgba(40, 96, 216, 0.10);
  --color-accent-red:       #2860D8;
  --color-accent-red-hover: #1A50C8;
  --color-accent-gold:      #2880A8;
  --color-accent-gold-dim:  #4090B8;
  --color-red-vibrant:      #2860D8;
  --color-red-muted:        #5080B8;
  --color-slider-thumb:     #1A50C8;
  --color-error:            #C83030;
  --color-error-bg:         rgba(200, 48, 48, 0.08);
  --color-success:          #1A7050;
  --color-success-bg:       rgba(26, 112, 80, 0.10);
  --glow-red:               0 0 0 1px rgba(40, 96, 216, 0.20);
  --glow-red-soft:          0 0 0 1px rgba(40, 96, 216, 0.12);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232860D8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #081428;
  --ph-orb-c1:  rgba(40, 96, 216, 0.90);
  --ph-orb-c2:  rgba(20, 60, 170, 0.55);
  --ph-orb-c3:  rgba(5, 28, 90, 0.78);
  --ab-bg:      #040A18;
  --ab-nw-c1:   rgba(40, 96, 216, 0.70);
  --ab-nw-c2:   rgba(20, 60, 170, 0.50);
  --ab-nw-c3:   rgba(80, 160, 240, 0.40);
  --ab-nw-c4:   rgba(5,  28,  90, 0.78);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(40, 96, 216, 0.12);
  --nw-c2:      rgba(20, 60, 170, 0.08);
  --nw-c3:      rgba(186, 210, 255, 0.26);
  --nw-c4:      rgba(232, 237, 248, 0.48);
  --nw-noise-opacity: 0.020;
  --ab-ring-from: rgba(40, 96, 216, 0.90);
  --ab-ring-mid:  rgba(80, 160, 240, 0.65);
}

/* ── Miami — noche de neón, acento cian eléctrico + magenta ── */
html[data-theme="miami"] {
  --color-bg:             #060C18;
  --color-bg-deep:        #091020;
  --color-surface:        #0F1828;
  --color-surface-hover:  #152030;
  --color-surface-raised: #0F1828;
  --color-surface-float:  #152030;
  --color-surface-inset:  #091020;
  --color-layer-hairline: rgba(0, 210, 210, 0.08);
  --color-border:         rgba(0, 210, 210, 0.14);
  --color-border-strong:  rgba(0, 210, 210, 0.28);
  --color-text-primary:   #E8F4F8;
  --color-text-secondary: #88C8D8;
  --color-text-muted:     #4A7890;
  --color-accent:           #00D2D2;
  --color-accent-hover:     #20EEEE;
  --color-accent-soft:      rgba(0, 210, 210, 0.14);
  --color-accent-red:       #E840A8;
  --color-accent-red-hover: #FF60C0;
  --color-accent-gold:      #00A8C8;
  --color-accent-gold-dim:  #0080A0;
  --color-red-vibrant:      #E840A8;
  --color-red-muted:        #A06090;
  --color-slider-thumb:     #20EEEE;
  --color-error:            #FF5080;
  --color-error-bg:         rgba(255, 80, 128, 0.12);
  --color-success:          #00D2A0;
  --color-success-bg:       rgba(0, 210, 160, 0.12);
  --glow-red:               0 0 0 1px rgba(0, 210, 210, 0.28);
  --glow-red-soft:          0 0 0 1px rgba(0, 210, 210, 0.16);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300D2D2' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  --ph-bg:      #030810;
  --ph-orb-c1:  rgba(0, 180, 200, 0.88);
  --ph-orb-c2:  rgba(200, 40, 160, 0.55);
  --ph-orb-c3:  rgba(0, 40, 80, 0.80);
  --ab-bg:      #020608;
  --ab-nw-c1:   rgba(0, 180, 200, 0.70);
  --ab-nw-c2:   rgba(200, 40, 160, 0.45);
  --ab-nw-c3:   rgba(0,  100, 140, 0.55);
  --ab-nw-c4:   rgba(0,   40,  80, 0.80);
  --ab-noise-opacity: 0.038;
  --nw-c1:      rgba(0, 180, 200, 0.52);
  --nw-c2:      rgba(200, 40, 160, 0.32);
  --nw-c3:      rgba(0,  100, 140, 0.42);
  --nw-c4:      rgba(0,   40,  80, 0.62);
  --nw-noise-opacity: 0.030;
  --ab-ring-from: rgba(0, 200, 220, 0.90);
  --ab-ring-mid:  rgba(240, 60, 180, 0.65);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  /* min-height solo: evita contenedor rígido que bloquee el scroll táctil.
     svh, no dvh — ver comentario en html. */
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  line-height: 1.55;
  /* Ni overflow-x ni overflow-y se fijan aquí: html ya los tiene
     (overflow-x:hidden, overflow-y:auto) y es el único
     contenedor de scroll real (document.scrollingElement). Poner
     overflow-x:hidden en body fuerza a overflow-y a computar "auto" aunque
     no se declare (regla CSS: visible + no-visible en el otro eje → el
     visible pasa a auto), recreando sin querer un SEGUNDO contenedor de
     scroll casi idéntico al de html. En iOS Safari eso produce el clásico
     bug de "el scroll se queda pillado a mitad de página": el gesto táctil
     queda atado al que termine su rango antes, aunque el otro aún tenga
     más contenido debajo. */
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

/* UA [hidden] pierde frente a display:flex/grid de componentes — forzar ocultación real */
[hidden] {
  display: none !important;
}

/*
  Grano SVG intenso solo en el fondo (papel poroso frío).
  z-index bajo: no contamina paneles, inputs ni tipografía.
*/
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.62 0 0 0 0 0.72 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 160px 160px;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.10;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g2'%3E%3CfeTurbulence type='turbulence' baseFrequency='1.15' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g2)' opacity='0.7'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

/*
  Contenido por encima del grano.
  Solo shells principales llevan z-index: los modales/overlays
  definen el suyo; un z-index blanket en body>* metía capas
  fantasma en la misma pila y podía bloquear clics.
*/
.app,
.dashboard {
  position: relative;
  z-index: 1;
}

/* ── _03-auth.css ── */
/* ── _03-auth.css ── */
/* ============================================
   SCREEN 1 — AUTH LAYOUT
   ============================================ */

.app {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  /* Sin overflow: html ya tiene overflow-x:hidden para la página entera.
     Cualquier valor no-visible aquí crearía un scroll container interno
     de 100svh que atrapa el gesto táctil (spec: visible + no-visible → auto). */
}

/* Inline SVG icon beside the NULLUM wordmark */

.app__footer {
  background-color: var(--color-bg-deep);
  border-top: var(--border-width) solid var(--color-border);
  padding: var(--space-md);
  text-align: center;
}

.app__footer-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* --- Auth Container --- */
.auth {
  width: 100%;
  max-width: 420px;
}



.auth__tabs {
  display: flex;
  border-bottom: var(--border-width-strong) solid var(--color-border);
  margin-bottom: 0;
}

.auth__tab {
  flex: 1;
  min-height: var(--touch-min);
  padding: var(--space-md) var(--space-sm);
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast), transform var(--press-ms) ease, opacity var(--press-ms) ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.auth__tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: var(--border-width-strong);
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.auth__tab:hover {
  color: var(--color-text-secondary);
}

.auth__tab:active {
  opacity: var(--press-opacity);
  transform: scale(var(--press-scale));
}

.auth__tab--active {
  color: var(--color-text-primary);
}

.auth__tab--active::after {
  background-color: var(--color-accent-red);
}


/* ============================================
   SHARED COMPONENTS
   ============================================ */

/* ── _04-shell.css ── */
﻿/* --- Módulos abiertos (sin tarjetas / sin cajas) --- */
.card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: var(--card-radius);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  isolation: auto;
}

.card + .card {
  margin-top: var(--card-gap);
  padding-top: var(--card-gap);
  border-top: var(--card-divider);
}

.card__body {
  padding: var(--space-md) 0 var(--space-lg);
}

.card__header {
  padding: 0 0 var(--space-sm);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  font-size: var(--text-title);
  letter-spacing: var(--track-title);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-shadow: none;
}

/* ─────────────────────────────────────────────────────────────
   NULLUM — Global ambient background
   Usa #nlmBgGrid (div fijo) para el grid técnico, NO body::before
   (body::before ya está ocupado por el grain system de _02-base.css)
   Los marcos flotantes van en #nlmBgCanvas via app.js (nlmInitBg)
   ───────────────────────────────────────────────────────────── */
#nlmBgGrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(92,36,48,.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,36,48,.038) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 140% 120% at 50% 0%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 140% 120% at 50% 0%, #000 30%, transparent 85%);
}

/* Dark mode: líneas blancas en lugar de burdeos */
[data-theme-mode="dark"] #nlmBgGrid,
[data-theme="burgundy-dark"] #nlmBgGrid {
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
}

/* Canvas de marcos flotantes — position:fixed en <body> */
#nlmBgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.auth-demo {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
}

/* ── _04-shell.css ── */
.auth-demo__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.auth-demo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.auth-demo__btn {
  flex: 1 1 140px;
  min-height: var(--touch-min);
  justify-content: center;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
}


/* --- Form Elements --- */
.form__group {
  margin-bottom: var(--space-lg);
}

.form__label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.form__input {
  width: 100%;
  max-width: 100%;
  min-height: var(--control-min-height);
  padding: var(--control-pad-y) var(--control-pad-x);
  background-color: var(--control-bg);
  border: var(--control-border-width) solid var(--control-border);
  color: var(--color-text-primary);
  font-family: var(--control-font);
  font-size: 16px; /* mínimo iOS/Android: evita zoom automático al enfocar */
  font-weight: 600;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--control-radius);
  box-shadow: none;
  background-image: none;
}

.form__input::placeholder {
  color: var(--color-text-muted);
  font-style: normal;
}

.form__input:focus {
  border-color: var(--control-border-focus);
  box-shadow: var(--control-focus-ring);
}

.form__input:hover:not(:focus) {
  border-color: var(--control-border-hover);
}

.form__input--error {
  border-color: var(--color-error);
  box-shadow: var(--control-error-ring);
}

/* Select — fondo sólido limpio (sin grano) */
.form__select {
  width: 100%;
  max-width: 100%;
  min-height: var(--control-min-height);
  padding: var(--control-pad-y) var(--control-pad-x);
  padding-right: var(--space-2xl);
  background-color: var(--control-bg);
  border: var(--control-border-width) solid var(--control-border);
  color: var(--color-text-primary);
  font-family: var(--control-font);
  font-size: 16px; /* evita zoom iOS/Android al enfocar (≥16px) */
  font-weight: 600;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  cursor: pointer;
  border-radius: var(--control-radius);
  -webkit-appearance: none;
  appearance: none;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  box-shadow: none;
}

.form__select:focus {
  border-color: var(--control-border-focus);
  box-shadow: var(--control-focus-ring);
}

.form__select option {
  background-color: var(--control-bg);
  color: var(--color-text-primary);
}

/* Number input — hide spinners */
.form__input[type="number"]::-webkit-inner-spin-button,
.form__input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form__input[type="number"] {
  -moz-appearance: textfield;
}

/* Date input */
.form__input[type="date"] {
  color-scheme: light;
}

/* Suffix label (cm, kg, etc.) */
.form__input-wrapper {
  position: relative;
}

.form__input-suffix {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--control-support-color);
  letter-spacing: 0.02em;
  text-transform: none;
  pointer-events: none;
}

.form__hint {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--control-support-color);
  margin-top: var(--space-xs);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: var(--btn-border);
  font-family: var(--font-heading);
  font-weight: var(--btn-font-weight);
  font-size: var(--btn-font-size);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    transform var(--press-ms) ease,
    opacity var(--press-ms) ease;
  border-radius: var(--btn-radius);
  outline: none;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.btn:active {
  transform: scale(var(--press-scale));
  opacity: var(--press-opacity);
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent, #5C2430);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--btn-primary-bg);
  color: var(--color-on-accent);
  box-shadow: var(--btn-primary-shadow);
}

.btn--primary:hover {
  background-color: var(--btn-primary-hover);
  box-shadow: var(--glow-red);
}

.btn--secondary {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover {
  border-color: var(--color-red-vibrant);
  color: var(--color-red-vibrant);
  background: var(--color-accent-soft);
}

.btn--ghost {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  min-height: var(--touch-min);
  padding: 0.65rem 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: auto;
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--color-red-vibrant);
  box-shadow: none;
  transform: none;
}

.btn--danger {
  background-color: transparent;
  color: var(--btn-danger-fg);
  border: 1px solid var(--btn-danger-border);
}

.btn--danger:hover {
  background-color: var(--btn-danger-bg-hover);
  border-color: var(--btn-danger-fg);
  color: var(--btn-danger-fg-hover);
}

.btn--brutalist {
  border-radius: var(--btn-radius);
  box-shadow: none;
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  font-weight: var(--btn-font-weight);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading spinner inside button */
.btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn--loading .btn__spinner {
  display: inline-block;
}

.btn--loading .btn__text {
  /* Color sólido (no opacity) para mantener ≥ 4.5:1 en estados de carga */
  color: var(--color-text-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* --- Alerts / Messages --- */
.alert {
  padding: var(--space-md);
  border: var(--border-width) solid transparent;
  border-radius: var(--control-radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  margin-bottom: var(--space-lg);
  display: none;
}

.alert--visible {
  display: block;
}

.alert--error {
  background-color: var(--color-error-bg);
  border-color: var(--color-error);
  color: var(--color-error);
}


/* --- Decorative Elements --- */
.stripe {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-accent-red) 0%,
    var(--color-accent-red) 40%,
    var(--color-accent-gold) 60%,
    var(--color-accent-gold) 100%
  );
  flex-shrink: 0;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  border: var(--border-width) solid var(--color-accent-gold-dim);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
}

/* Ornamental corner marks */
.card--branded {
  position: relative;
}

.card--branded::before,
.card--branded::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--color-accent-gold-dim);
  border-style: solid;
  pointer-events: none;
}

.card--branded::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.card--branded::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}


/* --- View Visibility --- */
.view {
  display: none;
}

.view--active {
  display: block;
}


/* --- Password toggle visibility --- */
.form__password-wrapper {
  position: relative;
}

.form__password-toggle {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--control-support-color);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform var(--press-ms) ease, opacity var(--press-ms) ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.form__password-toggle:hover {
  color: var(--color-red-vibrant);
}

.form__password-toggle:active {
  opacity: var(--press-opacity);
  transform: translateY(-50%) scale(var(--press-scale));
}


/* ============================================
   SCREEN 2 — DASHBOARD LAYOUT
   ============================================ */

.dashboard {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  background-color: var(--color-bg);
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SIDEBAR — Rediseño bordeaux futurista
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* ── Tokens bordeaux ─────────────────────────────────── */
/* Derivados del acento del tema: la barra lateral sigue cualquier paleta.
   Classic y Burgundy Dark conservan el burdeos corporativo original. */
:root {
  --bx-deep:   color-mix(in srgb, var(--color-accent) 12%, #000);
  --bx-base:   color-mix(in srgb, var(--color-accent) 20%, #000);
  --bx-mid:    color-mix(in srgb, var(--color-accent) 62%, #000);
  --bx-core:   var(--color-accent);
  --bx-bright: color-mix(in srgb, var(--color-accent) 85%, #fff);
  --bx-neon:   color-mix(in srgb, var(--color-accent) 70%, #fff);
  --bx-glow:   color-mix(in srgb, var(--color-accent) 55%, #fff);
}
html[data-theme="classic"],
html[data-theme="burgundy-dark"] {
  --bx-deep:   #0d0205;
  --bx-base:   #1a0609;
  --bx-mid:    #6b0f1e;
  --bx-core:   #8b1a2a;
  --bx-bright: #b02035;
  --bx-neon:   #cc2840;
  --bx-glow:   #e03050;
}

/* ── Keyframes ───────────────────────────────────────── */
@keyframes bx-aurora-a {
  0%, 100% { transform: translate(-10%, -10%) scale(1);   opacity: 0.55; }
  50%       { transform: translate( 12%,  15%) scale(1.2); opacity: 0.75; }
}
@keyframes bx-aurora-b {
  0%, 100% { transform: translate( 20%, 60%) scale(1.1);  opacity: 0.40; }
  50%       { transform: translate(-15%, 40%) scale(0.9);  opacity: 0.60; }
}
@keyframes bx-aurora-c {
  0%, 100% { transform: translate( 5%, 80%) scale(0.9);   opacity: 0.35; }
  60%       { transform: translate(25%, 60%) scale(1.15);  opacity: 0.55; }
}
@keyframes bx-scanline {
  0%   { transform: translateY(-100%); opacity: 0.18; }
  100% { transform: translateY(100vh); opacity: 0.06; }
}
@keyframes bx-glow-bar {
  0%, 100% { opacity: 0.5; box-shadow: 0 0 8px var(--bx-neon); }
  50%       { opacity: 1;   box-shadow: 0 0 18px var(--bx-glow), 0 0 36px var(--bx-core); }
}
@keyframes bx-pulse-ring {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--bx-neon) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0   transparent; }
}
@keyframes bx-badge-ping {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.2); opacity: 0.7; }
}
@keyframes bx-neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 6px var(--bx-neon), 0 0 18px var(--bx-core);
  }
  20%, 24%, 55% { text-shadow: none; }
}
@keyframes bx-link-glow {
  0%, 100% { box-shadow: inset 0 0 10px color-mix(in srgb, var(--bx-neon) 20%, transparent); }
  50%       { box-shadow: inset 0 0 18px color-mix(in srgb, var(--bx-neon) 35%, transparent); }
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-width);
  height: 100%;
  height: 100svh;
  height: 100dvh;
  max-height: 100svh;
  max-height: 100dvh;
  background-color: var(--bx-base);
  border-right: 1px solid color-mix(in srgb, var(--bx-neon) 18%, transparent);
  display: flex;
  flex-direction: column;
  transform: translate3d(-100%, 0, 0);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
  backface-visibility: hidden;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}

/* ── Capa de fondo: orbes bordeaux animados ──────────── */
/* position:fixed en hijo de elemento con transform se    */
/* ancla al containing block del padre (el sidebar), no   */
/* al viewport. No participa en el scroll del sidebar.    */
.sidebar__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Gradiente Noise Wash que respira */
.sidebar__bg::before {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
  will-change: transform, opacity;
  background:
    radial-gradient(ellipse 85% 60% at  15% 20%,
      color-mix(in srgb, var(--bx-core)   70%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at  90% 85%,
      color-mix(in srgb, var(--bx-bright) 55%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse 55% 50% at  65% 15%,
      color-mix(in srgb, var(--bx-mid)    60%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse 65% 65% at  20% 90%,
      color-mix(in srgb, var(--bx-base)   80%, transparent) 0%, transparent 65%);
  animation: bx-wash-breathe 20s ease-in-out infinite;
}

/* Grano estático encima */
.sidebar__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

@keyframes bx-wash-breathe {
  0%   { transform: scale(1)    rotate(0deg);    opacity: 0.80; }
  33%  { transform: scale(1.07) rotate(2.5deg);  opacity: 0.95; }
  66%  { transform: scale(0.96) rotate(-1.8deg); opacity: 0.85; }
  100% { transform: scale(1)    rotate(0deg);    opacity: 0.80; }
}

.sidebar--open {
  transform: translate3d(0, 0, 0);
}

.sidebar__overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 99;
  background-color: rgba(10, 2, 4, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-drawer),
    visibility var(--transition-drawer);
}

.sidebar__overlay--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(var(--space-lg), calc(env(safe-area-inset-top) + var(--space-md))) var(--space-md) var(--space-lg);
  z-index: 1;
}

.sidebar__logo {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0.2rem 0.15rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  transition:
    opacity var(--press-ms) ease,
    transform var(--press-ms) ease;
}

.sidebar__logo-accent {
  color: var(--bx-neon);
  text-shadow: 0 0 8px var(--bx-neon), 0 0 20px var(--bx-core);
  animation: bx-neon-flicker 6s ease-in-out infinite;
}

.sidebar__logo:focus-visible,
.topbar__greeting:focus-visible,
.sidebar__user:focus-visible {
  outline: 2px solid var(--bx-neon);
  outline-offset: 3px;
}

.sidebar__close {
  background: color-mix(in srgb, var(--bx-core) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--bx-neon) 30%, transparent);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sidebar__close:hover {
  background: color-mix(in srgb, var(--bx-neon) 22%, transparent);
  border-color: var(--bx-neon);
  color: #fff;
  box-shadow: 0 0 10px color-mix(in srgb, var(--bx-neon) 40%, transparent);
}

/* User info → Ajustes */
.sidebar__user {
  position: relative;
  appearance: none;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  margin: 0 0 var(--space-xs);
  padding: var(--space-md) var(--space-md);
  background: color-mix(in srgb, var(--bx-core) 22%, transparent);
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--bx-neon) 15%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bx-neon) 15%, transparent);
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  z-index: 1;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    opacity var(--press-ms) ease,
    transform var(--press-ms) ease;
}

.sidebar__user:hover {
  background: color-mix(in srgb, var(--bx-core) 38%, transparent);
  border-color: color-mix(in srgb, var(--bx-neon) 40%, transparent);
}

.sidebar__user--active {
  background: color-mix(in srgb, var(--bx-core) 30%, transparent);
  border-color: color-mix(in srgb, var(--bx-neon) 50%, transparent);
}

.sidebar__avatar {
  position: relative;
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  max-width: 2.5rem;
  max-height: 2.5rem;
  flex: 0 0 2.5rem;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  background: linear-gradient(145deg, var(--bx-mid) 0%, var(--bx-deep) 100%);
  border: 2px solid color-mix(in srgb, var(--bx-neon) 55%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  flex-grow: 0;
  align-self: center;
  margin: 0;
  color: var(--bx-neon);
  line-height: 0;
  animation: bx-pulse-ring 2.4s ease-out infinite;
}

.sidebar__avatar-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 9999px;
  display: block;
  margin: 0;
}

.sidebar__avatar-img[hidden] {
  display: none !important;
}

.sidebar__avatar-fallback {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: var(--weight-title);
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.sidebar__avatar:has(.sidebar__avatar-img:not([hidden])) .sidebar__avatar-fallback {
  visibility: hidden;
}

.sidebar__avatar-fallback[hidden] {
  display: none !important;
}

.sidebar__avatar-brand {
  position: absolute;
  inset: 5px;
  z-index: 3;
  width: auto;
  height: auto;
  max-width: calc(100% - 10px);
  max-height: calc(100% - 10px);
  margin: auto;
  object-fit: contain;
  display: none;
  pointer-events: none;
}

.sidebar--demo .sidebar__avatar {
  background: color-mix(in srgb, var(--bx-core) 30%, #fff 5%);
  border-color: var(--bx-neon);
  color: var(--bx-neon);
}

.sidebar--demo .sidebar__avatar-brand {
  display: block;
}

.sidebar--demo .sidebar__avatar-img,
.sidebar--demo .sidebar__avatar-fallback {
  display: none !important;
}

.sidebar--demo .sidebar__user-tag {
  color: var(--bx-neon);
}

.sidebar__user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__user-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px color-mix(in srgb, var(--bx-neon) 35%, transparent);
}

.sidebar__user-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--bx-neon) 80%, #fff);
  text-transform: uppercase;
}

.sidebar__user-gear {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Navigation */
.sidebar__nav {
  position: relative;
  flex: 1;
  padding: var(--space-sm) var(--space-sm);
  padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
  z-index: 1;
}

.sidebar__list {
  list-style: none;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar__overlay,
  .sidebar__logo,
  .sidebar__user,
  .sidebar__avatar,
  .sidebar__logo-accent,
  .sidebar__link--active {
    transition: none;
    animation: none;
  }
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--touch-comfortable);
  padding: 0.7rem var(--space-md);
  margin-bottom: 2px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--press-ms) ease,
    opacity var(--press-ms) ease;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sidebar__link:hover {
  background-color: color-mix(in srgb, var(--bx-core) 28%, transparent);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bx-neon) 20%, transparent);
}

.sidebar__link:active {
  opacity: var(--press-opacity);
  transform: scale(var(--press-scale));
}

.sidebar__link--active {
  background-color: color-mix(in srgb, var(--bx-core) 45%, transparent);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--bx-neon) 45%, transparent),
    0 0 14px color-mix(in srgb, var(--bx-core) 35%, transparent);
  animation: bx-link-glow 2.8s ease-in-out infinite;
}

.sidebar__link--active .sidebar__icon {
  color: var(--bx-neon);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--bx-neon) 60%, transparent));
}

.sidebar__link--highlight {
  color: var(--color-accent-gold);
}

.sidebar__link--highlight:hover,
.sidebar__link--highlight.sidebar__link--active {
  color: var(--color-accent-gold);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-accent-gold) 40%, transparent);
}

.sidebar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  width: 20px;
  height: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
}

.sidebar__separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bx-neon) 25%, transparent), transparent);
  margin: var(--space-sm) var(--space-md);
}

.sidebar__group-label {
  padding: 0.9rem var(--space-md) 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bx-neon) 55%, transparent);
  pointer-events: none;
  user-select: none;
}

.sidebar__group-label:first-child {
  padding-top: 0.35rem;
}

/* Sidebar footer */
.sidebar__footer {
  position: relative;
  padding: var(--space-md);
  border-top: 1px solid color-mix(in srgb, var(--bx-neon) 15%, transparent);
  z-index: 1;
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--bx-neon) 22%, transparent);
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar__logout:hover {
  border-color: var(--bx-neon);
  color: var(--bx-neon);
  background-color: color-mix(in srgb, var(--bx-core) 20%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--bx-neon) 25%, transparent);
}


/* --- Dashboard Main Area --- */
.dashboard__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible; /* el contenido crece; html/body hacen scroll */
  position: relative;
}

/* Noise Wash global — atmósfera animada en todas las pantallas de la app.
   Vive SOLO dentro de .dashboard__main con un panel activo:
   - el hero/landing (.nlm-hero) vive fuera de .dashboard → nunca lo toca
   - auth/landing no activan .panel--active en el dashboard
   Tokens: --nw-* (shell) vs --ab-nw-* (about immersivo). */
.dashboard__main:has(.panel--active)::before {
  content: '';
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
  background:
    radial-gradient(ellipse 80% 55% at  18% 15%, var(--nw-c1) 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at  85% 80%, var(--nw-c3) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at  70% 20%, var(--nw-c2) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at  25% 88%, var(--nw-c4) 0%, transparent 65%);
  animation: aboutWashBreathe 22s ease-in-out infinite;
}

.dashboard__main:has(.panel--active)::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--nw-noise-opacity, 0.030);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard__main:has(.panel--active)::before {
    animation: none;
    opacity: 0.88;
  }
}

.dashboard__content {
  flex: 1;
  padding:
    var(--space-lg)
    max(var(--page-pad-x), env(safe-area-inset-right))
    max(var(--space-xl), env(safe-area-inset-bottom))
    max(var(--page-pad-x), env(safe-area-inset-left));
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}


/* --- Top Bar (mobile) --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    max(var(--space-md), env(safe-area-inset-top))
    max(var(--page-pad-x), env(safe-area-inset-right))
    var(--space-md)
    max(var(--page-pad-x), env(safe-area-inset-left));
  background-color: var(--color-bg-deep);
  border-bottom: var(--border-width-strong) solid var(--color-accent-red);
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.topbar__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: var(--space-sm);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.topbar__hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.topbar__hamburger:hover .topbar__hamburger-line {
  background-color: var(--color-accent-gold);
}

.topbar__heading {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  padding: 0 0.35rem;
}

.topbar__greeting {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0.2rem 0.25rem;
  max-width: 100%;
  min-width: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.82rem, 3.4vw, 1rem);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  text-transform: none;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--press-ms) ease;
}

.topbar__greeting-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__greeting.is-home-active {
  cursor: default;
}

.topbar__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: var(--touch-min);
  flex-shrink: 0;
}

.topbar__notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition-fast);
}

.topbar__night-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition-fast);
}

.topbar__night-btn:hover,
.topbar__night-btn[aria-pressed="true"] {
  color: var(--color-accent-gold);
}
.topbar__night-btn:focus-visible {
  color: var(--color-accent-gold);
  outline: 2px solid var(--color-accent-gold, #C9A03E);
  outline-offset: 2px;
  border-radius: 4px;
}

.topbar__night-btn .topbar__night-icon--sun {
  display: none;
}

.topbar__night-btn[aria-pressed="true"] .topbar__night-icon--moon {
  display: none;
}

.topbar__night-btn[aria-pressed="true"] .topbar__night-icon--sun {
  display: block;
}

.topbar__notif-btn:hover,
.topbar__notif-btn[aria-expanded="true"] {
  color: var(--color-accent-gold);
}
.topbar__notif-btn:focus-visible {
  color: var(--color-accent-gold);
  outline: 2px solid var(--color-accent-gold, #C9A03E);
  outline-offset: 2px;
  border-radius: 4px;
}

.topbar__notif-icon {
  display: block;
}

.topbar__notif-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.28rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.28rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-on-accent);
  background: var(--color-accent-red);
  border: 1px solid #000;
  pointer-events: none;
}

.notif-center {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 12050;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 26rem);
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--color-border);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--color-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.notif-panel[hidden] {
  display: none !important;
}

.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-bottom: var(--border-width) solid var(--color-border);
}

.notif-panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-subtitle);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  color: var(--color-text-primary);
}

.notif-panel__mark-all {
  border: none;
  background: transparent;
  padding: 0.55rem 0.35rem;
  min-height: var(--touch-min);
  font-family: var(--font-body);
  font-size: var(--text-support);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent-gold);
  cursor: pointer;
  touch-action: manipulation;
}

.notif-panel__mark-all:hover,
.notif-panel__mark-all:focus-visible {
  color: var(--color-text-primary);
  outline: none;
}

.notif-panel__mark-all:disabled {
  opacity: 0.4;
  cursor: default;
}

.notif-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notif-panel__empty {
  margin: 0;
  padding: 1.4rem 1rem;
  text-align: center;
  font-size: var(--text-support);
  color: var(--color-text-muted);
}

.notif-item {
  width: 100%;
  display: grid;
  grid-template-columns: 0.35rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border: none;
  border-bottom: var(--border-width) solid var(--color-border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition-fast);
}

.notif-item:hover,
.notif-item:focus-visible {
  background: var(--color-surface-hover);
  outline: none;
}

.notif-item__accent {
  width: 0.35rem;
  min-height: 2.2rem;
  align-self: stretch;
  background: var(--color-border-strong);
}

.notif-item--unread .notif-item__accent {
  background: var(--color-accent-red);
}

.notif-item__eyebrow {
  margin: 0 0 0.2rem;
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.notif-item__title {
  margin: 0 0 0.2rem;
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

.notif-item__body {
  margin: 0;
  font-size: var(--text-support);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.notif-item__time {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.notif-item--unread .notif-item__title {
  color: #fff;
}

.app-toast__action {
  display: inline-flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-support);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-red);
  cursor: pointer;
}

.app-toast__action:hover,
.app-toast__action:focus-visible {
  color: var(--color-red-vibrant);
  outline: none;
}


/* --- Panels (content sections) --- */
.panel {
  display: none;
}

.panel--active {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  isolation: isolate;
  animation: viewEnter var(--transition-view) both;
}

/* Atmósfera de marca en cada pantalla — velo vino ultrasuave en el tope */
.panel--active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(
    180deg,
    rgba(92, 36, 48, 0.055) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* panelWelcome ya tiene su propio hero — no duplicar */
#panelWelcome.panel--active::before {
  display: none;
}

@keyframes viewEnter {
  /* Solo opacity: un translateY residual crea containing block y rompe toques en móvil */
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .panel--active {
    animation: none;
  }
}

.panel__header {
  position: relative;
  z-index: 1;
  /* ── Feature header: fondo oscuro + orbe temático ── */
  margin: 0 0 var(--space-lg);
  padding: 1.35rem 1.1rem 1.25rem;
  border-bottom: none;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ph-bg);
  color: var(--ph-text);
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* Tokens locales para hijos: consumen variables de tema */
  --color-text-primary:   var(--ph-text-primary);
  --color-text-secondary: var(--ph-text-secondary);
  --color-text-muted:     var(--ph-text-muted);
  --color-border:         var(--ph-border);
  --color-border-strong:  var(--ph-border-strong);
  --color-surface:        var(--ph-surface);
  --color-accent-gold:    var(--ph-gold);
}

/* Orbe principal: colores derivados del tema */
.panel__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 25% 35%, var(--ph-orb-c1) 0%, transparent 65%),
    radial-gradient(ellipse 45% 38% at 88% 70%, var(--ph-orb-c2) 0%, transparent 58%),
    radial-gradient(ellipse 38% 32% at 8%  90%, var(--ph-orb-c3) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

/* Destello superior sutil */
.panel__header::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 28% at 72% 10%, var(--ph-spark-1) 0%, transparent 58%),
    radial-gradient(ellipse 22% 18% at 15% 18%, var(--ph-spark-2) 0%, transparent 52%);
  pointer-events: none;
  z-index: 0;
}

.panel__header .panel__title,
.panel__header .panel__subtitle,
.panel__header-copy,
.panel__header > * {
  position: relative;
  z-index: 1;
}

.panel__header .panel__title {
  position: relative;
  z-index: 1;
  margin: 0;
}

.panel__header .panel__subtitle {
  position: relative;
  z-index: 1;
  margin-top: var(--space-xs);
}

/* Companion entre header y body: decorativo, nunca encima del contenido */
.panel > .null-companion-host {
  position: relative;
  z-index: 0;
  margin: 0 0 var(--space-lg);
  width: 100%;
  max-width: 100%;
  pointer-events: none;
}

.panel__body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  pointer-events: auto;
}

.panel__header--with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.panel__header-copy {
  min-width: min(100%, 16rem);
  flex: 1 1 14rem;
}

/* Título global del panel — sin uppercase, tamaño moderado, jerarquía clara */
.panel__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  letter-spacing: var(--track-title);
  color: var(--color-text-primary);
  text-shadow: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: var(--leading-tight);
}

.panel__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-subtitle);
  font-weight: var(--weight-subtitle);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
  line-height: var(--leading-body);
  margin-top: var(--space-xs);
  text-transform: none;
}

/* ── _05-training.css ── */
/* ============================================
   SECTION: Exportación informe mensual PDF
   ============================================ */

.report-export {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: min(100%, 16rem);
}

.report-export__label {
  margin-bottom: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.report-export__row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.report-export__month {
  width: auto;
  min-width: 10.5rem;
  max-width: 12rem;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 1rem; /* evita zoom iOS en focus (≥16px) */
}

.report-export__hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-md);
  line-height: 1.45;
}

.report-export__feedback {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  margin: 0;
  min-height: 1em;
}

.report-export__feedback[data-tone="success"] {
  color: var(--color-accent-gold);
}

.report-export__feedback[data-tone="error"] {
  color: var(--color-accent-red);
}

.report-export__feedback[data-tone="info"] {
  color: var(--color-text-muted);
}

.report-export-card .card__title {
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .report-export__row {
    width: 100%;
  }

  .report-export__month {
    flex: 1 1 auto;
    max-width: none;
  }

  .report-export__row .btn {
    flex: 1 1 auto;
  }
}


/* ============================================
   SECTION: Training Designer — Split Days
   ============================================ */

.split-day {
  border: 2px solid var(--color-border);
  background-color: var(--color-bg);
  margin-bottom: var(--space-md);
  box-shadow: 3px 3px 0px #000000;
  overflow: visible;
}

.split-day__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  cursor: pointer;
}

.split-day__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.split-day__toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.split-day__body {
  padding: var(--space-md);
  display: none;
  overflow: visible;
}

.split-day__body--open {
  display: block;
}

.split-day__name-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  outline: none;
  border-radius: var(--radius-none);
}

.split-day__name-input:focus {
  border-color: var(--color-accent-gold);
}

.split-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: stretch;
}

.split-template-row .form__select {
  min-width: 0;
}

.split-template-row .btn {
  white-space: nowrap;
  align-self: stretch;
}

.split-template-hint {
  margin: var(--space-sm) 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.split-day__coach-note {
  margin: 0 0 var(--space-md);
}

.split-day__coach-note-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.split-day__coach-note-input {
  width: 100%;
  min-height: 4.5rem;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  border-radius: var(--radius-none);
}

.split-day__coach-note-input:focus {
  border-color: var(--color-accent-gold);
}

.split-day__coach-note-display {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  background: color-mix(in srgb, var(--color-accent-gold) 6%, var(--color-surface));
  border-left: 3px solid var(--color-accent-gold);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text-primary);
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .split-template-row {
    grid-template-columns: 1fr;
  }
}

/* Exercise row inside split day */
.exercise-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 52px var(--touch-min) var(--touch-min);
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
  min-width: 0;
  position: relative;
}

.exercise-row--combo-open {
  z-index: 12;
}

.exercise-row__combo {
  position: relative;
  min-width: 0;
  width: 100%;
  z-index: 1;
}

.exercise-row__combo:focus-within,
.exercise-row__combo.is-open {
  z-index: 8;
}

.exercise-row__library {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  outline: none;
  border-radius: var(--radius-none);
  width: 100%;
  min-width: 0;
}

.exercise-row__library:focus {
  border-color: var(--color-accent-gold);
}

.exercise-row__input {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: max(16px, 0.8rem); /* ≥16px: evita zoom automático en iOS Safari */
  outline: none;
  border-radius: var(--radius-none);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.exercise-row__input:focus {
  border-color: var(--color-accent-gold);
}

.exercise-row__suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-top-color: var(--color-accent-gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.exercise-row__suggest[hidden] {
  display: none !important;
}

.exercise-row__suggest-empty {
  padding: 0.65rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.exercise-row__suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.exercise-row__suggest-item:last-child {
  border-bottom: none;
}

.exercise-row__suggest-item:hover,
.exercise-row__suggest-item.is-active {
  background: rgba(201, 154, 62, 0.12);
  color: #fff;
}

.exercise-row__suggest-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-row__suggest-cat {
  flex: 0 0 auto;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-gold-dim);
}

.exercise-row__suggest-item.is-active .exercise-row__suggest-cat,
.exercise-row__suggest-item:hover .exercise-row__suggest-cat {
  color: var(--color-accent-gold);
}

.exercise-row__sets {
  padding: var(--space-sm);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  outline: none;
  border-radius: var(--radius-none);
  width: 100%;
  -moz-appearance: textfield;
}

.exercise-row__sets::-webkit-inner-spin-button,
.exercise-row__sets::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.exercise-row__remove {
  background: none;
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.exercise-row__remove:hover {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
}

.exercise-row__tech-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-gold-dim);
}

.split-day__add-exercise {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-gold-dim);
  cursor: pointer;
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
  transition: color var(--transition-fast);
}

.split-day__add-exercise:hover {
  color: var(--color-accent-gold);
}

.exercise-labels__text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}


/* ============================================
   SECTION: Calendar
   ============================================ */

.panel__body--calendar {
  position: relative;
  padding-bottom: 4.5rem;
}

.calendar-shell__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.calendar-shell__header .card__title {
  text-align: center;
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calendar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.calendar-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-dot--done { background: var(--color-success); }
.calendar-dot--planned { background: var(--color-cal-planned); }
.calendar-dot--rest {
  background: transparent;
  border: 1.5px solid var(--color-cal-rest);
}
.calendar-dot--missed { background: var(--color-cal-missed); }
.calendar-dot--note {
  background: var(--color-accent-gold);
  width: 5px;
  height: 5px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar__day-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-sm) 0;
}

.calendar__cell {
  aspect-ratio: 1;
  background-color: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  position: relative;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  border-radius: var(--radius-md);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.calendar__cell:hover {
  background-color: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.calendar__cell:active {
  transform: scale(0.96);
}

.calendar__cell--empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.calendar__cell--today {
  border-color: var(--color-accent-red);
  border-width: 2px;
  background: var(--color-accent-soft);
  box-shadow: var(--glow-red-soft);
}

.calendar__cell--today::before {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-red);
  box-shadow: 0 0 0 2px rgba(92, 36, 48, 0.2);
}

.calendar__cell--selected {
  background-color: var(--color-surface);
  border-color: var(--color-accent-gold);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.calendar__cell--done {
  background: var(--color-success-bg);
}

.calendar__cell--planned {
  background: var(--color-cal-planned-bg);
}

.calendar__cell--missed {
  background: var(--color-cal-missed-bg);
}

.calendar__markers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 8px;
}

.calendar__day-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1;
}

.calendar__cell--empty .calendar__day-number {
  color: transparent;
}

.calendar__cell--today .calendar__day-number {
  color: var(--color-accent-red);
  font-weight: 800;
}

/* —— Week strip (mobile-first) —— */
.calendar-week {
  display: none;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;  padding: 2px var(--space-xs) var(--space-sm);
  margin: 0 calc(-1 * var(--space-xs));
  scrollbar-width: thin;
}

.calendar-week__day {
  flex: 0 0 calc((100% - 1.5rem) / 4.2);
  min-width: 64px;
  max-width: 88px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-xs);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.calendar-week__dow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.calendar-week__num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-primary);
}

.calendar-week__day--today {
  border-color: var(--color-accent-red);
  border-width: 2px;
  background: var(--color-accent-soft);
  box-shadow: var(--glow-red-soft);
}

.calendar-week__day--today .calendar-week__num {
  color: var(--color-accent-red);
}

.calendar-week__day--selected {
  border-color: var(--color-accent-gold);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.calendar-week__day--done { background: var(--color-success-bg); }
.calendar-week__day--planned { background: var(--color-cal-planned-bg); }
.calendar-week__day--missed { background: var(--color-cal-missed-bg); }

.calendar-month-toggle {
  display: none;
  width: 100%;
  margin-top: var(--space-md);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.calendar-month-wrap.is-collapsed {
  display: none;
}

/* —— Day detail card —— */
.cal-day-card {
  margin-top: var(--space-lg);
  border-color: var(--color-border-strong);
  animation: cal-day-in 0.28s ease;
}

@keyframes cal-day-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cal-day-card { animation: none; }
}

.cal-day-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.cal-day-card__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cal-day-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.cal-day-summary {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.cal-day-summary__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.cal-day-summary__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.cal-trainer-note {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border-left: 3px solid var(--color-accent-red);
  background: var(--color-accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.cal-trainer-note__label {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-red);
}

.cal-trainer-note__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-primary);
}

.cal-note-input {
  resize: vertical;
  min-height: 4.5rem;
}

.form__input--area {
  font-family: var(--font-body);
  line-height: 1.45;
}

/* —— FAB añadir nota —— */
.cal-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
  z-index: 80;
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: var(--color-accent-red);
  color: #FAFAF7;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(92, 36, 48, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cal-fab:hover,
.cal-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(92, 36, 48, 0.45);
  outline: none;
}

.cal-fab__icon {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 400;
}

#panelCalendar.panel--active .cal-fab {
  display: inline-flex;
}

@media (min-width: 768px) {
  .cal-fab {
    position: absolute;
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .panel__body--calendar {
    padding-bottom: var(--space-xl);
  }

  /* Asegura que el botón "Guardar nota" no quede tapado por el FAB */
  .cal-day-card {
    margin-bottom: 4rem;
  }
}

/* Mobile: FAB fijo tapa el botón "Guardar nota" — añade espacio inferior al card */
@media (max-width: 767px) {
  .cal-day-card {
    margin-bottom: 5.5rem;
  }
}

/* Mobile: week strip default, month optional */
@media (max-width: 767px) {
  .calendar-week {
    display: flex;
  }

  .calendar-month-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .calendar-month-wrap.is-collapsed-mobile {
    display: none;
  }

  .calendar__cell {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
  }

  .calendar__day-number {
    font-size: 0.72rem;
  }

  .calendar-legend {
    font-size: 0.6rem;
    gap: var(--space-xs) var(--space-sm);
  }
}


/* ============================================
   SECTION: Registro de sesión
   ============================================ */

.card--logbook {
  background-color: var(--color-surface);
  border: 2px solid #3d3930;
  box-shadow: var(--shadow-heavy);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

/* Espiral / Perforaciones de hojas de cuaderno */
.logbook__spiral-strip {
  display: flex;
  justify-content: space-around;
  padding: 8px 14px;
  background-color: var(--color-bg-deep);
  border-bottom: 2px solid #282622;
}

.logbook__punch {
  width: 14px;
  height: 14px;
  background: var(--color-surface);
  border: 1.5px solid #333330;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 1px rgba(255, 255, 255, 0.1);
}

.logbook__header {
  background-color: var(--color-surface-raised);
  border-bottom: 2px dashed #3a362f;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
}

.logbook__top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.logbook__stamp {
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-accent-red);
  border: 2px solid var(--color-accent-red);
  padding: 2px 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
  display: inline-block;
  box-shadow: 0 1px 3px rgba(28, 27, 26, 0.08);
  background: rgba(150, 28, 28, 0.08);
}

.logbook__badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background-color: var(--color-bg-deep);
  color: var(--color-accent-gold);
  border: 1px solid var(--color-accent-gold-dim);
  padding: 3px 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logbook__title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.12em;
  color: #f6f3eb;
  text-transform: uppercase;
  margin-top: var(--space-xs);
  text-shadow: none;
}

.logbook__submeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.logbook__rule-hint {
  font-family: var(--font-handwritten);
  font-size: 1.25rem;
  color: #c4ba9f;
  letter-spacing: 0.03em;
}

.tag--brutalist {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  background-color: var(--color-accent-red);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  box-shadow: 0 1px 2px rgba(28, 27, 26, 0.06);
}

/* Hoja de papel rayado de entrenamiento */
.session__table-wrapper.logbook__paper {
  background-color: var(--color-surface);
  /* Margen vertical rojo del cuaderno + líneas horizontales tenues */
  background-image: 
    linear-gradient(90deg, transparent 48px, rgba(150, 28, 28, 0.55) 49px, transparent 51px),
    repeating-linear-gradient(transparent, transparent 41px, rgba(255, 255, 255, 0.05) 41px, rgba(255, 255, 255, 0.05) 42px);
  background-size: 100% 100%, 100% 42px;
  border: 1px solid #2e2c26;
  padding: var(--space-xs) 0;
  overflow-x: auto;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.session__table--notebook {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.session__table--notebook th {
  background: rgba(8, 8, 7, 0.9);
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  border-bottom: 2px solid var(--color-accent-red);
  padding: var(--space-md) var(--space-sm);
  white-space: nowrap;
}

.session__table--notebook td {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  padding: 6px 4px;
  vertical-align: middle;
}

.notebook__exercise-cell {
  font-family: var(--font-typewriter);
  font-weight: 700;
  font-size: 0.85rem;
  color: #f2eee6;
  letter-spacing: 0.02em;
  padding-left: var(--space-md) !important;
  position: sticky;
  left: 0;
  background: linear-gradient(90deg, var(--color-surface) 85%, transparent);
  z-index: 1;
}

.notebook__exercise-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.notebook__exercise-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notebook__info-btn {
  flex: 0 0 auto;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: 1.5px solid var(--color-accent-gold-dim);
  background: transparent;
  color: var(--color-accent-gold);
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.notebook__info-btn:hover,
.notebook__info-btn:focus-visible {
  border-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.15);
  color: #fff;
  outline: none;
}

.notebook__info-btn--video {
  border-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.14);
  color: var(--color-accent-gold);
  font-style: normal;
  font-size: 0.72rem;
}

.notebook__info-btn--video:hover,
.notebook__info-btn--video:focus-visible {
  background: rgba(201, 154, 62, 0.28);
  color: #fff;
}

.notebook__row--exercise-start td {
  border-top: 1px solid rgba(201, 154, 62, 0.18);
}

.notebook__row--focus {
  background: rgba(201, 154, 62, 0.06);
}

.notebook__row--done .notebook__input {
  opacity: 0.72;
}

.notebook__ditto {
  color: var(--color-accent-gold-dim);
  font-size: 1.1rem;
  font-weight: bold;
  padding-left: var(--space-sm);
}

.notebook__set-cell {
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  color: var(--color-accent-gold);
  font-weight: 700;
}

/* Inputs estilo tinta / lápiz sobre papel de cuaderno */
.notebook__input {
  font-family: var(--font-handwritten) !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: #f9f6ed !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px dashed rgba(201, 154, 62, 0.5) !important;
  text-align: center !important;
  padding: 0 4px !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
  transition: all var(--transition-fast);
  -moz-appearance: textfield;
  min-width: 56px;
  min-height: var(--touch-min);
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.notebook__input:focus {
  border-bottom: 2px solid var(--color-accent-gold) !important;
  color: #ffffff !important;
  text-shadow: 0 0 4px rgba(201, 154, 62, 0.8);
  background-color: rgba(201, 154, 62, 0.08) !important;
}

.notebook__input--flash {
  background-color: rgba(201, 154, 62, 0.18) !important;
}

.notebook__input::placeholder {
  color: rgba(255, 255, 255, 0.22) !important;
  font-family: var(--font-handwritten) !important;
  font-size: 1.35rem !important;
}

.logbook__nav-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8f887b;
  letter-spacing: 0.03em;
  margin: 0 0 var(--space-md);
  line-height: 1.55;
  padding: 0.65rem 0.75rem;
  border: 1px dashed #3a362f;
  background: rgba(0, 0, 0, 0.25);
}

/* Checkbox con tilde de tinta — hit area ≥48px */
.notebook__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  background-color: transparent;
  border: 2px solid #5c584e;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--press-ms) ease, opacity var(--press-ms) ease;
  border-radius: 1px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.notebook__checkbox:hover {
  border-color: var(--color-accent-gold);
}

.notebook__checkbox:active {
  opacity: var(--press-opacity);
  transform: scale(var(--press-scale));
}

.notebook__checkbox:checked {
  background-color: var(--color-accent-red);
  border-color: var(--color-accent-red);
  box-shadow: 0 1px 2px rgba(28, 27, 26, 0.06);
}

.notebook__checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-family: var(--font-handwritten);
  font-size: 1.5rem;
  font-weight: 700;
}

.logbook__footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px dashed #3a362f;
}

.logbook__quote {
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  font-style: normal;
  color: #8f887b;
  line-height: 1.45;
  border-left: 3px solid var(--color-accent-gold-dim);
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.session__empty {
  text-align: center;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: var(--space-xl) !important;
}


/* ============================================
   SECTION: Scale
   ============================================ */

.scale__input {
  font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
  text-align: center;
  font-family: var(--font-display) !important;
  letter-spacing: 0.05em;
  padding: var(--space-lg) !important;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.scale__display {
  text-align: center;
}


/* ============================================
   SECTION: Stats — Evolución de Cargas
   ============================================ */

.stats-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.stats-card__subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-top: var(--space-xs);
}

.stats__chart-shell {
  position: relative;
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(92, 36, 48, 0.04) 0%, transparent 42%),
    var(--color-surface);
  border: var(--border-width-strong) solid var(--color-border-strong);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: var(--space-md);
  isolation: isolate;
}

.stats__chart-shell--lift {
  min-height: 280px;
}

.stats__chart-shell canvas {
  display: block;
  width: 100% !important;
  max-height: 280px;
}

.stats__chart-shell .stats__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  z-index: 2;
}

.stats__chart-shell .stats__empty[hidden] {
  display: none;
}

.stats__empty {
  text-align: center;
  padding: var(--space-2xl);
}

.stats__empty-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.stats__empty-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.stats__empty--guided {
  gap: var(--space-xs);
}

.stats__empty--guided .stats__empty-icon {
  display: none;
}

.stats__empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.stats__chart-shell.is-empty {
  min-height: 0;
  padding: var(--space-lg) var(--space-md);
}

.stats__chart-shell.is-empty .stats__empty {
  position: static;
  inset: auto;
  background: transparent;
  padding: var(--space-sm) 0;
}

.stats-card.is-awaiting-data .stats__controls,
.stats-card.is-awaiting-data .habits-cross__legend,
.stats-card.is-awaiting-data .stats__chart-caption {
  display: none;
}

.stats__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.stats__metric-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: var(--border-width-strong) solid var(--color-border-strong);
  background: var(--color-bg-deep);
}

.stats__metric-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  border-right: var(--border-width) solid var(--color-border);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.stats__metric-btn:last-child {
  border-right: none;
}

.stats__metric-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.stats__metric-btn.is-active {
  color: var(--color-bg-deep);
  background: var(--color-accent-gold);
}

.stats__exercise-field {
  min-width: min(100%, 220px);
  flex: 1 1 180px;
}

.stats__exercise-field .form__label {
  margin-bottom: var(--space-xs);
}

.stats__alerts {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.stats__alert {
  border: var(--border-width-strong) solid var(--color-border-strong);
  box-shadow: var(--shadow-card);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.stats__alert strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

.stats__chart-caption {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.45;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.stats__chart-caption[hidden] {
  display: none;
}

.stats__chart-shell--habits-cross {
  min-height: 300px;
}

.habits-cross__controls {
  gap: var(--space-sm);
}

.habits-cross__range-btn,
.habits-cross__habit-btn,
.habits-cross__perf-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  border-right: var(--border-width) solid var(--color-border);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.habits-cross__range-btn:last-child,
.habits-cross__habit-btn:last-child,
.habits-cross__perf-btn:last-child {
  border-right: none;
}

.habits-cross__range-btn:hover,
.habits-cross__habit-btn:hover,
.habits-cross__perf-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.habits-cross__range-btn.is-active,
.habits-cross__habit-btn.is-active {
  color: var(--color-bg-deep);
  background: var(--color-accent-gold);
}

.habits-cross__perf-btn.is-active {
  color: var(--color-text-primary);
  background: var(--color-accent-red);
}

.habits-cross__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.habits-cross__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.habits-cross__legend-item i {
  display: inline-block;
  width: 1.1rem;
  height: 3px;
}

.habits-cross__legend-item--habit i {
  background: var(--color-accent-gold);
}

.habits-cross__legend-item--perf i {
  background: var(--color-accent-red);
}

@media (max-width: 640px) {
  .stats__metric-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.55rem 0.5rem;
    font-size: 0.65rem;
  }

  .stats__chart-shell--lift,
  .stats__chart-shell--habits-cross {
    min-height: 240px;
  }

  .stats__chart-shell--lift.is-empty,
  .stats__chart-shell--habits-cross.is-empty {
    min-height: 0;
  }

  .habits-cross__range-btn,
  .habits-cross__habit-btn,
  .habits-cross__perf-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.55rem 0.45rem;
    font-size: 0.62rem;
  }

  .habits-cross__controls .stats__metric-group {
    flex: 1 1 100%;
  }
}


/* ============================================
   RESPONSIVE — Mobile First
   ============================================ */

/* Very small screens */
@media (max-width: 374px) {

  .card__body {
    padding: var(--space-lg) var(--space-md);
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .auth__tab {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
  }

  .panel__title {
    font-size: 1.2rem;
  }

  .calendar__cell {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
  }

  .calendar__day-number {
    font-size: 0.65rem;
  }

  .calendar-week__day {
    min-width: 58px;
  }
}

/* Tablets */
@media (min-width: 768px) {

  .card__body {
    padding: var(--space-2xl) 0;
  }

  .dashboard__content {
    padding:
      var(--space-xl)
      max(var(--space-xl), env(safe-area-inset-right))
      var(--space-xl)
      max(var(--space-xl), env(safe-area-inset-left));
  }
}

/* Desktop — sidebar always visible */
@media (min-width: 1024px) {

  .sidebar {
    transform: translate3d(0, 0, 0);
    position: fixed;
  }

  .sidebar__close {
    display: none;
  }

  .sidebar__overlay {
    display: none !important;
  }

  .dashboard__main {
    margin-left: var(--sidebar-width);
  }

  .topbar {
    display: none;
  }

  .dashboard__content {
    padding:
      var(--space-2xl)
      max(var(--space-2xl), env(safe-area-inset-right))
      var(--space-2xl)
      max(var(--space-2xl), env(safe-area-inset-left));
  }
} /* <-- Cierra @media (min-width: 1024px) */

  textarea.form__input {
    resize: vertical;
    min-height: 80px;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
  }

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  background: var(--color-surface);
}

.save-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
}

.save-status[data-state="pending"] { color: var(--color-accent-gold); }
.save-status[data-state="pending"] .save-status__dot { background: var(--color-accent-gold); }

.save-status[data-state="saving"] { color: var(--color-accent-gold); }
.save-status[data-state="saving"] .save-status__dot {
  background: var(--color-accent-gold);
  animation: savePulse 0.9s ease-in-out infinite;
}

.save-status[data-state="saved"] { color: #7dcea0; }
.save-status[data-state="saved"] .save-status__dot { background: #2e7d32; }

.save-status[data-state="retry"] { color: #e67e22; }
.save-status[data-state="retry"] .save-status__dot { background: #e67e22; }

.save-status[data-state="error"] { color: #5C2430; }
.save-status[data-state="error"] .save-status__dot { background: #5C2430; }

@keyframes savePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.session__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.session__actions #finishSession {
  margin-inline-start: auto;
}

.session__actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.session__no-split-hint {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-2, #f5f0eb);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.session__no-split-cta {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-accent, #5C2430);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.session__no-split-cta:hover { opacity: 0.8; }

.session-sync-alert {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #f5d0c8;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  padding: var(--space-sm) var(--space-md);
}

.session-recover-banner {
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #c8f5d4;
  background: color-mix(in srgb, #2e7d32 18%, transparent);
  border: 1px solid #2e7d32;
  padding: var(--space-sm) var(--space-md);
}

.session-export-feedback {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid transparent;
}

.session-export-feedback[data-tone="success"] {
  color: #c8e6c9;
  background: var(--color-success-bg);
  border-color: var(--color-success);
}

.session-export-feedback[data-tone="error"] {
  color: #f5d0c8;
  background: var(--color-error-bg);
  border-color: var(--color-error);
}

.session-export-feedback[data-tone="info"] {
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-color: var(--color-border);
}

.btn__icon {
  display: inline-block;
  margin-right: 0.35em;
  font-weight: 700;
  line-height: 1;
}

.btn--loading .btn__icon {
  display: none;
}

.app-error-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-error-bg);
  border-bottom: 1px solid var(--color-error);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.app-error-banner[hidden] {
  display: none;
}

.app-offline-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem var(--space-md);
  min-height: var(--touch-min);
  background:
    linear-gradient(90deg, rgba(201, 154, 62, 0.16), transparent 70%),
    var(--color-surface-inset);
  border-bottom: 1px solid rgba(201, 154, 62, 0.35);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.app-offline-banner[hidden] {
  display: none !important;
}

.app-offline-banner__dot {
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent-gold);
  box-shadow: 0 0 0 3px rgba(201, 154, 62, 0.2);
}

.app-offline-banner[data-state="pending"] {
  background:
    linear-gradient(90deg, rgba(92, 36, 48, 0.12), transparent 72%),
    var(--color-surface-inset);
  border-bottom-color: rgba(92, 36, 48, 0.28);
}

.app-offline-banner__retry {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  min-height: var(--touch-min);
  padding: 0 0.25rem;
}

.app-offline-banner[data-state="pending"] .app-offline-banner__retry,
.app-offline-banner:not([hidden]) .app-offline-banner__retry {
  display: inline-flex;
}

.app-offline-banner__retry[hidden] {
  display: none !important;
}

.kinetic-asym-host {
  margin-top: var(--space-md);
  display: grid;
  gap: 0.65rem;
}

.kinetic-asym-host[hidden] {
  display: none !important;
}

.kinetic-asym-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(180, 35, 40, 0.35);
  border-left: 3px solid #b42328;
  background:
    linear-gradient(90deg, rgba(180, 35, 40, 0.1), transparent 55%),
    var(--color-surface);
  color: var(--color-text-primary);
}

.kinetic-asym-alert__badge {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #b42328;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.kinetic-asym-alert__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b42328;
  font-family: var(--font-mono);
}

.kinetic-asym-alert__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.kinetic-asym-alert__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.nutrition-client-hint {
  margin: var(--space-xs) 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.coach-client-group {
  margin: 0 0 var(--space-lg);
  max-width: 28rem;
}

.coach-client-hint {
  margin: var(--space-xs) 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.coach-client-empty {
  padding: var(--space-xl) var(--space-md);
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--color-border);
  background: var(--cm-border-88);
  text-align: left;
}

.coach-client-empty[hidden] {
  display: none !important;
}

.coach-client-empty:not([hidden]) {
  display: block;
}

.coach-client-empty__eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.coach-client-empty__title {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.coach-client-empty__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 36rem;
}

#statsChartsContent[hidden],
#scaleMemberContent[hidden],
#statsClientGroup[hidden],
#scaleClientGroup[hidden],
#scaleRegisterCard[hidden],
#scaleMemberBridge[hidden] {
  display: none !important;
}

.dashboard[data-role="trainer"] #scaleHistoryCard {
  margin-top: 0 !important;
}

.nutrition-empty {
  padding: var(--space-xl) var(--space-md);
  border: 1px solid var(--color-border);
  background: var(--cm-border-88);
  text-align: left;
}

.nutrition-empty[hidden] {
  display: none !important;
}

.nutrition-empty:not([hidden]) {
  display: block;
}

.nutrition-empty__eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nutrition-empty__title {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.nutrition-empty__text {
  margin: 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.nutrition-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* ── Nutrición: banner de roles ─────────────────────────── */
.nutri-role-banner {
  margin-bottom: var(--space-lg);
}
.nutri-role-banner__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 640px) {
  .nutri-role-banner__grid { grid-template-columns: 1fr; }
}
.nutri-role-card {
  padding: var(--space-md);
  border-radius: var(--radius-card, 10px);
  border: 1px solid var(--color-border);
}
.nutri-role-card--can {
  background: color-mix(in srgb, var(--color-accent, #8B8174) 8%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-accent, #8B8174) 35%, transparent);
}
.nutri-role-card--cannot {
  background: color-mix(in srgb, #888 5%, var(--color-surface));
  border-color: color-mix(in srgb, #888 25%, transparent);
  opacity: 0.8;
}
.nutri-role-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-xs);
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-accent, #8B8174) 18%, transparent);
  color: var(--color-accent, #8B8174);
}
.nutri-role-card--cannot .nutri-role-card__badge {
  background: color-mix(in srgb, #888 18%, transparent);
  color: var(--color-text-muted);
}
.nutri-role-card__title {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}
.nutri-role-card__list {
  margin: 0 0 var(--space-sm);
  padding-left: 1.2em;
  font-size: 0.825rem;
  line-height: 1.6;
  color: var(--color-text-secondary, var(--color-text-muted));
}
.nutri-role-card__credential {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-xs);
}

/* ── Nutrición: collapsible plantilla de dieta ───────────── */
.nutri-diet-collapsible {
  border: 1px dashed var(--cm-border-80);
  border-radius: var(--radius-card, 10px);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}
.nutri-diet-collapsible[open] {
  border-style: solid;
  border-color: var(--color-border);
}
.nutri-diet-collapsible__summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nutri-diet-collapsible__summary::-webkit-details-marker { display: none; }
.nutri-diet-collapsible__summary::before {
  content: '▶';
  font-size: 0.65rem;
  color: var(--color-text-muted);
  transition: transform 0.18s;
  flex-shrink: 0;
}
.nutri-diet-collapsible[open] > .nutri-diet-collapsible__summary::before {
  transform: rotate(90deg);
}
.nutri-diet-collapsible__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-muted);
}
.nutri-diet-collapsible__hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.7;
}
.nutri-diet-collapsible[open] .nutri-diet-collapsible__title {
  color: var(--color-text);
}
.nutri-diet-collapsible > *:not(summary) {
  padding: 0 var(--space-md) var(--space-md);
}

/* ── Nutrición: botones de plantilla ─────────────────────── */
.nutri-template-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}
.btn--accent {
  background: color-mix(in srgb, var(--color-accent, #8B8174) 18%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent, #8B8174) 40%, transparent);
  color: var(--color-accent, #8B8174);
}
.btn--accent:hover {
  background: color-mix(in srgb, var(--color-accent, #8B8174) 28%, var(--color-surface));
}

/* ── Nutrición: panel de presets ─────────────────────────── */
.nutri-preset-panel {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface-raised, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 10px);
}
.nutri-preset-panel[hidden] { display: none; }
.nutri-preset-panel__hint {
  margin: 0 0 var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.nutri-preset-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
}
.nutri-preset-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.nutri-preset-card:hover {
  border-color: var(--color-accent, #8B8174);
  background: color-mix(in srgb, var(--color-accent, #8B8174) 8%, var(--color-surface));
}
.nutri-preset-card__icon {
  font-size: 1.25rem;
  line-height: 1;
}
.nutri-preset-card__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}
.nutri-preset-card__hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ── Nutrición: bloques rápidos ──────────────────────────── */
.nutri-quick-blocks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}
.nutri-quick-blocks__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
  margin: 0;
}
.nutri-quick-blocks__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nutri-quick-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--color-text-secondary, var(--color-text-muted));
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.nutri-quick-chip:hover {
  border-color: var(--color-accent, #8B8174);
  color: var(--color-accent, #8B8174);
  background: color-mix(in srgb, var(--color-accent, #8B8174) 6%, var(--color-surface));
}

/* ── Nutrición: calculadora de proteína ─────────────────── */
.nutri-prot-calc {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}
.nutri-prot-calc__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-md);
  align-items: start;
}
@media (max-width: 560px) {
  .nutri-prot-calc__row { grid-template-columns: 1fr; }
}
.nutri-prot-calc__input {
  max-width: 100%;
}
.nutri-prot-calc__result[hidden] { display: none; }
.nutri-prot-calc__result {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.nutri-prot-calc__result-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.nutri-prot-calc__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nutri-prot-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--color-accent, #8B8174) 15%, var(--color-surface));
  color: var(--color-accent, #8B8174);
  border: 1px solid color-mix(in srgb, var(--color-accent, #8B8174) 30%, transparent);
}
.nutri-prot-badge--secondary {
  font-weight: 400;
  font-size: 0.75rem;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* ── Nutrición: acciones del viewer (toolbar) ───────────── */
.nutrition-viewer__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Nutrición: feedback adherencia ─────────────────────── */
.nutri-adherence__feedback {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 6px 0 0;
  min-height: 1.2em;
  transition: opacity 0.2s;
}

/* ── Nutrición: tarjeta de hoy ──────────────────────────── */
.nutri-today-card {
  background: color-mix(in srgb, var(--color-accent, #8B8174) 8%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent, #8B8174) 25%, transparent);
  border-radius: var(--radius-card, 10px);
  padding: 14px 16px;
  margin-bottom: var(--space-lg);
}
.nutri-today-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.nutri-today-card__day {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nutri-today-card__kcal {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.nutri-today-card__meals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nutri-today-card__meal {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nutri-today-card__meal-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0;
}
.nutri-today-card__foods {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.nutri-today-card__food {
  font-size: 0.82rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 2px 8px;
}
.nutri-today-card__food em {
  font-style: normal;
  color: var(--color-text-muted);
  margin-left: 3px;
}
.nutri-today-card__more {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  align-self: center;
  padding: 2px 6px;
}

/* ── Nutrición: timeline de suplementación ──────────────── */
.nutri-supp-timeline {
  margin-bottom: 16px;
}
.nutri-supp-timeline__track {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}
.nutri-supp-timeline__slot {
  flex: 1;
  min-width: 120px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
}
.nutri-supp-timeline__moment {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.nutri-supp-timeline__pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nutri-supp-timeline__pill {
  font-size: 0.82rem;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-accent, #8B8174) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent, #8B8174) 20%, transparent);
  border-radius: 5px;
  padding: 3px 8px;
  display: inline-block;
}
.nutri-supp-timeline__connector {
  display: none;
}
@media (max-width: 560px) {
  .nutri-supp-timeline__track { flex-direction: column; gap: 6px; }
  .nutri-supp-timeline__slot { min-width: unset; }
}

/* ── Nutrición: contexto de asesoría ─────────────────────── */
.nutri-advisory-context {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-accent, #8B8174));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 10px);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.nutri-advisory-context__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent, #8B8174);
}
.nutri-advisory-context__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 600px) {
  .nutri-advisory-context__row { grid-template-columns: 1fr; }
}

.nutrition-editor__tip {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid color-mix(in srgb, var(--color-accent, #8B8174) 65%, transparent);
  background: color-mix(in srgb, var(--color-surface) 90%, #8B8174);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.nutrition-editor[hidden] {
  display: none !important;
}

.nutrition-editor:not([hidden]) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1;
}

.nutrition-editor__area {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.55;
  font-family: var(--font-body);
  white-space: pre-wrap;
  pointer-events: auto;
}

.nutrition-save-feedback {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.nutrition-save-feedback[data-state="ok"] {
  color: var(--color-success, #2f6b4f);
}

.nutrition-save-feedback[data-state="err"] {
  color: var(--color-error);
}

.nutrition-viewer {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.nutrition-viewer[hidden] {
  display: none !important;
}

.nutrition-viewer:not([hidden]) {
  display: flex !important;
}

#nutritionClientGroup,
#nutritionTrainerEmpty,
#nutritionEditor,
#nutritionViewer {
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

#nutritionClientSelect,
#nutritionTitleInput,
#nutritionTextInput,
#nutritionSuppSearch,
#nutritionSuppAddBtn,
#nutritionSuppCatalog,
#nutritionSuppAssignedGrid,
#nutritionDirectivesInput,
#nutritionSaveBtn {
  pointer-events: auto;
  position: relative;
  z-index: 5;
}

.nutrition-viewer__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.nutrition-viewer__meta-block {
  min-width: 0;
  flex: 1 1 14rem;
}

.nutrition-viewer__title {
  margin: 0 0 var(--space-xs);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.nutrition-viewer__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.nutrition-section {
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--color-border);
}

.nutrition-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.nutrition-section__label {
  margin: 0 0 var(--space-sm);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent, var(--color-accent-primary, #5C2430));
  font-weight: 600;
}

.nutrition-section__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.nutrition-section__body--muted {
  color: var(--color-text-muted);
  font-style: normal;
}

/* ── Nutrition section header con icono ─────────────────────────── */

.nutrition-section__label {
  margin: 0;
}

/* ── Macro overview (cliente) ────────────────────────────────────── */
.nutri-overview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs, 6px);
  padding: var(--space-md, 16px) 0 var(--space-sm, 10px);
  margin-bottom: var(--space-md, 16px);
  border-bottom: 1px solid var(--color-border);
}

.nutri-overview[hidden] { display: none; }

.nutri-overview__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: var(--space-sm, 10px) var(--space-md, 16px);
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border-radius: var(--radius-md, 10px);
  border-top: 3px solid transparent;
  min-width: 70px;
  flex: 1;
}

.nutri-overview__badge--kcal  { border-top-color: var(--color-accent, #7f001f); }
.nutri-overview__badge--prot  { border-top-color: #e07b39; }
.nutri-overview__badge--carb  { border-top-color: #5b8dd9; }
.nutri-overview__badge--fat   { border-top-color: #78b04a; }

.nutri-overview__val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.nutri-overview__lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

/* ── Adherencia diaria (cliente) ─────────────────────────────────── */
.nutri-adherence {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 10px);
  padding: var(--space-sm, 10px) var(--space-md, 16px);
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border-radius: var(--radius-md, 10px);
  margin-bottom: var(--space-md, 16px);
  flex-wrap: wrap;
}

.nutri-adherence[hidden] { display: none; }

.nutri-adherence__lbl {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  flex: 1;
  margin: 0;
  min-width: 120px;
}

.nutri-adherence__btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nutri-adherence__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
}

.nutri-adherence__btn:hover {
  border-color: var(--color-accent, #7f001f);
  color: var(--color-accent, #7f001f);
}

.nutri-adherence__btn[aria-pressed="true"] {
  background: var(--color-accent, #7f001f);
  border-color: var(--color-accent, #7f001f);
  color: #fff;
}

/* ── Coach macro preview (junto al slider kcal) ──────────────────── */
.nutri-macro-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-sm, 10px) 0 0;
}

.nutri-macro-preview[hidden] { display: none; }

.nutri-macro-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm, 6px);
  min-width: 68px;
  flex: 1;
  gap: 2px;
}

.nutri-macro-badge--prot { background: rgba(224,123,57,0.13); color: #c8611a; }
.nutri-macro-badge--carb { background: rgba(91,141,217,0.13); color: #3060bb; }
.nutri-macro-badge--fat  { background: rgba(120,176,74,0.13);  color: #458018; }

.nutri-macro-badge__val {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.nutri-macro-badge__lbl {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nutri-macro-badge--prot { color: #e07b39; }
  :root:not([data-theme="light"]) .nutri-macro-badge--carb { color: #5b8dd9; }
  :root:not([data-theme="light"]) .nutri-macro-badge--fat  { color: #78b04a; }
}

:root[data-theme="dark"] .nutri-macro-badge--prot { color: #e07b39; }
:root[data-theme="dark"] .nutri-macro-badge--carb { color: #5b8dd9; }
:root[data-theme="dark"] .nutri-macro-badge--fat  { color: #78b04a; }

/* ── TDEE banner (coach, junto al slider) ────────────────────────── */
.nutri-tdee {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-sm) 0 0;
}

.nutri-tdee[hidden] { display: none; }

.nutri-tdee__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border-radius: var(--radius-sm, 6px);
  flex: 1;
  min-width: 80px;
}

.nutri-tdee__val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.nutri-tdee__lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.nutri-tdee__val--deficit { color: #3a8fd6; }
.nutri-tdee__val--surplus { color: #e07b39; }
.nutri-tdee__val--maint   { color: #78b04a; }

/* ── Nota del coach standalone (cliente) ─────────────────────────── */
.nutri-coach-banner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 6px);
  padding: var(--space-md);
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border-left: 3px solid var(--color-accent, #7f001f);
  border-radius: 0 var(--radius-md, 10px) var(--radius-md, 10px) 0;
  margin-bottom: var(--space-md);
}

.nutri-coach-banner[hidden] { display: none; }

.nutri-coach-banner__eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent, #7f001f);
  font-weight: 700;
  margin: 0;
}

.nutri-coach-banner__text {
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
}

/* ── Frescura de la pauta (cliente, toolbar) ─────────────────────── */
.nutri-freshness {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.nutri-freshness[hidden] { display: none; }

.nutri-freshness__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Empty state mejorado (cliente) ──────────────────────────────── */
.nutri-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  padding: var(--space-xl, 40px) var(--space-md);
}

.nutri-empty-state[hidden] { display: none; }

.nutri-empty-state__icon {
  font-size: 2rem;
  opacity: 0.35;
}

.nutri-empty-state__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.nutri-empty-state__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 300px;
}

/* ── Vista previa "Ver como atleta" (coach) ──────────────────────── */
.nutri-preview-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border-radius: var(--radius-md, 10px);
  margin-bottom: var(--space-md);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.nutri-preview-bar[hidden] { display: none; }

.nutri-preview-bar__label { flex: 1; margin: 0; }

/* ── Texto nutrición con estructura visual ───────────────────────── */
.nutri-structured { display: flex; flex-direction: column; gap: 10px; }

.nutri-structured__section-head {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent, #7f001f);
  margin: 6px 0 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.nutri-structured__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nutri-structured__list li {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text);
}

.nutri-structured__para {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--color-text);
}

/* ── Save area coach — visual grouping ───────────────────────────── */

/* ── Racha adherencia 7 días ─────────────────────────────────────── */
.nutri-streak {
  display: flex;
  gap: 5px;
  padding: var(--space-xs) 0 0;
  flex-wrap: wrap;
}

.nutri-streak[hidden] { display: none; }

.nutri-streak__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 32px;
}

.nutri-streak__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid transparent;
}
.nutri-streak__dot--today   { border-color: var(--color-accent, #7f001f); }

.nutri-streak__lbl {
  font-size: 0.58rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* ── Chips directrices ───────────────────────────────────────────── */
.nutri-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--space-xs);
}

.nutri-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--color-surface-2, rgba(255,255,255,0.07));
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.nutri-chip--warn {
  background: rgba(192,64,64,0.1);
  color: #c04040;
  border-color: rgba(192,64,64,0.25);
}

/* ── Ratio macros barra horizontal ──────────────────────────────── */
.nutri-ratio-bar {
  display: flex;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
  gap: 2px;
}

.nutri-ratio-bar[hidden] { display: none; }

.nutri-ratio-bar__seg {
  border-radius: 99px;
  transition: width 0.3s ease;
}

.nutri-ratio-bar__seg--prot { background: #e07b39; }
.nutri-ratio-bar__seg--carb { background: #5b8dd9; }
.nutri-ratio-bar__seg--fat  { background: #78b04a; }

/* ── Hidratación badge ───────────────────────────────────────────── */
.nutri-overview__badge--hydra { border-top-color: #5bb0d9; }

/* ── Ciclo calórico en viewer ────────────────────────────────────── */
.nutri-cycle-info {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 5px var(--space-md);
  background: var(--color-surface-2, rgba(255,255,255,0.05));
  border-radius: var(--radius-sm, 6px);
  margin-top: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nutri-cycle-info[hidden] { display: none; }

.nutri-cycle-info strong { color: var(--color-text); font-weight: 700; }

/* ── Validación guardar ──────────────────────────────────────────── */
.nutri-save-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm) var(--space-md);
  background: rgba(224,160,64,0.12);
  border-left: 3px solid #e0a040;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--color-text);
}

.nutri-save-warning[hidden] { display: none; }

.nutri-save-warning p { margin: 0; }

/* ── Plantilla rápida btn ────────────────────────────────────────── */
.nutri-template-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* ── Último visto (coach) ────────────────────────────────────────── */
.nutri-last-viewed {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nutri-last-viewed[hidden] { display: none; }

.nutrition-supp-lib__hint {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.nutrition-supp-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.nutrition-supp-picker__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: stretch;
}

.nutrition-supp-picker__toolbar .form__input {
  flex: 1 1 14rem;
  min-width: 0;
}

.nutrition-supp-picker__toolbar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.nutrition-supp-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--color-surface) 92%, var(--color-accent, #5C2430) 4%),
      var(--color-surface)
    );
}

.nutrition-supp-picker__empty {
  margin: 0;
  padding: var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

.nutrition-supp-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.nutrition-supp-group + .nutrition-supp-group {
  padding-top: 0.35rem;
  border-top: 1px solid var(--cm-border-80);
}

.nutrition-supp-group__label {
  margin: 0;
  padding: 0.15rem 0.35rem 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent, #5C2430);
  line-height: 1.35;
}

.nutrition-supp-group__items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.nutrition-supp-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.85rem;
  row-gap: 0;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  background: color-mix(in srgb, var(--color-bg, #E8EAED) 55%, transparent);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
  transition:
    border-color var(--transition-base, 0.2s ease),
    background-color var(--transition-base, 0.2s ease);
}

.nutrition-supp-option:hover,
.nutrition-supp-option:focus-visible {
  border-color: color-mix(in srgb, var(--color-accent, #5C2430) 35%, var(--color-border));
  outline: none;
}

.nutrition-supp-option.is-pending {
  border-color: color-mix(in srgb, var(--color-accent, #5C2430) 55%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent, #5C2430) 8%, var(--color-surface));
}

.nutrition-supp-option.is-assigned {
  opacity: 0.62;
  cursor: default;
}

.nutrition-supp-option__check {
  width: 1rem;
  height: 1rem;
  margin-top: 0.28rem;
  border: 1.5px solid color-mix(in srgb, var(--color-text-muted) 55%, var(--color-border));
  background: transparent;
  flex-shrink: 0;
}

.nutrition-supp-option.is-pending .nutrition-supp-option__check {
  border-color: var(--color-accent, #5C2430);
  background:
    linear-gradient(var(--color-accent, #5C2430), var(--color-accent, #5C2430))
    center / 0.45rem 0.45rem no-repeat;
}

.nutrition-supp-option__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.nutrition-supp-option__name {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nutrition-supp-option__desc {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nutrition-supp-option__badge {
  align-self: start;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent, #5C2430);
  font-weight: 600;
  white-space: nowrap;
}

.nutrition-supp-assigned {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nutrition-supp-assigned__empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: normal;
}

.nutrition-supp-assigned__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.75rem;
}

.nutrition-supp-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 1rem 0.95rem;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--color-surface) 88%, var(--color-accent, #5C2430) 6%),
      var(--color-surface)
    );
  box-sizing: border-box;
  overflow: visible;
}

.nutrition-supp-chip__copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.nutrition-supp-chip__name {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nutrition-supp-chip__desc {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nutrition-supp-chip__remove {
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.nutrition-supp-chip__remove:hover,
.nutrition-supp-chip__remove:focus-visible {
  color: var(--color-accent, #5C2430);
  outline: none;
}

.nutrition-supp-legacy {
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid color-mix(in srgb, var(--color-accent, #5C2430) 55%, transparent);
  background: color-mix(in srgb, var(--color-surface) 90%, #8B8174);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  white-space: pre-wrap;
}

.nutrition-supp-bento {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.nutrition-supp-bento[hidden] {
  display: none !important;
}

.nutrition-supp-bento__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  padding: 1.15rem 1.05rem 1.2rem 1.2rem;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--color-surface) 90%, var(--color-accent, #5C2430) 5%),
      var(--color-surface)
    ),
    linear-gradient(165deg, color-mix(in srgb, var(--color-accent, #5C2430) 12%, transparent), transparent 42%);
  background-origin: border-box;
  overflow: visible;
  box-sizing: border-box;
}

.nutrition-supp-bento__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: color-mix(in srgb, var(--color-accent, #5C2430) 70%, transparent);
}

.nutrition-supp-bento__name {
  display: block;
  margin: 0;
  padding: 0 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nutrition-supp-bento__desc {
  display: block;
  margin: 0;
  padding: 0 0 0 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* PDFs nutricionales — coach upload + cliente download (Bento) */
.nutrition-pdf-uploads {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.35rem 0 0.25rem;
  padding: 1.05rem 1.1rem 1.15rem;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--color-surface) 92%, var(--color-accent, #5C2430) 4%),
      var(--color-surface)
    );
}

.nutrition-pdf-uploads__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.nutrition-pdf-uploads__hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.nutrition-pdf-uploads__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.nutrition-pdf-slot {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.9rem 0.95rem 1rem;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg, #121416) 35%, var(--color-surface));
}

.nutrition-pdf-slot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.nutrition-pdf-slot__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nutrition-pdf-slot__trigger {
  cursor: pointer;
  margin: 0;
}

.nutrition-pdf-slot__status {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.nutrition-pdf-slot__status[data-state="ok"] {
  color: color-mix(in srgb, var(--color-success, #3d8b6e) 85%, var(--color-text));
}

.nutrition-pdf-slot__status[data-state="busy"] {
  color: var(--color-text);
}

.nutrition-pdf-slot__status[data-state="err"] {
  color: color-mix(in srgb, var(--color-accent, #5C2430) 80%, var(--color-text));
}

.nutrition-pdf-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.75rem;
  flex: 1 1 18rem;
  max-width: 42rem;
}

.nutrition-pdf-downloads:empty,
.nutrition-pdf-downloads:not(:has(button:not([hidden]))) {
  display: none;
}

.nutrition-pdf-dl {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 5.25rem;
  padding: 0.95rem 1rem 1rem 1.15rem;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--color-surface) 90%, var(--color-accent, #5C2430) 5%),
      var(--color-surface)
    ),
    linear-gradient(165deg, color-mix(in srgb, var(--color-accent, #5C2430) 12%, transparent), transparent 42%);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
  box-sizing: border-box;
}

.nutrition-pdf-downloads > .btn--primary {
  align-self: stretch;
  min-height: var(--touch-min);
}

.nutrition-pdf-dl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: color-mix(in srgb, var(--color-accent, #5C2430) 70%, transparent);
}

.nutrition-pdf-dl:hover,
.nutrition-pdf-dl:focus-visible {
  border-color: color-mix(in srgb, var(--color-accent, #5C2430) 45%, var(--color-border));
  outline: none;
  transform: translateY(-1px);
}

.nutrition-pdf-dl[hidden] {
  display: none !important;
}

.nutrition-pdf-dl:disabled,
.nutrition-pdf-dl[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.nutrition-pdf-dl__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-accent, #5C2430) 75%, var(--color-text-muted));
}

.nutrition-pdf-dl__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.nutrition-pdf-dl__meta {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .nutrition-supp-picker__toolbar {
    flex-direction: column;
  }

  .nutrition-supp-picker__toolbar .btn {
    width: 100%;
  }

  .nutrition-supp-bento {
    grid-template-columns: 1fr;
  }

  .nutrition-pdf-uploads__grid,
  .nutrition-pdf-downloads {
    grid-template-columns: 1fr;
  }

  .nutrition-pdf-downloads {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .nutrition-viewer__toolbar {
    align-items: stretch;
  }

  .nutrition-viewer__toolbar .nutrition-pdf-downloads {
    width: 100%;
    max-width: none;
  }
}

/* ── _06-nutrition.css ── */
﻿/* ==========================================================================
   Plantillas dinámicas de nutrición (Command Center + vista atleta)
   ========================================================================== */

.meal-plan-cc {
  margin-bottom: var(--space-lg);
}

.meal-plan-cc__header {
  align-items: flex-start;
}

.meal-plan-cc__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.meal-plan-cc__subtitle,
.meal-plan-cc__empty {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.meal-plan-cc__empty {
  margin-top: var(--space-sm);
}

.meal-plan-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meal-plan-form--inline {
  padding: var(--space-md);
  border: 1px solid color-mix(in srgb, #5C2430 16%, var(--color-border));
  background: color-mix(in srgb, #5C2430 4%, var(--color-surface));
}

.meal-plan-form__kcal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.meal-plan-kcal-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #5C2430;
  font-variant-numeric: tabular-nums;
}

/* ── _06-nutrition.css ── */
.meal-plan-kcal-range {
  width: 100%;
  height: 2.25rem;
  margin: 0;
  accent-color: #5C2430;
  cursor: pointer;
  touch-action: pan-x;
}

.meal-plan-kcal-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.meal-plan-restrictions {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.meal-plan-restrictions__hint {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.meal-plan-restrictions__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meal-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
}

.meal-plan-chip input {
  margin: 0;
  accent-color: #5C2430;
}

.meal-plan-chip.is-active {
  border-color: #5C2430;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
}

.meal-plan-chip.is-active input {
  accent-color: #5C2430;
}

.meal-plan-form__feedback {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.meal-plan-form__feedback[data-state="ok"] {
  color: var(--color-success, #2f6b4f);
}

.meal-plan-form__feedback[data-state="err"] {
  color: var(--color-error);
}

.meal-plan-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.meal-plan-preview {
  overflow-x: auto;}

.meal-plan-athlete {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-top: var(--space-sm);
}

.meal-plan-athlete[hidden] {
  display: none !important;
}

.meal-plan-athlete__head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meal-plan-athlete__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.meal-plan-athlete__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.meal-plan-week {
  overflow-x: auto;  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.meal-plan-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.meal-plan-table th,
.meal-plan-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  vertical-align: top;
  text-align: left;
}

.meal-plan-table th:last-child,
.meal-plan-table td:last-child {
  border-right: 0;
}

.meal-plan-table thead th {
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.meal-plan-table tbody th {
  width: 9.25rem;
  background: var(--color-surface-inset);
  color: #5C2430;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: normal;
  line-height: 1.3;
}

.meal-plan-table__food {
  margin: 0 0 0.35rem;
  line-height: 1.35;
  color: var(--color-text);
}

.meal-plan-table__food:last-child {
  margin-bottom: 0;
}

.meal-plan-table__food strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

.meal-plan-table__grams {
  display: inline-block;
  margin-left: 0.25rem;
  font-variant-numeric: tabular-nums;
  color: #5C2430;
  font-weight: 600;
}

.meal-plan-days {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.meal-plan-week .meal-plan-table {
  display: none;
}

/* Próxima toma banner */
.meal-plan-next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.6rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, #5C061D 6%, var(--color-surface));
  border: 1px solid color-mix(in srgb, #5C061D 25%, transparent);
  border-left: 4px solid #5C061D;
}

.meal-plan-next[hidden] { display: none !important; }

.meal-plan-next--late { border-left-color: #a05000; background: color-mix(in srgb, #a05000 6%, var(--color-surface)); }
.meal-plan-next--done { border-left-color: #0a7c4e; background: color-mix(in srgb, #0a7c4e 6%, var(--color-surface)); }

.meal-plan-next__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C061D;
  white-space: nowrap;
}

.meal-plan-next--late .meal-plan-next__label { color: #a05000; }
.meal-plan-next--done .meal-plan-next__label { color: #0a7c4e; }

.meal-plan-next__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.meal-plan-next__foods {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-basis: 100%;
  line-height: 1.4;
}

/* Day accordion (details/summary) */
.meal-plan-day {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: box-shadow 0.15s;
}

.meal-plan-day.is-today {
  border-color: color-mix(in srgb, #5C061D 35%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #5C061D 12%, transparent);
}

.meal-plan-day__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  list-style: none;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meal-plan-day__title::-webkit-details-marker,
.meal-plan-day__title::marker { display: none; }

/* Chevron indicator */
.meal-plan-day__title::before {
  content: '';
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #5C2430;
  border-bottom: 2px solid #5C2430;
  transform: rotate(-45deg);
  transition: transform 0.18s;
  flex-shrink: 0;
  margin-right: 0.1rem;
}

.meal-plan-day[open] > .meal-plan-day__title::before {
  transform: rotate(45deg) translateY(-2px);
}

.meal-plan-day.is-today > .meal-plan-day__title {
  background: color-mix(in srgb, #5C061D 12%, #ffffff);
}

.meal-plan-day__label { flex: 1; }

.meal-plan-day__today-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  background: #5C061D;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meal-plan-day__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  background: color-mix(in srgb, #5C2430 12%, #ffffff);
  color: #5C2430;
}

.meal-plan-day__badge--train {
  background: color-mix(in srgb, #0a5e2a 10%, #ffffff);
  color: #0a5e2a;
}

.meal-plan-day__badge--rest {
  background: color-mix(in srgb, #1a4080 10%, #ffffff);
  color: #1a4080;
}

.meal-plan-day__badge--refeed {
  background: color-mix(in srgb, #a05000 10%, #ffffff);
  color: #a05000;
}

.meal-plan-day__kcal {
  font-size: 0.68rem;
  font-weight: 600;
  color: color-mix(in srgb, #5C2430 70%, var(--color-text-muted));
  margin-left: auto;
}

.meal-plan-day__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #5C2430;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.12s, background 0.12s;
  padding: 0;
}

.meal-plan-day__share-btn:hover { opacity: 1; background: color-mix(in srgb, #5C2430 10%, transparent); }


.meal-plan-day__meal {
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--color-border);
  transition: opacity 0.2s;
}

.meal-plan-meal--done {
  opacity: 0.45;
}

.meal-plan-meal--done .meal-plan-table__food,
.meal-plan-meal--done .meal-plan-day__meal-label {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, #5C2430 40%, transparent);
}

.meal-plan-day__meal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.meal-plan-day__meal-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C2430;
  flex: 1;
}

.meal-plan-meal__done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid color-mix(in srgb, #5C061D 30%, var(--color-border));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.meal-plan-meal__done-btn:hover {
  border-color: #5C061D;
  color: #5C061D;
}

.meal-plan-meal__done-btn.is-done {
  background: #5C061D;
  border-color: #5C061D;
  color: #fff;
}

/* Dark mode overrides */
html[data-theme-mode="dark"] .meal-plan-day__title,
html[data-theme-mode="dark"] .meal-plan-day.is-today > .meal-plan-day__title {
  background: color-mix(in srgb, #5C2430 18%, var(--color-surface));
}

html[data-theme-mode="dark"] .meal-plan-day.is-today {
  border-color: color-mix(in srgb, #e8b4bf 40%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #e8b4bf 10%, transparent);
}

html[data-theme-mode="dark"] .meal-plan-next {
  background: color-mix(in srgb, #5C061D 12%, var(--color-surface));
  border-color: color-mix(in srgb, #e8b4bf 25%, transparent);
  border-left-color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
}

html[data-theme-mode="dark"] .meal-plan-next__label {
  color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
}

html[data-theme-mode="dark"] .meal-plan-day__today-pill {
  background: color-mix(in srgb, #e8b4bf 55%, #5C2430);
}

/* Stats hero */
.meal-plan-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.65rem;
}

.meal-plan-stats[hidden] {
  display: none !important;
}

.meal-plan-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.9rem 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-top: 3px solid #5C061D;
}

.meal-plan-stat__val {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #5C061D;
  line-height: 1;
}

.meal-plan-stat__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

html[data-theme-mode="dark"] .meal-plan-stat {
  border-top-color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
  background: color-mix(in srgb, #5C2430 12%, var(--color-surface));
}

html[data-theme-mode="dark"] .meal-plan-stat__val {
  color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
}

/* Shopping list header with copy button */
.meal-plan-shop__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.meal-plan-shop {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-top: 3px solid #5C061D;
}

html[data-theme-mode="dark"] .meal-plan-shop {
  border-top-color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
  background: color-mix(in srgb, #5C2430 12%, var(--color-surface));
}

.meal-plan-shop__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.meal-plan-shop__hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.meal-plan-shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-md);
}

.meal-plan-shop__cat {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.meal-plan-shop__cat-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
}

.meal-plan-shop__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meal-plan-shop__item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
  font-size: 0.84rem;
  line-height: 1.4;
}

.meal-plan-shop__item:last-child {
  border-bottom: 0;
}

.meal-plan-shop__qty {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #5C2430;
}

.meal-plan-shop__progress {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5C2430;
}

.meal-plan-shop__progress[hidden] {
  display: none !important;
}

.meal-plan-shop__check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.38rem 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}

.meal-plan-shop__check:focus-visible {
  outline: 2px solid #5C2430;
  outline-offset: 2px;
}

.meal-plan-shop__check-mark {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid #5C2430;
  background: transparent;
}

.meal-plan-shop__check-name {
  flex: 1 1 auto;
  min-width: 0;
}

.meal-plan-shop__item.is-bought .meal-plan-shop__check-name,
.meal-plan-shop__item.is-bought .meal-plan-shop__qty {
  color: color-mix(in srgb, #5C2430 35%, #8a8a8a);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, #5C2430 55%, #8a8a8a);
}

.meal-plan-shop__item.is-bought .meal-plan-shop__check-mark {
  background: #5C2430;
  box-shadow: inset 0 0 0 2px var(--color-surface, #fff);
}

.meal-plan-rebound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, #5C2430 32%, var(--color-border));
  background: color-mix(in srgb, #5C2430 8%, var(--color-surface));
}

.meal-plan-rebound[hidden] {
  display: none !important;
}

.meal-plan-rebound__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5C2430;
}

.meal-plan-clinical {
  margin-top: 1.1rem;
  padding: 0.95rem 1.05rem 1.05rem;
  border-top: 2px solid #5C2430;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.meal-plan-clinical[hidden] {
  display: none !important;
}

.meal-plan-clinical__kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5C2430;
}

.meal-plan-clinical__stamp {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text);
}

.meal-plan-clinical__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.meal-plan-cycle {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.meal-plan-cycle__body[hidden] {
  display: none !important;
}

.meal-plan-cycle__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, #5C2430 16%, var(--color-border));
  background: color-mix(in srgb, #5C2430 4%, var(--color-surface));
}

.meal-plan-cycle__days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.meal-plan-cycle__day {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  min-width: 3.2rem;
}

.meal-plan-cycle__day small {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.meal-plan-cycle__day input {
  margin: 0;
  accent-color: #5C2430;
}

.meal-plan-cycle__day.is-active {
  border-color: #5C2430;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
}

.meal-plan-coach-note {
  margin: 0;
}

.meal-plan-coach-note__ack {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.meal-plan-coach-note__ack[data-state="ok"] {
  color: var(--color-success, #2f6b4f);
}

.meal-plan-raw-banner,
.meal-plan-note {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, #5C2430 28%, var(--color-border));
  background: color-mix(in srgb, #5C2430 9%, var(--color-surface));
}

.meal-plan-raw-banner {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  color: #5C2430;
}

.meal-plan-shift {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.meal-plan-safety {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid #5C2430;
  background: color-mix(in srgb, #5C2430 12%, #ffffff);
}

.meal-plan-safety[hidden] {
  display: none !important;
}

.meal-plan-safety__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C2430;
}

.meal-plan-safety__text {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: #5C2430;
}

.meal-plan-note {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.meal-plan-note[hidden] {
  display: none !important;
}

.meal-plan-note__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
}

.meal-plan-note__acked {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-success, #2f6b4f);
}

.meal-plan-note__acked[hidden] {
  display: none !important;
}

.meal-plan-table__daytype {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: color-mix(in srgb, #5C2430 70%, #888);
}

.meal-plan-table__note {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 500;
  font-style: normal;
  color: var(--color-text-muted);
}

.meal-plan-macros {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 9.5rem;
}

.meal-plan-macros[hidden] {
  display: none !important;
}

.meal-plan-macros__ring {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 6px var(--color-surface, #fff);
}

.meal-plan-macros__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.meal-plan-macros__meta strong {
  color: #5C2430;
  font-size: 0.92rem;
}

.meal-plan-opt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.meal-plan-refeed {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.meal-plan-refeed__body[hidden] {
  display: none !important;
}

.meal-plan-refeed__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, #5C2430 16%, var(--color-border));
  background: color-mix(in srgb, #5C2430 4%, var(--color-surface));
}

.meal-plan-refeed__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.55rem 0.75rem;
}

.meal-plan-projector {
  margin: 0.35rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, #5C2430 3%, var(--color-surface));
}

.meal-plan-projector[hidden] {
  display: none !important;
}

.meal-plan-projector__list {
  margin: 0.4rem 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.meal-plan-projector__disclaimer {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.meal-plan-advanced {
  margin: 0.35rem 0 0.6rem;
}

.meal-plan-advanced__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.45rem 0;
}

.meal-plan-advanced__out {
  margin: 0;
  max-height: 12rem;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  white-space: pre-wrap;
}

.meal-plan-advanced__out[hidden] {
  display: none !important;
}

.meal-plan-versions__list {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.meal-plan-versions__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.meal-plan-athlete__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.meal-plan-athlete--flash {
  animation: mealPlanSoftFlash 1.1s ease;
}

@keyframes mealPlanSoftFlash {
  0% { box-shadow: inset 0 0 0 0 transparent; background-color: transparent; }
  25% { background-color: color-mix(in srgb, #5C2430 14%, transparent); }
  100% { background-color: transparent; }
}

html[data-nutrition-a11y="1"] .meal-plan-athlete,
html[data-nutrition-a11y="1"] .meal-plan-form {
  --color-text: #1a0508;
  --color-text-muted: #3a151c;
  --color-border: #5C2430;
  --color-surface: #fff8f9;
}

html[data-nutrition-a11y="1"] .meal-plan-athlete {
  border: 2px solid #5C2430;
  padding: 0.75rem;
}

html[data-nutrition-a11y="1"] .meal-plan-table th,
html[data-nutrition-a11y="1"] .meal-plan-table td,
html[data-nutrition-a11y="1"] .meal-plan-shop__item {
  font-size: 1.02em;
  line-height: 1.55;
}

html[data-nutrition-a11y="1"] .meal-plan-chip.is-active,
html[data-nutrition-a11y="1"] .meal-plan-timing__opt.is-active {
  outline: 2px solid #5C2430;
  outline-offset: 1px;
}


.meal-plan-timing__opt {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 11rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}

.meal-plan-timing__opt.is-active {
  border-color: #5C2430;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
}

.meal-plan-timing__opt input {
  accent-color: #5C2430;
}

.meal-plan-timing__opt small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.meal-plan-exclusions {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.meal-plan-exclusions__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 11rem;
  overflow: auto;
  margin-top: 0.55rem;
}

.meal-plan-hydration {
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, #5C2430 16%, var(--color-border));
  background: color-mix(in srgb, #5C2430 4%, var(--color-surface));
}

.meal-plan-hydration[hidden] {
  display: none !important;
}

.meal-plan-hydration__text {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text);
}

.meal-plan-exchanges {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.35rem 0.85rem 0.85rem;
}

.meal-plan-exchanges[hidden] {
  display: none !important;
}

.meal-plan-exchanges > summary {
  cursor: pointer;
  padding: 0.55rem 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C2430;
}

.meal-plan-exchanges__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.meal-plan-eq {
  margin-top: 0.45rem;
  font-size: 0.75rem;
}

.meal-plan-eq > summary {
  cursor: pointer;
  color: #5C2430;
  font-weight: 600;
}

.meal-plan-eq ul {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
}

/* meal-plan-days is now the default view on all screen sizes */

html[data-theme-mode="dark"] .meal-plan-chip.is-active,
html[data-theme-mode="dark"] .meal-plan-form--inline,
html[data-theme-mode="dark"] .meal-plan-table thead th,
html[data-theme-mode="dark"] .meal-plan-day__title,
html[data-theme-mode="dark"] .meal-plan-cycle__body,
html[data-theme-mode="dark"] .meal-plan-raw-banner,
html[data-theme-mode="dark"] .meal-plan-note,
html[data-theme-mode="dark"] .meal-plan-cycle__day.is-active {
  background: color-mix(in srgb, #5C2430 18%, var(--color-surface));
}

html[data-theme-mode="dark"] .meal-plan-kcal-value,
html[data-theme-mode="dark"] .meal-plan-cc__eyebrow,
html[data-theme-mode="dark"] .meal-plan-table tbody th,
html[data-theme-mode="dark"] .meal-plan-shop__title,
html[data-theme-mode="dark"] .meal-plan-table__grams,
html[data-theme-mode="dark"] .meal-plan-shop__qty,
html[data-theme-mode="dark"] .meal-plan-shop__progress,
html[data-theme-mode="dark"] .meal-plan-raw-banner,
html[data-theme-mode="dark"] .meal-plan-rebound__text,
html[data-theme-mode="dark"] .meal-plan-clinical__kicker {
  color: color-mix(in srgb, #e8b4bf 55%, #5C2430);
}

html[data-theme-mode="dark"] .meal-plan-rebound,
html[data-theme-mode="dark"] .meal-plan-clinical {
  background: color-mix(in srgb, #5C2430 18%, var(--color-surface));
}

html[data-theme-mode="dark"] .meal-plan-shop__item.is-bought .meal-plan-shop__check-name,
html[data-theme-mode="dark"] .meal-plan-shop__item.is-bought .meal-plan-shop__qty {
  color: color-mix(in srgb, #e8b4bf 28%, #8a8a8a);
}

@media (max-width: 640px) {
  .session__table-wrapper {
    max-width: 100%;
    overflow-x: auto;    overscroll-behavior-x: contain;
  }

  .save-status {
    width: 100%;
  }

  .exercise-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .exercise-row__library,
  .exercise-row__combo,
  .exercise-row__input {
    grid-column: 1 / -1;
  }

  .exercise-row__sets {
    grid-column: 1;
    width: 100%;
    min-height: var(--touch-min);
  }

  .exercise-row__block {
    grid-column: 2;
    min-height: var(--touch-min);
    width: 100%;
  }

  .exercise-row__tech-open--icon {
    grid-column: 1;
    justify-self: start;
  }

  .exercise-row__remove {
    grid-column: 2;
    justify-self: end;
  }

  /* Cuaderno: filas como tarjetas táctiles en vertical */
  .session__table-wrapper.logbook__paper {
    background-image: none;
    overflow-x: visible;
    padding: 0.35rem 0.4rem 0.6rem;
  }

  .session__table--notebook thead {
    display: none;
  }

  .session__table--notebook,
  .session__table--notebook tbody {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .session__table--notebook .notebook__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "exercise set"
      "kg reps"
      "rir check"
      "notes notes";
    gap: 0.75rem 0.85rem;
    margin: 0 0 0.95rem;
    padding: 1rem 0.9rem;
    border: 2px solid #3a362f;
    background: var(--color-surface-raised);
    box-shadow: 3px 3px 0 #000;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .session__table--notebook .notebook__row--exercise-start {
    border-color: rgba(201, 154, 62, 0.45);
  }

  .session__table--notebook .notebook__row--focus {
    border-color: var(--color-accent-gold);
    background: #1c1810;
  }

  .session__table--notebook .notebook__row td {
    border: none;
    padding: 0;
    min-width: 0;
  }

  .session__table--notebook .notebook__exercise-cell {
    grid-area: exercise;
    position: static;
    background: none;
    padding-left: 0 !important;
    font-size: 0.95rem;
  }

  .session__table--notebook .notebook__set-cell {
    grid-area: set;
    align-self: center;
    justify-self: end;
    font-size: 1rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-accent-gold-dim);
    color: var(--color-accent-gold);
  }

  .session__table--notebook .notebook__field-cell--weight {
    grid-area: kg;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .session__table--notebook .notebook__field-cell--reps {
    grid-area: reps;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .session__table--notebook .notebook__field-cell--rir {
    grid-area: rir;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .session__table--notebook .notebook__field-cell--notes {
    grid-area: notes;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .session__table--notebook .session__check {
    grid-area: check;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .session__table--notebook .notebook__field-cell::before,
  .session__table--notebook .session__check::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .notebook__exercise-wrap {
    gap: 10px;
    flex-wrap: wrap;
  }

  .notebook__info-btn,
  .notebook__history-btn {
    width: var(--touch-comfortable);
    height: var(--touch-comfortable);
    min-width: var(--touch-comfortable);
    min-height: var(--touch-comfortable);
    font-size: 0.95rem;
  }

  .notebook__checkbox {
    width: var(--touch-comfortable);
    height: var(--touch-comfortable);
    min-width: var(--touch-comfortable);
    min-height: var(--touch-comfortable);
  }

  .notebook__input {
    font-size: 1.85rem !important;
    min-height: var(--touch-comfortable);
    min-width: 64px;
    border: 2px solid #3a362f !important;
    border-bottom-color: rgba(201, 154, 62, 0.55) !important;
    background: var(--color-bg-deep) !important;
    padding: 0.45rem 0.5rem !important;
    touch-action: manipulation;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .notebook__input--notes {
    font-size: 1.05rem !important;
    min-height: var(--touch-comfortable);
    min-width: 0 !important;
    width: 100%;
  }

  .notebook__input:focus {
    border-color: var(--color-accent-gold) !important;
  }

  .notebook__suggest-row td {
    display: block;
    padding: 0 0 0.85rem !important;
    border: none;
  }

  .notebook__suggest {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 0;
    padding: 0.75rem 0.85rem;
  }

  .notebook__suggest-accept {
    width: 100%;
    min-height: 48px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .load-prog {
    margin-bottom: var(--space-lg);
    padding: 0;
  }

  .load-prog__toggle {
    padding: 0.85rem 0.95rem;
  }

  .load-prog__body {
    padding: 0 0.95rem 0.85rem;
  }

  .load-prog__text {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .logbook__nav-hint {
    font-size: 0.78rem;
    margin-bottom: var(--space-lg);
  }

  .session__actions {
    display: flex;
    flex-direction: column;
    gap: var(--touch-gap-gym);
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: var(--space-md);
    padding: 0.75rem 0 max(0.75rem, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent 0%, var(--color-bg) 28%);
  }

  .session__actions .btn {
    width: 100%;
    min-height: var(--touch-gym);
  }

  .session-resume__cta,
  .session__actions #finishSession {
    min-height: var(--touch-gym-cta);
  }

  /* Composición corporal / tablas anchas → tarjetas */

  #bcHistoryTable td:nth-child(1)::before { content: "Fecha"; }
  #bcHistoryTable td:nth-child(2)::before { content: "Peso"; }
  #bcHistoryTable td:nth-child(3)::before { content: "Δ Peso"; }
  #bcHistoryTable td:nth-child(4)::before { content: "% Grasa"; }
  #bcHistoryTable td:nth-child(5)::before { content: "Δ Grasa"; }
  #bcHistoryTable td:nth-child(6)::before { content: "% Músculo"; }
  #bcHistoryTable td:nth-child(7)::before { content: "Cintura"; }
  #bcHistoryTable td:nth-child(8)::before { content: "Pecho"; }
  #bcHistoryTable td:nth-child(9)::before { content: "Brazos"; }
  #bcHistoryTable td:nth-child(10)::before { content: "Piernas"; }
  #bcHistoryTable td:nth-child(11)::before { content: "Notas"; }

  #bcHistoryTable td:nth-child(1),
  #bcHistoryTable td:nth-child(11) {
    grid-column: 1 / -1;
  }

  #weightHistoryTable thead {
    display: none;
  }

  #weightHistoryTable,
  #weightHistoryTable tbody {
    display: block;
    width: 100%;
  }

  #weightHistoryTable tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.85rem 0.75rem;
    margin: 0 0 0.55rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  #weightHistoryTable td {
    border: none;
    padding: 0;
  }

  #weightHistoryTable td[colspan] {
    grid-column: 1 / -1;
  }
}

/* ── _07-runners.css ── */
/* ============================================
   MODO RUNNERS
   ============================================ */

.runners__status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.runners__badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-secondary);
  background: var(--color-bg-deep);
}

.runners__badge[data-state="running"] {
  color: var(--color-text-primary);
  border-color: var(--color-accent-red);
  background: rgba(150, 28, 28, 0.2);
  animation: runners-pulse 1.6s ease-in-out infinite;
}

.runners__badge[data-state="paused"] {
  color: var(--color-accent-gold);
  border-color: var(--color-accent-gold-dim);
}

.runners__badge[data-state="finished"] {
  color: var(--color-success);
  border-color: var(--color-success);
}

.runners__badge[data-state="idle"]::before {
  content: 'GPS · ';
  opacity: 0.55;
  font-size: 0.65em;
}

@keyframes runners-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.runners__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.runners__metrics[data-live="running"],
.runners__metrics[data-live="paused"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .runners__metrics[data-live="running"],
  .runners__metrics[data-live="paused"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.runners__metrics[data-live="idle"] .runners__metric--advanced,
.runners__metrics[data-live="finished"] .runners__metric--advanced {
  display: none;
}

.runners__metric {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 1rem;
}

.runners__metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.runners__metric-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
  color: var(--color-text-primary, #111111);
  letter-spacing: -0.03em;
  text-shadow: none;
}

.runners__metric-unit {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.runners__hint {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  min-height: 1.4em;
}

.runners__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.runners__controls .btn {
  flex: 1 1 140px;
}

/* ── _07-runners.css ── */
.runners__controls--secondary {
  margin-top: var(--space-sm);
}

.runners-activity-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: var(--space-md);
}

.runners-activity-bar__pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--touch-min);
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  color: #111111;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}

.runners-activity-bar__pick:hover,
.runners-activity-bar__pick:focus-visible {
  border-color: #5C2430;
  outline: none;
}

.runners-activity-bar__icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  background: rgba(92, 36, 48, 0.08);
  color: #5C2430;
  font-size: 0.85rem;
  font-weight: 800;
}

.runners-activity-bar__meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1;
  min-width: 0;
}

.runners-activity-bar__label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.runners-activity-bar__value {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.runners-activity-bar__chev {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.runners-sync-chip {
  flex-shrink: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text-muted);
}

.runners-sync-chip[data-state="pending"] {
  color: #A66B3A;
  border-color: rgba(166, 107, 58, 0.45);
}

.runners-sync-chip[data-state="ok"] {
  color: #4F6B5C;
  border-color: rgba(79, 107, 92, 0.45);
}

.runners-sync-chip[data-state="error"] {
  color: #5C2430;
  border-color: rgba(92, 36, 48, 0.4);
}

.runners-map-stage {
  position: relative;
  margin: 0 0 var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  background: #f4f4f5;
  min-height: 360px;
  height: 360px;
}

.runners-map-stage__map,
#runnersLiveMap {
  display: block;
  width: 100%;
  height: 360px;
  min-height: 350px;
  background: #e8e8ea;
  z-index: 0;
}

.runners-map-stage .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 350px;
  font: inherit;
  background: #e8e8ea;
}

.runners-map-stage .leaflet-control-attribution {
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.85);
}

.runners-map-stage .leaflet-control-zoom {
  border: none !important;
  border-radius: 0.85rem !important;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.1);
}

.runners-map-stage .leaflet-control-zoom a {
  width: 2.15rem !important;
  height: 2.15rem !important;
  line-height: 2.15rem !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #5C2430 !important;
  font-weight: 700 !important;
}

.runners-map-stage .leaflet-control-zoom a:hover {
  background: #fff !important;
  color: #111 !important;
}

.runners-map-stage .leaflet-control-zoom-in {
  border-bottom: 1px solid rgba(17, 17, 17, 0.08) !important;
}

.runners-map-pill {
  position: absolute;
  left: 50%;
  bottom: 4.6rem;
  transform: translateX(-50%);
  z-index: 510;
  max-width: calc(100% - 1.6rem);
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 17, 17, 0.1);
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.08);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5C2430;
  text-align: center;
  pointer-events: none;
}

.runners-map-pill[hidden] {
  display: none !important;
}

.runners-gps-quality {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 520;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 17, 17, 0.1);
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.08);
  pointer-events: none;
}

.runners-gps-quality__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.25);
}

.runners-gps-quality[data-quality="good"] .runners-gps-quality__dot {
  background: #4F6B5C;
  box-shadow: 0 0 0 2px rgba(79, 107, 92, 0.28);
}

.runners-gps-quality[data-quality="weak"] .runners-gps-quality__dot {
  background: #C99A3E;
  box-shadow: 0 0 0 2px rgba(201, 154, 62, 0.28);
}

.runners-gps-quality[data-quality="lost"] .runners-gps-quality__dot {
  background: #5C2430;
  box-shadow: 0 0 0 2px rgba(92, 36, 48, 0.28);
}

.runners-gps-quality__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #111111;
}

.runners-map-metrics {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 4.8rem;
  z-index: 500;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 1.15rem;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
  pointer-events: none;
}

.runners-map-livebar {
  position: absolute;
  top: 5.45rem;
  left: 0.85rem;
  right: 0.85rem;
  z-index: 505;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  padding: 0.42rem 0.7rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.05);
  pointer-events: none;
}

.runners-map-livebar__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  min-width: 0;
}

.runners-map-livebar__label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted);
}

.runners-map-livebar__value {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: #111111;
}

.runners-map-livebar__item--muted .runners-map-livebar__value {
  font-size: 0.72rem;
  font-weight: 700;
  color: #5C2430;
}

.runners-map-metrics__cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.runners-map-metrics__label {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted);
}

.runners-map-metrics__value {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  font-weight: 800;
  color: #111111;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.runners-map-metrics__unit {
  font-size: 0.62rem;
  color: var(--color-text-muted);
}

.runners-map-controls {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 500;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
}

.runners-map-controls .btn {
  min-height: 2.65rem;
  min-width: 0;
  border-radius: 0.9rem;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.08);
  transition: flex 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
}

.runners-map-controls[data-state="idle"] .runners-map-controls__start {
  flex: 1 1 auto;
}

.runners-map-controls[data-state="idle"] .runners-map-controls__pause {
  display: none !important;
}

.runners-map-controls[data-state="idle"] .runners-map-controls__finish {
  display: none !important;
}

.runners-map-controls[data-state="running"] .runners-map-controls__start,
.runners-map-controls[data-state="paused"] .runners-map-controls__start,
.runners-map-controls[data-state="finished"] .runners-map-controls__pause {
  display: none !important;
}

.runners-map-controls[data-state="running"] .runners-map-controls__pause,
.runners-map-controls[data-state="paused"] .runners-map-controls__pause {
  display: inline-flex !important;
  flex: 1.5 1 auto;
  min-width: 52%;
  transform: none;
}

.runners-map-controls[data-state="running"] .runners-map-controls__finish,
.runners-map-controls[data-state="paused"] .runners-map-controls__finish {
  flex: 0.5 1 auto;
  min-width: 5.4rem;
  opacity: 0.92;
}

.runners-map-controls[data-state="finished"] .runners-map-controls__start {
  display: inline-flex !important;
  flex: 1 1 auto;
}

.runners-map-controls[data-state="finished"] .runners-map-controls__finish {
  display: none !important;
}

.runners-map-controls__primary.btn--primary {
  background: #5C2430;
  border-color: #5C2430;
  color: #ffffff;
}

.runners-map-controls__primary.btn--primary:hover:not(:disabled),
.runners-map-controls__primary.btn--primary:focus-visible {
  background: #471B24;
  border-color: #471B24;
  color: #ffffff;
}

.runners-map-controls__primary.btn--primary:disabled {
  opacity: 0.55;
}

.runners-map-controls .btn--ghost {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(17, 17, 17, 0.12);
  color: #111111;
}

.runners-success {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.runners-success[hidden] {
  display: none !important;
}

.runners-success__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(17, 17, 17, 0.42);
  cursor: pointer;
}

.runners-success__card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 1.35rem 1.25rem 1.2rem;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
  animation: runners-success-in 0.28s ease;
}

@keyframes runners-success-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0.5; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.runners-success__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5C2430;
}

.runners-success__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.02em;
}

.runners-success__sync {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.runners-success__sync[data-state="ok"] {
  color: #4F6B5C;
}

.runners-success__sync[data-state="pending"] {
  color: #A66B3A;
}

.runners-success__hybrid {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(92, 36, 48, 0.05);
  border: 1px solid rgba(92, 36, 48, 0.14);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #111111;
}

/* ── A. Resumen post-sesión: métricas héroe ────────────────────────────── */

.runners-success__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.5rem;
  margin: 0.85rem 0 0.95rem;
}

.runners-success__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem 0.55rem;
  background: #f7f7f8;
  border-radius: 0.85rem;
  text-align: center;
}

.runners-success__metric--hero {
  grid-column: 1 / -1;
  background: rgba(92, 36, 48, 0.06);
}

.runners-success__metric-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--color-text-muted, #8A8A99);
  margin-bottom: 0.15rem;
}

.runners-success__metric-value {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #111111;
}

.runners-success__metric--hero .runners-success__metric-value {
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: #5C2430;
}

.runners-success__metric-unit {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-muted, #8A8A99);
  margin-top: 0.12rem;
}

/* Splits km a km */
.runners-success__splits {
  margin: 0 0 0.9rem;
}

.runners-success__splits-title {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--color-text-muted, #8A8A99);
  margin: 0 0 0.4rem;
}

.runners-success__splits-scroll {
  overflow-x: auto;}

.runners-success__splits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.runners-success__splits-table th {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted, #8A8A99);
  padding: 0.2rem 0.5rem 0.3rem;
  text-align: left;
  border-bottom: 1px solid rgba(17,17,17,0.07);
}

.runners-success__splits-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(17,17,17,0.05);
  font-variant-numeric: tabular-nums;
  color: #111;
}

.runners-success__splits-table tr:last-child td {
  border-bottom: 0;
}

.runners-success__splits-table td[data-best="1"] {
  color: #4F6B5C;
  font-weight: 700;
}

.runners-success__splits-table td[data-worst="1"] {
  color: #5C2430;
}

/* ── B. HUD: barra de progreso de intervalos ──────────────────────────── */

.runner-hud__progress-wrap {
  margin: 0.6rem 0 0.35rem;
  flex-shrink: 0;
}

.runner-hud__progress-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(17,17,17,0.1);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.runner-hud__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #5C2430;
  border-radius: 3px;
  transition: width 0.5s linear;
}

.runner-hud__progress-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #5C2430;
  text-align: center;
}

#runnerHud[data-runners-night="1"] .runner-hud__progress-bar {
  background: rgba(255,255,255,0.12);
}

#runnerHud[data-runners-night="1"] .runner-hud__progress-fill {
  background: #e8a0aa;
}

#runnerHud[data-runners-night="1"] .runner-hud__progress-label {
  color: #e8a0aa;
}

/* ── C. GPS readiness chip en setup ──────────────────────────────────── */

.runners-gps-ready {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  border-radius: 2rem;
  background: rgba(17,17,17,0.04);
  border: 1px solid rgba(17,17,17,0.08);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary, #555);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.runners-gps-ready__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8A8A99;
  flex-shrink: 0;
  transition: background 0.2s;
}

.runners-gps-ready[data-state="searching"] .runners-gps-ready__dot {
  background: #A66B3A;
  animation: runners-pulse 1s ease-in-out infinite;
}

.runners-gps-ready[data-state="ready"] {
  background: rgba(79, 107, 92, 0.08);
  border-color: rgba(79, 107, 92, 0.25);
  color: #4F6B5C;
}

.runners-gps-ready[data-state="ready"] .runners-gps-ready__dot {
  background: #4F6B5C;
  animation: none;
}

.runners-gps-ready[data-state="weak"] {
  background: rgba(166, 107, 58, 0.07);
  border-color: rgba(166, 107, 58, 0.2);
  color: #A66B3A;
}

.runners-gps-ready[data-state="weak"] .runners-gps-ready__dot {
  background: #A66B3A;
}

/* ── D. Coach: sparkline de tendencia de ritmo ───────────────────────── */

.coach-runners-analytics__sparkline-wrap {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.75rem 0.55rem;
  background: #f7f7f8;
  border-radius: 0.85rem;
  border: 1px solid rgba(17,17,17,0.06);
}

.coach-runners-analytics__sparkline-label {
  margin: 0 0 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--color-text-muted, #8A8A99);
}

.coach-runners-analytics__sparkline {
  display: block;
  width: 100%;
  height: 64px;
}

.runners-elev-chart {
  margin: 0.85rem 0 0.35rem;
  padding: 0.75rem 0.85rem 0.65rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.runners-elev-chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}

.runners-elev-chart__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.runners-elev-chart__stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #111;
}

.runners-elev-chart__stats b {
  font-family: var(--font-heading);
  font-weight: 800;
}

.runners-elev-chart canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.runners-elev-chart--result {
  margin-top: 0.85rem;
}

.runners-mesh-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.65rem 0 0.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(92, 36, 48, 0.04);
  border: 1px solid rgba(92, 36, 48, 0.12);
}

.runners-mesh-status__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #A66B3A;
  flex-shrink: 0;
}

.runners-mesh-status[data-state="active"] .runners-mesh-status__dot {
  background: #4F6B5C;
}

.runners-mesh-status[data-state="peer"] .runners-mesh-status__dot {
  background: #5C2430;
}

.runners-mesh-status__text {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  color: #111;
}

.runners__export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}

.runners__export-row .btn {
  min-height: 2.55rem;
  border-radius: 0.85rem;
}

/* Modo nocturno runners — solo con data-runners-night="1" (opt-in).
   Por defecto: sin forzar negros; el tema global aporta el clínico claro. */
#panelRunners[data-runners-night="1"],
#runnerHud[data-runners-night="1"] {
  --runners-night-bg: #0c0c0d;
  --runners-night-card: #161618;
  --runners-night-text: #f2f2f2;
  --runners-night-muted: #9a9a9e;
  --runners-night-accent: #c45a72;
  --runners-night-border: rgba(255, 255, 255, 0.08);
}

#panelRunners[data-runners-night="1"] .runners__live-card,
#panelRunners[data-runners-night="1"] .runners__setup-card,
#panelRunners[data-runners-night="1"] .runners__result-card {
  background: var(--runners-night-card);
  border-color: var(--runners-night-border);
  color: var(--runners-night-text);
}

#panelRunners[data-runners-night="1"] .card__title,
#panelRunners[data-runners-night="1"] .runners__metric-value,
#panelRunners[data-runners-night="1"] .runners-map-metrics__value,
#panelRunners[data-runners-night="1"] .runners-map-livebar__value {
  color: var(--runners-night-text);
}

#panelRunners[data-runners-night="1"] .runners__metric-label,
#panelRunners[data-runners-night="1"] .runners__metric-unit,
#panelRunners[data-runners-night="1"] .runners-map-metrics__label,
#panelRunners[data-runners-night="1"] .runners-map-livebar__label {
  color: var(--runners-night-muted);
}

#panelRunners[data-runners-night="1"] .runners-map-stage {
  background: #050506;
}

#panelRunners[data-runners-night="1"] .runners-map-metrics,
#panelRunners[data-runners-night="1"] .runners-map-livebar {
  background: rgba(12, 12, 13, 0.88);
  border-color: var(--runners-night-border);
  color: var(--runners-night-text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#panelRunners[data-runners-night="1"] .runners-elev-chart {
  background: var(--runners-night-card);
  border-color: var(--runners-night-border);
  color: var(--runners-night-text);
}

#panelRunners[data-runners-night="1"] .runners-map-controls__primary.btn--primary,
#panelRunners[data-runners-night="1"] .btn--primary {
  background: var(--runners-night-accent);
  border-color: var(--runners-night-accent);
}

#runnerHud[data-runners-night="1"] {
  background: var(--runners-night-bg);
  color: var(--runners-night-text);
}

#runnerHud[data-runners-night="1"] .runner-hud__shell {
  background: var(--runners-night-bg);
  color: var(--runners-night-text);
}

#runnerHud[data-runners-night="1"] .runner-hud__pace,
#runnerHud[data-runners-night="1"] .runner-hud__cell-value {
  color: var(--runners-night-text);
}

#runnerHud[data-runners-night="1"] .runner-hud__label,
#runnerHud[data-runners-night="1"] .runner-hud__cell-label {
  color: var(--runners-night-muted);
}

#runnerHud[data-runners-night="1"] .runner-hud__btn--finish {
  background: var(--runners-night-accent);
  border-color: var(--runners-night-accent);
}

.runners__badge[data-autopaused="1"] {
  background: rgba(166, 107, 58, 0.18);
  color: #A66B3A;
}

.runners-map-livebar__item[data-band="alto"] .runners-map-livebar__value {
  color: #5C2430;
}

.runners-map-livebar__item[data-band="moderado"] .runners-map-livebar__value {
  color: #A66B3A;
}

.runners-map-livebar__item[data-band="bajo"] .runners-map-livebar__value {
  color: #3d6b4f;
}

.runners-heat-legend {
  position: absolute;
  bottom: 4.6rem;
  left: 0.85rem;
  z-index: 505;
  display: flex;
  gap: 0.35rem;
  pointer-events: none;
}

.runners-heat-legend span {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.runners-heat-legend span[data-z="easy"] { color: #3d6b4f; }
.runners-heat-legend span[data-z="tempo"] { color: #A66B3A; }
.runners-heat-legend span[data-z="hard"] { color: #5C2430; }

.coach-mirror {
  margin-top: 1.25rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 1.1rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.coach-mirror__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.coach-mirror__eyebrow {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.coach-mirror__title {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
}

.coach-mirror__meta {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.coach-mirror__map {
  height: 220px;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #e8e8e8;
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.coach-mirror__list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.coach-mirror__athlete {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  background: rgba(92, 36, 48, 0.04);
  border: 1px solid rgba(92, 36, 48, 0.1);
}

.coach-mirror__athlete strong {
  font-size: 0.88rem;
  color: #111;
}

.coach-mirror__athlete span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.coach-mirror__athlete em {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: 0.72rem;
  color: #5C2430;
  font-weight: 700;
}

.runners-bio-sign {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
}

.runners-bio-sign__eyebrow {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.runners-bio-sign__hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.8rem;
  color: #333;
}

.runners-bio-sign__slider {
  display: block;
  margin: 0 0 0.75rem;
}

.runners-bio-sign__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #111;
}

.runners-bio-sign__slider input[type="range"] {
  width: 100%;
  accent-color: #5C2430;
  height: 0.45rem;
}

.runners-bio-sign__thermal,
.runners-bio-sign__segment {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #333;
}

.runners-safety-contacts {
  /* estilos principales en bloque runners-prefs */
}

.runners-safety-contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0.35rem;
}

.runners-climb-rank {
  margin: 0.75rem 0 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.runners-climb-rank__eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.runners-climb-rank__title {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111;
}

.runners-climb-rank__list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: grid;
  gap: 0.3rem;
}

.runners-climb-rank__list li {
  font-size: 0.82rem;
  color: #111;
}

.runners-climb-rank__list li.is-me {
  font-weight: 800;
  color: #5C2430;
}

.runners-climb-rank__empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.runner-ulp {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #000;
  color: #e8e8e8;
  text-align: center;
  padding: 1.5rem;
}

.runner-ulp[hidden] {
  display: none !important;
}

.runner-ulp__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #c45a72;
}

.runner-ulp__clock {
  margin: 0.35rem 0 0;
  font-size: clamp(2.8rem, 12vw, 4.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.runner-ulp__km,
.runner-ulp__pace {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #cfcfcf;
}

.runner-ulp__hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #888;
}

.runner-ulp__actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.runner-ulp__btn {
  min-width: 6.5rem;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid #444;
  background: #111;
  color: #eee;
  font-weight: 700;
}

.runner-ulp__btn--fin {
  border-color: #5C2430;
  background: #5C2430;
}

body.runners-ulp-on,
body.runners-ulp-on * {
  animation: none !important;
  transition: none !important;
}

body.runners-ulp-on #runnersLiveMap,
body.runners-ulp-on .runners-map-stage__map,
body.runners-ulp-on #runnerHud {
  display: none !important;
}

.runners-success__actions .btn {
  width: 100%;
  min-height: 2.85rem;
  border-radius: 0.9rem;
  background: #5C2430;
  border-color: #5C2430;
}

.runners-sheet {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.runners-sheet.is-open {
  pointer-events: auto;
}

.runners-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.runners-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.runners-sheet.is-open .runners-sheet__backdrop {
  opacity: 1;
}

.runners-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 1.35rem 1.35rem 0 0;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 -12px 40px rgba(17, 17, 17, 0.16);
  padding: 0.45rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(18%);
  opacity: 0.65;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.runners-sheet.is-open .runners-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}


@media (prefers-reduced-motion: reduce) {
  .runners-sheet__backdrop,
  .runners-sheet__panel {
    transition: none;
  }
}

.runners-sheet__handle {
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.18);
  margin: 0.25rem auto 0.65rem;
}

.runners-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.runners-sheet__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #111111;
}

.runners-sheet__close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: #111111;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.runners-sheet__search {
  display: block;
  margin-bottom: 0.85rem;
}

.runners-sheet__search-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid var(--color-border);
  background: #ffffff;
  font: inherit;
  color: #111111;
}

.runners-sheet__search-input:focus {
  outline: none;
  border-color: #5C2430;
  box-shadow: 0 0 0 2px rgba(92, 36, 48, 0.18);
}

.runners-sheet__body {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.35rem;}

.runners-sheet__cat {
  margin: 0.55rem 0 0.15rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5C2430;
}

.runners-sheet__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.75rem 0.8rem;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 0.95rem;
  color: #111111;
  cursor: pointer;
}

.runners-sheet__row.is-active {
  border-color: #5C2430;
  box-shadow: inset 0 0 0 1px #5C2430;
}

.runners-sheet__row[hidden] {
  display: none !important;
}

.runners-sheet__row-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  background: rgba(92, 36, 48, 0.07);
  color: #5C2430;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.runners-sheet__row-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.runners-sheet__row-text strong {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
}

.runners-sheet__row-text span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 420px) {
  .runners-map-metrics {
    padding: 0.65rem 0.6rem;
    gap: 0.3rem;
  }

  .runners-map-metrics__value {
    font-size: 1rem;
  }
}

.runners__canvas-wrap {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

#runnersRouteCanvas {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.runners__result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.runners__result-actions .btn {
  flex: 1 1 200px;
}

.runners__save-status {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.runners__save-status--error {
  color: #f5d0c8;
}

/* ── Sticker history ─────────────────────────────────────────────── */
.runners__sticker-history {
  margin-top: var(--space-lg);
}

.runners__sticker-history-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.runners__sticker-history-grid {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: 4px;
}

.sticker-history-item {
  flex: 0 0 auto;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.15s;
}

.sticker-history-item:hover { transform: scale(1.04); }

.sticker-history-item__thumb {
  display: block;
  width: 72px;
  height: 128px;
  object-fit: cover;
}

.sticker-history-item__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 4px 5px;
  background: var(--surface-2, var(--surface));
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ── Sticker preview modal ───────────────────────────────────────── */
.sticker-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9900;
  padding: var(--space-md);
}

.sticker-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-height: 100%;
}

.sticker-modal__img {
  max-height: 60vh;
  max-width: min(360px, 100%);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  object-fit: contain;
}

.sticker-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  width: 100%;
  max-width: 360px;
}

.sticker-modal__btn {
  flex: 1 1 140px;
}

.sticker-modal__customize {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 360px;
}

.sticker-modal__format-row {
  display: flex;
  gap: 6px;
}

.sticker-format-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sticker-format-btn.active {
  background: rgba(92, 6, 29, 0.75);
  border-color: #5C061D;
  color: #fff;
}

.sticker-modal__caption {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 9px 12px;
  resize: none;
  font-family: var(--font-sans, system-ui, sans-serif);
  line-height: 1.4;
}

.sticker-modal__caption::placeholder { color: rgba(255,255,255,0.4); }
.sticker-modal__caption:focus { outline: none; border-color: rgba(255,255,255,0.45); }

.sticker-modal__preview-btn {
  align-self: flex-start;
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
}

.runners__history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.runners__history-intro {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.runners__history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.runners__history-empty {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: var(--space-lg) 0;
  text-align: center;
}

.runners__history-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.runners__history-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.runners__history-thumb {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.runners__history-thumb img,
.runners__history-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.runners__history-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.runners__history-distance {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  line-height: 1;
}

.runners__history-date,
.runners__history-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.runners__history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.btn--sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.75rem;
  min-height: var(--touch-min);
}

.runners__metric--hero {
  grid-column: 1 / -1;
  background: #ffffff;
  border-color: rgba(92, 36, 48, 0.18);
}

.runners__metric--kcal {
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.04);
}

.runners__metric--hero .runners__metric-value {
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  color: #111111;
  text-shadow: none;
}

.runners__zone-value[data-zone="z1"],
.runners__zone-value[data-zone="z2"] { color: #4F6B5C; }
.runners__zone-value[data-zone="z3"] { color: #A66B3A; }
.runners__zone-value[data-zone="z4"],
.runners__zone-value[data-zone="z5"] { color: #5C2430; }

.runners__setup-intro {
  font-size: var(--text-support);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-sm);
  line-height: 1.45;
}

.runners__setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.runners-prefs-gear {
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 0;
  background: #5C2430;
  color: #ffffff;
  cursor: pointer;
  padding: 0.75rem;
  box-shadow: 0 4px 14px rgba(92, 36, 48, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.runners-prefs-gear:hover,
.runners-prefs-gear:focus-visible {
  background: #471B24;
  box-shadow: 0 6px 18px rgba(92, 36, 48, 0.36);
  outline: none;
}

.runners-prefs-gear:active {
  transform: scale(0.96);
}

.runners-prefs-gear__icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.runners-prefs-gear__badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1.5px #5C2430;
  pointer-events: none;
}

.runners-prefs-gear__badge[hidden] {
  display: none !important;
}

.runners-session-tabs,
.runners-session-tabs--chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin-bottom: var(--space-md);
  overflow-x: auto;  scrollbar-width: none;
  padding: 0.1rem 0.15rem 0.35rem 0.15rem;
  padding-right: 1.75rem;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(to right, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 78%, transparent 100%);
}

.runners-session-tabs::-webkit-scrollbar,
.runners-session-tabs--chips::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.runners-session-tab {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 4.6rem;
  min-height: 2.65rem;
  padding: 0.45rem 0.85rem;
  text-align: left;
  background: #f3f3f4;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  color: #333333;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.runners-session-tab.is-active {
  background: #5C2430;
  border-color: #5C2430;
  color: #ffffff;
  box-shadow: none;
}

.runners-session-tab__eyebrow {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
  font-weight: 700;
}

.runners-session-tab.is-active .runners-session-tab__eyebrow {
  opacity: 0.85;
  color: rgba(255, 255, 255, 0.88);
}

.runners-session-tab__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.1;
  color: inherit;
}

/* Idle: priorizar chips → mapa → Iniciar */
.runners__metrics[data-live="idle"] {
  display: none;
}

.runners__live-card:has(#runnersMapControls[data-state="idle"]) .runners-map-livebar,
.runners__live-card:has(#runnersMapControls[data-state="idle"]) .runners-heat-legend,
.runners__live-card:has(#runnersMapControls[data-state="idle"]) .runners-elev-chart {
  display: none;
}

/* Legacy aliases if any JS still references grid cards */

.runners-session-opt.is-active {
  border-color: #5C2430;
  box-shadow: inset 0 0 0 1px #5C2430;
}

.runners-session-config {
  margin: 0.25rem 0 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.95rem;
  background: #f7f7f8;
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.runners-session-config__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5C2430;
  margin: 0 0 0.5rem;
}

.runners-session-config__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.runners-test-chips,
.runners-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.runners-chip {
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0 0.95rem;
  border: 1px solid var(--color-border);
  background: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  color: #111;
  cursor: pointer;
}

.runners-chip.is-active {
  border-color: #5C2430;
  color: #5C2430;
}

.runners-analytics,
.runners-nutrition,
.runners-gear-finish {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: #ffffff;
  border: 1px solid var(--color-border);
  color: #111111;
}

.runners-analytics__eyebrow,
.runners-nutrition__eyebrow,
.runners-gear-finish__title {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5C2430;
}

.runners-analytics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.runners-analytics__label,
.runners-analytics__unit {
  display: block;
  font-size: 0.68rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.runners-analytics__value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: #111;
  line-height: 1.1;
}

.runners-analytics__alert {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #5C2430;
}

.runners-analytics__alert[data-ok="true"] {
  color: #4F6B5C;
}

.runners-splits {
  margin-top: var(--space-md);
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--color-border);
}

.runners-splits__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5C2430;
}

.runners-splits__table-wrap {
  overflow-x: auto;  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 1rem;
  background: #ffffff;
}

.runners-splits__table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.runners-splits__table th,
.runners-splits__table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.runners-splits__table th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
  background: #fafafa;
}

.runners-splits__table td {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #111111;
}

.runners-splits__table tr:last-child td {
  border-bottom: 0;
}

.runners-splits__empty {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.runner-pocket-lock {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  /* Sin backdrop-filter: en iOS Safari, blur en position:fixed full-screen
     durante gestos táctiles activos puede congelar el scroll (mismo patrón
     evitado en .nlm-nav — línea ~34704). El fondo opaco cumple la función visual. */
  touch-action: none;
  user-select: none;
}

.runner-pocket-lock[hidden] {
  display: none !important;
}

.runner-pocket-lock__card {
  text-align: center;
  max-width: 260px;
  padding: 1.25rem 1.1rem;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 1.15rem;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.1);
}

.runner-pocket-lock__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: #5C2430;
}

.runner-pocket-lock__hint {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #111111;
}

.runner-pocket-lock__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.runners-nutrition__text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #222222;
}

.runners-gear-finish__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.runners-gear-finish__hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #444444;
}

.runners-gear-drawer {
  margin-top: var(--space-md);
  padding: 0;
  overflow: hidden;
}

.runners-gear-drawer__summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
  padding: 1rem 1.1rem;
  min-height: var(--touch-min);
  user-select: none;
}

.runners-gear-drawer__summary::-webkit-details-marker {
  display: none;
}

.runners-gear-drawer__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: #111111;
}

.runners-gear-drawer__hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.runners-gear-drawer__body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--color-border);
}

.runners__history-card-wrap {
  margin-top: var(--space-lg);
}

.runners-gear-form {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: var(--space-md);
}

.runners-gear-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.runners-gear-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border);
  background: #fff;
}

.runners-gear-item__name {
  font-weight: 800;
  color: #111;
}

.runners-gear-item__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.runners-gear-item__bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #EEE;
  overflow: hidden;
}

.runners-gear-item__bar > span {
  display: block;
  height: 100%;
  background: #4F6B5C;
}

.runners-gear-item[data-wear="warn"] .runners-gear-item__bar > span { background: #A66B3A; }
.runners-gear-item[data-wear="replace"] .runners-gear-item__bar > span { background: #5C2430; }

.runners-gear-item__km {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.85rem;
}

.nutrition-run-recovery {
  margin-bottom: var(--space-lg);
  border-color: rgba(92, 36, 48, 0.22);
}

.nutrition-run-recovery__text {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-primary);
}

/* HUD inmersivo — blanco puro, cifras gigantes, acento #5C2430 */
.runner-hud {
  position: fixed;
  top: var(--vv-offset-top, 0px);
  left: 0;
  right: 0;
  z-index: 12000;
  display: flex;
  background: #ffffff;
  color: #111111;
  overscroll-behavior: none;
  height: var(--vv-height, 100dvh);
  max-height: var(--vv-height, 100dvh);
}

.runner-hud[hidden] {
  display: none !important;
}

.runner-hud__shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding:
    max(14px, var(--safe-top))
    max(18px, var(--safe-right))
    max(16px, var(--safe-bottom))
    max(18px, var(--safe-left));
  box-sizing: border-box;
}

.runner-hud__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.runner-hud__type {
  flex: 1;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #5C2430;
}

.runner-hud__badge,
.runner-hud__wake {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.28rem 0.5rem;
  border: 1px solid #111;
}

.runner-hud__badge[data-state="running"] {
  color: #5C2430;
  border-color: #5C2430;
}

.runner-hud__badge[data-state="paused"] {
  color: #A66B3A;
  border-color: #A66B3A;
}

.runner-hud__wake[data-on="true"] {
  color: #4F6B5C;
  border-color: #4F6B5C;
}

.runner-hud__block {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #5C2430;
  background: #fff;
}

.runner-hud__block[data-phase="recover"] {
  border-color: #4F6B5C;
}

.runner-hud__block-phase {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #5C2430;
}

.runner-hud__block[data-phase="recover"] .runner-hud__block-phase {
  color: #4F6B5C;
}

.runner-hud__block-meta {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: #555;
}

.runner-hud__hero {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  text-align: center;
}

.runner-hud__label {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5C2430;
}

.runner-hud__pace {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(3.6rem, 16vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
  color: #111111;
}

.runner-hud__pace-unit {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
}

.runner-hud__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  flex-shrink: 0;
}

.runner-hud__cell {
  text-align: center;
  padding: 0.45rem 0.15rem;
}

.runner-hud__cell-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
  font-weight: 700;
}

.runner-hud__cell-value {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.05rem, 4.2vw, 1.45rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: #111;
  line-height: 1;
}

.runner-hud__zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.7rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.runner-hud__zone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4F6B5C;
}

.runner-hud__zone[data-zone="z3"] .runner-hud__zone-dot { background: #A66B3A; }
.runner-hud__zone[data-zone="z4"] .runner-hud__zone-dot,
.runner-hud__zone[data-zone="z5"] .runner-hud__zone-dot { background: #5C2430; }

/* Preferencias Bento · toggles de marca (dentro del bottom sheet) */
.runners-prefs-sheet .runners-prefs-sheet__panel {
  max-height: min(88vh, 720px);
  overflow: hidden;
}

.runners-prefs.runners-prefs--sheet {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-y: auto;  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0.35rem;
}

.runners-prefs {
  margin-top: 1rem;
  padding: 0.9rem 0.95rem 0.85rem;
  border-radius: 1.15rem;
  background: #f7f7f8;
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.runners-prefs__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.25rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.runners-prefs__tab {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 0.7rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.runners-prefs__tab.is-active {
  background: #fff;
  color: #5C2430;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.06);
}

.runners-prefs__panel {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
}

.runners-prefs__panel.is-active {
  display: flex;
}

.runners-prefs__section-label {
  margin: 0.55rem 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.runners-prefs__status {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.runners-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  margin: 0;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.05);
  cursor: pointer;
}

.runners-switch + .runners-switch {
  margin-top: 0.35rem;
}

.runners-switch__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.runners-switch__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.25;
}

.runners-switch__desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #6b7280;
}

.runners-switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.runners-switch__track {
  position: relative;
  width: 2.75rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #d4d4d8;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.runners-switch__thumb {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.18);
  transition: transform 0.18s ease;
}

.runners-switch__input:checked + .runners-switch__track {
  background: #5C2430;
}

.runners-switch__input:checked + .runners-switch__track .runners-switch__thumb {
  transform: translateX(1.2rem);
}

.runners-switch__input:focus-visible + .runners-switch__track {
  outline: 2px solid rgba(92, 36, 48, 0.35);
  outline-offset: 2px;
}

.runners-safety-contacts {
  margin-top: 0.55rem;
  padding: 0.75rem 0.8rem 0.7rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.runners-safety-contacts .form__label {
  margin-top: 0.45rem;
}

#panelRunners[data-runners-night="1"] .runners-prefs,
#runnersPrefsSheet[data-runners-night="1"] .runners-prefs {
  background: #121214;
  border-color: rgba(255, 255, 255, 0.08);
}

#panelRunners[data-runners-night="1"] .runners-switch__title,
#runnersPrefsSheet[data-runners-night="1"] .runners-switch__title {
  color: #f2f2f2;
}

#panelRunners[data-runners-night="1"] .runners-switch,
#panelRunners[data-runners-night="1"] .runners-safety-contacts,
#panelRunners[data-runners-night="1"] .runners-prefs__tabs,
#runnersPrefsSheet[data-runners-night="1"] .runners-switch,
#runnersPrefsSheet[data-runners-night="1"] .runners-safety-contacts,
#runnersPrefsSheet[data-runners-night="1"] .runners-prefs__tabs {
  background: #1a1a1c;
  border-color: rgba(255, 255, 255, 0.06);
}

#panelRunners[data-runners-night="1"] .runners-prefs__tab.is-active,
#runnersPrefsSheet[data-runners-night="1"] .runners-prefs__tab.is-active {
  background: #222;
  color: #c45a72;
}

.runner-hud__elev {
  flex-shrink: 0;
  margin: 0.35rem 0 0.15rem;
  padding: 0.4rem 0.5rem 0.5rem;
  border: 1px solid rgba(92, 36, 48, 0.18);
  background: #fff;
}

.runner-hud__elev[data-grade="climb"] {
  border-color: #5C2430;
}

.runner-hud__elev[data-grade="down"] {
  border-color: #4F6B5C;
}

#runnerHudElevCanvas {
  display: block;
  width: 100%;
  height: 44px;
}

.runner-hud__elev-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.7rem;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
}

.runner-hud__elev-item b {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #111;
  text-transform: none;
}

.runner-hud__elev[data-grade="climb"] .runner-hud__elev-item b {
  color: #5C2430;
}

.runner-hud__fuel {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  margin: 0.25rem 0 0.2rem;
  padding: 0.4rem 0.55rem;
  border: 1px dashed rgba(92, 36, 48, 0.35);
  font-size: 0.72rem;
}

.runner-hud__fuel[hidden] {
  display: none !important;
}

.runner-hud__fuel-label {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
}

.runner-hud__fuel-next {
  color: #333;
}

.runner-hud__cue {
  min-height: 1.2em;
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.8rem;
  color: #555;
}

.runner-hud__controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  flex-shrink: 0;
}

.runner-hud__btn {
  min-height: 52px;
  min-width: 0;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  cursor: pointer;
}

.runner-hud__btn--pause {
  background: #111;
  color: #fff;
}

.runner-hud__btn--finish {
  border-color: #5C2430;
  color: #5C2430;
}

/* HUD clínico claro por defecto; el tema global oscuro NO debe invertirlo.
   Solo data-runners-night="1" (Noche automática / Forzar nocturna) activa OLED. */
#runnerHud:not([data-runners-night="1"]),
html[data-theme-mode="dark"] #runnerHud:not([data-runners-night="1"]) {
  background: #ffffff !important;
  color: #111111 !important;
}

#runnerHud[data-runners-night="1"],
html[data-theme-mode="dark"] #runnerHud[data-runners-night="1"] {
  background: var(--runners-night-bg, #0c0c0d) !important;
  color: var(--runners-night-text, #f2f2f2) !important;
}

#runnerHud[data-runners-night="1"] .runner-hud__shell {
  background: var(--runners-night-bg, #0c0c0d) !important;
  color: var(--runners-night-text, #f2f2f2) !important;
}

@media (max-width: 640px) {
  .runners__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runners__metric--hero {
    grid-column: 1 / -1;
  }

  .runners__history-grid {
    grid-template-columns: 1fr;
  }

  .runners-analytics__grid,
  .runners-gear-finish__row,
  .runners-gear-form,
  .runner-hud__grid {
    grid-template-columns: 1fr 1fr;
  }

  .runners-gear-form,
.runners-session-config__grid {
    grid-template-columns: 1fr;
  }

  .runner-hud__pace {
    font-size: clamp(2.6rem, 18vw, 5.2rem);
  }
}

@media (max-width: 380px) {
  .runner-hud__controls {
    grid-template-columns: 1fr 1fr;
  }

  .runner-hud__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── _08-welcome-profile.css ── */
﻿/* ============================================
   SECTION: Welcome / Landing Home
   ============================================ */

.welcome {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.35rem, 4.5vw, 2.1rem) 0 var(--space-2xl);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Flujo vertical: saludo → hero Sesiones → semáforo → chips → guía → mascota → acción → check-in */
.welcome__greeting { order: 1; }
.welcome-hero { order: 2; }
.readiness-widget { order: 3; }
.welcome-chips { order: 4; }
.welcome-onboarding { order: 5; }
.welcome-command { order: 7; }
.coach-tower { order: 7; }
.habits { order: 8; }
.precision { order: 8; }
.constancy { order: 9; }
.welcome__grid { order: 10; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Zona Hero animada — fondo + logo marca
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.welcome__hero-zone {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 1.5rem var(--space-sm) 1.35rem;
  border-radius: 24px;
  overflow: hidden;
  /* Fondo base negro-vino profundo */
  background: #0e0407;
  color: #fff;
  /* Variables locales para que hijos hereden colores para fondo oscuro */
  --color-text-primary: #f5f0ee;
  --color-text-secondary: rgba(245, 240, 238, 0.72);
  --color-text-muted: rgba(245, 240, 238, 0.45);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-surface: rgba(255, 255, 255, 0.07);
  --color-accent-gold: #e8c87a;
}

/* ── Capa 1: orbe vino grande que flota lento ── */
.welcome__hero-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Orbe principal vino — translada diagonal */
  background:
    radial-gradient(ellipse 70% 55% at 30% 30%, rgba(92, 36, 48, 0.90) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(140, 28, 48, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 10% 85%, rgba(60, 12, 24, 0.80) 0%, transparent 65%);
  animation: orbeFloat 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* ── Capa 2: destello superior + chispa ── */
.welcome__hero-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 30% at 75% 12%, rgba(220, 80, 80, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 25% 20% at 18% 20%, rgba(255,200,180,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 25% at 55% 95%, rgba(80, 10, 25, 0.70) 0%, transparent 70%);
  animation: chispaFloat 5s ease-in-out infinite alternate-reverse;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbeFloat {
  0%   { transform: translate(0px, 0px)   scale(1);    opacity: 1; }
  33%  { transform: translate(18px, -12px) scale(1.06); opacity: 0.92; }
  66%  { transform: translate(-10px, 20px) scale(0.96); opacity: 1; }
  100% { transform: translate(22px, 8px)  scale(1.04); opacity: 0.88; }
}

@keyframes chispaFloat {
  0%   { transform: translate(0px, 0px)   scale(1);    opacity: 0.8; }
  40%  { transform: translate(-20px, 14px) scale(1.08); opacity: 1; }
  70%  { transform: translate(12px, -18px) scale(0.94); opacity: 0.75; }
  100% { transform: translate(-8px, 22px) scale(1.05); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__hero-zone::before,
  .welcome__hero-zone::after {
    animation: none;
  }
}

.welcome__hero-zone > * {
  position: relative;
  z-index: 1;
}

/* Marca NULLUM integrada */
.welcome__zone-brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.85rem;
  padding: 0;
}

.welcome__zone-wordmark {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(245, 240, 238, 0.95);
  line-height: 1;
}

/* Saludo dentro de la zona — sin border-left oscuro, usa borde translúcido */
.welcome__hero-zone .welcome__greeting {
  margin: 0 0 1rem;
  padding: 0 0 0 0.85rem;
  border-left-color: rgba(255, 255, 255, 0.28);
}

/* Hero card dentro de la zona — glassmorphism */
.welcome__hero-zone .welcome-hero {
  width: 100%;
  margin: 0 0 0.9rem;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}

.welcome__hero-zone .welcome-hero:hover,
.welcome__hero-zone .welcome-hero:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 36px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

/* Readiness widget dentro de la zona */
.welcome__hero-zone .readiness-widget {
  margin: 0 0 0.9rem;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Chips dentro de la zona */
.welcome__hero-zone .welcome-chips {
  margin: 0;
}

.welcome__hero-zone .welcome-chips__chip {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(245, 240, 238, 0.9);
  box-shadow: none;
}

.welcome__hero-zone .welcome-chips__chip:hover,
.welcome__hero-zone .welcome-chips__chip:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Torre de control · Inicio Entrenador */
.coach-tower {
  --tower-wine: var(--color-accent, #5C2430);
  /* Cream/card fijos — no enlazar a surface-raised (rompe en dark). */
  --tower-cream: #F3EEE9;
  --tower-card: #FFFCFA;
  --tower-panel: color-mix(in srgb, var(--color-surface) 88%, var(--tower-wine) 12%);
  --tower-panel-edge: color-mix(in srgb, var(--tower-wine) 28%, var(--color-border));
  --tower-ink: var(--color-text-primary);
  --tower-muted: var(--color-text-muted);
  margin: 0.15rem var(--space-sm) var(--space-xl);
  padding: 0;
}

.coach-tower[hidden] {
  display: none !important;
}

.coach-tower__header {
  margin: 0 0 0.85rem;
  padding: 0 0.15rem;
}

.coach-tower__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tower-wine);
}

.coach-tower__title {
  margin: 0 0 0.2rem;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 3.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

/* ── _08-welcome-profile.css ── */
.coach-tower__meta {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.coach-cc-today__btn {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--color-layer-hairline, rgba(20, 22, 24, 0.06));
  border-radius: 10px;
  background: var(--tower-cream, #F7F8FA);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.coach-cc-today__btn:hover,
.coach-cc-today__btn:focus-visible {
  border-color: color-mix(in srgb, var(--tower-wine) 35%, var(--color-border));
  outline: none;
}

.coach-cc-today__num {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--tower-wine);
  margin-top: 0.1rem;
}

.coach-cc-today__copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.coach-cc-today__copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.coach-cc-today__copy span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.coach-tower__filter.is-active {
  color: #fff;
  background: var(--tower-wine);
  border-color: var(--tower-wine);
}

.coach-tower__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

/* Panel cliente: cáscara + contenido + barra de acciones */
.coach-tower__item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--tower-panel-edge, var(--color-border));
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tower-wine) 10%, transparent), transparent 42%),
    var(--tower-panel, var(--color-surface));
  box-shadow: 0 10px 28px rgba(10, 6, 8, 0.18);
  overflow: hidden;
  animation: coach-tower-in 420ms ease both;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.coach-tower__item:hover,
.coach-tower__item:focus-within {
  border-color: color-mix(in srgb, var(--tower-wine) 55%, var(--color-border));
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(92, 36, 48, 0.18);
}

.coach-tower__item--critical { border-left: 3px solid #C45B6A; }
.coach-tower__item--review,
.coach-tower__item--warn { border-left: 3px solid var(--color-accent-gold, #8B5A3A); }
.coach-tower__item--nodata { border-left: 3px solid #8A7A72; }
.coach-tower__item--stable,
.coach-tower__item--ok { border-left: 3px solid var(--color-success, #2F6B5E); }

.coach-tower__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0.9rem 0.9rem 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tower-ink, var(--color-text-primary));
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.coach-tower__detail {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--tower-muted, var(--color-text-muted));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coach-tower__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.05rem 0 0;
}

.coach-tower__metric {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tower-wine) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--tower-wine) 14%, transparent);
}

.coach-tower__metric-k {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tower-muted, var(--color-text-muted));
}

.coach-tower__metric-v {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tower-ink, var(--color-text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-tower__card:hover,
.coach-tower__card:focus-visible {
  outline: none;
}

.coach-tower__card:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tower-wine) 55%, transparent);
}

.coach-tower__card:active {
  transform: none;
}

.coach-tower__card-top {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.coach-tower__name-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.coach-tower__name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--tower-ink, var(--color-text-primary));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coach-tower__unread {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--tower-wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tower-wine) 22%, transparent);
}

.coach-tower__checkin {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  background: color-mix(in srgb, var(--tower-wine) 14%, transparent);
  color: var(--tower-ink, var(--color-text-primary));
}

.coach-tower__checkin--critical {
  background: color-mix(in srgb, #C45B6A 16%, transparent);
  border-color: color-mix(in srgb, #C45B6A 35%, transparent);
  color: #8E2F3C;
}
.coach-tower__checkin--review,
.coach-tower__checkin--warn {
  background: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 14%, transparent);
  border-color: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 35%, transparent);
  color: #6E3F24;
}
.coach-tower__checkin--nodata {
  background: color-mix(in srgb, var(--tower-muted, #6B6058) 12%, transparent);
  border-color: color-mix(in srgb, var(--tower-muted, #6B6058) 28%, transparent);
  color: var(--tower-muted, #6B6058);
}
.coach-tower__checkin--stable,
.coach-tower__checkin--ok {
  background: color-mix(in srgb, var(--color-success, #2F6B5E) 14%, transparent);
  border-color: color-mix(in srgb, var(--color-success, #2F6B5E) 35%, transparent);
  color: #1F4F45;
}

#screenDashboard.dashboard--shell .coach-tower__checkin--critical { color: #F3D0D5; }
#screenDashboard.dashboard--shell .coach-tower__checkin--review,
#screenDashboard.dashboard--shell .coach-tower__checkin--warn { color: #E8C9AE; }
#screenDashboard.dashboard--shell .coach-tower__checkin--nodata { color: #C9BDB4; }
#screenDashboard.dashboard--shell .coach-tower__checkin--stable,
#screenDashboard.dashboard--shell .coach-tower__checkin--ok { color: #B7D9CF; }

.coach-tower__card-cta {
  margin-top: 0.15rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tower-wine) 70%, #fff);
}

.coach-tower__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--tower-wine) 18%, transparent);
  background: color-mix(in srgb, #0A0608 55%, transparent);
}

.coach-tower__empty {
  margin: 0.35rem 0 0;
  padding: 1.1rem 0.9rem;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  text-align: center;
}

.coach-tower__empty[hidden] {
  display: none !important;
}

/* Command Center · bento cartera */
.coach-cc {
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(92, 36, 48, 0.06), transparent 55%),
    var(--tower-cream, #F7F8FA);
  border: 1px solid rgba(92, 36, 48, 0.12);
}

.coach-cc[hidden] { display: none !important; }

.coach-cc__head { margin: 0 0 0.75rem; }

.coach-cc__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C2430;
  font-weight: 700;
}

.coach-cc__title {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
}

.coach-cc__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted, #667085);
}

.coach-cc__bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.coach-cc__tile {
  margin: 0;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: var(--tower-card, #fff);
  border: 1px solid rgba(15, 23, 42, 0.06);
  min-height: 4.5rem;
}

.coach-cc__tile--alerts.is-hot {
  border-color: rgba(92, 36, 48, 0.35);
  box-shadow: inset 3px 0 0 #5C2430;
}

.coach-cc__tile-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #667085);
}

.coach-cc__tile-value {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #5C2430;
  line-height: 1.15;
}

.coach-cc__tile-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted, #667085);
  line-height: 1.35;
}

.coach-cc__alerts {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 6.5rem;
  overflow: auto;
}

.coach-cc__alert {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #471B24;
}

@media (min-width: 720px) {
  .coach-cc__bento {
    grid-template-columns: repeat(4, 1fr);
  }
}

@keyframes coach-tower-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coach-tower__card {
    animation: none;
    transition: none;
  }
  .coach-tower__card:hover,
  .coach-tower__card:focus-visible {
    transform: none;
  }
}

/* Coach: Inicio = torre de control (sin métricas personales) */
.dashboard[data-role="trainer"] #habitsWidget,
.dashboard[data-role="trainer"] #precisionWidget,
.dashboard[data-role="trainer"] #constancyWidget,
.dashboard[data-role="trainer"] #welcomeToday,
.dashboard[data-role="trainer"] #welcomeGrid,
.dashboard[data-role="trainer"] #welcomeCommand,
.dashboard[data-role="trainer"] #welcomeHeroSession,
.dashboard[data-role="trainer"] #welcomeOnboarding {
  display: none !important;
}

.dashboard[data-role="member"] #coachTower {
  display: none !important;
}

.dashboard[data-role="trainer"] .welcome__hello {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-command {
  margin: 0.35rem var(--space-sm) var(--space-md);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.welcome-command[hidden] {
  display: none !important;
}

.welcome-command__cta {
  width: 100%;
  min-height: var(--touch-gym, 56px);
  padding: 0.95rem 1.25rem;
  border: 0;
  border-radius: var(--radius-md);
  background: #5C2430;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.welcome-command__cta:hover,
.welcome-command__cta:focus-visible {
  background: #471B24;
  color: #fff;
}

.welcome-command__cta:active {
  background: #341318;
}

/* Saludo en contenido: solo escritorio (topbar oculto ≥1024px) */
.welcome__greeting {
  text-align: left;
  margin: 0 var(--space-sm) 1rem;
  padding: 0.15rem 0 0 0.9rem;
  border-bottom: none;
  border-left: 3px solid #5C2430;
}

.welcome__greeting--desktop {
  display: none;
}

@media (min-width: 1024px) {
  .welcome__greeting--desktop {
    display: block;
  }
}

.welcome__hello {
  font-family: var(--font-heading);
  font-weight: var(--weight-display);
  font-size: clamp(1.3rem, 4.2vw, 1.65rem);
  letter-spacing: var(--track-title);
  line-height: var(--leading-tight);
  text-transform: none;
  color: var(--color-text-primary);
  margin: 0;
}

.welcome__role {
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.welcome__next {
  margin: 0.55rem 0 0;
  max-width: 28rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.welcome__next[hidden] {
  display: none !important;
}

/* ——— Hero Sesiones / Empezar ——— */
.welcome-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: calc(100% - 2 * var(--space-sm));
  margin: 0.15rem var(--space-sm) 1rem;
  padding: 1.25rem 1.35rem;
  min-height: 5.5rem;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #6E2A39 0%, #5C2430 55%, #481C28 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 32px rgba(92, 36, 48, 0.30), inset 0 1px 0 rgba(255,255,255,0.10);
  animation: welcomeCardIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.welcome-hero:hover,
.welcome-hero:focus-visible {
  background: linear-gradient(135deg, #5C2230 0%, #471B24 55%, #3B1620 100%);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(92, 36, 48, 0.38), inset 0 1px 0 rgba(255,255,255,0.12);
}

.welcome-hero:active {
  transform: scale(0.985);
  box-shadow: 0 6px 16px rgba(92, 36, 48, 0.22);
}

.welcome-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.welcome-hero__label {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 3.4vw, 1.28rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
}

.welcome-hero__hint {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.78;
  line-height: 1.3;
}

.welcome-hero__cta {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

/* ——— Semáforo de Preparación ——— */
.readiness-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0.75rem var(--space-sm) 1.1rem;
  padding: 1.2rem 1.5rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  transition: background 0.3s;
}
.readiness-widget[data-score="high"] { background: rgba(39,174,96,0.15); border-color: rgba(39,174,96,0.3); }
.readiness-widget[data-score="mid"]  { background: rgba(243,156,18,0.15); border-color: rgba(243,156,18,0.3); }
.readiness-widget[data-score="low"]  { background: rgba(231,76,60,0.15);  border-color: rgba(231,76,60,0.3); }
.readiness-widget__score-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}
.readiness-widget__score {
  font-size: clamp(2.6rem, 10vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--color-text-primary, #fff);
  transition: color 0.3s;
}
.readiness-widget[data-score="high"] .readiness-widget__score { color: #2ecc71; }
.readiness-widget[data-score="mid"]  .readiness-widget__score { color: #f39c12; }
.readiness-widget[data-score="low"]  .readiness-widget__score { color: #e74c3c; }
.readiness-widget__max {
  font-size: 1rem;
  opacity: 0.5;
  color: var(--color-text-primary, #fff);
}
.readiness-widget__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
  color: var(--color-text-primary, #fff);
}
.readiness-widget__hint {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.5;
  color: var(--color-text-primary, #fff);
}
.readiness-widget__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.45;
  color: var(--color-text-primary, #fff);
}

/* ——— Lean spot form ——— */
.auth-spot__form--lean .form__group + .form__group { margin-top: 0.75rem; }
.auth-spot__fine--legal { font-size: 0.72rem; opacity: 0.55; text-align: center; margin-top: 0.5rem; }
.auth-spot__fine--legal a { color: inherit; text-decoration: underline; }

/* ——— Chips horizontales scrolleables ——— */
.welcome-chips {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  animation: welcomeCardIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 60ms;
}

.welcome-chips[hidden] {
  display: none !important;
}

.welcome-chips__rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding: 0.15rem var(--space-sm) 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;  scrollbar-width: none;
  overscroll-behavior-x: contain;
  mask-image: linear-gradient(to right, black calc(100% - 2.5rem), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 2.5rem), transparent 100%);
}

.welcome-chips__rail::-webkit-scrollbar {
  display: none;
}

.welcome-chips__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: var(--weight-title);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  scroll-snap-align: start;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.welcome-chips__chip:hover,
.welcome-chips__chip:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent-soft) 55%, var(--color-surface));
  outline: none;
}

.welcome-chips__chip:active {
  transform: scale(0.97);
}

.welcome-chips__label {
  display: block;
}

/* Onboarding interactivo — primer inicio */
/* ── Modo inline (default) ── */
.welcome-onboarding {
  position: relative;
  margin: 0 0 var(--space-lg);
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(114, 28, 36, 0.1) 0%, transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  box-shadow: 0 10px 28px rgba(20, 12, 14, 0.06);
  animation: welcome-onboarding-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Modo splash (primer acceso) — overlay full-screen ── */
.welcome-onboarding--splash {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--color-bg);
  box-shadow: none;
  animation: welcome-splash-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

@keyframes welcome-splash-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Área ilustración (60% superior) */
.welcome-onboarding--splash .welcome-onboarding__illustration {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  padding: 2.5rem 2rem 1rem;
}

.welcome-onboarding--splash .welcome-onboarding__illustration svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Panel inferior con texto y controles */
.welcome-onboarding--splash .welcome-onboarding__sheet {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem 1.75rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border);
  border-radius: 20px 20px 0 0;
  background: var(--color-surface);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.07);
}

/* En modo splash, progress y dots se muestran dentro del sheet */
.welcome-onboarding--splash .welcome-onboarding__progress {
  margin-bottom: 1.1rem;
}

.welcome-onboarding--splash .welcome-onboarding__eyebrow {
  margin-bottom: 0.25rem;
}

.welcome-onboarding--splash .welcome-onboarding__title {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.welcome-onboarding--splash .welcome-onboarding__body {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-bottom: 0;
}

.welcome-onboarding--splash .welcome-onboarding__actions {
  margin-top: 1.4rem;
  gap: 0.75rem;
}

.welcome-onboarding--splash .welcome-onboarding__next {
  flex: 1;
  min-height: 52px;
  font-size: 0.95rem;
}

.welcome-onboarding--splash .welcome-onboarding__skip {
  min-height: 44px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Ocultar el wrapper sheet en modo inline */
.welcome-onboarding__sheet { display: contents; }
.welcome-onboarding__illustration { display: none; }

/* En modo splash, ambos se muestran como block/flex */
.welcome-onboarding--splash .welcome-onboarding__sheet { display: block; }
.welcome-onboarding--splash .welcome-onboarding__illustration { display: flex; }

.welcome-onboarding[hidden] {
  display: none !important;
}

@keyframes welcome-onboarding-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-onboarding__progress {
  height: 3px;
  margin: 0 0 0.85rem;
  border-radius: 999px;
  background: rgba(114, 28, 36, 0.12);
  overflow: hidden;
}

.welcome-onboarding__bar {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: var(--color-accent-red);
  transition: width 320ms ease;
}

.welcome-onboarding__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.welcome-onboarding__title {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.2vw, 1.28rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--color-text-primary);
}

.welcome-onboarding__body {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.welcome-onboarding__dots {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.welcome-onboarding__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(114, 28, 36, 0.22);
  transition: background 200ms ease, transform 200ms ease;
}

.welcome-onboarding__dot.is-done {
  background: rgba(114, 28, 36, 0.45);
}

.welcome-onboarding__dot.is-active {
  background: var(--color-accent-red);
  transform: scale(1.25);
}

.welcome-onboarding__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.welcome-onboarding__skip {
  min-height: 44px;
}

.welcome-onboarding__next {
  min-height: 44px;
  min-width: 7.5rem;
}

.welcome-onboarding-target {
  position: relative;
  z-index: 1;
  outline: 2px solid color-mix(in srgb, var(--color-accent-red) 55%, transparent);
  outline-offset: 4px;
  border-radius: 16px;
  animation: welcome-onboarding-pulse 1.6s ease-in-out 2;
}

@keyframes welcome-onboarding-pulse {
  0%, 100% { outline-color: color-mix(in srgb, var(--color-accent-red) 35%, transparent); }
  50% { outline-color: color-mix(in srgb, var(--color-accent-red) 75%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-onboarding,
  .welcome-onboarding-target {
    animation: none;
  }
}

/* ============================================
   Profile Form — Bento inputs (Ajustes)
   bg-white · border-neutral-200 · rounded-xl
   focus: border/ring #5C2430
   ============================================ */

#profileForm .form__input,
#profileForm .form__select,
#profileForm textarea.form__input {
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #e5e7eb; /* neutral-200 */
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: none;
  color: #141618;
}

#profileForm .form__select {
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  background-color: #ffffff;
}

#profileForm .form__input:hover:not(:focus):not(:disabled),
#profileForm .form__select:hover:not(:focus):not(:disabled) {
  border-color: #d4d4d8; /* neutral-300, sutil */
}

#profileForm .form__input:focus,
#profileForm .form__select:focus,
#profileForm textarea.form__input:focus {
  border-color: #5C2430;
  box-shadow: 0 0 0 1px #5C2430; /* ring-1 */
  outline: none;
}

#profileForm .form__input:disabled,
#profileForm .form__select:disabled {
  background-color: #ffffff;
  border-color: #e5e7eb;
  color: #6b7280;
  opacity: 0.65;
  cursor: not-allowed;
}

#profileForm .form__select option {
  background-color: #ffffff;
  color: #141618;
}

/* ============================================
   Profile Hero — avatar + peso en Ajustes
   ============================================ */

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin: 0 0 var(--space-xl);
  padding: var(--space-lg) var(--space-md) var(--space-xl);
  max-width: 420px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(20, 22, 24, 0.1);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 8px 24px rgba(20, 22, 24, 0.04);
}

.profile-hero__avatar-wrap {
  position: relative;
  box-sizing: border-box;
  width: 7rem; /* 112px */
  height: 7rem;
  min-width: 7rem;
  min-height: 7rem;
  max-width: 7rem;
  max-height: 7rem;
  margin: var(--space-sm) auto 0;
  flex-shrink: 0;
  line-height: 0;
}

.profile-hero__avatar {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  min-width: 7rem;
  min-height: 7rem;
  max-width: 7rem;
  max-height: 7rem;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(20, 22, 24, 0.12);
  border-radius: 9999px;
  background:
    linear-gradient(145deg, #ffffff 0%, var(--color-bg-deep, #f3f4f6) 100%);
  color: var(--color-text-secondary);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
  font: inherit;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.profile-hero__avatar:hover,
.profile-hero__avatar:focus-visible {
  border-color: #5C2430;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(92, 36, 48, 0.12);
  outline: none;
}

.profile-hero__avatar:active {
  transform: translateY(0);
}

.profile-hero__avatar.is-uploading {
  pointer-events: none;
  opacity: 0.72;
}

.profile-hero__avatar-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 9999px;
  display: block;
}

.profile-hero__avatar-img[hidden] {
  display: none !important;
}

.profile-hero__avatar-fallback {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: var(--weight-display);
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  color: #5C2430;
  user-select: none;
}

.profile-hero__avatar:has(.profile-hero__avatar-img:not([hidden])) .profile-hero__avatar-fallback {
  visibility: hidden;
}

.profile-hero__avatar-fallback[hidden] {
  display: none !important;
}

/* Camera badge lives on the wrap (not inside overflow:hidden) so the circle stays intact */
.profile-hero__avatar-edit {
  position: absolute;
  right: -0.1rem;
  bottom: -0.1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  min-width: 1.875rem;
  min-height: 1.875rem;
  max-width: 1.875rem;
  max-height: 1.875rem;
  aspect-ratio: 1 / 1;
  border: 2px solid #ffffff;
  border-radius: 9999px;
  background: #5C2430;
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 22, 24, 0.22);
  pointer-events: none;
  line-height: 0;
}

.profile-hero__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  width: 100%;
}

.profile-hero__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.profile-hero__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  font-size: var(--text-title);
  letter-spacing: var(--track-title);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--color-text-primary);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.profile-hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin: var(--space-md) 0 0;
  padding: 0;
}

.profile-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7.5rem;
}

.profile-hero__stat dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.profile-hero__stat dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: var(--weight-title);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.profile-hero__status {
  margin: var(--space-sm) 0 0;
  font-size: var(--text-support);
  color: var(--color-text-secondary);
}

.profile-hero__status[data-tone="error"] {
  color: var(--color-error);
}

.profile-hero__status[data-tone="ok"] {
  color: var(--color-success);
}

.profile-hero__status[hidden] {
  display: none !important;
}

html[data-theme-mode="dark"] .profile-hero {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme-mode="dark"] .profile-hero__avatar {
  background: linear-gradient(145deg, var(--color-bg), var(--color-surface));
  border-color: var(--color-border-strong);
}

html[data-theme-mode="dark"] .profile-hero__avatar-edit {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-surface);
}

/* ============================================
   NULL Companion — miniatura contextual por panel
   Equivalente a <NullCompanion section="..." />
   ============================================ */

.null-companion-host {
  margin-top: var(--space-md);
  width: 100%;
  max-width: 34rem;
}

.null-companion {
  display: block;
  min-width: 0;
  padding: 0.3rem 0.1rem;
  text-align: center;
}

.null-companion[hidden] {
  display: none !important;
}

.null-companion__phrase {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.panel__header--with-actions .null-companion-host {
  /* El host vive como hermano del header, no dentro */
  display: none;
}

@media (max-width: 420px) {
  .null-companion__phrase {
    font-size: 0.82rem;
    line-height: 1.42;
  }
}

/* ============================================
   CONSTANCIA — círculo + bocadillo (sin tarjeta)
   ============================================ */

.constancy {
  margin: 0 auto var(--space-xl);
  max-width: 420px;
  padding: 1.1rem 1rem 1.15rem;
  background: var(--color-surface-inset);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--color-layer-hairline);
  animation: welcomeCardIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  /* Progreso = secundario frente al check-in */
  opacity: 0.96;
}

.constancy[hidden] {
  display: none !important;
}

.constancy__stage {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-md);
}

.constancy__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(114, 28, 36, 0.45);
  background:
    radial-gradient(circle at 50% 35%, rgba(114, 28, 36, 0.14), transparent 62%),
    var(--color-surface-float);
  box-shadow: var(--shadow-elev-1);
  padding: 0.55rem 0.4rem;
  box-sizing: border-box;
}

.constancy__count {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-metric);
  font-size: var(--text-metric);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.constancy__count-label {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

.constancy__dialogue {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.constancy__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  border: none;
}

.constancy__eyebrow {
  display: block;
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.constancy__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-subtitle);
  font-size: var(--text-subtitle);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  line-height: var(--leading-tight);
}

.constancy__status {
  flex-shrink: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-gold-dim);
}

.constancy__status.is-live {
  color: var(--color-accent-red);
}

.constancy__status.is-risk {
  color: var(--color-text-secondary);
}

.constancy__bubble {
  position: relative;
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.constancy__bubble::before {
  display: none;
}

.constancy__empty {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-sm) 0 0;
  animation: welcomeCardIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.constancy__empty[hidden] {
  display: none !important;
}

.constancy__empty-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-support);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
}

.constancy__cta {
  justify-self: start;
  margin-top: var(--space-xs);
  padding: 0.65rem 0.9rem;
  min-height: var(--touch-min);
  font-family: var(--font-heading);
  font-weight: var(--weight-cta);
  font-size: var(--text-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  color: #fff;
  background: var(--color-accent-red);
  border: none;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.constancy__cta:hover,
.constancy__cta:focus-visible {
  outline: none;
  background: var(--color-accent-red-hover);
}

.constancy__cta:active {
  transform: scale(var(--press-scale));
}

.constancy__body[hidden] {
  display: none !important;
}

.constancy__copy {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-support);
  line-height: var(--leading-body);
  color: var(--color-text-primary);
}

.constancy__meta {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.constancy__weeks {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.45rem;
  align-items: center;
}

.constancy__week {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.constancy__week-dot {
  width: 100%;
  aspect-ratio: 1;
  max-width: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  background: transparent;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.constancy__week.is-complete .constancy__week-dot {
  background: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.constancy__week.is-current .constancy__week-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.constancy__week.is-current:not(.is-complete) .constancy__week-dot {
  border-color: var(--color-accent-red);
  border-style: dashed;
}

.constancy__week-mark {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1;
}

.constancy__week.is-complete .constancy__week-mark,
.constancy__week.is-current .constancy__week-mark {
  color: var(--color-accent-gold);
}

.constancy__week-now {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.constancy__week-now[hidden] {
  display: none !important;
}

.constancy__week-now-label {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.constancy__week-now-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.constancy__week-now-progress {
  margin: 0;
  padding: 0.2rem 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-metric);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.constancy__days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.constancy__day {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: transparent;
}

.constancy__day.is-done {
  background: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.constancy__day.is-today:not(.is-done) {
  border-color: var(--color-accent-red);
  border-style: dashed;
}

/* ============================================
   Precisión NULLUM · Cycle wrap · Weight MA
   ============================================ */

.precision {
  margin: 0 auto var(--space-lg);
  max-width: 420px;
  padding: 1.05rem 1rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 var(--color-layer-hairline);
  animation: welcomeCardIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.precision[hidden] {
  display: none !important;
}

.precision__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0 0 var(--space-md);
}

.precision__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

.precision__title {
  margin: 0.15rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.precision__status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.precision__status.is-high {
  color: var(--color-success);
}

.precision__status.is-mid {
  color: var(--color-text-secondary);
}

.precision__status.is-low {
  color: var(--color-cal-missed);
}

.precision__stage {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-md);
  align-items: center;
}

.precision__ring {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.precision__ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.precision__ring-track {
  stroke: var(--color-border);
  stroke-width: 5;
}

.precision__ring-value {
  stroke: var(--color-accent);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.precision__score {
  margin: 0;
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--weight-metric);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.precision__score-unit {
  margin: 0;
  position: relative;
  z-index: 1;
  margin-top: -0.15rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.precision__dialogue {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.precision__copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.precision__pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.precision__pillar {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) 2.4rem;
  gap: 0.45rem;
  align-items: center;
}

.precision__pillar-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.precision__pillar-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--color-bg-deep);
  overflow: hidden;
}

.precision__pillar-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.precision__pillar[data-pillar="rir"] .precision__pillar-bar > i {
  background: var(--color-text-secondary);
}

.precision__pillar[data-pillar="checkin"] .precision__pillar-bar > i {
  background: var(--color-cal-planned);
}

.precision__pillar-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: right;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.precision__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.precision__badges[hidden] {
  display: none !important;
}

.precision__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 4px);
  background: var(--color-surface-inset);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
}

.precision__badge-mark {
  font-size: 0.78rem;
  color: var(--color-accent);
  line-height: 1;
}

.precision-stats__score {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-metric);
  font-size: 1.75rem;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.precision-stats__copy {
  margin: 0 0 var(--space-sm);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.precision__badges--stats {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.cycle-wrap__eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cycle-wrap__headline {
  margin: 0 0 var(--space-md);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.cycle-wrap__metrics {
  margin: 0 0 var(--space-md);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.cycle-wrap__metric {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: var(--color-surface-inset);
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  box-shadow: inset 0 1px 0 var(--color-layer-hairline);
}

.cycle-wrap__metric dt {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cycle-wrap__metric dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-metric);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.cycle-wrap__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

.cycle-wrap__hint {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

@media (max-width: 480px) {
  .precision {
    max-width: none;
  }

  .precision__stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .precision__dialogue {
    width: 100%;
  }

  .precision__pillar {
    grid-template-columns: 4.2rem minmax(0, 1fr) 2.2rem;
  }

  .cycle-wrap__metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .constancy {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .constancy__stage {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .constancy__figure {
    width: 76px;
    height: 76px;
  }

  .constancy__count {
    font-size: 1.5rem;
  }

  .constancy__week-now-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .constancy__days {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .constancy,
  .constancy__week-dot {
    animation: none;
    transition: none;
  }
}

/* ============================================
   1-TAP DAILY CHECK — Widget compacto (Welcome)
   ============================================ */

.habits {
  margin: 0 auto var(--space-lg);
  max-width: 420px;
  padding: 1.15rem 1.05rem 1.2rem;
  background-color: var(--color-surface-float);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elev-1);
  background-image:
    linear-gradient(var(--color-surface-float), var(--color-surface-float)),
    linear-gradient(165deg, var(--color-layer-hairline), transparent 48%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: welcomeCardIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    padding 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    box-shadow 320ms ease,
    background-color 320ms ease;
  /* Check-in = prioridad visual sobre progreso */
  position: relative;
  z-index: 1;
}

.habits.is-celebrating {
  box-shadow:
    0 0 0 1px rgba(92, 184, 138, 0.28),
    0 12px 32px rgba(0, 0, 0, 0.4);
  animation: habitsCelebrateFlash 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes habitsCelebrateFlash {
  0% {
    box-shadow:
      0 0 0 0 rgba(92, 184, 138, 0.0),
      var(--shadow-elev-1);
  }
  35% {
    box-shadow:
      0 0 0 1px rgba(92, 184, 138, 0.45),
      0 0 24px rgba(92, 184, 138, 0.18),
      var(--shadow-elev-2);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(92, 184, 138, 0.28),
      0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

.habits.is-minimized {
  max-width: 480px;
  padding: 0.75rem 0.9rem;
  box-shadow: inset 0 1px 0 var(--color-layer-hairline);
  background: var(--color-surface-inset);
  background-image: none;
}

.habits.is-minimized .habits__header {
  margin-bottom: var(--space-sm);
  padding-bottom: 0;
  border-bottom: none;
}

.habits.is-minimized .habits__title {
  font-size: var(--text-subtitle);
}

.habits.is-minimized .habits__eyebrow {
  display: none;
}

.habits__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: 0;
  border-bottom: none;
  transition: margin 280ms ease, padding 280ms ease;
}

.habits__eyebrow {
  display: block;
  margin: 0 0 0.28rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.habits__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-display);
  font-size: clamp(1.12rem, 3.4vw, 1.35rem);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
  transition: font-size 280ms ease;
}

.habits__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: var(--text-support);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition:
    color var(--transition-fast),
    background-color var(--transition-base),
    box-shadow var(--transition-base);
}

.habits__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.habits__status.is-saving {
  color: var(--color-accent-gold);
  background: rgba(154, 107, 111, 0.12);
}

.habits__status.is-saving .habits__status-dot {
  background: var(--color-accent-gold);
  animation: habitsPulse 900ms ease-in-out infinite;
}

.habits__status.is-saved {
  color: #d8f3e4;
  background: rgba(92, 184, 138, 0.18);
  box-shadow: 0 0 0 1px rgba(92, 184, 138, 0.25);
}

.habits__status.is-saved .habits__status-dot {
  background: #9ee0bc;
  box-shadow: 0 0 0 3px rgba(92, 184, 138, 0.22);
}

.habits__status.is-error {
  color: var(--color-error);
  background: var(--color-error-bg);
}

.habits__status.is-error .habits__status-dot {
  background: var(--color-error);
}

@keyframes habitsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.habits__hint {
  margin: 0 0 var(--space-md);
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-support);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  animation: welcomeCardIn 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.habits__hint[hidden] {
  display: none !important;
}

.habits__hint strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

.habits__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.habits__slider {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.habits__slider[hidden] {
  display: none !important;
}

.habits[data-onboarding="spark"] .habits__title {
  letter-spacing: -0.02em;
}

.habits[data-onboarding="spark"] .habits__slider--spark {
  margin-top: 0.15rem;
}

.habits[data-onboarding="spark"] .habits__slider--full,
.habits[data-onboarding="spark"] .habits__steps-sync {
  display: none !important;
}

.habits__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.habits__value {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-red-vibrant);
  text-transform: none;
  font-variant-numeric: tabular-nums;
  min-width: 4.25rem;
  text-align: right;
  text-shadow: var(--glow-red-soft);
}

.habits__track-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
  /* Permite pan vertical de la página; el input usa pan-x */
  touch-action: pan-y;
}

.habits__track-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--color-border-strong);
  pointer-events: none;
  z-index: 0;
}

.habits__fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent-red) 0%, var(--color-accent-gold) 100%);
  pointer-events: none;
  z-index: 1;
  transition: width 40ms linear;
}

/* Pasos sincronizados (apps / wearables vinculados) */
.habits__steps-sync {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0 0.1rem;
}

.habits__steps-sync[hidden] {
  display: none !important;
}

.habits__steps-sync-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.habits__steps-sync-refresh {
  display: inline-grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.habits__steps-sync-refresh:hover,
.habits__steps-sync-refresh:focus-visible {
  color: var(--color-accent-red);
  border-color: var(--color-accent-red);
  outline: none;
}

.habits__steps-sync-refresh.is-spinning svg {
  animation: habits-sync-spin 0.7s linear;
}

@keyframes habits-sync-spin {
  to { transform: rotate(360deg); }
}

.habits__steps-sync-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem 0.65rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface-inset);
  background-image: linear-gradient(180deg, var(--color-success-bg) 0%, transparent 70%);
}

.habits__steps-sync-count {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.habits__steps-sync-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--color-success);
}

.habits__steps-sync-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-bg);
  animation: habits-sync-pulse 1.8s ease-in-out infinite;
}

@keyframes habits-sync-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .habits__steps-sync-refresh.is-spinning svg,
  .habits__steps-sync-dot {
    animation: none;
  }
}

.habits__range {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  outline: none;
  cursor: pointer;
  touch-action: pan-y;
}

.habits__range::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.habits__range::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

.habits__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  /* Hitbox ≥ --touch-min; solo se pinta un rectángulo estrecho centrado */
  width: var(--touch-min);
  height: var(--touch-min);
  margin-top: calc((4px - var(--touch-min)) / 2);
  background-color: transparent;
  background-image: linear-gradient(var(--color-slider-thumb), var(--color-slider-thumb));
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--slider-thumb-visual-w) var(--slider-thumb-visual-h);
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: grab;
  transition: background-size 120ms ease, filter 120ms ease;
}

.habits__range::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--touch-min);
  height: var(--touch-min);
  background-color: transparent;
  background-image: linear-gradient(var(--color-slider-thumb), var(--color-slider-thumb));
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--slider-thumb-visual-w) var(--slider-thumb-visual-h);
  border: none;
  border-radius: 1px;
  box-shadow: none;
  cursor: grab;
}

.habits__range:active::-webkit-slider-thumb,
.habits__range:focus-visible::-webkit-slider-thumb {
  background-image: linear-gradient(var(--color-accent-red-hover), var(--color-accent-red-hover));
  background-size: calc(var(--slider-thumb-visual-w) + 2px) calc(var(--slider-thumb-visual-h) + 2px);
  cursor: grabbing;
}

.habits__range:active::-moz-range-thumb,
.habits__range:focus-visible::-moz-range-thumb {
  background-image: linear-gradient(var(--color-accent-red-hover), var(--color-accent-red-hover));
  background-size: calc(var(--slider-thumb-visual-w) + 2px) calc(var(--slider-thumb-visual-h) + 2px);
}

.habits__range:focus-visible {
  outline: 1px solid var(--color-accent-gold);
  outline-offset: 4px;
}

.habits__footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.habits__save-btn {
  flex: 1;
  min-height: var(--touch-min);
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-weight: var(--weight-cta);
  font-size: var(--text-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  color: var(--color-on-accent);
  background: var(--color-accent-red);
  border: none;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 8px 20px rgba(114, 28, 36, 0.35);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast);
}

.habits__save-btn:hover,
.habits__save-btn:focus-visible {
  outline: none;
  background: var(--color-accent-red-hover);
  transform: translateY(-1px);
}

.habits__save-btn:active {
  transform: scale(var(--press-scale));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 12px rgba(114, 28, 36, 0.28);
}

.habits.is-celebrating .habits__save-btn {
  background: linear-gradient(180deg, #6fc99a 0%, var(--color-success) 100%);
  color: #06140c;
  box-shadow: 0 0 0 1px rgba(158, 224, 188, 0.35), 0 10px 24px rgba(92, 184, 138, 0.28);
}

.habits__cancel-btn {
  padding: 0.75rem 0.65rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.habits__cancel-btn:hover,
.habits__cancel-btn:focus-visible {
  outline: none;
  color: var(--color-text-primary);
}

.habits__done {
  animation: habitsDoneIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes habitsDoneIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.habits__done-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: 0.65rem 0.45rem;
  text-align: left;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.habits__done-bar:hover,
.habits__done-bar:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.03);
}

.habits__done-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-bg);
  position: relative;
}

.habits__done-check::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border-right: 2px solid #06140c;
  border-bottom: 2px solid #06140c;
  transform: rotate(40deg);
  transform-origin: center;
  animation: habitsCheckDraw 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes habitsCheckDraw {
  from {
    opacity: 0;
    transform: rotate(40deg) scale(0.6);
  }
  to {
    opacity: 1;
    transform: rotate(40deg) scale(1);
  }
}

.habits.is-celebrating .habits__done-check {
  animation: habitsCheckPop 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes habitsCheckPop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.habits__done-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.habits__done-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.habits__done-metrics {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habits__done-action {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

@media (max-width: 720px) {
  .habits {
    margin-bottom: var(--space-lg);
    padding: 1.05rem 0.95rem 1.1rem;
    max-width: none;
  }

  .habits.is-minimized {
    padding: 0.7rem 0.85rem;
  }

  /* Check-in móvil: hitbox gym; núcleo visual sigue compacto */
  .habits__track-wrap {
    height: var(--touch-gym);
  }

  .habits__range {
    height: var(--touch-gym);
  }

  .habits__range::-webkit-slider-thumb {
    width: var(--touch-gym);
    height: var(--touch-gym);
    margin-top: calc((4px - var(--touch-gym)) / 2);
  }

  .habits__range::-moz-range-thumb {
    width: var(--touch-gym);
    height: var(--touch-gym);
  }

  .habits__save-btn {
    min-height: var(--touch-gym-cta);
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .habits,
  .habits.is-celebrating,
  .habits__done,
  .habits__done-check::after,
  .habits.is-celebrating .habits__done-check,
  .habits__status.is-saving .habits__status-dot {
    animation: none;
  }

  .habits,
  .habits__fill,
  .habits__header,
  .habits__title {
    transition: none;
  }

  .habits__save-btn:hover,
  .habits__save-btn:focus-visible {
    transform: none;
  }
}

.welcome__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0 0 var(--space-md);
}

/* ── Progress Pulse widget ── mini-dashboard semanal del atleta */
.progress-pulse {
  margin: var(--space-md) 0;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-elev-1);
}

.progress-pulse__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.85rem;
}

.progress-pulse__eyebrow {
  margin: 0;
  margin-inline-end: 0.15rem;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-gold);
  flex: 0 0 auto;
}

.progress-pulse__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.progress-pulse__link {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  min-height: 32px;
  color: var(--color-text-muted);
}

.progress-pulse__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.progress-pulse__tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.progress-pulse__tile-label {
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.progress-pulse__bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 28px;
}

.progress-pulse__bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  transition: height 400ms cubic-bezier(0.16, 1, 0.3, 1), background-color 200ms ease;
}

.progress-pulse__tile-value {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

.progress-pulse__tile-metric {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  line-height: 1;
}

.progress-pulse__tile-trend {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.progress-pulse__tile-trend--up   { color: var(--color-success); }
.progress-pulse__tile-trend--down { color: var(--color-accent); }

/* Modo enfoque ON (Ajustes): ocultar accesos secundarios en Inicio */
html[data-daily-focus="on"] .welcome-chips,
html[data-daily-focus="on"] .welcome__grid {
  display: none !important;
}

html[data-daily-focus="on"] .constancy {
  display: none !important;
}

/* Enfoque: home = sesión + feedback + hábitos (no rachas/gráficas/comparativas) */
html[data-daily-focus="on"] #checkinStreak,
html[data-daily-focus="on"] #weekCompare,
html[data-daily-focus="on"] #weightChartCard,
html[data-daily-focus="on"] #weeklySplitView,
html[data-daily-focus="on"] #progressPulseWidget {
  display: none !important;
}

.coach-feedback-banner__cta-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-accent, #5C2430);
}

/* Grid de accesos legacy: oculto en el home limpio (sidebar cubre navegación) */
.welcome__grid {
  display: none !important;
}

/* Accesos secundarios legacy (por si queda markup antiguo) */

.welcome-today__tile {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  min-width: 0;
  width: auto;
  padding: 0.55rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: var(--weight-title);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.welcome-card--primary .welcome-card__title {
  color: var(--color-accent-red);
}

.welcome-card {
  display: grid;
  grid-template-columns: var(--touch-min) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-md);
  text-align: left;
  padding: 0.15rem 0;
  min-height: var(--touch-min);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--color-text-primary);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  animation: welcomeCardIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  touch-action: manipulation;
}

.welcome-card:nth-child(1) { animation-delay: 40ms; }
.welcome-card:nth-child(2) { animation-delay: 80ms; }
.welcome-card:nth-child(3) { animation-delay: 120ms; }
.welcome-card:nth-child(4) { animation-delay: 160ms; }
.welcome-card:nth-child(5) { animation-delay: 200ms; }
.welcome-card:nth-child(6) { animation-delay: 240ms; }
.welcome-card:nth-child(7) { animation-delay: 280ms; }
.welcome-card:nth-child(8) { animation-delay: 320ms; }

@keyframes welcomeCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-card:hover,
.welcome-card:focus-visible {
  outline: none;
  background: transparent;
  border: none;
  transform: translateX(2px);
  box-shadow: none;
}

.welcome-card:active {
  opacity: var(--press-opacity);
  transform: scale(var(--press-scale));
}

.welcome-card--trainer .welcome-card__index {
  border-color: var(--color-accent-red);
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}

.welcome-card__index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-cta);
  letter-spacing: 0.08em;
  color: var(--color-accent-red);
  flex-shrink: 0;
}

.welcome-card__bubble {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  min-width: 0;
  padding: 0.65rem 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 12px 12px 12px 5px;
}

.welcome-card__bubble::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-strong);
  border-bottom: 1px solid var(--color-border-strong);
  transform: rotate(45deg);
}

.welcome-card__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  font-size: var(--text-subtitle);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

.welcome-card__cta {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-cta);
  font-size: var(--text-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  color: var(--color-accent-red);
  margin-top: 0;
  transition: color var(--transition-fast);
}

.welcome-card--gold .welcome-card__cta {
  color: var(--color-accent-gold);
}

.welcome-card--gold .welcome-card__index {
  border-color: var(--color-accent-gold);
  color: var(--color-accent-gold);
}

.welcome-card:hover .welcome-card__cta,
.welcome-card:focus-visible .welcome-card__cta {
  color: var(--color-text-primary);
}

@media (max-width: 720px) {
  .welcome {
    padding: clamp(0.85rem, 4vw, 1.35rem) 0 var(--space-xl);
  }

  .welcome-hero {
    min-height: 4.85rem;
    padding: 1rem 1.05rem;
  }

  .welcome__grid {
    gap: 0.55rem;
  }

  .welcome-card {
    min-height: var(--touch-min);
    width: 100%;
  }
}

@media (min-width: 1100px) {
  .welcome__grid {
    display: flex;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome,
  .welcome-card,
  .welcome-hero,
  .welcome-chips {
    animation: none;
  }

  .welcome-card:hover,
  .welcome-card:focus-visible,
  .welcome-hero:hover,
  .welcome-hero:focus-visible {
    transform: none;
  }
}
/* ============================================
   COMPOSICIÓN CORPORAL
   ============================================ */

.bc-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent-gold);
  background:
    linear-gradient(135deg, rgba(201, 154, 62, 0.06) 0%, transparent 55%),
    var(--color-surface);
}

.bc-bridge__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  margin: 0 0 var(--space-xs);
}

.bc-bridge--inverse .bc-bridge__eyebrow {
  color: var(--color-accent-red);
}

.bc-bridge__text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 42rem;
}

.bc-bridge + .card,
.bc-bridge + .wci-tabs,
.bc-bridge + .wci-alert,
.bc-bridge + .wci-form {
  margin-top: var(--space-lg);
}

.card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: 0 0 var(--space-sm);
}

/* ============================================
   CHECK-IN SEMANAL
   ============================================ */

.wci {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.wci-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.wci-tabs__btn {
  appearance: none;
  margin: 0;
  min-height: var(--touch-min);
  padding: 0.85rem var(--space-md);
  border: 0;
  border-right: 1px solid var(--color-border);
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.wci-tabs__btn:last-child {
  border-right: 0;
}

.wci-tabs__btn:hover,
.wci-tabs__btn:focus-visible {
  color: var(--color-text-primary);
  outline: none;
  background: rgba(0, 0, 0, 0.03);
}

.wci-tabs__btn.is-active {
  color: var(--color-accent-red);
  background:
    linear-gradient(180deg, rgba(92, 36, 48, 0.08) 0%, transparent 100%),
    var(--color-surface);
  box-shadow: inset 0 -2px 0 var(--color-accent-red);
}

.wci-tab-panel[hidden] {
  display: none !important;
}

.wci-tab-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

#wciMemberView {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

#wciMemberView[hidden] {
  display: none !important;
}

.wci-trainer {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

.wci-trainer[hidden] {
  display: none !important;
}

.wci-client-hint {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.wci-trainer-empty {
  padding: var(--space-lg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.wci-trainer-empty[hidden] {
  display: none !important;
}

.wci-trainer-empty__eyebrow {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-trainer-empty__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text-primary);
}

.wci-trainer-empty__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 36rem;
}

.wci-alert {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent-red);
  background:
    linear-gradient(135deg, rgba(92, 36, 48, 0.08) 0%, transparent 55%),
    var(--color-surface);
  border-radius: var(--radius-md);
}

.wci-alert__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.wci-alert__text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.wci-form {
  margin: 0;
}

.wci-form.is-blocked {
  display: none;
}

.wci-fieldset {
  margin: 0;
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  min-width: 0;
}

.wci-fieldset:disabled,
.wci-fieldset.is-locked {
  opacity: 0.72;
}

.wci-fieldset.is-locked .wci-slot,
.wci-fieldset.is-locked .wci-metric__score,
.wci-fieldset.is-locked .wci-chip,
.wci-fieldset.is-locked .wci-comments__input,
.wci-fieldset.is-locked .wci-scale__input,
.wci-fieldset.is-locked .wci-stepper__btn {
  pointer-events: none;
  cursor: not-allowed;
}

.wci-fieldset:not(.is-locked) .wci-slot,
.wci-fieldset:not(.is-locked) .wci-metric__score,
.wci-fieldset:not(.is-locked) .wci-chip {
  pointer-events: auto;
  cursor: pointer;
}

.wci-form__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
  padding: 0;
  text-align: left;
}

.wci-form__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.wci-eta {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-red);
}

.wci-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.15rem 0 0.1rem;
}

.wci-progress__track {
  height: 4px;
  border-radius: 999px;
  background: var(--cm-border-80);
  overflow: hidden;
}

.wci-progress__fill {
  display: block;
  height: 100%;
  width: var(--wci-progress, 0%);
  border-radius: inherit;
  background: var(--color-accent-red);
  transition: width 220ms ease;
}

.wci-progress__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

/* ============================================
   CHECK-IN WIZARD · 3 pasos
   ============================================ */

.wci-stepper {
  list-style: none;
  margin: 0.35rem 0 0.15rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.wci-stepper__item {
  margin: 0;
  min-width: 0;
}

.wci-stepper__btn {
  appearance: none;
  width: 100%;
  min-height: 2.6rem;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.wci-stepper__btn:focus-visible {
  outline: 2px solid var(--color-accent-red);
  outline-offset: 2px;
}

.wci-stepper__num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.wci-stepper__label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.wci-stepper__item.is-current .wci-stepper__btn {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
  background: color-mix(in srgb, var(--color-accent-red) 8%, transparent);
}

.wci-stepper__item.is-done .wci-stepper__btn {
  border-color: color-mix(in srgb, var(--color-accent-red) 45%, var(--color-border));
  color: var(--color-text-primary);
}

.wci-stepper__item.is-done .wci-stepper__num::before {
  content: "✓ ";
}

.wci-step[hidden] {
  display: none !important;
}

.wci-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.wci-step__kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-red);
}

.wci-step__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}

.wci-scale {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.wci-scale__field {
  max-width: 16rem;
}

.wci-scale__input-wrap {
  position: relative;
}

.wci-scale__input {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.wci-sma {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(92, 36, 48, 0.06) 0%, transparent 52%),
    var(--color-surface);
}

.wci-sma.is-retention {
  border-color: color-mix(in srgb, var(--color-accent-gold) 55%, var(--color-border));
}

.wci-sma__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .wci-sma__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wci-sma__cell {
  min-width: 0;
}

.wci-sma__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.wci-sma__value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 3.4vw, 1.15rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
  min-width: 0;
}

.wci-sma__hint {
  margin: 0.65rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.wci-scale__history {
  margin: 0;
}

.wci-scale__history[hidden] {
  display: none !important;
}

.wci-scale__history-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-scale__history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.wci-scale__history-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.wci-scale__history-list strong {
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.wci-wizard__footer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wci-wizard__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  width: 100%;
}

.wci-wizard__nav .btn {
  min-width: 0;
  min-height: var(--touch-min);
}

.wci-wizard__nav #wciWizardNext,
.wci-wizard__nav #wciSubmitBtn {
  flex: 1 1 auto;
}

#panelScale[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .wci-scale__field {
    max-width: none;
  }
}

.wci-fieldset--fast {
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + 0.25rem);
}

.wci-optional {
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.wci-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
}

.wci-chip {
  appearance: none;
  margin: 0;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.wci-chip:hover,
.wci-chip:focus-visible {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
  outline: none;
}

.wci-chip.is-on,
.wci-chip[aria-pressed="true"] {
  border-color: var(--color-accent-red);
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}

.wci-form__ready {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  width: 100%;
  order: -1;
}

.wci-form__ready.is-ready {
  color: var(--color-accent-red);
  font-weight: 600;
}

.wci-form__footer--sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: var(--space-md);
  padding: 0.65rem 0 max(0.35rem, calc(var(--safe-bottom) + var(--keyboard-inset, 0px)));
  background: linear-gradient(180deg, transparent 0%, var(--color-surface) 28%);
}

#wciSubmitBtn.is-ready {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent-red) 35%, transparent);
}

.wci-nutrition-link {
  margin: 0.85rem 0 0;
  text-align: right;
}

.wci-comments {
  margin-bottom: 0.25rem;
}

.wci-comments .form__label {
  margin-bottom: 0.45rem;
}

.wci-form__title {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.wci-hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.wci-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.wci-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 11rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.03);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wci-slot:hover,
.wci-slot:focus-within {
  border-color: var(--color-accent-red);
  background: rgba(92, 36, 48, 0.04);
}

.wci-slot.is-filled {
  border-style: solid;
  border-color: var(--color-border);
}

.wci-slot.is-filled .wci-ghost {
  opacity: 0;
  pointer-events: none;
}

.wci-ghost {
  position: absolute;
  inset: 0.55rem 0.45rem 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5C2430;
  opacity: 0.38;
  pointer-events: none;
  z-index: 1;
  transition: opacity 180ms ease;
}

.wci-ghost__svg {
  width: 72%;
  height: 100%;
  max-height: 7.5rem;
}

.wci-slot__pose {
  display: block;
  padding: 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.wci-slot__preview {
  position: relative;
  z-index: 0;
}

.wci-metric__hint {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--color-text-muted);
  margin-top: -0.25rem;
}

.wci-fasting-confirm {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.wci-morning-badge {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-left: 3px solid #5C2430;
  background: color-mix(in srgb, #5C2430 6%, var(--color-surface));
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #5C2430;
}

.wci-outlier {
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--color-accent-gold) 50%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent-gold) 8%, var(--color-surface));
}

.wci-outlier__text {
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.wci-outlier__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wci-draft-hint {
  margin: 0.25rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-seal-btn,
#wciSubmitBtn.wci-seal-btn {
  background-color: #5C2430 !important;
  border-color: #5C2430;
  color: #fff;
}

.wci-seal-btn:hover,
#wciSubmitBtn.wci-seal-btn:hover {
  background-color: #471B24 !important;
}

.wci-seal-btn.is-ready {
  box-shadow: 0 0 0 1px color-mix(in srgb, #5C2430 40%, transparent), 0 6px 18px rgba(92, 36, 48, 0.22);
}

.wci-streak-badge,
.welcome-checkin-streak {
  margin: 0.35rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid color-mix(in srgb, #5C2430 28%, var(--color-border));
  border-radius: 999px;
  background: color-mix(in srgb, #5C2430 6%, var(--color-surface));
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-digest__label {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-digest__text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--color-text-primary);
}

.wci-ba {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wci-ba__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #111;
}

.wci-ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wci-ba__img--after {
  clip-path: inset(0 0 0 50%);
}

.wci-ba__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.wci-ba__slider-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-text-muted);
}

.wci-ba__slider {
  flex: 1;
  accent-color: #5C2430;
}

/* Command Center · Triage / Priority / Bento / Protocol */

.cc-triage__tab {
  appearance: none;
  margin: 0;
  padding: 0.55rem 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.cc-triage__tab strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: inherit;
}

.cc-triage__tab.is-active {
  border-color: #5C2430;
  color: #5C2430;
  background: color-mix(in srgb, #5C2430 8%, transparent);
}

.cc-priority {
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, #5C2430 30%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #5C2430 4%, var(--color-surface));
}

.cc-priority__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.cc-priority__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cc-priority__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.6rem;
  border: 1px solid color-mix(in srgb, #5C2430 18%, var(--color-border));
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}

.cc-priority__pulse {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: #5C2430;
  box-shadow: 0 0 0 0 rgba(92, 36, 48, 0.45);
  animation: cc-pulse 1.8s ease-out infinite;
}


.cc-priority__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
}

.cc-priority__reason,
.cc-priority__digest {
  margin: 0.15rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.cc-priority__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cc-batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px dashed color-mix(in srgb, #5C2430 35%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #5C2430 5%, var(--color-surface));
}

.cc-batch__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #5C2430;
}

.cc-batch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cc-protocol {
  margin-top: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem 0.75rem;
}

.cc-protocol__summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  padding: 0.45rem 0;
}

.cc-protocol__hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.cc-protocol__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cc-dispatch {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #5C2430;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #5C2430 5%, var(--color-surface));
}

.cc-dispatch__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.cc-dispatch__name {
  margin: 0.2rem 0 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
}

.cc-dispatch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.smart-feed__item.is-selected {
  outline: 2px solid color-mix(in srgb, #5C2430 55%, transparent);
  outline-offset: 1px;
}

.smart-feed__select {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0.35rem 0 0;
  accent-color: #5C2430;
}

.cc-bento {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, color-mix(in srgb, #5C2430 5%, transparent), transparent 45%),
    var(--color-surface);
}

.cc-bento__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cc-bento__header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.cc-bento__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.cc-bento__title {
  margin: 0.15rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
}

.cc-bento__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .cc-bento__grid { grid-template-columns: 1fr; }
}

.cc-bento__cell {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  min-width: 0;
}

.cc-bento__cell--digest,
.cc-bento__cell--ba {
  grid-column: 1 / -1;
}

.cc-bento__label {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.cc-bento__digest {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cc-bento__muted {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.cc-bento__ba-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.cc-bento__ba-tab {
  appearance: none;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  cursor: pointer;
}

.cc-bento__ba-tab.is-active {
  border-color: #5C2430;
  color: #5C2430;
}

.cc-audit {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 12rem;
  overflow: auto;
}

.cc-audit li {
  padding-left: 0.65rem;
  border-left: 2px solid color-mix(in srgb, #5C2430 45%, var(--color-border));
}

.cc-audit__when {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--color-text-muted);
}

.cc-audit__text {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.cc-rule-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .cc-priority__pulse { animation: none; }
}

.wci-slot__input {
  /* Oculto: el action sheet decide cámara vs galería antes de input.click() */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.wci-slot__preview {
  flex: 1;
  min-height: 7.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
}

.wci-slot__preview.has-image {
  background-color: #111;
}

.wci-slot__label {
  display: block;
  padding: var(--space-xs) var(--space-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-slot__action {
  display: block;
  padding: var(--space-xs) var(--space-sm) var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-primary);
}

/* Action sheet: cámara vs galería */
.wci-source-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-bottom)) 0.75rem 0.75rem;
  pointer-events: none;
}

.wci-source-sheet.is-open {
  pointer-events: auto;
}

.wci-source-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.wci-source-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 24, 0.48);
  opacity: 0;
  transition: opacity 220ms ease;
}

.wci-source-sheet.is-open .wci-source-sheet__backdrop {
  opacity: 1;
}

.wci-source-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  margin: 0 auto;
  padding: 1rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-heavy);
  transform: translateY(110%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wci-source-sheet.is-open .wci-source-sheet__panel {
  transform: translateY(0);
}

.wci-source-sheet__header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.wci-source-sheet__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-source-sheet__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-accent-red);
}

.wci-source-sheet__slot {
  margin: 0.35rem 0 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.wci-source-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.wci-source-sheet__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 120ms ease;
}

.wci-source-sheet__btn:hover,
.wci-source-sheet__btn:focus-visible {
  border-color: var(--color-accent-red);
  background: var(--color-accent-soft);
  outline: none;
}

.wci-source-sheet__btn:active {
  transform: scale(var(--press-scale));
}

.wci-source-sheet__btn--primary {
  border-color: var(--color-accent-red);
  background: color-mix(in srgb, var(--color-accent-soft) 70%, var(--color-surface));
}

.wci-source-sheet__btn-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.wci-source-sheet__btn-hint {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.wci-source-sheet__cancel {
  margin-top: 0.15rem;
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.wci-source-sheet__cancel:hover,
.wci-source-sheet__cancel:focus-visible {
  color: var(--color-accent-red);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .wci-source-sheet__backdrop,
  .wci-source-sheet__panel {
    transition: none;
  }
}

@media (min-width: 720px) {
  .wci-source-sheet {
    align-items: center;
    padding: 1.25rem;
  }

  .wci-source-sheet__panel {
    border-radius: var(--radius-md);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  }

  .wci-source-sheet.is-open .wci-source-sheet__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.wci-comments__input {
  resize: vertical;
  min-height: 3.25rem;
  touch-action: manipulation;
}

.wci-comments__hint {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: right;
}

/* Métricas del formulario (2×2) */
.wci-metrics {
  margin: 0 0 var(--space-lg);
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--color-border);
}

.wci-fieldset--fast .wci-metrics {
  margin-bottom: var(--space-md);
  padding-top: var(--space-sm);
}

.wci-fieldset--fast .wci-slots {
  margin-bottom: var(--space-md);
}

.wci-metrics__legend {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.wci-fatigue-insight {
  margin: 0 0 var(--space-md);
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(92, 36, 48, 0.12);
  background: color-mix(in srgb, #5C2430 4%, #fff);
}

.wci-fatigue-insight.is-alert {
  border-color: rgba(92, 36, 48, 0.35);
  background: color-mix(in srgb, #5C2430 9%, #fff);
}

.wci-fatigue-insight.is-good {
  border-color: rgba(47, 107, 79, 0.28);
  background: color-mix(in srgb, #2f6b4f 7%, #fff);
}

.wci-fatigue-insight__title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-fatigue-insight__text,
.wci-fatigue-insight__muscular {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-secondary, #4b5563);
}

.wci-fatigue-insight__muscular {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--color-text-muted, #6b7280);
}

.wci-coach-digest {
  margin: 0 0 0.85rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(92, 36, 48, 0.14);
  background: linear-gradient(145deg, color-mix(in srgb, #5C2430 6%, #fff), #fff);
}

.wci-coach-digest[data-tone="alert"] {
  border-color: rgba(92, 36, 48, 0.4);
}

.wci-coach-digest[data-tone="good"] {
  border-color: rgba(47, 107, 79, 0.3);
}

.wci-coach-digest__title {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-coach-digest__text {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--color-text, #1f2937);
}

.wci-coach-digest__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wci-metrics__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .wci-metrics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wci-metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  min-width: 0;
}

.wci-metric__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-metric__scores {
  display: flex;
  gap: 0.3rem;
}

.wci-metric__score {
  flex: 1;
  min-width: 0;
  min-height: 2.1rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wci-metric__score:hover,
.wci-metric__score:focus-visible {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
  outline: none;
}

.wci-metric__score[aria-pressed="true"] {
  border-color: var(--color-accent-red);
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}

.wci-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.wci-form__status {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

.wci-form__status.is-ok {
  color: var(--color-accent-gold);
}

.wci-form__status.is-error {
  color: var(--color-accent-red);
}

.wci-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.wci-history__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.wci-history__empty {
  margin: 0;
  padding: var(--space-lg);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.wci-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wci-acc {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wci-acc.is-open {
  border-color: var(--color-border-strong);
}

.wci-acc__trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  touch-action: manipulation;
}

.wci-acc__trigger:hover,
.wci-acc__trigger:focus-visible {
  background: rgba(0, 0, 0, 0.03);
}

.wci-acc__trigger-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wci-acc__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}

.wci-acc__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.wci-acc__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  white-space: nowrap;
}

.wci-acc__pill--reviewed {
  border-color: color-mix(in srgb, var(--color-success) 45%, var(--color-border));
  background: var(--color-success-bg);
  color: var(--color-success);
}

.wci-acc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.wci-acc__meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.wci-acc__meta-label {
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.58rem;
}

.wci-acc__chevron {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.wci-acc.is-open .wci-acc__chevron {
  transform: rotate(-135deg);
}

.wci-acc__panel {
  padding: 0 var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* Galería compacta horizontal */
.wci-acc__gallery {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  overflow-x: auto;  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.wci-acc__photo {
  margin: 0;
  flex: 0 0 auto;
  width: min(28%, 7.5rem);
  min-width: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  scroll-snap-align: start;
}

.wci-acc__img,
.wci-acc__missing {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.06);
  display: block;
}

.wci-acc__missing {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.wci-acc__caption {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
}

/* Métricas en historial */
.wci-acc__metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 640px) {
  .wci-acc__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wci-acc__metric {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  min-width: 0;
}

.wci-acc__metric-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.wci-acc__metric-icon {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--color-accent-red);
}

.wci-acc__metric-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-acc__metric-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  line-height: 1;
}

.wci-acc__metric-value span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.wci-acc__metric-bar {
  height: 3px;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.wci-acc__metric-fill {
  height: 100%;
  background: var(--color-accent-red);
  border-radius: 1px;
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.wci-acc__notes {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.03);
}

.wci-acc__notes-label {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-acc__notes-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Feedback del coach */
.wci-acc__coach {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid color-mix(in srgb, var(--color-accent-red) 28%, var(--color-border));
  border-left: 3px solid var(--color-accent-red);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(92, 36, 48, 0.06) 0%, transparent 60%),
    var(--color-surface);
}

.wci-acc__coach-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: var(--space-sm);
}

.wci-acc__coach-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--color-accent-red);
}

.wci-acc__coach-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-red);
}

.wci-acc__coach-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.wci-acc__coach-empty {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.wci-acc__coach-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.wci-acc__decision {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-accent-gold, #c49a3e) 6%);
}

.wci-acc__decision-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wci-acc__decision-hint {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.wci-acc__decision-btn {
  margin-top: 0.15rem;
}

.wci-acc__coach-input {
  resize: vertical;
  min-height: 4.5rem;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text-primary);
}

.wci-acc__coach-input:focus {
  outline: none;
  border-color: var(--color-accent-red);
  box-shadow: 0 0 0 2px rgba(92, 36, 48, 0.18);
}

.wci-acc__coach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.wci-acc__coach-status {
  margin: 0;
  flex: 1;
  min-width: 8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.wci-acc__coach-status.is-ok {
  color: var(--color-success);
}

.wci-acc__coach-status.is-error {
  color: var(--color-accent-red);
}

@media (max-width: 720px) {
  .wci-tabs__btn {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.55rem;
  }

  .wci-slots {
    grid-template-columns: 1fr;
  }

  .wci-slot {
    min-height: 9.5rem;
  }

  .wci-acc__photo {
    width: min(42%, 8rem);
  }

  .wci-acc__img,
  .wci-acc__missing {
    aspect-ratio: 3 / 4;
  }

  .wci-form__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .wci-form__footer .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wci-slot,
  .wci-acc__chevron,
  .wci-metric__score,
  .wci-acc__metric-fill {
    transition: none;
  }
}

.bc-summary__value.is-up {
  color: var(--color-accent-gold);
}

.bc-summary__value.is-down {
  color: var(--color-success);
}

.bc-summary__value.is-neutral {
  color: var(--color-text-secondary);
}

.bc-tabs__btn.is-active {
  color: var(--color-accent-gold);
  border-bottom-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.04);
}

.bc-form__status.is-ok {
  color: var(--color-success);
}

.bc-form__status.is-error {
  color: var(--color-error);
}







/* ── _09-messaging-exercises.css ── */
/* ============================================
   SECTION: Mensajería / Chat Interno
   ============================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar__badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-text-primary);
  background: var(--color-accent-red);
  border: 1px solid #000;
}

.panel__body--messaging {
  padding: 0;
  min-height: min(70vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  min-height: min(70vh, 720px);
  max-height: min(78vh, 820px);
  height: min(78vh, 820px);
  overflow: hidden;
}

.chat[data-mode="client"] .chat__sidebar {
  display: none;
}

.chat[data-mode="client"] {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.chat__sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  min-height: 0;
}

.chat__sidebar-head {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.chat__sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.chat__thread-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior-y: contain;
}

.chat__empty {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.chat__loading {
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat__loading-bar {
  display: block;
  height: 0.7rem;
  border-radius: 4px;
  background: var(--color-border, #e0dbd5);
  animation: chatLoadingPulse 1.4s ease-in-out infinite;
}

.chat__loading-bar:nth-child(1) { width: 70%; }
.chat__loading-bar:nth-child(2) { width: 55%; animation-delay: 0.2s; }
.chat__loading-bar:nth-child(3) { width: 80%; animation-delay: 0.4s; }

@keyframes chatLoadingPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

[data-theme="dark"] .chat__loading-bar,
.dark-mode .chat__loading-bar {
  background: var(--color-border, #3a3330);
}

.chat__thread {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.chat__thread:hover,
.chat__thread:focus-visible {
  background: var(--color-surface-hover);
  outline: none;
}

.chat__thread--active {
  background: var(--color-surface-raised);
  border-left: 3px solid var(--color-accent-red);
}

.chat__thread-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat__thread-preview {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat__thread-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.chat__thread-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.chat__unread {
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-accent-red);
  color: #fff;
  border-radius: 999px;
}

.chat__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--color-bg-deep);
}

.chat__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.65rem var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
  z-index: 2;
}

.chat__back {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 999px;
}

.chat__peer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.chat__peer-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat__peer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.chat__peer-status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
}

.chat__peer-status[data-live="1"]::before {
  background: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.22);
}

.chat__messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.85rem 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  max-height: 100%;
  scroll-behavior: smooth;  overscroll-behavior-y: contain;
  background:
    radial-gradient(ellipse at top, rgba(92, 36, 48, 0.05), transparent 55%),
    var(--color-bg-deep);
}

.chat__messages.chat__messages--no-smooth {
  scroll-behavior: auto !important;
}

.chat__messages-end {
  width: 100%;
  height: 1px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  pointer-events: none;
  visibility: hidden;
}

.chat__placeholder {
  margin: auto;
  text-align: center;
  max-width: 300px;
  padding: 1.25rem 1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.chat__placeholder p {
  margin: 0;
}

.chat__placeholder::before {
  content: 'Canal privado';
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.chat__day {
  align-self: center;
  margin: 0.45rem 0;
  padding: 0.25rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-radius: 999px;
  background: var(--cm-border-88);
}

.chat__bubble {
  max-width: min(82%, 420px);
  padding: 0.6rem 0.8rem 0.45rem;
  border: 0;
  border-radius: 16px;
  animation: chatBubbleIn 180ms ease-out;
  position: relative;
}

.chat__bubble--mine {
  align-self: flex-end;
  margin-left: auto;
  background: linear-gradient(165deg, var(--color-accent-hover) 0%, var(--color-accent-red) 100%);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 6px 18px rgba(114, 28, 36, 0.28);
}

.chat__bubble--theirs {
  align-self: flex-start;
  margin-right: auto;
  background: var(--color-surface-float);
  color: var(--color-text-primary);
  border-bottom-left-radius: 5px;
  box-shadow: var(--shadow-elev-1);
}

.chat__bubble-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat__bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  margin-top: 0.2rem;
  min-height: 1rem;
}

.chat__bubble-time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  opacity: 0.75;
  line-height: 1;
}

.chat__bubble--mine .chat__bubble-time {
  opacity: 0.85;
}

.chat__checks {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: -0.08em;
  opacity: 0.55;
  user-select: none;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.chat__checks--read {
  opacity: 0.95;
  color: #c9e8ff;
}

.chat__composer {
  flex-shrink: 0;
  padding: 0.55rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom, 0px) + var(--keyboard-inset, 0px));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 3;
}

.chat__composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.chat__attach,
.chat__mic {
  flex: 0 0 auto;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast), color var(--transition-fast);
}

.chat__attach {
  color: var(--color-text-secondary);
  background: transparent;
}

.chat__attach:hover:not(:disabled),
.chat__attach:focus-visible {
  color: var(--color-accent-red);
  background: var(--color-accent-soft);
  outline: none;
}

.chat__attach:disabled,
.chat__mic:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat__mic {
  color: #fff;
  background: var(--color-accent-red);
  user-select: none;
  box-shadow: 0 2px 8px rgba(92, 36, 48, 0.35);
}

.chat__mic:hover:not(:disabled) {
  background: var(--color-accent-red-hover);
}

.chat__mic:active:not(:disabled),
.chat__mic.is-recording {
  transform: scale(1.08);
}

.chat__mic.is-recording {
  animation: chatMicPulse 1s ease-in-out infinite;
}

@keyframes chatMicPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--color-accent-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.chat__recording-hint {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-accent-red);
  text-align: center;
}

.chat__recording-hint--cancel {
  color: #f0c14b;
}

.chat__recording-hint--flash {
  color: var(--color-text-muted);
}

.chat__composer--recording .chat__input {
  opacity: 0.55;
}

.chat__composer--cancel-armed .chat__mic {
  background: #8a6d1a;
  animation: none;
}

.chat__media-error {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
  cursor: pointer;
}

.chat__media-error:hover {
  color: var(--color-text-primary);
  border-color: var(--color-accent-red);
}

/* ── Typing indicator ─────────────────────────────────────────────────── */
.chat__typing-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem 0.25rem;
  min-height: 1.6rem;
  animation: chat-typing-in 0.18s ease;
}

@keyframes chat-typing-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat__typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.chat__typing-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: chat-dot-bounce 1.2s infinite ease-in-out;
}

.chat__typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat__typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-4px); }
}

.chat__typing-text {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Search bar ───────────────────────────────────────────────────────── */
.chat__search-btn,
.chat__push-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chat__search-btn:hover,
.chat__push-btn:hover,
.chat__search-btn:focus-visible,
.chat__push-btn:focus-visible {
  background: var(--color-bg-subtle);
  color: var(--color-text-primary);
}

.chat__push-btn--active {
  color: var(--color-accent-green, #4caf50);
}

.chat__search-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
  animation: chat-search-in 0.15s ease;
}

@keyframes chat-search-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat__search-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.chat__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: max(16px, 0.9rem); /* min 16px → evita zoom iOS */
  outline: none;
}

.chat__search-input::placeholder {
  color: var(--color-text-muted);
}

.chat__search-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat__search-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  transition: color 0.15s;
}

.chat__search-close:hover { color: var(--color-text-primary); }

/* ── Load more ────────────────────────────────────────────────────────── */
.chat__load-more {
  display: block;
  width: calc(100% - 2rem);
  margin: 0.75rem auto;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chat__load-more:hover:not(:disabled) {
  background: var(--color-bg-subtle);
  color: var(--color-text-primary);
}

.chat__load-more:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ── Bubble context menu (delete) ──────────────────────────────────────── */
.chat__bubble-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  z-index: 200;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  overflow: hidden;
  min-width: 160px;
  animation: chat-menu-in 0.12s ease;
}

@keyframes chat-menu-in {
  from { opacity: 0; transform: scale(0.92) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.chat__bubble-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

/* ── _09-messaging-exercises.css ── */
.chat__bubble-menu-item:hover {
  background: var(--color-bg-subtle);
}

.chat__bubble-menu-item--danger {
  color: var(--color-accent-red, #e05252);
}

/* ── Read receipts: animated transition ────────────────────────────────── */
.chat__checks--read {
  animation: chat-checks-read 0.3s ease;
}

@keyframes chat-checks-read {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

.chat__input {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  resize: none;
  min-height: 2.75rem;
  max-height: 7.5rem;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: max(16px, 0.95rem);
  line-height: 1.35;
  color: var(--color-text-primary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  outline: none;
  field-sizing: content;
}

.chat__input:focus {
  border-color: var(--color-accent-red);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.chat__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat__send {
  flex: 0 0 auto;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-red);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(92, 36, 48, 0.35);
  transition: transform var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.chat__send:hover:not(:disabled) {
  background: var(--color-accent-red-hover);
  transform: scale(1.04);
}

.chat__send:active:not(:disabled) {
  transform: scale(0.96);
}

.chat__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.chat__send.btn--loading {
  pointer-events: none;
  opacity: 0.7;
}

.chat__send-icon,
.chat__mic-icon {
  display: block;
  transform: translateX(1px);
}

.chat__audio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 180px;
  padding: 0.15rem 0.1rem;
}

.chat__audio audio {
  display: none;
}

.chat__audio-play {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat__bubble--mine .chat__audio-play {
  background: rgba(255, 255, 255, 0.22);
}

.chat__bubble--theirs .chat__audio-play {
  background: color-mix(in srgb, var(--color-accent-red) 16%, transparent);
  color: var(--color-accent-red);
}

.chat__audio-wave {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 1.4rem;
  min-width: 0;
}

.chat__audio-wave span {
  width: 2.5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  height: 40%;
  transition: height 160ms ease, opacity 160ms ease;
}

.chat__audio-wave span:nth-child(2) { height: 70%; opacity: 0.6; }
.chat__audio-wave span:nth-child(3) { height: 100%; opacity: 0.85; }
.chat__audio-wave span:nth-child(4) { height: 55%; opacity: 0.55; }
.chat__audio-wave span:nth-child(5) { height: 80%; opacity: 0.7; }

.chat__audio-dur {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.85;
  min-width: 2.2rem;
  text-align: right;
}

.chat__media {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 0.15rem;
  max-width: 100%;
}

.chat__media-img,
.chat__media-video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.chat__media-video {
  object-fit: contain;
  background: #000;
  max-height: 320px;
}


@media (max-width: 860px) {
  #panelMessaging.panel--active {
    display: flex;
    flex-direction: column;
    /* dvh: reacciona al teclado virtual; fallback svh/vh */
    min-height: 0;
    height: calc(100vh - 4.5rem);
    height: calc(100svh - 4.5rem);
    height: calc(100dvh - 4.5rem);
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100svh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow: hidden;
  }

  #panelMessaging .panel__header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    flex-shrink: 0;
  }

  #panelMessaging .panel__subtitle,
  #panelMessaging .null-companion-host {
    display: none;
  }

  .panel__body--messaging {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chat {
    grid-template-columns: 1fr;
    max-height: none;
    min-height: 0;
    flex: 1;
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    overflow: hidden;
  }

  .chat[data-mode="trainer"] .chat__main {
    display: none;
  }

  .chat[data-mode="trainer"].chat--conversation-open .chat__sidebar {
    display: none;
  }

  .chat[data-mode="trainer"].chat--conversation-open .chat__main {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .chat[data-mode="client"] .chat__main,
  .chat--conversation-open .chat__main {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .chat__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .chat__back[hidden] {
    display: none !important;
  }

  .chat__composer {
    padding-bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px) + var(--keyboard-inset, 0px));
  }

  /*
    Teclado abierto: anclar el panel al visualViewport (--vv-height)
    para que mensajes + composer queden visibles sin scroll manual.
  */
  body.chat-keyboard-open {
    overflow: hidden;
  }

  body.chat-keyboard-open .topbar {
    visibility: hidden;
    pointer-events: none;
  }

  body.chat-keyboard-open #panelMessaging .panel__header {
    display: none;
  }

  body.chat-keyboard-open #panelMessaging.panel--active {
    position: fixed;
    top: var(--vv-offset-top, 0px);
    left: 0;
    right: 0;
    width: 100%;
    height: var(--vv-height, 100dvh);
    max-height: var(--vv-height, 100dvh);
    min-height: 0;
    margin: 0;
    padding: 0;
    z-index: 80;
    background: var(--color-bg);
    overflow: hidden;
  }

  body.chat-keyboard-open .panel__body--messaging,
  body.chat-keyboard-open .chat,
  body.chat-keyboard-open .chat__main {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.chat-keyboard-open .chat {
    border: 0;
  }

  /* Con altura = visualViewport, no sumar otra vez el inset del teclado */
  body.chat-keyboard-open .chat__composer {
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat__bubble {
    animation: none;
  }

  .chat__messages {
    scroll-behavior: auto;
  }

  .chat__mic.is-recording {
    animation: none;
  }

  .chat__send:hover:not(:disabled),
  .chat__send:active:not(:disabled) {
    transform: none;
  }
}

html[data-theme-mode="dark"] .chat__messages {
  background:
    radial-gradient(ellipse at top, rgba(92, 36, 48, 0.12), transparent 50%),
    var(--color-bg-deep);
}

html[data-theme-mode="dark"] .chat__bubble--theirs {
  background: var(--color-surface-raised);
  box-shadow: none;
}

/* --- Body composition: live calculator + trend chart --- */

.session__table-wrapper {
  max-width: 100%;
  overflow-x: auto;}



/* ============================================
   Biblioteca de ejercicios + modal de técnica
   ============================================ */

.exlib__intro {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-lg);
  line-height: 1.5;
}

.exlib__seed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) 0;
}

.exlib__seed-hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.exlib__count {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.exlib__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.exlib__form-span {
  grid-column: 1 / -1;
}

.exlib__form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.exlib__status {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.exlib__status[data-kind="success"] { color: #7dcea0; }
.exlib__status[data-kind="error"] { color: var(--color-error); }
.exlib__status[data-kind="pending"] { color: var(--color-accent-gold); }

.exlib__toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.exlib__list-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
}

.exlib__table th {
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  background: var(--color-bg-deep);
}

.exlib__name {
  display: block;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.exlib__snip {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.exlib__cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-gold-dim);
  border: 1px solid var(--color-border-strong);
  padding: 2px 8px;
  white-space: nowrap;
}

.exlib__video-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-accent-gold);
  text-decoration: underline;
}

.exlib__muted {
  color: var(--color-text-muted);
}

.exlib__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

/* ============================================
   Modal primitive — chrome compartido (tokens)
   Layout específico (drawer / sheet / centrado) queda en cada BEM.
   ============================================ */
.tech-modal__backdrop,
.muscle-map-modal__backdrop,
.client-profile-modal__backdrop,
.client-delete-confirm__backdrop,
.client-unlink-confirm__backdrop,
.auth-login-modal__backdrop,
.legal-modal__backdrop,
.wa-qualify-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.tech-modal__dialog,
.muscle-map-modal__dialog,
.client-profile-modal__dialog,
.client-delete-confirm__dialog,
.client-unlink-confirm__dialog,
.auth-login-modal__dialog,
.legal-modal__dialog,
.wa-qualify-modal__dialog {
  position: relative;
  z-index: 1;
  background: var(--modal-dialog-bg);
  border: var(--modal-border);
  border-radius: var(--modal-radius);
  box-shadow: var(--modal-shadow);
}

.tech-modal__header,
.muscle-map-modal__header,
.client-profile-modal__header,
.auth-login-modal__header,
.legal-modal__header,
.wa-qualify-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--modal-header-pad);
  flex-shrink: 0;
}

.tech-modal__title,
.muscle-map-modal__title,
.client-profile-modal__title,
.auth-login-modal__title,
.legal-modal__title,
.wa-qualify-modal__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--modal-title-size);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--modal-title-color);
}

.tech-modal__close,
.muscle-map-modal__close,
.client-profile-modal__close,
.auth-login-modal__close,
.legal-modal__close,
.wa-qualify-modal__close {
  flex: 0 0 auto;
  width: var(--modal-close-size);
  height: var(--modal-close-size);
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  touch-action: manipulation;
}

body.tech-modal-open {
  position: fixed;   /* evita scroll-jump al cerrar modal en iOS Safari */
  width: 100%;
  overflow: hidden;
}

.tech-modal[hidden] {
  display: none !important;
}

.tech-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-drawer),
    visibility var(--transition-drawer);
}

.tech-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tech-modal__backdrop {
  opacity: 0;
  transition: opacity var(--transition-drawer);
}

.tech-modal.is-open .tech-modal__backdrop {
  opacity: 1;
}

.tech-modal__dialog {
  width: min(420px, 100%);
  height: 100%;
  max-height: 100%;
  overflow: auto;
  border: none;
  border-radius: 0;
  border-left: var(--modal-border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity var(--transition-drawer),
    transform var(--transition-drawer);
  will-change: opacity, transform;
}

.tech-modal.is-open .tech-modal__dialog {
  opacity: 1;
  transform: translateX(0);
}

.tech-modal__header {
  border-bottom: 1px dashed var(--color-border-strong);
}

.tech-modal__header-copy {
  min-width: 0;
}

.tech-modal__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tech-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.tech-modal__close {
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-deep);
  color: var(--color-text-secondary);
  border-radius: var(--control-radius);
}

.tech-modal__close:hover {
  border-color: var(--color-accent-red);
  color: #fff;
}

.tech-modal__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.tech-modal__category {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent, #4DB8FF);
}

.tech-modal__desc {
  margin: 0;
  font-family: var(--font-typewriter);
  font-size: 0.95rem;
  line-height: 1.55;
  color: #d9d2c3;
  white-space: pre-wrap;
}

.tech-modal__video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--color-surface);
  border: 1px solid #2e2c26;
}

.tech-modal__video iframe,
.tech-modal__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tech-modal__video video {
  object-fit: contain;
  background: #000;
}

.tech-modal__empty {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.tech-modal__readonly {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(77, 184, 255, 0.3);
  border-left: 3px solid var(--color-accent, #4DB8FF);
  background: rgba(77, 184, 255, 0.08);
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-text-primary, #e8eaed);
}

.tech-modal__link {
  align-self: flex-start;
}

@media (max-width: 640px) {
  .tech-modal {
    align-items: flex-end;
    justify-content: stretch;
  }

  .tech-modal__dialog {
    width: 100%;
    height: min(88vh, 100%);
    max-height: 88vh;
    border-left: none;
    border-top: 2px solid #3d3930;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
    transform: translateY(16px);
  }

  .tech-modal.is-open .tech-modal__dialog {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-modal,
  .tech-modal__backdrop,
  .tech-modal__dialog {
    transition: none !important;
  }

  .tech-modal__dialog {
    transform: none !important;
  }
}

/* ——— Mapa muscular post-sesión ——— */
body.muscle-map-open {
  overflow: hidden;
}

.muscle-map-modal[hidden] {
  display: none !important;
}

.muscle-map-modal {
  position: fixed;
  inset: 0;
  z-index: 13100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  pointer-events: none;
}

.muscle-map-modal:not([hidden]) {
  pointer-events: auto;
}

.muscle-map-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.muscle-map-modal__backdrop {
  background: color-mix(in srgb, var(--color-bg-deep) 78%, transparent);
  backdrop-filter: blur(2px);
}

.muscle-map-modal__dialog {
  width: min(720px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-heavy);
}

.muscle-map-modal__header {
  position: relative;
  padding: var(--space-lg) var(--space-xl) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.muscle-map-modal__eyebrow {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.muscle-map-modal__title {
  padding-right: 2.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.muscle-map-modal__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--control-radius);
  background: var(--color-bg-deep);
  color: var(--color-text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.muscle-map-modal__close:hover {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
}

.muscle-map-modal__body {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.muscle-map-modal__question {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.muscle-map-modal__hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.muscle-map-modal__views {
  display: inline-flex;
  align-self: flex-start;
  gap: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-deep);
}

.muscle-map-modal__view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.muscle-map-modal__view-btn.is-active {
  background: var(--color-accent-red);
  color: #fff;
}

.muscle-map-modal__figures {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: var(--space-md) 0;
  background:
    radial-gradient(ellipse at 50% 20%, var(--color-accent-soft), transparent 55%),
    var(--color-bg-deep);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.muscle-map-figure {
  margin: 0;
  width: min(240px, 72vw);
  text-align: center;
}

.muscle-map-figure[hidden] {
  display: none !important;
}

.muscle-map-figure__cap {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.muscle-map-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.muscle-map-svg__outline {
  stroke: var(--color-border-strong);
  stroke-width: 1.5;
  fill: rgba(255, 255, 255, 0.35);
}

.muscle-map-svg__bone {
  fill: rgba(212, 216, 222, 0.55);
  stroke: var(--color-border);
  stroke-width: 0.8;
  pointer-events: none;
}

.muscle-region {
  fill: rgba(92, 36, 48, 0.08);
  stroke: rgba(92, 36, 48, 0.28);
  stroke-width: 1.2;
  cursor: pointer;
  transition:
    fill var(--transition-base),
    stroke var(--transition-base),
    filter var(--transition-base),
    transform var(--transition-fast);
  transform-box: fill-box;
  transform-origin: center;
}

.muscle-region:hover,
.muscle-region:focus-visible {
  fill: rgba(92, 36, 48, 0.22);
  stroke: var(--color-accent-red);
  outline: none;
  filter: drop-shadow(0 0 6px rgba(92, 36, 48, 0.25));
}

.muscle-region.is-selected {
  fill: var(--color-accent-red);
  stroke: var(--color-accent-hover);
  filter: drop-shadow(0 0 10px rgba(92, 36, 48, 0.45));
  animation: musclePulse 480ms ease-out;
}

@keyframes musclePulse {
  0% { transform: scale(0.96); opacity: 0.85; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.muscle-map-modal__selection {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  min-height: 1.6rem;
}

.muscle-map-modal__selection-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.muscle-map-modal__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.muscle-map-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid rgba(92, 36, 48, 0.2);
}

.muscle-map-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

html[data-theme-mode="dark"] .muscle-map-svg__outline {
  fill: color-mix(in srgb, var(--color-bg) 55%, transparent);
  stroke: color-mix(in srgb, var(--color-accent) 35%, transparent);
}

html[data-theme-mode="dark"] .muscle-map-svg__bone {
  fill: color-mix(in srgb, var(--color-surface) 60%, transparent);
  stroke: color-mix(in srgb, var(--color-accent) 20%, transparent);
}

html[data-theme-mode="dark"] .muscle-region {
  fill: var(--color-accent-soft);
  stroke: color-mix(in srgb, var(--color-accent) 35%, transparent);
}

html[data-theme-mode="dark"] .muscle-region:hover,
html[data-theme-mode="dark"] .muscle-region:focus-visible {
  fill: var(--cm-accent-28t);
  stroke: var(--color-accent);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--color-accent) 35%, transparent));
}

html[data-theme-mode="dark"] .muscle-region.is-selected {
  fill: var(--color-accent);
  stroke: var(--color-accent-hover);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--color-accent) 55%, transparent));
}

html[data-theme-mode="dark"] .muscle-map-modal__view-btn.is-active {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

html[data-theme-mode="dark"] .muscle-map-chip {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
  border-color: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

.trainer-muscle-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.trainer-muscle-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
  border: 1px solid rgba(92, 36, 48, 0.18);
}

@media (min-width: 640px) {
  .muscle-map-modal__figures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .muscle-map-figure {
    width: min(220px, 100%);
  }

  .muscle-map-figure[hidden] {
    display: block !important;
  }

  .muscle-map-modal__views {
    display: none;
  }
}

@media (max-width: 720px) {
  .exlib__form-grid,
  .exlib__toolbar {
    grid-template-columns: 1fr;
  }
}

/* ── _10-smart-feed.css ── */
/* ============================================
   SMART FEED — Semáforos de rendimiento
   ============================================ */

.smart-feed__dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.smart-feed__dot--red.smart-feed__dot--pulse {
  animation: smartFeedPulse 1.6s ease-in-out infinite;
}

.smart-feed__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

.smart-feed__stat strong {
  font-weight: 700;
  color: var(--color-text-primary);
  margin-right: 0.25rem;
}

.smart-feed__stat[data-stat="red"] strong { color: #e53935; }
.smart-feed__stat[data-stat="amber"] strong { color: var(--color-accent-gold); }
.smart-feed__stat[data-stat="green"] strong { color: #43a047; }

.smart-feed__sync {
  margin-left: auto;
  font-size: 0.62rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.smart-feed__sync--live::before {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #43a047;
  vertical-align: middle;
  animation: smartFeedPulse 2s ease-in-out infinite;
}

.smart-feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.smart-feed__empty {
  padding: var(--space-lg) var(--space-sm);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.smart-feed__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  background: transparent;
  transition: background var(--transition-fast), transform var(--transition-fast);
  animation: smartFeedItemIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.smart-feed__item:last-child {
  border-bottom: none;
}

.smart-feed__item:hover,
.smart-feed__item:focus-visible {
  background: var(--color-surface-hover);
  outline: none;
}

.smart-feed__item:active {
  transform: translateX(2px);
}

.smart-feed__signal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
}

.smart-feed__signal .smart-feed__dot {
  width: 0.7rem;
  height: 0.7rem;
}

.smart-feed__main {
  min-width: 0;
}

.smart-feed__title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.smart-feed__title-row .smart-feed__name {
  flex: 1;
  min-width: 0;
}

.smart-feed__manage {
  appearance: none;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.smart-feed__manage:hover,
.smart-feed__manage:focus-visible {
  color: var(--color-accent-gold);
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  outline: none;
}

.smart-feed__manage-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.smart-feed__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-feed__reason {
  margin: 0.15rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.smart-feed__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.smart-feed__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.smart-feed__action {
  appearance: none;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.smart-feed__action:hover,
.smart-feed__action:focus-visible {
  border-color: var(--color-accent-gold);
  color: var(--color-accent-gold);
  outline: none;
}

.smart-feed__action--primary {
  border-color: var(--color-accent-red);
  color: var(--color-text-primary);
}

.smart-feed__action--primary:hover,
.smart-feed__action--primary:focus-visible {
  background: rgba(150, 28, 28, 0.2);
  border-color: var(--color-accent-red-hover);
  color: var(--color-text-primary);
}

.smart-feed__action--manage {
  border-style: dashed;
}

@keyframes smartFeedPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

@keyframes smartFeedItemIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .smart-feed__item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .smart-feed__actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .smart-feed__sync {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smart-feed__item,
  .smart-feed__dot--pulse,
  .smart-feed__sync--live::before {
    animation: none;
  }
}

/* ============================================
   Gestión de perfil de cliente (Smart Feed)
   ============================================ */

body.client-profile-modal-open,
body.client-delete-confirm-open {
  overflow: hidden;
}

.client-profile-modal[hidden],
.client-delete-confirm[hidden] {
  display: none;
}

.client-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.client-profile-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.client-profile-modal__backdrop {
  background: color-mix(in srgb, var(--color-bg-deep) 62%, transparent);
}

.client-profile-modal__dialog {
  width: min(28rem, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(201, 154, 62, 0.06), transparent 28%),
    var(--modal-dialog-bg);
  border: none;
  border-radius: 0;
  border-left: var(--modal-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.client-profile-modal.is-open .client-profile-modal__dialog {
  transform: translateX(0);
}

.client-profile-modal__header {
  padding: 1.15rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.client-profile-modal__eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.client-profile-modal__title {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.client-profile-modal__close {
  appearance: none;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text-secondary);
  border-radius: var(--control-radius);
}

.client-profile-modal__close:hover {
  color: var(--color-accent-gold);
  border-color: var(--color-accent-gold);
}

.client-profile-modal__body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.15rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.client-profile-modal__status {
  margin: 0;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.client-profile-modal__status[data-type="ok"] {
  border-color: rgba(67, 160, 71, 0.45);
  color: #81c784;
}

.client-profile-modal__status[data-type="error"] {
  border-color: rgba(229, 115, 115, 0.5);
  color: #ef9a9a;
}

.client-profile-modal__status[data-type="info"] {
  border-color: rgba(201, 154, 62, 0.4);
  color: var(--color-accent-gold);
}

.client-profile-modal__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
}

.client-profile-modal__metric {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.18);
}

.client-profile-modal__metric--wide {
  grid-column: 1 / -1;
}

.client-profile-modal__metric dt {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.client-profile-modal__metric dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  word-break: break-word;
}

.client-profile-modal__mono {
  font-family: var(--font-mono);
  font-size: 0.68rem !important;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary) !important;
}

.client-profile-modal__form .form__group {
  margin-bottom: 0.85rem;
}

.client-profile-modal__form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.client-profile-modal__danger {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--btn-danger-border);
}

.client-profile-modal__danger-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--btn-danger-fg-hover);
}

.client-profile-modal__danger-copy {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.client-delete-confirm {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.client-delete-confirm.is-open {
  opacity: 1;
  pointer-events: auto;
}

.client-delete-confirm__backdrop {
  background: color-mix(in srgb, #000 72%, transparent);
}

.client-delete-confirm__dialog {
  width: min(24rem, 100%);
  padding: 1.25rem;
  border: 1px solid var(--btn-danger-border);
  background:
    linear-gradient(160deg, var(--btn-danger-bg-hover), transparent 50%),
    var(--modal-dialog-bg);
  transform: translateY(10px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.client-delete-confirm.is-open .client-delete-confirm__dialog {
  transform: translateY(0) scale(1);
}

.client-delete-confirm__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--btn-danger-fg-hover);
}

.client-delete-confirm__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
}

.client-delete-confirm__desc {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.client-delete-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

@media (max-width: 640px) {
  .client-profile-modal__dialog {
    width: 100%;
  }

  .client-profile-modal__metrics {
    grid-template-columns: 1fr;
  }

  .client-profile-modal__metric--wide {
    grid-column: auto;
  }
}

/* Confirmación de baja (desvincular, no destructivo) */
.client-unlink-confirm__backdrop {
  background: color-mix(in srgb, #000 65%, transparent);
}

.client-unlink-confirm__dialog {
  width: min(22rem, 100%);
  padding: 1.25rem;
  border: 1px solid var(--btn-danger-border);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--btn-danger-bg-hover) 50%, transparent), transparent 50%),
    var(--modal-dialog-bg);
  transform: translateY(10px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.client-unlink-confirm.is-open .client-unlink-confirm__dialog {
  transform: translateY(0) scale(1);
}

.client-unlink-confirm__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--btn-danger-fg-hover);
}

.client-unlink-confirm__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
}

.client-unlink-confirm__desc {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.client-unlink-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .client-profile-modal,
  .client-profile-modal__dialog,
  .client-delete-confirm,
  .client-delete-confirm__dialog,
  .client-unlink-confirm,
  .client-unlink-confirm__dialog {
    transition: none;
  }
}

/* ============================================
   SECTION: Calculadora de progresión de cargas
   ============================================ */

.load-prog {
  margin: 0 0 var(--space-md);
  padding: 0;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.load-prog[hidden] {
  display: none !important;
}

.load-prog__toggle {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.load-prog__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C2430;
  font-weight: 700;
}

.load-prog__mode {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 6px;
  color: var(--color-text-muted, #6b7280);
  background: #f8fafc;
}

.load-prog__mode[data-mode="progress"] {
  border-color: color-mix(in srgb, #5C2430 25%, #E5E7EB);
  color: #5C2430;
  background: color-mix(in srgb, #5C2430 6%, #ffffff);
}

.load-prog__mode[data-mode="hold"] {
  border-color: var(--color-border, #E5E7EB);
  color: var(--color-text-muted, #6b7280);
  background: #f3f4f6;
}

.load-prog__mode[data-mode="deload"] {
  border-color: color-mix(in srgb, #5C2430 35%, #E5E7EB);
  color: #5C2430;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
}

.load-prog__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.load-prog[data-open="true"] .load-prog__chevron,
.load-prog__toggle[aria-expanded="true"] .load-prog__chevron {
  transform: rotate(225deg);
}

.load-prog__body {
  padding: 0 0.85rem 0.75rem;
}

.load-prog__body[hidden] {
  display: none !important;
}

.load-prog__text {
  font-family: var(--font-body, inherit);
  font-size: 0.84rem;
  color: var(--color-text-primary, #111827);
  line-height: 1.4;
  margin: 0;
}

.load-prog--focus {
  margin: 8px 0 0;
  border-radius: 10px;
  background: color-mix(in srgb, #5C2430 3%, #ffffff);
}

.load-prog--focus .load-prog__toggle {
  padding: 0.55rem 0.7rem;
}

.load-prog--focus .load-prog__body {
  padding: 0 0.7rem 0.6rem;
}

.load-prog--focus .load-prog__text {
  font-size: 0.78rem;
  color: var(--color-text-secondary, #4b5563);
}

.session-resume {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 var(--space-md);
  padding: 1rem 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, #5C2430 22%, #E5E7EB);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #5C2430 5%, #ffffff) 0%, #ffffff 70%);
}

.session-resume[hidden] {
  display: none !important;
}

.session-resume__eyebrow {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C2430;
}

.session-resume__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary, #111827);
}

.session-resume__meta {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  color: var(--color-text-secondary, #6b7280);
}

.session-resume__cta {
  width: 100%;
  min-height: 48px;
}

#activeSessionCard.is-session-resume .logbook__nav-hint,
#activeSessionCard.is-session-resume .session-recover-banner,
#activeSessionCard.is-session-resume .coach-voice,
#activeSessionCard.is-session-resume .load-prog,
#activeSessionCard.is-session-resume .warmup-block,
#activeSessionCard.is-session-resume .session__table-wrapper,
#activeSessionCard.is-session-resume .live-volume,
#activeSessionCard.is-session-resume .logbook__quote {
  display: none !important;
}

.notebook__suggest--compact .notebook__suggest-change,
.notebook__suggest--compact .notebook__suggest-evidence {
  display: none !important;
}

.notebook__suggest--compact .notebook__suggest-reason {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notebook__suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding: 0.4rem 0.5rem;
  border: 1px dashed #4a453c;
  background: rgba(0, 0, 0, 0.35);
}

.notebook__suggest[data-state="applied"] {
  border-style: solid;
  border-color: rgba(46, 125, 50, 0.55);
  background: rgba(46, 125, 50, 0.1);
}

.notebook__suggest[data-state="adjusted"] {
  border-color: rgba(201, 154, 62, 0.5);
}

/* ── _10-smart-feed.css ── */
.notebook__suggest-copy {
  min-width: 0;
  flex: 1;
}

.notebook__suggest-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  margin-bottom: 0.1rem;
}

.notebook__suggest-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notebook__suggest-reason {
  display: block;
  font-family: var(--font-typewriter);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin-top: 0.1rem;
  line-height: 1.25;
}

.notebook__suggest-accept {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--color-accent-gold);
  background: var(--color-surface);
  color: var(--color-accent-gold);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.notebook__suggest-accept:hover,
.notebook__suggest-accept:focus-visible {
  background: var(--color-accent-gold);
  color: #111;
  outline: none;
}

.notebook__suggest-accept[hidden] {
  display: none !important;
}

.notebook__row--suggested .notebook__input {
  border-color: rgba(201, 154, 62, 0.45);
}


/* Focus suggestion chip (progression calculator) */
.focus-mode__suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  animation: loadSuggestIn 280ms ease-out;
}
.focus-mode__suggest[hidden] { display: none !important; }
.focus-mode__suggest-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red-muted);
  margin: 0 0 0.15rem;
}
.focus-mode__suggest-value {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
  color: var(--color-red-vibrant);
}
.focus-mode__suggest-reason {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  margin: 0.3rem 0 0;
}
.focus-mode__suggest-change {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-red-vibrant);
  margin: 0.25rem 0 0;
}
.focus-mode__suggest-evidence {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin: 0.2rem 0 0;
  line-height: 1.3;
}
.focus-mode__suggest-change[hidden],
.focus-mode__suggest-evidence[hidden] {
  display: none !important;
}
.focus-mode__suggest-accept {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 0.9rem;
  min-height: var(--touch-min);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-red-vibrant);
  color: #fafaf7;
  cursor: pointer;
  box-shadow: var(--glow-red-soft);
}
.focus-mode__suggest-accept:hover,
.focus-mode__suggest-accept:focus-visible {
  outline: none;
  filter: brightness(1.05);
}
.notebook__suggest-row td {
  padding: 0 0.5rem 0.55rem !important;
  border-bottom: 1px dashed #2f2c27;
}
@keyframes loadSuggestIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .focus-mode__suggest { animation: none; }
}

/* ── _11-active-workout.css ── */
﻿/* ============================================
   MODO ENFOQUE DE SESIÓN — Active Workout View
   Card-based · móvil · fat-finger limpio
   ============================================ */

body.focus-mode-open {
  overflow: hidden;
}

body.focus-mode-open .sidebar,
body.focus-mode-open .sidebar__overlay,
body.focus-mode-open .topbar,
body.focus-mode-open .app__footer {
  visibility: hidden;
  pointer-events: none;
}

.focus-mode {
  position: fixed;
  top: var(--vv-offset-top, 0px);
  left: 0;
  right: 0;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  height: var(--vv-height, 100dvh);
  max-height: var(--vv-height, 100dvh);
  background: var(--color-bg);
  color: var(--color-text-primary);
  overscroll-behavior: none;
  overflow: hidden;
}

.focus-mode[hidden] {
  display: none !important;
}

.focus-mode__shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  /* Safe-area only: --vv-height already shrinks .focus-mode above the keyboard.
     Re-adding --keyboard-inset here double-counts on iOS and crushes the layout. */
  padding:
    max(10px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  gap: 10px;
  box-sizing: border-box;
  min-height: 0;
}

/* —— Header compacto —— */

.focus-mode__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.focus-mode__icon-btn:active {
  background: var(--color-surface-hover);
  border-color: var(--color-red-vibrant);
}



.focus-mode__eyebrow {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.focus-mode__routine {
  margin: 2px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 3.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-red-vibrant);
}

/* —— Cabecera Bento: barra de estado (Nivel 1) —— */
.focus-metrics {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #f3f4f6);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 4px 14px rgba(17, 24, 39, 0.04);
  transition: all 0.3s ease-in-out;
  position: sticky;
  top: 0;
  z-index: 4;
}

.focus-metrics--command[data-timer="running"] {
  padding-bottom: 12px;
}

.focus-metrics__start-wrap {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.focus-metrics__start-wrap[hidden] {
  display: none !important;
}

.focus-metrics__start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-md);
  background: #5C2430;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 20px rgba(92, 36, 48, 0.22);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.focus-metrics__start:hover,
.focus-metrics__start:focus-visible {
  background: #471B24;
  outline: none;
}

.focus-metrics__start:active {
  transform: scale(0.985);
}

.focus-metrics__start:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.focus-mode {
  background: #ffffff;
}

.focus-mode__current--legacy {
  display: none !important;
}

.focus-mode__ex-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.focus-mode__ex-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, #5C2430 22%, #E5E7EB);
  background: color-mix(in srgb, #5C2430 6%, #ffffff);
  color: #5C2430;
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-mode__ex-progress {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.focus-rir-select--inline .focus-rir-select__label {
  flex-shrink: 0;
}

.focus-rir-select--inline .focus-rir-select__chips {
  display: inline-flex;
  gap: 3px;
  flex-wrap: nowrap;
}

.focus-rir-select--inline .focus-rir-chip {
  min-width: 28px;
  min-height: 28px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.focus-set-toolbar__btn--guide.is-open {
  border-color: #5C2430;
  color: #5C2430;
}

.focus-ex-guide {
  margin: 0;
  padding: 0 10px 8px;
  border: none;
}

.focus-ex-guide[hidden] {
  display: none !important;
}

/* —— Declutter: cabecera única, Más opciones, filas compactas —— */
.focus-metrics__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease-in-out;
}

.focus-metrics__chrome .focus-metrics__grid,
.focus-metrics__chrome .focus-metrics__status {
  margin-bottom: 0;
}

.focus-metrics__collapse {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  background: #ffffff;
  color: #5C2430;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s ease-in-out;
}

.focus-metrics__collapse:hover,
.focus-metrics__collapse:focus-visible {
  border-color: rgba(92, 36, 48, 0.35);
  background: rgba(92, 36, 48, 0.04);
  outline: none;
}

.focus-metrics__collapse:active {
  transform: scale(0.96);
}

.focus-metrics__collapse-icon {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
  transition: transform 0.3s ease-in-out;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__collapse-icon {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.focus-metrics__identity {
  flex: 1 1 auto;
  min-width: 0;
  transition: all 0.3s ease-in-out;
}

.focus-metrics__identity .focus-mode__routine {
  margin: 0;
  color: var(--color-text-primary, #111827);
  font-size: clamp(0.95rem, 3.4vw, 1.2rem);
}

.focus-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-text-muted, #6b7280);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: default;
}

.focus-sync-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
}

.focus-sync-pill[data-state="ok"] .focus-sync-pill__dot,
.focus-sync-pill[data-state="idle"] .focus-sync-pill__dot {
  background: #5C2430;
}

.focus-sync-pill[data-state="syncing"] .focus-sync-pill__dot {
  background: #b45309;
}

.focus-sync-pill[data-state="offline"] .focus-sync-pill__dot,
.focus-sync-pill[data-state="error"] .focus-sync-pill__dot {
  background: #9ca3af;
}

.focus-more {
  margin-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--color-border, #E5E7EB) 80%, transparent);
  padding-top: 4px;
}

.focus-more__summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
  padding: 6px 0;
  touch-action: manipulation;
}

.focus-more__summary::-webkit-details-marker {
  display: none;
}

.focus-more__body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}

.focus-more__body .focus-unit-toggle,
.focus-more__body .focus-night-toggle {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text-primary, #111827);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-immersive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted, #6b7280);
}

.focus-deload,
.focus-sparkline {
  display: none !important;
}

.focus-ex-more {
  position: relative;
  flex-shrink: 0;
}

.focus-ex-more__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text-muted, #6b7280);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-ex-more__summary::-webkit-details-marker {
  display: none;
}

.focus-ex-more[open] .focus-ex-more__summary {
  color: #5C2430;
  border-color: color-mix(in srgb, #5C2430 30%, #E5E7EB);
}

.focus-ex-more__body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  padding: 8px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.focus-ex-more__body .focus-set-toolbar__btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
}

.focus-ex-more__body .focus-mode__ex-type,
.focus-ex-more__body .focus-mode__ex-target {
  margin: 4px 2px 0;
  font-size: 0.72rem;
}

.focus-set-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 8px 4px;
}

.focus-set-log__head {
  display: grid;
  grid-template-columns: 28px minmax(56px, 1.15fr) minmax(52px, 1fr) minmax(52px, 0.85fr) 28px 44px;
  gap: 4px;
  padding: 0 2px 4px;
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.focus-set-log__head span:nth-child(5) {
  visibility: hidden;
}

.focus-set-log--uni .focus-set-log__head span:nth-child(5) {
  visibility: visible;
}

.focus-set-log--uni .focus-set-log__head span:nth-child(7) {
  visibility: hidden;
}

.focus-set-row {
  display: grid;
  grid-template-columns: 28px minmax(56px, 1.15fr) minmax(52px, 1fr) minmax(52px, 0.85fr) 28px 44px;
  align-items: center;
  column-gap: 4px;
  row-gap: 2px;
  padding: 4px 2px;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #E5E7EB) 70%, transparent);
  border-radius: 0;
  background: transparent;
  position: relative;
  transition: opacity 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.focus-set-row:last-of-type {
  border-bottom: none;
}

.focus-set-row.is-current {
  background: color-mix(in srgb, #5C2430 4%, #ffffff);
  border-radius: 6px;
}

.focus-set-row.is-done {
  background: color-mix(in srgb, #5C2430 3%, #f8fafc);
  opacity: 0.58;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.focus-set-row.is-done .focus-set-row__input {
  opacity: 0.75;
}

.focus-set-row.is-done.is-current {
  opacity: 0.72;
}

.focus-ghost-fill {
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0 0 4px;
  padding: 4px 8px;
  min-height: 44px; /* touch target mínimo */
  display: inline-flex;
  align-items: center;
  border: 1px dashed color-mix(in srgb, #5C2430 28%, #E5E7EB);
  border-radius: 8px;
  background: color-mix(in srgb, #5C2430 4%, #ffffff);
  color: #5C2430;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.focus-ghost-fill:hover,
.focus-ghost-fill:focus-visible {
  color: #5C2430;
  background: color-mix(in srgb, #5C2430 10%, #ffffff);
  outline: none;
}

.focus-ghost-fill:active {
  transform: scale(0.98);
}

.focus-ghost-fill.is-suggested,
.focus-quick-prev.is-suggested {
  border-style: solid;
  border-color: #5C2430;
  background: color-mix(in srgb, #5C2430 12%, #ffffff);
  box-shadow: 0 0 0 2px color-mix(in srgb, #5C2430 18%, transparent);
}

.focus-set-row.is-unilateral .focus-ghost-fill {
  grid-column: 1 / -1;
}

.focus-set-row.is-pr {
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
}

.focus-set-row__pr-badge {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, #5C2430 12%, #ffffff);
  color: #5C2430;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.focus-set-row.is-marks-error {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #5C2430 35%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, #5C2430 5%, #ffffff);
}

/* —— Command Center extras (progressive disclosure) —— */
.focus-pacing,
.focus-rir-medio,
.focus-low-power-pill {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text-secondary, #6b7280);
}

.focus-rir-medio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.focus-rir-medio__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}

.focus-rir-medio[data-zone="optimal"] .focus-rir-medio__dot { background: #2f6b4f; }
.focus-rir-medio[data-zone="easy"] .focus-rir-medio__dot { background: #b45309; }
.focus-rir-medio[data-zone="hard"] .focus-rir-medio__dot { background: #5C2430; }

.focus-cns-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, #5C2430 10%, #ffffff);
  border: 1px solid color-mix(in srgb, #5C2430 28%, transparent);
  color: #5C2430;
}

.focus-cns-banner[hidden] { display: none; }

.focus-cns-banner__text {
  margin: 0;
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 600;
}

.focus-cns-banner__dismiss {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 2px;
  line-height: 1;
}

.focus-low-power-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.focus-joint {
  margin-top: 8px;
}

.focus-joint[hidden] { display: none; }

.focus-joint__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, #6b7280);
}

.focus-joint__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.focus-joint__chip {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text-primary, #111827);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-joint__chip.is-on {
  border-color: #5C2430;
  background: color-mix(in srgb, #5C2430 12%, #ffffff);
  color: #5C2430;
}

/* Nivel 2: utilidades bajo demanda (alertas + más opciones) */

.focus-utils-drawer__panel .focus-joint {
  margin: 0;
  position: static;
  width: auto;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.focus-joint-drawer .focus-joint {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  width: min(92vw, 320px);
  margin: 0;
  padding: 10px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

.focus-more--in-drawer .focus-more__summary {
  font-size: 0.72rem;
}

.focus-metrics[data-collapsed="true"] .focus-utils-drawer__text,
.focus-metrics[data-collapsed="true"] .focus-joint-drawer__text {
  display: none;
}

.focus-metrics[data-collapsed="true"] .focus-utils-drawer__summary,
.focus-metrics[data-collapsed="true"] .focus-joint-drawer__summary {
  max-width: none;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  justify-content: center;
}

.focus-set-row__input::placeholder {
  color: var(--color-text-muted, #9ca3af);
  font-weight: 500;
  opacity: 1;
}

.focus-set-row.is-unilateral {
  grid-template-columns: 26px minmax(44px, 1fr) minmax(44px, 1fr) minmax(40px, 0.85fr) minmax(40px, 0.85fr) minmax(44px, 0.75fr) 26px 42px;
}

.focus-set-row.is-unilateral .focus-set-row__input--kg,
.focus-set-row.is-unilateral > .focus-set-row__input--reps {
  display: none;
}

.focus-set-log--uni .focus-set-log__head {
  grid-template-columns: 26px minmax(44px, 1fr) minmax(44px, 1fr) minmax(40px, 0.85fr) minmax(40px, 0.85fr) minmax(44px, 0.75fr) 26px 42px;
}

.focus-set-row__side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.focus-set-row__side-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  text-align: center;
}

.focus-smart-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 2px 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, #5C2430 5%, #ffffff);
}

.focus-smart-step[hidden] { display: none; }

.focus-smart-step__text {
  margin: 0;
  flex: 1;
  font-size: 0.72rem;
  color: var(--color-text-secondary, #6b7280);
}

.focus-smart-step__btn {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, #5C2430 35%, transparent);
  border-radius: 8px;
  background: #fff;
  color: #5C2430;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

/* Iron Engine · focus cards */
.iron-engine {
  margin: 8px 2px 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #5C2430 18%, #E5E7EB);
  background:
    linear-gradient(120deg, color-mix(in srgb, #5C2430 7%, #fff), transparent 60%),
    #fff;
}

.iron-engine__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.iron-engine__brand {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
}

.iron-engine__kind {
  font-size: 0.68rem;
  color: var(--color-text-muted, #6b7280);
}

.iron-engine__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.iron-engine__metric {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.iron-engine__metric span {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.iron-engine__metric strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-text, #111);
}

.iron-engine__plates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.iron-engine__plate {
  min-height: 30px;
  min-width: 3.1rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #5C2430 28%, transparent);
  background: #fff;
  color: #5C2430;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.iron-engine__plate:active {
  transform: scale(0.97);
}

.supervise-rir-medio {
  margin: 8px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary, #6b7280);
}

.supervise-rir-medio[data-zone="optimal"] { color: #2f6b4f; }
.supervise-rir-medio[data-zone="easy"] { color: #b45309; }
.supervise-rir-medio[data-zone="hard"] { color: #5C2430; }

.supervise-joint-alert {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #5C2430;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── _11-active-workout.css ── */
.supervise-joint-alert[hidden] { display: none; }

/* Low-power / critical battery */
.focus-mode.is-low-power,
.focus-mode.is-low-power * {
  animation: none !important;
  transition: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

.focus-mode.is-low-power .focus-metrics,
.focus-mode.is-low-power .focus-mode__ex-card,
.focus-mode.is-low-power .focus-mode__dock {
  background: #fff !important;
  background-image: none !important;
}

.focus-mode.is-low-power .focus-live-volume,
.focus-mode.is-low-power .focus-sparkline,
.focus-mode.is-low-power .focus-rest-immersive {
  display: none !important;
}

.focus-set-row__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 6px;
  background: var(--color-surface-raised, #f3f4f6);
  color: var(--color-text-primary, #111827);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
}

.focus-set-row__input {
  width: 100%;
  min-height: 44px;
  padding: 6px 6px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 8px;
  background: var(--color-surface, #ffffff);
  color: var(--color-text-primary, #111827);
  font-family: var(--font-heading);
  font-size: max(16px, 0.95rem); /* ≥16px: evita zoom automático en iOS Safari al enfocar */
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-sizing: border-box;
}

.focus-set-row__input:focus {
  outline: none;
  border-color: #5C2430;
  box-shadow: 0 0 0 2px rgba(92, 36, 48, 0.12);
}

.focus-set-row__input--rir {
  min-width: 0;
  width: 100%;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.focus-set-row__rir-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
}

.focus-set-row__rir-pills {
  display: none;
  position: fixed;
  z-index: 12000;
  min-width: 168px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);
  align-items: center;
  gap: 4px;
  padding: 6px;
  margin: 0;
}

.focus-set-row__rir-pills.is-active {
  display: flex;
}

.focus-set-row__rir-pills::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--color-surface, #ffffff);
  border-left: 1px solid var(--color-border, #e5e7eb);
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.focus-rir-chip--row {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0 2px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-surface-raised, #f8fafc);
  color: var(--color-text-primary, #111827);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.focus-rir-chip--row.is-active {
  background: #5C2430;
  border-color: #5C2430;
  color: #ffffff;
}

.focus-rir-chip--row:active {
  transform: scale(0.96);
}

.focus-set-row__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0.7;
}

.focus-set-row__note-btn.has-note,
.focus-set-row__note-btn.is-open,
.focus-set-row__menu-btn.is-open {
  color: #5C2430;
  opacity: 1;
}

.focus-set-row__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border: 2px solid #5C2430;
  border-radius: 10px;
  background: #ffffff;
  color: #5C2430;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.focus-set-row__check:active {
  transform: scale(0.96);
}

.focus-set-row__check.is-done {
  background: #5C2430;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(92, 36, 48, 0.18);
}

.focus-set-row__menu {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 0 6px;
}

.focus-set-row__menu[hidden] {
  display: none !important;
}

.focus-set-row__menu-item {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 8px;
  background: var(--color-surface, #ffffff);
  color: var(--color-text-primary, #111827);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-set-row__menu-item.is-danger {
  color: #5C2430;
  border-color: color-mix(in srgb, #5C2430 30%, #E5E7EB);
}

.focus-set-row__notes {
  grid-column: 2 / -1;
  padding-bottom: 4px;
}

.focus-set-row__notes[hidden] {
  display: none !important;
}

.focus-set-row__input--notes {
  text-align: left;
  font-weight: 500;
  font-size: 0.85rem;
  min-height: 36px;
}

.focus-add-set--card {
  margin: 0 10px 10px;
  width: calc(100% - 20px);
  min-height: 40px;
  border: 1px dashed var(--color-border, #E5E7EB);
  background: var(--color-surface, #ffffff);
  color: var(--color-text-muted, #6b7280);
}

.focus-mode__dock--control {
  background: var(--color-surface, #ffffff);
  border-top: 1px solid var(--color-border, #E5E7EB);
  padding-top: 8px;
  gap: 8px;
}

.focus-mode__dock--control .focus-mode__timer {
  margin: 0;
  flex: 1 1 auto;
}

.focus-mode__finish {
  position: relative;
  overflow: hidden;
  background: #5C2430;
  color: #ffffff;
  border-color: #5C2430;
  font-weight: 800;
  min-height: 48px;
}

.focus-mode__finish-ring {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: transform 0.9s linear;
}

.focus-mode__finish.is-holding .focus-mode__finish-ring {
  transform: scaleX(1);
}

.focus-mode__finish-text {
  position: relative;
  z-index: 1;
}

.focus-mode.is-night {
  background: #1a1a1a;
  color: #f3f4f6;
}

.focus-mode.is-night .focus-metrics,
.focus-mode.is-night .focus-mode__ex-card,
.focus-mode.is-night .focus-mode__dock--control,
.focus-mode.is-night .focus-set-row__input {
  background: #242424;
  border-color: #3f3f46;
  color: #f3f4f6;
}

.focus-mode.is-night .focus-ex-quick .focus-set-toolbar__btn {
  background: #1a1a1a;
  border-color: #3f3f46;
  color: #f3f4f6;
}

.focus-mode.is-night .focus-mode__ex-name,
.focus-mode.is-night .focus-metrics__identity .focus-mode__routine {
  color: #f9fafb;
}

.focus-mode.is-night .focus-metrics__collapse {
  background: #242424;
  border-color: #3f3f46;
  color: #f3f4f6;
}

.focus-mode.is-night .focus-joint-drawer__summary,
.focus-mode.is-night .focus-utils-drawer__summary {
  background: #242424;
  border-color: #3f3f46;
  color: #a1a1aa;
}

.focus-mode.is-night .focus-joint-drawer .focus-joint,
.focus-mode.is-night .focus-utils-drawer__panel {
  background: #242424;
  border-color: #3f3f46;
}

.focus-mode.is-night .focus-joint__chip {
  background: #1a1a1a;
  border-color: #3f3f46;
  color: #f3f4f6;
}

.focus-mode__finish:active {
  color: #ffffff;
  border-color: #471B24;
  background: #471B24;
}

.focus-mode__ex-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
}

.focus-mode__ex-name {
  font-size: clamp(0.95rem, 3.6vw, 1.12rem);
  color: var(--color-text-primary, #111827);
  margin: 0;
}

.focus-mode__ex-target {
  margin: 2px 0 0;
}

.focus-mode__ex-card {
  background: #ffffff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 12px;
  box-shadow: none;
}

.focus-mode__stage {
  gap: 8px;
  padding-bottom: 8px;
}

@media (max-width: 420px) {
  .focus-set-log__head,
  .focus-set-row {
    grid-template-columns: 26px minmax(52px, 1.1fr) minmax(48px, 1fr) minmax(48px, 0.85fr) 26px 42px;
    column-gap: 3px;
  }

  /* Unilateral: 2 filas (kg L/R arriba, reps L/R + RIR abajo) en vez de 8 columnas */
  .focus-set-log--uni .focus-set-log__head {
    display: none;
  }

  .focus-set-row.is-unilateral {
    grid-template-columns: 26px minmax(56px, 1fr) minmax(56px, 1fr) 28px 44px;
    grid-template-rows: auto auto;
    row-gap: 6px;
    column-gap: 4px;
    align-items: stretch;
  }

  .focus-set-row.is-unilateral > .focus-set-row__num {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }

  .focus-set-row.is-unilateral > .focus-set-row__side:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .focus-set-row.is-unilateral > .focus-set-row__side:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .focus-set-row.is-unilateral > .focus-set-row__side:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .focus-set-row.is-unilateral > .focus-set-row__side:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }

  .focus-set-row.is-unilateral > .focus-set-row__menu-btn {
    grid-column: 4;
    grid-row: 1;
    align-self: center;
  }

  .focus-set-row.is-unilateral > .focus-set-row__check {
    grid-column: 5;
    grid-row: 1;
    align-self: center;
  }

  .focus-set-row.is-unilateral > .focus-set-row__rir-wrap {
    grid-column: 4 / 6;
    grid-row: 2;
  }

  .focus-set-row.is-unilateral .focus-set-row__input,
  .focus-set-row.is-unilateral .focus-set-row__side .focus-set-row__input {
    min-height: 44px;
  }

  .focus-set-row__input {
    min-height: 44px;
    /* ≥16px: evita zoom automático iOS al enfocar (no bajar de 16px en móvil) */
    font-size: max(16px, 0.95rem);
    padding: 4px;
  }

  .focus-rir-chip--row {
    min-height: 36px;
    font-size: 0.72rem;
  }
}

.focus-metrics__body {
  max-height: 640px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.focus-metrics__status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  max-height: 120px;
  opacity: 1;
  overflow: hidden;
  transition: all 0.3s ease-in-out, max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out;
}

.focus-metrics__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  transition: all 0.3s ease-in-out;
}

.focus-metrics__label {
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.focus-metrics__value {
  font-family: var(--font-heading);
  font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.focus-metrics__cell--pct .focus-metrics__value,
.focus-metrics__value--sets {
  color: #5C2430;
}

/*
 * Nivel 1 colapsado: â† | Nombre · Tiempo · Series | Notas | ▼
 * Secundarias (%, volumen) solo al expandir.
 */
.focus-metrics[data-collapsed="true"] {
  padding: 8px 10px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 4px 14px rgba(17, 24, 39, 0.04);
  transition: all 0.3s ease-in-out;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.focus-metrics[data-collapsed="true"] .focus-sync-pill {
  display: none !important;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__identity {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 42%;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__identity .focus-mode__routine {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__collapse {
  width: 34px;
  height: 34px;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__grid,
.focus-metrics[data-collapsed="true"] .focus-metrics__status {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
  margin: 0;
  max-height: 34px;
  opacity: 1;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__cell--secondary,
.focus-metrics[data-collapsed="true"] .focus-metrics__cell--volume,
.focus-metrics[data-collapsed="true"] .focus-metrics__cell--pct,
.focus-metrics[data-collapsed="true"] .focus-metrics__cell--extra {
  display: none !important;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__cell--time,
.focus-metrics[data-collapsed="true"] .focus-metrics__cell--sets {
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__label {
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__value {
  font-size: 0.88rem;
  line-height: 1;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__body {
  display: none !important;
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Start CTA stays outside the collapsible body so it never disappears */
.focus-metrics__start-wrap {
  margin-top: 10px;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__start-wrap {
  margin-top: 8px;
}

.focus-metrics[data-collapsed="true"] .focus-metrics__cell--sets::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.22);
  align-self: center;
  margin-right: 2px;
}

/* Expandido: métricas secundarias visibles en la barra */
.focus-metrics:not([data-collapsed="true"]) .focus-metrics__chrome {
  flex-wrap: wrap;
  gap: 8px;
}

.focus-metrics:not([data-collapsed="true"]) .focus-metrics__grid,
.focus-metrics:not([data-collapsed="true"]) .focus-metrics__status {
  flex: 1 1 100%;
  order: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 0;
  max-height: 120px;
}

.focus-metrics:not([data-collapsed="true"]) .focus-metrics__identity {
  flex: 1 1 auto;
  min-width: 0;
}

.focus-metrics:not([data-collapsed="true"]) .focus-metrics__cell--secondary {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .focus-metrics,
.focus-metrics__chrome,
.focus-metrics__collapse,
.focus-metrics__collapse-icon,
.focus-metrics__body,
.focus-metrics__status,
.focus-metrics__cell {
    transition: none !important;
  }
}

.focus-mode.is-low-power .focus-metrics,
.focus-mode.is-low-power .focus-metrics__chrome,
.focus-mode.is-low-power .focus-metrics__collapse,
.focus-mode.is-low-power .focus-metrics__collapse-icon,
.focus-mode.is-low-power .focus-metrics__body,
.focus-mode.is-low-power .focus-metrics__grid,
.focus-mode.is-low-power .focus-metrics__status {
  transition: none !important;
}

.focus-metrics__bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(92, 36, 48, 0.12);
  overflow: hidden;
}

.focus-metrics__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5C2430 0%, var(--color-red-vibrant) 100%);
  transition: width 0.35s ease;
}

/* —— Timer flotante retractil —— */
.focus-mode__timer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.focus-mode__timer[data-state="idle"] {
  opacity: 0.85;
}

.focus-mode__timer[data-state="running"],
.focus-mode__timer[data-expanded="true"] {
  opacity: 1;
}

.focus-mode__timer[data-state="running"] {
  border-color: var(--color-red-muted);
  box-shadow: var(--glow-red-soft);
}

.focus-mode__timer[data-state="urgent"] {
  border-color: var(--color-red-vibrant);
  background: var(--color-error-bg);
  animation: focus-timer-pulse 0.9s ease-in-out infinite;
}

.focus-mode__timer[data-state="done"] {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}

@keyframes focus-timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

.focus-mode__timer-toggle {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.focus-mode__timer-toggle-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.focus-mode__timer[data-state="running"] .focus-mode__timer-toggle-label,
.focus-mode__timer[data-state="urgent"] .focus-mode__timer-toggle-label {
  color: var(--color-red-vibrant);
}

.focus-mode__timer-toggle-time {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-red-vibrant);
}

.focus-mode__timer[data-state="urgent"] .focus-mode__timer-toggle-time {
  color: var(--color-error);
}

.focus-mode__timer-toggle-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
}

.focus-mode__timer[data-expanded="true"] .focus-mode__timer-toggle-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.focus-mode__timer-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
}

.focus-mode__timer[data-expanded="true"] .focus-mode__timer-body {
  grid-template-rows: 1fr;
}

.focus-mode__timer-body > * {
  overflow: hidden;
}

.focus-mode__timer-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 0 12px 12px;
}

.focus-mode__chip {
  flex: 1;
  min-height: 48px;
  max-width: 120px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.focus-mode__chip--primary {
  background: var(--color-red-vibrant);
  border-color: transparent;
  color: #fafaf7;
  box-shadow: var(--glow-red-soft);
  max-width: 140px;
  flex: 1.25;
}

.focus-mode__chip:active {
  transform: translateY(1px);
}

.focus-mode__timer-bar {
  width: calc(100% - 24px);
  height: 4px;
  margin: 0 12px 12px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.focus-mode__timer[data-expanded="false"] .focus-mode__timer-bar {
  display: none;
}

.focus-mode__timer[data-expanded="false"][data-state="running"] .focus-mode__timer-bar,
.focus-mode__timer[data-expanded="false"][data-state="urgent"] .focus-mode__timer-bar {
  display: block;
  margin: 0 12px 8px;
}

.focus-mode__timer-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  border-radius: inherit;
  background: var(--color-red-vibrant);
  transition: transform 0.2s linear;
}

/* —— Stage: lista de tarjetas de ejercicio —— */
.focus-mode__stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 1px 8px;  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  scroll-padding-top: 12px;
}

.focus-mode__ex-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: visible;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.focus-mode__ex-card.is-done.is-active {
  opacity: 1;
}

/* Nivel 3: acordeón Bento — solo activo expandido */
.focus-mode__ex-card:not(.is-active) .focus-set-log,
.focus-mode__ex-card:not(.is-active) .focus-ex-guide,
.focus-mode__ex-card:not(.is-active) .iron-engine,
.focus-mode__ex-card:not(.is-active) .focus-micro-fb,
.focus-mode__ex-card:not(.is-active) .focus-smart-step,
.focus-mode__ex-card:not(.is-active) .focus-add-set,
.focus-mode__ex-card:not(.is-active) .focus-ex-more,
.focus-mode__ex-card:not(.is-active) .focus-ex-quick,
.focus-mode__ex-card:not(.is-active) .focus-ex-instr-toggle {
  display: none !important;
}

.focus-mode__ex-card:not(.is-active) {
  box-shadow: none;
  border-color: var(--color-border, #eef0f3);
  background: var(--color-surface-hover, #fafbfc);
}

.focus-mode__ex-card:not(.is-active) .focus-mode__ex-head {
  padding: 11px 14px;
  align-items: center;
  min-height: 50px;
}

.focus-mode__ex-card:not(.is-active) .focus-mode__ex-name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

.focus-mode__ex-card.is-done:not(.is-active) {
  opacity: 0.92;
}

.focus-mode__ex-card.is-done:not(.is-active) .focus-mode__ex-progress {
  color: #5C2430;
}

.focus-mode__ex-card.is-done:not(.is-active) .focus-mode__ex-progress::before {
  content: '✓ ';
  font-weight: 800;
}

.focus-mode__ex-card:not(.is-active) .focus-mode__ex-progress::after {
  content: ' · Editar';
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.65;
}

.focus-mode__ex-card.is-active {
  border-color: color-mix(in srgb, var(--color-accent, #5C2430) 35%, var(--color-border, #e5e7eb));
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 20px rgba(92, 36, 48, 0.08);
  background: var(--color-surface, #ffffff);
}

/* Activa: inputs cómodos para el dedo */
.focus-mode__ex-card.is-active .focus-set-row__input {
  min-height: 48px;
  font-size: 1.05rem;
  font-weight: 800;
}

.focus-mode__ex-card.is-active .focus-set-row__check {
  width: 48px;
  height: 48px;
}

/* —— Focus Mode inmersión por serie ——
   Atenuar sin bloquear taps: pointer-events:none en otras series/ejercicios
   impedía pasar a la siguiente serie («no deja meter datos»). */
.focus-mode.is-set-immersive .focus-metrics {
  opacity: 0.4;
  transition: opacity 0.22s ease, filter 0.22s ease;
  filter: none;
}

.focus-mode.is-set-immersive .focus-mode__ex-card:not(.is-editing) {
  opacity: 0.55;
  transition: opacity 0.22s ease, filter 0.22s ease;
  filter: none;
}

/* Dock de descanso usable mientras se anota la serie */
.focus-mode.is-set-immersive .focus-mode__dock {
  opacity: 0.92;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.focus-mode.is-set-immersive .focus-mode__ex-card.is-editing {
  position: relative;
  z-index: 4;
  opacity: 1;
  box-shadow:
    0 0 0 1px color-mix(in srgb, #5C2430 18%, transparent),
    0 12px 32px rgba(17, 24, 39, 0.1);
}

.focus-mode.is-set-immersive .focus-mode__ex-card.is-editing::before {
  content: '';
  position: absolute;
  inset: -8px -6px;
  border-radius: calc(var(--radius-lg) + 6px);
  background: rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
  pointer-events: none;
}

.focus-mode.is-set-immersive .focus-set-row:not(.is-immersive-row) {
  opacity: 0.55;
}

.focus-mode.is-set-immersive .focus-set-row.is-immersive-row {
  opacity: 1;
  background: color-mix(in srgb, #5C2430 6%, #ffffff);
  border-radius: 10px;
  box-shadow: 0 0 0 1px color-mix(in srgb, #5C2430 12%, transparent);
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Night + fila activa: el fondo claro pelea con color:#f3f4f6 de .is-night inputs
   → kg/reps ilegibles (texto blanco sobre blanco). Forzar contraste usable. */
.focus-mode.is-night .focus-set-row.is-current,
.focus-mode.is-night.is-set-immersive .focus-set-row.is-immersive-row {
  background: color-mix(in srgb, #5C2430 22%, #2a2a2a);
  box-shadow: 0 0 0 1px color-mix(in srgb, #5C2430 35%, #3f3f46);
}

.focus-mode.is-night .focus-set-row.is-current .focus-set-row__input,
.focus-mode.is-night.is-set-immersive .focus-set-row.is-immersive-row .focus-set-row__input {
  background: #141414;
  border-color: #52525b;
  color: #f9fafb;
  -webkit-text-fill-color: #f9fafb;
}

.focus-mode.is-night .focus-set-row.is-current .focus-set-row__input::placeholder,
.focus-mode.is-night.is-set-immersive .focus-set-row.is-immersive-row .focus-set-row__input::placeholder {
  color: #a1a1aa;
  -webkit-text-fill-color: #a1a1aa;
  opacity: 1;
}

/* Serie cerrada: el tap atraviesa inputs disabled y desbloquea desde la fila */
.focus-set-row.is-locked .focus-set-row__input:disabled,
.focus-set-row.is-locked .focus-set-row__input[disabled] {
  pointer-events: none;
}

.focus-set-row__unlock-chip {
  grid-column: 1 / -1;
  justify-self: start;
  margin: 2px 0 0;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, #5C2430 35%, var(--color-border, #e5e7eb));
  border-radius: 999px;
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
  color: #5C2430;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-set-row__unlock-chip:active {
  transform: scale(0.97);
}

.focus-mode.is-set-immersive .focus-micro-fb {
  opacity: 0.85;
}

/* Micro-feedback post-serie (Bento, línea fina) */
.focus-micro-fb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #5C2430 12%, #e5e7eb);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #5C2430 4%, #ffffff) 0%,
    #fafbfc 100%
  );
}

.focus-micro-fb__line {
  flex: 1 1 160px;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-primary, #111827);
  line-height: 1.35;
}

.focus-micro-fb__plates {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}

.focus-micro-fb__plate {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, #5C2430 22%, #e5e7eb);
  border-radius: 8px;
  background: #ffffff;
  color: #5C2430;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.focus-micro-fb__plate:active {
  transform: scale(0.96);
  background: color-mix(in srgb, #5C2430 8%, #ffffff);
}

.focus-ex-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 8px;
}

.focus-ex-quick .focus-set-toolbar__btn {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.focus-mode__ex-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 14px 12px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.focus-mode__ex-copy {
  flex: 1;
  min-width: 0;
}

.focus-mode__ex-progress {
  margin: 0 0 2px;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.focus-mode__ex-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--color-text-primary);
}

.focus-mode__ex-target {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #5C2430;
  font-weight: 600;
}

.focus-ex-guide {
  margin: 0;
  border-top: 1px solid var(--color-border);
  background: rgba(92, 36, 48, 0.03);
}

.focus-ex-guide[open] .focus-ex-guide__summary::after {
  content: '−';
}

.focus-ex-guide__body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.focus-ex-guide__list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.focus-ex-guide__list li {
  margin-bottom: 0.35rem;
}

.focus-ex-guide__list li::marker {
  color: #5C2430;
}

.focus-ex-guide__empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.focus-ex-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--color-border);
}

.focus-ex-video iframe,
.focus-ex-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.focus-ex-video--empty {
  aspect-ratio: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-text-primary, #1A1A1A) 5%, var(--color-surface, #fff));
}

.focus-ex-video__empty,
.focus-ex-video__link {
  margin: 0;
  padding: 10px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.focus-ex-video__link {
  color: #5C2430;
  text-decoration: none;
}

/* Botón visible "Instrucciones del ejercicio" en tarjeta de entrenamiento */
.focus-ex-instr-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--color-surface-alt, rgba(255,255,255,0.04));
  border: none;
  border-top: 1px solid var(--color-border);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  text-align: left;
  touch-action: manipulation;
  transition: background 0.15s;
}
.focus-ex-instr-toggle:active {
  background: var(--color-surface-hover);
}
.focus-ex-instr-toggle__icon {
  font-size: 1rem;
  color: var(--color-accent, #F5C842);
  flex-shrink: 0;
}
.focus-ex-instr-toggle__text {
  flex: 1;
}
.focus-ex-instr-toggle__arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
  color: var(--color-text-muted);
}
.focus-ex-instr-toggle[aria-expanded="true"] .focus-ex-instr-toggle__arrow {
  transform: rotate(90deg);
}

/* Secciones dentro del panel guía */
.focus-ex-guide__section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent, #F5C842);
}
.focus-ex-guide__section-title--coach {
  color: var(--color-accent, #F5C842);
}
.focus-ex-guide__coach-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* Botón "Abrir vídeo explicativo" */
.focus-ex-guide__open-video-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 14px;
  background: var(--color-surface-hover, rgba(255,255,255,0.07));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-decoration: none;
  touch-action: manipulation;
  transition: background 0.15s;
}
.focus-ex-guide__open-video-btn:active {
  background: var(--color-surface-alt);
}
.focus-ex-guide__ext-icon {
  font-size: 0.85rem;
}

.focus-set-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--color-border);
}

.focus-set-toolbar__btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-set-toolbar__btn:active {
  border-color: #5C2430;
  color: #5C2430;
}

.focus-rir-select {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.focus-rir-select__label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.focus-rir-select__chips {
  display: flex;
  gap: 4px;
}

.focus-rir-chip {
  min-width: 32px;
  min-height: 32px;
  padding: 0 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-rir-chip.is-active {
  background: #5C2430;
  border-color: transparent;
  color: #fafaf7;
}

.focus-mode__current .focus-mode__adjuster[data-field="rir"] {
  display: none;
}

.focus-mode__current .focus-mode__adjusters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-prev-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(92, 36, 48, 0.35);
  border-radius: var(--radius-md);
  background: rgba(92, 36, 48, 0.05);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-prev-chip__label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.focus-prev-chip__value {
  font-family: var(--font-heading);
  font-weight: 800;
  color: #5C2430;
}

.focus-prev-chip__hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.focus-add-set {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 1px solid rgba(92, 36, 48, 0.28);
  border-radius: var(--radius-md);
  background: transparent;
  color: #5C2430;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-add-set:active {
  background: rgba(92, 36, 48, 0.08);
}

.focus-add-set__plus {
  font-size: 1.15rem;
  line-height: 1;
}

@media (max-width: 420px) {

  .focus-rir-select {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

.focus-mode__ex-card.is-active .focus-mode__ex-name {
  color: var(--color-red-vibrant);
}

.focus-mode__ex-card.is-active .focus-mode__ex-status {
  background: var(--color-accent-soft);
  color: var(--color-red-vibrant);
}

.focus-mode__ex-card.is-done .focus-mode__ex-status {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.focus-mode__ex-pill.is-done {
  color: var(--color-success);
  border-color: transparent;
  background: var(--color-success-bg);
}

.focus-mode__ex-pill.is-current {
  color: #fafaf7;
  background: var(--color-red-vibrant);
  border-color: transparent;
}

.focus-mode__ex-card.is-active .focus-mode__ex-slot {
  display: block;
  padding-top: 12px;
}

.focus-mode__ex-card.is-active .focus-mode__ex-pills {
  display: none;
}

/* —— Panel de registro (dentro de la tarjeta activa) —— */
.focus-mode__current {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.focus-mode__current[hidden] {
  display: none !important;
}

.focus-mode__exercise-row {
  display: none;
}

.focus-mode__set-meta {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red-muted);
  text-align: center;
}

.focus-mode__exercise {
  display: none;
}

.focus-mode__tech-btn {
  display: none;
}

.focus-mode__ex-tech {
  flex-shrink: 0;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
  color: var(--color-red-vibrant);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.focus-mode__ex-tech:active {
  border-color: var(--color-red-vibrant);
}

.focus-mode__ex-tech--video,
.focus-mode__tech-btn--video {
  border-color: var(--color-accent-gold, #c99a3e);
  background: rgba(201, 154, 62, 0.16);
  color: var(--color-accent-gold, #c99a3e);
  font-style: normal;
  font-size: 0.78rem;
}

.focus-mode__set-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;}

.focus-mode__set-tabs::-webkit-scrollbar {
  display: none;
}

.focus-mode__set-tab {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--touch-min);
  min-width: 72px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.focus-mode__set-tab.is-current {
  background: var(--color-red-vibrant);
  border-color: transparent;
  color: #fafaf7;
  box-shadow: var(--glow-red-soft);
}

.focus-mode__set-tab.is-done:not(.is-current) {
  background: var(--color-success-bg);
  border-color: transparent;
  color: var(--color-success);
}

.focus-mode__set-tab-check {
  font-size: 0.85em;
  line-height: 1;
}

.focus-mode__ref {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-red-vibrant);
  background: var(--color-accent-soft);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.35;
}

.focus-mode__ref strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

/* —— Steppers compactos —— */
.focus-mode__adjusters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.focus-mode__adjuster {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 6px 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface-hover);
  border: 1px solid transparent;
}

.focus-mode__adjuster-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red-muted);
  text-align: center;
}

.focus-mode__stepper {
  display: grid;
  grid-template-columns: var(--touch-min) 1fr var(--touch-min);
  gap: 6px;
  align-items: center;
}

.focus-mode__step {
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: none;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.focus-mode__step:active {
  background: var(--color-red-vibrant);
  color: #fafaf7;
}

.focus-mode__value {
  width: 100%;
  min-height: var(--touch-min);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-red-vibrant);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
  touch-action: manipulation;
}

.focus-mode__value::-webkit-outer-spin-button,
.focus-mode__value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.focus-mode__value:focus {
  outline: none;
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.focus-mode__complete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--touch-gym-cta);
  margin-top: 2px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-red-vibrant);
  color: #fafaf7;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--glow-red-soft);
  transition: background 0.15s ease, transform 0.1s ease;
}

.focus-mode__complete:active {
  transform: scale(0.985);
}

.focus-mode__complete.is-done {
  background: var(--color-success);
  box-shadow: none;
}

.focus-mode__complete-mark {
  font-size: 1.25em;
  line-height: 1;
  opacity: 0.9;
}

.focus-mode__complete:not(.is-done) .focus-mode__complete-mark {
  opacity: 0.55;
}

.focus-mode__save-hint {
  margin: 0;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.focus-mode__dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  background: linear-gradient(180deg, transparent 0%, var(--color-bg) 18%);
  position: sticky;
  bottom: 0;
  z-index: 6;
}

.focus-mode__bottom {
  flex-shrink: 0;
  padding-top: 0;
}

.focus-mode__finish {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.focus-mode__finish:active {
  color: var(--color-text-primary);
  border-color: var(--color-red-vibrant);
}

.focus-mode__suggest {
  margin: 0;
  border-radius: var(--radius-md);
  border-width: 1px;
  box-shadow: none;
}

/*
 * Gym / one-hand reachability (thumb zone):
 * - Rest timer + primary CTAs live in the lower half
 * - Fat-finger targets ≥56px with generous gaps
 * - Steppers stack full-width so +/− stay easy under fatigue
 */
@media (max-width: 767px) {
  .focus-mode__shell {
    gap: 8px;
  }

  .focus-mode__stage {
    order: 2;
  }

  .focus-mode__current {
    order: 3;
  }

  .focus-live-volume {
    order: 4;
  }

  .focus-mode__save-hint {
    order: 5;
  }

  /* Controles de descanso junto al dock = zona natural del pulgar */
  .focus-mode__timer {
    order: 6;
  }

  .focus-mode__dock {
    order: 7;
    gap: var(--touch-gap-gym);
    padding-top: 6px;
  }

  .focus-mode__icon-btn {
    min-height: var(--touch-gym);
    min-width: var(--touch-gym);
    padding: 0 14px;
  }

  .focus-mode__timer-toggle {
    min-height: var(--touch-gym);
  }

  .focus-mode__timer-actions {
    gap: var(--touch-gap-gym);
    padding: 0 12px 14px;
  }

  .focus-mode__chip {
    min-height: var(--touch-gym);
    max-width: none;
    font-size: 1rem;
  }

  .focus-mode__chip--primary {
    min-height: var(--touch-gym-cta);
    max-width: none;
    flex: 1.4;
  }

  .focus-mode__ex-tech {
    width: var(--touch-gym);
    height: var(--touch-gym);
    min-width: var(--touch-gym);
    min-height: var(--touch-gym);
  }

  .focus-mode__ex-head {
    gap: var(--touch-gap-gym);
    min-height: var(--touch-gym-cta);
    padding: 14px;
  }

  .focus-mode__set-tabs {
    gap: 10px;
  }

  .focus-mode__set-tab {
    min-height: var(--touch-gym);
    min-width: 80px;
    padding: 0 16px;
    font-size: 0.95rem;
  }

  .focus-mode__suggest-accept {
    min-height: var(--touch-gym);
    min-width: var(--touch-gym);
    padding: 0.75rem 1.1rem;
  }

  /* Kg / Reps / RIR apilados a ancho completo → targets grandes sin choque */
  .focus-mode__adjusters {
    grid-template-columns: 1fr;
    gap: var(--touch-gap-gym);
  }

  .focus-mode__adjuster {
    padding: 10px 12px 12px;
    gap: 8px;
  }

  .focus-mode__stepper {
    grid-template-columns: var(--touch-gym) 1fr var(--touch-gym);
    gap: var(--touch-gap-gym);
  }

  .focus-mode__step {
    width: var(--touch-gym);
    height: var(--touch-gym);
    min-width: var(--touch-gym);
    min-height: var(--touch-gym);
    font-size: 1.45rem;
  }

  .focus-mode__value {
    min-height: var(--touch-gym);
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .focus-mode__notes-input {
    min-height: var(--touch-gym);
    font-size: 1rem;
  }

  .focus-mode__complete {
    min-height: var(--touch-gym-cta);
    font-size: clamp(1.1rem, 4vw, 1.3rem);
  }

  .focus-mode__finish {
    min-height: var(--touch-gym);
  }
}

@media (max-width: 767px) and (max-height: 700px) {
  .focus-live-volume {
    display: none;
  }

  .focus-mode__save-hint {
    display: none;
  }

  .focus-mode__ex-head {
    padding: 12px 12px 10px;
  }

  /* Mantener CTA principal grande aunque la pantalla sea baja */
  .focus-mode__complete {
    min-height: var(--touch-gym-cta);
  }
}

@media (prefers-reduced-motion: reduce) {
  .focus-mode__timer[data-state="urgent"] {
    animation: none;
  }

  .focus-mode__timer-fill,
  .focus-mode__timer-body,
  .focus-mode__timer-toggle-chevron,
  .focus-mode__ex-card {
    transition: none;
  }
}

/* —— Access control / invite gate —— */

.access-gate-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.access-gate-panel__subtitle {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  line-height: 1.4;
  max-width: 40rem;
}

.access-gate-panel__invite {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: end;
  margin-bottom: var(--space-md);
}

.access-gate-panel__invite--compact {
  margin-top: 0;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.access-gate-panel__invite--compact .btn {
  width: 100%;
}

.access-gate-panel__invite .btn {
  white-space: nowrap;
}

.access-gate-panel__status {
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.access-gate-panel__status[data-kind="ok"] { color: #43a047; }
.access-gate-panel__status[data-kind="error"] { color: #e53935; }

.access-gate-panel__lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.access-gate-panel__list-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.access-gate-panel__list-title span {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--color-border-strong);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-accent-gold);
}

.access-gate-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.9), rgba(14, 14, 14, 0.95));
}

.access-gate-panel__empty {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.access-gate-panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.access-gate-panel__item:last-child {
  border-bottom: none;
}

.access-gate-panel__item-main {
  min-width: 0;
}

.access-gate-panel__item-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-gate-panel__item-meta {
  margin: 0.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  word-break: break-all;
}

.access-gate-panel__approve {
  flex-shrink: 0;
}

/* —— Alta manual + cartera —— */
.client-assign__section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.client-assign__section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.client-assign__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  align-items: end;
}

.client-assign__form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.client-assign__password-row {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
}

.client-assign__password-row .form__input {
  flex: 1;
  min-width: 0;
}

.client-assign__result {
  margin-top: var(--space-md);
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-accent-gold);
  background:
    linear-gradient(135deg, rgba(201, 154, 62, 0.08), transparent 55%),
    var(--color-surface-hover);
}

.client-assign__result-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.client-assign__result-line {
  margin: 0.15rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  word-break: break-all;
}

.client-assign__result-actions {
  margin-top: 0.65rem;
}

.client-assign__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.client-assign__section-head .access-gate-panel__list-title {
  margin-bottom: 0;
}

.client-assign__filters {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border-strong);
}

.client-assign__filter {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  border-right: 1px solid var(--color-border);
}

.client-assign__filter:last-child {
  border-right: none;
}

.client-assign__filter.is-active {
  color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.12);
}

.client-assign__portfolio {
  max-height: 22rem;
}

.client-assign__item {
  flex-wrap: wrap;
  align-items: flex-start;
}

.client-assign__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.client-assign__badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--color-border-strong);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.client-assign__badge--active {
  color: #90caf9;
  border-color: rgba(144, 202, 249, 0.4);
}

.client-assign__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.client-assign__actions .btn {
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  min-height: var(--touch-min);
}

@media (max-width: 768px) {
  .access-gate-panel__invite,
  .access-gate-panel__lists,
  .client-assign__form {
    grid-template-columns: 1fr;
  }

  .client-assign__actions {
    width: 100%;
    justify-content: stretch;
  }

  .client-assign__actions .btn {
    flex: 1;
  }
}

/* ============================================
   RECORDATORIOS PUSH · Check-in diario
   ============================================ */

.habits.habits--focus {
  animation: habitsFocusPulse 1.2s ease-out 2;
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 4px;
}

@keyframes habitsFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 154, 62, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(201, 154, 62, 0); }
  100% { box-shadow: 3px 3px 0 #000; }
}

.reminder-settings__subtitle,
.push-reminders__intro {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.reminder-settings__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.reminder-settings__actions,
.push-reminders__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.reminder-settings__status,
.push-reminders__status {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-accent-gold);
}

.reminder-settings__status.is-error,
.push-reminders__status.is-error {
  color: #e53935;
}

.push-reminders__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.push-reminders__meta {
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.push-reminders__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.push-reminders__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.push-reminders__slider {
  position: absolute;
  inset: 0;
  background: #2a2a2a;
  border: 2px solid var(--color-border);
  transition: background 180ms ease, border-color 180ms ease;
}

.push-reminders__slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: var(--color-text-muted);
  transition: transform 180ms ease, background 180ms ease;
}

.push-reminders__switch input:checked + .push-reminders__slider {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.push-reminders__switch input:checked + .push-reminders__slider::before {
  transform: translateX(20px);
  background: var(--color-accent);
}

/* --- Profile connections (health / fitness) --- */
.profile-connections__intro {
  margin: 0 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.profile-connections__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-connections__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}

.profile-connections__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-connections__item:first-child {
  padding-top: 0;
}

.profile-connections__main {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  flex: 1;
}

.profile-connections__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--color-text-secondary);
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
}

.profile-connections__copy {
  min-width: 0;
  flex: 1;
}

.profile-connections__name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.profile-connections__hint {
  margin: 0.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.profile-connections__btn {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--color-accent-red);
  color: var(--color-accent-red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  box-shadow: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.profile-connections__btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
  border-color: var(--color-accent-red);
  transform: none;
  box-shadow: none;
}

.profile-connections__btn.is-connected {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
}

.profile-connections__btn.is-connected:hover {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  color: var(--color-success);
}

.profile-connections__btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.profile-connections__status {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.profile-connections__status.is-error {
  color: var(--color-error);
}

@media (max-width: 480px) {
  .profile-connections__item {
    gap: var(--space-sm);
  }

  .profile-connections__hint {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .reminder-settings__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .habits.habits--focus {
    animation: none;
  }
}

/* ── _12-polish-themes.css ── */
/* =============================================================================
   Lesiones y restricciones activas (panel entrenador)
   ============================================================================= */

.trainer-injury-card {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: var(--border-width-strong) solid var(--color-accent-red);
  background:
    linear-gradient(135deg, rgba(150, 28, 28, 0.28) 0%, rgba(14, 14, 14, 0.92) 55%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(150, 28, 28, 0.06) 8px,
      rgba(150, 28, 28, 0.06) 9px
    );
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(201, 154, 62, 0.12);
  animation: trainer-injury-in 320ms ease-out;
}

.trainer-injury-card[hidden] {
  display: none !important;
}

.trainer-injury-card--live {
  animation: trainer-injury-pulse 1.1s ease-out;
}

.trainer-injury-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.trainer-injury-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 2px solid var(--color-accent-gold);
  background: var(--color-accent-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.trainer-injury-card__title {
  margin: 0;
  font-family: var(--font-display, var(--font-heading, inherit));
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.trainer-injury-card__text {
  margin: 0 0 var(--space-sm);
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.trainer-injury-card__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.profile-restrictions .form__hint {
  margin-top: var(--space-xs);
}

@keyframes trainer-injury-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes trainer-injury-pulse {
  0% {
    box-shadow: var(--shadow-card), 0 0 0 0 rgba(150, 28, 28, 0.55);
  }
  70% {
    box-shadow: var(--shadow-card), 0 0 0 10px rgba(150, 28, 28, 0);
  }
  100% {
    box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(201, 154, 62, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trainer-injury-card,
  .trainer-injury-card--live {
    animation: none;
  }
}


/* ============================================
   HIGH IMPACT POLISH — Tipografía contundente + rojos
   ============================================ */

.sidebar__logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__logo-accent {
  color: var(--color-red-vibrant);
  font-style: normal;
  text-shadow: var(--glow-red);
}

.app__footer-text {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-red-muted);
}

.stripe {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-red-vibrant), transparent);
  box-shadow: var(--glow-red-soft);
}

/* Atómicos (.card / .form__* / .btn / .alert) viven en SHARED COMPONENTS — no redefinir aquí */

.panel__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  color: var(--color-text-primary);
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  text-shadow: none;
}

.panel__subtitle {
  font-family: var(--font-body);
  font-weight: var(--weight-subtitle);
  letter-spacing: 0.01em;
  font-size: var(--text-subtitle);
  color: var(--color-text-secondary);
  text-transform: none;
}

.panel__header {
  border-bottom: 1px solid var(--color-border);
  margin: 0 0 var(--space-xl);
  padding: 0 0 var(--space-lg) 0.9rem;
  position: relative;
  z-index: 1;
}

.auth__tab {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.auth__tabs {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.tag {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 999px;
  color: var(--color-red-vibrant);
  border-color: var(--color-accent-soft);
  background: var(--color-accent-soft);
}

.card--branded::before,
.card--branded::after {
  display: none;
}

.sidebar {
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border);
  isolation: isolate;
}

html[data-theme-mode="dark"] .sidebar__avatar {
  background: linear-gradient(145deg, var(--color-bg), var(--color-surface));
  border-color: var(--color-border-strong);
  color: var(--color-accent);
}

html[data-theme-mode="dark"] .sidebar--demo .sidebar__avatar {
  background: #ffffff;
  border-color: #5C2430;
  color: #5C2430;
}

html[data-theme-mode="dark"] .sidebar__user {
  background: var(--color-surface);
}

.sidebar__user-name {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sidebar__user-tag {
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5C2430;
  font-size: 0.68rem;
  font-weight: 600;
}

.sidebar__link {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-left-width: 2px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-red-muted);
  font-size: 0.82rem;
}

.sidebar__link--active {
  background: var(--color-accent-soft);
  color: var(--color-red-vibrant);
  text-shadow: var(--glow-red-soft);
}

.sidebar__link--highlight {
  color: var(--color-red-vibrant);
}

.sidebar__close,
.sidebar__logout {
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar {
  background: rgba(232, 234, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.welcome__hello {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-red-vibrant);
  text-shadow: var(--glow-red-soft);
}

.welcome__role {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.constancy {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  isolation: auto;
}

.constancy__eyebrow,
.constancy__status,
.constancy__count-label,
.constancy__meta,
.constancy__week-now-label,
.constancy__week-mark {
  font-family: var(--font-mono);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.constancy__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  font-size: var(--text-subtitle);
  color: var(--color-text-primary);
  text-shadow: none;
}

.constancy__count {
  color: var(--color-accent-red);
  text-shadow: none;
}

.constancy__status.is-live {
  color: var(--color-accent-red);
}

.habits {
  background: transparent;
  border: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  isolation: auto;
}

.habits.is-minimized {
  box-shadow: none;
}

.habits__eyebrow,
.habits__status,
.habits__done-label,
.habits__done-action {
  font-family: var(--font-mono);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.habits__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  font-size: var(--text-title);
  color: var(--color-text-primary);
  text-shadow: none;
}

.habits__save-btn {
  background: var(--color-red-vibrant) !important;
  border-radius: var(--radius-md) !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  box-shadow: var(--glow-red-soft) !important;
}

.habits__save-btn:hover,
.habits__save-btn:focus-visible {
  background: var(--color-accent-hover) !important;
}

.habits__range::-webkit-slider-thumb,
.habits__range::-moz-range-thumb {
  background-color: transparent !important;
  background-image: linear-gradient(var(--color-slider-thumb), var(--color-slider-thumb)) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: var(--slider-thumb-visual-w) var(--slider-thumb-visual-h) !important;
  border: none !important;
}

.habits__fill {
  background: linear-gradient(90deg, var(--color-red-vibrant) 0%, var(--color-red-muted) 100%) !important;
}

.welcome-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  isolation: auto;
}

.welcome-card:hover,
.welcome-card:focus-visible {
  border: none;
  box-shadow: none;
  transform: translateX(2px);
}

.welcome-card__title {
  font-family: var(--font-heading);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  font-size: var(--text-subtitle);
  color: var(--color-text-primary);
}

.welcome-card__index,
.welcome-card__cta {
  font-family: var(--font-heading);
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  color: var(--color-accent-red);
}

/* Session logbook → open sheet (sin tarjeta) */
.card--logbook {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  isolation: auto;
}

.logbook__spiral-strip {
  background: var(--color-bg-deep);
  border-bottom: 1px solid var(--color-border);
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 18px;
}

.logbook__punch {
  width: 8px;
  height: 8px;
  background: var(--color-border-strong);
  border: none;
  box-shadow: none;
}

.logbook__header {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
}

.logbook__stamp {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-red-vibrant);
  border: 1px solid var(--color-accent-soft);
  background: var(--color-accent-soft);
  border-radius: 999px;
  transform: none;
  box-shadow: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logbook__badge {
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--color-bg-deep);
  color: var(--color-red-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logbook__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-red-vibrant);
  text-shadow: var(--glow-red);
}

.logbook__rule-hint {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-red-muted);
}

.tag--brutalist {
  font-family: var(--font-heading);
  font-weight: 800;
  background: var(--color-accent-soft);
  color: var(--color-red-vibrant);
  border: 1px solid var(--color-accent-soft);
  border-radius: 999px;
  box-shadow: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session__table-wrapper.logbook__paper {
  background-color: var(--color-surface);
  background-image: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
  isolation: isolate;
}

.session__table--notebook th {
  background: var(--color-bg-deep);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-red-muted);
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.session__table--notebook td {
  border-bottom: 1px solid var(--color-border);
}

.notebook__exercise-cell {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  background: linear-gradient(90deg, var(--color-surface) 85%, transparent);
}

.notebook__info-btn {
  border-radius: 999px;
  border-color: var(--color-border-strong);
  color: var(--color-red-vibrant);
  font-family: var(--font-heading);
  font-weight: 800;
}

.notebook__info-btn:hover,
.notebook__info-btn:focus-visible {
  background: var(--color-accent-soft);
  color: var(--color-red-vibrant);
  border-color: var(--color-red-vibrant);
}

.notebook__info-btn--video {
  border-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.14);
  color: var(--color-accent-gold);
  font-style: normal;
  font-size: 0.72rem;
}

.notebook__input {
  font-family: var(--font-heading) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--color-text-primary) !important;
  border-bottom: 1px solid var(--color-border-strong) !important;
  text-shadow: none !important;
  min-height: 40px;
  background-color: transparent !important;
  background-image: none !important;
}

.notebook__input:focus {
  border-bottom-color: var(--color-red-vibrant) !important;
  color: var(--color-red-vibrant) !important;
  background-color: var(--color-accent-soft) !important;
  text-shadow: var(--glow-red-soft) !important;
}

.notebook__input::placeholder {
  color: var(--color-red-muted) !important;
  font-family: var(--font-heading) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

.notebook__set-cell {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-red-vibrant);
  text-shadow: var(--glow-red-soft);
}

.logbook__nav-hint {
  font-family: var(--font-body);
  color: var(--color-red-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}

.logbook__quote {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 500;
  color: var(--color-red-muted);
  border: none;
}

.notebook__checkbox {
  border-radius: 8px;
  border-color: var(--color-border-strong);
}

.calendar__cell,
.stats-card,
.focus-mode,
.smart-feed__item {
  border-radius: var(--radius-md);
}

/* Primary buttons / CTAs with white text stay readable on red */
.btn--primary,
.habits__save-btn,
.tag--brutalist {
  color: #FAFAF7;
}

.tag--brutalist {
  background: var(--color-red-vibrant);
  color: #FAFAF7;
  border-color: transparent;
  text-shadow: none;
}

/* Focus mode — superficies sólidas sobre el grano */
.focus-mode {
  background: var(--color-bg) !important;
  color: var(--color-text-primary) !important;
}

.focus-mode__shell {
  background: var(--color-bg) !important;
}

.focus-mode__bottom {
  background: transparent !important;
  border-color: transparent !important;
  backdrop-filter: none;
}

.focus-mode__eyebrow,
.focus-mode__timer-toggle-label,
.focus-mode__set-meta,
.focus-mode__suggest-label,
.focus-mode__save-hint,
.focus-mode__adjuster-label,
.focus-mode__ex-progress {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--color-red-muted) !important;
}

.focus-mode__routine,
.focus-mode__ex-card.is-active .focus-mode__ex-name {
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: uppercase !important;
  color: var(--color-red-vibrant) !important;
  text-shadow: var(--glow-red-soft) !important;
}

.focus-mode__timer,
.focus-mode__ex-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  isolation: isolate;
}

.focus-mode__current {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.focus-mode__complete,
.focus-mode__chip--primary,
.focus-mode__suggest-accept,
.focus-mode__set-tab.is-current,
.focus-mode__ex-pill.is-current {
  background: var(--color-red-vibrant) !important;
  color: #FAFAF7 !important;
  border-radius: var(--radius-md) !important;
  border: none !important;
  box-shadow: var(--glow-red-soft) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-weight: 800 !important;
}

.focus-mode__set-tab.is-current,
.focus-mode__ex-pill.is-current {
  border-radius: 999px !important;
}

.focus-mode__finish {
  background: var(--color-surface) !important;
  color: var(--color-text-secondary) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.focus-mode__chip,
.focus-mode__step,
.focus-mode__icon-btn,
.focus-mode__ex-tech {
  border-radius: var(--radius-sm) !important;
  border-color: var(--color-border) !important;
  background: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
}

.focus-mode__step {
  border-radius: 50% !important;
}

.focus-mode__value {
  color: var(--color-red-vibrant) !important;
  font-family: var(--font-heading) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  text-shadow: none !important;
  font-variant-numeric: tabular-nums !important;
}

.focus-mode__timer-fill {
  background: var(--color-red-vibrant) !important;
}

/* Cifras clave — pesos, reps, contadores */
.notebook__set-cell,
.runners__metric-value,
.habits__value,
.focus-mode__timer-toggle-time,
.stats__empty-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.focus-mode__timer-toggle-time {
  color: var(--color-red-vibrant) !important;
  text-shadow: none !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
}

/* Superficies sólidas: el grano del body no entra en paneles/inputs */
.card,
.panel,
.sidebar,
.habits,
.welcome-card,
.stats-card,
.form__input,
.notebook__input {
  background-image: none;
}

.form__select {
  background-color: var(--color-surface);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
}

/* ============================================
   THEMES — 8 paletas (Classic por defecto)
   ============================================ */

/* Quiet Luxury layers — light mode safety net (before theme blocks so themes win) */
html[data-theme-mode="light"] {
  --color-surface-float: #FFFFFF;
  --color-surface-inset: #F4F5F7;
  --color-layer-hairline: rgba(20, 22, 24, 0.06);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(28, 27, 26, 0.08);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(28, 27, 26, 0.12);
}

html[data-theme="burgundy-dark"] {
  /* Variante oscura del burdeos oficial (--accent-burgundy #5C2430), aclarado para contraste sobre fondo casi negro. */
  color-scheme: dark;
  /* panel-header theme vars */
  --ph-bg:      #0a0105;
  --ph-orb-c1:  rgba(100, 38, 55, 0.90);
  --ph-orb-c2:  rgba(140, 30, 60, 0.55);
  --ph-orb-c3:  rgba(60, 12, 28, 0.78);
  --ph-spark-1: rgba(180, 80, 80, 0.20);
  --ph-spark-2: rgba(240, 180, 160, 0.08);
  /* about panel theme vars */
  --ab-bg:        #070102;
  --ab-nw-c1:     rgba(140, 38, 62, 0.72);
  --ab-nw-c2:     rgba(80,  20, 35, 0.55);
  --ab-nw-c3:     rgba(190, 60, 80, 0.45);
  --ab-nw-c4:     rgba(50,   8, 20, 0.80);
  --ab-orb-c1:    rgba(120, 38, 60, 0.82);
  --ab-orb-c2:    rgba(160, 30, 60, 0.62);
  --ab-orb-c3:    rgba(70, 12, 30, 0.72);
  --ab-wm-color:  rgba(180, 70, 90, 0.22);
  --ab-dot-color: rgba(200, 100, 120, 0.55);
  --ab-line-clr:  rgba(180, 60, 80, 0.28);
  --ab-ring-from: rgba(140, 40, 65, 0.88);
  --ab-ring-mid:  rgba(200, 80, 80, 0.70);
  --ab-ring-gold: rgba(200, 160, 120, 0.55);
  --ab-eyebrow:   rgba(220, 150, 120, 0.85);
  --ab-cred-bg:   rgba(130, 35, 60, 0.20);
  --ab-cred-bd:   rgba(180, 60, 90, 0.34);
  --ab-cred-tx:   rgba(245, 215, 210, 0.92);
  --ab-cred-bg-hover: rgba(160, 48, 75, 0.32);
  --ab-cred-bd-hover: rgba(220, 90, 110, 0.58);
  --ab-cred-glow:     rgba(160, 40, 65, 0.30);
}

html[data-theme="neon-berry_DELETED"] {
  color-scheme: dark;
  /* panel-header — rosa neón */
  --ph-bg:      #080008;
  --ph-orb-c1:  rgba(180, 20, 100, 0.80);
  --ph-orb-c2:  rgba(255, 42, 133, 0.45);
  --ph-orb-c3:  rgba(100, 0, 60, 0.72);
  --ph-spark-1: rgba(255, 80, 160, 0.22);
  --ph-spark-2: rgba(255, 180, 230, 0.08);
  /* about panel — neon berry */
  --ab-bg:        #050008;
  --ab-nw-c1:     rgba(200, 20, 110, 0.75);
  --ab-nw-c2:     rgba(255, 42, 133, 0.42);
  --ab-nw-c3:     rgba(120,  0,  70, 0.60);
  --ab-nw-c4:     rgba(40,   0,  30, 0.80);
  --ab-orb-c1:    rgba(200, 20, 110, 0.80);
  --ab-orb-c2:    rgba(255, 42, 133, 0.55);
  --ab-orb-c3:    rgba(120, 0, 70, 0.68);
  --ab-wm-color:  rgba(255, 42, 133, 0.18);
  --ab-dot-color: rgba(255, 100, 180, 0.55);
  --ab-line-clr:  rgba(255, 42, 133, 0.25);
  --ab-ring-from: rgba(200, 20, 110, 0.88);
  --ab-ring-mid:  rgba(255, 80, 160, 0.70);
  --ab-ring-gold: rgba(255, 200, 230, 0.55);
  --ab-eyebrow:   rgba(255, 160, 210, 0.85);
  --ab-cred-bg:   rgba(180, 20, 100, 0.18);
  --ab-cred-bd:   rgba(255, 42, 133, 0.35);
  --ab-cred-tx:   rgba(255, 220, 240, 0.92);
  --ab-cred-bg-hover: rgba(220, 40, 130, 0.30);
  --ab-cred-bd-hover: rgba(255, 100, 180, 0.58);
  --ab-cred-glow:     rgba(255, 42, 133, 0.28);
  --color-bg:             #0A0A0A;
  --color-bg-deep:        #050505;
  --color-surface:        #141414;
  --color-surface-hover:  #1C1C1C;
  --color-surface-raised: #181818;
  --color-surface-float:  #181818;
  --color-surface-inset:  #0E0E0E;
  --color-layer-hairline: rgba(255, 255, 255, 0.05);
  --color-border:         #2A2A2A;
  --color-border-strong:  #3F3F3F;
  --color-text-primary:   #F8F8F8;
  --color-text-secondary: #C4A0B0;
  --color-text-muted:     #B0909E;
  --color-accent:           #FF2A85;
  --color-accent-hover:     #FF5CA3;
  --color-accent-soft:      rgba(255, 42, 133, 0.16);
  --color-accent-red:       #FF2A85;
  --color-accent-red-hover: #FF5CA3;
  --color-accent-gold:      #E879B0;
  --color-accent-gold-dim:  #C45A8E;
  --color-red-vibrant:      #FF2A85;
  --color-red-muted:        #C48A9E;
  --color-on-accent:        #0A0A0A;
  --glow-red:               0 0 14px rgba(255, 42, 133, 0.45), 0 0 28px rgba(255, 42, 133, 0.2);
  --glow-red-soft:          0 0 10px rgba(255, 42, 133, 0.3);
  --color-error:          #FF6B7A;
  --color-error-bg:       rgba(255, 107, 122, 0.12);
  --color-success:        #5CB88A;
  --color-success-bg:     rgba(92, 184, 138, 0.12);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-heavy: 0 2px 4px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(0, 0, 0, 0.48);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FF2A85' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="deep-violet"] {
  color-scheme: dark;
  /* panel-header — violeta profundo */
  --ph-bg:      #080610;
  --ph-orb-c1:  rgba(80, 30, 160, 0.82);
  --ph-orb-c2:  rgba(138, 43, 226, 0.48);
  --ph-orb-c3:  rgba(40, 10, 90, 0.75);
  --ph-spark-1: rgba(168, 85, 247, 0.22);
  --ph-spark-2: rgba(220, 190, 255, 0.08);
  /* about panel — deep violet */
  --ab-bg:        #06040e;
  --ab-nw-c1:     rgba(100, 30, 180, 0.72);
  --ab-nw-c2:     rgba(138, 43, 226, 0.50);
  --ab-nw-c3:     rgba(60,  10, 110, 0.65);
  --ab-nw-c4:     rgba(20,   4,  50, 0.82);
  --ab-orb-c1:    rgba(100, 30, 180, 0.80);
  --ab-orb-c2:    rgba(138, 43, 226, 0.58);
  --ab-orb-c3:    rgba(50, 10, 100, 0.70);
  --ab-wm-color:  rgba(138, 43, 226, 0.18);
  --ab-dot-color: rgba(180, 120, 255, 0.55);
  --ab-line-clr:  rgba(138, 43, 226, 0.25);
  --ab-ring-from: rgba(100, 30, 180, 0.88);
  --ab-ring-mid:  rgba(168, 85, 247, 0.70);
  --ab-ring-gold: rgba(216, 180, 254, 0.60);
  --ab-eyebrow:   rgba(200, 170, 255, 0.85);
  --ab-cred-bg:   rgba(100, 30, 180, 0.18);
  --ab-cred-bd:   rgba(138, 43, 226, 0.35);
  --ab-cred-tx:   rgba(235, 220, 255, 0.92);
  --ab-cred-bg-hover: rgba(130, 50, 220, 0.30);
  --ab-cred-bd-hover: rgba(180, 120, 255, 0.58);
  --ab-cred-glow:     rgba(138, 43, 226, 0.28);
  --color-bg:             #141218;
  --color-bg-deep:        #0C0A10;
  --color-surface:        #1C1824;
  --color-surface-hover:  #252030;
  --color-surface-raised: #221E2C;
  --color-surface-float:  #221E2C;
  --color-surface-inset:  #16121E;
  --color-layer-hairline: rgba(255, 255, 255, 0.05);
  --color-border:         #342C42;
  --color-border-strong:  #463A58;
  --color-text-primary:   #F3EEF8;
  --color-text-secondary: #B8A0D4;
  --color-text-muted:     #A090C0;
  --color-accent:           #8A2BE2;
  --color-accent-hover:     #7B2CBF;
  --color-accent-soft:      rgba(138, 43, 226, 0.16);
  --color-accent-red:       #8A2BE2;
  --color-accent-red-hover: #7B2CBF;
  --color-accent-gold:      #D8B4FE;
  --color-accent-gold-dim:  #C4A0E8;
  --color-red-vibrant:      #A855F7;
  --color-red-muted:        #B8A0D4;
  --color-on-accent:        #F8F5FF;
  --glow-red:               0 0 14px rgba(138, 43, 226, 0.4), 0 0 28px rgba(123, 44, 191, 0.2);
  --glow-red-soft:          0 0 10px rgba(138, 43, 226, 0.28);
  --color-error:          #F472B6;
  --color-error-bg:       rgba(244, 114, 182, 0.12);
  --color-success:        #5CB88A;
  --color-success-bg:     rgba(92, 184, 138, 0.12);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(20, 18, 24, 0.45);
  --shadow-heavy: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(20, 18, 24, 0.5);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(20, 18, 24, 0.45);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(20, 18, 24, 0.52);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23D8B4FE' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="forest-tactical"] {
  color-scheme: dark;
  /* panel-header — verde táctico */
  --ph-bg:      #060a04;
  --ph-orb-c1:  rgba(50, 80, 20, 0.84);
  --ph-orb-c2:  rgba(85, 107, 47, 0.52);
  --ph-orb-c3:  rgba(20, 40, 8, 0.78);
  --ph-spark-1: rgba(107, 142, 58, 0.22);
  --ph-spark-2: rgba(180, 210, 140, 0.08);
  /* about panel — forest tactical */
  --ab-bg:        #040802;
  --ab-nw-c1:     rgba(55,  88, 22, 0.75);
  --ab-nw-c2:     rgba(85, 107, 47, 0.52);
  --ab-nw-c3:     rgba(22,  44,  8, 0.65);
  --ab-nw-c4:     rgba(8,   20,  2, 0.82);
  --ab-orb-c1:    rgba(55, 88, 22, 0.82);
  --ab-orb-c2:    rgba(85, 107, 47, 0.60);
  --ab-orb-c3:    rgba(22, 44, 8, 0.72);
  --ab-wm-color:  rgba(107, 142, 58, 0.18);
  --ab-dot-color: rgba(140, 180, 80, 0.55);
  --ab-line-clr:  rgba(107, 142, 58, 0.25);
  --ab-ring-from: rgba(55, 90, 20, 0.88);
  --ab-ring-mid:  rgba(107, 142, 58, 0.70);
  --ab-ring-gold: rgba(180, 210, 120, 0.55);
  --ab-eyebrow:   rgba(180, 210, 140, 0.85);
  --ab-cred-bg:   rgba(55, 88, 22, 0.20);
  --ab-cred-bd:   rgba(107, 142, 58, 0.34);
  --ab-cred-tx:   rgba(220, 235, 200, 0.92);
  --ab-cred-bg-hover: rgba(80, 120, 35, 0.30);
  --ab-cred-bd-hover: rgba(150, 190, 80, 0.55);
  --ab-cred-glow:     rgba(85, 107, 47, 0.28);
  --color-bg:             #111111;
  --color-bg-deep:        #0A0A0A;
  --color-surface:        #181A16;
  --color-surface-hover:  #20241C;
  --color-surface-raised: #1C1E18;
  --color-surface-float:  #1C1E18;
  --color-surface-inset:  #121410;
  --color-layer-hairline: rgba(255, 255, 255, 0.04);
  --color-border:         #2C3228;
  --color-border-strong:  #3E4638;
  --color-text-primary:   #E8EAE4;
  --color-text-secondary: #9AAA88;
  --color-text-muted:     #8A9A7E;
  --color-accent:           #556B2F;
  --color-accent-hover:     #4A5D42;
  --color-accent-soft:      rgba(85, 107, 47, 0.2);
  --color-accent-red:       #556B2F;
  --color-accent-red-hover: #4A5D42;
  --color-accent-gold:      #8A9A6A;
  --color-accent-gold-dim:  #8A9A70;
  --color-red-vibrant:      #6B8E3A;
  --color-red-muted:        #9AAA88;
  --color-on-accent:        #F2F5EC;
  --glow-red:               0 0 14px rgba(85, 107, 47, 0.4), 0 0 28px rgba(74, 93, 66, 0.2);
  --glow-red-soft:          0 0 10px rgba(85, 107, 47, 0.28);
  --color-error:          #C97070;
  --color-error-bg:       rgba(201, 112, 112, 0.12);
  --color-success:        #6B9A5A;
  --color-success-bg:     rgba(107, 154, 90, 0.12);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(0, 0, 0, 0.45);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B8E3A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="arctic-frost"] {
  color-scheme: light;
  /* panel-header — versión clara: fondo azul hielo pálido, orbes cyan */
  --ph-bg:          #E8F4F8;
  --ph-text:        #0F172A;
  --ph-orb-c1:      rgba(6, 182, 212, 0.25);
  --ph-orb-c2:      rgba(14, 116, 144, 0.18);
  --ph-orb-c3:      rgba(186, 230, 253, 0.45);
  --ph-spark-1:     rgba(6, 182, 212, 0.14);
  --ph-spark-2:     rgba(224, 247, 255, 0.30);
  --ph-text-primary:   #0F172A;
  --ph-text-secondary: rgba(15, 23, 42, 0.68);
  --ph-text-muted:     rgba(15, 23, 42, 0.42);
  --ph-border:         rgba(15, 23, 42, 0.12);
  --ph-border-strong:  rgba(15, 23, 42, 0.22);
  --ph-surface:        rgba(255, 255, 255, 0.60);
  --ph-gold:           #0E7490;
  /* about panel — arctic-frost claro */
  --ab-bg:        #EEF8FC;
  --ab-nw-c1:     rgba(6,   182, 212, 0.22);
  --ab-nw-c2:     rgba(14,  116, 144, 0.16);
  --ab-nw-c3:     rgba(186, 230, 253, 0.38);
  --ab-nw-c4:     rgba(220, 245, 255, 0.50);
  --ab-noise-opacity: 0.025;
  --ab-orb-c1:    rgba(6, 182, 212, 0.22);
  --ab-orb-c2:    rgba(14, 116, 144, 0.16);
  --ab-orb-c3:    rgba(186, 230, 253, 0.40);
  --ab-wm-color:  rgba(6, 182, 212, 0.14);
  --ab-dot-color: rgba(6, 182, 212, 0.50);
  --ab-line-clr:  rgba(6, 182, 212, 0.20);
  --ab-ring-from: rgba(6, 182, 212, 0.80);
  --ab-ring-mid:  rgba(14, 116, 144, 0.60);
  --ab-ring-gold: rgba(186, 230, 253, 0.55);
  --ab-eyebrow:   rgba(8, 145, 178, 0.90);
  --ab-text-primary:   #0F172A;
  --ab-text-secondary: rgba(15, 23, 42, 0.70);
  --ab-text-muted:     rgba(15, 23, 42, 0.42);
  --ab-border:         rgba(15, 23, 42, 0.10);
  --ab-gold:           #0E7490;
  --ab-cred-bg:        rgba(6, 182, 212, 0.12);
  --ab-cred-bd:        rgba(6, 182, 212, 0.32);
  --ab-cred-tx:        rgba(15, 23, 42, 0.88);
  --ab-cred-bg-hover:  rgba(6, 182, 212, 0.22);
  --ab-cred-bd-hover:  rgba(6, 182, 212, 0.55);
  --ab-cred-glow:      rgba(6, 182, 212, 0.20);
  --color-bg:             #F8FAFC;
  --color-bg-deep:        #EEF2F7;
  --color-surface:        #FFFFFF;
  --color-surface-hover:  #F1F5F9;
  --color-surface-raised: #F8FAFC;
  --color-surface-float:  #FFFFFF;
  --color-surface-inset:  #F1F5F9;
  --color-layer-hairline: rgba(15, 23, 42, 0.06);
  --color-border:         #DCE3EB;
  --color-border-strong:  #C5D0DB;
  --color-text-primary:   #0F172A;
  --color-text-secondary: #334155;
  --color-text-muted:     #475569;
  --color-accent:           #06B6D4;
  --color-accent-hover:     #0891B2;
  --color-accent-soft:      rgba(6, 182, 212, 0.14);
  --color-accent-red:       #06B6D4;
  --color-accent-red-hover: #0891B2;
  --color-accent-gold:      #0E7490;
  --color-accent-gold-dim:  #155E75;
  --color-red-vibrant:      #00CED1;
  --color-red-muted:        #3D6572;
  --color-on-accent:        #FFFFFF;
  --glow-red:               0 0 14px rgba(6, 182, 212, 0.28), 0 0 26px rgba(0, 206, 209, 0.14);
  --glow-red-soft:          0 0 10px rgba(6, 182, 212, 0.2);
  --color-error:          #DC2626;
  --color-error-bg:       rgba(220, 38, 38, 0.08);
  --color-success:        #059669;
  --color-success-bg:     rgba(5, 150, 105, 0.1);
  --shadow-card:  0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-heavy: 0 2px 4px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(15, 23, 42, 0.12);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2306B6D4' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="warm-amber"] {
  color-scheme: dark;
  /* panel-header — ámbar oscuro */
  --ph-bg:      #0e0a02;
  --ph-orb-c1:  rgba(180, 100, 10, 0.78);
  --ph-orb-c2:  rgba(217, 119, 6, 0.48);
  --ph-orb-c3:  rgba(90, 50, 0, 0.75);
  --ph-spark-1: rgba(245, 158, 11, 0.22);
  --ph-spark-2: rgba(255, 220, 130, 0.08);
  /* about panel — warm amber */
  --ab-bg:        #0b0700;
  --ab-nw-c1:     rgba(190, 110, 12, 0.72);
  --ab-nw-c2:     rgba(217, 119,  6, 0.50);
  --ab-nw-c3:     rgba(100,  55,  0, 0.62);
  --ab-nw-c4:     rgba(40,   20,  0, 0.82);
  --ab-orb-c1:    rgba(190, 110, 12, 0.80);
  --ab-orb-c2:    rgba(217, 119, 6, 0.58);
  --ab-orb-c3:    rgba(100, 55, 0, 0.72);
  --ab-wm-color:  rgba(217, 119, 6, 0.18);
  --ab-dot-color: rgba(251, 191, 36, 0.55);
  --ab-line-clr:  rgba(217, 119, 6, 0.25);
  --ab-ring-from: rgba(180, 100, 10, 0.88);
  --ab-ring-mid:  rgba(245, 158, 11, 0.70);
  --ab-ring-gold: rgba(251, 191, 36, 0.65);
  --ab-eyebrow:   rgba(251, 191, 36, 0.88);
  --ab-cred-bg:   rgba(180, 100, 10, 0.18);
  --ab-cred-bd:   rgba(217, 119, 6, 0.35);
  --ab-cred-tx:   rgba(255, 240, 200, 0.92);
  --ab-cred-bg-hover: rgba(217, 130, 20, 0.30);
  --ab-cred-bd-hover: rgba(251, 191, 36, 0.55);
  --ab-cred-glow:     rgba(217, 119, 6, 0.28);
  --color-bg:             #18181B;
  --color-bg-deep:        #0F0F12;
  --color-surface:        #212126;
  --color-surface-hover:  #2A2A30;
  --color-surface-raised: #26262C;
  --color-surface-float:  #26262C;
  --color-surface-inset:  #1A1A1E;
  --color-layer-hairline: rgba(255, 255, 255, 0.05);
  --color-border:         #3F3F46;
  --color-border-strong:  #52525B;
  --color-text-primary:   #FAFAF9;
  --color-text-secondary: #D6B896;
  --color-text-muted:     #A89880;
  --color-accent:           #D97706;
  --color-accent-hover:     #F59E0B;
  --color-accent-soft:      rgba(217, 119, 6, 0.16);
  --color-accent-red:       #D97706;
  --color-accent-red-hover: #F59E0B;
  --color-accent-gold:      #FBBF24;
  --color-accent-gold-dim:  #D97706;
  --color-red-vibrant:      #F59E0B;
  --color-red-muted:        #C4A574;
  --color-on-accent:        #18181B;
  --glow-red:               0 0 14px rgba(217, 119, 6, 0.4), 0 0 28px rgba(245, 158, 11, 0.18);
  --glow-red-soft:          0 0 10px rgba(217, 119, 6, 0.28);
  --color-error:          #F87171;
  --color-error-bg:       rgba(248, 113, 113, 0.12);
  --color-success:        #5CB88A;
  --color-success-bg:     rgba(92, 184, 138, 0.12);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(0, 0, 0, 0.45);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23F59E0B' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="classic"] {
  /* NULLUM identidad original — Guía Maestra v2.1, burdeos & blanco perla.
     Este bloque pisa :root por especificidad; debe mantenerse en espejo exacto. */
  color-scheme: light;
  --color-bg:             #FAF8F6;
  --color-bg-deep:        #F3EFEB;
  --color-surface:        #FFFFFF;
  --color-surface-hover:  #F3EFEB;
  --color-surface-raised: #FFFFFF;
  --color-surface-float:  #FFFFFF;
  --color-surface-inset:  #F3EFEB;
  --color-layer-hairline: rgba(92, 36, 48, 0.06);
  --color-border:         rgba(92, 36, 48, 0.15);
  --color-border-strong:  rgba(92, 36, 48, 0.32);
  --color-text-primary:   #1A1A1A;
  --color-text-secondary: #4A4238;
  --color-text-muted:     #6B6058; /* ratio ~5.1:1 vs #FAF8F6 — WCAG AA */
  --color-accent:           #5C2430;
  --color-accent-hover:     #471B24;
  --color-accent-soft:      rgba(92, 36, 48, 0.08);
  --color-accent-red:       #5C2430;
  --color-accent-red-hover: #471B24;
  --color-accent-gold:      #8B5A3A;
  --color-accent-gold-dim:  #A07050;
  --color-red-vibrant:      #5C2430;
  --color-red-muted:        #8A5560;
  --color-on-accent:        #FFFFFF;
  --glow-red:               0 0 0 1px rgba(92, 36, 48, 0.18);
  --glow-red-soft:          0 0 0 1px rgba(92, 36, 48, 0.12);
  --color-error:          #5C2430;
  --color-error-bg:       rgba(92, 36, 48, 0.08);
  --color-success:        #2F6B5E;
  --color-success-bg:     rgba(47, 107, 94, 0.1);
  --shadow-card:  0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.04);
  --shadow-heavy: 0 2px 4px rgba(26, 26, 26, 0.05), 0 12px 32px rgba(26, 26, 26, 0.06);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(26, 26, 26, 0.07);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(26, 26, 26, 0.10);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C2430' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

html[data-theme="midnight-blue"] {
  color-scheme: dark;
  --color-bg:             #080A0D;
  --color-bg-deep:        #050608;
  --color-surface:        #14181F;
  --color-surface-hover:  #1B212A;
  --color-surface-raised: #1A2028;
  --color-surface-float:  #1A2028;
  --color-surface-inset:  #0E1218;
  --color-layer-hairline: rgba(255, 255, 255, 0.05);
  --color-border:         #2A313C;
  --color-border-strong:  #3A4452;
  --color-text-primary:   #E8EEF6;
  --color-text-secondary: #9BB0C4;
  --color-text-muted:     #7A94AD;
  --color-accent:           #4DB8FF;
  --color-accent-hover:     #7ACCFF;
  --color-accent-soft:      rgba(77, 184, 255, 0.14);
  --color-accent-red:       #4DB8FF;
  --color-accent-red-hover: #7ACCFF;
  --color-accent-gold:      #7AA8C8;
  --color-accent-gold-dim:  #6B9BC0;
  --color-red-vibrant:      #4DB8FF;
  --color-red-muted:        #8AA3BC;
  --color-on-accent:        #050608;
  --glow-red:               0 0 14px rgba(77, 184, 255, 0.4), 0 0 28px rgba(77, 184, 255, 0.18);
  --glow-red-soft:          0 0 10px rgba(77, 184, 255, 0.28);
  --color-error:          #FF7A88;
  --color-error-bg:       rgba(255, 122, 136, 0.12);
  --color-success:        #5CB88A;
  --color-success-bg:     rgba(92, 184, 138, 0.12);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-heavy: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-elev-1: 0 1px 0 var(--color-layer-hairline), 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-elev-2: 0 1px 0 var(--color-layer-hairline), 0 16px 40px rgba(0, 0, 0, 0.45);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234DB8FF' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

/* Ajustes estructurales compartidos por temas oscuros */
html[data-theme-mode="dark"] body::before {
  opacity: 0.28;
  mix-blend-mode: soft-light;
}

html[data-theme-mode="dark"] body::after {
  opacity: 0.18;
  mix-blend-mode: overlay;
}

html[data-theme-mode="light"] body::before {
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.08 0 0 0 0 0.09 0 0 0 0 0.11 0 0 0 0.72 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

html[data-theme-mode="light"] body::after {
  opacity: 0.2;
  mix-blend-mode: soft-light;
}

.form__select {
  background-image: var(--select-chevron);
}

html[data-theme-mode="dark"] .topbar {
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
}

/* ── _12-polish-themes.css ── */
html[data-theme-mode="dark"] .focus-mode__bottom {
  background: transparent !important;
}

html[data-theme-mode="dark"] .btn--primary,
html[data-theme-mode="dark"] .habits__save-btn,
html[data-theme-mode="dark"] .tag--brutalist,
html[data-theme-mode="dark"] .focus-mode__complete,
html[data-theme-mode="dark"] .focus-mode__chip--primary,
html[data-theme-mode="dark"] .focus-mode__suggest-accept,
html[data-theme-mode="dark"] .focus-mode__set-tab.is-current,
html[data-theme-mode="dark"] .focus-mode__ex-pill.is-current {
  color: var(--color-on-accent);
}

html[data-theme-mode="dark"] .form__input[type="date"] {
  color-scheme: dark;
}

html[data-theme-mode="light"] .form__input[type="date"] {
  color-scheme: light;
}

/* Theme settings UI */
.theme-settings__intro {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-red-muted);
  line-height: 1.5;
  margin: 0 0 var(--space-lg);
}

.theme-settings__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

@media (min-width: 720px) {
  .theme-settings__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-sm);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.theme-option:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.theme-option:focus-visible {
  outline: 2px solid var(--color-red-vibrant);
  outline-offset: 2px;
}

.theme-option.is-active {
  border-color: var(--color-red-vibrant);
  box-shadow: 0 0 0 1px var(--color-red-vibrant), var(--glow-red-soft);
}

.theme-option__preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr;
  height: 44px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.theme-option__swatch {
  display: block;
  min-width: 0;
}

.theme-option__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.theme-option__name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.theme-option__desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.theme-option__preview[data-preview="classic"] .theme-option__swatch--bg { background: #FAF8F6; }
.theme-option__preview[data-preview="classic"] .theme-option__swatch--accent { background: #5C2430; }
.theme-option__preview[data-preview="classic"] .theme-option__swatch--muted { background: #8A7F74; }

.theme-option__preview[data-preview="system"] .theme-option__swatch--bg {
  background: linear-gradient(90deg, #FAF8F6 50%, #0A0A0A 50%);
}
.theme-option__preview[data-preview="system"] .theme-option__swatch--accent { background: #8C3D4D; }
.theme-option__preview[data-preview="system"] .theme-option__swatch--muted { background: #8A8A8A; }

.theme-option__preview[data-preview="burgundy-dark"] .theme-option__swatch--bg { background: #0A0608; }
.theme-option__preview[data-preview="burgundy-dark"] .theme-option__swatch--accent { background: #5C2430; }
.theme-option__preview[data-preview="burgundy-dark"] .theme-option__swatch--muted { background: #9A8E86; }

.theme-option__preview[data-preview="void-violet"] .theme-option__swatch--bg { background: #01010D; }
.theme-option__preview[data-preview="void-violet"] .theme-option__swatch--accent { background: #6331FB; }
.theme-option__preview[data-preview="void-violet"] .theme-option__swatch--muted { background: #88F9C0; }

.theme-option__preview[data-preview="jungle-fire"] .theme-option__swatch--bg { background: #015D47; }
.theme-option__preview[data-preview="jungle-fire"] .theme-option__swatch--accent { background: #FD550A; }
.theme-option__preview[data-preview="jungle-fire"] .theme-option__swatch--muted { background: #E0F354; }

.theme-option__preview[data-preview="coastal"] .theme-option__swatch--bg { background: #DBF2FC; }
.theme-option__preview[data-preview="coastal"] .theme-option__swatch--accent { background: #072D59; }
.theme-option__preview[data-preview="coastal"] .theme-option__swatch--muted { background: #FD6E88; }

.theme-option__preview[data-preview="blueprint"] .theme-option__swatch--bg { background: #21232E; }
.theme-option__preview[data-preview="blueprint"] .theme-option__swatch--accent { background: #105BFF; }
.theme-option__preview[data-preview="blueprint"] .theme-option__swatch--muted { background: #FE8500; }

.theme-option__preview[data-preview="blueprint-light"] .theme-option__swatch--bg { background: #F0F0F0; }
.theme-option__preview[data-preview="blueprint-light"] .theme-option__swatch--accent { background: #105BFF; }
.theme-option__preview[data-preview="blueprint-light"] .theme-option__swatch--muted { background: #FE8500; }

.theme-option__preview[data-preview="miami"] .theme-option__swatch--bg { background: #171F44; }
.theme-option__preview[data-preview="miami"] .theme-option__swatch--accent { background: #74FFED; }
.theme-option__preview[data-preview="miami"] .theme-option__swatch--muted { background: #FE81D1; }

.theme-settings__status {
  margin-top: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-red-muted);
}

/* ── _13-feedback-ui.css ── */
/* ==========================================================================
   Sesión interactiva: volumen en vivo, voz, historial, PR, calentamiento
   ========================================================================== */

.coach-voice {
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  border: var(--border-width) solid var(--color-border);
  background:
    linear-gradient(135deg, rgba(92, 36, 48, 0.06), transparent 55%),
    var(--color-surface);
}

.coach-voice__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.coach-voice__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.coach-voice__dur {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.coach-voice__controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.coach-voice__play {
  width: 42px;
  height: 42px;
  border: var(--border-width) solid var(--color-red-vibrant);
  background: var(--color-red-vibrant);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

.coach-voice__play.is-playing {
  background: transparent;
  color: var(--color-red-vibrant);
}

.coach-voice__wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  flex: 1;
}

.coach-voice__wave span {
  width: 3px;
  background: var(--color-red-muted);
  opacity: 0.55;
  animation: voiceWave 1.1s ease-in-out infinite;
}

.coach-voice__wave span:nth-child(1) { height: 40%; animation-delay: 0s; }
.coach-voice__wave span:nth-child(2) { height: 75%; animation-delay: 0.12s; }
.coach-voice__wave span:nth-child(3) { height: 100%; animation-delay: 0.24s; }
.coach-voice__wave span:nth-child(4) { height: 60%; animation-delay: 0.36s; }
.coach-voice__wave span:nth-child(5) { height: 85%; animation-delay: 0.48s; }

.coach-voice.is-playing .coach-voice__wave span {
  opacity: 1;
  background: var(--color-red-vibrant);
}

@keyframes voiceWave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.warmup-block {
  margin: 0 0 var(--space-md);
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}

.warmup-block__toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.warmup-block__title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.warmup-block__meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.warmup-block__chevron {
  font-size: 0.7rem;
  color: var(--color-red-muted);
  transition: transform 180ms ease;
}

.warmup-block.is-open .warmup-block__chevron {
  transform: rotate(180deg);
}

.warmup-block__body {
  padding: 0 var(--space-sm) var(--space-sm);
  border-top: var(--border-width) solid var(--color-border);
}

.live-volume {
  margin: var(--space-lg) 0 var(--space-md);
  padding: var(--space-md);
  border: var(--border-width) solid var(--color-border);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(92, 36, 48, 0.08), transparent 50%),
    var(--color-surface);
}

.live-volume__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.live-volume__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.live-volume__tonnage {
  margin: 0.15rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.live-volume__tonnage--profile {
  font-size: 1.35rem;
  margin-bottom: var(--space-sm);
}

.live-volume__sets {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

.live-volume__chart-shell {
  height: 110px;
  position: relative;
}

.live-volume__chart-shell--profile {
  height: 140px;
}

.focus-live-volume {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: none;
}

@media (max-height: 720px) {
  .focus-live-volume__chart {
    display: none;
  }

  .focus-live-volume {
    padding: 6px 10px;
  }
}

body.focus-mode-keyboard .focus-live-volume,
body.focus-mode-keyboard .focus-mode__save-hint {
  display: none;
}

body.focus-mode-keyboard .focus-mode__finish {
  min-height: var(--touch-min);
  font-size: 0.85rem;
}

/* Keyboard open: keep dock in the visual viewport; give inputs room to scroll. */
body.focus-mode-keyboard .focus-mode__stage {
  scroll-padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: 12px;
}

body.focus-mode-keyboard .focus-mode__dock {
  flex-shrink: 0;
  padding-bottom: 2px;
}

body.focus-mode-keyboard .focus-set-row__input:focus {
  scroll-margin-block: 72px;
}

body.focus-mode-keyboard .focus-metrics[data-collapsed="true"] {
  padding: 6px 10px;
  gap: 4px;
}

.focus-live-volume__meta {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.focus-live-volume__sep {
  opacity: 0.45;
}

.focus-live-volume__chart {
  height: 40px;
}

.focus-mode__exercise--tap {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.focus-mode__exercise-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.notebook__exercise-label {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 160ms ease;
}

.notebook__exercise-label:hover,
.notebook__exercise-label:focus-visible {
  text-decoration-color: var(--color-red-vibrant);
}

.focus-mode__ex-card--warmup {
  border-style: dashed;
  opacity: 0.95;
}

.focus-mode__exercise-actions {
  display: none;
}

.notebook__history-btn {
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  margin-left: 0.35rem;
  border: var(--border-width) solid var(--color-border);
  background: transparent;
  color: var(--color-red-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.notebook__history-btn:hover {
  border-color: var(--color-red-vibrant);
  color: var(--color-red-vibrant);
}

.ex-history {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.ex-history:not([hidden]) {
  pointer-events: auto;
}

.ex-history[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* Feedback técnico persistente */
.tech-fb {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tech-fb[hidden] {
  display: none !important;
}

.tech-fb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
}

.tech-fb__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: var(--space-md) var(--space-md) calc(var(--space-lg) + env(safe-area-inset-bottom));
}

.tech-fb__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.tech-fb__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tech-fb__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.tech-fb__meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.tech-fb__close {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
}

.tech-fb__section {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.tech-fb__section-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.tech-fb__hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.tech-fb__file {
  display: inline-block;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.tech-fb__file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.tech-fb__file-name,
.tech-fb__status,
.tech-fb__athlete-note {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.tech-fb__status[data-kind="error"] { color: var(--color-error, #5C2430); }
.tech-fb__status[data-kind="ok"] { color: #2e7d32; }

.tech-fb__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.tech-fb__chip {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.tech-fb__chip.is-active {
  border-color: var(--color-red-vibrant, #5C2430);
  color: var(--color-red-vibrant, #5C2430);
  background: color-mix(in srgb, var(--color-red-vibrant, #5C2430) 10%, transparent);
}

.tech-fb__rir-row {
  margin-bottom: 0.75rem;
}

.tech-fb__media {
  margin: 0 0 0.75rem;
}

.tech-fb__media video,
.tech-fb__media img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #111;
  border-radius: var(--radius-sm);
}

.tech-fb__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.tech-fb__tl-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.tech-fb__tl-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.tech-fb__tl-status {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.tech-fb__tl-line,
.tech-fb__tl-errors,
.tech-fb__tl-cues,
.tech-fb__tl-feedback,
.tech-fb__tl-rir {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.tech-fb__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.focus-mode__tech-btn--feedback {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-color: var(--color-red-vibrant, #5C2430);
  background: rgba(92, 36, 48, 0.12);
  color: var(--color-red-vibrant, #5C2430);
}

/* Acciones del panel actual: ocultas (hist/técnica/FB viven en la tarjeta) */
.focus-mode__exercise-actions .focus-mode__tech-btn {
  display: none;
}

.ex-history__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
}

.ex-history__sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: min(72vh, 640px);
  overflow: auto;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-bottom: 0;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  animation: exHistoryIn 220ms ease;
}

@keyframes exHistoryIn {
  from { transform: translateY(18px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.ex-history__header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.ex-history__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.ex-history__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.ex-history__close {
  border: var(--border-width) solid var(--color-border);
  background: transparent;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: inherit;
}

.ex-history__week {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: var(--border-width) solid var(--color-border);
}

.ex-history__week:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.ex-history__week-label {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.ex-history__session {
  margin-bottom: var(--space-sm);
}

.ex-history__date {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.ex-history__sets {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.ex-history__empty {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* --- Toast notifications (feedback global) --- */
/* Contenedor fijo superior centrado (equiv. Tailwind: fixed top-4 left-1/2 -translate-x-1/2 z-50 w-[90%] max-w-sm) */
.app-toast-host {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  z-index: 14000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 90%;
  max-width: 24rem; /* max-w-sm */
  pointer-events: none;
}

.app-toast {
  width: 100%;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translateY(-0.5rem);
}

.app-toast__inner {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-surface);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); /* shadow-lg */
  overflow: hidden;
}

.app-toast__accent {
  width: 4px;
  min-height: 100%;
  align-self: stretch;
  border-radius: 999px;
  background: var(--color-accent);
}

.app-toast__body {
  min-width: 0;
  padding-top: 0.1rem;
}

.app-toast__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.app-toast__message {
  margin: 0.2rem 0 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.app-toast__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  cursor: pointer;
  opacity: 0.7;
}

.app-toast__close:hover,
.app-toast__close:focus-visible {
  opacity: 1;
  color: var(--color-text-primary);
  outline: none;
}

.app-toast[data-type="success"] .app-toast__accent {
  background: var(--color-success);
}

.app-toast[data-type="success"] .app-toast__eyebrow {
  color: var(--color-success);
}

.app-toast[data-type="error"] .app-toast__accent {
  background: var(--color-error);
}

.app-toast[data-type="error"] .app-toast__eyebrow {
  color: var(--color-error);
}

.app-toast[data-type="info"] .app-toast__accent {
  background: var(--color-accent);
}

/* Móvil: mismo anclaje superior centrado (nunca abajo ni en esquinas) */
@media (max-width: 640px) {
  .app-toast-host {
    top: max(1rem, env(safe-area-inset-top));
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    align-items: stretch;
    width: 90%;
    max-width: 24rem;
  }

  .app-toast {
    transform: translateY(-0.75rem);
  }

  .app-toast.is-visible {
    transform: translateY(0);
  }

  .app-toast.is-leaving {
    transform: translateY(-0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-toast.is-visible,
  .app-toast.is-leaving {
    transition: opacity 120ms linear;
    transform: none;
  }
}

.session-done {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.session-done[hidden] {
  display: none !important;
}

.session-done__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}

.session-done__sheet {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0;
  padding: 1.5rem 1.35rem calc(1.35rem + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.18);
  transform: translateY(12px);
  opacity: 0.96;
  transition: transform 220ms ease, opacity 220ms ease;
}

.session-done.is-open .session-done__sheet {
  transform: translateY(0);
  opacity: 1;
}

.session-done__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.session-done__title {
  margin: 0 0 1.1rem;
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.session-done__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.session-done__stats > div {
  padding: 0.7rem 0.55rem;
  border-radius: 12px;
  background: color-mix(in srgb, #5C2430 6%, #ffffff);
  text-align: center;
}

.session-done__stats dt {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.session-done__stats dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-accent);
}

.session-done__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.session-done__share,
.session-done__cta {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.session-done__share {
  border: 1.5px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
}

.session-done__cta {
  border: none;
  background: #5C2430;
  color: #ffffff;
}

.session-done__share-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6b7280;
  text-align: center;
}

.session-done__share-hint[hidden] {
  display: none !important;
}

/* ── Micro-animaciones de feedback ── */

/* 1. Confetti canvas (posición absoluta sobre session-done) */
.session-done__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

/* 2. Check animado — usado en session-done, check-in guardado, plan aprobado */
@keyframes feedback-check-draw {
  from { stroke-dashoffset: 30; opacity: 0; }
  to   { stroke-dashoffset: 0;  opacity: 1; }
}
@keyframes feedback-ring-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

.feedback-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-success-bg, rgba(47,107,94,0.12));
  animation: feedback-ring-pop 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feedback-check svg {
  width: 26px;
  height: 26px;
}

.feedback-check path {
  stroke: var(--color-success, #2F6B5E);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: feedback-check-draw 360ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Check dentro del session-done sheet */
.session-done__check {
  display: flex;
  justify-content: center;
  margin: 0 0 0.85rem;
}

/* 3. Animación "guardado" en el botón (brief pulse verde) */
@keyframes btn-save-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 107, 94, 0.5); }
  60%  { box-shadow: 0 0 0 8px rgba(47, 107, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 107, 94, 0); }
}
.is-save-success {
  animation: btn-save-pulse 600ms ease forwards !important;
}

/* 4. Toast de confirmación check-in — ícono check SVG animado en el toast */

/* 5. Confetti burst — partículas CSS puras (sin librerías) */
@keyframes confetti-fall-1 {
  0%   { transform: translate(0,0) rotate(0deg);    opacity: 1; }
  100% { transform: translate(-40px,120px) rotate(400deg); opacity: 0; }
}
@keyframes confetti-fall-2 {
  0%   { transform: translate(0,0) rotate(0deg);    opacity: 1; }
  100% { transform: translate(30px,110px) rotate(-300deg); opacity: 0; }
}
@keyframes confetti-fall-3 {
  0%   { transform: translate(0,0) rotate(0deg);    opacity: 1; }
  100% { transform: translate(-15px,130px) rotate(360deg); opacity: 0; }
}
@keyframes confetti-fall-4 {
  0%   { transform: translate(0,0) rotate(0deg);    opacity: 1; }
  100% { transform: translate(50px,100px) rotate(-420deg); opacity: 0; }
}
@keyframes confetti-fall-5 {
  0%   { transform: translate(0,0) rotate(0deg);    opacity: 1; }
  100% { transform: translate(-60px,90px) rotate(300deg); opacity: 0; }
}

.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
}
.confetti-particle:nth-child(1)  { background: var(--color-accent);       top: 20%; left: 30%; animation: confetti-fall-1 1.1s 0.05s ease-out forwards; }
.confetti-particle:nth-child(2)  { background: var(--color-accent-gold);  top: 10%; left: 50%; animation: confetti-fall-2 1.0s 0.10s ease-out forwards; }
.confetti-particle:nth-child(3)  { background: var(--color-success);      top: 15%; left: 70%; animation: confetti-fall-3 1.2s 0.00s ease-out forwards; }
.confetti-particle:nth-child(4)  { background: var(--color-accent);       top: 5%;  left: 40%; animation: confetti-fall-4 0.9s 0.15s ease-out forwards; }
.confetti-particle:nth-child(5)  { background: var(--color-accent-gold);  top: 8%;  left: 60%; animation: confetti-fall-5 1.1s 0.08s ease-out forwards; }
.confetti-particle:nth-child(6)  { background: var(--color-success);      top: 25%; left: 20%; animation: confetti-fall-1 1.0s 0.12s ease-out forwards; width:5px;height:10px; }
.confetti-particle:nth-child(7)  { background: var(--color-accent);       top: 18%; left: 80%; animation: confetti-fall-2 1.3s 0.02s ease-out forwards; width:6px;height:6px;border-radius:50%; }
.confetti-particle:nth-child(8)  { background: var(--color-accent-gold);  top: 12%; left: 35%; animation: confetti-fall-3 0.95s 0.18s ease-out forwards; }
.confetti-particle:nth-child(9)  { background: var(--color-success);      top: 22%; left: 65%; animation: confetti-fall-4 1.15s 0.06s ease-out forwards; width:5px;height:9px; }
.confetti-particle:nth-child(10) { background: var(--color-accent);       top: 6%;  left: 55%; animation: confetti-fall-5 1.0s 0.14s ease-out forwards; border-radius:50%; }

@media (prefers-reduced-motion: reduce) {
  .feedback-check,
  .feedback-check path,
  .feedback-check svg,
  .confetti-particle,
  .is-save-success { animation: none !important; }
}

.pr-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 13000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.pr-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pr-toast[hidden] {
  display: none !important;
}

.pr-toast__inner {
  min-width: min(320px, calc(100vw - 2rem));
  padding: var(--space-md) var(--space-lg);
  border: var(--border-width) solid var(--color-red-vibrant);
  background:
    linear-gradient(160deg, rgba(92, 36, 48, 0.12), transparent 60%),
    var(--color-surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: prPulse 900ms ease;
}

@keyframes prPulse {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

.pr-toast__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-red-vibrant);
}

.pr-toast__title {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.pr-toast__detail {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.voice-note-editor {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  border: var(--border-width) dashed var(--color-border);
  background: rgba(92, 36, 48, 0.03);
}

.voice-note-editor__label {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-red-muted);
}

.voice-note-editor__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.voice-note-editor__btn {
  padding: 0.45rem 0.75rem;
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  color: inherit;
}

.voice-note-editor__btn--rec {
  border-color: var(--color-red-vibrant);
  color: var(--color-red-vibrant);
}

.voice-note-editor__btn--rec.is-recording {
  background: var(--color-red-vibrant);
  color: #fff;
  animation: recBlink 1s ease infinite;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.voice-note-editor__status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

.exercise-row {
  grid-template-columns: minmax(0, 1fr) 52px 52px 32px 32px;
}

.exercise-row__block {
  padding: 0.35rem 0.2rem;
  border: var(--border-width) solid var(--color-border);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--color-text-secondary);
}

.exercise-row__block.is-warmup {
  border-color: var(--color-red-vibrant);
  color: var(--color-red-vibrant);
  background: rgba(92, 36, 48, 0.08);
}

.exercise-row--warmup {
  opacity: 0.92;
}

@media (max-width: 720px) {
  .exercise-row {
    grid-template-columns: 1fr 1fr;
  }
  .exercise-row__remove {
    grid-column: 2;
    justify-self: end;
  }
}

/* Transición suave al cambiar tokens */
body,
.card,
.sidebar,
.topbar,
.panel__title,
.btn,
.form__input,
.form__select {
  transition:
    background-color 220ms ease,
    color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    text-shadow 220ms ease;
}

/* ——— Roles: distribución semanal solo lectura (cliente) ——— */
.split-panel--readonly .split-trainer-only,
.split-panel--readonly #splitClientGroup,
.split-panel--readonly #splitDaysGroup,
.split-panel--readonly #splitTemplateGroup,
.split-panel--readonly #saveSplit,
.split-panel--readonly .exercise-row__library,
.split-panel--readonly .exercise-row__remove,
.split-panel--readonly .split-day__add-exercise {
  display: none !important;
}

.split-readonly-banner {
  margin: 0 0 var(--space-md);
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid rgba(77, 184, 255, 0.35);
  border-left: 4px solid var(--color-accent, #4DB8FF);
  background: linear-gradient(135deg, rgba(77, 184, 255, 0.14), rgba(77, 184, 255, 0.04));
  color: var(--color-text-primary, #e8eaed);
  box-shadow: 0 0 0 1px rgba(77, 184, 255, 0.08);
}

.split-readonly-banner__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent, #4DB8FF);
}

.split-readonly-banner__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-primary, #e8eaed);
}

.split-readonly-banner__text strong {
  color: var(--color-accent, #4DB8FF);
  font-weight: 600;
}

.split-readonly-banner.is-pulse {
  animation: splitReadonlyPulse 1.1s ease;
}

@keyframes splitReadonlyPulse {
  0% { box-shadow: 0 0 0 0 rgba(77, 184, 255, 0.55); }
  40% { box-shadow: 0 0 0 8px rgba(77, 184, 255, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(77, 184, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .split-readonly-banner.is-pulse {
    animation: none;
  }
}

.split-client-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted, #9aa3ad);
}

.split-day__name-display {
  margin: 0 0 var(--space-md);
  padding: 0.55rem 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.92rem;
  color: var(--color-text-primary, #e8eaed);
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
}

.exercise-row__name {
  min-width: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--color-text-primary, #e8eaed);
}

.exercise-row__sets-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #9aa3ad);
}

.exercise-row__block-display.is-warmup {
  color: var(--color-accent, #4DB8FF);
}

.split-empty {
  margin: var(--space-md) 0;
  padding: 1.75rem 1.25rem;
  border: 1px dashed var(--color-border-strong, #3d3930);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.split-empty[hidden] {
  display: none !important;
}

.split-empty__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted, #9aa3ad);
}

.split-empty__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.split-empty__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text-muted, #9aa3ad);
  max-width: 36rem;
}

.split-save-feedback {
  margin: var(--space-md) 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #9aa3ad);
}

.split-save-feedback[data-state="ok"] {
  color: var(--color-success, #3d9a6a);
}

.split-save-feedback[data-state="err"] {
  color: var(--color-accent-red, #5C2430);
}

.split-day__volume {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #9aa3ad);
  white-space: nowrap;
}

/* ── _13-feedback-ui.css ── */
.split-day__header-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
}

.split-day--readonly .split-day__volume {
  color: var(--color-accent, #4DB8FF);
}

#splitDesignerCard .card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.split-day--readonly .split-day__name-input,
.exercise-row--readonly .exercise-row__input,
.exercise-row--readonly .exercise-row__sets {
  pointer-events: none;
  opacity: 0.92;
  cursor: default;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.exercise-row--readonly {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
  padding: 0.35rem 0.25rem;
}

.exercise-row--readonly:hover,
.exercise-row--readonly:focus-within {
  background: rgba(77, 184, 255, 0.06);
  border-color: rgba(77, 184, 255, 0.22);
}

.exercise-row__tech-open {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.15rem;
  padding: 0.35rem 0.75rem;
  min-height: var(--touch-min, 44px);
  border: 1px solid rgba(77, 184, 255, 0.45);
  background: rgba(77, 184, 255, 0.08);
  color: var(--color-accent, #4DB8FF);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.exercise-row__tech-open--icon {
  grid-column: auto;
  justify-self: center;
  margin-top: 0;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width) solid var(--color-border);
  background: transparent;
  color: var(--color-accent-gold);
  font-family: var(--font-typewriter, var(--font-mono));
  font-size: 0.85rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  touch-action: manipulation;
}

.exercise-row__tech-open--icon.exercise-row__tech-open--video {
  border-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.14);
  font-style: normal;
  font-size: 0.72rem;
}

.exercise-row__tech-open:hover {
  background: rgba(77, 184, 255, 0.1);
}

.exercise-row__tech-open--icon:hover,
.exercise-row__tech-open--icon:focus-visible {
  border-color: var(--color-accent-gold);
  background: rgba(201, 154, 62, 0.15);
  color: #fff;
  outline: none;
}

.exercise-labels--readonly {
  grid-template-columns: minmax(0, 1.4fr) 52px 52px;
}

.split-day--readonly .exercise-row {
  grid-template-columns: minmax(0, 1.4fr) 52px 52px;
}

@media (max-width: 640px) {
  .split-day--readonly .exercise-row,
  .exercise-labels--readonly {
    grid-template-columns: minmax(0, 1fr) 48px 52px;
  }

  .split-day--readonly .exercise-row__library,
  .split-day--readonly .exercise-row__input {
    grid-column: auto;
  }
}

.voice-note-editor--readonly [data-voice-rec],
.voice-note-editor--readonly [data-voice-clear] {
  display: none !important;
}

/* Cajón sugerencias cliente */
.split-suggest {
  margin-top: var(--space-lg);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.92), rgba(8, 10, 13, 0.98));
  overflow: hidden;
}

.split-suggest__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.split-suggest__eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8b949e);
  margin-bottom: 0.2rem;
}

.split-suggest__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.split-suggest__chevron {
  color: var(--color-text-muted, #8b949e);
  font-size: 0.75rem;
}

.split-suggest__body {
  padding: 0 1.1rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.split-suggest__intro {
  margin: 0.85rem 0 1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-muted, #9aa3ad);
}

.split-suggest__textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.split-suggest__actions {
  margin-top: 0.35rem;
}

.split-suggest__feedback {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.split-suggest__feedback[data-kind="error"] {
  color: #e57373;
}

.split-suggest__feedback[data-kind="ok"] {
  color: var(--color-accent, #4DB8FF);
}

.split-suggest__mine {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.split-suggest__mine-empty {
  margin: 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
  color: var(--color-text-muted, #8b949e);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.split-empty--client {
  margin-top: var(--space-md, 1rem);
}

/* Panel entrenador: sugerencias */
.ecr-panel__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #9aa3ad);
}

.ecr-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ecr-panel__summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--color-text-muted, #9aa3ad);
}

.ecr-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.ecr-panel__empty {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted, #9aa3ad);
  font-size: 0.9rem;
}

.ecr-panel__item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(77, 184, 255, 0.55);
  background: rgba(255, 255, 255, 0.02);
}

.ecr-panel__item[data-status="accepted"] {
  border-left-color: #66bb6a;
  opacity: 0.78;
}

.ecr-panel__item[data-status="rejected"] {
  border-left-color: #e57373;
  opacity: 0.72;
}

.ecr-panel__client {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8b949e);
}

.ecr-panel__exercise {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.ecr-panel__exercise span {
  font-weight: 400;
  color: var(--color-text-muted, #8b949e);
  font-size: 0.85rem;
}

.ecr-panel__reason,
.ecr-panel__alt {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text-muted, #9aa3ad);
}

.ecr-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ecr-panel__status {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: center;
}

.tech-modal__category {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent, #4DB8FF);
}

.tech-modal__readonly {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(77, 184, 255, 0.3);
  border-left: 3px solid var(--color-accent, #4DB8FF);
  background: rgba(77, 184, 255, 0.08);
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-text-primary, #e8eaed);
}

/* Notas de serie en sesión */
.notebook__input--notes {
  min-width: 4.5rem;
  font-size: 1rem; /* evita zoom iOS en focus (≥16px) */
}

.focus-mode__notes {
  margin: 0.85rem 0 0.35rem;
}

.focus-mode__notes-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8b949e);
}

.focus-mode__notes-input {
  width: 100%;
  max-width: 100%;
  min-height: var(--touch-min);
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  touch-action: manipulation;
}

.focus-mode__notes-input:focus {
  outline: none;
  border-color: rgba(77, 184, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(77, 184, 255, 0.18);
}

.focus-mode__marks-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #e57373;
}

@media (max-width: 720px) {
  .split-day--readonly .exercise-row {
    grid-template-columns: 1fr 1fr;
  }
  .ecr-panel__header {
    flex-direction: column;
  }
}

/* ——— Sobre mí (presentación estática) ——— */
#panelAbout.panel--active {
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sin companion: título → contenido con el mismo ritmo de padding del header */
/* ═══════════════════════════════════════════════
   PANEL ABOUT — versión inmersiva burdeos
   ═══════════════════════════════════════════════ */

.about-panel-immersive {
  position: relative;
  background: var(--ab-bg);
  border-radius: 24px;
  overflow: hidden;

  /* tokens locales de texto: consumen variables de tema */
  --color-text-primary:   var(--ab-text-primary);
  --color-text-secondary: var(--ab-text-secondary);
  --color-text-muted:     var(--ab-text-muted);
  --color-border:         var(--ab-border);
  --color-accent-gold:    var(--ab-gold);
}

/* Panel header transparente dentro del inmersivo */
.about-panel-immersive > .panel__header {
  position: relative;
  z-index: 2;
  background: transparent !important;
  border-radius: 0 !important;
  margin-bottom: 0;
  padding-top: 1.6rem;
  padding-bottom: 0.5rem;
  /* overrides locales redundantes ya definidos en .panel__header, los limpiamos */
  --color-text-primary:   #f5f0ee;
  --color-text-secondary: rgba(245, 240, 238, 0.60);
}

.about-panel-immersive > .panel__body {
  position: relative;
  z-index: 2;
  padding-top: 0.5rem;
}

/* ── Fondo animado — Noise Wash ── */
.about-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: var(--ab-bg, #070102);
}

/* Capa 1: gradiente de color que respira suavemente */
.about-bg__wash {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  will-change: transform, opacity;
  background:
    radial-gradient(ellipse 80% 55% at  18% 15%, var(--ab-nw-c1) 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at  85% 80%, var(--ab-nw-c3) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at  70% 20%, var(--ab-nw-c2) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at  25% 88%, var(--ab-nw-c4) 0%, transparent 65%);
  animation: aboutWashBreathe 18s ease-in-out infinite;
}

/* Capa 2: grano — tile SVG estático en caché del navegador */
.about-bg__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--ab-noise-opacity, 0.038);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

@keyframes aboutWashBreathe {
  0%   { transform: scale(1)    rotate(0deg);    opacity: 0.82; }
  33%  { transform: scale(1.06) rotate(2deg);    opacity: 0.95; }
  66%  { transform: scale(0.97) rotate(-1.5deg); opacity: 0.88; }
  100% { transform: scale(1)    rotate(0deg);    opacity: 0.82; }
}

/* Marca de agua — se mantiene */
.about-bg__wm {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 55%;
  max-width: 280px;
  color: var(--ab-wm-color, rgba(180, 60, 80, 0.22));
  animation: aboutWmFloat 14s ease-in-out infinite alternate;
}
@keyframes aboutWmFloat {
  from { transform: rotate(-8deg) translateY(0); }
  to   { transform: rotate(-4deg) translateY(-12px); }
}

/* ── Avatar con anillos de luz ── */
.about__figure--glow {
  position: relative;
  background: transparent !important;
  border: none !important;
  width: 8rem;
  height: 8rem;
  min-width: 8rem;
}

.about__ring {
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--ab-ring-from, rgba(140, 30, 55, 0.85)) 20%,
    var(--ab-ring-mid,  rgba(220, 90, 80, 0.70))  40%,
    var(--ab-ring-gold, rgba(230, 200, 120, 0.60)) 50%,
    var(--ab-ring-mid,  rgba(220, 90, 80, 0.70))  60%,
    var(--ab-ring-from, rgba(140, 30, 55, 0.85)) 80%,
    transparent 100%
  );
  animation: aboutRingSpin 6s linear infinite;
  filter: blur(1px);
}

.about__ring--2 {
  inset: -10px;
  opacity: 0.40;
  animation: aboutRingSpin 9s linear infinite reverse;
  filter: blur(3px);
}

@keyframes aboutRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Foto encima de los rings */
.about__figure--glow .about__photo {
  position: relative;
  z-index: 1;
  border: 3px solid rgba(220, 90, 80, 0.40);
}

/* ── Tarjetas de credenciales ── */
.about__creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  width: 100%;
}

.about__cred-card {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: 100px;
  background: var(--ab-cred-bg, rgba(140, 30, 55, 0.18));
  border: 1px solid var(--ab-cred-bd, rgba(180, 60, 80, 0.32));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ab-cred-tx, rgba(245, 220, 210, 0.90));
  backdrop-filter: blur(6px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  cursor: default;
}

.about__cred-card:hover {
  background: var(--ab-cred-bg-hover, rgba(160, 40, 65, 0.30));
  border-color: var(--ab-cred-bd-hover, rgba(220, 100, 100, 0.55));
  transform: translateY(-2px);
  box-shadow: 0 4px 18px var(--ab-cred-glow, rgba(160, 30, 55, 0.30));
}

.about__cred-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* Overrides eyebrow/name sobre fondo oscuro */
.about-panel-immersive .about__eyebrow {
  color: var(--ab-eyebrow, rgba(230, 160, 120, 0.85));
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
}

.about-panel-immersive .about__name {
  color: #f5f0ee;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.about-panel-immersive .about__text p {
  color: rgba(245, 240, 238, 0.72);
}

.about-panel-immersive .about__contact-link {
  color: rgba(245, 230, 210, 0.75);
  border-color: rgba(255,255,255,0.12);
}

.about-panel-immersive .about__contact-link:hover,
.about-panel-immersive .about__contact-link:focus-visible {
  color: #f5f0ee;
  border-color: rgba(180, 60, 80, 0.55);
  background: rgba(140, 30, 55, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .about-bg__wash,
  .about-bg__wm,
  .about__ring { animation: none; }
}

/* separador */
#panelAbout > .panel__header {
  margin-bottom: 0;
  padding-bottom: var(--space-lg, 1.25rem);
}

#panelAbout > .panel__body {
  padding-top: var(--space-lg, 1.25rem);
}

.about {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl, 1.5rem);
}

.about__figure {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 7rem;
  height: 7rem;
  min-width: 7rem;
  min-height: 7rem;
  max-width: 7rem;
  max-height: 7rem;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  border: 1px solid rgba(20, 22, 24, 0.14);
  background: var(--color-surface, #fff);
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__photo {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 12%;
  border: 0;
  border-radius: 9999px;
}

.about__copy {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.35rem, 3.5vw, 1.85rem) clamp(1.25rem, 3.2vw, 1.75rem);
  border: 1px solid rgba(20, 22, 24, 0.12);
  border-radius: var(--radius-md, 8px);
  background: transparent;
}

.about__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8F6466);
}

.about__name {
  margin: 0 0 var(--space-lg, 1.25rem);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary, #141618);
}

.about__text {
  display: grid;
  gap: 1.15rem;
}

.about__text p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--color-text-primary, #141618);
}

html[data-theme-mode="dark"] .about__figure {
  border-color: rgba(255, 255, 255, 0.16);
  background: #0a0c0e;
}

html[data-theme-mode="dark"] .about__copy {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme-mode="dark"] .about__name,
html[data-theme-mode="dark"] .about__text p {
  color: #e8ecef;
}

html[data-theme-mode="dark"] .about__eyebrow {
  color: color-mix(in srgb, var(--color-accent) 75%, transparent);
}

/* Pie de contacto: terciario, estilo login */
.about__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  width: 100%;
  max-width: 640px;
  margin: var(--space-xl, 2rem) 0 0;
  padding: 0.85rem 0 0.15rem;
  border-top: 1px solid rgba(20, 22, 24, 0.1);
  text-align: center;
}

.about__contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.2rem 0.1rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--color-text-muted, #8F6466);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(143, 100, 102, 0.28);
  background: transparent;
  border: none;
  touch-action: manipulation;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.about__contact-icon {
  flex-shrink: 0;
  opacity: 0.78;
}

.about__contact-icon--ig {
  color: #8F6466;
}

.about__contact-icon--wa {
  color: #25D366;
  opacity: 0.8;
}

.about__contact-link:hover,
.about__contact-link:focus-visible {
  color: var(--color-text-secondary, #7A4E50);
  text-decoration-color: currentColor;
  outline: none;
}

.about__contact-link:hover .about__contact-icon--wa,
.about__contact-link:focus-visible .about__contact-icon--wa {
  opacity: 1;
}

html[data-theme-mode="dark"] .about__contact {
  border-top-color: rgba(255, 255, 255, 0.1);
}

html[data-theme-mode="dark"] .about__contact-link {
  color: var(--color-text-secondary);
  text-decoration-color: color-mix(in srgb, var(--color-text-secondary) 45%, transparent);
}

html[data-theme-mode="dark"] .about__contact-icon--ig {
  color: var(--color-text-secondary);
}

html[data-theme-mode="dark"] .about__contact-link:hover,
html[data-theme-mode="dark"] .about__contact-link:focus-visible {
  color: var(--color-text-primary);
}

/* ——— Modo sesión (entrenador: Mi sesión / Supervisar) ——— */
.session-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
}

.session-mode[hidden] {
  display: none !important;
}

.session-mode__btn {
  appearance: none;
  border: none;
  border-right: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: var(--touch-comfortable);
  padding: 0.85rem 1rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.session-mode__btn:last-child {
  border-right: none;
}

.session-mode__btn:hover,
.session-mode__btn:focus-visible {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
  outline: none;
}

.session-mode__btn.is-active {
  color: var(--color-text-primary);
  background: rgba(201, 154, 62, 0.14);
  box-shadow: inset 0 -2px 0 var(--color-accent-gold);
}

html[data-theme-mode="dark"] .session-mode__btn.is-active {
  background: var(--color-accent-soft);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

/* ——— Supervisión de sesión (entrenador) ——— */
.session-supervise__hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted, #9aa3ad);
}

.session-supervise__status {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary, #7A4E50);
}

.session-supervise__status[data-state="ok"] {
  color: var(--color-success, #4F6B5C);
}

.session-supervise__status[data-state="error"] {
  color: var(--color-error, #5C2430);
}

.session-supervise__eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C2430;
}

.session-supervise__live-head {
  align-items: flex-start;
}

.session-supervise__meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted, #9aa3ad);
}

.session-supervise__empty {
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  color: var(--color-text-muted, #9aa3ad);
}
.session-supervise__empty-icon {
  opacity: 0.35;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted, #9aa3ad);
}
.session-supervise__empty-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary, #c8c8c8);
}
.session-supervise__empty-hint {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.65;
}

.session-supervise__history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.session-supervise__history-empty {
  padding: 0.75rem 0;
  color: var(--color-text-muted, #9aa3ad);
}

.session-supervise__history-btn {
  width: 100%;
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border, #D4D8DE);
  background: var(--color-surface-hover, #F4F5F7);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.session-supervise__history-btn:hover {
  border-color: var(--color-accent, #5C2430);
  background: var(--color-surface, #fff);
}

.session-supervise__history-when {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #9aa3ad);
}

.session-supervise__history-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.session-supervise__history-stats {
  font-size: 0.82rem;
  color: var(--color-text-secondary, #7A4E50);
}

.session-supervise__detail {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border, #D4D8DE);
}

.session-supervise__detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.session-supervise__detail-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

/* Bento métricas — supervisión en vivo */
.supervise-bento {
  --supervise-wine: #5C2430;
  margin: 0 0 1rem;
  padding: 0.85rem;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, #F7F8FA 100%);
}

.supervise-bento[hidden] {
  display: none !important;
}

.supervise-bento__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.supervise-bento__cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  background: #fff;
}

.supervise-bento__cell--status {
  border-color: color-mix(in srgb, var(--supervise-wine) 28%, #E5E7EB);
}

.supervise-bento__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #737373);
}

.supervise-bento__value {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 800;
  line-height: 1.15;
  color: #171717;
  letter-spacing: -0.01em;
}

.supervise-bento__cell--status .supervise-bento__value {
  color: var(--supervise-wine);
}

.supervise-bento__value[data-live="true"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.supervise-bento__value[data-live="true"]::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--supervise-wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--supervise-wine) 18%, transparent);
  animation: supervise-pulse 1.6s ease-in-out infinite;
}

@keyframes supervise-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.supervise-bento__bar {
  margin-top: 0.7rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}

.supervise-bento__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #471B24 0%, #5C2430 100%);
  transition: width 280ms ease;
}

/* Alertas automáticas */
.supervise-alerts {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.supervise-alerts[hidden] {
  display: none !important;
}

.supervise-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #171717;
}

.supervise-alert__icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.supervise-alert--warn .supervise-alert__icon {
  color: #B45309;
}

.supervise-alert--danger .supervise-alert__icon {
  color: #5C2430;
}

/* Tablero de ejercicios (tarjetas + tablas) */
.supervise-board {
  display: block;
}

.supervise-board[hidden] {
  display: none !important;
}

.supervise-board__list {
  display: grid;
  gap: 0.9rem;
}

.supervise-ex {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.supervise-ex[data-alert="warn"] {
  border-color: #F0D9A8;
  box-shadow: 0 0 0 1px color-mix(in srgb, #F59E0B 12%, transparent);
}

.supervise-ex[data-alert="danger"] {
  border-color: #F0C9C9;
  box-shadow: 0 0 0 1px color-mix(in srgb, #5C2430 10%, transparent);
}

.supervise-ex__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid #F3F4F6;
  background: #FAFAFA;
}

.supervise-ex__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #171717;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.supervise-ex__meta {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #737373;
  white-space: nowrap;
}

.supervise-ex__table-wrap {
  overflow-x: auto;}

.supervise-ex__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.84rem;
  color: #171717;
}

.supervise-ex__table th,
.supervise-ex__table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #F3F4F6;
}

.supervise-ex__table th {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #525252;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}

.supervise-ex__th-serie { width: 4.5rem; }
.supervise-ex__th-kg { width: 6.5rem; }
.supervise-ex__th-reps { width: 6.75rem; }
.supervise-ex__th-status { width: auto; }

.supervise-ex__table tbody tr:last-child td {
  border-bottom: none;
}

.supervise-ex__row--done {
  background: color-mix(in srgb, #5C2430 3.5%, #fff);
}

.supervise-ex__table tbody tr[data-alert="warn"] {
  background: #FFFBEB;
}

.supervise-ex__table tbody tr[data-alert="danger"] {
  background: #FEF2F2;
}

.supervise-ex__set-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: color-mix(in srgb, #5C2430 8%, #fff);
  color: #5C2430;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.supervise-ex__row--done .supervise-ex__set-badge {
  background: #5C2430;
  color: #fff;
}

.supervise-ex__num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #171717;
  font-size: 0.95rem;
}

.supervise-ex__unit {
  margin-left: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #737373;
}

.supervise-ex__muted {
  color: #A3A3A3;
  font-size: 0.78rem;
}

.supervise-ex__td-kg,
.supervise-ex__td-reps {
  white-space: nowrap;
}

.supervise-ex__td-status {
  white-space: normal;
}

.supervise-ex__check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #5C2430;
}

.supervise-ex__pending {
  display: inline-flex;
  margin-right: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #A3A3A3;
}

.supervise-ex__rir {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: #F5F5F5;
  font-size: 0.68rem;
  font-weight: 700;
  color: #404040;
  font-variant-numeric: tabular-nums;
}

.supervise-ex__no-note {
  display: inline-block;
  margin-top: 0.15rem;
}

.supervise-ex__note {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #EDEDED;
  background: #F9FAFB;
  max-width: 36rem;
}

.supervise-ex__note-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
}

.supervise-ex__note-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #262626;
  white-space: normal;
  overflow-wrap: anywhere;
}

.supervise-ex__table .supervise-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.3rem;
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  vertical-align: middle;
}

.supervise-delta--up {
  color: #166534;
  background: #ECFDF5;
}

.supervise-delta--down {
  color: #9A3412;
  background: #FFF7ED;
}

.supervise-delta--flat {
  color: #525252;
  background: #F5F5F5;
}

.supervise-board__empty {
  padding: 1rem 0.25rem;
  color: var(--color-text-muted, #737373);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .supervise-ex__table {
    table-layout: auto;
  }

  .supervise-ex__th-serie,
  .supervise-ex__th-kg,
  .supervise-ex__th-reps {
    width: auto;
  }

  .supervise-ex__table th,
  .supervise-ex__table td {
    padding: 0.55rem 0.55rem;
  }
}

@media (max-width: 720px) {
  .supervise-bento__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html[data-theme-mode="dark"] .session-supervise__history-btn {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme-mode="dark"] .session-supervise__history-btn:hover {
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
  background: var(--color-accent-soft);
}

html[data-theme-mode="dark"] .supervise-bento,
html[data-theme-mode="dark"] .supervise-bento__cell,
html[data-theme-mode="dark"] .supervise-ex {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme-mode="dark"] .supervise-ex__head {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme-mode="dark"] .supervise-bento__value,
html[data-theme-mode="dark"] .supervise-ex__name,
html[data-theme-mode="dark"] .supervise-ex__table,
html[data-theme-mode="dark"] .supervise-ex__num,
html[data-theme-mode="dark"] .supervise-ex__note-text {
  color: var(--color-text-primary, #F5F5F5);
}

html[data-theme-mode="dark"] .supervise-ex__table th {
  background: transparent;
  color: var(--color-text-muted);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme-mode="dark"] .supervise-ex__note {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Skeleton loaders (estados de carga elegantes) --- */
.skeleton {
  --skeleton-base: color-mix(in srgb, var(--color-text-primary, #1A1A1A) 8%, var(--color-surface, #fff));
  --skeleton-shine: color-mix(in srgb, var(--color-surface, #fff) 72%, transparent);
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shine) 45%,
    transparent 90%
  );
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton--bar {
  height: 0.8rem;
  max-width: 100%;
}

.skeleton--title {
  height: 1.05rem;
  width: 42%;
}

.skeleton--line {
  height: 0.72rem;
  width: 100%;
}

.skeleton--line-short {
  width: 58%;
}

.skeleton--chip {
  height: 1.35rem;
  width: 4.5rem;
  border-radius: 999px;
}

.skeleton--block {
  height: 4.5rem;
  width: 100%;
  border-radius: var(--radius-sm, 10px);
}

.skeleton--chart {
  height: 180px;
  width: 100%;
  border-radius: var(--radius-sm, 10px);
}

.skeleton--avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skeleton-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skeleton-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.15rem;
  border-bottom: 1px solid var(--color-border);
}

.skeleton-list__item:last-child {
  border-bottom: none;
}

.skeleton-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-md, 1rem);
}

.skeleton-split__day {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--color-bg-deep);
}

.skeleton-split__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: var(--color-surface-raised, var(--color-surface-hover));
  border-bottom: 1px solid var(--color-border);
}

.skeleton-split__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.skeleton-split__exercise {
  display: grid;
  grid-template-columns: 1.4fr 2fr 0.7fr 0.7fr;
  gap: 0.55rem;
  align-items: center;
}

.skeleton-supervise__item {
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 10px);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skeleton-feed__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--color-border);
}

.skeleton-feed__item:last-child {
  border-bottom: none;
}

.skeleton-feed__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skeleton-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.35rem;
}

.skeleton-chat__bubble {
  max-width: 68%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: var(--color-bg-deep);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skeleton-chat__bubble--mine {
  align-self: flex-end;
}

.skeleton-chat__bubble--theirs {
  align-self: flex-start;
}

.skeleton-runner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md, 1rem);
}

.skeleton-runner-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
  background: var(--color-surface);
}

.skeleton-runner-card__thumb {
  height: 96px;
  border-radius: 0;
}

.skeleton-runner-card__body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skeleton-table-row td {
  padding: 0.7rem 0.55rem;
  vertical-align: middle;
}

.skeleton-ex-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.25rem 0;
}

.skeleton-ex-history__week {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skeleton-ex-history__session {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--color-bg-deep);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skeleton-chart-wrap {
  width: 100%;
  padding: 0.35rem 0;
}

.skeleton-chart-wrap[hidden] {
  display: none !important;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
    opacity: 0.35;
    transform: none;
  }
}

html[data-theme-mode="dark"] .skeleton {
  --skeleton-base: var(--color-surface);
  --skeleton-shine: var(--color-accent-soft);
}

html[data-theme-mode="dark"] .skeleton-split__day,
html[data-theme-mode="dark"] .skeleton-supervise__item,
html[data-theme-mode="dark"] .skeleton-runner-card {
  background: var(--color-surface);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme-mode="dark"] .skeleton-chat__bubble {
  background: rgba(255, 255, 255, 0.04);
}

/* ══════════════════════════════════════════════════════════════════════════
   NULLUM — Distribución Semanal · Vista cliente
   Estética: editorial burdeos / dorado · touch-first · animaciones spring
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Panel header: banner de contexto minimalista ─────────────────────── */
.split-readonly-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 var(--space-lg);
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  border-top: none;
  border-right: none;
  border-bottom: none;
  box-shadow: none;
}
.split-readonly-banner__eyebrow {
  flex: 1;
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent);
}
.split-readonly-banner__text {
  margin: 0;
  font-size: var(--text-support);
  color: var(--color-text-muted);
  line-height: 1;
}
.split-readonly-banner.is-pulse {
  animation: nullumBannerPulse 0.7s var(--transition-fast) both;
}
@keyframes nullumBannerPulse {
  0%   { background: var(--color-accent-soft); }
  40%  { background: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface)); }
  100% { background: var(--color-accent-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .split-readonly-banner.is-pulse { animation: none; }
}

/* ── 2. Tarjetas de día: entrada escalonada ──────────────────────────────── */
@keyframes nullumDayIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.split-day--readonly {
  /* Override brutalista: versión cliente más limpia pero con carácter */
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  box-shadow: var(--shadow-elev-1);
  background: var(--color-surface);
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: nullumDayIn 340ms var(--transition-base) both;
}
/* Stagger por posición */
.split-day--readonly:nth-child(1) { animation-delay:  60ms; }
.split-day--readonly:nth-child(2) { animation-delay: 120ms; }
.split-day--readonly:nth-child(3) { animation-delay: 180ms; }
.split-day--readonly:nth-child(4) { animation-delay: 240ms; }
.split-day--readonly:nth-child(5) { animation-delay: 300ms; }
.split-day--readonly:nth-child(6) { animation-delay: 360ms; }
.split-day--readonly:nth-child(7) { animation-delay: 420ms; }

/* Header del día en vista cliente: más generoso y claro */
.split-day--readonly .split-day__header {
  padding: 0.9rem 1rem;
  background: var(--color-bg-deep);
  border-bottom: 1px solid var(--color-border);
  cursor: default;
  /* Sin chevron — en cliente los días están siempre abiertos */
  user-select: none;
}
.split-day--readonly .split-day__title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}
.split-day--readonly .split-day__volume {
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(92, 36, 48, 0.18);
}

/* Nota del coach en cliente: cita editorial */
.split-day--readonly .split-day__coach-note {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}
.split-day--readonly .split-day__coach-note-display {
  margin: 0;
  padding: 0.7rem 1rem;
  border-left: none;
  background: color-mix(in srgb, var(--color-accent-gold) 6%, var(--color-surface));
  border-bottom: 1px solid rgba(139, 90, 58, 0.15);
  font-style: italic;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.split-day--readonly .split-day__coach-note-display::before {
  content: '"';
  font-size: 1.4rem;
  line-height: 0;
  vertical-align: -0.3em;
  color: var(--color-accent-gold);
  margin-right: 0.2em;
  font-style: normal;
}

/* Cabecera de columnas: limpia y compacta */
.split-day--readonly ~ * .exercise-labels--readonly,
.exercise-labels--readonly {
  grid-template-columns: minmax(0, 1fr) 52px 60px 28px;
  padding: 0.3rem 1rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.exercise-labels--readonly .exercise-labels__text {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ── 3. Cuerpo del día: sin padding lateral extra ─────────────────────────── */
.split-day--readonly .split-day__body {
  padding: 0;
}

/* ── 4. Filas de ejercicio: tappables, atléticas ─────────────────────────── */
@keyframes nullumExIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.split-day--readonly .exercise-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 60px 28px;
  gap: 0;
  align-items: center;
  margin: 0;
  padding: 0 1rem;
  min-height: var(--touch-comfortable);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  position: relative;
  background: var(--color-surface);
  transition:
    background-color 180ms var(--transition-fast),
    border-color 180ms var(--transition-fast);
  overflow: hidden;
  opacity: 0;
  animation: nullumExIn 280ms var(--transition-base) both;
}

/* Stagger ejercicios dentro de cada día */
.split-day--readonly .exercise-row:nth-child(1)  { animation-delay:  20ms; }
.split-day--readonly .exercise-row:nth-child(2)  { animation-delay:  60ms; }
.split-day--readonly .exercise-row:nth-child(3)  { animation-delay: 100ms; }
.split-day--readonly .exercise-row:nth-child(4)  { animation-delay: 140ms; }
.split-day--readonly .exercise-row:nth-child(5)  { animation-delay: 180ms; }
.split-day--readonly .exercise-row:nth-child(6)  { animation-delay: 220ms; }
.split-day--readonly .exercise-row:nth-child(7)  { animation-delay: 260ms; }
.split-day--readonly .exercise-row:nth-child(8)  { animation-delay: 300ms; }

.split-day--readonly .exercise-row:last-child {
  border-bottom: none;
}

/* Línea de acento burdeos que aparece al hover/press */
.split-day--readonly .exercise-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 200ms var(--transition-fast);
}
.split-day--readonly .exercise-row:hover::before,
.split-day--readonly .exercise-row:focus-visible::before {
  transform: scaleY(1);
}
.split-day--readonly .exercise-row:hover {
  background: var(--color-accent-soft);
  border-color: rgba(92, 36, 48, 0.2);
}
.split-day--readonly .exercise-row:active {
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
  transform: scale(0.992);
  transition: transform 80ms ease, background-color 80ms ease;
}
.split-day--readonly .exercise-row:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* Nombre del ejercicio */
.split-day--readonly .exercise-row__name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--color-text-primary);
  padding-left: 0.2rem;
  transition: color 180ms var(--transition-fast);
}
.split-day--readonly .exercise-row:hover .exercise-row__name {
  color: var(--color-accent);
}

/* Ejercicio de movilidad/calentamiento */
.split-day--readonly .exercise-row--warmup {
  opacity: 1;
  background: color-mix(in srgb, var(--color-accent-gold) 3%, var(--color-surface));
}
.split-day--readonly .exercise-row--warmup .exercise-row__name {
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Series: número destacado */
.split-day--readonly .exercise-row__sets-display {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--color-text-primary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-comfortable);
}
.split-day--readonly .exercise-row:hover .exercise-row__sets-display {
  color: var(--color-accent);
}

/* Tipo de bloque */
.split-day--readonly .exercise-row__block-display {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--color-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  transition: all 180ms var(--transition-fast);
}
.split-day--readonly .exercise-row__block-display.is-warmup {
  color: var(--color-accent-gold);
  border-color: rgba(139, 90, 58, 0.35);
  background: color-mix(in srgb, var(--color-accent-gold) 8%, transparent);
}
.split-day--readonly .exercise-row:hover .exercise-row__block-display {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Cue visual de tappable */
.exercise-row__tap-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-comfortable);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-border-strong);
  transition: color 180ms var(--transition-fast), transform 200ms var(--transition-fast);
}
.split-day--readonly .exercise-row:hover .exercise-row__tap-cue {
  color: var(--color-accent);
  transform: translateX(3px);
}

/* Estado de sugerencia enviada — badge en la fila */
.split-day--readonly .exercise-row--suggested::after {
  content: '✓';
  position: absolute;
  right: 2rem;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--color-success);
  animation: nullumFadeIn 300ms var(--transition-fast) both;
}
@keyframes nullumFadeIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* Número de ejercicio: índice editorial */

/* ── 5. Estado vacío cliente ─────────────────────────────────────────────── */
.split-empty--client {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  text-align: left;
}
.split-empty--client .split-empty__eyebrow {
  color: var(--color-accent);
}
.split-empty--client .split-empty__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--text-title);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin: 0 0 0.4rem;
}
.split-empty--client .split-empty__text {
  color: var(--color-text-muted);
}

/* ── 6. Bottom-sheet: modal sugerencia de ejercicio ──────────────────────── */
.ex-suggest-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
}
.ex-suggest-modal[hidden] { display: none !important; }

/* Backdrop */
.ex-suggest-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: nullumBackdropIn 220ms ease both;
}
@keyframes nullumBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Sheet */
.ex-suggest-modal__sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -4px 0 0 var(--color-accent), var(--shadow-elev-2);
  padding: 1.5rem 1.5rem calc(1.5rem + var(--safe-bottom));
  animation: nullumSheetUp 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes nullumSheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ex-suggest-modal__sheet,
  .ex-suggest-modal__backdrop {
    animation: none;
  }
}

/* Drag handle visual */
.ex-suggest-modal__sheet::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--color-border-strong);
  border-radius: 2px;
  margin: -0.5rem auto 1.25rem;
}

/* Header del sheet */
.ex-suggest-modal__head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.ex-suggest-modal__eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent);
}
.ex-suggest-modal__title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-title);
  font-weight: 900;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}
.ex-suggest-modal__close {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  touch-action: manipulation;
}
.ex-suggest-modal__close:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.ex-suggest-modal__close:active {
  transform: scale(0.93);
}

/* Cuerpo del sheet */
.ex-suggest-modal__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Botón Ver técnica */
.ex-suggest-modal__tech-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.7rem 1rem;
  background: color-mix(in srgb, var(--color-accent-gold) 7%, var(--color-surface));
  border: 1px solid rgba(139, 90, 58, 0.28);
  color: var(--color-accent-gold);
  font-family: var(--font-heading);
  font-size: var(--text-cta);
  font-weight: 700;
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  touch-action: manipulation;
}
.ex-suggest-modal__tech-btn::after {
  content: '▶';
  font-size: 0.6rem;
  opacity: 0.7;
}
.ex-suggest-modal__tech-btn:hover {
  background: color-mix(in srgb, var(--color-accent-gold) 14%, var(--color-surface));
  border-color: var(--color-accent-gold);
}

/* Divisor suave entre técnica y sugerencia */

/* Form dentro del sheet */
.ex-suggest-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ex-suggest-modal__form .form__group {
  margin-bottom: 0.85rem;
}
.ex-suggest-modal__form .form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 0.35rem;
}
.ex-suggest-modal__textarea {
  min-height: 90px;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Acciones */
.ex-suggest-modal__actions {
  margin-top: 0.5rem;
}
.ex-suggest-modal__actions .btn--primary {
  width: 100%;
  min-height: var(--touch-gym-cta);
  font-size: var(--btn-font-size);
  letter-spacing: 0.1em;
}

/* Feedback inline */
.ex-suggest-modal__feedback {
  margin-top: 0.65rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid currentColor;
}
.ex-suggest-modal__feedback--error {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  animation: nullumFeedbackIn 200ms var(--transition-fast) both;
}
@keyframes nullumFeedbackIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Body scroll lock */
body.ex-suggest-modal--active { overflow: hidden; }

/* ── 7. Responsivo móvil ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .split-day--readonly .exercise-row {
    grid-template-columns: minmax(0, 1fr) 40px 54px 24px;
    padding: 0 0.85rem;
  }
  .split-day--readonly .exercise-row__sets-display {
    font-size: 0.95rem;
  }
  .ex-suggest-modal__sheet {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 1.25rem 1rem calc(1.25rem + var(--safe-bottom));
  }
  .ex-suggest-modal__title {
    font-size: 1rem;
  }
}

/* ── 8. Modo oscuro (si el sistema operativo lo pide) ────────────────────── */
@media (prefers-color-scheme: dark) {
  .ex-suggest-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
  }
}
html[data-theme-mode="dark"] .split-day--readonly {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html[data-theme-mode="dark"] .ex-suggest-modal__sheet {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}

/* ── _14-landing.css ── */
/* ============================================
   MOBILE-FIRST POLISH — overflow, touch, keyboard
   ============================================ */

/*
  Contrato móvil:
  - html/body/shells: min-height 100svh, NUNCA 100dvh (ver comentario en
    html — dvh recalcula el layout en cada scroll al ocultarse/aparecer la
    barra de Safari, causa confirmada de scroll pillado en iOS)
  - safe areas: --safe-top/right/bottom/left
  - targets táctiles: --touch-min 48×48px
  - inputs: font-size ≥16px (sin zoom automático)
  - :active: escala + opacidad; vibración corta vía JS
*/
@supports (height: 100svh) {
  html,
  body {
    min-height: 100svh;
  }
}

/* Capas decorativas: nunca capturan gestos */
body::before,
body::after {
  pointer-events: none;
  touch-action: none;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

.card,
.panel,
.panel--active,
.form__group,
.wci-history,
.wci-accordion,
.exlib__list-wrap,
.session__table-wrapper,
.runners__canvas-wrap,
.runners__controls,
.chat,
.welcome-card,
.constancy,
.exercise-row {
  max-width: 100%;
  min-width: 0;
}

/* Scroll horizontal intencional: no contagiar pull/pan al documento */
.session__table-wrapper,
.exlib__list-wrap,
.focus-mode__set-tabs,
.chat__messages {
  overscroll-behavior-x: contain;
}

/*
  Zoom accidental iOS/Android: el navegador hace zoom si el control
  enfocado mide <16px. Forzar mínimo 16px; respetar tipografías mayores.
*/
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
textarea,
select {
  font-size: max(16px, 1em);
}

/* Login / registro: 16px explícito (iOS Safari zoom) */
.auth .form__input,
.auth .form__select,
.auth-login-modal .form__input,
.auth-login-modal .form__select,
.auth-login-modal input,
.auth-login-modal select,
.auth-login-modal textarea,
#loginForm input,
#loginForm select,
#registerForm input,
#registerForm select,
#registerForm textarea {
  font-size: 16px !important;
  font-size: max(16px, 1rem) !important;
}

/* Reduce delay de doble-tap zoom sin romper pan horizontal */
a,
button,
input,
select,
textarea,
label,
summary,
[role="button"] {
  touch-action: manipulation;
}

/* ——— Touch targets ≥ 48×48 ——— */
button,
.btn,
[role="button"],
.auth__tab,
.sidebar__link,
.sidebar__close,
.sidebar__logout,
.sidebar__user,
.sidebar__logo,
.topbar__hamburger,
.topbar__greeting,
.form__password-toggle,
input[type="checkbox"],
input[type="radio"],
.notebook__checkbox,
.notebook__info-btn,
.notebook__history-btn,
.focus-mode__icon-btn,
.focus-mode__ex-tech,
.focus-mode__step,
.chat__back,
.chat__send,
.smart-feed__item {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}

/* Celdas de calendario / chips densos: no forzar min-width 48px (rompe la grilla 7 cols) */
.calendar__cell,
.calendar-week__day,
.focus-mode__chip,
.welcome-card__index {
  min-width: 0;
}

/* Avatares circulares: geometría fija (evita óvalos por min-width/min-height globales) */
.profile-hero__avatar {
  min-width: 7rem;
  min-height: 7rem;
  max-width: 7rem;
  max-height: 7rem;
}

.profile-hero__avatar-edit {
  min-width: 1.875rem;
  min-height: 1.875rem;
  max-width: 1.875rem;
  max-height: 1.875rem;
}

/* Iconos compactos: área de toque 48px aunque el glifo sea menor */
.sidebar__close,
.topbar__hamburger,
.form__password-toggle,
.notebook__info-btn,
.notebook__history-btn,
.focus-mode__ex-tech,
.chat__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  box-sizing: border-box;
}

.habits__range::-webkit-slider-thumb,
.habits__range::-moz-range-thumb {
  width: var(--touch-min);
  height: var(--touch-min);
}

/* ——— Feedback visual al pulsar (active states) ——— */
.btn:active,
.auth__tab:active,
.sidebar__link:active,
.sidebar__close:active,
.sidebar__logout:active,
.topbar__hamburger:active,
.smart-feed__item:active,
.chat__thread:active,
.calendar__cell:active,
.exercise-row__remove:active,
.constancy button:active,
[role="button"]:active,
button:active:not(:disabled) {
  transform: scale(var(--press-scale));
  opacity: var(--press-opacity);
}

.welcome-card,
.constancy,
.smart-feed__item,
.chat__thread {
  transition:
    transform var(--press-ms) ease,
    opacity var(--press-ms) ease,
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
  .btn:active,
  button:active:not(:disabled) {
    opacity: 0.92;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active,
  .auth__tab:active,
  .sidebar__link:active,
  button:active:not(:disabled),
  [role="button"]:active,
  .smart-feed__item:active,
  .chat__thread:active {
    transform: none;
    opacity: 0.88;
  }
}

.focus-mode__ex-tech {
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}

/* Menos trabajo de pintura en móviles modestos */
@media (max-width: 640px) {
  body::before {
    opacity: 0.4;
    background-size: 200px 200px;
  }

  body::after {
    opacity: 0.14;
  }
}

@media (max-width: 640px) {
  .form__row {
    grid-template-columns: 1fr;
  }

  .exlib__toolbar {
    grid-template-columns: 1fr;
  }

  .report-export__row {
    flex-direction: column;
    align-items: stretch;
  }

  .report-export__month {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .panel__header--with-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .exercise-row,
  .welcome-card,
  .constancy,
  .card,
  .panel--active,
  .runners__metrics,
  .runners__controls,
  .runners__result-actions {
    max-width: 100%;
    min-width: 0;
  }

  .runners__controls .btn,
  .runners__result-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .topbar {
    position: relative; /* no fixed: el dedo desliza el documento entero */
    z-index: 2;
  }

  .app-toast-host {
    top: max(1rem, env(safe-area-inset-top));
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 90%;
    max-width: 24rem;
    align-items: stretch;
    pointer-events: none;
  }

  .chat__composer {
    max-width: 100%;
    min-width: 0;
  }

  .chat__composer-bar {
    max-width: 100%;
    min-width: 0;
  }

  .chat__input {
    width: 0;
    min-width: 0;
  }
}

@media (max-height: 700px) {
  .focus-mode__dock {
    gap: 6px;
  }

  .focus-mode__complete {
    min-height: var(--touch-gym-cta);
  }
}

/* ============================================
   AUTH MÓVIL — teclado, toast, sesión, 1 mano
   ============================================ */

/* Checkbox táctil grande (Mantener sesión) */
.form__check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 var(--space-md);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.form__check--touch {
  min-height: var(--touch-min);
  padding: 0.35rem 0;
}

.form__check-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.form__check-box {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border: 2px solid var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: none;
  position: relative;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form__check-box::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid transparent;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.form__check-input:checked + .form__check-box {
  border-color: var(--color-accent-red);
  background: rgba(92, 36, 48, 0.08);
}

.form__check-input:checked + .form__check-box::after {
  border-color: var(--color-accent-red);
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.form__check-input:focus-visible + .form__check-box {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

.form__check-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.form__check:active .form__check-box {
  transform: scale(0.96);
}

/* Resalte sutil de error en inputs de auth */
.auth .form__input.form__input--error,
#loginForm .form__input.form__input--error {
  border-color: var(--color-error);
  box-shadow: var(--control-error-ring);
}

/* Toast de credenciales: mismo anclaje superior; rojo oscuro, texto blanco */
.app-toast-host.app-toast-host--auth-top {
  top: max(1rem, env(safe-area-inset-top));
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  align-items: stretch;
  width: 90%;
  max-width: 24rem;
  z-index: 14000;
}

.app-toast[data-variant="auth-credentials"] {
  transform: translateY(-0.75rem);
}

.app-toast[data-variant="auth-credentials"].is-visible {
  transform: translateY(0);
}

.app-toast[data-variant="auth-credentials"].is-leaving {
  transform: translateY(-0.5rem);
}

.app-toast[data-variant="auth-credentials"] .app-toast__inner {
  grid-template-columns: 1fr auto;
  background: #471B24;
  border: 1px solid #341318;
  border-radius: 1rem;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.app-toast[data-variant="auth-credentials"] .app-toast__accent {
  display: none;
}

.app-toast[data-variant="auth-credentials"] .app-toast__eyebrow {
  display: none;
}

.app-toast[data-variant="auth-credentials"] .app-toast__message {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.app-toast[data-variant="auth-credentials"] .app-toast__close {
  color: rgba(255, 255, 255, 0.78);
}

.app-toast[data-variant="auth-credentials"] .app-toast__close:hover,
.app-toast[data-variant="auth-credentials"] .app-toast__close:focus-visible {
  color: #fff;
}

/* ——— Auth layout: misma paleta que el resto de la app (mobile-first) ——— */
#screenAuth.app--auth {
  /* Misma identidad que el panel interno: superficie blanca Bento + rojo accent Classic */
  --auth-bg: var(--color-surface);
  --auth-bg-deep: var(--color-surface);
  --auth-surface: var(--color-surface-float);
  --auth-surface-inset: var(--color-surface-inset);
  --auth-border: var(--color-border);
  --auth-border-strong: var(--color-border-strong);
  --auth-text: var(--color-text-primary);
  --auth-text-secondary: var(--color-text-secondary);
  --auth-text-muted: var(--color-text-muted);
  /* Mismo burdeos que el panel interior (--accent-burgundy #5C2430) */
  --auth-wine: var(--color-accent);
  --auth-wine-hover: var(--color-accent-hover);
  --auth-wine-pressed: var(--color-accent-hover);
  --auth-wine-soft: var(--color-accent-soft);
  --auth-card-radius: var(--radius-md);
  --auth-card-shadow: var(--shadow-elev-1);
  --auth-card-gap: 0.85rem;
  background-color: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100svh;
  font-family: var(--font-body);
}

#screenAuth.app--auth .app__header.auth-header {
  background-color: var(--auth-bg);
  border-bottom: 3px solid var(--auth-wine);
  text-align: center;
  padding: max(0.95rem, env(safe-area-inset-top)) var(--page-pad-x) 0.85rem;
}

body.auth-login-modal-open #screenAuth .auth-header__enter {
  visibility: hidden;
  pointer-events: none;
}

.auth-otp-details {
  margin: 0.75rem 0 0;
  border: 0;
}

.auth-otp-details__summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.78rem;
  color: var(--auth-text-muted, #6b7280);
  text-align: center;
}

.auth-otp-details__summary::-webkit-details-marker {
  display: none;
}

.auth-otp-details[open] .auth-otp-details__summary {
  margin-bottom: 0.5rem;
}

#screenAuth.app--auth .app__main {
  align-items: flex-start;
  background: var(--auth-bg);
  padding: 0.65rem var(--page-pad-x) calc(0.75rem + var(--keyboard-inset, 0px));
}

#screenAuth .auth__tabs {
  border-bottom-color: var(--auth-border);
}

#screenAuth .auth__tab {
  color: var(--auth-text-muted);
  min-height: var(--touch-min);
}

#screenAuth .auth__tab:hover {
  color: var(--auth-text-secondary);
}

#screenAuth .auth__tab--active {
  color: var(--auth-text);
}

#screenAuth .auth__tab--active::after {
  background-color: var(--auth-wine);
}

#screenAuth .auth-panel {
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

#screenAuth .auth-panel__body {
  padding: 1rem 0 0.25rem;
}

#screenAuth .auth-login-form .form__group {
  margin-bottom: 0.85rem;
}

#screenAuth .form__label {
  color: var(--auth-text-secondary);
}

#screenAuth .form__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

#screenAuth .form__label-row .form__label {
  margin-bottom: 0;
}

#screenAuth .auth-forgot-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--auth-wine);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

#screenAuth .auth-forgot-link:hover,
#screenAuth .auth-forgot-link:focus-visible {
  color: var(--auth-wine-hover);
  outline: none;
}

#screenAuth .form__input,
#screenAuth .form__select,
#screenAuth textarea.form__input {
  min-height: var(--touch-min);
  background-color: var(--auth-surface);
  border-color: var(--auth-border-strong);
  color: var(--auth-text);
  box-shadow: none;
}

#screenAuth .form__input:not(.form__input--float)::placeholder,
#screenAuth textarea.form__input:not(.form__input--float)::placeholder {
  color: var(--auth-text-muted);
}

#screenAuth .form__input:focus,
#screenAuth .form__select:focus,
#screenAuth textarea.form__input:focus {
  border-color: var(--auth-wine);
  box-shadow: 0 0 0 3px var(--auth-wine-soft);
}

#screenAuth .form__input:hover:not(:focus),
#screenAuth .form__select:hover:not(:focus) {
  border-color: var(--auth-border-strong);
}

#screenAuth .form__password-toggle {
  color: var(--auth-text-muted);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}

#screenAuth .form__password-toggle:hover,
#screenAuth .form__password-toggle:focus-visible {
  color: var(--auth-text);
}

#screenAuth .form__check-box {
  background: var(--auth-surface);
  border-color: var(--auth-border-strong);
}

#screenAuth .form__check-input:checked + .form__check-box {
  border-color: var(--auth-wine);
  background: var(--auth-wine-soft);
}

#screenAuth .form__check-label {
  color: var(--auth-text-secondary);
}

#screenAuth .btn--auth-cta,
#screenAuth #loginSubmit,
#screenAuth #registerSubmit,
#screenAuth #spotSubmit {
  width: 100%;
  min-height: 52px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  border-radius: var(--radius-md);
  background-color: var(--auth-wine);
  border-color: var(--auth-wine);
  color: #fff;
  box-shadow: none;
}

#screenAuth .btn--auth-cta:hover,
#screenAuth #loginSubmit:hover,
#screenAuth #registerSubmit:hover,
#screenAuth #spotSubmit:hover {
  background-color: var(--auth-wine-hover);
  border-color: var(--auth-wine-hover);
  transform: none;
  box-shadow: none;
}

#screenAuth .auth-demo {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--auth-border);
}

#screenAuth .auth-demo__label {
  color: var(--auth-text-muted);
}

#screenAuth .auth-demo__btn,
#screenAuth .btn--ghost {
  color: var(--auth-text-secondary);
  border-color: var(--auth-border-strong);
  background: transparent;
  box-shadow: none;
}

#screenAuth .auth-demo__btn:hover,
#screenAuth .btn--ghost:hover {
  color: var(--auth-text);
  border-color: var(--auth-wine);
  background: var(--auth-wine-soft);
  transform: none;
}

#screenAuth .form__hint {
  color: var(--auth-text-muted);
}

#screenAuth .alert--error {
  background: var(--color-error-bg);
  border-color: var(--color-error);
  color: var(--color-error);
}

#screenAuth .alert.alert--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* WhatsApp: enlace terciario discreto (pie, fuera del form) */

#screenAuth.app--auth .app__footer {
  background: var(--auth-bg);
  border-top: none;
  padding-top: 0.5rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  position: relative;
}

#screenAuth.app--auth .app__footer-text {
  color: var(--auth-text-muted);
}

/* ── CTA de WhatsApp — al final del todo, antes del footer ── */
#screenAuth .nlm-wa-cta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 760px;
  margin: 0.5rem auto 1.5rem;
  padding: 1.1rem 1.25rem;
  box-sizing: border-box;
  background: #1C1816;
  border-radius: var(--auth-card-radius, 16px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease;
}
#screenAuth .nlm-wa-cta:hover,
#screenAuth .nlm-wa-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
  outline: none;
}
#screenAuth .nlm-wa-cta:active {
  transform: translateY(0) scale(0.98);
}
#screenAuth .nlm-wa-cta__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #25D366;
  animation: nlm-wa-pulse 2.4s ease-in-out infinite;
}
#screenAuth .nlm-wa-cta__icon {
  width: 24px;
  height: 24px;
  color: #fff;
}
#screenAuth .nlm-wa-cta__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}
#screenAuth .nlm-wa-cta__label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
}
#screenAuth .nlm-wa-cta__sub {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}
#screenAuth .nlm-wa-cta__arrow {
  flex-shrink: 0;
  color: #fff;
  font-size: 1.2rem;
  transition: transform 220ms ease;
}
#screenAuth .nlm-wa-cta:hover .nlm-wa-cta__arrow {
  transform: translateX(4px);
}
@keyframes nlm-wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #screenAuth .nlm-wa-cta__icon-wrap {
    animation: none;
  }
}

#screenAuth #authSection {
  scroll-margin-top: 0.75rem;
}

/* --- Sección "Cómo funciona" (3 pasos) --- */



/* --- Landing comercial (scroll vertical) --- */
#screenAuth .auth-landing {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0.85rem var(--page-pad-x) 2.5rem;
  border-top: 0;
  scroll-margin-top: 0.5rem;
}

#screenAuth .auth-purchase .auth-land__eyebrow {
  margin: 0;
  position: relative;
  z-index: 1;
}

#screenAuth .auth-purchase .auth-land__title {
  margin: 0;
  position: relative;
  z-index: 1;
}

#screenAuth .auth-purchase .auth-land__copy {
  margin: 0;
  max-width: 36em;
  position: relative;
  z-index: 1;
}

#screenAuth .auth-land__eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--auth-wine);
}

#screenAuth .auth-land__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading);
  font-size: var(--text-title);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--auth-text);
}

#screenAuth .auth-land__copy {
  margin: 0 0 1.25rem;
  max-width: 38em;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  color: var(--auth-text-secondary);
}

/* Método NULLUM — desglose visual */

/* auth-method__step now delegates all visual chrome to .nlm-how__card */

/* Trigger card-bar animation when inside auth section viewport */
#screenAuth .auth-method__step .nlm-how__card-bar {
  transform: scaleX(1); /* always visible in auth landing context */
}





#screenAuth a.auth-land__cta.btn--primary {
  background-color: var(--auth-wine);
  border-color: var(--auth-wine);
  color: #fff;
  box-shadow: none;
}

#screenAuth a.auth-land__cta.btn--primary:hover,
#screenAuth a.auth-land__cta.btn--primary:focus-visible {
  background-color: var(--auth-wine-hover);
  border-color: var(--auth-wine-hover);
  outline: none;
}

/* ── Quién es tu coach — bio pública, interactiva (foto + credenciales + contacto) ── */
#screenAuth .auth-land__reveal.is-visible .auth-coach__cred {
  animation: nlm-pill-in 0.5s ease-out both;
}
#screenAuth .auth-land__reveal.is-visible .auth-coach__cred:nth-child(1) { animation-delay: 0.12s; }
#screenAuth .auth-land__reveal.is-visible .auth-coach__cred:nth-child(2) { animation-delay: 0.22s; }




/* --- Hero conversion CTAs: alto contraste, touch-friendly --- */

/* ── _14-landing.css ── */
@keyframes authScrollHintFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(3px);
    opacity: 0.95;
  }
}



#screenAuth a.auth-convert-cta.btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: var(--touch-gym, 56px);
  padding: 0.95rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background-color: var(--auth-wine);
  background-image: none;
  border: 0;
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

#screenAuth .auth-convert-cta .btn__text {
  font-size: 0.95rem;
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
}

#screenAuth a.auth-convert-cta.btn--primary:hover {
  background-color: var(--auth-wine-hover);
  border: 0;
  border-color: transparent;
  color: #fff;
  transform: none;
  box-shadow: none;
}

#screenAuth a.auth-convert-cta.btn--primary:focus-visible {
  background-color: var(--auth-wine-hover);
  border: 0;
  color: #fff;
  transform: none;
  outline: 2px solid color-mix(in srgb, var(--auth-wine) 40%, transparent);
  outline-offset: 3px;
}

/* Vista previa del panel (quita miedo a la herramienta) */

#screenAuth .auth-panel-preview__stage.is-dragging {
  cursor: grabbing;
  touch-action: none;
}

#screenAuth .auth-panel-preview__stage.is-dragging .auth-panel-preview__track {
  transition: none;
}

#screenAuth .auth-panel-preview__set.is-swiping .auth-panel-preview__set-rail,
#screenAuth .auth-panel-preview__set.is-swipe-armed .auth-panel-preview__set-rail {
  opacity: 1;
}

#screenAuth .auth-panel-preview__set.is-next {
  border-color: color-mix(in srgb, var(--auth-wine) 40%, var(--auth-border));
  background: color-mix(in srgb, var(--auth-wine) 12%, transparent);
}

#screenAuth .auth-panel-preview__set.is-next strong {
  color: var(--auth-wine);
}

#screenAuth .auth-panel-preview__set.is-done {
  border-color: color-mix(in srgb, var(--auth-wine) 28%, var(--auth-border));
  opacity: 0.72;
}

#screenAuth .auth-panel-preview__set.is-done .auth-panel-preview__set-body span:first-child,
#screenAuth .auth-panel-preview__set.is-done strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: color-mix(in srgb, var(--auth-wine) 75%, transparent);
}

#screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span {
  animation: authPanelPreviewBarIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span:nth-child(2) { animation-delay: 0.05s; }
#screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span:nth-child(3) { animation-delay: 0.1s; }
#screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span:nth-child(4) { animation-delay: 0.15s; }
#screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span:nth-child(5) { animation-delay: 0.2s; }

@keyframes authPanelPreviewBarIn {
  from { transform: scaleY(0.28); opacity: 0.45; }
  to { transform: scaleY(1); opacity: 1; }
}

#screenAuth .auth-panel-preview__dot.is-on::after {
  width: 18px;
  background: var(--auth-wine, #5C2430);
}

#screenAuth .auth-convert-cta--whatsapp .btn__text {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Acceso recurrente: modal centrado (no acordeón) */
body.auth-login-modal-open {
  overflow: hidden;
}

.auth-login-modal[hidden] {
  display: none !important;
}

.auth-login-modal {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

/* Anclar al visualViewport siempre que el modal esté abierto (teclado / barras OS). */
body.auth-login-modal-open .auth-login-modal {
  inset: auto;
  top: var(--vv-offset-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--vv-height, 100dvh);
  max-height: var(--vv-height, 100dvh);
}

.auth-login-modal.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.auth-login-modal__backdrop {
  /* color-mix solo acepta 2 colores; se usa una mezcla en dos pasos anidada */
  background: color-mix(in srgb, color-mix(in srgb, var(--auth-bg, var(--color-bg)) 74%, var(--auth-wine, var(--color-accent))) 70%, #1c1b1a);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.auth-login-modal.is-open .auth-login-modal__backdrop {
  opacity: 1;
}

.auth-login-modal__dialog {
  width: min(420px, 100%);
  max-height: min(90vh, 860px);
  max-height: min(90dvh, 860px);
  max-height: min(90dvh, var(--vv-height, 90dvh), 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--auth-surface, var(--color-surface-float));
  border: 1px solid var(--auth-border, var(--color-border));
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition:
    opacity 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.auth-login-modal.is-open .auth-login-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-login-modal__dialog.is-dragging {
  transition: none !important;
  will-change: transform, opacity;
}

.auth-login-modal__dialog.is-swipe-closing {
  transition:
    opacity 220ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.auth-login-modal__grab {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0 0.15rem;
  touch-action: none;
  cursor: grab;
}

.auth-login-modal__handle {
  display: block;
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--auth-text-muted, #6b6560) 55%, transparent);
}

.auth-login-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.6rem;
  flex-shrink: 0;
}

.auth-login-modal__wordmark {
  font-family: var(--font-mono, monospace);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--auth-wine, var(--color-accent));
  user-select: none;
}

.auth-login-modal__title {
  margin: 0 0 1.25rem;
  padding: 0 1.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--auth-text, var(--color-text-primary));
  flex-shrink: 0;
}

.auth-login-modal__close {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--auth-text-muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.auth-login-modal__close:hover,
.auth-login-modal__close:focus-visible {
  color: var(--auth-text);
  background: color-mix(in srgb, var(--auth-text) 8%, transparent);
  outline: none;
}

.auth-login-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  scroll-padding-top: 0.75rem;
  scroll-padding-bottom: 5rem;}

.auth-login-modal #authSection {
  scroll-margin-top: 0;
}

.auth-login-modal .auth__tabs {
  margin-bottom: 0.15rem;
  border-bottom-color: var(--auth-border);
}

.auth-login-modal .auth-panel__body {
  padding-top: 0.85rem;
}

/* Floating labels (login / invitación) */
#screenAuth .form__group--float,
.auth-login-modal .form__group--float {
  position: relative;
  margin-bottom: 0.95rem;
}

#screenAuth .form__input--float,
.auth-login-modal .form__input--float {
  width: 100%;
  min-height: 52px;
  padding-top: 1.35rem;
  padding-bottom: 0.55rem;
  line-height: 1.25;
  font-size: 16px;
  background-color: transparent;
  border: 1px solid color-mix(in srgb, var(--auth-text) 16%, transparent);
  border-radius: var(--control-radius);
  color: var(--auth-text);
  box-shadow: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

#screenAuth textarea.form__input--float,
.auth-login-modal textarea.form__input--float {
  min-height: 96px;
  padding-top: 1.35rem;
  resize: vertical;
}

#screenAuth .form__input--float::placeholder,
.auth-login-modal .form__input--float::placeholder {
  color: transparent;
}

/* Login: placeholders sutiles; labels flotan al enfocar / rellenar */
.auth-login-modal #loginCredentials .form__input--float::placeholder {
  color: color-mix(in srgb, var(--auth-text-muted) 78%, transparent);
  opacity: 1;
  transition: color 140ms ease, opacity 140ms ease;
}

.auth-login-modal #loginCredentials .form__input--float:focus::placeholder {
  color: transparent;
  opacity: 0;
}

#screenAuth .form__float-label,
.auth-login-modal .form__float-label {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0 0.2rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--auth-text-muted) 88%, var(--auth-text) 12%);
  pointer-events: none;
  transition: top 160ms ease, transform 160ms ease, font-size 160ms ease, color 160ms ease, opacity 140ms ease;
  background: transparent;
  z-index: 1;
}

.auth-login-modal #loginCredentials .form__input--float:placeholder-shown:not(:focus) + .form__float-label {
  opacity: 0;
}

#screenAuth .form__group--float-area .form__float-label,
.auth-login-modal .form__group--float-area .form__float-label {
  top: 1.15rem;
  transform: none;
}

#screenAuth .form__input--float:focus,
.auth-login-modal .form__input--float:focus {
  border-color: color-mix(in srgb, var(--auth-wine) 70%, var(--auth-text) 10%);
  background-color: color-mix(in srgb, var(--auth-surface) 55%, transparent);
  box-shadow: 0 0 0 3px var(--auth-wine-soft);
  outline: none;
}

#screenAuth .form__input--float:focus + .form__float-label,
#screenAuth .form__input--float:not(:placeholder-shown) + .form__float-label,
#screenAuth .form__input--float:-webkit-autofill + .form__float-label,
.auth-login-modal .form__input--float:focus + .form__float-label,
.auth-login-modal .form__input--float:not(:placeholder-shown) + .form__float-label,
.auth-login-modal .form__input--float:-webkit-autofill + .form__float-label,
.auth-login-modal .form__group--float.is-filled .form__float-label {
  top: 0.28rem;
  transform: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--auth-wine);
  opacity: 1;
  background: transparent;
}

#screenAuth .form__group--float-password,
.auth-login-modal .form__group--float-password {
  position: relative;
}

#screenAuth .form__group--float-password .form__input--float,
.auth-login-modal .form__group--float-password .form__input--float {
  padding-right: 3.4rem;
}

#screenAuth .form__group--float-password .form__password-toggle,
.auth-login-modal .form__group--float-password .form__password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

#screenAuth .form__group--suffix .form__input--float,
.auth-login-modal .form__group--suffix .form__input--float {
  padding-right: 2.6rem;
}

#screenAuth .form__group--suffix .form__input-suffix,
.auth-login-modal .form__group--suffix .form__input-suffix {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

#screenAuth .form__label-row--forgot,
.auth-login-modal .form__label-row--forgot {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.15rem;
}

#screenAuth .auth-support-hint,
.auth-login-modal .auth-support-hint {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--auth-text-muted);
}

#screenAuth .auth-support-hint__link,
.auth-login-modal .auth-support-hint__link {
  color: var(--auth-wine);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#screenAuth .auth-support-hint__link:hover,
.auth-login-modal .auth-support-hint__link:hover {
  color: var(--auth-wine-hover);
}

#screenAuth .btn--auth-cta,
.auth-login-modal .btn--auth-cta {
  min-height: 52px;
  width: 100%;
  border-radius: var(--radius-md);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
  font-weight: var(--weight-cta);
  background-color: var(--auth-wine, var(--color-accent));
  border-color: var(--auth-wine, var(--color-accent));
  color: #fff;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

#screenAuth .btn--auth-cta:hover,
#screenAuth .btn--auth-cta:focus-visible,
.auth-login-modal .btn--auth-cta:hover,
.auth-login-modal .btn--auth-cta:focus-visible,
.auth-login-modal #loginSubmit:hover,
.auth-login-modal #loginSubmit:focus-visible,
.auth-login-modal #registerSubmit:hover,
.auth-login-modal #registerSubmit:focus-visible {
  background-color: var(--auth-wine-hover, var(--color-accent-hover));
  border-color: var(--auth-wine-hover, var(--color-accent-hover));
  color: #fff;
  box-shadow: none;
}

#screenAuth .btn--auth-cta:active,
.auth-login-modal .btn--auth-cta:active,
.auth-login-modal #loginSubmit:active,
.auth-login-modal #registerSubmit:active {
  background-color: var(--auth-wine-pressed, var(--color-accent-hover));
  border-color: var(--auth-wine-pressed, var(--color-accent-hover));
}

.auth-login-modal #loginSubmit.btn--loading .btn__text,
.auth-login-modal .btn--auth-cta.btn--loading .btn__text {
  color: rgba(255, 255, 255, 0.92);
}

.auth-login-modal #loginSubmit.btn--loading .btn__spinner,
.auth-login-modal .btn--auth-cta.btn--loading .btn__spinner {
  border-top-color: #fff;
  border-right-color: rgba(255, 255, 255, 0.25);
}

/* Alertas de acceso: banner burdeos sutil sin saltos bruscos */
.auth-login-modal .alert {
  margin: 0 0 0.85rem;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  display: block;
  transform: translateY(-4px);
  transition:
    max-height 220ms ease,
    opacity 200ms ease,
    padding 200ms ease,
    margin 200ms ease,
    transform 200ms ease;
}

.auth-login-modal .alert.alert--visible {
  max-height: 6rem;
  opacity: 1;
  padding: 0.7rem 0.85rem;
  transform: translateY(0);
}

.auth-login-modal .alert--error {
  background: color-mix(in srgb, var(--auth-wine, var(--color-accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--auth-wine, var(--color-accent)) 28%, transparent);
  color: var(--auth-wine, var(--color-accent));
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-login-modal .alert--success {
  background: color-mix(in srgb, var(--color-success, #2f6b4f) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-success, #2f6b4f) 28%, transparent);
  color: var(--color-success, #2f6b4f);
  font-weight: 600;
}

#screenAuth .form__label-row--forgot .auth-forgot-link,
.auth-login-modal .form__label-row--forgot .auth-forgot-link {
  min-height: 32px;
  padding: 0.15rem 0;
  font-size: 0.74rem;
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-modal,
  .auth-login-modal__backdrop,
  .auth-login-modal__dialog,
  .auth-login-modal .alert,
  #screenAuth .form__float-label,
  .auth-login-modal .form__float-label,
  #screenAuth .form__input--float,
  .auth-login-modal .form__input--float {
    transition: none !important;
  }

  .auth-login-modal__dialog {
    transform: none !important;
  }
}

#screenAuth .auth-otp__toggle.btn--ghost {
  width: auto;
  min-height: 44px;
  padding: 0.45rem 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--auth-text-muted);
  border: 0;
  background: transparent;
  box-shadow: none;
}

#screenAuth .auth-otp__toggle.btn--ghost:hover,
#screenAuth .auth-otp__toggle.btn--ghost:focus-visible {
  color: var(--auth-text-secondary);
  background: transparent;
  border: 0;
}

#screenAuth .auth-demo {
  border-top-style: dotted;
}

#screenAuth .auth-demo__btn.btn--ghost {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--auth-text-muted);
  border: 0;
  background: transparent;
  box-shadow: none;
}

#screenAuth .auth-demo__btn.btn--ghost:hover,
#screenAuth .auth-demo__btn.btn--ghost:focus-visible {
  color: var(--auth-text);
  background: transparent;
  border: 0;
}

/* Bento grid — mismo sistema quiet luxury que hábitos / welcome */

#screenAuth .auth-land__bento-intro .auth-land__eyebrow {
  margin-bottom: 0.25rem;
}

#screenAuth .auth-land__bento-intro .auth-land__copy {
  margin: 0;
}

/* Landing accordions — shared (tools / fit / contrast), collapsed by default */

#screenAuth .auth-land-acc.is-open .auth-land-acc__trigger {
  border-color: color-mix(in srgb, var(--auth-wine) 22%, var(--auth-border));
}

#screenAuth .auth-land-acc__trigger .auth-land__eyebrow {
  margin: 0;
}

#screenAuth .auth-land-acc__trigger .auth-land__copy {
  margin: 0;
  max-width: 36em;
}

#screenAuth .auth-land-acc__trigger .auth-land__title {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
}

#screenAuth .auth-land-acc.is-open .auth-land-acc__chevron {
  transform: rotate(-135deg);
  opacity: 1;
}

#screenAuth .auth-land-acc.is-open .auth-land-acc__panel {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

#screenAuth .auth-land-acc.is-open .auth-land-acc__panel-inner {
  padding-top: var(--auth-card-gap);
}

#screenAuth .auth-land-acc:not(.is-open) .auth-land-acc__panel {
  pointer-events: none;
}

/* Filtro ideal: para quién sí / no (usa auth-land-acc) */

#screenAuth .auth-land-acc.auth-fit.is-open .auth-land-acc__panel {
  margin: 0.55rem 0 0;
}

#screenAuth .auth-land-acc.auth-fit.is-open .auth-land-acc__panel-inner {
  padding-top: 0;
}



/* Contraste directo: apps/Instagram vs NULLUM 1 a 1 (usa .auth-land-acc) */

#screenAuth .auth-land-acc.auth-contrast.is-open .auth-land-acc__panel {
  margin: var(--auth-card-gap) 0 0;
}

#screenAuth .auth-land-acc.auth-contrast.is-open .auth-land-acc__panel-inner {
  padding-top: 0;
}

#screenAuth .btn--loading .auth-convert-cta__promise {
  opacity: 0.55;
}

/* Test de punto de partida (CRO · 3 clics) */

#screenAuth .auth-fit-quiz__dot.is-done,
#screenAuth .auth-fit-quiz__dot.is-active {
  background: var(--auth-wine);
}

#screenAuth .auth-fit-quiz__option.is-selected {
  border-color: var(--auth-wine);
  background: color-mix(in srgb, var(--auth-wine-soft) 85%, var(--auth-bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--auth-wine) 35%, transparent);
}



/* FAQ de objeciones (antes del CTA de plaza) */

/* Rescate de lead curioso en modal de login / invitación */
.auth-login-modal .auth-access-path {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--auth-bg) 82%, var(--auth-text) 3%);
}

.auth-login-modal .auth-access-path__eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-wine);
}

.auth-login-modal .auth-access-path__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-login-modal .auth-access-path__steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.auth-login-modal .auth-access-path__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.05rem;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--auth-wine);
  background: color-mix(in srgb, var(--auth-wine) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--auth-wine) 30%, var(--auth-border));
}

.auth-login-modal .auth-access-path__text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--auth-text-secondary);
}

.auth-login-modal .auth-access-path__text strong {
  color: var(--auth-text);
  font-weight: 700;
}

.auth-login-modal .auth-access-path__hint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--auth-text-secondary);
}

.auth-login-modal .auth-access-path__link {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--auth-wine);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-login-modal .auth-invite-cta,
#screenAuth .auth-invite-cta {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border: 1px dashed var(--auth-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--auth-wine-soft) 55%, transparent);
  text-align: center;
}

.auth-login-modal .auth-invite-cta--link,
#screenAuth .auth-invite-cta--link {
  margin: 0.85rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.auth-login-modal .auth-invite-cta__copy {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--auth-text-secondary);
}

.auth-login-modal .auth-invite-cta__btn,
#screenAuth .auth-invite-cta__btn {
  width: 100%;
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--auth-wine);
  color: var(--auth-wine);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-login-modal .auth-invite-cta__btn:hover,
.auth-login-modal .auth-invite-cta__btn:focus-visible,
#screenAuth .auth-invite-cta__btn:hover,
#screenAuth .auth-invite-cta__btn:focus-visible {
  background: var(--auth-wine-soft);
  border-color: var(--auth-wine);
  color: var(--auth-text);
  outline: none;
}

.auth-login-modal .auth-invite-cta__link,
#screenAuth .auth-invite-cta__link {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0.25rem 0.15rem;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--auth-text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
  cursor: pointer;
  min-height: auto;
  width: auto;
}

.auth-login-modal .auth-invite-cta__link:hover,
.auth-login-modal .auth-invite-cta__link:focus-visible,
#screenAuth .auth-invite-cta__link:hover,
#screenAuth .auth-invite-cta__link:focus-visible {
  color: var(--auth-wine, var(--color-accent));
  outline: none;
}

#coachModal .legal-modal__header {
  padding-bottom: var(--space-md);
}

/* Sin pestañas en el modal del coach: título → foto → bio */
#coachModal .legal-modal__tabs {
  display: none !important;
}

.legal-modal .about {
  max-width: none;
  gap: 1.15rem;
}

.legal-modal .about__contact {
  margin-top: 0.35rem;
}

/* --- Sección IA --- */

/* --- Prueba social — shell unificado (bento compacto) --- */

/* Reseñas anidadas en shell — acordeón colapsado */

#screenAuth .auth-proof__reviews.auth-land-acc.is-open .auth-proof__reviews-trigger {
  border-color: color-mix(in srgb, var(--auth-border) 88%, transparent);
  border-top-color: color-mix(in srgb, var(--auth-wine) 22%, var(--auth-border));
}

#screenAuth .auth-proof__reviews.auth-land-acc.is-open .auth-land-acc__panel-inner {
  padding-top: 0;
}

/* Legacy metric helpers (por si quedan referencias) */

/* --- Formulario solicitar plaza --- */
#screenAuth .auth-spot {
  padding: 0.25rem 0 1.75rem;
  scroll-margin-top: 0.85rem;
  position: relative;
}

/* Oferta / precios — siempre visible al hacer scroll (ya no es acordeón) */

/* Tarjetas con entrada escalonada al entrar en viewport (via .auth-land__reveal) */
#screenAuth .auth-land__reveal.is-visible .auth-offer__card--reveal {
  animation: nlm-card-enter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.1s + var(--card-i, 0) * 0.12s);
}




#screenAuth .auth-spot__card {
  padding: 1.2rem 1.1rem 1.25rem;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-card-radius);
  background-color: var(--auth-surface);
  box-shadow: var(--auth-card-shadow);
  background-image:
    linear-gradient(var(--auth-surface), var(--auth-surface)),
    linear-gradient(165deg, var(--auth-wine-soft), transparent 52%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

#screenAuth .auth-spot__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#screenAuth .auth-spot__form {
  position: relative;
}

#screenAuth .auth-spot #spotSubmit {
  width: 100%;
  min-height: 52px;
  margin-top: 0.2rem;
}

#screenAuth .auth-spot__fine {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--auth-text-muted);
  text-align: center;
}

#screenAuth .auth-spot__fine a,
#screenAuth .auth-spot__wa-link {
  color: var(--auth-wine);
  font-weight: 600;
}

#screenAuth .auth-spot__wa-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

#screenAuth .auth-spot__wa-link:hover,
#screenAuth .auth-spot__wa-link:focus-visible {
  color: color-mix(in srgb, var(--auth-wine) 82%, var(--auth-text) 18%);
}

#screenAuth .auth-spot__success {
  text-align: center;
  padding: 0.85rem 0.35rem 0.4rem;
}

#screenAuth .auth-spot__success-kicker {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--auth-wine);
}

#screenAuth .auth-spot__success-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--auth-text);
}

#screenAuth .auth-spot__success-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--auth-text-secondary);
}

/* --- Reseñas (landing): tipografía/burdeos; embebidas en shell de prueba social --- */

#screenAuth .auth-reviews__write.btn--primary {
  grid-area: write;
  width: 100%;
  min-height: 48px;
  margin: 0;
  white-space: nowrap;
  border-radius: var(--radius-md);
  background-color: var(--reviews-wine);
  border-color: var(--reviews-wine);
  color: #fff;
  box-shadow: none;
  font-family: var(--font-heading);
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
  text-transform: uppercase;
}

#screenAuth .auth-reviews__write.btn--primary:hover,
#screenAuth .auth-reviews__write.btn--primary:focus-visible {
  background-color: var(--auth-wine-hover);
  border-color: var(--auth-wine-hover);
  color: #fff;
  outline: 2px solid color-mix(in srgb, var(--reviews-wine) 40%, transparent);
  outline-offset: 2px;
}

#screenAuth .auth-reviews__empty {
  margin: 0;
  padding: 0.85rem 0.25rem 0.35rem;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--reviews-muted);
}

#screenAuth .auth-review-card {
  position: relative;
  padding: 0.8rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--reviews-wine) 12%, var(--auth-border));
  border-radius: var(--radius-sm);
  background-color: var(--reviews-cream-deep);
  background-image: none;
  box-shadow: none;
}

#screenAuth .auth-review-card__stars {
  margin: 0 0 0.3rem;
}

#screenAuth .auth-review-card__comment {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--reviews-ink);
}

#screenAuth .auth-review-card__author {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--reviews-muted);
}

.review-stars {
  display: inline-flex;
  gap: 0.12rem;
  color: var(--color-border-strong);
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.review-stars .review-star.is-on {
  color: var(--color-accent);
}

.review-modal {
  --reviews-cream: var(--color-surface-raised);
  --reviews-cream-deep: var(--color-surface-inset);
  --reviews-ink: var(--color-text-primary);
  --reviews-muted: var(--color-text-muted);
  --reviews-wine: var(--color-accent);
  --reviews-wine-soft: var(--color-accent-soft);
}

.review-modal .legal-modal__dialog {
  background: var(--reviews-cream);
  color: var(--reviews-ink);
  border-color: color-mix(in srgb, var(--reviews-wine) 22%, var(--reviews-cream-deep));
}

.review-modal .legal-modal__eyebrow {
  color: var(--reviews-wine);
}

.review-modal .legal-modal__title {
  color: var(--reviews-ink);
}

.review-modal .legal-modal__close {
  color: var(--reviews-muted);
}

.review-modal__body {
  padding: 0.35rem var(--space-lg) 1.35rem;
}

.review-modal__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.review-modal .auth-spot__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.review-modal .form__label {
  color: var(--reviews-ink);
}

.review-modal .form__input {
  background: #fff;
  color: var(--reviews-ink);
  border-color: color-mix(in srgb, var(--reviews-wine) 22%, #d8cfc3);
}

.review-modal .form__input:focus {
  border-color: var(--reviews-wine);
  box-shadow: 0 0 0 3px var(--reviews-wine-soft, var(--color-accent-soft));
}

.review-modal textarea.form__input {
  min-height: 7.5rem;
  resize: vertical;
}

.review-modal__optional {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--reviews-muted);
}

.review-modal__hint,
.review-modal__fine {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--reviews-muted);
}

.review-modal__fine {
  text-align: center;
  margin-top: 0.75rem;
}

.review-modal #reviewSubmit {
  width: 100%;
  min-height: 52px;
  margin-top: 0.55rem;
  background-color: var(--reviews-wine);
  border-color: var(--reviews-wine);
  color: #FAF6F0;
}

.review-modal #reviewSubmit:hover,
.review-modal #reviewSubmit:focus-visible {
  background-color: #471B24;
  border-color: #471B24;
}

.review-star-picker {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.review-star-picker__btn {
  appearance: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--reviews-wine) 22%, #d8cfc3);
  border-radius: 10px;
  background: #fff;
  color: #C9B8A8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.review-star-picker__btn.is-on,
.review-star-picker__btn[aria-checked="true"] {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 45%, #d8cfc3);
  background: color-mix(in srgb, var(--color-accent) 10%, #fff);
}

.review-star-picker__btn:hover,
.review-star-picker__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  outline-offset: 2px;
}

.review-modal__success {
  text-align: center;
  padding: 0.5rem 0 0.75rem;
}

.review-modal__success .btn--ghost {
  margin-top: 1rem;
  color: var(--reviews-wine);
  border-color: color-mix(in srgb, var(--reviews-wine) 28%, #d8cfc3);
}

.reviews-mod__list .access-gate-panel__item {
  align-items: flex-start;
  flex-wrap: wrap;
}

.reviews-mod__list .access-gate-panel__item-name {
  white-space: normal;
  text-transform: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.reviews-mod__comment {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.reviews-mod__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.spot-leads__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Reveal motion */
#screenAuth .auth-land__reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

#screenAuth .auth-land__reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #screenAuth .auth-land__reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #screenAuth .auth-panel-preview__slide.is-active .auth-panel-preview__chart span {
    animation: none;
  }
}



/* Auth: mobile layout — safe-area, larger logo, breathing room */
@media (max-width: 640px) {

  #screenAuth .auth-landing {
    padding-top: 0.55rem;
    padding-bottom: 1.75rem;
  }

  #screenAuth a.auth-convert-cta.btn--primary {
    min-height: 60px;
    padding: 1.15rem 1.2rem;
    font-size: 1.02rem;
  }

  .auth-login-modal {
    align-items: flex-end;
    padding: 0;
  }

  .auth-login-modal__grab {
    display: flex;
  }

  .auth-login-modal__dialog {
    width: 100%;
    max-height: min(88vh, 920px);
    max-height: min(88dvh, 920px);
    max-height: min(88dvh, var(--vv-height, 88dvh), 920px);
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.1), 0 -1px 4px rgba(0,0,0,0.06);
    transform: translateY(20px) scale(1);
  }

  .auth-login-modal.is-open .auth-login-modal__dialog {
    transform: translateY(0) scale(1);
  }

  #screenAuth .auth__tabs {
    margin-bottom: 0;
  }

  #screenAuth .auth__tab {
    min-height: 44px;
    padding: 0.55rem 0.4rem;
    font-size: 0.72rem;
  }

  #screenAuth .auth-panel__body {
    padding-top: 0.6rem;
  }

  #screenAuth .form__group {
    margin-bottom: 0.7rem;
  }

  #screenAuth .form__check--touch {
    margin-bottom: 0.6rem;
  }

  #screenAuth #loginForm {
    display: flex;
    flex-direction: column;
  }

  #screenAuth #loginSubmit,
  #screenAuth .btn--auth-cta {
    min-height: 52px;
    width: 100%;
    font-size: 1rem;
    position: sticky;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    z-index: 3;
    box-shadow: 0 -12px 24px rgba(28, 27, 26, 0.12);
  }

  #screenAuth .auth-demo {
    margin-top: 0.75rem;
  }

  #screenAuth .auth-demo__label {
    margin-bottom: 0.3rem;
  }
}

/* Teclado / foco en input: compactar modal y dejar CTA al alcance del pulgar */
body.auth-keyboard-open #screenAuth .auth-header,
body.auth-keyboard-open #screenAuth .stripe--auth,
body.auth-keyboard-open #screenAuth .auth-hero__ctas,
body.auth-keyboard-open #screenAuth .auth-scroll-hint,
body.auth-keyboard-open #screenAuth .auth-landing,
body.auth-keyboard-open #screenAuth .app__footer {
  display: none;
}

body.auth-keyboard-open.auth-login-modal-open .auth-login-modal,
body.auth-field-focused.auth-login-modal-open .auth-login-modal {
  align-items: stretch;
  justify-content: flex-start;
  padding:
    max(0.25rem, env(safe-area-inset-top, 0px))
    max(0.5rem, env(safe-area-inset-right, 0px))
    max(0.25rem, env(safe-area-inset-bottom, 0px))
    max(0.5rem, env(safe-area-inset-left, 0px));
}

body.auth-keyboard-open.auth-login-modal-open .auth-login-modal__dialog,
body.auth-field-focused.auth-login-modal-open .auth-login-modal__dialog {
  width: min(440px, 100%);
  max-height: 100%;
  margin-inline: auto;
  border-radius: 12px;
  border: 1px solid var(--auth-border-strong, var(--color-border-strong));
}

/* Solo con teclado medido: ocultar opciones secundarias que empujan el CTA fuera de vista */
body.auth-keyboard-open .auth-login-modal .auth-demo,
body.auth-keyboard-open .auth-login-modal .auth-support-hint,
body.auth-keyboard-open .auth-login-modal .auth-otp,
body.auth-keyboard-open .auth-login-modal .auth-invite-cta {
  display: none;
}

body.auth-keyboard-open .auth-login-modal__header,
body.auth-field-focused .auth-login-modal__header {
  padding: 0.65rem 1.25rem 0.4rem;
}

body.auth-keyboard-open .auth-login-modal__title,
body.auth-field-focused .auth-login-modal__title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  padding: 0 1.25rem;
}

body.auth-keyboard-open .auth-login-modal__body,
body.auth-field-focused .auth-login-modal__body {
  padding: 0 1.25rem 0.65rem;
  scroll-padding-bottom: 6rem;
}

body.auth-keyboard-open .auth-login-modal .auth-panel__body,
body.auth-field-focused .auth-login-modal .auth-panel__body {
  padding-top: 0.45rem;
}

body.auth-keyboard-open .auth-login-modal .form__group--float,
body.auth-field-focused .auth-login-modal .form__group--float {
  margin-bottom: 0.65rem;
}

body.auth-keyboard-open .auth-login-modal .form__check--touch,
body.auth-field-focused .auth-login-modal .form__check--touch {
  margin-bottom: 0.45rem;
}

body.auth-keyboard-open #screenAuth .app__main {
  padding-top: 0.3rem;
  padding-bottom: calc(0.45rem + var(--keyboard-inset, 0px));
}

body.auth-keyboard-open #screenAuth .auth__tabs,
body.auth-keyboard-open .auth-login-modal .auth__tabs,
body.auth-field-focused .auth-login-modal .auth__tabs {
  margin-bottom: 0.1rem;
}

body.auth-keyboard-open #screenAuth #loginSubmit,
body.auth-keyboard-open #screenAuth .btn--auth-cta,
body.auth-keyboard-open .auth-login-modal .btn--auth-cta,
body.auth-keyboard-open .auth-login-modal #loginSubmit,
body.auth-keyboard-open .auth-login-modal #registerSubmit,
body.auth-field-focused .auth-login-modal .btn--auth-cta,
body.auth-field-focused .auth-login-modal #loginSubmit,
body.auth-field-focused .auth-login-modal #registerSubmit {
  position: sticky;
  bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  z-index: 3;
  margin-bottom: 0.35rem;
  scroll-margin-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 24px rgba(28, 27, 26, 0.14);
}

/* Margen de seguridad extra cuando el teclado está medido */
body.auth-keyboard-open .auth-login-modal .btn--auth-cta,
body.auth-keyboard-open .auth-login-modal #loginSubmit,
body.auth-keyboard-open .auth-login-modal #registerSubmit {
  scroll-margin-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  margin-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
  body.auth-keyboard-open.auth-login-modal-open .auth-login-modal,
  body.auth-field-focused.auth-login-modal-open .auth-login-modal {
    padding: 0;
    align-items: stretch;
  }

  body.auth-keyboard-open.auth-login-modal-open .auth-login-modal__dialog,
  body.auth-field-focused.auth-login-modal-open .auth-login-modal__dialog {
    width: 100%;
    max-height: 100%;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
}



/* ── _15-legal.css ── */
/* ============================================
   Tipografía global + roles Trainer / Member
   (sin tarjetas; paneles admin diferenciados)
   ============================================ */

.panel__eyebrow {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-subtitle);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.btn,
.btn__text,
.habits__save-text,
.constancy__cta {
  font-size: var(--text-cta);
  font-weight: var(--weight-cta);
  letter-spacing: var(--track-cta);
}

#screenAuth .auth-convert-cta .btn__text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.null-companion__phrase {
  font-size: var(--text-support);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
}

.stats-card,
.focus-mode,
.smart-feed__item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.dashboard[data-role="trainer"] .sidebar__nav #nav-trainer,
.dashboard--trainer .sidebar__nav #nav-trainer {
  position: relative;
}

.dashboard[data-role="trainer"] .sidebar__nav #nav-trainer::before,
.dashboard--trainer .sidebar__nav #nav-trainer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px;
  background: var(--color-accent-red);
}

#trainer-dashboard.panel--admin,
.dashboard[data-role="trainer"] #trainer-dashboard {
  --admin-rail: var(--color-accent-red);
}

#trainer-dashboard .panel__header--admin {
  position: relative;
  padding-left: 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}

#trainer-dashboard .panel__header--admin::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15rem;
  bottom: 0.15rem;
  width: 3px;
  border-radius: 2px;
  background: var(--admin-rail, var(--color-accent-red));
}

#trainer-dashboard .panel__header--admin .panel__title {
  color: var(--color-text-primary);
}

#trainer-dashboard .panel__body > .card,
#trainer-dashboard .access-gate-panel,
#trainer-dashboard .smart-feed {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding-left: 0.85rem;
  border-left: 2px solid color-mix(in srgb, var(--color-accent-red) 35%, var(--color-border));
  margin-bottom: var(--space-xl);
}

#trainer-dashboard .card__title,
#trainer-dashboard .access-gate-panel__list-title {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
  color: var(--color-text-primary);
  text-shadow: none;
}

#trainer-dashboard .access-gate-panel__subtitle {
  font-size: var(--text-support);
  font-weight: var(--weight-subtitle);
  color: var(--color-text-secondary);
  text-transform: none;
  letter-spacing: 0.01em;
}

.dashboard[data-role="member"] #trainer-dashboard {
  display: none !important;
}

.dashboard[data-role="trainer"] .welcome__role {
  color: var(--color-accent-red);
}

.dashboard[data-role="member"] .welcome__role {
  color: var(--color-accent-gold);
}

.habits__save-btn {
  border-radius: 999px !important;
  box-shadow: none !important;
  letter-spacing: var(--track-cta) !important;
  font-weight: var(--weight-cta) !important;
  font-size: var(--text-cta) !important;
  text-transform: uppercase !important;
}

.habits__done-bar {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.65rem 0.85rem;
}

/* ============================================
   LAYOUT RECOVERY — overflow, stacking, hit-targets
   Restaura márgenes laterales, títulos anclados y clics
   tras la regresión global de capas / padding.
   ============================================ */

html,
.app,
.dashboard,
.dashboard__main,
.dashboard__content {
  max-width: 100%;
  overflow-x: hidden;
}
/* body fuera de esta lista a propósito: overflow-x:hidden en body fuerza a
   overflow-y a computar "auto" (regla CSS del eje "visible" emparejado con
   uno no-visible), creando un segundo contenedor de scroll casi idéntico al
   de html — el origen del bug "scroll se queda pillado a mitad de página"
   en iOS Safari. html ya aporta el overflow-x:hidden del documento. */
body {
  max-width: 100%;
}

/* Capas decorativas: nunca capturan gestos */
body::before,
body::after {
  pointer-events: none !important;
}

/* Overlays/modales cerrados: sin hit-testing aunque display falle */
.sidebar__overlay:not(.sidebar__overlay--visible),
.tech-modal[hidden],
.tech-modal:not(.is-open),
.focus-mode[hidden],
.ex-history[hidden],
.wci-source-sheet[hidden],
.client-profile-modal[hidden],
.client-profile-modal:not(.is-open),
.client-delete-confirm[hidden],
.client-delete-confirm:not(.is-open),
.muscle-map-modal[hidden],
.pr-toast[hidden] {
  pointer-events: none !important;
}

.app-toast-host {
  pointer-events: none !important;
}

.app-toast-host .app-toast {
  pointer-events: auto;
}

/* Contenedores de pantalla: no pisar padding vertical; reforzar laterales del topbar */
.topbar {
  box-sizing: border-box;
  padding-left: max(var(--page-pad-x), env(safe-area-inset-left));
  padding-right: max(var(--page-pad-x), env(safe-area-inset-right));
  padding-top: max(var(--space-md), env(safe-area-inset-top));
  padding-bottom: var(--space-md);
}

/* Títulos de panel: flujo normal, sin solapes */
.panel__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.panel__header--with-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
}

.panel__title,
.habits__title,
.wci-form__title,
.wci-history__title,
.card__title {
  position: relative;
  z-index: 1;
  transform: none;
}

/* Cuerpo interactivo por encima de companions decorativos */
.panel__body,
.wci,
.welcome,
.welcome__grid,
.habits,
.constancy,
.calendar-shell,
.card,
.bc-bridge,
.nutrition-editor,
.nutrition-viewer,
.scale__display,
.wci-trainer,
.wci-tabs,
.wci-tab-panel,
.wci-form,
.wci-history {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  pointer-events: auto;
}

.welcome-card,
.wci-slot,
.wci-metric__score,
.wci-tabs__btn,
.calendar__cell,
.btn,
.habits__save-btn,
.habits__done-bar,
.form__input,
.form__select,
textarea.form__input {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* Companion: decorativo, no bloquea botones del header/body */
.null-companion-host,
.null-companion,
.null-companion * {
  pointer-events: none !important;
}

.panel > .null-companion-host {
  margin: 0 0 var(--space-lg);
  max-width: 100%;
}

/* Check-in / nutrición: companion compacto bajo el header (margin-bottom gestionado por feature header) */

#panelCheckIn > .null-companion-host,
#panelNutrition > .null-companion-host,
#panelCalendar > .null-companion-host {
  margin: 0 0 var(--space-md);
}

#panelCheckIn .panel__title,
#panelNutrition .panel__title,
#panelCalendar .panel__title {
  position: relative;
  z-index: 2;
  transform: none;
  margin: 0;
}

.calendar-week:not([hidden]) {
  display: flex;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.calendar-month-wrap:not(.is-collapsed-mobile) {
  display: block;
}

#calendarGrid,
.calendar-week__day,
#calMonthToggle,
#calAddNoteFab {
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

#calAddNoteFab {
  z-index: 80;
}

.card,
.panel--active,
.welcome-card,
.wci-fieldset,
.calendar,
.habits,
.constancy {
  max-width: 100%;
  min-width: 0;
}

/* Overlays a pantalla completa: solo capturan con .is-open */
.wci-source-sheet:not(.is-open),
.muscle-map-modal[hidden],
.tech-modal:not(.is-open),
.ex-history[hidden] {
  pointer-events: none !important;
}

/* --- Legal footer, consent, ARCO, cookie banner --- */
.app__footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.55rem;
}

.app__footer-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.app__footer-link:hover,
.app__footer-link:focus-visible {
  color: var(--color-text);
}

.app__footer-sep {
  color: var(--color-border);
  font-size: 0.7rem;
}

.form__consent {
  margin-top: 0.25rem;
}

.form__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
}

.form__consent-input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--color-accent, #5C2430);
}

.form__consent-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.form__consent-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  font: inherit;
}

.form__consent-required {
  color: var(--color-text);
  font-weight: 600;
}

.form__consent-docs {
  margin: 0.45rem 0 0 1.8rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.legal-doc__meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.profile-privacy__intro {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.profile-password__intro {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.profile-password__form {
  margin-top: var(--space-sm);
}

.profile-password__actions {
  margin-top: var(--space-sm);
}

.profile-password__status {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.profile-password__status.is-error {
  color: var(--color-error, #5C2430);
}

.profile-password__status.is-ok {
  color: var(--color-success, #2e7d4f);
}

.profile-privacy__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.profile-privacy__form {
  border-top: var(--border-width) solid var(--color-border);
  padding-top: var(--space-lg);
}

.profile-privacy__actions {
  margin-top: var(--space-sm);
}

.profile-privacy__mail {
  color: var(--color-text);
}

.profile-privacy__status {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.profile-privacy__status.is-error {
  color: var(--color-error, #5C2430);
}

.profile-privacy__status.is-ok {
  color: var(--color-success, #2e7d4f);
}

body.legal-modal-open {
  overflow: hidden;
}

.legal-modal[hidden] {
  display: none !important;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.legal-modal.is-open {
  display: flex;
}

.legal-modal__dialog {
  width: min(640px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: var(--modal-border);
  border-radius: var(--modal-radius) var(--modal-radius) 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
}

.legal-modal__header {
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
}

.legal-modal__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.legal-modal__title {
  font-size: 1.2rem;
}

.legal-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.25rem;
}

.legal-modal__tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 var(--space-lg);
  overflow-x: auto;
}

.legal-modal__tab {
  appearance: none;
  border: var(--border-width) solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.legal-modal__tab.is-active {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-bg-elevated, var(--color-bg-deep));
}

.legal-modal__body {
  overflow: auto;
  padding: var(--space-md) var(--space-lg) var(--space-xl);}

.legal-doc h4 {
  margin: 0 0 var(--space-md);
  font-size: 1.05rem;
}

.legal-doc p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.legal-doc a {
  color: var(--color-text);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 11000;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.cookie-banner__copy {
  flex: 1 1 240px;
  min-width: 0;
}

.cookie-banner__title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.cookie-banner__link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-text);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 0 1 auto;
}

@media (min-width: 720px) {
  .legal-modal {
    align-items: center;
  }

  .legal-modal__dialog {
    border-radius: 16px;
    max-height: min(80vh, 760px);
  }
}



/* Login credentials: siempre visibles salvo challenge MFA explícito */
#screenAuth #loginForm {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#screenAuth #loginForm[hidden] {
  /* Defensa: el formulario de login no debe ocultarse entero */
  display: flex !important;
}

#screenAuth .auth-login-credentials[hidden] {
  display: none !important;
}

#screenAuth .auth-login-credentials .form__input,
#screenAuth #loginEmail,
#screenAuth #loginPassword {
  display: block;
  visibility: visible;
  opacity: 1;
  width: 100%;
  min-height: var(--touch-min);
  background-color: var(--auth-surface, var(--color-surface));
  color: var(--auth-text, var(--color-text-primary));
  border: 2px solid var(--auth-border-strong, var(--color-border-strong));
  -webkit-text-fill-color: var(--auth-text, var(--color-text-primary));
}

/* Float labels own empty-state text; only style non-float placeholders here. */
#screenAuth .auth-login-credentials .form__input:not(.form__input--float)::placeholder {
  color: var(--auth-text-muted, var(--color-text-muted));
  opacity: 1;
  -webkit-text-fill-color: var(--auth-text-muted, var(--color-text-muted));
}

#screenAuth .auth-login-credentials .form__label {
  display: block;
  visibility: visible;
  opacity: 1;
  color: var(--auth-text-secondary, var(--color-text-secondary));
}

/* —— Auth MFA / OTP & profile security —— */
.auth-mfa,
.auth-otp {
  margin-top: var(--space-md);
}

.auth-mfa[hidden],
.auth-otp__form[hidden],
.profile-security__enroll[hidden] {
  display: none !important;
}

.auth-mfa {
  padding-top: var(--space-md);
  border-top: var(--border-width) solid var(--color-border);
}

.auth-mfa__title {
  margin: 0 0 var(--space-xs);
  font-size: 1.05rem;
  font-weight: 600;
}

.auth-mfa__hint,
.auth-otp__hint,
.profile-security__intro,
.profile-security__hint {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.auth-mfa__actions,
.profile-security__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.auth-otp__toggle {
  width: 100%;
}

.auth-otp__form {
  margin-top: var(--space-sm);
}

.profile-security__status {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.profile-security__status.is-ok {
  color: var(--color-success, #2e7d4f);
}

.profile-security__status.is-error {
  color: var(--color-error, #5C2430);
}

.profile-security__qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--space-md);
}

.profile-security__qr {
  width: min(200px, 70vw);
  height: auto;
  background: #fff;
  padding: 0.5rem;
  border-radius: 4px;
}

.profile-security__secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
}

#screenAuth .auth-mfa .form__input,
#screenAuth .auth-otp .form__input {
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

/* --- Páginas legales permanentes (LSSI) --- */
.legal-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.legal-page__skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  color: var(--color-text-primary);
  z-index: 20;
}

.legal-page__skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.legal-page__top,
.legal-page__foot {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.legal-page__top {
  padding: 1.35rem 0 0.5rem;
}

.legal-page__brand {
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 1.05rem;
}

.legal-page__brand span {
  color: var(--color-accent-red);
}

.legal-page__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.legal-page__docs a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-page__docs a[aria-current="page"],
.legal-page__docs a:hover,
.legal-page__docs a:focus-visible {
  color: var(--color-text-primary);
}

.legal-page__main {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.75rem;
}

.legal-page__eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.legal-page__main h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: 0.02em;
}

.legal-page__lead {
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.legal-page .legal-doc h2 {
  margin: 1.6rem 0 0.65rem;
  font-size: 1.05rem;
}

.legal-page .legal-doc ul {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.legal-page .legal-doc li {
  margin: 0 0 0.35rem;
}

.legal-page .legal-doc code,
.legal-doc code {
  font-size: 0.84em;
  word-break: break-word;
}

.legal-page__updated {
  margin-top: 1.75rem !important;
  font-size: 0.82rem !important;
}

.legal-page__foot {
  padding: 0 0 2.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.legal-page__foot a {
  color: var(--color-text-primary);
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.legal-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 0.45rem;
  text-align: left;
  vertical-align: top;
  color: var(--color-text-muted);
}

.legal-table th {
  color: var(--color-text-primary);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-modal .legal-doc h2 {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.95rem;
}

.profile-privacy__links a.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* ── _16-android-layout.css ── */
﻿/* ============================================
   Quiet Luxury — refinements (dashboard interior)
   ============================================ */

.habits__value,
.habits__steps-sync-count,
.constancy__count,
.profile-hero__stat dd,
.constancy__week-now-progress {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.habits__steps-sync-count {
  padding: 0.2rem 0 0.1rem;
  font-size: var(--text-metric);
  font-weight: var(--weight-metric);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.habits__steps-sync-body {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 var(--color-layer-hairline);
  background-color: var(--color-surface-inset);
  background-image: linear-gradient(180deg, var(--color-success-bg) 0%, transparent 70%);
}

.constancy.is-pulse .constancy__figure {
  animation: constancyPulse 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes constancyPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); box-shadow: 0 0 0 4px var(--color-accent-soft), var(--shadow-elev-1); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .habits.is-celebrating,
  .habits__done-check::after,
  .habits.is-celebrating .habits__done-check,
  .constancy.is-pulse .constancy__figure {
    animation: none !important;
  }
}

/* ==========================================================================
   WhatsApp qualify modal (lead filter)
   ========================================================================== */
body.wa-qualify-modal-open {
  overflow: hidden;
}

.wa-qualify-modal[hidden] {
  display: none !important;
}

.wa-qualify-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: end center;
  padding: 0;
}

.wa-qualify-modal.is-open {
  place-items: center;
  padding: 1rem;
}

.wa-qualify-modal__backdrop {
  background: color-mix(in srgb, var(--auth-bg, var(--color-bg)) 68%, var(--auth-wine, var(--color-accent)) 12%, transparent);
  backdrop-filter: blur(4px);
}

.wa-qualify-modal__dialog {
  width: min(420px, 100%);
  max-height: min(92vh, 640px);
  overflow: auto;
  padding: 1.15rem 1.1rem 1.25rem;
  border-radius: var(--modal-radius) var(--modal-radius) 0 0;
  border: 1px solid color-mix(in srgb, var(--auth-border, var(--color-border-strong)) 80%, transparent);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--auth-wine, var(--color-accent)) 18%, transparent) 0%, transparent 48%),
    color-mix(in srgb, var(--auth-bg, var(--color-bg)) 94%, #fff 6%);
  color: var(--auth-text, var(--color-text-primary));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

.wa-qualify-modal.is-open .wa-qualify-modal__dialog {
  border-radius: var(--modal-radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.wa-qualify-modal__header {
  margin-bottom: 0.45rem;
  padding: 0;
}

.wa-qualify-modal__eyebrow {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-wine, #c45a78);
}

.wa-qualify-modal__title {
  margin: 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: uppercase;
}

.wa-qualify-modal__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--auth-text, #fff) 8%, transparent);
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.wa-qualify-modal__close:hover,
.wa-qualify-modal__close:focus-visible {
  background: color-mix(in srgb, var(--auth-text, #fff) 16%, transparent);
}

.wa-qualify-modal__form .form__group {
  margin-bottom: 0.75rem;
}

.wa-qualify-steps {
  margin: 0 0 1rem;
}

.wa-qualify-steps__progress {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
}

.wa-qualify-steps__dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--auth-text, #fff) 14%, transparent);
  transition: background 0.22s ease;
}

.wa-qualify-steps__dot.is-done,
.wa-qualify-steps__dot.is-active {
  background: var(--auth-wine, #5C2430);
}

.wa-qualify-steps__label {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-text-muted, color-mix(in srgb, var(--auth-text, #fff) 62%, transparent));
}

.wa-qualify-steps__fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.wa-qualify-steps__legend {
  margin: 0 0 0.7rem;
  padding: 0;
  font-family: var(--font-heading, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--auth-text, #fff);
}

.wa-qualify-steps__options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wa-qualify-steps__option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: var(--touch-min, 48px);
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--auth-wine, #5C2430) 22%, var(--auth-border, #333));
  border-radius: 12px;
  background: color-mix(in srgb, var(--auth-surface, #1a1a1a) 88%, transparent);
  color: var(--auth-text, #fff);
  font-family: var(--font-body, inherit);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.wa-qualify-steps__option:hover,
.wa-qualify-steps__option:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--auth-wine, #5C2430) 55%, var(--auth-border, #333));
  background: color-mix(in srgb, var(--auth-wine, #5C2430) 14%, transparent);
}

.wa-qualify-steps__option:active {
  transform: scale(0.985);
}

.wa-qualify-steps__option.is-selected {
  border-color: var(--auth-wine, #5C2430);
  background: color-mix(in srgb, var(--auth-wine, #5C2430) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--auth-wine, #5C2430) 35%, transparent);
}

#waQualifySubmit[hidden] {
  display: none !important;
}

#waQualifySubmit.is-ready {
  animation: waQualifyCtaIn 280ms ease both;
}

@keyframes waQualifyCtaIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #waQualifySubmit.is-ready {
    animation: none;
  }
  .wa-qualify-steps__option:active {
    transform: none;
  }
}

.wa-qualify-modal__alert {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--btn-danger-fg);
}

.wa-qualify-modal__form .btn {
  width: 100%;
  min-height: var(--touch-min);
}

@media (min-width: 640px) {
  .wa-qualify-modal {
    place-items: center;
    padding: 1.25rem;
  }

  .wa-qualify-modal__dialog {
    border-radius: var(--modal-radius);
  }
}

/* ==========================================================================
   ZERO-OVERFLOW — Android safe layout
   A. Fluid Bento  B. Safe areas  C. dvh / visualViewport  D. clamp() type
   ========================================================================== */

html {
  scroll-padding-top: calc(0.75rem + var(--safe-top, 0px));
  scroll-padding-bottom: calc(6.5rem + var(--safe-bottom, 0px) + var(--keyboard-inset, 0px));
}

html,
body,
.app,
.dashboard,
.dashboard__main,
.dashboard__content,
.panel,
.panel__body,
.card,
.wci-fieldset,
.wci-form,
.wci-step,
.wci-scale,
.wci-metrics,
.welcome-chips,
.runner-hud,
.runner-hud__shell {
  max-width: 100%;
  min-width: 0;
}

.dashboard__content {
  padding-bottom: max(var(--space-xl), calc(var(--safe-bottom, 0px) + var(--keyboard-inset, 0px) + 0.75rem));
}

.topbar {
  padding-top: max(var(--space-md), var(--safe-top, 0px));
  padding-right: max(var(--page-pad-x), var(--safe-right, 0px));
  padding-left: max(var(--page-pad-x), var(--safe-left, 0px));
}

.wci-form__title-row {
  flex-wrap: wrap;
  min-width: 0;
}

.wci-form__title,
.wci-step__title,
.panel__title {
  overflow-wrap: anywhere;
}

.wci-scale__input,
.wci-comments__input,
.scale__input,
#panelCheckIn input,
#panelCheckIn textarea,
#panelScale input,
#panelScale textarea {
  scroll-margin-top: calc(1rem + var(--safe-top, 0px));
  scroll-margin-bottom: calc(6.75rem + var(--safe-bottom, 0px) + var(--keyboard-inset, 0px));
}

.wci-wizard__nav .btn {
  flex: 1 1 8rem;
}

body.vv-keyboard-open #panelCheckIn .wci-form__footer--sticky,
body.vv-keyboard-open #panelScale .btn--primary {
  padding-bottom: max(0.45rem, var(--safe-bottom, 0px));
}

body.vv-keyboard-open #panelCheckIn .null-companion-host,
body.vv-keyboard-open #panelScale .null-companion-host {
  display: none;
}

.nutrition-supp-bento,
.nutrition-pdf-uploads__grid,
.meal-plan-shop__grid,
.runners-session-config__grid,
.runners-analytics__grid,
.supervise-bento__grid {
  min-width: 0;
}

@media (max-width: 639px) {
  .nutrition-supp-bento,
.nutrition-pdf-uploads__grid,
.nutrition-pdf-downloads,
.meal-plan-shop__grid,
.runners-session-config__grid,
.runners-analytics__grid,
.runners-gear-finish__row,
.supervise-bento__grid,
.wci-slots,
.wci-metrics__grid,
.wci-acc__metrics {
    grid-template-columns: 1fr;
  }

  .wci-wizard__nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wci-wizard__nav .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .wci-form__status,
  .wci-form__ready {
    min-width: 0;
  }

  .coach-tower__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-tower__card {
    aspect-ratio: auto;
    min-height: 8.5rem;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .nutrition-supp-bento,
.meal-plan-shop__grid,
.runners-analytics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .nutrition-supp-bento,
.meal-plan-shop__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.runners__metric--hero .runners__metric-value,
.runners__history-distance,
.meal-plan-kcal-value {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  overflow-wrap: anywhere;
  min-width: 0;
}

.wa-qualify-modal__dialog,
.tech-fb__dialog {
  max-height: min(92dvh, 760px);
  padding-bottom: calc(var(--space-md) + var(--safe-bottom, 0px));
}

/* ==========================================================================
   ANDROID NATIVE MOTION — GPU, touch-action, momentum, windowing
   A. translate3d / will-change   B. pan-y vs pan-x
   C. content-visibility + virtual lists   D. haptics (JS)
   ========================================================================== */

/* Double-tap zoom lock — interactive controls (pan-x / pan-y below win on ranges & scrollers) */
button,
a,
[role="button"],
[role="radio"],
[role="tab"],
[role="switch"],
input:not([type="range"]),
select,
textarea,
summary,
label,
.wci-metric__score,
.scale__input,
.wci-scale__input {
  touch-action: manipulation;
}

.gpu-layer,
.card,
.wci-fieldset,
.wci-sma,
.wci-acc,
.welcome-chips,
.habits,
.stats-card,
.coach-tower__card,
.runner-hud {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.sidebar,
.runner-hud,
.wci-form__footer--sticky,
.virtual-list__viewport {
  will-change: transform;
}

html.is-scrolling .coach-tower__card,
html.is-scrolling .card,
html.is-scrolling .wci-acc,
html.is-scrolling .auth-bento-card {
  will-change: transform, opacity;
}

html.is-scrolling .coach-tower__card {
  animation: none !important;
}

.dashboard__content,
.panel,
.panel__body,
.wci,
.wci-form,
.wci-form--wizard,
.wci-step,
.wci-comments__input,
.wci-accordion,
.coach-tower,
.welcome,
.chat__messages,
.session__table-wrapper,
.momentum-list,
.runner-hud,
.runner-hud__shell {
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

input[type="range"],
.habits__range,
.meal-plan-kcal-range {
  touch-action: pan-x;
}

.wci-stepper,
.wci-metric__scores,
.wci-wizard__nav,
.runner-hud__btn,
.runner-hud__controls {
  touch-action: manipulation;
}

.wci-slots,
.wci-acc__gallery {
  touch-action: pan-y;
}

.momentum-list,
#trainer-weight-list,
#trainer-workout-list,
#trainer-runner-list {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;  overscroll-behavior: contain;
  touch-action: pan-y;
  transform: translateZ(0);
}

.momentum-list--sm,
#trainer-weight-list {
  max-height: 150px;
}

.wci-accordion,
.coach-tower__grid,
.chat__messages {  overscroll-behavior-y: contain;
}

.coach-tower__card,
.wci-acc,
.welcome-today__tile {
  content-visibility: auto;
  contain-intrinsic-size: auto 160px;
}

.coach-tower__card:nth-child(n + 9) {
  animation: none;
}

.stats-card canvas,
#trainerWeightChart,
#weightChart,
#liftChart,
#habitsCrossChart {
  transform: translate3d(0, 0, 0);
}

.virtual-list {
  position: relative;
}

.virtual-list__viewport {
  transform: translate3d(0, 0, 0);
}

.virtual-list__inner {
  position: relative;
  width: 100%;
  min-height: 1px;
}

.virtual-list__spacer {
  display: block;
  width: 100%;
  pointer-events: none;
}

/* Historial runners: viewport con scroll + cards absolutas (NullumVirtualList) */
.runners__history-grid.virtual-list,
.runners__history-grid.virtual-list__viewport {
  display: block;
  max-height: min(70vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;  overscroll-behavior: contain;
  position: relative;
}

.runners__history-grid.virtual-list .runners__history-card {
  margin: 0;
}

/* Biblioteca de ejercicios: lista larga con spacers */
.exlib__list-wrap.virtual-list__viewport {
  max-height: min(60vh, 560px);
  overflow-y: auto;
  overflow-x: auto;  overscroll-behavior: contain;
}

/* Chat: windowing cuando hay muchos mensajes */
.chat__messages.virtual-list,
.chat__messages.virtual-list__viewport {
  position: relative;
  display: block;
}

.chat__messages.virtual-list .virtual-list__inner {
  display: block;
  position: relative;
  width: 100%;
}

.chat__messages.virtual-list .chat__vl-item {
  box-sizing: border-box;
}

.chat__messages.virtual-list .chat__bubble,
.chat__messages.virtual-list .chat__day {
  margin: 0 0 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .gpu-layer,
  .card,
  .coach-tower__card {
    will-change: auto;
  }
}

/* ── NFI ocular (check-in) ─────────────────────────────────────────── */
.wci-nfi {
  margin-top: 1.1rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid color-mix(in srgb, #5C2430 18%, var(--color-border));
  background:
    linear-gradient(145deg, color-mix(in srgb, #5C2430 6%, var(--color-surface)) 0%, var(--color-surface) 70%);
}

.wci-nfi__eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5C2430;
}

.wci-nfi__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.wci-nfi__hint {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.wci-nfi__stage {
  position: relative;
  margin: 0 0 0.7rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #5C2430 22%, var(--color-border));
  background: #1a0a0e;
  aspect-ratio: 4 / 3;
  max-height: 220px;
}

.wci-nfi__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.wci-nfi__countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 30%, rgba(92, 36, 48, 0.35) 100%);
}

.wci-nfi__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.wci-nfi__result {
  margin: 0.65rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.wci-nfi__result.is-ok {
  color: #5C2430;
}

.wci-nfi__result.is-warn {
  color: var(--color-accent-red);
}

.wci-nfi__result.is-soft {
  color: var(--color-text-muted);
}

/* ── Terapia háptica post-entreno ──────────────────────────────────── */
.haptic-therapy {
  margin: 0.9rem 0 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, #5C2430 16%, var(--color-border));
  background: color-mix(in srgb, #5C2430 5%, var(--color-surface));
}

.haptic-therapy--runners {
  margin: 0.85rem 0 1rem;
}

.haptic-therapy__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #5C2430;
}

.haptic-therapy__hint {
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.haptic-therapy__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.haptic-therapy__status {
  margin: 0.45rem 0 0;
  min-height: 1.1em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
}

/* ── Telemetría BLE runners ────────────────────────────────────────── */
.runners-ble-tel {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, #5C2430 14%, var(--color-border));
  background: linear-gradient(160deg, color-mix(in srgb, #5C2430 7%, var(--color-surface)), var(--color-surface));
}

.runners-ble-tel__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: #5C2430;
}

.runners-ble-tel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .runners-ble-tel__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.runners-ble-tel__cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid color-mix(in srgb, #5C2430 10%, var(--color-border));
  background: var(--color-surface);
}

.runners-ble-tel__label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.runners-ble-tel__value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.runners-ble-tel__unit {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--color-text-muted);
}

.runners-ble-tel__hint {
  margin: 0.55rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.runner-hud__telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(92, 36, 48, 0.35);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
}

.runner-hud__tel-item b {
  font-weight: 700;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .wci-nfi__countdown {
    text-shadow: none;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NULLUM Demo Story — recorrido narrativo (coach + Marcos)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
body.nds-open {
  overflow: hidden;
}

.nds {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.nds.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nds[hidden] {
  display: none !important;
}

.nds__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(92, 36, 48, 0.18), transparent 55%),
    linear-gradient(165deg, #1a1214 0%, #2a1c1f 48%, #141618 100%);
}

.nds__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, #f4f5f7 100%);
  color: var(--color-text-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 64px rgba(0, 0, 0, 0.35);
}

.nds__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top)) 1.1rem 0.55rem;
}

.nds__brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.nds__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.nds__mode {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.nds__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.nds__close:hover,
.nds__close:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  outline: none;
}

.nds__progress {
  height: 3px;
  margin: 0 1.1rem;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

.nds__progress-bar {
  height: 100%;
  width: 0;
  background: var(--color-accent);
  transition: width 0.28s ease;
}

.nds__chapter {
  margin: 0.7rem 1.1rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nds__body {
  flex: 1;
  overflow: auto;
  padding: 0.45rem 1.1rem 1.25rem;}

.nds__title {
  margin: 0.15rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.nds__content--enter {
  animation: nds-enter 0.28s ease both;
}

@keyframes nds-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.nds__nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem max(0.85rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.nds__nav #ndsPrev {
  justify-self: start;
}

.nds__nav #ndsNext {
  justify-self: end;
}

.nds__step {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.nds-sub,
.nds-lede {
  margin: 0 0 1rem;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.nds-h3 {
  margin: 1.1rem 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.nds-claim {
  margin: 1.15rem 0 0;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.nds-dl {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.nds-dl > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--color-border);
}

.nds-dl dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.nds-dl dd {
  margin: 0;
  font-weight: 600;
}

.nds-dl--compact > div {
  grid-template-columns: 7rem 1fr;
}

.nds-indicators,
.nds-bullets,
.nds-decisions,
.nds-signal__list,
.nds-plan-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.nds-indicators {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.nds-indicators li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.nds-indicators span {
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nds-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.nds-plan-block {
  padding: 0.75rem 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.nds-plan-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nds-plan-block p {
  margin: 0 0 0.35rem;
}

.nds-weeks {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .nds-weeks {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nds-week {
  padding: 0.7rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.nds-week__title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nds-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.nds-metrics__item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.nds-metrics__label {
  color: var(--color-text-muted);
}

.nds-metrics__value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nds-insight {
  margin-top: 1rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
}

.nds-insight__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.nds-insight__mark {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--color-accent);
}

.nds-why-btn {
  border: 0;
  background: transparent;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
}

.nds-k {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.nds-insight__see,
.nds-insight__mean,
.nds-insight__review,
.nds-insight__body {
  margin: 0 0 0.55rem;
  line-height: 1.4;
}

.nds-insight__why {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--color-border);
  font-size: 0.86rem;
  color: var(--color-text-secondary);
}

.nds-insight__why[hidden] {
  display: none !important;
}

.nds-decision-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.nds-decision-tag span {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted);
}

.nds-signal {
  margin: 1rem 0 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(166, 107, 58, 0.45);
  background: rgba(166, 107, 58, 0.08);
}

.nds-signal__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #8a5528;
  margin-bottom: 0.4rem;
}

.nds-signal__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #c47a35;
  box-shadow: 0 0 0 3px rgba(196, 122, 53, 0.25);
}

.nds-signal__lead {
  margin: 0 0 0.45rem;
  font-weight: 600;
}

.nds-flow {
  display: grid;
  gap: 0.45rem;
}

@media (min-width: 640px) {
  .nds-flow {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
  }
}

.nds-flow__col {
  padding: 0.7rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.nds-flow__col h3 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nds-flow__col ul {
  margin: 0;
  padding-left: 1rem;
}

.nds-flow__col p {
  margin: 0;
  font-weight: 700;
}

.nds-flow__col--pending {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.nds-flow__arrow {
  display: none;
  align-self: center;
  color: var(--color-text-muted);
  font-weight: 700;
}

@media (min-width: 640px) {
  .nds-flow__arrow { display: block; }
}

.nds-choices {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.nds-choices--compact {
  grid-template-columns: 1fr 1fr;
}

.nds-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  font: inherit;
}

.nds-choice:hover,
.nds-choice:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.nds-choice.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.nds-choice__key {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.nds-choice__label {
  font-weight: 600;
}

.nds-hint,
.nds-feedback,
.nds-cta-note {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  color: var(--color-text-secondary);
}

.nds-feedback--ok {
  color: var(--color-success);
  font-weight: 700;
}

.nds-note {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--color-border-strong);
  background: var(--color-surface-inset);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.nds-log {
  margin-top: 0.9rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--color-border);
  background: #fff;
}

.nds-log__title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nds-cycle-anim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 1rem 0 0;
  padding: 0.7rem 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nds-cycle-anim__sep {
  color: var(--color-text-muted);
  font-weight: 500;
}

.nds-compare {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .nds-compare { grid-template-columns: 1fr 1fr; }
}

.nds-compare__bad,
.nds-compare__good {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.nds-compare__bad h3,
.nds-compare__good h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nds-compare__bad {
  border-color: rgba(92, 36, 48, 0.28);
  background: rgba(92, 36, 48, 0.05);
}

.nds-compare__good {
  border-color: rgba(79, 107, 92, 0.35);
  background: var(--color-success-bg);
}

.nds-compare p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.nds-report {
  margin-top: 1rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--color-border-strong);
  background: #fff;
}

.nds-report__eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nds-report p {
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.nds-report__worked {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

.nds-next h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nds-tagline {
  margin: 1.25rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.nds-tagline span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nds-cta {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

@media (min-width: 480px) {
  .nds-cta {
    grid-template-columns: 1fr 1fr;
  }
}

.nds-cta .btn {
  min-height: 48px;
  width: 100%;
}

@media (max-width: 520px) {
  .nds-plan-grid,
  .nds-choices--compact {
    grid-template-columns: 1fr;
  }

  .nds-dl > div,
  .nds-dl--compact > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .nds__nav {
    grid-template-columns: 1fr 1fr;
  }

  .nds__step {
    grid-column: 1 / -1;
    order: -1;
    text-align: center;
  }

  .nds__nav #ndsPrev,
  .nds__nav #ndsNext {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nds,
  .nds__progress-bar,
  .nds__content--enter {
    transition: none !important;
    animation: none !important;
  }
}

/* ── _17-session-v2.css ── */
/* ==========================================================================
   NULLUM — Mejoras UX (Auth Gate · Acordeón dieta · Badges sugerencias
                        · Tooltips triaje · PDF preview)
   ========================================================================== */

/* ── 1. Auth Gate ──────────────────────────────────────────────────────── */
/* ── Gate compacto: chips en rejilla, no filas largas — menos scroll para llegar al formulario
   ("fácil para entrar", Guía de conversión). "Ya tengo cuenta" destaca como opción principal. ── */
.auth-gate {
  display: flex;
  flex-direction: column;
  padding: 0 0 1rem;
}

.auth-gate__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.auth-gate__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 84px;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--auth-border, var(--color-border));
  border-radius: var(--radius-md, 4px);
  background: var(--auth-surface, var(--color-surface));
  color: var(--auth-text, var(--color-text-primary));
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast, 200ms), transform var(--transition-fast, 200ms), box-shadow var(--transition-fast, 200ms);
}

#authGateLogin,
#authGateInvite {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 64px;
}

#authGateLogin {
  background: var(--auth-wine, var(--color-accent));
  border-color: var(--auth-wine, var(--color-accent));
  color: #fff;
}

/* Mientras el gate está visible, no mostrar formularios (hermanos posteriores). */
#authGate:not([hidden]) ~ #loginView,
#authGate:not([hidden]) ~ #registerView {
  display: none !important;
}
#authGateLogin .auth-gate__desc {
  color: rgba(255,255,255,0.72);
}
#authGateLogin .auth-gate__arrow {
  color: #fff;
  opacity: 0.8;
}

.auth-gate__btn:hover,
.auth-gate__btn:focus-visible {
  border-color: var(--auth-wine, var(--color-accent));
  outline: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-brutalist-sm, 3px 3px 0 0 #1A1A1A);
}

#authGateLogin:hover,
#authGateLogin:focus-visible {
  background: var(--auth-wine-hover, var(--color-accent-hover));
  box-shadow: 3px 3px 0 0 #1A1A1A;
}

.auth-gate__btn--ghost {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: auto;
  padding: 0.6rem 0.9rem;
  border-style: dashed;
  opacity: 0.75;
}

.auth-gate__btn--ghost:hover,
.auth-gate__btn--ghost:focus-visible {
  opacity: 1;
  color: var(--auth-text, var(--color-text-primary));
}

.auth-gate__arrow {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 150ms ease, transform 150ms ease;
}

.auth-gate__btn:hover .auth-gate__arrow,
.auth-gate__btn:focus-visible .auth-gate__arrow {
  opacity: 0.9;
  transform: translateX(2px);
}

.auth-gate__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.auth-gate__label {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
#authGateLogin .auth-gate__label {
  font-size: 0.9rem;
}

.auth-gate__desc {
  font-size: 0.7rem;
  color: var(--auth-text-muted, var(--color-text-muted));
}

.auth-gate__no-invite {
  margin: 0.9rem 0 0;
  font-size: 0.75rem;
  color: var(--auth-text-muted, var(--color-text-muted));
  text-align: center;
}

/* Divisor entre el gate compacto y el formulario de entrada directa, siempre visible debajo */
.auth-gate::after {
  content: 'O ACCEDE DIRECTAMENTE';
  display: block;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1.5px solid var(--auth-border, var(--color-border));
  font-family: var(--font-heading);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: var(--track-eyebrow, 0.2em);
  text-align: center;
  color: var(--auth-text-muted, var(--color-text-muted));
}

.auth-gate__spot-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--auth-wine, var(--color-accent));
  text-decoration: underline;
  cursor: pointer;
}

.auth-gate__spot-link:hover {
  text-decoration: none;
}

/* ── 2. Acordeón de opciones avanzadas — Generador de dieta ───────────── */
.meal-plan-advanced-opts {
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: var(--radius-sm, 4px);
  margin-top: 0.75rem;
  overflow: hidden;
}

.meal-plan-advanced-opts__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--color-surface-raised, rgba(255,255,255,0.04));
  transition: background 0.15s;
}

.meal-plan-advanced-opts__summary::-webkit-details-marker { display: none; }

.meal-plan-advanced-opts__summary:hover,
details[open] .meal-plan-advanced-opts__summary {
  background: var(--color-surface-hover, rgba(255,255,255,0.07));
}

.meal-plan-advanced-opts__summary::after {
  content: '▸';
  font-size: 0.75rem;
  color: var(--color-text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] .meal-plan-advanced-opts__summary::after {
  transform: rotate(90deg);
}

.meal-plan-advanced-opts__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text, #f5f5f5);
}

.meal-plan-advanced-opts__hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}

.meal-plan-advanced-opts__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
}

/* ── 3. Badges de estado en sugerencias de ejercicio ─────────────────── */
.split-suggest__history {
  margin-top: 1rem;
}

.split-suggest__history-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.split-suggest__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.07));
  list-style: none;
}

.split-suggest__item:last-child { border-bottom: none; }

.split-suggest__item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text, #f5f5f5);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-suggest__item-date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.split-suggest__item-reason {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.split-suggest__status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── 4. Tooltips de criterio en triaje NULLUM Command ────────────────── */
.cc-triage__tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 0.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.cc-triage__tip:hover,
.cc-triage__tip:focus-visible {
  color: var(--color-accent, #5C2430);
  border-color: var(--color-accent, #5C2430);
  outline: none;
}

.cc-triage__tip-bubble {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(18rem, 80vw);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm, 4px);
  background: var(--color-surface-overlay, #1a1a1a);
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  color: var(--color-text, #f5f5f5);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.cc-triage__tip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-surface-overlay, #1a1a1a);
}

/* ── 5. PDF preview box ──────────────────────────────────────────────── */
.pdf-preview {
  margin-top: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: var(--radius-sm, 4px);
  background: var(--color-surface-raised, rgba(255,255,255,0.04));
}

.pdf-preview__title {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.pdf-preview__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pdf-preview__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.06));
  padding: 0.3rem 0;
}

.pdf-preview__item:last-child { border-bottom: none; }

.pdf-preview__key {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.pdf-preview__val {
  color: var(--color-text, #f5f5f5);
  font-weight: 500;
  text-align: right;
}

.pdf-preview__hint {
  margin: 0.7rem 0 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}


/* ==========================================================================
   SESIÓN DE ENTRENAMIENTO · v2 «cómoda»
   Cabecera legible, filas grandes para el pulgar, selector RIR único y
   dock compacto. Va al final para ganar a las capas anteriores.
   ========================================================================== */

/* —— Cabecera: fila 1 (← título ▾) + fila 2 (4 métricas) —— */
#activeWorkoutFocus .focus-metrics .focus-metrics__chrome {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 40px;
  grid-template-areas:
    "back title sync toggle"
    "status status status status";
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  margin: 0;
}

#activeWorkoutFocus .focus-metrics__chrome #focusExitBtn { grid-area: back; width: 40px; height: 40px; }
#activeWorkoutFocus .focus-metrics__chrome .focus-sync-pill { grid-area: sync; }
#activeWorkoutFocus .focus-metrics__chrome .focus-metrics__collapse { grid-area: toggle; width: 40px; height: 40px; }

#activeWorkoutFocus .focus-metrics .focus-metrics__identity {
  grid-area: title;
  display: block !important;
  max-width: none;
  min-width: 0;
}

#activeWorkoutFocus .focus-metrics .focus-metrics__identity .focus-mode__routine {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#activeWorkoutFocus .focus-metrics .focus-metrics__status {
  grid-area: status;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  max-height: none;
  opacity: 1;
  order: initial;
}

#activeWorkoutFocus .focus-metrics .focus-metrics__cell {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 7px 4px 6px;
  border-radius: 10px;
  background: color-mix(in srgb, #5C2430 5%, #ffffff);
}

#activeWorkoutFocus .focus-metrics .focus-metrics__cell--sets::before { content: none; }

#activeWorkoutFocus .focus-metrics .focus-metrics__label {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

#activeWorkoutFocus .focus-metrics .focus-metrics__value {
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.1;
}

#activeWorkoutFocus .focus-metrics[data-collapsed="true"] .focus-metrics__start-wrap { margin-top: 10px; }

/* —— Tarjeta activa: filas grandes (no unilateral) —— */
#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-log:not(.focus-set-log--uni) .focus-set-log__head,
#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-row:not(.is-unilateral) {
  grid-template-columns: 24px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr) 30px 50px;
  column-gap: 6px;
}

#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-log__head {
  padding: 2px 4px 6px;
  font-size: 0.56rem;
}

#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-log__head span:last-child { text-align: center; }

#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-row {
  padding: 6px 4px;
  row-gap: 6px;
  border-radius: 12px;
}

#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-row__input {
  min-height: 52px;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 800;
}

#activeWorkoutFocus .focus-mode__ex-card.is-active .focus-set-row__check {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 1.2rem;
}

#activeWorkoutFocus .focus-set-row__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-text-muted, #6b7280);
  background: transparent;
}

#activeWorkoutFocus .focus-set-row.is-current .focus-set-row__num {
  background: #5C2430;
  color: #ffffff;
}

#activeWorkoutFocus .focus-set-row.is-done .focus-set-row__num {
  color: #5C2430;
}

#activeWorkoutFocus .focus-set-row__menu-btn {
  width: 30px;
  min-width: 30px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  font-size: 1.1rem;
}

/* Serie actual: acento lateral granate */
#activeWorkoutFocus .focus-set-row.is-current:not(.is-done) {
  background: color-mix(in srgb, #5C2430 5%, #ffffff);
  box-shadow: inset 3px 0 0 #5C2430;
}

/* Serie hecha: legible (antes 0.58) y claramente cerrada */
#activeWorkoutFocus .focus-set-row.is-done { opacity: 0.78; }
#activeWorkoutFocus .focus-set-row.is-done .focus-set-row__input {
  opacity: 1;
  background: transparent;
  border-color: transparent;
}

/* RIR: parece un selector, no un campo de texto */
#activeWorkoutFocus .focus-set-row__input--rir {
  cursor: pointer;
  caret-color: transparent;
  color: #5C2430;
  border-style: dashed;
  border-color: color-mix(in srgb, #5C2430 35%, #E5E7EB);
  background: color-mix(in srgb, #5C2430 3%, #ffffff);
  -webkit-user-select: none;
  user-select: none;
}

#activeWorkoutFocus .focus-set-row__input--rir::placeholder {
  color: color-mix(in srgb, #5C2430 55%, #9ca3af);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

#activeWorkoutFocus .focus-set-row__input--rir:not(:placeholder-shown) {
  border-style: solid;
  border-color: color-mix(in srgb, #5C2430 45%, #E5E7EB);
}

#activeWorkoutFocus .focus-set-row__input--rir[aria-expanded="true"] {
  border-style: solid;
  border-color: #5C2430;
  box-shadow: 0 0 0 3px rgba(92, 36, 48, 0.14);
}

/* Chip «Misma / Anterior»: bajo los inputs y solo en la serie activa */
#activeWorkoutFocus .focus-set-row .focus-ghost-fill {
  grid-column: 2 / -1;
  justify-self: stretch;
  margin: 0;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.74rem;
  text-align: center;
}

#activeWorkoutFocus .focus-set-row:not(.is-current) .focus-ghost-fill:not(.is-suggested) {
  display: none;
}

#activeWorkoutFocus .focus-add-set--card {
  width: auto;
  margin: 6px 10px 12px;
  min-height: 48px;
  border-radius: 12px;
}

/* Inmersión: atenuar, pero sin bloquear toques en otras series */
#activeWorkoutFocus.is-set-immersive .focus-metrics,
#activeWorkoutFocus.is-set-immersive .focus-mode__ex-card:not(.is-editing) {
  opacity: 0.55;
  pointer-events: auto;
}

#activeWorkoutFocus.is-set-immersive .focus-set-row:not(.is-immersive-row) {
  opacity: 0.55;
  pointer-events: auto;
}

/* —— Dock: descanso + cerrar en una sola fila —— */
#activeWorkoutFocus .focus-mode__dock--control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}

#activeWorkoutFocus .focus-mode__dock--control .focus-mode__timer {
  grid-column: 1;
  grid-row: 1;
  order: 0;
  min-width: 0;
  margin: 0;
  align-self: stretch;
}

#activeWorkoutFocus .focus-mode__dock--control .focus-mode__bottom {
  grid-column: 2;
  grid-row: 1;
  order: 0;
  display: flex;
  margin: 0;
  padding: 0;
}

#activeWorkoutFocus .focus-mode__dock--control .focus-mode__timer[data-expanded="false"] .focus-mode__timer-body {
  display: none;
}

/* Descanso desplegado (tras completar serie): ocupa todo el ancho, cerrar debajo */
#activeWorkoutFocus .focus-mode__dock--control .focus-mode__timer[data-expanded="true"] {
  grid-column: 1 / -1;
}

#activeWorkoutFocus .focus-mode__dock--control .focus-mode__timer[data-expanded="true"] ~ .focus-mode__bottom {
  grid-column: 1 / -1;
  grid-row: 2;
}

#activeWorkoutFocus .focus-mode__timer-toggle {
  min-height: 52px;
  padding: 8px 12px;
  gap: 8px;
}

#activeWorkoutFocus .focus-mode__timer-toggle-time { font-size: 1.35rem; }

#activeWorkoutFocus .focus-mode__finish {
  min-height: 52px;
  height: 100%;
  padding: 0 10px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: normal;
}

/* —— Selector de RIR (único, portal en <body>) —— */
.focus-rir-picker.focus-set-row__rir-pills {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(340px, calc(100vw - 20px));
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, #5C2430 22%, #E5E7EB);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18), 0 2px 6px rgba(92, 36, 48, 0.08);
  animation: focus-rir-picker-in 0.16s ease-out;
}

.focus-rir-picker.focus-set-row__rir-pills.is-active { display: flex; }

.focus-rir-picker.focus-set-row__rir-pills::before {
  left: var(--rir-arrow-x, 50%);
  border-color: color-mix(in srgb, #5C2430 22%, #E5E7EB);
}

.focus-rir-picker.is-above::before {
  top: auto;
  bottom: -5px;
  transform: translateX(-50%) rotate(225deg);
}

.focus-rir-picker__title {
  margin: 0 2px;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C2430;
}

.focus-rir-picker__chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.focus-rir-picker .focus-rir-chip--row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 2px;
  border-radius: 12px;
}

.focus-rir-chip__num {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.focus-rir-chip__hint {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  opacity: 0.72;
  white-space: nowrap;
}

.focus-rir-picker .focus-rir-chip--row.is-active .focus-rir-chip__hint { opacity: 0.9; }

@keyframes focus-rir-picker-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .focus-rir-picker.focus-set-row__rir-pills { animation: none; }
}

/* —— Modo noche —— */
#activeWorkoutFocus.is-night .focus-metrics .focus-metrics__cell { background: #1a1a1a; }
#activeWorkoutFocus.is-night .focus-set-row.is-current:not(.is-done) { background: #2a1f22; }
#activeWorkoutFocus.is-night .focus-set-row__input--rir { background: #242424; color: #f3c9d2; }
body:has(#activeWorkoutFocus.is-night:not([hidden])) .focus-rir-picker.focus-set-row__rir-pills,
body:has(#activeWorkoutFocus.is-night:not([hidden])) .focus-rir-picker.focus-set-row__rir-pills::before {
  background: #242424;
  border-color: #3f3f46;
}
body:has(#activeWorkoutFocus.is-night:not([hidden])) .focus-rir-picker .focus-rir-chip--row:not(.is-active) {
  background: #1a1a1a;
  border-color: #3f3f46;
  color: #f3f4f6;
}
body:has(#activeWorkoutFocus.is-night:not([hidden])) .focus-rir-picker__title { color: #f3c9d2; }

/* Una capa antigua fuerza superficies claras con !important: corregirlo de noche */
#activeWorkoutFocus.is-night .focus-mode__ex-card,
#activeWorkoutFocus.is-night .focus-mode__timer,
#activeWorkoutFocus.is-night .focus-mode__finish,
#activeWorkoutFocus.is-night .focus-add-set--card,
#activeWorkoutFocus.is-night .focus-micro-fb {
  background: #242424 !important;
  border-color: #3f3f46 !important;
  color: #f3f4f6 !important;
}
#activeWorkoutFocus.is-night .focus-mode__dock--control { background: #1a1a1a; }
#activeWorkoutFocus.is-night .focus-set-row.is-done .focus-set-row__input { background: transparent; border-color: transparent; }

/* ═══════════════════════════════════════════════════════════════
   NULLUM — Brutalist Overhaul Layer (Guía Maestra v2.1)
   Plus Jakarta Sans geométrica · burdeos #5C2430 sobre perla #FAF8F6
   Sustituye la capa editorial-serif anterior: nada de itálicas suaves,
   nada de sombras difusas — contraste duro, bordes marcados, rectos.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Typografía: geométrica, mayúsculas, sin itálicas editoriales ── */

/* Títulos de modal: misma sans geométrica ultra-bold que el resto de headings */
[class*="modal__title"],
[class*="modal-title"],
.auth-login-modal__title,
.wa-qualify-modal__title {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 900;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
}

.card__title {
  letter-spacing: var(--track-title);
}

[class*="eyebrow"],
[class*="__eyebrow"] {
  letter-spacing: var(--track-eyebrow);
}

body {
  font-weight: var(--weight-body);
}

/* ── 2. Botones: contraste de forma deliberado —
   el CTA es la única píldora del sistema; todo lo demás es recto/técnico.
   Sombra dura (offset, sin blur), no glow difuminado. ── */
.btn--primary {
  --magnet-x: 0px;
  --magnet-y: 0px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-brutalist-accent);
  letter-spacing: var(--track-cta);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}
.btn--primary:hover {
  box-shadow: 6px 6px 0 0 var(--color-accent);
  transform: translate(calc(-2px + var(--magnet-x)), calc(-2px + var(--magnet-y)));
}
.btn--primary:active {
  box-shadow: 1px 1px 0 0 var(--color-accent);
  transform: translate(calc(2px + var(--magnet-x)), calc(2px + var(--magnet-y))) scale(var(--press-scale));
}

.btn--secondary {
  border-radius: var(--radius-md);
  border-width: var(--border-width-strong);
}

/* ── 3. Inputs: técnicos, rectos, borde que reacciona al foco ── */
.form__input,
.form__select {
  background-color: var(--color-surface-raised);
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.form__input:focus,
.form__select:focus {
  background-color: var(--color-surface);
}

.form__label {
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── 4. Tarjetas: rectas, borde marcado, sombra dura al hover ── */
html[data-theme="classic"] .card {
  border-radius: var(--radius-sm);
}

html[data-theme="classic"] .card--logbook,
html[data-theme="classic"] .panel__body > .card {
  background: var(--color-surface);
  border: var(--border-width-strong) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: var(--space-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
html[data-theme="classic"] .card--logbook:hover,
html[data-theme="classic"] .panel__body > .card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-brutalist-sm);
  transform: translate(-1px, -1px);
}

/* ── 5. Métricas y cifras: display serif reservado a contrapunto puntual —
   la lectura de datos sigue siendo carbon/sans geométrica, nunca itálica. ── */
[class*="__metric"],
[class*="__value"][class*="stat"],
[class*="progress__number"],
[class*="metric__value"],
.focus-metrics__value,
.kpi-value {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 900;
}

/* ── 6. Temporizador: cifra grande, geométrica, sin cursiva ── */
[class*="timer__time"],
[class*="rest-timer__count"] {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

/* ── 7. Chrome de modal: borde marcado + sombra dura, sin halo difuso ── */
html[data-theme="classic"] [class*="modal__dialog"],
html[data-theme="classic"] [class*="modal-dialog"],
html[data-theme="classic"] .wa-qualify-modal__dialog,
html[data-theme="classic"] .auth-login-modal__dialog {
  border: var(--border-width-strong) solid var(--color-text-primary);
  box-shadow: 8px 8px 0 0 var(--color-accent);
}

/* ── 8. Cabeceras de panel / dashboard: geométrica ultra-bold, mayúsculas ── */
[class*="panel__header"] [class*="title"],
[class*="section__header"] [class*="title"],
[class*="dashboard__title"],
[class*="screen__title"] {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 900;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
}

/* ── 9. Exercise / workout log table rows ── */
html[data-theme="classic"] [class*="set-row"],
html[data-theme="classic"] [class*="exercise-row"],
html[data-theme="classic"] [class*="log-row"] {
  border-bottom-color: var(--color-border);
}
html[data-theme="classic"] [class*="set-row"]:hover,
html[data-theme="classic"] [class*="exercise-row"]:hover {
  background: var(--color-surface-hover);
}

/* ── 10. Chart / statistics: axis labels + legend text ── */
[class*="chart"] text,
[class*="chart"] tspan,
[class*="recharts"] text {
  font-family: var(--font-body) !important;
  font-size: 0.7rem;
}

/* ── 11. Grain backdrop: warmer tint on classic ── */
html[data-theme="classic"] body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.58 0 0 0 0 0.48 0 0 0 0 0.50 0 0 0 0.40 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.20;
}
html[data-theme="classic"] body::after {
  opacity: 0.16;
}

/* ── 12. Focus mode (active workout) ── */
html[data-theme="classic"] .focus-mode__ex-card,
html[data-theme="classic"] .focus-add-set--card {
  background: var(--color-surface);
  border-color: var(--color-border);
}
html[data-theme="classic"] .focus-metrics__cell {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}

/* ── 13. Subtle animated entrance for internal screens ──
   Solo opacity: un transform (aunque sea translateY(0) en el keyframe final)
   con animation-fill-mode "both" deja el valor fijado de forma permanente,
   y eso crea un containing block nuevo para TODO descendiente position:fixed
   (login modal, sheets de runners, session-done, focus-mode...). En móvil

   eso descoloca esos overlays a cientos/miles de px del viewport real. */
@media (prefers-reduced-motion: no-preference) {
  .dashboard,
  #screenApp,
  #screenAuth {
    animation: nullum-fade-in 0.28s ease both;
  }
  @keyframes nullum-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ── End editorial layer ── */

/* ── _15-legal.css ── */
/* ================================================================
   _15-legal.css — Legal page styles
   NOTE: Legal modal and document styles are defined in _14-landing.css
   (.legal-modal, .legal-doc, .legal-modal__*, etc.)
   This file is reserved for any future legal-specific page overrides.
   ================================================================ */

/* ── _16-android-layout.css ── */
#panelRunners .panel__header .btn,
#panelAbout .panel__header .btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f5f0ee;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#panelStats .panel__header .btn:hover,
#panelSession .panel__header .btn:hover,
#panelCheckIn .panel__header .btn:hover,
#panelNutrition .panel__header .btn:hover,
#panelCalendar .panel__header .btn:hover,
#panelRunners .panel__header .btn:hover,
#panelAbout .panel__header .btn:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Inputs, selects y labels dentro del feature header */
#panelStats .panel__header .form__input,
#panelStats .panel__header .form__select,
#panelStats .panel__header .form__label,
#panelSession .panel__header .form__input,
#panelCheckIn .panel__header .form__input {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: #f5f0ee;
}

#panelStats .panel__header .form__label {
  color: rgba(245, 240, 238, 0.72);
}

/* Streak badge y otros badges */
#panelCheckIn .panel__header .wci-streak-badge {
  color: rgba(245, 240, 238, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ── 9. SEGURIDAD — REDUCED MOTION ─────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .nlm-brand-wm { display: none; }


  .panel--active,
  .panel--active .card,
  .panel--active .widget,
  .panel--active .bento-card,
  .panel--active .auth-bento-card,
  .panel--active .nlm-how__card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .nlm-how-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .nlm-how__card,
.card {
    transition: none !important;
  }
}

/* ── 9. HERO — FONDO INTERACTIVO (neofuturismo, toque + ratón) ─────
   Capas puramente decorativas, pointer-events:none, sin z-index propio
   fuera del 0 ya usado por .nlm-grain/.nlm-orb (mismo stacking context
   que .nlm-hero__above, position:relative + z-index:1). La posición se
   difunde como --nlm-hx/--nlm-hy (% dentro de .nlm-hero__above) desde
   nullumHeroBg.js: sigue el dedo/ratón y, sin interacción, deriva sola
   (idle) para que el hero nunca se sienta estático. Con JS deshabilitado
   o prefers-reduced-motion, cae a un centro fijo via los valores por
   defecto del var(). ── */

.nlm-dotgrid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(92, 36, 48, 0.4) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(260px 260px at var(--nlm-hx, 50%) var(--nlm-hy, 32%), #000 0%, transparent 72%);
  mask-image: radial-gradient(260px 260px at var(--nlm-hx, 50%) var(--nlm-hy, 32%), #000 0%, transparent 72%);
  opacity: 0.5;
}

.nlm-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(260px 260px at var(--nlm-hx, 50%) var(--nlm-hy, 32%), rgba(92, 36, 48, 0.1), transparent 72%);
}

.nlm-corner-tick {
  position: absolute;
  width: 14px;
  height: 14px;
  border-style: solid;
  border-width: 0;
  border-color: rgba(92, 36, 48, 0.3);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
.nlm-corner-tick--tl { top: max(18px, env(safe-area-inset-top)); left: 18px; border-left-width: 1.5px; border-top-width: 1.5px; }
.nlm-corner-tick--tr { top: max(18px, env(safe-area-inset-top)); right: 18px; border-right-width: 1.5px; border-top-width: 1.5px; }
.nlm-corner-tick--bl { bottom: 18px; left: 18px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.nlm-corner-tick--br { bottom: 18px; right: 18px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

/* ── Tagline: eyebrow pequeño y centrado arriba del wordmark ── */
.nlm-hero__tagline {
  margin: 0 0 0.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7f74;
  max-width: 320px;
}

/* ── Wordmark: casi full-bleed sin provocar overflow-x del documento ── */
.nlm-hero__wordmark {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  letter-spacing: -0.04em;
  font-size: clamp(3.2rem, 18vw, 8.5rem);
  white-space: nowrap;
  overflow: hidden;
}

/* ── Wordmark: reflejo interactivo que sigue el dedo/cursor (--nlm-hx/--nlm-hy,
   difundidas por nullumHeroBg.js sobre .nlm-hero__above) + shimmer de marca.
   background-attachment:fixed hace que el punto de luz sea uno solo para toda
   la palabra, no uno por letra — como un reflejo real sobre una superficie. ── */
.nlm-char {
  background-color: #1A1A1A;
  background-image: radial-gradient(130px 130px at var(--nlm-hx, 50%) var(--nlm-hy, 30%), rgba(255,255,255,0.85), rgba(255,255,255,0) 42%);
  background-attachment: fixed;
  background-blend-mode: screen;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes nlm-shimmer {
  0% { background-position: 50% 50%, 0% 50%; }
  100% { background-position: 50% 50%, 200% 50%; }
}
.nlm-char--accent {
  font-style: italic;
  color: #5C2430;
  background-color: transparent;
  background-image:
    radial-gradient(130px 130px at var(--nlm-hx, 50%) var(--nlm-hy, 30%), rgba(255,255,255,0.8), rgba(255,255,255,0) 42%),
    linear-gradient(90deg, #5C2430 0%, #471B24 45%, #5C2430 100%);
  background-size: auto, 220% auto;
  background-attachment: fixed, scroll;
  background-blend-mode: screen, normal;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nlm-char-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) both, nlm-shimmer 7s linear infinite;
  animation-delay: calc(0.12s + var(--ci, 0) * 0.065s), 1.5s;
}

@media (prefers-reduced-motion: reduce) {
  .nlm-char--accent {
    animation: none !important;
  }
}

/* ── FIN DEL BLOQUE DE UNIFICACIÓN v2 ──────────────────────────── */

/* ════════════════════════════════════════════════════════
   COACH RUNNERS ANALYTICS
   ════════════════════════════════════════════════════════ */
.coach-runners-analytics {
  padding: 0 var(--space-4, 1rem) var(--space-4, 1rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 0.75rem);
}
.coach-runners-analytics__selector-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  background: var(--color-surface, #FBFBFD);
  border: 1px solid var(--color-border, #E8E8EC);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
}
.coach-runners-analytics__selector-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8A8A99);
  white-space: nowrap;
  flex-shrink: 0;
}
.coach-runners-analytics__select-shell {
  position: relative;
  flex: 1;
  min-width: 0;
}
.coach-runners-analytics__select {
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body, inherit);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text, #1A1A2E);
  padding-right: 1.5rem;
  cursor: pointer;
}
.coach-runners-analytics__select-chev {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-text-muted, #8A8A99);
}
.coach-runners-analytics__card {
  border: 1px solid var(--color-border, #E8E8EC);
  border-radius: 12px;
  overflow: hidden;
}
.coach-runners-analytics__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.5rem;
  border-bottom: 1px solid var(--color-border, #E8E8EC);
}
.coach-runners-analytics__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C2430;
  margin: 0 0 0.2rem;
}
.coach-runners-analytics__card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text, #1A1A2E);
}
.coach-runners-analytics__badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(92, 36, 48, 0.08);
  color: #5C2430;
}
.coach-runners-analytics__ai-icon {
  color: #5C2430;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.coach-runners-analytics__table-wrap {
  overflow-x: auto;  padding: 0.5rem 0;
}
.coach-runners-analytics__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.coach-runners-analytics__table th {
  padding: 0.5rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8A8A99);
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border, #E8E8EC);
}
.coach-runners-analytics__table td {
  padding: 0.625rem 1rem;
  color: var(--color-text, #1A1A2E);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}
.coach-runners-analytics__table tbody tr:last-child td { border-bottom: none; }
.coach-runners-analytics__table tbody tr:hover td { background: rgba(92, 36, 48, 0.03); }
.coach-runners-analytics__empty-row td {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--color-text-muted, #8A8A99);
  font-style: normal;
  font-size: 0.8125rem;
}
.coach-runners-analytics__delta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.4rem;
  border-radius: 6px;
}
.coach-runners-analytics__delta--better { background: rgba(34,139,86,0.1); color: #1a7a4a; }
.coach-runners-analytics__delta--worse  { background: rgba(197,48,48,0.1);  color: #b83232; }
.coach-runners-analytics__delta--neutral { background: rgba(0,0,0,0.05); color: var(--color-text-muted, #8A8A99); }
.coach-runners-analytics__summary-card .card__body { padding: 0.875rem 1rem 1rem; }
.coach-runners-analytics__summary-text {
  font-family: var(--font-serif, 'Plus Jakarta Sans', 'Archivo', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text, #1A1A2E);
  margin: 0;
  font-style: normal;
}
.coach-runners-analytics__skel-row td {
  background: linear-gradient(90deg, #f0f0f4 25%, #e8e8ee 50%, #f0f0f4 75%);
  background-size: 200% 100%;
  animation: cra-skel 1.4s infinite;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
}
@keyframes cra-skel {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* ── End Coach Runners Analytics ── */

/* ══════════════════════════════════════════════════════════════════════════
   NULLUM AI COPILOT — UI Components
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Badges de urgencia ── */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ai-badge--red    { background: #FEE2E2; color: #991B1B; }
.ai-badge--yellow { background: #FEF9C3; color: #854D0E; }
.ai-badge--green  { background: #DCFCE7; color: #166534; }

[data-theme-mode="dark"] .ai-badge--red    { background: #450A0A; color: #FCA5A5; }
[data-theme-mode="dark"] .ai-badge--yellow { background: #422006; color: #FDE047; }
[data-theme-mode="dark"] .ai-badge--green  { background: #052E16; color: #86EFAC; }

/* ── Botón AI Copilot ── */
.ai-copilot-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.ai-copilot-btn:hover { opacity: 1; }

/* ── Razón de urgencia ── */
.ai-urgency-reason {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6B7280);
  margin: 4px 0 0;
  font-style: italic;
}

/* ── Modal overlay ── */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.ai-modal {
  background: var(--color-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
}
.ai-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.ai-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  color: var(--color-text-muted, #6B7280);
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.ai-modal__close:hover { background: var(--color-surface-raised, #F3F4F6); }

.ai-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.ai-modal__body--loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  color: var(--color-text-muted, #6B7280);
  font-size: 0.875rem;
}

.ai-modal__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-border, #E5E7EB);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ── Spinner ── */
.ai-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border, #E5E7EB);
  border-top-color: var(--color-accent, #5C2430);
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* ── Disclaimer ── */
.ai-disclaimer {
  font-size: 0.7rem;
  color: var(--color-text-muted, #9CA3AF);
  margin: 0 auto 0 0;
}

/* ── Markdown rendered ── */
.ai-markdown {
  font-size: 0.875rem;
  line-height: 1.65;
}
.ai-markdown h2, .ai-markdown h3, .ai-markdown h4 {
  margin: 12px 0 6px;
  font-weight: 700;
}
.ai-markdown ul { padding-left: 20px; margin: 6px 0; }
.ai-markdown li { margin-bottom: 4px; }
.ai-markdown p  { margin: 6px 0; }

/* ── Draft textarea ── */
.ai-draft-textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--color-surface-raised, #F9FAFB);
  color: var(--color-text, #1A1A2E);
  resize: vertical;
  font-family: inherit;
}
.ai-draft-textarea:focus {
  outline: 2px solid var(--color-accent, #5C2430);
  outline-offset: -1px;
}

/* ── Quote ── */
.ai-quote {
  border-left: 3px solid var(--color-accent, #5C2430);
  margin: 6px 0 12px;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--color-text-muted, #6B7280);
  font-style: italic;
}

/* ── Category tag ── */
.ai-category-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--color-surface-raised, #F3F4F6);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #6B7280);
}

/* ── Motivation tabs ── */
.ai-approach-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  padding-bottom: 8px;
}
.ai-tab {
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  color: var(--color-text-muted, #6B7280);
  transition: all 0.15s;
}
.ai-tab.active, .ai-tab:hover {
  background: var(--color-accent, #5C2430);
  color: #fff;
  border-color: var(--color-accent, #5C2430);
}

/* ── Risk level ── */
.ai-risk-level {
  font-size: 1rem;
  margin: 0 0 8px;
}

.ai-recommendation {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--color-surface-raised, #F9FAFB);
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ── Plateau panel ── */
.ai-copilot-panel {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  background: var(--color-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  z-index: 8500;
  overflow: hidden;
}
.ai-copilot-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-accent, #5C2430);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}
.ai-copilot-panel__close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
}
.ai-copilot-panel__body {
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
}
.ai-plateau-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
}
.ai-plateau-item:last-child { border-bottom: none; }
.ai-plateau-item strong { display: block; font-size: 0.875rem; }
.ai-plateau-weeks, .ai-plateau-rir {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6B7280);
  margin-right: 8px;
}
.ai-plateau-suggestion {
  font-size: 0.8rem;
  color: var(--color-text, #1A1A2E);
  margin: 4px 0 0;
}

/* ── Error ── */
.ai-error {
  color: #DC2626;
  font-size: 0.875rem;
  padding: 12px;
}

/* ── Scenario ── */
.ai-scenario-type {
  font-size: 0.8rem;
  color: var(--color-text-muted, #6B7280);
  margin: 0 0 4px;
}
.ai-scenario-desc {
  font-size: 0.875rem;
  font-style: italic;
  margin: 0 0 16px;
  color: var(--color-text-muted, #6B7280);
}

/* ── Label ── */
.ai-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 12px 0 4px;
}
.ai-context-summary {
  font-size: 0.875rem;
  color: var(--color-text-muted, #6B7280);
  margin: 0 0 16px;
}
/* ── AI Hub (per-athlete actions panel) ── */
.ai-hub {
  background: var(--color-surface-2, #f8f9fa);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.ai-hub__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface-3, #f1f3f5);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.ai-hub__icon { font-size: 1rem; }
.ai-hub__title {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text, #111);
}
.ai-hub__subtitle {
  font-size: 0.7rem;
  color: var(--color-text-muted, #6b7280);
  margin-left: auto;
}
.ai-hub__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.ai-hub__row:last-child { border-bottom: none; }
.ai-hub__row-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
  letter-spacing: 0.04em;
  min-width: 80px;
}
.ai-hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-hub__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  padding: 5px 10px;
}
.ai-hub__btn-icon { font-size: 0.875rem; }

/* ── AI Strip (per check-in urgency + nutrition row) ── */
.ai-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  background: var(--color-surface-2, #f8f9fa);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  margin-bottom: 12px;
}
.ai-strip__slot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 180px;
}
.ai-strip__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
}
.ai-strip__reason {
  font-size: 0.7rem;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}
.ai-strip__flag {
  font-size: 0.8125rem;
  color: var(--color-text, #111);
}
.btn--xs {
  padding: 3px 8px;
  font-size: 0.7rem;
  line-height: 1.4;
}

/* dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ai-hub {
    background: var(--color-surface-2, #1e2022);
    border-color: var(--color-border, #374151);
  }
  :root:not([data-theme="light"]) .ai-hub__header {
    background: var(--color-surface-3, #161819);
    border-color: var(--color-border, #374151);
  }
  :root:not([data-theme="light"]) .ai-strip {
    background: var(--color-surface-2, #1e2022);
    border-color: var(--color-border, #374151);
  }
}
:root[data-theme="dark"] .ai-hub {
  background: var(--color-surface-2, #1e2022);
  border-color: var(--color-border, #374151);
}
:root[data-theme="dark"] .ai-hub__header {
  background: var(--color-surface-3, #161819);
  border-color: var(--color-border, #374151);
}
:root[data-theme="dark"] .ai-strip {
  background: var(--color-surface-2, #1e2022);
  border-color: var(--color-border, #374151);
}

/* ==========================================================================
   SECCIÓN 9 — REDISEÑO AJUSTES DEL PERFIL (panelProfile)
   ========================================================================== */

/* ── Feature header oscuro vino (igual que los demás paneles principales) ── */
#panelProfile .panel__header {
  position: relative;
  overflow: hidden;
  background: #0e0407;
  background-image:
    radial-gradient(ellipse 75% 60% at 15% 50%, rgba(92, 36, 48, 0.88) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 20%, rgba(140, 28, 48, 0.50) 0%, transparent 58%),
    radial-gradient(ellipse 40% 55% at 60% 90%, rgba(60, 12, 24, 0.70) 0%, transparent 65%);
  border-radius: 20px;
  padding: 1.4rem 1.5rem 1.3rem;
  border-bottom: none;
  border-left: none;
  margin-bottom: 1.25rem;
  --color-text-primary: #f5f0ee;
  --color-text-secondary: rgba(245, 240, 238, 0.70);
  --color-border: rgba(255, 255, 255, 0.14);
}
#panelProfile .panel__header .panel__title {
  color: #f5f0ee;
  font-size: clamp(1.35rem, 4.5vw, 1.8rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
#panelProfile .panel__header .panel__subtitle {
  color: rgba(245, 240, 238, 0.68);
  font-size: clamp(0.78rem, 2.2vw, 0.88rem);
  margin: 0;
  line-height: 1.45;
}
#panelProfile > .null-companion-host {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

/* ── Identity card (profile-hero rediseñado) ── */
.profile-hero {
  margin-bottom: 1.5rem;
}
.profile-hero__card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #0e0407;
  background-image:
    radial-gradient(ellipse 80% 70% at 0% 50%, rgba(92, 36, 48, 0.60) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 100% 10%, rgba(140, 28, 48, 0.35) 0%, transparent 60%);
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.profile-hero__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  pointer-events: none;
}

/* Avatar ring premium */
.profile-hero__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-hero__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid rgba(200, 54, 78, 0.70);
  box-shadow: 0 0 0 4px rgba(200, 54, 78, 0.18), 0 4px 20px rgba(0,0,0,0.45);
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}
.profile-hero__avatar:hover,
.profile-hero__avatar:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 0 0 5px rgba(200, 54, 78, 0.30), 0 6px 24px rgba(0,0,0,0.55);
  outline: none;
}
.profile-hero__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-hero__avatar-img[hidden] { display: none; }
.profile-hero__avatar-fallback {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(245, 240, 238, 0.55);
  user-select: none;
  line-height: 1;
}
.profile-hero__avatar:has(.profile-hero__avatar-img:not([hidden])) .profile-hero__avatar-fallback {
  display: none;
}
.profile-hero__avatar-fallback[hidden] { display: none; }

.profile-hero__avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(200, 54, 78, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 1.5px solid rgba(255,255,255,0.35);
}

/* Info zona */
.profile-hero__info {
  flex: 1 1 0;
  min-width: 0;
}
.profile-hero__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 54, 78, 0.90);
  margin: 0 0 0.3rem;
  line-height: 1;
}
.profile-hero__name {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f5f0ee;
  margin: 0 0 0.5rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-hero__stats {
  display: flex;
  gap: 1.2rem;
  margin: 0 0 0.45rem;
}
.profile-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.profile-hero__stat dt {
  font-size: 0.68rem;
  color: rgba(245,240,238,0.50);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.profile-hero__stat dd {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f5f0ee;
  margin: 0;
}
.profile-hero__hint {
  font-size: 0.72rem;
  color: rgba(245,240,238,0.38);
  margin: 0;
}
.profile-hero__status {
  font-size: 0.8rem;
  color: var(--color-success, #3a9e6a);
  margin: 0.35rem 0 0;
}
.profile-hero__status[data-tone="error"] { color: var(--color-danger, #c0392b); }
.profile-hero__status[data-tone="ok"] { color: var(--color-success, #3a9e6a); }
.profile-hero__status[hidden] { display: none; }

/* ── Profile section headers (icono + título + desc) ── */
.profile-section {
  border-radius: 16px !important;
}
.profile-section__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.4rem 0;
  margin-bottom: 0.1rem;
}
.profile-section__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(92, 36, 48, 0.10);
  border: 1px solid rgba(92, 36, 48, 0.15);
  color: var(--color-accent, #5C2430);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-section__icon--security {
  background: rgba(251, 191, 36, 0.10);
  border-color: rgba(251, 191, 36, 0.20);
  color: #b45309;
}
.profile-section__icon--privacy {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
  color: #c0392b;
}
.profile-section__title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-primary, #1a0f12);
  margin: 0 0 0.18rem;
  text-transform: uppercase;
}
.profile-section__desc {
  font-size: 0.76rem;
  color: var(--color-text-secondary, #6b5058);
  margin: 0;
  line-height: 1.4;
}

/* Zona peligro (privacidad) */
.profile-section--danger {
  border-left: 3px solid rgba(239, 68, 68, 0.40) !important;
}

/* ── Formulario de datos personales: mejorado ── */
#profileDataCard .card__body {
  padding-top: 1rem;
}
#profileForm .form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
#profileForm .form__group {
  margin-bottom: var(--space-md);
}
#profileForm .form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, #6b5058);
  margin-bottom: 0.4rem;
}
#profileForm .form__input,
#profileForm .form__select {
  border-radius: 10px;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#profileForm .form__input:focus,
#profileForm .form__select:focus {
  border-color: var(--color-accent, #5C2430);
  box-shadow: 0 0 0 3px rgba(92, 36, 48, 0.12);
}
#profileForm textarea.form__input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}
#profileForm .form__hint {
  font-size: 0.73rem;
  color: var(--color-text-secondary, #6b5058);
  margin-top: 0.35rem;
  line-height: 1.45;
}
#profileForm #profileSave {
  width: 100%;
  margin-top: 0.5rem;
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* Email field (disabled) — muestra que está bloqueado */
#profileEmail {
  background: var(--color-surface-2, #f0ede9);
  color: var(--color-text-muted, #9a8c8c);
  cursor: not-allowed;
  opacity: 0.75;
}

/* ── Temas visuales: grid más amplio y legible ── */
#themeSettingsCard .theme-settings__intro {
  padding: 0 1.4rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-secondary, #6b5058);
  line-height: 1.5;
}
.theme-settings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 0 1.4rem 1.4rem;
}
.theme-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--color-border, #e5dfd9);
  background: var(--color-surface, #faf8f6);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.theme-option:hover {
  border-color: var(--color-accent, #5C2430);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(92,36,48,0.10);
}
.theme-option:focus-visible {
  outline: 2px solid var(--color-accent, #5C2430);
  outline-offset: 2px;
}
.theme-option.is-active {
  border-color: var(--color-accent, #5C2430);
  background: rgba(92, 36, 48, 0.05);
  box-shadow: 0 0 0 3px rgba(92,36,48,0.10);
}
.theme-option__preview {
  display: flex;
  gap: 5px;
  align-items: center;
}
.theme-option__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.theme-option__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.theme-option__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-primary, #1a0f12);
  line-height: 1.2;
}
.theme-option__desc {
  font-size: 0.7rem;
  color: var(--color-text-secondary, #6b5058);
  line-height: 1.3;
}

/* ── Toggle switch: más premium ── */
.push-reminders__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border, #e5dfd9);
  margin-top: 0.75rem;
}
.push-reminders__switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 27px;
  flex-shrink: 0;
}
.push-reminders__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.push-reminders__slider {
  position: absolute;
  inset: 0;
  background: var(--color-border, #ccc);
  border-radius: 27px;
  transition: background 0.2s;
  cursor: pointer;
}
.push-reminders__slider::before {
  content: '';
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
}
.push-reminders__switch input:checked + .push-reminders__slider {
  background: var(--color-accent, #5C2430);
}
.push-reminders__switch input:checked + .push-reminders__slider::before {
  transform: translateX(21px);
}

/* ── Conexiones: iOS-style list rows ── */
.profile-connections__intro {
  padding: 0 1.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary, #6b5058);
  margin: 0;
  font-family: inherit;
}
.profile-connections__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border, #e5dfd9);
}
.profile-connections__item {
  display: flex;
  align-items: center;         /* centra el botón verticalmente con nombre+hint */
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border, #e5dfd9);
}
.profile-connections__item:last-child { border-bottom: none; }
.profile-connections__item:first-child { border-top: none; }
.profile-connections__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 0;
  min-width: 0;
}
.profile-connections__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--color-surface-2, #f0ede9);
  border: 1px solid var(--color-border, #e5dfd9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent, #5C2430);
  flex-shrink: 0;
}
.profile-connections__copy {
  flex: 1 1 0;
  min-width: 0;
}
/* Nombre: UNA sola línea con ellipsis — nunca pisa el botón */
.profile-connections__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-primary, #1a0f12);
  margin: 0 0 0.15rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Hint: visible en 2 líneas máximo */
.profile-connections__hint {
  font-size: 0.72rem;
  color: var(--color-text-secondary, #6b5058);
  margin: 0;
  line-height: 1.4;
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  font-family: inherit;
}
.profile-connections__btn {
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  min-width: 90px;
  max-width: 100px;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.profile-connections__btn.is-connected {
  background: rgba(58, 158, 106, 0.10);
  border-color: rgba(58, 158, 106, 0.35);
  color: #2d7a52;
}
.profile-connections__btn.is-connected:hover {
  background: rgba(58, 158, 106, 0.18);
}
/* Mobile: botón un poco más compacto */
@media (max-width: 480px) {
  .profile-connections__item {
    padding: 0.75rem 0;
    gap: 0.65rem;
  }
  .profile-connections__btn {
    min-width: 78px;
    padding: 0.38rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* ── Contraseña y 2FA: formularios mejorados ── */
#profilePasswordCard .card__body,
#profileSecurityCard .card__body,
#profilePrivacyCard .card__body {
  padding-top: 0.75rem;
}
.profile-password__intro,
.profile-security__intro,
.profile-security__hint,
.profile-privacy__intro {
  font-size: 0.82rem;
  color: var(--color-text-secondary, #6b5058);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.profile-password__form .form__group,
#profileSecurityCard .form__group {
  margin-bottom: var(--space-md);
}
.profile-password__form .form__label,
#profileSecurityCard .form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, #6b5058);
  margin-bottom: 0.4rem;
}
.profile-password__form .form__input,
#profileSecurityCard .form__input {
  border-radius: 10px;
}
.profile-password__actions,
.profile-security__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.profile-password__actions .btn,
.profile-security__actions .btn {
  border-radius: 10px;
}

/* ── Privacidad: links de textos legales ── */
.profile-privacy__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.profile-privacy__links a.btn {
  font-size: 0.78rem;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
}

/* Selector de tipo de solicitud + form */
#profilePrivacyCard .form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, #6b5058);
  margin-bottom: 0.4rem;
}
#profilePrivacyCard .form__select,
#profilePrivacyCard .form__input,
#profilePrivacyCard textarea {
  border-radius: 10px;
}
.profile-privacy__actions {
  margin-top: 0.5rem;
}
.profile-privacy__actions .btn {
  border-radius: 10px;
  width: 100%;
}

/* ── Section card padding unificado ── */
.profile-section > .card__body,
.profile-section > .card__header ~ .card__body {
  padding: 0.85rem 1.4rem 1.4rem;
}
.profile-section .push-reminders__intro,
.profile-section .push-reminders__meta,
.profile-section .push-reminders__actions,
.profile-section .push-reminders__status {
  margin-left: 0;
  margin-right: 0;
}
.profile-section .push-reminders__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.profile-section .push-reminders__actions .btn {
  border-radius: 10px;
}
.profile-section .push-reminders__meta {
  font-size: 0.78rem;
  color: var(--color-text-secondary, #6b5058);
  margin-top: 0.35rem;
}

/* ── Modo focus toggle dentro de la section ── */
#dailyFocusSettingsCard .push-reminders__intro {
  font-size: 0.82rem;
  color: var(--color-text-secondary, #6b5058);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}
#dailyFocusSettingsCard .form__hint {
  font-size: 0.73rem;
  color: var(--color-text-secondary, #6b5058);
  margin-top: 0.5rem;
}

/* ── Volumen chart en perfil ── */
#profileVolumeCard .live-volume__eyebrow {
  display: none;
}
#profileVolumeCard .live-volume__tonnage--profile {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 800;
  color: var(--color-accent, #5C2430);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.35rem 0 0.75rem;
}

/* ── Responsive mobile ── */
@media (max-width: 480px) {
  .profile-hero__card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .profile-hero__name {
    white-space: normal;
  }
  .profile-hero__stats {
    justify-content: center;
  }
  .theme-settings__grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1rem 1rem;
  }
  #themeSettingsCard .theme-settings__intro {
    padding: 0 1rem;
  }
  .profile-section__header {
    padding: 1rem 1rem 0;
  }
  .profile-section > .card__body {
    padding: 0.75rem 1rem 1rem;
  }
  .profile-connections__item {
    padding: 0.8rem 1rem;
  }
}

@media (min-width: 600px) {
  .theme-settings__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Marketing & Retention Features (068) ── */

/* Feature #1 · Streak milestones */
.streak-milestones__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.streak-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: rgba(124,106,245,0.12);
  border: 1.5px solid rgba(124,106,245,0.3);
  color: var(--color-accent-light, #a89af8);
}
.streak-milestone-badge--gold {
  background: rgba(234,179,8,0.12);
  border-color: rgba(234,179,8,0.35);
  color: #ca9f0a;
}
@keyframes badge-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.streak-milestones__empty {
  font-size: 13px;
  color: var(--color-text-muted, #888);
}

/* Feature #3 · PR celebration overlay */
.pr-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.3s ease;
}
.pr-celebration-overlay[hidden] { display: none; }
.pr-celebration-card {
  background: var(--color-surface, #1c1c26);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
}
.pr-celebration__emoji { font-size: 56px; line-height: 1; margin-bottom: 16px; }
.pr-celebration__title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.pr-celebration__subtitle {
  font-size: 15px;
  color: var(--color-text-muted, #888);
  margin-bottom: 20px;
}
.pr-celebration__weight {
  font-size: 36px;
  font-weight: 900;
  color: var(--color-accent, #5C2430);
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.pr-celebration__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Feature #4 · NPS */
.nps__intro { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.nps__score-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.nps__score-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--color-text, #f0f0f5);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nps__score-btn:hover,
.nps__score-btn[aria-pressed="true"] {
  background: var(--color-accent, #5C2430);
  border-color: var(--color-accent, #5C2430);
  color: #fff;
}
.nps__yn-row { display: flex; gap: 8px; margin-top: 8px; }
.nps__yn-btn[aria-pressed="true"] {
  background: var(--color-accent, #5C2430);
  color: #fff;
  border-color: var(--color-accent, #5C2430);
}
.nps__done { font-size: 14px; color: var(--color-success, #22c55e); margin-top: 8px; }

/* Feature #5 · Renewal */
.renewal__info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.renewal__row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.renewal__label { color: var(--color-text-muted, #888); }
.renewal__value { font-weight: 700; }
.renewal__value--countdown { color: var(--color-accent, #5C2430); }
.renewal__hint { font-size: 12px; color: var(--color-text-muted, #888); }
.renewal__upcoming { display: flex; flex-direction: column; gap: 8px; }
.renewal-upcoming-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  font-size: 13px;
}
.renewal-upcoming-row__days {
  font-weight: 700;
  color: var(--color-warning, #f59e0b);
}

/* Feature #8 · Referrals */
.referral__desc { font-size: 14px; color: var(--color-text-muted, #888); margin-bottom: 16px; }
.referral__link-row { display: flex; gap: 8px; align-items: center; }
.referral__input { flex: 1; font-size: max(16px, 12px); } /* min 16px → evita zoom iOS */
.referral__stats { margin-top: 12px; display: flex; gap: 12px; font-size: 14px; }
.referral__stat { color: var(--color-text-muted, #888); }
.referral__stat strong { color: var(--color-text, #f0f0f5); }

/* Feature #10 · Testimonials */
.testimonial-opt__intro { font-size: 14px; color: var(--color-text-muted, #888); margin-bottom: 16px; }
.testimonial-opt__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
}
.testimonial-opt__check .form__label { margin: 0; font-size: 13px; }
.testimonial-opt__saved { font-size: 13px; color: var(--color-success, #22c55e); }

/* Weekly summary preview */
.weekly-summary__preview {
  margin: 12px 0;
  padding: 16px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  border-radius: 12px;
  border-left: 3px solid var(--color-accent, #5C2430);
}
.weekly-summary__text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.weekly-summary__status { font-size: 13px; margin-top: 8px; }

/* Demo invitations list */
.demo-invites__list { display: flex; flex-direction: column; gap: 8px; }

/* ── _17-session-v2.css ── */
.demo-invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  font-size: 13px;
}
.demo-invite-row__email { font-weight: 600; }
.demo-invite-row__status {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Coach testimonials approval */
.coach-testimonial-approval {
  padding: 14px;
  border-radius: 12px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  margin-bottom: 10px;
}
.coach-testimonial-approval__name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.coach-testimonial-approval__data { font-size: 13px; color: var(--color-text-muted, #888); margin-bottom: 12px; }
.coach-testimonial-approval__actions { display: flex; gap: 8px; }

/* ── End Marketing & Retention ── */

/* ════════════════════════════════════════════════════════════════════════════
   NUEVAS FEATURES COACH — oct 2026
   1. Notas privadas  2. Alertas check-in  3. Nutrición rápida
   4. Plantillas mesociclos  5. Informe mensual
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 3. Nutrición rápida en check-in diario ─────────────────────────────── */
.habits__nutrition-quick {
  margin-top: 4px;
}
.habits__nutrition-note {
  margin-top: 10px;
  font-size: 14px;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  color: var(--color-text, #fff);
  width: 100%;
}
.habits__nutrition-note::placeholder { color: var(--color-text-muted, #888); }

/* ── 1. Notas privadas del coach ─────────────────────────────────────────── */
.coach-private-notes__athlete-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.coach-private-notes__hint {
  font-size: 13px;
  color: var(--color-text-muted, #888);
  margin-bottom: 16px;
  line-height: 1.5;
}
.coach-private-notes__textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
}
.coach-private-notes__counter {
  font-size: 11px;
  color: var(--color-text-muted, #888);
  text-align: right;
  margin-top: 4px;
}

/* ── 2. Alertas check-in faltante ────────────────────────────────────────── */
.coach-missing-checkins {
  background: var(--color-surface-1, rgba(255,255,255,0.03));
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.coach-missing-checkins__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.coach-missing-checkins__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted, #888);
  margin-bottom: 2px;
}
.coach-missing-checkins__title {
  font-size: 16px;
  font-weight: 700;
}
.coach-missing-checkins__badge {
  background: var(--color-warning, #f97316);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 10px;
  min-width: 28px;
  text-align: center;
}
.coach-missing-checkins__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coach-missing-checkins__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  border-left: 3px solid transparent;
}
.coach-missing-checkins__name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}
.coach-missing-checkins__days {
  font-size: 12px;
  color: var(--color-text-muted, #888);
  white-space: nowrap;
}

/* ── 4. Banco de plantillas de mesociclos ───────────────────────────────── */
.plan-templates__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.plan-templates__filter {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--color-text-muted, #888);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.plan-templates__filter:hover,
.plan-templates__filter.is-active {
  background: var(--color-accent, #6366f1);
  border-color: var(--color-accent, #6366f1);
  color: #fff;
}
.plan-templates__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-templates__empty {
  font-size: 14px;
  color: var(--color-text-muted, #888);
  padding: 20px 0;
  text-align: center;
}
.plan-templates__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: var(--color-surface-2, rgba(255,255,255,0.04));
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  transition: border-color 0.15s;
}
.plan-templates__item:hover { border-color: var(--color-border-hover, rgba(255,255,255,0.2)); }
.plan-templates__item-main { flex: 1; min-width: 0; }
.plan-templates__item-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-templates__item-meta {
  font-size: 12px;
  color: var(--color-text-muted, #888);
  margin-bottom: 4px;
  text-transform: capitalize;
}
.plan-templates__item-desc {
  font-size: 13px;
  color: var(--color-text-secondary, #aaa);
  line-height: 1.4;
  margin-bottom: 6px;
}
.plan-templates__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.plan-templates__tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-surface-3, rgba(255,255,255,0.08));
  color: var(--color-text-muted, #888);
}
.plan-templates__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.plan-templates__badge--global {
  background: var(--color-accent, #6366f1);
  color: #fff;
}
.plan-templates__badge--mine {
  background: var(--color-success-dim, rgba(34,197,94,0.15));
  color: var(--color-success, #22c55e);
}
.plan-templates__item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.plan-template-editor__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 0;
}
.plan-template-editor__json {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
}
.plan-template-editor__add-day {
  margin-top: 8px;
}
.legal-modal__dialog--wide {
  max-width: 680px;
}

/* ── 5. Informe mensual: botón PDF en cartera ───────────────────────────── */
[data-monthly-pdf] .btn__spinner { display: none; }
[data-monthly-pdf].is-loading .btn__spinner { display: inline-block; }
[data-monthly-pdf].is-loading .btn__text { opacity: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   NULLUM BRAND MARKS — logo marks & watermarks sistema completo
   ════════════════════════════════════════════════════════════════════════════ */

/* ── PANEL HEADER LOGO MARK ───────────────────────────────────────────────── */
.panel__header-logo {
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  object-fit: contain;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}

/* ── NAV PILL (hero landing) ──────────────────────────────────────────────── */
.nlm-nav__logo-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.18));
}

/* ── HERO LOGO WATERMARK — centrado, fondo ────────────────────────────────── */
.nlm-hero__logo-wm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.nlm-hero__logo-wm img {
  width: min(320px, 68vw);
  height: auto;
  opacity: 0.06;
  mix-blend-mode: multiply;
  animation: heroWmPulse 12s ease-in-out infinite alternate;
}
html[data-theme-mode="dark"] .nlm-hero__logo-wm img {
  opacity: 0.09;
  mix-blend-mode: screen;
}
@keyframes heroWmPulse {
  from { transform: scale(1) rotate(-2deg); }
  to   { transform: scale(1.03) rotate(0deg); }
}

/* ── SIDEBAR LOGO MARK ────────────────────────────────────────────────────── */
.sidebar__logo-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.sidebar__logo:hover .sidebar__logo-mark,
.sidebar__logo:focus-visible .sidebar__logo-mark {
  transform: scale(1.12) rotate(-4deg);
}
/* Dark themes: cambiar a logo blanco */
html[data-theme-mode="dark"] .sidebar__logo-mark {
  content: url('../assets/logo-blanco.png');
}

/* ── TOPBAR LOGO MARK ─────────────────────────────────────────────────────── */
.topbar__logo-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}
.topbar__greeting:hover .topbar__logo-mark,
.topbar__greeting:focus-visible .topbar__logo-mark {
  opacity: 1;
  transform: scale(1.1);
}
html[data-theme-mode="dark"] .topbar__logo-mark {
  content: url('../assets/logo-blanco.png');
}

/* ── LOGIN MODAL LOGO MARK ────────────────────────────────────────────────── */
.auth-login-modal__logo-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── ABOUT PANEL WATERMARK (reemplaza SVG N) ──────────────────────────────── */
.about-bg__wm--img {
  position: absolute !important;
  right: -6%;
  bottom: -8%;
  width: 55%;
  max-width: 280px;
  height: auto;
  opacity: 0.11;
  filter: drop-shadow(0 0 40px rgba(92, 36, 48, 0.3));
  animation: aboutWmFloat 14s ease-in-out infinite alternate;
  pointer-events: none;
  user-select: none;
}
html[data-theme-mode="dark"] .about-bg__wm--img {
  opacity: 0.14;
  filter: drop-shadow(0 0 40px rgba(160, 60, 80, 0.4)) brightness(1.1);
}

/* ── PANEL WATERMARKS (todas las secciones interior) ─────────────────────── */
/* Cada panel principal muestra el logo en esquina inferior derecha muy sutil */
.panel--active::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 160px;
  height: 160px;
  background-image: url('assets/logo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-8deg);
  transition: opacity 0.4s;
}
html[data-theme-mode="dark"] .panel--active::after {
  background-image: url('../assets/logo-blanco.png');
  opacity: 0.04;
}
/* About panel no necesita el ::after porque ya tiene watermark propio */
#panelAbout.panel--active::after {
  display: none;
}

/* ── PANEL HEADERS — nota: ::before y ::after ya usados por gradientes de orbes.
   El logo de panel header se omite para no interferir con el sistema de temas. ── */

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .nlm-hero__logo-wm img {
    width: min(280px, 80vw);
  }
  .about-bg__wm--img {
    max-width: 200px;
  }
}

/* ==========================================================================
   NULLUM LANDING REDESIGN — nlm-landing
   ========================================================================== */

/* ── Variables locales ── */
#screenAuth .nlm-landing {
  --nl-wine:    #5C2430;
  --nl-wine2:   #3D1620;
  --nl-bg:      #FAF8F6;
  --nl-bg2:     #F3EFE9;
  --nl-text:    #1A1A1A;
  --nl-muted:   #6B5B62;
  --nl-border:  rgba(92,36,48,.12);
  --nl-yes:     #1A5C35;
  --nl-no:      #5C2430;
  --nl-radius:  16px;
  --nl-pad:     clamp(1.25rem, 5vw, 2rem);
}

/* ── Contenedor general ── */
#screenAuth .nlm-landing {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--nl-bg);
}

/* ── Sección base ── */
#screenAuth .nlm-land-intro,
#screenAuth .nlm-tabs,
#screenAuth .nlm-faq-block,
#screenAuth .auth-spot {
  padding: clamp(2.5rem, 8vw, 4rem) var(--nl-pad);
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Separadores visuales ── */
#screenAuth .nlm-tabs,
#screenAuth .nlm-faq-block,
#screenAuth .auth-spot {
  border-top: 1px solid var(--nl-border);
}

/* ────────────────────────────────────────
   INTRO
   ──────────────────────────────────────── */
#screenAuth .nlm-land-intro__title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--nl-wine);
  margin: 0.5rem 0 1rem;
  letter-spacing: -0.02em;
}
#screenAuth .nlm-land-intro__sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nl-muted);
  margin: 0 0 2rem;
}

/* Stats */
#screenAuth .nlm-stats {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 1.5rem 0 0;
  margin: 0;
  flex-wrap: wrap;
  border-top: 1px solid var(--nl-border);
}
#screenAuth .nlm-stat {
  flex: 1;
  min-width: 90px;
  background: white;
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
#screenAuth .nlm-stat__val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--nl-wine);
  line-height: 1.1;
}
#screenAuth .nlm-stat__lbl {
  display: block;
  font-size: 0.73rem;
  color: var(--nl-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ────────────────────────────────────────
   TABS EXPLORER
   ──────────────────────────────────────── */
#screenAuth .nlm-tabs {
  padding-top: clamp(2.5rem, 8vw, 4rem);
}

/* Rail */
#screenAuth .nlm-tabs__rail {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;}
#screenAuth .nlm-tabs__rail::-webkit-scrollbar { display: none; }

/* Tab buttons */
#screenAuth .nlm-tabs__btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--nl-border);
  background: white;
  color: var(--nl-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
  min-height: 40px;
}
#screenAuth .nlm-tabs__btn:hover {
  border-color: var(--nl-wine);
  color: var(--nl-wine);
}
#screenAuth .nlm-tabs__btn.is-active {
  background: var(--nl-wine);
  color: white;
  border-color: var(--nl-wine);
}

/* Panels */
#screenAuth .nlm-tabs__panel {
  animation: nlm-tab-in 0.22s ease;
}
@keyframes nlm-tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Para quién ── */
#screenAuth .nlm-fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  #screenAuth .nlm-fit-grid { grid-template-columns: 1fr; }
}
#screenAuth .nlm-fit-col {
  background: var(--nl-bg2);
  border-radius: var(--nl-radius);
  padding: 1.25rem;
  border: 1px solid var(--nl-border);
}
#screenAuth .nlm-fit-col__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
#screenAuth .nlm-fit-col--yes { background: #f0f9f4; }
#screenAuth .nlm-fit-col--yes .nlm-fit-col__label { color: var(--nl-yes); }
#screenAuth .nlm-fit-col--no  .nlm-fit-col__label { color: var(--nl-no); }
#screenAuth .nlm-fit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
#screenAuth .nlm-fit-list li {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--nl-text);
  padding-left: 1.4em;
  position: relative;
}
#screenAuth .nlm-fit-col--yes .nlm-fit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--nl-yes);
  font-weight: 700;
}
#screenAuth .nlm-fit-col--no .nlm-fit-list li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--nl-no);
  font-weight: 700;
}

/* ── vs Apps ── */
#screenAuth .nlm-vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  #screenAuth .nlm-vs-grid { grid-template-columns: 1fr; }
}
#screenAuth .nlm-vs-col {
  border-radius: var(--nl-radius);
  padding: 1.25rem;
  border: 1px solid var(--nl-border);
}
#screenAuth .nlm-vs-col--them {
  background: #F8F3F4;
  opacity: 0.85;
}
#screenAuth .nlm-vs-col--us {
  background: var(--nl-wine);
  color: white;
}
#screenAuth .nlm-vs-col__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
#screenAuth .nlm-vs-col--them .nlm-vs-col__label { color: var(--nl-muted); }
#screenAuth .nlm-vs-col--us  .nlm-vs-col__label { color: rgba(255,255,255,.7); }
#screenAuth .nlm-vs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
#screenAuth .nlm-vs-list li {
  font-size: 0.9rem;
  line-height: 1.45;
  padding-left: 1.4em;
  position: relative;
}
#screenAuth .nlm-vs-col--them .nlm-vs-list li { color: var(--nl-muted); }
#screenAuth .nlm-vs-col--them .nlm-vs-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--nl-muted);
}
#screenAuth .nlm-vs-col--us .nlm-vs-list li { color: rgba(255,255,255,.92); }
#screenAuth .nlm-vs-col--us .nlm-vs-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: rgba(255,255,255,.75);
  font-weight: 700;
}

/* ── Coach card ── */



/* ── Qué incluye ── */

/* ────────────────────────────────────────
   PRECIO
   ──────────────────────────────────────── */

/* ────────────────────────────────────────
   TIERS DE PRECIO — paleta clara coherente
   ──────────────────────────────────────── */

@keyframes tierFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

#screenAuth .nlm-tiers {
  padding: 0;
  position: relative;
}


/* ── Eyebrow ── */
#screenAuth .nlm-tiers__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nl-wine);
  margin: 0 0 0.6rem;
}

#screenAuth .nlm-tiers__title {
  font-size: clamp(1.6rem, 5.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  color: var(--nl-text);
}

#screenAuth .nlm-tiers__sub {
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--nl-muted);
  margin: 0 0 2rem;
  max-width: 480px;
}

#screenAuth .nlm-tiers__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 720px) {
  #screenAuth .nlm-tiers__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

/* ── Card base ── */
#screenAuth .nlm-tier {
  position: relative;
  border: 1.5px solid var(--nl-border);
  border-radius: var(--nl-radius);
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: #fff;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  /* entrada animada */
  opacity: 0;
  transform: translateY(22px);
}
#screenAuth .nlm-tiers.is-visible .nlm-tier,
#screenAuth .auth-land__reveal.is-visible .nlm-tier {
  animation: tierFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
#screenAuth .nlm-tiers.is-visible .nlm-tier:nth-child(1),
#screenAuth .auth-land__reveal.is-visible .nlm-tier:nth-child(1) { animation-delay: 0.06s; }
#screenAuth .nlm-tiers.is-visible .nlm-tier:nth-child(2),
#screenAuth .auth-land__reveal.is-visible .nlm-tier:nth-child(2) { animation-delay: 0.16s; }
#screenAuth .nlm-tiers.is-visible .nlm-tier:nth-child(3),
#screenAuth .auth-land__reveal.is-visible .nlm-tier:nth-child(3) { animation-delay: 0.26s; }

#screenAuth .nlm-tier:hover {
  border-color: rgba(92,36,48,0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(92,36,48,0.1);
}

/* ── Card FEATURED (Pro) ── */
#screenAuth .nlm-tier--featured {
  border-color: var(--nl-wine);
  border-width: 2px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(92,36,48,0.12);
  padding-top: 2.5rem;
}
#screenAuth .nlm-tier--featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(92,36,48,0.18);
}

/* ── Badge ── */
#screenAuth .nlm-tier__badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nl-wine);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(92,36,48,0.35);
}

/* ── Nombre del plan ── */
#screenAuth .nlm-tier__name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--nl-muted);
  margin: 0;
}
#screenAuth .nlm-tier--featured .nlm-tier__name {
  color: var(--nl-wine);
}

/* ── Precio ── */
#screenAuth .nlm-tier__price {
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--nl-text);
  margin-bottom: 0.2rem;
}
#screenAuth .nlm-tier__currency {
  font-size: 0.55em;
  vertical-align: super;
  font-weight: 700;
  color: var(--nl-wine);
}
#screenAuth .nlm-tier__unit {
  font-size: 0.38em;
  font-weight: 500;
  color: var(--nl-muted);
  vertical-align: baseline;
}

/* ── Tagline ── */
#screenAuth .nlm-tier__tagline {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--nl-muted);
  margin: 0;
}

/* ── Separador ── */
#screenAuth .nlm-tier__divider {
  height: 1px;
  background: var(--nl-border);
  border: none;
  margin: 0;
}
#screenAuth .nlm-tier--featured .nlm-tier__divider {
  background: rgba(92,36,48,0.15);
}

/* ── Lista features ── */
#screenAuth .nlm-tier__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

#screenAuth .nlm-tier__item {
  font-size: 0.87rem;
  line-height: 1.4;
  padding-left: 1.5rem;
  position: relative;
  color: var(--nl-text);
}

#screenAuth .nlm-tier__item::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.85em;
  font-weight: 800;
}

#screenAuth .nlm-tier__item--yes::before {
  content: "✓";
  color: var(--nl-wine);
}

/* ── CTA ── */
#screenAuth .nlm-tier__cta {
  display: block;
  text-align: center;
  padding: 0.8rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  margin-top: auto;
}

#screenAuth .btn--outline.nlm-tier__cta {
  border: 1.5px solid rgba(92,36,48,0.3);
  color: var(--nl-wine);
  background: transparent;
}
#screenAuth .btn--outline.nlm-tier__cta:hover,
#screenAuth .btn--outline.nlm-tier__cta:focus-visible {
  border-color: var(--nl-wine);
  background: rgba(92,36,48,0.05);
  transform: translateY(-1px);
}

#screenAuth .btn--primary.nlm-tier__cta {
  background: var(--nl-wine);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(92,36,48,0.3);
}
#screenAuth .btn--primary.nlm-tier__cta:hover,
#screenAuth .btn--primary.nlm-tier__cta:focus-visible {
  background: var(--nl-wine2);
  box-shadow: 0 8px 24px rgba(92,36,48,0.4);
  transform: translateY(-2px);
}

/* ── Escasez de plazas ── */
#screenAuth .nlm-tier__scarcity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--nl-wine);
  font-weight: 600;
  background: rgba(92,36,48,0.06);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}
#screenAuth .nlm-tier__scarcity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nl-wine);
  flex-shrink: 0;
  animation: scarcityPulse 1.8s ease-in-out infinite;
}
@keyframes scarcityPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.35); }
}


/* ────────────────────────────────────────
   FAQ
   ──────────────────────────────────────── */
#screenAuth .nlm-faq-block__title {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 800;
  color: var(--nl-wine);
  margin: 0.4rem 0 1.5rem;
  letter-spacing: -0.02em;
}
#screenAuth .nlm-faq-block__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#screenAuth .nlm-faq-item {
  background: white;
  border: 1px solid var(--nl-border);
  border-radius: 12px;
  overflow: hidden;
}
#screenAuth .nlm-faq-item[open] {
  border-color: rgba(92,36,48,.25);
}
#screenAuth .nlm-faq-item__q {
  list-style: none;
  padding: 1rem 1.1rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--nl-text);
  cursor: pointer;
  position: relative;
  padding-right: 2.5rem;
  user-select: none;
}
#screenAuth .nlm-faq-item__q::-webkit-details-marker { display: none; }
#screenAuth .nlm-faq-item__q::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  font-size: 1.1rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--nl-wine);
  border-bottom: 2px solid var(--nl-wine);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

/* ── _18-nlm.css ── */
/* ================================================================
   NLM HERO — Minimal animated landing (2025 redesign)
   Fondo blanco perla · Bordeaux titulares · Mobile-first
   ================================================================ */

/* ── Keyframes ── */
@keyframes nlm-fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nlm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes nlm-orb-drift-1 {
  0%, 100% { transform: translate(0, 0) rotate(14deg); }
  50%       { transform: translate(10px, -14px) rotate(18deg); }
}
@keyframes nlm-orb-drift-2 {
  0%, 100% { transform: translate(0, 0) rotate(-9deg); }
  50%       { transform: translate(-8px, 10px) rotate(-13deg); }
}
@keyframes nlm-scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50%       { transform: scaleY(1.45); opacity: 1; }
}
@keyframes nlm-pill-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nlm-step-in {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nlm-wordmark-draw {
  from { letter-spacing: 0.5em; opacity: 0; }
  to   { letter-spacing: normal; opacity: 1; }
}

/* ── Hero wrapper ── */
.nlm-hero {
  position: relative;
  background: #FAF8F6;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* Evita scroll horizontal por wordmark/orbs que desbordan en móvil estrecho */
}

/* ── Rejilla técnica — "estructuras de datos expuestas" (Guía 01), nunca orbes blandos ── */
.nlm-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(92,36,48,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,36,48,0.055) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.022'/%3E%3C/svg%3E");
  background-size: 40px 40px, 40px 40px, 300px 300px;
  mask-image: radial-gradient(120% 70% at 50% 30%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 70% at 50% 30%, #000 40%, transparent 85%);
}

/* ── Marcos técnicos — rectángulos huecos, sin relleno ni blur. Firma neofuturista. ── */
.nlm-orb {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border: 1.5px solid rgba(92,36,48,0.22);
}
.nlm-orb--1 {
  width: 220px;
  height: 220px;
  top: 64px;
  right: -64px;
  transform: rotate(14deg);
  animation: nlm-orb-drift-1 11s ease-in-out infinite;
}
.nlm-orb--1::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(92,36,48,0.14);
}
.nlm-orb--2 {
  width: 140px;
  height: 140px;
  bottom: 12%;
  left: -48px;
  transform: rotate(-9deg);
  border-color: rgba(26,26,26,0.14);
  animation: nlm-orb-drift-2 13s ease-in-out infinite;
}

/* ── Nav pill flotante — se "solidifica" al hacer scroll (ver nullumBrutalist.js) ── */
.nlm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: max(18px, env(safe-area-inset-top)) 22px 14px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  border-radius: 0;
  box-shadow: none;
  transition: background var(--transition-fast, 200ms), border-color var(--transition-fast, 200ms), box-shadow var(--transition-fast, 200ms), padding var(--transition-fast, 200ms);
  animation: nlm-fade-in 0.6s 0.2s both ease-out;
}
/* Sin backdrop-filter aquí a propósito: en una barra fixed de ancho completo,
   desenfocar en cada frame de scroll es carísimo en iOS Safari y puede
   colgar/entrecortar el gesto táctil (reproducido en un iPhone real — el
   scroll se congelaba siempre en el mismo punto). El fondo casi opaco
   cumple la misma función visual de "solidificarse" sin ese coste. */
.nlm-nav.is-scrolled {
  background: rgba(250,248,246,0.97);
  border-bottom-color: rgba(92,36,48,0.16);
  box-shadow: 0 4px 18px rgba(26,26,26,0.06);
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 12px;
}
.nlm-nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #1A1A1A;
  letter-spacing: 0.005em;
  line-height: 1;
  white-space: nowrap;
}
.nlm-nav__logo-accent {
  color: #5C2430;
}
.nlm-nav__cta {
  background: #5C2430;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 1rem;
  cursor: pointer;
  transition: background 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}
.nlm-nav__cta:hover {
  background: #471B24;
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(92,36,48,0.3);
}

/* ── Above the fold ── */
.nlm-hero__above {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(90px, calc(env(safe-area-inset-top) + 80px)) 24px 4rem;
  text-align: center;
  gap: 0;
}

/* ── Wordmark — mayúsculas, ultra-bold, acento con sombra dura escalonada ── */
.nlm-hero__wordmark {
  margin: 0 0 0.75rem;
  font-family: 'Plus Jakarta Sans', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(3.2rem, 12vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  animation: nlm-wordmark-draw 0.7s 0.3s both ease-out;
}

/* ── Fila de CTAs — primario + secundario ── */
.nlm-hero__cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ── CTA principal — misma firma brutalista que .btn--primary: sombra dura, sin blur ── */
.nlm-btn-primary {
  --magnet-x: 0px;
  --magnet-y: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #5C2430;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: var(--track-cta, 0.14em);
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 4px 4px 0 0 #1A1A1A;
  position: relative;
  overflow: hidden;
}
.nlm-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.nlm-btn-primary:hover {
  background: #471B24;
  transform: translate(calc(-2px + var(--magnet-x)), calc(-2px + var(--magnet-y)));
  box-shadow: 6px 6px 0 0 #1A1A1A;
}
.nlm-btn-primary:active {
  transform: translate(calc(2px + var(--magnet-x)), calc(2px + var(--magnet-y))) scale(0.98);
  box-shadow: 1px 1px 0 0 #1A1A1A;
}
.nlm-btn-ghost {
  background: transparent;
  color: #7A5560;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color 150ms ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nlm-btn-ghost:hover {
  color: #5C2430;
}


/* ── Reveal animations (JS-triggered) ── */
.nlm-reveal {
  opacity: 0;
}
.nlm-reveal.is-visible {
  animation: nlm-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nlm-reveal[data-nlm-delay="0"].is-visible { animation-delay: 0.05s; }
.nlm-reveal[data-nlm-delay="1"].is-visible { animation-delay: 0.2s; }
.nlm-reveal[data-nlm-delay="2"].is-visible { animation-delay: 0.38s; }
.nlm-reveal[data-nlm-delay="3"].is-visible { animation-delay: 0.54s; }

/* ── Below the fold ── */
.nlm-hero__below {
  position: relative;
  z-index: 1;
  padding: 3.5rem 24px max(3rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  border-top: 1px solid rgba(92,36,48,0.10);
  background: #FAFAF8;
}

/* ── Pills ── */
.nlm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.8rem;
}
.nlm-pill {
  background: rgba(92,36,48,0.07);
  color: #5C2430;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(92,36,48,0.15);
  opacity: 0;
}
.nlm-pill.is-visible {
  animation: nlm-pill-in 0.5s ease-out both;
}
.nlm-pill:nth-child(1).is-visible { animation-delay: 0.0s; }
.nlm-pill:nth-child(2).is-visible { animation-delay: 0.08s; }
.nlm-pill:nth-child(3).is-visible { animation-delay: 0.16s; }
.nlm-pill:nth-child(4).is-visible { animation-delay: 0.24s; }

/* ── Steps ── */
.nlm-step.is-visible {
  animation: nlm-step-in 0.55s ease-out both;
}
.nlm-step:nth-child(1).is-visible { animation-delay: 0.05s; }
.nlm-step:nth-child(2).is-visible { animation-delay: 0.2s; }
.nlm-step:nth-child(3).is-visible { animation-delay: 0.35s; }

/* ── Below CTA block ── */
.nlm-hero__below-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
  opacity: 0;
}
.nlm-hero__below-cta.is-visible {
  animation: nlm-fade-up 0.6s 0.4s ease-out both;
}
.nlm-hero__below-login {
  opacity: 0;
}
.nlm-hero__below-login.is-visible {
  animation: nlm-fade-in 0.5s 0.6s ease-out both;
}

/* ── Step-reveal (scroll observer) ── */
.nlm-step-reveal { opacity: 0; }

/* ── Responsive tweaks ── */
@media (max-width: 390px) {
  /* iPhone SE / Android estrecho: wordmark más pequeño para evitar solapamiento con proof row y CTA */
  .nlm-hero__wordmark { font-size: clamp(2.5rem, 10vw, 3rem); }
  .nlm-hero__proof { justify-content: center; flex-wrap: wrap; }
}
@media (min-width: 480px) {
  .nlm-hero__above { gap: 0; }
}
@media (min-width: 768px) {
  .nlm-orb--1 { width: 400px; height: 400px; top: -100px; right: -100px; }
  .nlm-orb--2 { width: 320px; height: 320px; }
  .nlm-hero__below { padding: 5rem 40px 4rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .nlm-orb,
  .nlm-reveal.is-visible,
  .nlm-pill.is-visible,
  .nlm-step.is-visible,
  .nlm-hero__below-cta.is-visible,
  .nlm-hero__below-login.is-visible,
  .nlm-fx-orb-wrap,
  .nlm-fx-orb-a,
  .nlm-fx-orb-b {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ================================================================
   NLM v2 — Split-char hero · Editorial How-It-Works
   ================================================================ */

/* ── Split-character keyframe ── */
@keyframes nlm-char-up {
  from {
    opacity: 0;
    transform: translateY(55%) skewX(-4deg);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewX(0);
    filter: blur(0);
  }
}

/* Each character in the wordmark */
.nlm-char {
  display: inline-block;
  opacity: 0;
  animation: nlm-char-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.12s + var(--ci, 0) * 0.065s);
  will-change: transform, opacity;
}
.nlm-char--accent {
  color: #5C2430;
}

/* h1 reset — wordmark is the h1 now */
.nlm-hero__wordmark {
  margin: 0 0 0.6rem;
  font-family: 'Plus Jakarta Sans', 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  /* no animation on the wrapper — chars do it */
}

/* ── Proof row ── */
.nlm-hero__proof {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.6rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8A5560;
  letter-spacing: var(--track-eyebrow, 0.2em);
  text-transform: uppercase;
}
.nlm-proof-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #5C2430;
  border-radius: 50%;
  animation: nlm-scroll-pulse 2s 2s ease-in-out infinite;
}
.nlm-proof-item { white-space: nowrap; }

/* ── Active tap scale on primary CTA ── */
.nlm-btn-primary:active {
  transform: translate(calc(2px + var(--magnet-x)), calc(2px + var(--magnet-y))) scale(0.97) !important;
  box-shadow: 1px 1px 0 0 #1A1A1A !important;
}

/* ── nlm-hero__below — slim pill teaser only ── */
.nlm-hero__below {
  padding: 1.8rem 24px 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  border-top: 1px solid rgba(92,36,48,0.09);
  background: #FAFAF8;
}

/* ── restored boundary: content continued after engagement scramble ── */

#screenAuth .nlm-faq-item[open] .nlm-faq-item__q::after {
  content: "";
  transform: translateY(-30%) rotate(-135deg);
}
#screenAuth .nlm-faq-item__a {
  padding: 0.1rem 1.1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--nl-muted);
  margin: 0;
  border-top: 1px solid var(--nl-border);
  padding-top: 0.75rem;
}

/* ────────────────────────────────────────
   COACH SECTION (standalone, visible)
   ──────────────────────────────────────── */
#screenAuth .nlm-coach-section {
  background: white;
  border-top: 1px solid var(--nl-border);
  border-bottom: 1px solid var(--nl-border);
  padding: clamp(2.5rem, 8vw, 4rem) var(--nl-pad);
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}
#screenAuth .nlm-coach-section__card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
#screenAuth .nlm-coach-section__fig {
  flex-shrink: 0;
  margin: 0;
}
#screenAuth .nlm-coach-section__fig img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(92,36,48,.22);
  box-shadow: 0 4px 16px rgba(92,36,48,.12);
}
#screenAuth .nlm-coach-section__body { flex: 1; min-width: 0; }
#screenAuth .nlm-coach-section__name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--nl-wine);
  margin: 0 0 0.1rem;
}
#screenAuth .nlm-coach-section__role {
  font-size: 0.8rem;
  color: var(--nl-muted);
  margin: 0 0 0.85rem;
}
#screenAuth .nlm-coach-section__story {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--nl-text);
  font-style: italic;
  border-left: 3px solid var(--nl-wine);
  padding-left: 0.85rem;
  margin: 0 0 1rem;
}
#screenAuth .nlm-coach-section__creds {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
#screenAuth .nlm-coach-section__creds li {
  font-size: 0.82rem;
  color: var(--nl-muted);
  padding-left: 1.1em;
  position: relative;
}
#screenAuth .nlm-coach-section__creds li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--nl-wine);
  font-weight: 700;
}
#screenAuth .nlm-coach-section__links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
#screenAuth .nlm-coach-section__link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nl-wine);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--nl-wine);
  border-radius: 100px;
  transition: background .15s, color .15s;
}
#screenAuth .nlm-coach-section__link:hover {
  background: var(--nl-wine);
  color: white;
}
#screenAuth .nlm-coach-section__link--wa {
  background: rgba(37,211,102,.09);
  color: #1a5c35;
  border-color: rgba(37,211,102,.4);
}
#screenAuth .nlm-coach-section__link--wa:hover {
  background: rgba(37,211,102,.18);
  border-color: rgba(37,211,102,.65);
  color: #14472a;
}
@media (max-width: 520px) {
  #screenAuth .nlm-coach-section__card { flex-direction: column; align-items: center; text-align: center; }
  #screenAuth .nlm-coach-section__story { text-align: left; }
  #screenAuth .nlm-coach-section__creds { align-items: flex-start; }
  #screenAuth .nlm-coach-section__links { justify-content: center; }
}

/* ────────────────────────────────────────
   INCLUDES SECTION (visible grid)
   ──────────────────────────────────────── */
#screenAuth .nlm-includes-section {
  padding: clamp(2.5rem, 8vw, 4rem) var(--nl-pad);
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--nl-border);
}
#screenAuth .nlm-includes-section__title {
  font-size: clamp(1.3rem, 4.5vw, 1.7rem);
  font-weight: 800;
  color: var(--nl-wine);
  margin: 0.4rem 0 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
#screenAuth .nlm-includes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 480px) {
  #screenAuth .nlm-includes-grid { grid-template-columns: 1fr; }
}
#screenAuth .nlm-include-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.35rem;
  background: white;
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  padding: 1rem 1rem 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}
#screenAuth .nlm-include-card:hover {
  border-color: rgba(92,36,48,.28);
  box-shadow: 0 4px 16px rgba(92,36,48,.08);
  transform: translateY(-2px);
}
#screenAuth .nlm-include-card__icon {
  width: 36px;
  height: 36px;
  background: rgba(92,36,48,.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nl-wine);
  margin-bottom: 0.2rem;
}
#screenAuth .nlm-include-card__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nl-text);
  line-height: 1.2;
}
#screenAuth .nlm-include-card__desc {
  font-size: 0.82rem;
  color: var(--nl-muted);
  line-height: 1.4;
}

/* ────────────────────────────────────────
   PRICE RECAP STRIP
   ──────────────────────────────────────── */

/* ────────────────────────────────────────
   COMMITMENT BLOCK
   ──────────────────────────────────────── */
#screenAuth .nlm-commit-block {
  padding: 0 var(--nl-pad) clamp(2.5rem, 8vw, 4rem);
  max-width: 680px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}
#screenAuth .nlm-commit-block__inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--nl-bg2);
  border: 1px solid var(--nl-border);
  border-radius: var(--nl-radius);
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  border-left: 4px solid var(--nl-wine);
}
#screenAuth .nlm-commit-block__icon {
  flex-shrink: 0;
  color: var(--nl-wine);
  margin-top: 2px;
}
#screenAuth .nlm-commit-block__title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--nl-wine);
  margin: 0 0 0.4rem;
}
#screenAuth .nlm-commit-block__copy {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--nl-muted);
  margin: 0;
  font-style: italic;
}

/* ────────────────────────────────────────
   PROCESS STEPS (debajo del form)
   ──────────────────────────────────────── */
#screenAuth .nlm-process-steps {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#screenAuth .nlm-process-step {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
#screenAuth .nlm-process-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nl-wine);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
#screenAuth .nlm-process-step__text {
  font-size: 0.87rem;
  color: var(--nl-muted);
  line-height: 1.4;
}
#screenAuth .nlm-process-step__text strong {
  color: var(--nl-text);
}

/* ────────────────────────────────────────
   TABS JS — inicialización
   ──────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT — Mejoras: optimistic, reply, reactions, unread sep, pending state
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Pending (optimistic) ─────────────────────────────────────────────────── */
.chat__bubble--pending {
  opacity: 0.65;
}
.chat__checks--pending {
  color: var(--color-text-secondary, #999);
  font-size: 0.75rem;
}

/* ── Timestamp tooltip (title via browser native; cursor hint) ──────────── */
.chat__bubble-time {
  cursor: default;
}

/* ── Reply quote (dentro de burbuja) ─────────────────────────────────────── */
.chat__reply-quote {
  border-left: 3px solid currentColor;
  padding: 4px 8px;
  margin-bottom: 6px;
  opacity: 0.7;
  font-size: 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
}
.chat__bubble--mine .chat__reply-quote {
  border-left-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.12);
}
.chat__bubble--theirs .chat__reply-quote {
  border-left-color: var(--color-accent, #007bff);
  background: rgba(0,0,0,0.06);
}
.chat__reply-quote-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Reply preview (en el composer) ─────────────────────────────────────── */
.chat__reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--color-surface-secondary, rgba(0,0,0,0.04));
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.1));
  font-size: 0.8rem;
  color: var(--color-text-secondary, #666);
  min-height: 0;
}
[data-theme-mode="dark"] .chat__reply-preview,
html[data-theme-mode="dark"] .chat__reply-preview {
  background: rgba(255,255,255,0.05);
  border-top-color: rgba(255,255,255,0.1);
}
.chat__reply-preview-icon {
  flex-shrink: 0;
  opacity: 0.6;
}
.chat__reply-preview-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat__reply-preview-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary, #888);
  font-size: 0.9rem;
  padding: 2px 4px;
  line-height: 1;
}
.chat__reply-preview-close:hover { color: var(--color-text-primary, #222); }

/* ── Reactions ───────────────────────────────────────────────────────────── */
.chat__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding: 0 2px 2px;
}
.chat__reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--color-surface-secondary, rgba(0,0,0,0.06));
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.82rem;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s;
  color: inherit;
}
.chat__reaction:hover {
  background: var(--color-surface-tertiary, rgba(0,0,0,0.1));
}
.chat__reaction--mine {
  background: var(--color-accent-light, rgba(0,123,255,0.12));
  border-color: var(--color-accent, #007bff);
}
.chat__reaction-count {
  font-size: 0.75rem;
  opacity: 0.8;
}
[data-theme-mode="dark"] .chat__reaction,
html[data-theme-mode="dark"] .chat__reaction {
  background: rgba(255,255,255,0.08);
}
[data-theme-mode="dark"] .chat__reaction:hover,
html[data-theme-mode="dark"] .chat__reaction:hover {
  background: rgba(255,255,255,0.14);
}

/* ── Reaction picker ────────────────────────────────────────────────────── */
.chat__reaction-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 200;
  animation: reactionPickerIn 0.12s ease;
}
@keyframes reactionPickerIn {
  from { opacity: 0; transform: translateX(-50%) scale(0.85); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
.chat__reaction-picker-emoji {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 2px;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.1s;
}
.chat__reaction-picker-emoji:hover { transform: scale(1.3); }
[data-theme-mode="dark"] .chat__reaction-picker,
html[data-theme-mode="dark"] .chat__reaction-picker {
  background: var(--color-surface-dark, #2a2a2a);
  border-color: rgba(255,255,255,0.15);
}

/* Needed so the picker can position relative to the article */
.chat__bubble { position: relative; }

/* ── Unread separator ───────────────────────────────────────────────────── */
.chat__unread-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin: 4px 0;
}
.chat__unread-sep::before,
.chat__unread-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-accent, #007bff);
  opacity: 0.35;
}
.chat__unread-sep span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent, #007bff);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT — Advanced features v2: edit, pin, broadcast, templates, schedule
   ═══════════════════════════════════════════════════════════════════════════ */

/* Edit bar */
.chat__edit-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 193, 7, 0.12);
  border-top: 1px solid rgba(255, 193, 7, 0.3);
  font-size: 0.8rem; color: var(--color-text-secondary, #666);
}
.chat__edit-bar svg { flex-shrink: 0; color: #c8a000; }
.chat__edit-bar-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat__edit-bar-cancel {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary, #888); font-size: 0.9rem; padding: 2px 4px; line-height: 1;
}
.chat__edit-bar-cancel:hover { color: var(--color-text-primary, #222); }

/* Edited tag */
.chat__edited-tag { font-size: 0.7rem; opacity: 0.55; margin-left: 4px; font-style: italic; }

/* Blue / grey read checks */
.chat__checks { color: var(--color-text-secondary, #999); }
.chat__checks--read { color: #4a90e2; }

/* Pinned bar */
.chat__pinned-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--color-surface-secondary, rgba(0,0,0,0.03));
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.08));
  font-size: 0.8rem; cursor: pointer; color: var(--color-text-secondary, #666);
  transition: background 0.15s;
}
.chat__pinned-bar:hover { background: rgba(0,0,0,0.06); }
.chat__pinned-bar svg { flex-shrink: 0; color: var(--color-accent, #7b3158); }
.chat__pinned-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat__unpin-btn {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary, #999); font-size: 0.85rem; padding: 2px 4px;
}
.chat__unpin-btn:hover { color: var(--color-text-primary, #222); }

/* Broadcast header button */
.chat__broadcast-btn {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary, #888);
  padding: 6px; display: flex; align-items: center;
  border-radius: 50%; transition: background 0.15s, color 0.15s;
}
.chat__broadcast-btn:hover { background: rgba(0,0,0,0.07); color: var(--color-accent, #7b3158); }

/* Broadcast panel */
.chat__broadcast-panel {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.chat__broadcast-inner {
  background: var(--color-surface, #fff); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 460px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.chat__broadcast-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chat__broadcast-header h3 { flex: 1; font-size: 1rem; font-weight: 700; margin: 0; }
.chat__broadcast-close { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--color-text-secondary, #888); padding: 4px; }
.chat__broadcast-desc { font-size: 0.85rem; margin: 0 0 14px; opacity: 0.8; }
.chat__broadcast-textarea {
  width: 100%; border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 10px; padding: 10px 12px; font-size: 0.9rem;
  resize: vertical; min-height: 80px; font-family: inherit;
  background: var(--color-surface, #fff); color: inherit;
}
.chat__broadcast-count { font-size: 0.78rem; opacity: 0.65; margin: 8px 0 14px; }
.chat__broadcast-actions { display: flex; gap: 10px; justify-content: flex-end; }
.chat__broadcast-cancel {
  background: none; border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 0.88rem;
}
.chat__broadcast-send {
  background: var(--color-accent, #7b3158); color: #fff; border: none;
  border-radius: 8px; padding: 8px 18px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
}
.chat__broadcast-send:disabled { opacity: 0.55; cursor: default; }

/* Template / schedule triggers */
.chat__template-trigger, .chat__schedule-trigger {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary, #888); padding: 6px;
  display: flex; align-items: center; border-radius: 50%;
  transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.chat__template-trigger:hover, .chat__schedule-trigger:hover {
  background: rgba(0,0,0,0.07); color: var(--color-accent, #7b3158);
}

/* Template picker */
.chat__template-picker {
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.1));
  background: var(--color-surface, #fff); padding: 8px 0;
  max-height: 260px; overflow-y: auto;
}
.chat__template-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 9px 16px; text-align: left; font-size: 0.87rem;
  color: inherit; transition: background 0.12s;
}
.chat__template-item:hover { background: rgba(0,0,0,0.05); }
.chat__template-icon { font-size: 1.1rem; flex-shrink: 0; }
.chat__template-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Schedule modal */
.chat__schedule-modal {
  position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.chat__schedule-modal-inner {
  background: var(--color-surface, #fff); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.chat__schedule-modal-inner h3 { margin: 0 0 6px; font-size: 1rem; }
.chat__schedule-modal-desc { font-size: 0.83rem; opacity: 0.75; margin: 0 0 14px; }
.chat__schedule-textarea {
  width: 100%; border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 10px; padding: 10px 12px; font-size: 0.9rem;
  resize: vertical; font-family: inherit;
  background: var(--color-surface, #fff); color: inherit; margin-bottom: 10px;
}
.chat__schedule-date {
  width: 100%; border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 10px; padding: 9px 12px; font-size: 0.88rem;
  font-family: inherit; background: var(--color-surface, #fff); color: inherit; margin-bottom: 16px;
}
.chat__schedule-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.chat__schedule-cancel {
  background: none; border: 1px solid var(--color-border, rgba(0,0,0,0.15));
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 0.88rem;
}
.chat__schedule-confirm {
  background: var(--color-accent, #7b3158); color: #fff; border: none;
  border-radius: 8px; padding: 8px 18px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
}

/* Enriched context menu */
.chat__bubble-menu { min-width: 160px; }

/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  NULLUM CHAT — REDISEÑO PREMIUM v3                                      ║
   ║  Branding: wine/burgundy #5C2430, gold #8B5A3A, dark luxury             ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

/* ── WATERMARK SVG (logo NULLUM centrado, repeat, 12% opacidad) ───────────── */
.chat__messages {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(92,36,48,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(139,90,58,0.04) 0%, transparent 60%),
    var(--color-bg-deep);
  gap: 0.45rem;
  padding: 1.1rem 1rem 0.6rem;
}

/* Logo marca de agua — centrado, grande, baja opacidad */
.chat__messages::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/logo-brand.png') center center / 85% auto no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] .chat__messages::before,
.dark-mode .chat__messages::before {
  opacity: 0.065;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.chat__sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  position: relative;
}
.chat__sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-accent-red) 30%,
    var(--color-accent-gold) 70%,
    transparent 100%
  );
  opacity: 0.22;
  pointer-events: none;
}

.chat__sidebar-head {
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-inset) 100%);
}

.chat__sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chat__sidebar-title::before {
  content: '';
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--color-accent-gold);
  opacity: 0.7;
}

/* ── THREAD ITEMS ────────────────────────────────────────────────────────── */
.chat__thread {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.7rem;
  padding: 0.75rem 1rem 0.75rem 0.9rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s, border-left-color 0.15s;
  position: relative;
}
.chat__thread:hover,
.chat__thread:focus-visible {
  background: var(--color-surface-hover);
  outline: none;
}
.chat__thread--active {
  background: linear-gradient(90deg, var(--color-accent-soft) 0%, transparent 100%);
  border-left: 2px solid var(--color-accent-red);
}

/* Avatar inicial */
.chat__thread::before {
  content: attr(data-initial, '?');
  grid-row: 1 / 3;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-red) 0%, var(--color-accent-gold) 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(92,36,48,0.25);
}
.chat__thread-name {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}
.chat__thread-preview {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat__thread-meta {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
}
.chat__thread-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.chat__unread {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--color-accent-red);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(92,36,48,0.35);
  animation: unreadPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes unreadPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.chat__header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.1rem;
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
}
.chat__header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent-red) 40%, var(--color-accent-gold) 70%, transparent 100%);
  opacity: 0.45;
}

/* Avatar del peer en el header */
.chat__peer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.chat__peer-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chat__peer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.chat__peer-status::before {
  content: '';
  width: 0.42rem; height: 0.42rem;
  border-radius: 50%;
  background: var(--color-text-muted);
  transition: background 0.3s, box-shadow 0.3s;
}
.chat__peer-status[data-live="1"]::before {
  background: #2db551;
  box-shadow: 0 0 0 3px rgba(45,181,81,0.2), 0 0 8px rgba(45,181,81,0.4);
  animation: pulseLive 2s ease infinite;
}
@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,181,81,0.2), 0 0 8px rgba(45,181,81,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(45,181,81,0.08), 0 0 14px rgba(45,181,81,0.3); }
}

.chat__back {
  width: 2.2rem; height: 2.2rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-primary);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, border-color 0.15s;
}
.chat__back:hover { background: var(--color-surface-hover); border-color: var(--color-border-strong); }

/* Header icon buttons */
.chat__search-btn,
.chat__push-btn,
.chat__broadcast-btn {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary);
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.chat__search-btn:hover,
.chat__push-btn:hover,
.chat__broadcast-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}
.chat__push-btn--active { color: var(--color-accent-gold); }

/* ── DAY SEPARATOR ───────────────────────────────────────────────────────── */
.chat__day {
  align-self: center;
  margin: 0.6rem 0 0.3rem;
  padding: 0.22rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── BUBBLES ─────────────────────────────────────────────────────────────── */
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.chat__bubble {
  max-width: min(80%, 440px);
  padding: 0.6rem 0.85rem 0.42rem;
  border-radius: 18px;
  animation: chatBubbleIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  transition: transform 0.1s;
}
.chat__bubble:active { transform: scale(0.985); }

/* Mis burbujas — degradado vino / burdeos */
.chat__bubble--mine {
  align-self: flex-end;
  margin-left: auto;
  background: linear-gradient(155deg, #7a1e2e 0%, #5C2430 50%, #3d1520 100%);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow:
    0 4px 16px rgba(92,36,48,0.35),
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Burbuja del otro — cristal / frosted */
.chat__bubble--theirs {
  align-self: flex-start;
  margin-right: auto;
  background: color-mix(in srgb, var(--color-surface) 92%, rgba(255,255,255,0.05));
  color: var(--color-text-primary);
  border-bottom-left-radius: 5px;
  border: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow:
    0 2px 10px rgba(0,0,0,0.08),
    0 1px 2px rgba(0,0,0,0.05);
}

.chat__bubble-text {
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat__bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  margin-top: 0.25rem;
  min-height: 1rem;
}

.chat__bubble-time {
  font-family: var(--font-mono);
  font-size: 0.59rem;
  opacity: 0.65;
  line-height: 1;
}
.chat__bubble--mine .chat__bubble-time { opacity: 0.75; }

.chat__checks {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: -0.05em;
  opacity: 0.6;
  user-select: none;
  transition: opacity 0.2s, color 0.2s;
}
.chat__checks--read {
  opacity: 1;
  color: #7ec8ff;
  animation: chat-checks-read 0.35s ease;
}

/* ── COMPOSER ────────────────────────────────────────────────────────────── */
.chat__composer {
  flex-shrink: 0;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom,0px) + var(--keyboard-inset,0px));
  background: color-mix(in srgb, var(--color-surface) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 5;
}
.chat__composer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent-red) 35%, var(--color-accent-gold) 65%, transparent 100%);
  opacity: 0.3;
}

.chat__composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  background: var(--color-surface-inset);
  border: 1px solid var(--color-border);
  border-radius: 26px;
  padding: 0.3rem 0.35rem 0.3rem 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat__composer-bar:focus-within {
  border-color: var(--color-accent-red);
  box-shadow: 0 0 0 3px var(--color-accent-soft), 0 4px 16px rgba(92,36,48,0.12);
}

/* Input dentro de la bar — resetea border y border-radius heredados */
.chat__input {
  border-radius: 0;
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  resize: none;
  min-height: 2.2rem;
  max-height: 7rem;
  padding: 0.52rem 0.5rem;
  font-family: var(--font-body);
  font-size: max(16px, 0.93rem); /* min 16px → evita zoom automático en iOS Safari */
  line-height: 1.45;
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  outline: none;
  field-sizing: content;
}
.chat__input:focus { box-shadow: none; border-color: transparent; }
.chat__input::placeholder { color: var(--color-text-muted); opacity: 0.75; }
.chat__input:disabled { opacity: 0.45; cursor: not-allowed; }

/* Mic / Attach / Template / Schedule iconos dentro de la bar */
.chat__attach,
.chat__mic,
.chat__template-trigger,
.chat__schedule-trigger {
  flex: 0 0 auto;
  width: 2.15rem; height: 2.15rem;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.chat__attach:hover:not(:disabled),
.chat__mic:hover:not(:disabled),
.chat__template-trigger:hover,
.chat__schedule-trigger:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}
.chat__attach:disabled,
.chat__mic:disabled { opacity: 0.35; cursor: not-allowed; }

/* Botón enviar */
.chat__send {
  flex: 0 0 auto;
  width: 2.45rem; height: 2.45rem;
  min-width: 2.45rem; min-height: 2.45rem;
  padding: 0; margin: 0;
  border: none;
  background: linear-gradient(145deg, #7a1e2e 0%, #5C2430 100%);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(92,36,48,0.4);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.chat__send:hover:not(:disabled) {
  transform: scale(1.07);
  box-shadow: 0 5px 16px rgba(92,36,48,0.5);
}
.chat__send:active:not(:disabled) {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(92,36,48,0.35);
}
.chat__send:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* Mic grabando */
.chat__mic.is-recording {
  background: linear-gradient(145deg, #b04a5a, #7a1e2e);
  color: #fff;
  animation: micPulse 1s ease infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176,74,90,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(176,74,90,0); }
}

/* ── TYPING INDICATOR ────────────────────────────────────────────────────── */
.chat__typing-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
.chat__typing-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-accent-red);
  opacity: 0.4;
  animation: typingBounce 1.3s ease infinite;
}
.chat__typing-dot:nth-child(2) { animation-delay: 0.18s; }
.chat__typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30%            { transform: translateY(-4px); opacity: 0.9; }
}

/* ── SEARCH BAR ──────────────────────────────────────────────────────────── */
.chat__search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: var(--color-surface-inset);
  border-bottom: 1px solid var(--color-border);
}
.chat__search-icon { color: var(--color-text-muted); flex-shrink: 0; }
.chat__search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: max(16px, 0.82rem); /* min 16px → evita zoom iOS */
  color: var(--color-text-primary);
}
.chat__search-input::placeholder { color: var(--color-text-muted); opacity: 0.7; }
.chat__search-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-accent-gold);
  white-space: nowrap;
}
.chat__search-close {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 0.85rem;
  width: 1.8rem; height: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.12s, color 0.12s;
}
.chat__search-close:hover { background: var(--color-accent-soft); color: var(--color-accent-red); }

/* ── LOAD MORE ───────────────────────────────────────────────────────────── */
.chat__load-more {
  align-self: center;
  margin: 0.4rem auto;
  padding: 0.35rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chat__load-more:hover:not(:disabled) {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
  background: var(--color-accent-soft);
}
.chat__load-more:disabled { opacity: 0.4; cursor: default; }

/* ── BUBBLE CONTEXT MENU ─────────────────────────────────────────────────── */
.chat__bubble-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  background: var(--color-surface-float);
  border: 1px solid var(--color-border-strong);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 50;
  animation: menuIn 0.15s cubic-bezier(0.22,1,0.36,1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chat__bubble--theirs .chat__bubble-menu { right: auto; left: 0; }
@keyframes menuIn {
  from { opacity: 0; transform: scale(0.9) translateY(4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.chat__bubble-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.12s;
}
.chat__bubble-menu-item:last-child { border-bottom: none; }
.chat__bubble-menu-item:hover { background: var(--color-surface-hover); }
.chat__bubble-menu-item--danger { color: #c0392b; }
.chat__bubble-menu-item--danger:hover { background: rgba(192,57,43,0.07); }

/* ── PLACEHOLDER ─────────────────────────────────────────────────────────── */
.chat__placeholder {
  margin: auto;
  text-align: center;
  max-width: 280px;
  padding: 2rem 1rem;
}
.chat__placeholder::before {
  content: 'CANAL PRIVADO';
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}
.chat__placeholder p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
/* Icono decorativo en el placeholder */
.chat__placeholder::after {
  content: '';
  display: block;
  width: 48px; height: 48px;
  margin: 1.25rem auto 0;
  background: linear-gradient(135deg, var(--color-accent-soft) 0%, transparent 100%);
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  opacity: 0.5;
}

/* ── PINNED BAR refinement ───────────────────────────────────────────────── */
.chat__pinned-bar {
  background: linear-gradient(90deg, rgba(139,90,58,0.1) 0%, transparent 100%);
  border-bottom: 1px solid rgba(139,90,58,0.2);
  font-family: var(--font-mono);
}
.chat__pinned-bar svg { color: var(--color-accent-gold); }
.chat__pinned-text { color: var(--color-text-secondary); font-size: 0.75rem; letter-spacing: 0.02em; }

/* ── EDIT BAR refinement ─────────────────────────────────────────────────── */
.chat__edit-bar {
  background: linear-gradient(90deg, rgba(255,193,7,0.1) 0%, transparent 100%);
  border-top: 1px solid rgba(255,193,7,0.25);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ── UNREAD SEP refinement ───────────────────────────────────────────────── */
.chat__unread-sep::before,
.chat__unread-sep::after { background: var(--color-accent-red); opacity: 0.25; }
.chat__unread-sep span {
  color: var(--color-accent-red);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(92,36,48,0.2);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
}

/* ── AUDIO BUBBLE ────────────────────────────────────────────────────────── */
.chat__audio-play {
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chat__audio-play:hover { transform: scale(1.1); }
.chat__bubble--mine .chat__audio-play {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.chat__bubble--theirs .chat__audio-play {
  background: var(--color-accent-soft);
  color: var(--color-accent-red);
}
.chat__audio-wave span {
  background: currentColor;
  border-radius: 2px;
  animation: audioWave 1s ease infinite;
}
@keyframes audioWave {
  0%, 100% { transform: scaleY(0.5); }
  50%       { transform: scaleY(1.2); }
}

/* ── REPLY QUOTE refinement ──────────────────────────────────────────────── */
.chat__reply-quote {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  padding: 5px 8px;
}
.chat__bubble--mine .chat__reply-quote {
  border-left-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}
.chat__bubble--theirs .chat__reply-quote {
  border-left-color: var(--color-accent-red);
  background: var(--color-accent-soft);
}

/* ── REACTION CHIPS refinement ───────────────────────────────────────────── */
.chat__reaction {
  background: color-mix(in srgb, var(--color-surface) 75%, transparent);
  border: 1px solid var(--color-border);
  font-size: 0.8rem;
  transition: transform 0.12s, box-shadow 0.12s;
}
.chat__reaction:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.chat__reaction--mine {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-red);
}

/* ── MEDIA IMAGES ────────────────────────────────────────────────────────── */
.chat__media-img,
.chat__media-video {
  border-radius: 12px;
  max-width: 100%;
  display: block;
}

/* ── SCROLLBAR styling ───────────────────────────────────────────────────── */
.chat__messages::-webkit-scrollbar { width: 4px; }
.chat__messages::-webkit-scrollbar-track { background: transparent; }
.chat__messages::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}
.chat__thread-list::-webkit-scrollbar { width: 3px; }
.chat__thread-list::-webkit-scrollbar-track { background: transparent; }
.chat__thread-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

/* ── GLOBAL SESSION FAB ──────────────────────────────────────────────────── */
.global-session-fab {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 16px;
  height: 52px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 26px;
  box-shadow: 0 4px 16px rgba(92, 36, 48, 0.38), 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.22s ease;
  /* ocultar cuando hidden */
}
.global-session-fab[hidden] {
  display: none !important;
}
.global-session-fab:hover,
.global-session-fab:focus-visible {
  background: var(--color-accent-hover);
  box-shadow: 0 6px 22px rgba(92, 36, 48, 0.48), 0 2px 6px rgba(0,0,0,0.22);
  transform: translateY(-2px);
}
.global-session-fab:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(92, 36, 48, 0.32);
}
.global-session-fab__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.global-session-fab__label {
  white-space: nowrap;
}
/* Ocultar en sección de sesión activa o en trainer */
[data-app-role="trainer"] .global-session-fab,
[data-active-panel="session"] .global-session-fab {
  display: none !important;
}
/* Animación de entrada */
@keyframes fab-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.global-session-fab--visible {
  animation: fab-enter 0.25s ease forwards;
}

/* ── PULL-TO-REFRESH ─────────────────────────────────────────────────────── */
.ptr-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0;
  z-index: 10;
}
.ptr-indicator--pulling {
  opacity: 1;
}
.ptr-indicator--ready {
  opacity: 1;
  color: var(--color-accent);
}
.ptr-indicator--refreshing {
  opacity: 1;
  transform: translateX(-50%) translateY(12px);
}
.ptr-indicator__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.ptr-indicator--ready .ptr-indicator__icon {
  transform: rotate(180deg);
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}
.ptr-indicator--refreshing .ptr-indicator__icon {
  animation: ptr-spin 0.8s linear infinite;
}
#panelWelcome {
  position: relative;
  overflow: visible;
}

/* Coach tower: chat vive en .coach-tower__actions (flujo, no absolute) */
.coach-tower__chat-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 0;
  min-height: 0;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 28%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 14%, transparent);
  color: #EDE8E3;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
  z-index: 1;
}
.coach-tower__chat-btn:hover,
.coach-tower__chat-btn:focus-visible {
  background: var(--tower-wine, #5C2430);
  border-color: var(--tower-wine, #5C2430);
  color: #fff;
  outline: none;
}
.coach-tower__chat-btn:active {
  transform: scale(0.96);
}
.coach-tower__chat-btn--unread {
  background: var(--tower-wine, #5C2430);
  color: #fff;
  border-color: transparent;
}

/* ── iOS keyboard fix: scroll input into view when virtual keyboard opens ── */
@supports (-webkit-touch-callout: none) {
  input:focus,
  textarea:focus,
  select:focus {
    scroll-margin-bottom: env(keyboard-inset-height, 0px);
  }
}

/* ── Trainer Panel Tabs ── */
.trainer-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-lg, 24px);
  background: var(--color-surface-2, #1a1512);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.07));
}
.trainer-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-muted, #9c8c80);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.trainer-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--color-text, #f2ede8);
}
.trainer-tab.is-active {
  background: var(--color-primary, #5C2430);
  color: #fff;
}

/* Hide cards not belonging to the active tab */
[data-trainer-tab]:not([data-trainer-tab-active]) {
  display: none !important;
}

/* ── Dar de baja button ── */
.btn--danger-ghost {
  color: var(--color-danger, #e05a6a);
  border-color: rgba(224, 90, 106, 0.35);
}
.btn--danger-ghost:hover {
  background: rgba(224, 90, 106, 0.1);
  border-color: rgba(224, 90, 106, 0.6);
}

/* ── Collapsible cards ── */
.card--collapsible .card__body { display: none; }
.card--collapsible.is-open .card__body { display: block; }
.card--collapsible .card__header {
  cursor: pointer;
  user-select: none;
  padding-right: 44px;
  position: relative;
}
.card--collapsible .card__header::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-text-muted, #9c8c80);
  transition: transform 0.2s ease, color 0.2s;
  pointer-events: none;
}
.card--collapsible.is-open .card__header::after {
  transform: translateY(-50%) rotate(180deg);
  color: var(--color-text, #f2ede8);
}
.card--collapsible .card__header:hover::after { color: var(--color-text, #f2ede8); }

/* Extras collapsible inside cartera card */
.access-gate-panel__extras { margin-top: var(--space-lg, 24px); border-top: 1px solid var(--color-border, rgba(255,255,255,0.07)); padding-top: var(--space-md, 16px); }
.access-gate-panel__extras-toggle { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--color-text-muted, #9c8c80); list-style: none; padding: 4px 0; user-select: none; }
.access-gate-panel__extras-toggle::-webkit-details-marker { display: none; }
.access-gate-panel__extras-toggle::before { content: '▾ '; }
.access-gate-panel__extras[open] .access-gate-panel__extras-toggle::before { content: '▴ '; }

/* ══════════════════════════════════════════════════════
   TRAINER PANEL — Rediseño completo v98
══════════════════════════════════════════════════════ */

/* Cards con superficie y acento burdeos */
#trainer-dashboard .panel__body > .card,
#trainer-dashboard .access-gate-panel,
#trainer-dashboard .smart-feed {
  background: var(--color-surface-2, #1a1512);
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-left: 3px solid #5C2430;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.22);
  padding-left: 0;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#trainer-dashboard .panel__body > .card:hover,
#trainer-dashboard .access-gate-panel:hover,
#trainer-dashboard .smart-feed:hover {
  border-color: rgba(92, 36, 48, 0.5);
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
}

/* Header del card */
#trainer-dashboard .card__header {
  padding: 1rem 1.25rem;
  border-bottom: none;
}

#trainer-dashboard .card--collapsible .card__header {
  border-radius: 11px;
}

#trainer-dashboard .card--collapsible .card__header:hover {
  background: rgba(92, 36, 48, 0.08);
}

#trainer-dashboard .card--collapsible.is-open .card__header {
  border-radius: 11px 11px 0 0;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.07));
}

/* Body del card */
#trainer-dashboard .card__body {
  padding: 1.1rem 1.25rem;
}

/* Animación de apertura del body */
#trainer-dashboard .card--collapsible.is-open .card__body {
  animation: trainerBodyOpen 0.22s ease both;
}

@keyframes trainerBodyOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Animación de entrada de cards */
@keyframes trainerCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#trainer-dashboard .card--collapsible {
  animation: trainerCardIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger de entrada */
#trainer-dashboard [data-trainer-tab-active] .card--collapsible:nth-child(1) { animation-delay: 0ms; }
#trainer-dashboard [data-trainer-tab-active] .card--collapsible:nth-child(2) { animation-delay: 55ms; }
#trainer-dashboard [data-trainer-tab-active] .card--collapsible:nth-child(3) { animation-delay: 110ms; }
#trainer-dashboard [data-trainer-tab-active] .card--collapsible:nth-child(4) { animation-delay: 165ms; }
#trainer-dashboard [data-trainer-tab-active] .card--collapsible:nth-child(5) { animation-delay: 220ms; }

/* FIX: fondo negro lista de clientes */
.access-gate-panel__list {
  background: var(--color-surface-2, #1a1512);
}

/* FIX: texto solapado en alertas prioritarias */
.cc-priority__body {
  min-width: 0;
}
.cc-priority__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-priority__reason,
.cc-priority__digest {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Marca de agua logo */
#trainer-dashboard {
  position: relative;
}
.trainer-watermark {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: url('assets/logo.svg') center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════════════
   TRAINER PANEL — Fix tipografía + burdeos v99
══════════════════════════════════════════════════════ */

/* Cards: burdeos corporativo vía CSS var (adapta a dark/light mode) */
#trainer-dashboard .panel__body > .card,
#trainer-dashboard .access-gate-panel,
#trainer-dashboard .smart-feed {
  background: var(--color-surface, #1C1917);
  border: 1px solid var(--color-border, rgba(255,255,255,0.10));
  border-left: 3px solid var(--color-accent-red);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
  padding-left: 0;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#trainer-dashboard .panel__body > .card:hover,
#trainer-dashboard .access-gate-panel:hover,
#trainer-dashboard .smart-feed:hover {
  border-left-color: var(--color-accent-red-hover, var(--color-accent-red));
  box-shadow: 0 4px 24px rgba(0,0,0,0.30);
}

/* Títulos y subtítulos del panel — texto claro */
#trainer-dashboard .card__title,
#trainer-dashboard .access-gate-panel__list-title {
  color: var(--color-text-primary, #F2EDE8) !important;
  font-size: var(--text-subtitle);
  font-weight: var(--weight-title);
  letter-spacing: var(--track-title);
}

#trainer-dashboard .card__subtitle,
#trainer-dashboard .ecr-panel__subtitle,
#trainer-dashboard .access-gate-panel__subtitle {
  color: var(--color-text-secondary, #C4B9B0) !important;
}

/* Body del card — texto legible */
#trainer-dashboard .card__body {
  color: var(--color-text-primary, #F2EDE8);
}

/* cc-dispatch: colores correctos en dark mode */
.cc-dispatch__eyebrow {
  color: var(--color-accent-red, #5C2430);
}

.cc-dispatch__actions {
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
}

/* Asegurar que cc-dispatch y cc-bento no se salgan de su contenedor */
#trainer-dashboard .cc-dispatch,
#trainer-dashboard .cc-bento {
  max-width: 100%;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   CC-PRIORITY — Fix overlap + overflow móvil v99
══════════════════════════════════════════════════════ */

/* Contenedor: no desborda */
.cc-priority__list {
  overflow: hidden;
  width: 100%;
}

/* Grid con columna de acciones acotada */
.cc-priority__item {
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 68px);
  overflow: hidden;
  width: 100%;
}

/* Celda body: nunca más ancha que 1fr */
.cc-priority__body {
  min-width: 0;
  overflow: hidden;
}

/* Nombre: cortar con ellipsis en lugar de desbordar */
.cc-priority__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Razón/resumen: romper palabras largas */
.cc-priority__reason,
.cc-priority__digest {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

/* Columna de acciones: botones acotados y no desbordan */
.cc-priority__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.cc-priority__actions .btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 0.68rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

/* En móvil estrecho: acciones debajo del body */
@media (max-width: 420px) {
  .cc-priority__item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .cc-priority__pulse {
    grid-row: 1;
    grid-column: 1;
  }
  .cc-priority__body {
    grid-row: 1;
    grid-column: 2;
  }
  .cc-priority__actions {
    grid-row: 2;
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
}

/* ══════════════════════════════════════════════════════
   TRAINER PANEL — Fix definitivo contraste + layout v101
══════════════════════════════════════════════════════ */

/*
  Paleta local forzada para #trainer-dashboard.
  Independiente del modo de sistema (dark/light).
  El panel del entrenador SIEMPRE es dark.
*/
#trainer-dashboard {
  --td-surface:   #222018;
  --td-surface2:  #2c2820;
  --td-border:    rgba(255,255,255,0.10);
  --td-accent:    #B04A5A;
  --td-text:      #F2EDE8;
  --td-text-muted:#C4B9B0;
}

/* ── Cards: colores garantizados ─────────────────── */
#trainer-dashboard .panel__body > .card,
#trainer-dashboard .access-gate-panel,
#trainer-dashboard .smart-feed {
  background:   var(--td-surface) !important;
  border:       1px solid var(--td-border) !important;
  border-left:  3px solid var(--td-accent) !important;
  border-radius: 12px !important;
  box-shadow:   0 2px 16px rgba(0,0,0,0.25) !important;
  padding-left: 0 !important;
  color:        var(--td-text) !important;
}

#trainer-dashboard .panel__body > .card:hover,
#trainer-dashboard .access-gate-panel:hover,
#trainer-dashboard .smart-feed:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.32) !important;
  border-left-color: #C85A6A !important;
}

/* ── Texto: títulos, subtítulos, body ────────────── */
#trainer-dashboard .card__title,
#trainer-dashboard .access-gate-panel__list-title {
  color: var(--td-text) !important;
}

#trainer-dashboard .card__subtitle,
#trainer-dashboard .ecr-panel__subtitle,
#trainer-dashboard .access-gate-panel__subtitle {
  color: var(--td-text-muted) !important;
}

#trainer-dashboard .card__body,
#trainer-dashboard .card__header {
  color: var(--td-text);
}

/* Todos los párrafos y labels dentro del panel */
#trainer-dashboard .card__body p,
#trainer-dashboard .card__body label,
#trainer-dashboard .card__body span:not(.btn__spinner) {
  color: inherit;
}

/* ── cc-priority items ───────────────────────────── */
.cc-priority__item {
  background: var(--td-surface2, #2c2820) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

.cc-priority__name {
  color: var(--td-text, #F2EDE8) !important;
}

.cc-priority__reason,
.cc-priority__digest {
  color: var(--td-text-muted, #C4B9B0) !important;
}

/* Pulso: color más visible en dark */
.cc-priority__pulse {
  background: var(--td-accent, #B04A5A) !important;
  box-shadow: 0 0 0 0 rgba(176,74,90,0.45) !important;
}

/* Texto hardcodeado oscuro → claro */
.cc-batch__label {
  color: var(--td-accent, #B04A5A) !important;
}

.cc-dispatch__eyebrow {
  color: var(--td-accent, #B04A5A) !important;
}

/* ── cc-priority grid: layout anti-overflow ──────── */
.cc-priority__list {
  width: 100%;
  overflow: hidden;
}

.cc-priority__item {
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 64px);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.cc-priority__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-priority__reason,
.cc-priority__digest {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Botones de acción: compactos y sin desbordar */
.cc-priority__actions {
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  overflow: hidden;
  align-items: stretch;
}

.cc-priority__actions .btn {
  font-size: 0.66rem;
  padding: 0.3rem 0.45rem;
  min-height: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
}

/* Mobile ≤ 480px: acciones debajo del texto */
@media (max-width: 480px) {
  .cc-priority__item {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.55rem;
  }

  .cc-priority__pulse  { grid-row: 1; grid-column: 1; }
  .cc-priority__body   { grid-row: 1; grid-column: 2; }

  .cc-priority__actions {
    grid-row: 2;
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .cc-priority__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
}

/* ══════════════════════════════════════════════════════
   TRAINER PANEL — Rediseño blanco corporativo v102
   Paneles blancos · burdeos en bordes y títulos · texto negro
══════════════════════════════════════════════════════ */

/* Sobreescribe la paleta dark de v101 → paleta blanca */
#trainer-dashboard {
  --td-surface:   #FFFFFF;
  --td-surface2:  #FAF9F8;
  --td-border:    rgba(92,36,48,0.12);
  --td-accent:    var(--color-accent-red, #5C2430);
  --td-text:      #1A1A1A;
  --td-text-muted:#4A3A34;
}

/* ── Cards: fondo blanco ─────────────────────────── */
#trainer-dashboard .panel__body > .card,
#trainer-dashboard .access-gate-panel,
#trainer-dashboard .smart-feed {
  background:   #FFFFFF !important;
  border:       1px solid rgba(92,36,48,0.15) !important;
  border-left:  3px solid var(--color-accent-red, #5C2430) !important;
  border-radius: 10px !important;
  box-shadow:   0 1px 8px rgba(92,36,48,0.07) !important;
  color:        #1A1A1A !important;
}

#trainer-dashboard .panel__body > .card:hover,
#trainer-dashboard .access-gate-panel:hover,
#trainer-dashboard .smart-feed:hover {
  box-shadow: 0 3px 16px rgba(92,36,48,0.12) !important;
}

/* ── Títulos en burdeos ──────────────────────────── */
#trainer-dashboard .card__title,
#trainer-dashboard .access-gate-panel__list-title {
  color: var(--color-accent-red, #5C2430) !important;
  font-weight: 700 !important;
}

/* ── Subtítulos y cuerpo en negro/gris oscuro ────── */
#trainer-dashboard .card__subtitle,
#trainer-dashboard .ecr-panel__subtitle,
#trainer-dashboard .access-gate-panel__subtitle {
  color: #4A3A34 !important;
}

#trainer-dashboard .card__body,
#trainer-dashboard .card__header {
  color: #1A1A1A;
}

#trainer-dashboard .card__body p,
#trainer-dashboard .card__body label,
#trainer-dashboard .card__body span:not(.btn__spinner):not(.badge) {
  color: inherit;
}

/* ── cc-dispatch eyebrow ─────────────────────────── */
.cc-dispatch__eyebrow {
  color: var(--color-accent-red, #5C2430) !important;
  font-weight: 600;
}

/* ── cc-batch labels ─────────────────────────────── */
.cc-batch__label {
  color: var(--color-accent-red, #5C2430) !important;
}

/* ── cc-priority: items con fondo levemente gris ─── */
.cc-priority__item {
  background: #FAF8F7 !important;
  border-color: rgba(92,36,48,0.10) !important;
}

.cc-priority__name {
  color: #1A1A1A !important;
  font-weight: 600;
}

.cc-priority__reason,
.cc-priority__digest {
  color: #5A4A44 !important;
}

/* Pulso: burdeos visible en fondo claro */
.cc-priority__pulse {
  background: var(--color-accent-red, #5C2430) !important;
  box-shadow: 0 0 0 0 rgba(92,36,48,0.4) !important;
}

@keyframes cc-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(92,36,48,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(92,36,48,0);   }
  100% { box-shadow: 0 0 0 0   rgba(92,36,48,0);   }
}

/* ── Botones ghost en el panel: burdeos ──────────── */
#trainer-dashboard .btn--ghost {
  color: var(--color-accent-red, #5C2430) !important;
  border-color: rgba(92,36,48,0.25) !important;
}

#trainer-dashboard .btn--ghost:hover {
  background: rgba(92,36,48,0.06) !important;
}

/* ── Fix layout cc-priority mobile ──────────────── */
.cc-priority__actions .btn {
  min-height: 32px !important;
  padding: 0.3rem 0.5rem !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
}

/* ── Lista de clientes: fondo blanco ─────────────── */
.access-gate-panel__list {
  background: #F5F3F1 !important;
}

/* ── v103: smart-feed — fix action buttons overflow en móvil ── */
/* En móvil los 5 botones con flex-wrap:wrap dentro de ~173px
   generaban una columna de 262px que sangra sobre los items siguientes.
   Solución: fila horizontal con scroll, sin wrap. */
@media (max-width: 640px) {
  .smart-feed__item {
    overflow: hidden;
  }
  .smart-feed__actions {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.3rem;
    padding-bottom: 2px;
  }
  .smart-feed__actions::-webkit-scrollbar { display: none; }
  .smart-feed__action {
    flex-shrink: 0;
    font-size: 0.6rem !important;
    padding: 0.3rem 0.45rem !important;
    white-space: nowrap;
  }
}

/* ── sf2: panel Atención de hoy — rediseño v104 ───────────────────────── */
#trainer-dashboard .sf2.card {
  background: #fff;
  border: 1px solid rgba(92,36,48,0.13);
  border-left: 3px solid #5C2430;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(92,36,48,0.07);
  padding: 0;
  overflow: hidden;
}

/* Header */
.sf2__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(92,36,48,0.08);
}

.sf2__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5C2430;
  margin: 0;
}

.sf2__refresh {
  appearance: none;
  background: none;
  border: 1px solid rgba(92,36,48,0.2);
  border-radius: 6px;
  padding: 0.35rem;
  cursor: pointer;
  color: #5C2430;
  display: flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.sf2__refresh:hover { background: rgba(92,36,48,0.06); border-color: #5C2430; }
.sf2__refresh:active { transform: rotate(45deg); }

/* Tabs */
.sf2__tabs {
  display: flex;
  gap: 0;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(92,36,48,0.08);
}

.sf2__tab {
  flex: 1;
  appearance: none;
  background: rgba(92,36,48,0.04);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.5rem 0.4rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: #7A6060;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin: 0 0.2rem;
  font-family: var(--font-sans, inherit);
}
.sf2__tab:first-child { margin-left: 0; }
.sf2__tab:last-child  { margin-right: 0; }

.sf2__tab-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sf2__tab-count {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  line-height: 1;
  color: inherit;
}

.sf2__tab.is-active {
  background: rgba(92,36,48,0.08);
  border-color: rgba(92,36,48,0.3);
  color: #5C2430;
}

.sf2__tab:hover:not(.is-active) {
  background: rgba(92,36,48,0.06);
  color: #5C2430;
}

/* Body */
.sf2__body {
  padding: 0.75rem 1rem 1rem;
}

/* Reset card--collapsible header interference */
#trainer-dashboard .sf2.card .card__header { display: none; }
#trainer-dashboard .sf2.card.is-open { display: block; }

/* ── v105: ocultar smart-feed__list cuando cc-priority está activo ─── */
/* Cuando ccPriorityGrid está visible (urgent tab con alertas) muestra los
   mismos clientes que smart-feed__list — suprimir la lista duplicada evita
   la sección en blanco debajo de "Alejandro Arias NOTA FICHA" */
#ccPriorityGrid:not([hidden]) ~ #smartFeedList {
  display: none !important;
}

/* ── fix smart-feed__item: no encogerse en flex container ─────────── */
/* La lista es display:flex;flex-direction:column;max-height:420px.
   Sin flex-shrink:0 los items (173px c/u × 5 = 865px) se comprimen a ~77px
   mostrando solo el select-wrap vacío y recortando el contenido. */
.smart-feed__item {
  flex-shrink: 0;
}

/* ── fix select-wrap: no participa en el grid visual ─────────────── */
/* El checkbox de batch selection (select-wrap) ocupa la primera celda
   del grid, desplazando el signal dot a col2 y haciendo el layout roto.
   Lo convertimos en position:absolute para sacarlo del flujo del grid. */
.smart-feed__select-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.smart-feed__item {
  position: relative;
}

/* ════════════════════════════════════════════════════════════════════════════
   MEJORAS VISUALES v106 — Interior screens
   Fondos animados · Sistema de paneles · Marca de agua variocolor
   Paleta y tipografía BLOQUEADAS (Guía Maestra v2.1)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── FASE 1-A: Grain técnico extendido a todos los paneles ──────────────────
   El mismo lenguaje visual del landing (rejilla estructural + noise SVG)
   aplicado al interior. Position:absolute, pointer-events:none, z-index:-1
   para que nunca interfiera con el contenido. ──────────────────────────── */

.panel--active {
  position: relative;
  isolation: isolate;
}

.panel--active::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(92,36,48,0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,36,48,0.042) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
  background-size: 40px 40px, 40px 40px, 300px 300px;
  mask-image: radial-gradient(130% 60% at 50% 0%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(130% 60% at 50% 0%, #000 35%, transparent 85%);
}

/* panelWelcome tiene su propio hero — sin duplicar */
#panelWelcome.panel--active::after {
  display: none;
}

/* ── FASE 1-B: Velo de atmósfera temático — reemplaza el plano genérico ──── */

/* Eliminar el ::before plano global (será sobreescrito por cada panel) */
.panel--active::before {
  height: 260px;
  background: linear-gradient(
    180deg,
    rgba(92, 36, 48, 0.065) 0%,
    rgba(92, 36, 48, 0.018) 55%,
    transparent 100%
  );
}

/* Dashboard / Stats — burdeos profundo */
#panelStats.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(92,36,48,0.11) 0%, transparent 75%);
  height: 280px;
}

/* Sesión de entrenamiento — grafito cálido */
#panelSession.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(55,38,30,0.12) 0%, transparent 75%);
  height: 280px;
}

/* Nutrición — terracota cálida */
#panelNutrition.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(139,90,58,0.11) 0%, transparent 75%);
  height: 280px;
}

/* Calendario — azul acero */
#panelCalendar.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(59,111,140,0.10) 0%, transparent 75%);
  height: 280px;
}

/* Check-in — verde pino */
#panelCheckIn.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(47,107,94,0.10) 0%, transparent 75%);
  height: 280px;
}

/* Runners — burdeos vivo */
#panelRunners.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(92,36,48,0.13) 0%, transparent 75%);
  height: 280px;
}

/* Mensajería / Chat — índigo neutro */
#panelMessaging.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(60,55,80,0.10) 0%, transparent 75%);
  height: 280px;
}

/* Profile */
#panelProfile.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(92,36,48,0.09) 0%, transparent 75%);
  height: 280px;
}

/* About */
#panelAbout.panel--active::before {
  background: radial-gradient(ellipse 90% 280px at 50% 0%, rgba(92,36,48,0.10) 0%, transparent 75%);
  height: 280px;
}

/* ── FASE 1-C: Unificar border-radius — resolver conflicto 0 vs 16px ─────── */

:root {
  --card-radius: 12px;
}

/* Cards secundarias / info → 12px ya cubierto por el token */
/* Cards de acción / listado → 8px */

/* ── FASE 1-D: Elevación consistente con las sombras ya definidas ─────────── */

/* Cards de contenido principal en paneles interiores */
#panelStats .card,
#panelSession .card,
#panelNutrition .card,
#panelCalendar .card,
#panelCheckIn .card,
#panelRunners .card,
#panelMessaging .card,
#panelProfile .card {
  box-shadow: var(--shadow-elev-1);
}

/* ── FASE 2-A: Marca de agua logo — sistema variocolor por sección ──────────
   Logo sin fondo variocolor posicionado en esquina inferior derecha de cada
   panel. Opacidad 4-7%, mix-blend-mode según sección. Animación drift lenta
   (20s). Nunca interfiere con el contenido (z-index:-1, pointer-events:none).
   ────────────────────────────────────────────────────────────────────────── */

/* Keyframe drift interior — más suave que el hero */
@keyframes interiorWmDrift {
  0%   { transform: scale(1)    rotate(-1.5deg) translate(0,0); }
  50%  { transform: scale(1.02) rotate(0deg)    translate(4px, -6px); }
  100% { transform: scale(1)    rotate(1.5deg)  translate(-3px, 3px); }
}

/* Elemento base — se añade vía ::after de un wrapper interno cuando el panel
   no tiene pseudo-elementos libres; usamos la clase .panel-wm que se inyecta
   en el HTML de cada panel */
.panel-wm {
  position: absolute;
  bottom: 60px;
  right: 16px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  z-index: 0;
  background: url('assets/logo.svg') center / contain no-repeat;
  opacity: 0.045;
  mix-blend-mode: multiply;
  animation: interiorWmDrift 22s ease-in-out infinite alternate;
  /* Garantizar que no descuadra layout: absolutamente fuera del flujo */
  overflow: hidden;
}

/* Variante oscura (dark mode, cuando exista) */
@media (prefers-color-scheme: dark) {
  .panel-wm {
    mix-blend-mode: screen;
    opacity: 0.06;
  }
}

html[data-theme-mode="dark"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.06;
}

/* Variaciones variocolor por sección — hue-rotate sobre el logo color */
#panelStats      .panel-wm { filter: hue-rotate(0deg)   saturate(1.1); opacity: 0.05; }
#panelSession    .panel-wm { filter: hue-rotate(18deg)  saturate(0.8); opacity: 0.045; }
#panelNutrition  .panel-wm { filter: hue-rotate(22deg)  saturate(1.2); opacity: 0.055; }
#panelCalendar   .panel-wm { filter: hue-rotate(155deg) saturate(0.9); opacity: 0.045; }
#panelCheckIn    .panel-wm { filter: hue-rotate(100deg) saturate(1.0); opacity: 0.048; }
#panelRunners    .panel-wm { filter: hue-rotate(340deg) saturate(1.3); opacity: 0.055; }
#panelMessaging  .panel-wm { filter: hue-rotate(220deg) saturate(0.7); opacity: 0.040; }
#panelProfile    .panel-wm { filter: hue-rotate(0deg)   saturate(0.9); opacity: 0.042; }
#panelAbout      .panel-wm { filter: hue-rotate(0deg)   saturate(1.0); opacity: 0.040; }

/* Paneles que requieren position:relative para anclar el .panel-wm */
#panelStats,
#panelSession,
#panelNutrition,
#panelCalendar,
#panelCheckIn,
#panelRunners,
#panelMessaging,
#panelProfile,
#panelAbout {
  position: relative;
}

/* Ocultar en reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .panel-wm { animation: none; }
}

/* ── AJUSTES WATERMARK POR TEMA ─────────────────────────────────────────────
   Cada tema tiene fondo y acento distinto; ajustamos blend-mode y opacidad
   para que la marca de agua sea siempre sutil pero coherente con el color.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── TEMA CLASSIC (claro, fondo crema #FAF8F6, acento burdeos) ─────────────── */
html[data-theme="classic"] .panel-wm {
  mix-blend-mode: multiply;
  opacity: 0.06;
  filter: hue-rotate(0deg) saturate(1.4) brightness(0.7);
}
html[data-theme="classic"] #panelCalendar  .panel-wm { filter: hue-rotate(155deg) saturate(1.0) brightness(0.7); opacity: 0.055; }
html[data-theme="classic"] #panelCheckIn   .panel-wm { filter: hue-rotate(100deg) saturate(1.0) brightness(0.7); opacity: 0.055; }
html[data-theme="classic"] #panelNutrition .panel-wm { filter: hue-rotate(22deg)  saturate(1.3) brightness(0.7); opacity: 0.060; }
html[data-theme="classic"] #panelRunners   .panel-wm { filter: hue-rotate(340deg) saturate(1.4) brightness(0.7); opacity: 0.060; }
html[data-theme="classic"] #panelMessaging .panel-wm { filter: hue-rotate(220deg) saturate(0.9) brightness(0.7); opacity: 0.050; }
html[data-theme="classic"] #panelSession   .panel-wm { filter: hue-rotate(18deg)  saturate(0.9) brightness(0.7); opacity: 0.050; }

/* grain más cálido en classic — ya definido en bloque de tema (línea ~36362), reforzamos blend */
html[data-theme="classic"] body::before { mix-blend-mode: multiply; }
html[data-theme="classic"] body::after  { mix-blend-mode: multiply; opacity: 0.12; }

/* ── TEMA ARCTIC-FROST (claro, fondo #F8FAFC, acento cyan) ─────────────────── */
html[data-theme="arctic-frost"] .panel-wm {
  mix-blend-mode: multiply;
  opacity: 0.055;
  filter: hue-rotate(185deg) saturate(1.2) brightness(0.75);
}
html[data-theme="arctic-frost"] #panelStats     .panel-wm { filter: hue-rotate(185deg) saturate(1.1) brightness(0.75); opacity: 0.050; }
html[data-theme="arctic-frost"] #panelSession   .panel-wm { filter: hue-rotate(195deg) saturate(0.9) brightness(0.75); opacity: 0.045; }
html[data-theme="arctic-frost"] #panelNutrition .panel-wm { filter: hue-rotate(175deg) saturate(1.2) brightness(0.75); opacity: 0.055; }
html[data-theme="arctic-frost"] #panelCalendar  .panel-wm { filter: hue-rotate(195deg) saturate(1.1) brightness(0.75); opacity: 0.050; }
html[data-theme="arctic-frost"] #panelCheckIn   .panel-wm { filter: hue-rotate(165deg) saturate(1.0) brightness(0.75); opacity: 0.048; }
html[data-theme="arctic-frost"] #panelRunners   .panel-wm { filter: hue-rotate(180deg) saturate(1.3) brightness(0.75); opacity: 0.055; }
html[data-theme="arctic-frost"] #panelMessaging .panel-wm { filter: hue-rotate(205deg) saturate(0.8) brightness(0.75); opacity: 0.042; }
html[data-theme="arctic-frost"] #panelProfile   .panel-wm { filter: hue-rotate(185deg) saturate(0.9) brightness(0.75); opacity: 0.042; }
html[data-theme="arctic-frost"] #panelAbout     .panel-wm { filter: hue-rotate(185deg) saturate(1.0) brightness(0.75); opacity: 0.040; }

/* grain en claro arctic: tinte azulado más suave */
html[data-theme="arctic-frost"] body::before {
  mix-blend-mode: multiply;
  opacity: 0.30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.06 0 0 0 0 0.40 0 0 0 0 0.50 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
html[data-theme="arctic-frost"] body::after { mix-blend-mode: multiply; opacity: 0.10; }

/* ── TEMAS OSCUROS: screen + opacidades afinadas por color de acento ────────── */

/* burgundy-dark — fondo #0A0A0A, acento burdeos oscuro #8C3D4D */
html[data-theme="burgundy-dark"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.065;
}
html[data-theme="burgundy-dark"] #panelStats     .panel-wm { filter: hue-rotate(345deg) saturate(1.3); opacity: 0.068; }
html[data-theme="burgundy-dark"] #panelRunners   .panel-wm { filter: hue-rotate(345deg) saturate(1.4); opacity: 0.068; }
html[data-theme="burgundy-dark"] #panelCalendar  .panel-wm { filter: hue-rotate(155deg) saturate(0.9); opacity: 0.055; }
html[data-theme="burgundy-dark"] #panelCheckIn   .panel-wm { filter: hue-rotate(100deg) saturate(0.9); opacity: 0.050; }
html[data-theme="burgundy-dark"] #panelNutrition .panel-wm { filter: hue-rotate(15deg)  saturate(1.1); opacity: 0.060; }
html[data-theme="burgundy-dark"] #panelMessaging .panel-wm { filter: hue-rotate(220deg) saturate(0.7); opacity: 0.045; }
html[data-theme="burgundy-dark"] body::before { opacity: 0.25; mix-blend-mode: soft-light; }
html[data-theme="burgundy-dark"] body::after  { opacity: 0.15; mix-blend-mode: overlay; }

/* neon-berry — fondo #0A0A0A, acento rosa neón #FF2A85 */
html[data-theme="neon-berry"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.060;
}
html[data-theme="neon-berry"] #panelStats     .panel-wm { filter: hue-rotate(330deg) saturate(1.4); opacity: 0.065; }
html[data-theme="neon-berry"] #panelRunners   .panel-wm { filter: hue-rotate(330deg) saturate(1.5); opacity: 0.065; }
html[data-theme="neon-berry"] #panelCalendar  .panel-wm { filter: hue-rotate(155deg) saturate(1.0); opacity: 0.052; }
html[data-theme="neon-berry"] #panelCheckIn   .panel-wm { filter: hue-rotate(100deg) saturate(1.0); opacity: 0.050; }
html[data-theme="neon-berry"] #panelNutrition .panel-wm { filter: hue-rotate(15deg)  saturate(1.2); opacity: 0.058; }
html[data-theme="neon-berry"] #panelMessaging .panel-wm { filter: hue-rotate(220deg) saturate(0.8); opacity: 0.048; }
html[data-theme="neon-berry"] body::before { opacity: 0.22; mix-blend-mode: soft-light; }
html[data-theme="neon-berry"] body::after  { opacity: 0.14; mix-blend-mode: overlay; }

/* deep-violet — fondo #141218, acento violeta #8A2BE2 */
html[data-theme="deep-violet"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.065;
}
html[data-theme="deep-violet"] #panelStats     .panel-wm { filter: hue-rotate(270deg) saturate(1.3); opacity: 0.068; }
html[data-theme="deep-violet"] #panelRunners   .panel-wm { filter: hue-rotate(265deg) saturate(1.4); opacity: 0.065; }
html[data-theme="deep-violet"] #panelCalendar  .panel-wm { filter: hue-rotate(210deg) saturate(1.1); opacity: 0.060; }
html[data-theme="deep-violet"] #panelCheckIn   .panel-wm { filter: hue-rotate(230deg) saturate(1.0); opacity: 0.055; }
html[data-theme="deep-violet"] #panelNutrition .panel-wm { filter: hue-rotate(255deg) saturate(1.2); opacity: 0.060; }
html[data-theme="deep-violet"] #panelMessaging .panel-wm { filter: hue-rotate(245deg) saturate(0.9); opacity: 0.055; }
html[data-theme="deep-violet"] #panelSession   .panel-wm { filter: hue-rotate(260deg) saturate(0.8); opacity: 0.052; }
html[data-theme="deep-violet"] body::before { opacity: 0.26; mix-blend-mode: soft-light; }
html[data-theme="deep-violet"] body::after  { opacity: 0.16; mix-blend-mode: overlay; }

/* forest-tactical — fondo #111111, acento verde oliva #556B2F */
html[data-theme="forest-tactical"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.060;
}
html[data-theme="forest-tactical"] #panelStats     .panel-wm { filter: hue-rotate(85deg)  saturate(1.2); opacity: 0.062; }
html[data-theme="forest-tactical"] #panelCheckIn   .panel-wm { filter: hue-rotate(95deg)  saturate(1.3); opacity: 0.065; }
html[data-theme="forest-tactical"] #panelNutrition .panel-wm { filter: hue-rotate(65deg)  saturate(1.2); opacity: 0.060; }
html[data-theme="forest-tactical"] #panelCalendar  .panel-wm { filter: hue-rotate(155deg) saturate(0.9); opacity: 0.050; }
html[data-theme="forest-tactical"] #panelRunners   .panel-wm { filter: hue-rotate(75deg)  saturate(1.3); opacity: 0.062; }
html[data-theme="forest-tactical"] #panelMessaging .panel-wm { filter: hue-rotate(100deg) saturate(0.8); opacity: 0.045; }
html[data-theme="forest-tactical"] #panelSession   .panel-wm { filter: hue-rotate(70deg)  saturate(0.9); opacity: 0.050; }
html[data-theme="forest-tactical"] body::before { opacity: 0.25; mix-blend-mode: soft-light; }
html[data-theme="forest-tactical"] body::after  { opacity: 0.15; mix-blend-mode: overlay; }

/* warm-amber — fondo #18181B, acento ámbar #D97706 */
html[data-theme="warm-amber"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.060;
}
html[data-theme="warm-amber"] #panelStats     .panel-wm { filter: hue-rotate(30deg)  saturate(1.3); opacity: 0.065; }
html[data-theme="warm-amber"] #panelNutrition .panel-wm { filter: hue-rotate(25deg)  saturate(1.4); opacity: 0.068; }
html[data-theme="warm-amber"] #panelCalendar  .panel-wm { filter: hue-rotate(155deg) saturate(0.9); opacity: 0.050; }
html[data-theme="warm-amber"] #panelCheckIn   .panel-wm { filter: hue-rotate(100deg) saturate(1.0); opacity: 0.050; }
html[data-theme="warm-amber"] #panelRunners   .panel-wm { filter: hue-rotate(20deg)  saturate(1.4); opacity: 0.062; }
html[data-theme="warm-amber"] #panelMessaging .panel-wm { filter: hue-rotate(35deg)  saturate(0.7); opacity: 0.045; }
html[data-theme="warm-amber"] #panelSession   .panel-wm { filter: hue-rotate(22deg)  saturate(0.9); opacity: 0.050; }
html[data-theme="warm-amber"] body::before { opacity: 0.24; mix-blend-mode: soft-light; }
html[data-theme="warm-amber"] body::after  { opacity: 0.14; mix-blend-mode: overlay; }

/* midnight-blue — fondo #080A0D, acento azul #4DB8FF */
html[data-theme="midnight-blue"] .panel-wm {
  mix-blend-mode: screen;
  opacity: 0.060;
}
html[data-theme="midnight-blue"] #panelStats     .panel-wm { filter: hue-rotate(200deg) saturate(1.2); opacity: 0.062; }
html[data-theme="midnight-blue"] #panelCalendar  .panel-wm { filter: hue-rotate(195deg) saturate(1.2); opacity: 0.062; }
html[data-theme="midnight-blue"] #panelCheckIn   .panel-wm { filter: hue-rotate(170deg) saturate(1.0); opacity: 0.052; }
html[data-theme="midnight-blue"] #panelNutrition .panel-wm { filter: hue-rotate(185deg) saturate(1.1); opacity: 0.058; }
html[data-theme="midnight-blue"] #panelRunners   .panel-wm { filter: hue-rotate(190deg) saturate(1.3); opacity: 0.062; }
html[data-theme="midnight-blue"] #panelMessaging .panel-wm { filter: hue-rotate(210deg) saturate(0.9); opacity: 0.052; }
html[data-theme="midnight-blue"] #panelSession   .panel-wm { filter: hue-rotate(180deg) saturate(0.8); opacity: 0.048; }
html[data-theme="midnight-blue"] body::before { opacity: 0.24; mix-blend-mode: soft-light; }
html[data-theme="midnight-blue"] body::after  { opacity: 0.15; mix-blend-mode: overlay; }

/* ── FIN AJUSTES WATERMARK POR TEMA ─────────────────────────────────────────── */

/* ── FASE 2-B: Panel header orbes temáticos por sección ──────────────────── */

/* Stats — burdeos intenso */
#panelStats .panel__header {
  --ph-orb-c1: rgba(92, 36, 48, 0.92);
  --ph-orb-c2: rgba(140, 28, 48, 0.55);
  --ph-orb-c3: rgba(55, 10, 20, 0.78);
}

/* Sesión — grafito cálido oscuro */
#panelSession .panel__header {
  --ph-orb-c1: rgba(60, 42, 32, 0.88);
  --ph-orb-c2: rgba(92, 64, 44, 0.48);
  --ph-orb-c3: rgba(30, 18, 10, 0.72);
}

/* Nutrición — terracota gold */
#panelNutrition .panel__header {
  --ph-orb-c1: rgba(139, 90, 58, 0.80);
  --ph-orb-c2: rgba(92, 60, 36, 0.50);
  --ph-orb-c3: rgba(55, 30, 10, 0.70);
}

/* Calendario — azul acero */
#panelCalendar .panel__header {
  --ph-orb-c1: rgba(59, 111, 140, 0.75);
  --ph-orb-c2: rgba(30, 72, 100, 0.48);
  --ph-orb-c3: rgba(10, 35, 55, 0.70);
}

/* Check-in — verde pino */
#panelCheckIn .panel__header {
  --ph-orb-c1: rgba(47, 107, 94, 0.78);
  --ph-orb-c2: rgba(28, 72, 62, 0.50);
  --ph-orb-c3: rgba(10, 38, 32, 0.72);
}

/* Runners — burdeos vivo con púrpura */
#panelRunners .panel__header {
  --ph-orb-c1: rgba(110, 28, 55, 0.88);
  --ph-orb-c2: rgba(80, 18, 40, 0.52);
  --ph-orb-c3: rgba(40, 8, 22, 0.75);
}

/* Mensajería — azul grafito */
#panelMessaging .panel__header {
  --ph-orb-c1: rgba(45, 42, 75, 0.82);
  --ph-orb-c2: rgba(28, 26, 60, 0.50);
  --ph-orb-c3: rgba(10, 10, 30, 0.70);
}

/* Profile — burdeos suave */
#panelProfile .panel__header {
  --ph-orb-c1: rgba(80, 28, 42, 0.82);
  --ph-orb-c2: rgba(110, 20, 44, 0.45);
  --ph-orb-c3: rgba(45, 8, 18, 0.68);
}

/* ── FASE 2-C: Separador temático post-header ─────────────────────────────── */

.panel__header + * {
  /* nada — no tocar el layout post-header */
}

/* ── FASE 3-A: Transición viewEnter con micro-translate — solo desktop ────── */

@media (min-width: 600px) and (prefers-reduced-motion: no-preference) {
  @keyframes viewEnterDesktop {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .panel--active {
    animation: viewEnterDesktop var(--transition-view) both;
  }
}

/* ── FASE 3-B: Rail lateral de acento en cc-priority items ───────────────── */

.cc-priority__item {
  border-left: 2px solid transparent;
  padding-left: calc(var(--space-sm) + 2px);
  transition: border-color var(--transition-fast);
}

/* El rail aparece solo en items de alta prioridad (clase añadida por JS) */
.cc-priority__item.is-urgent {
  border-left-color: var(--color-accent);
}

.cc-priority__item:hover {
  border-left-color: rgba(92, 36, 48, 0.4);
}

/* ── FASE 3-C: Ambient line en panel de mensajería ─────────────────────────  */

/* ── FASE 3-D: Bottom sheets — micro-gradiente de identidad ─────────────────
   Añadir atmósfera burdeos en la cabecera de cualquier sheet/drawer
   que sube desde abajo. ──────────────────────────────────────────────────── */

.runners-sheet__header {
  position: relative;
  overflow: hidden;
}

.runners-sheet__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 100% at 50% 0%,
    rgba(92, 36, 48, 0.07) 0%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 0;
}

/* Los hijos del header quedan por encima del gradiente */
.runners-sheet__header > * {
  position: relative;
  z-index: 1;
}

/* ── FIN MEJORAS VISUALES v106 ──────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════════
   FIX v107 — Layout dashboard móvil: topbar siempre visible
   dashboard__main min-height=100vh hacía crecer la página;
   con height=100dvh + overflow:hidden el scroll ocurre solo en dashboard__content
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  .dashboard__main {
    height: 100svh; /* svh: estable — 100dvh causaba jank al animar la barra de URL en iOS Safari */
    min-height: unset;
    overflow: hidden;
  }
}
/* ── FIN FIX v107 ─────────────────────────────────────────────────────────── */

/* ── _19-coach-video.css ── */
/* =============================================================================
   BIBLIOTECA DE VÍDEOS — v110
   ============================================================================= */

/* ── Buscador ── */
.library-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
}
.library-search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.library-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: max(16px, 0.875rem); /* --font-sm no definido; min 16px → evita zoom en iOS */
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.library-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.library-search-input::placeholder { color: var(--color-text-muted); }
.library-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.library-search-clear:hover { color: var(--color-text-primary); }

/* ── Resultados de búsqueda ── */
.library-search-results__label {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}
.library-row--wrap {
  flex-wrap: wrap;
  overflow-x: unset !important;
  gap: 12px;
}

/* ── Admin bar ── */
.library-admin-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 var(--space-sm);
}

/* ── Empty / loading state ── */

/* ── Categoría: fila ── */
.library-category {
  margin-bottom: var(--space-xl);
}
.library-category__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.library-category__title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: 1;
}
.library-category__add {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.library-category__add:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.library-category__del {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s;
}
.library-category__del:hover { color: var(--color-error); }

/* ── Scroll horizontal de tarjetas ── */
.library-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;}
.library-row::-webkit-scrollbar { height: 4px; }
.library-row::-webkit-scrollbar-track { background: transparent; }
.library-row::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* ── Tarjeta de vídeo ── */
.lib-card {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  cursor: pointer;
  position: relative;
}
.lib-card__thumb {
  width: 160px;
  height: 284px; /* 9:16 */
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-bg-deep);
  display: block;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 1px solid var(--color-border);
}
.lib-card:hover .lib-card__thumb {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.lib-card__play-overlay {
  position: absolute;
  inset: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 284px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.lib-card:hover .lib-card__play-overlay { opacity: 1; }
/* Siempre visible en dispositivos táctiles */
@media (hover: none) {
  .lib-card__play-overlay { opacity: 0.55; }
}
.lib-card__play-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.lib-card__title {
  margin-top: 7px;
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-card:hover .lib-card__delete { opacity: 1; }

/* ── Modales ── */
.lib-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lib-modal[hidden] { display: none; }
.lib-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}
.lib-modal__box {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border-radius: 16px;
  padding: var(--space-xl);
  width: min(480px, calc(100vw - 32px));
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}
.lib-modal__box--sm { width: min(340px, calc(100vw - 32px)); }
.lib-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}
.lib-modal__close:hover { color: var(--color-text-primary); }
.lib-modal__title {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  padding-right: 32px;
}
.lib-modal__form { display: flex; flex-direction: column; gap: var(--space-md); }
.lib-modal__label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}
.lib-modal__input {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text-primary);
  transition: border-color 0.15s;
}
.lib-modal__input:focus { outline: none; border-color: var(--color-accent); }
.lib-modal__input--file { padding: 8px 10px; cursor: pointer; }
.lib-modal__progress { margin-top: 4px; }
.lib-modal__progress-bar {
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.2s;
}
.lib-modal__progress-label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ── Reproductor fullscreen ── */
.lib-player {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lib-player[hidden] { display: none; }
.lib-player__video {
  max-width: 100%;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lib-player__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.lib-player__close:hover { background: rgba(255,255,255,0.3); }
.lib-player__title {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 60px;
  color: rgba(255,255,255,0.9);
  font-size: var(--font-sm);
  font-weight: 500;
  pointer-events: none;
}
.lib-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 16px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
}
.lib-player__bar-wrap { margin-bottom: 10px; }
.lib-player__seek {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.lib-player__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.lib-player__btns {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lib-player__btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.lib-player__btn:hover { opacity: 0.8; }
.lib-player__time {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-variant-numeric: tabular-nums;
  flex: 1;
}
.lib-player__mute { margin-left: auto; }

/* ── Skeleton loader ── */
@keyframes lib-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.lib-skeleton__row-title,
.lib-skeleton__card {
  background: linear-gradient(90deg, var(--color-bg-deep) 25%, var(--color-surface-hover) 50%, var(--color-bg-deep) 75%);
  background-size: 800px 100%;
  animation: lib-shimmer 1.4s infinite;
  border-radius: 6px;
}
.lib-skeleton__row-title {
  height: 14px;
  width: 120px;
  margin-bottom: 12px;
}
.lib-skeleton__row-title--2 { width: 90px; margin-top: 24px; }
.lib-skeleton__row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}
.lib-skeleton__card {
  width: 120px;
  height: 213px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ── Duración en tarjeta ── */
.lib-card__duration {
  position: absolute;
  bottom: 38px;
  right: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ── Badge "Visto" ── */
.lib-card__watched {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  background: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.lib-card--watched .lib-card__thumb {
  opacity: 0.72;
}

/* ── Botones editar en tarjeta (coach) ── */
.lib-card__actions {
  position: absolute;
  bottom: 38px;
  left: 5px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.lib-card:hover .lib-card__actions { opacity: 1; }
.lib-card__action-btn {
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.lib-card__action-btn:hover { background: rgba(0,0,0,0.85); }

/* ── Contador en cabecera de categoría ── */
.library-category__count {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-bg-deep);
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: 500;
}

/* ── Botones orden (coach) ── */
.library-category__order {
  display: flex;
  gap: 2px;
}
.library-category__order-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.library-category__order-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ── Preview portada en modal ── */
.lib-modal__cover-preview {
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  width: 80px;
}
.lib-modal__cover-preview img {
  width: 80px;
  height: 142px; /* 9:16 */
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.lib-modal__optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 12px;
}
.lib-modal__textarea {
  resize: vertical;
  min-height: 56px;
  font-family: inherit;
}
.lib-modal__file-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ── Reproductor: info (título + descripción) ── */
.lib-player__info {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 60px;
  pointer-events: none;
}
.lib-player__title {
  color: rgba(255,255,255,0.95);
  font-size: var(--font-sm);
  font-weight: 600;
  margin: 0 0 3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.lib-player__desc {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* ── Reproductor: botones prev / next ── */
.lib-player__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}
.lib-player__nav:hover { background: rgba(255,255,255,0.3); }
.lib-player__nav--prev { left: 12px; }
.lib-player__nav--next { right: 12px; }
@media (max-width: 480px) {
  .lib-player__nav { width: 36px; height: 36px; }
}

/* ── Fade-mask al final del scroll horizontal ── */
.library-row-wrap {
  position: relative;
}
.library-row-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: calc(100% - 8px);
  background: linear-gradient(to right, transparent, var(--color-bg));
  pointer-events: none;
  border-radius: 0 10px 10px 0;
  z-index: 1;
}
.library-row-wrap.no-overflow::after { display: none; }

/* ── Fila de filtros + toggle de vista ── */
.library-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.library-filter-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.library-filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: none;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.library-filter-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.library-filter-btn.is-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.library-view-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.library-view-btn:hover,
.library-view-btn.is-active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ── Vista cuadrícula ── */
.library-categories--grid .library-row {
  flex-wrap: wrap;
  overflow-x: visible;
  gap: 12px;
}
.library-categories--grid .lib-card {
  width: calc(50% - 6px);
}
.library-categories--grid .lib-card__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
}
.library-categories--grid .lib-card__duration {
  right: 8px;
}
.library-categories--grid .library-row-wrap::after { display: none; }
@media (min-width: 520px) {
  .library-categories--grid .lib-card { width: calc(33.33% - 8px); }
}

/* ── Reproductor: control de velocidad ── */
.lib-player__speed {
  position: relative;
}
.lib-player__speed-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.lib-player__speed-btn:hover { background: rgba(255,255,255,0.25); }
.lib-player__speed-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
  min-width: 72px;
}
.lib-player__speed-menu[hidden] { display: none; }
.lib-player__speed-option {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background 0.1s, color 0.1s;
}
.lib-player__speed-option:hover,
.lib-player__speed-option.is-active {
  background: var(--color-accent);
  color: #fff;
}

/* ── Reproductor: pantalla completa ── */
.lib-player__fullscreen-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.lib-player__fullscreen-btn:hover { opacity: 0.75; }

/* ── Reproductor: gradiente superior para título ── */
.lib-player__top-gradient {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Reproductor: botón "Consultar al coach" ── */
.lib-player__coach-btn {
  position: absolute;
  bottom: 88px;
  right: 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  z-index: 10;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.lib-player__coach-btn:hover { background: rgba(255,255,255,0.22); }
.lib-player__coach-btn[hidden] { display: none; }

/* ── Reproductor: seek bar con fill ── */
.lib-player__seek-wrap {
  position: relative;
  width: 100%;
  height: 16px;
  display: flex;
  align-items: center;
}
.lib-player__seek-fill {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  pointer-events: none;
  width: 0%;
  transition: width 0.1s linear;
}
.lib-player__seek {
  position: relative;
  z-index: 1;
}

/* ── Modal: selector de thumbnails automáticos ── */
.lib-modal__thumb-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lib-modal__thumb-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}
.lib-modal__thumb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lib-modal__thumb-option {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.lib-modal__thumb-option img {
  width: 60px;
  height: 106px; /* 9:16 */
  object-fit: cover;
  display: block;
  border-radius: 4px;
}
.lib-modal__thumb-option.is-selected { border-color: var(--color-accent); }

/* ── Estado error con retry ── */
.library-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: var(--space-xl) 0;
  text-align: center;
}
.library-error-state__msg {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}
.library-error-state__retry {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: none;
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.12s;
}
.library-error-state__retry:hover { background: var(--color-bg-deep); }

/* ── Estado vacío mejorado ── */
.library-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}
.library-empty-state__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.library-empty-state__title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0;
}
.library-empty-state__sub {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── ETA de subida ── */
.lib-modal__progress-eta {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ── Progreso global ── */
.library-global-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.library-global-progress__bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.library-global-progress__bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.library-global-progress__label {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Barra de progreso por categoría ── */
.library-category__progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.library-category__progress-bar-wrap {
  flex: 1;
  max-width: 80px;
  height: 3px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.library-category__progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.library-category__progress-label {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Últimos vistos / Recomendados ── */
.library-recents {
  margin-bottom: var(--space-lg);
}
.library-recents__header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.library-recents__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Tag badges en las tarjetas ── */
.lib-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 0 6px 6px;
  position: absolute;
  bottom: 38px;
  left: 0;
  right: 0;
  pointer-events: none;
}
.lib-card__tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Botones de reordenar vídeos en tarjeta ── */
.lib-card__reorder {
  position: absolute;
  top: 4px;
  left: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.lib-card:hover .lib-card__reorder,
.lib-card:focus-within .lib-card__reorder {
  opacity: 1;
}
.lib-card__reorder-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.lib-card__reorder-btn:hover { background: rgba(0,0,0,0.8); }
.lib-card__reorder-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Botón watched manual en tarjeta ── */
.lib-card__watched-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.lib-card:hover .lib-card__watched-toggle,
.lib-card:focus-within .lib-card__watched-toggle,
.lib-card--watched .lib-card__watched-toggle {
  opacity: 1;
}
.lib-card--watched .lib-card__watched-toggle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── PiP button ── */
.lib-player__pip-btn {
  /* hereda de .lib-player__btn */
}

/* ── Filtro por tag ── */
.library-tag-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.library-tag-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.library-tag-btn:hover { background: var(--color-surface); }
.library-tag-btn.is-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── Video preview en modal (antes de publicar) ── */
.lib-modal__video-preview {
  width: 100%;
  max-height: 160px;
  border-radius: 8px;
  margin-top: var(--space-sm);
  background: #000;
  object-fit: contain;
}

/* ── Dark mode ── */
[data-theme-mode="dark"] .lib-card__thumb { border-color: rgba(255,255,255,0.1); }
[data-theme-mode="dark"] .lib-modal__box { background: var(--color-surface); }
[data-theme-mode="dark"] .lib-modal__input { background: var(--color-bg-deep); }
[data-theme-mode="dark"] .library-search-input { background: var(--color-bg-deep); }

/* ─────────────────────────────────────────────────────────
   Plan-Updated Banner (member panel · panelWelcome)
───────────────────────────────────────────────────────── */
.plan-updated-banner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--color-primary, #2563eb) 0%, #1d4ed8 100%);
  border-radius: var(--radius-lg, 12px);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.25);
  margin-bottom: var(--space-md);
  position: relative;
}
.plan-updated-banner__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.plan-updated-banner__body {
  flex: 1;
  min-width: 0;
}
.plan-updated-banner__title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: #fff;
}
.plan-updated-banner__sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-updated-banner__cta {
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: var(--radius-md, 8px);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.plan-updated-banner__cta:hover { background: rgba(255,255,255,0.35); }
.plan-updated-banner__dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.plan-updated-banner__dismiss:hover { color: #fff; }

/* ─────────────────────────────────────────────────────────
   Coach Pending-Review Queue (coachTower)
───────────────────────────────────────────────────────── */
.coach-pending-review {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}
.coach-pending-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.coach-pending-review__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #6b7280);
  margin: 0 0 2px;
}
.coach-pending-review__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text, #111827);
}
.coach-pending-review__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--color-primary, #2563eb);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 6px;
}
.coach-pending-review__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.coach-pending-review__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 8px;
  background: var(--color-bg, #f9fafb);
  border-radius: var(--radius-md, 8px);
}
.coach-pending-review__name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text, #111827);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coach-pending-review__date {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6b7280);
  flex-shrink: 0;
}

.coach-pending-review--inbox {
  border-color: color-mix(in srgb, var(--color-accent, #5C2430) 45%, var(--color-border, #e5e7eb));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent, #5C2430) 12%, transparent);
}

.coach-pending-review__sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--color-text-muted, #6b7280);
}

.coach-pending-review__item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
}

.coach-pending-review__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.coach-pending-review__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  min-width: 0;
  flex: 1;
}

.coach-pending-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.coach-pending-review__ai:not([hidden]),
.coach-pending-review__ai-reason:not([hidden]) {
  display: inline;
  font-size: 0.72rem;
}

.coach-pending-review__ai-reason {
  color: var(--color-text-muted, #6b7280);
}

.coach-pending-review__badge {
  background: var(--color-accent, #5C2430);
}

/* ─────────────────────────────────────────────────────────
   Herramientas: Plan · Nutri · Ops
───────────────────────────────────────────────────────── */
.trainer-tools-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: var(--space-lg, 1.25rem);
}

.trainer-tools-group {
  border: 1px solid var(--color-border, rgba(92, 36, 48, 0.15));
  border-radius: 16px;
  background: var(--color-surface, #fff);
  overflow: hidden;
}

.trainer-tools-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.trainer-tools-group__titles {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.trainer-tools-group__title {
  font-family: var(--font-heading, inherit);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.trainer-tools-group__sub {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6b7280);
}

.trainer-tools-group__chev {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.trainer-tools-group.is-open .trainer-tools-group__chev {
  transform: rotate(-135deg);
}

.trainer-tools-group__body {
  padding: 0 0.75rem 0.75rem;
}

.trainer-tools-group__body > .card {
  margin-top: 0.65rem !important;
  margin-bottom: 0 !important;
}

/* ─────────────────────────────────────────────────────────
   WCI Coach-Feedback Banner (panelCheckIn)
───────────────────────────────────────────────────────── */
.wci-coach-feedback-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-success-bg, #f0fdf4);
  border: 1px solid var(--color-success-border, #bbf7d0);
  border-radius: var(--radius-lg, 12px);
  margin-bottom: var(--space-md);
}
.wci-coach-feedback-banner__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.wci-coach-feedback-banner__body {
  flex: 1;
  min-width: 0;
}
.wci-coach-feedback-banner__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-success-text, #166534);
  margin: 0 0 3px;
}
.wci-coach-feedback-banner__text {
  font-size: 0.82rem;
  color: var(--color-text, #111827);
  margin: 0 0 6px;
  line-height: 1.45;
}
.wci-coach-feedback-banner__cta {
  background: none;
  border: 1px solid var(--color-success-border, #bbf7d0);
  color: var(--color-success-text, #166534);
  border-radius: var(--radius-sm, 6px);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.wci-coach-feedback-banner__cta:hover {
  background: var(--color-success-border, #bbf7d0);
}

[data-theme-mode="dark"] .wci-coach-feedback-banner {
  background: rgba(22,163,74,0.12);
  border-color: rgba(22,163,74,0.3);
}
[data-theme-mode="dark"] .wci-coach-feedback-banner__label { color: #86efac; }
[data-theme-mode="dark"] .wci-coach-feedback-banner__cta { color: #86efac; border-color: rgba(22,163,74,0.3); }
[data-theme-mode="dark"] .coach-pending-review { background: var(--color-surface-raised, #1f2937); border-color: var(--color-border-dark, #374151); }
[data-theme-mode="dark"] .coach-pending-review__item { background: var(--color-bg-deep, #111827); }
[data-theme-mode="dark"] .plan-updated-banner { box-shadow: 0 2px 16px rgba(37,99,235,0.4); }

/* =============================================================================
   COACH-ATHLETE IMPROVEMENTS v2 — all new CSS classes
   ============================================================================= */

/* ─── Coach Goal Widget ──────────────────────────────────────────────────────── */
.coach-goal-widget {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm, 12px);
  padding: var(--space-md, 16px);
  background: linear-gradient(135deg, rgba(16,185,129,0.07) 0%, rgba(59,130,246,0.07) 100%);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 12px;
  margin-bottom: var(--space-md, 16px);
}
.coach-goal-widget__icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.coach-goal-widget__body { flex: 1; min-width: 0; }
.coach-goal-widget__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 4px;
}
.coach-goal-widget__text {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--color-text, #111827);
  line-height: 1.45;
}
.coach-goal-widget__target {
  margin-top: 6px;
  font-size: .8125rem;
  color: var(--color-text-muted, #6b7280);
}
.coach-goal-widget__sla {
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6b7280);
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 3px 9px;
  white-space: nowrap;
  align-self: center;
}
[data-theme-mode="dark"] .coach-goal-widget {
  background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(59,130,246,0.1) 100%);
  border-color: rgba(16,185,129,0.3);
}
[data-theme-mode="dark"] .coach-goal-widget__text { color: var(--color-text-light, #f1f5f9); }

/* ─── Cycle Week Widget ──────────────────────────────────────────────────────── */
.cycle-week-widget {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 14px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  margin-bottom: var(--space-sm, 12px);
}
.cycle-week-widget__label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-text, #111827);
}
.cycle-week-widget__phase {
  font-size: .8125rem;
  color: var(--color-text-muted, #6b7280);
  flex: 1;
}
.cycle-week-widget__progress {
  width: 100%;
  height: 4px;
  background: var(--color-border, #e5e7eb);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.cycle-week-widget__progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--cycle-pct, 0%);
  background: var(--color-primary, #2563eb);
  border-radius: 2px;
  transition: width .6s ease;
}
[data-theme-mode="dark"] .cycle-week-widget {
  background: var(--color-surface-raised, #1f2937);
  border-color: var(--color-border-dark, #374151);
}
[data-theme-mode="dark"] .cycle-week-widget__label { color: #f1f5f9; }

/* ─── Tower Metric Chips ─────────────────────────────────────────────────────── */
.tower-metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}
.tower-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .6875rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.tower-metric-chip--sessions { background: rgba(59,130,246,0.12); color: #2563eb; }
.tower-metric-chip--comment  { background: rgba(139,92,246,0.12); color: #7c3aed; }

/* ─── Decision Type Selector ─────────────────────────────────────────────────── */
.wci-acc__decision-type { margin-bottom: 10px; }
.wci-acc__decision-type-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 6px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.wci-acc__decision-type-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wci-decision-btn {
  padding: 5px 14px;
  font-size: .8125rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  transition: all .15s;
}
.wci-decision-btn:hover,
.wci-decision-btn.is-active {
  border-color: var(--color-primary, #2563eb);
  color: var(--color-primary, #2563eb);
  background: rgba(37,99,235,0.07);
}
.wci-decision-btn--warning.is-active {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(239,68,68,0.08);
}
.wci-acc__draft-hint {
  font-size: .75rem;
  color: var(--color-text-muted, #6b7280);
  margin-top: 4px;
}

/* ─── Adherence Ranking ──────────────────────────────────────────────────────── */
.coach-adherence-rank {
  padding: var(--space-md, 16px);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  margin-bottom: var(--space-md, 16px);
}
.coach-adherence-rank__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-text, #111827);
  margin-bottom: 10px;
}
.coach-adherence-rank__list { list-style: none; margin: 0; padding: 0; }
.coach-adherence-rank__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.coach-adherence-rank__item:last-child { border-bottom: none; }
.coach-adherence-rank__medal { font-size: .875rem; flex-shrink: 0; width: 24px; }
.coach-adherence-rank__name { flex: 1; font-size: .875rem; font-weight: 500; color: var(--color-text, #111827); }
.coach-adherence-rank__bar {
  flex: 2;
  height: 6px;
  background: var(--color-border, #e5e7eb);
  border-radius: 3px;
  overflow: hidden;
}
.coach-adherence-rank__bar span {
  display: block;
  height: 100%;
  background: var(--color-primary, #2563eb);
  border-radius: 3px;
  transition: width .5s ease;
}
.coach-adherence-rank__score {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-primary, #2563eb);
  width: 28px;
  text-align: right;
}
[data-theme-mode="dark"] .coach-adherence-rank {
  background: var(--color-surface-raised, #1f2937);
  border-color: var(--color-border-dark, #374151);
}

/* ─── Onboarding Checklist ───────────────────────────────────────────────────── */
.coach-onboarding-check {
  padding: var(--space-md, 16px);
  background: rgba(245,158,11,0.06);
  border: 1.5px solid rgba(245,158,11,0.3);
  border-radius: 12px;
  margin-bottom: var(--space-md, 16px);
}
.coach-onboarding-check__title {
  font-size: .875rem;
  font-weight: 700;
  color: #92400e;
  flex: 1;
}
.coach-onboarding-check__badge {
  background: #d97706;
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.coach-onboarding-check__list { list-style: none; margin: 0 0 10px; padding: 0; }
.coach-onboarding-check__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: .875rem;
  color: var(--color-text, #111827);
}
.coach-onboarding-check__item.is-done { opacity: .55; text-decoration: line-through; }
.coach-onboarding-check__icon { font-size: .875rem; flex-shrink: 0; }
[data-theme-mode="dark"] .coach-onboarding-check {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.35);
}
[data-theme-mode="dark"] .coach-onboarding-check__title { color: #fcd34d; }

/* ─── Split Changelog ────────────────────────────────────────────────────────── */
.split-changelog {
  margin-top: var(--space-md, 16px);
  padding: var(--space-md, 16px);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
}
.split-changelog__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.split-changelog__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-text, #111827);
  flex: 1;
}
.split-changelog__list { list-style: none; margin: 8px 0 0; padding: 0; }
.split-changelog__item {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.split-changelog__item:last-child { border-bottom: none; }
.split-changelog__date {
  font-size: .75rem;
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
  flex-shrink: 0;
}
.split-changelog__summary {
  font-size: .8125rem;
  color: var(--color-text, #111827);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme-mode="dark"] .split-changelog {
  background: var(--color-surface-raised, #1f2937);
  border-color: var(--color-border-dark, #374151);
}
[data-theme-mode="dark"] .split-changelog__title { color: #f1f5f9; }

/* ─── WCI Share Progress ─────────────────────────────────────────────────────── */
.wci-share-progress {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-sm, 12px) 0;
}

/* ─── Photo Retake Banner ────────────────────────────────────────────────────── */
.wci-photo-retake-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm, 12px);
  padding: var(--space-md, 16px);
  background: rgba(245,158,11,0.08);
  border: 1.5px solid rgba(245,158,11,0.35);
  border-radius: 12px;
  margin-bottom: var(--space-md, 16px);
}
.wci-photo-retake-banner__icon { font-size: 1.25rem; flex-shrink: 0; }
.wci-photo-retake-banner__title {
  font-size: .875rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 3px;
}
.wci-photo-retake-banner__sub {
  font-size: .8125rem;
  color: var(--color-text-muted, #6b7280);
}
[data-theme-mode="dark"] .wci-photo-retake-banner {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.4);
}
[data-theme-mode="dark"] .wci-photo-retake-banner__title { color: #fcd34d; }

/* ─── Retake Btn ─────────────────────────────────────────────────────────────── */
.wci-retake-btn.is-active {
  border-color: #d97706 !important;
  color: #d97706 !important;
  background: rgba(217,119,6,0.08) !important;
}

/* ─── Ocultar topbar cuando el teclado virtual está visible (sesión activa) ── */
@media (max-width: 767px) {
  body.keyboard-open .topbar {
    visibility: hidden;
    pointer-events: none;
    /* mantiene el espacio para evitar layout shift */
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NULLUM — Welcome Screen: diseño limpio y premium
   2026-10 — más aire, jerarquía clara, identidad de marca
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── 1. Welcome wrapper: gap mínimo entre secciones ── */
.welcome {
  gap: 0.5rem;
}

/* ── 2. Hero zone: más respiro, bordes más suaves ── */
.welcome__hero-zone {
  padding: 2.1rem 1.4rem 1.9rem;
  border-radius: 28px;
  margin: 0 0 0.25rem;
  /* Textura muy sutil sobre el fondo oscuro */
  background-image:
    url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"),
    none;
}

/* ── 3. NULLUM wordmark: protagonismo absoluto ── */
.welcome__zone-brand {
  margin: 0 0 0;
  padding-bottom: 0;
  border-bottom: none;
}

.welcome__zone-wordmark {
  font-family: 'Plus Jakarta Sans', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(3.2rem, 13vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  /* Gradiente: blanco puro → tinte del acento del tema */
  background: linear-gradient(
    160deg,
    #ffffff 25%,
    color-mix(in srgb, var(--color-accent) 35%, #ffffff) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Línea divisora fina bajo la marca */
.welcome__zone-brand::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.22);
  margin: 1rem 0 1.2rem;
}

/* ── 4. Greeting dentro de la zona hero ── */
.welcome__hero-zone .welcome__greeting {
  margin: 0 0 1.15rem;
  padding-left: 0;
  border-left: none;
}

.welcome__hello {
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.welcome__role {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

/* ── 5. Sesiones hero CTA: mantener esencia, mejorar forma ── */
.welcome__hero-zone .welcome-hero {
  width: 100%;
  margin: 0 0 1rem;
  border-radius: 18px;
  min-height: 5rem;
  padding: 1.15rem 1.35rem;
}

.welcome-hero__label {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  letter-spacing: 0.1em;
}

.welcome-hero__cta {
  font-size: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  letter-spacing: 0.06em;
}

/* ── 6. Readiness widget: horizontal compacto ── */
.welcome__hero-zone .readiness-widget {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  text-align: left;
  margin: 0 0 1rem;
  border-radius: 14px;
}

.welcome__hero-zone .readiness-widget .readiness-widget__score-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
}

.welcome__hero-zone .readiness-widget .readiness-widget__score {
  font-size: 2.1rem;
  line-height: 1;
}

.welcome__hero-zone .readiness-widget .readiness-widget__max {
  font-size: 0.8rem;
  opacity: 0.5;
}

.welcome__hero-zone .readiness-widget .readiness-widget__label,
.welcome__hero-zone .readiness-widget .readiness-widget__hint {
  text-align: left;
  display: block;
  margin: 0;
}

.welcome__hero-zone .readiness-widget .readiness-widget__label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.welcome__hero-zone .readiness-widget .readiness-widget__hint {
  font-size: 0.72rem;
  margin-top: 0.15rem;
  opacity: 0.55;
  line-height: 1.4;
}

/* ── 7. Welcome chips: pills limpios ── */
.welcome-chips__chip {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.welcome-chips__label {
  font-size: 0.72rem;
}

/* ── 8. Habits / Check-in: card más pulida ── */
.habits {
  border-radius: 22px;
  padding: 1.5rem 1.35rem 1.5rem;
  border-top-color: var(--color-accent, #5C2430);
  border-top-width: 2px;
  max-width: 480px;
}

.habits__header {
  margin-bottom: 1.25rem;
}

.habits__title {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
}

.habits__eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.22rem;
}

/* Slider rows: un poco más de espacio entre ellos */
.habits__slider {
  margin-bottom: 0.1rem;
}

.habits__label {
  margin-bottom: 0.2rem;
}

/* Thumb del slider: más ancho y visible */
:root {
  --slider-thumb-visual-w: 4px;
  --slider-thumb-visual-h: 18px;
}

/* Track más claro en modo claro */
.habits__track-wrap::before {
  background: var(--color-border, rgba(0,0,0,0.1));
  border-radius: 2px;
}

/* Fill: aumentar contraste */
.habits__fill {
  border-radius: 2px;
}

/* Save button: más elegante */
.habits__save-btn {
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-accent) 32%, transparent), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ── 9. Precision widget: más aire ── */
.precision {
  border-radius: 22px;
  max-width: 480px;
  margin: 0 auto var(--space-lg);
}

.precision__header {
  margin-bottom: 1.25rem;
}

.precision__eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.22rem;
}

.precision__title {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
}

/* ── 10. Constancy widget: más aire ── */
.constancy {
  border-radius: 22px;
  max-width: 480px;
  margin: 0 auto var(--space-xl);
}

.constancy__eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
}

.constancy__title {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
}

/* Semana dots más grandes */
.constancy__week-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ── 11. Coach-goal widget dentro del hero ── */
.coach-goal-widget {
  border-radius: 14px;
  margin: 0 0 0.9rem;
}

/* ── 12. Cycle-week widget dentro del hero ── */
.cycle-week-widget {
  border-radius: 12px;
  margin: 0 0 0.9rem;
}

/* ── 13. Plan-updated banner: más limpio ── */
.plan-updated-banner {
  border-radius: 14px;
  margin: 0 0 0.9rem;
}

/* ── 14. Coach tower (trainer view): tarjetas más suaves ── */
.coach-tower {
  border-radius: 0;
}

.coach-cc__tile {
  border-radius: 18px;
}

/* ── 15. Modo oscuro: ajustes adicionales ── */
/* El borde de habits y la sombra del botón ya usan var(--color-accent) — se adaptan solos */

/* ── 16. Ajuste responsive móvil ── */
@media (max-width: 479px) {
  .welcome__hero-zone {
    padding: 1.75rem 1.1rem 1.6rem;
    border-radius: 22px;
  }

  .welcome__zone-wordmark {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .habits,
  .precision,
  .constancy {
    border-radius: 18px;
  }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NULLUM — Animaciones e interacciones premium
   2026-10 — scroll-reveal · shimmer · lift · orb · pulse · feedback
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── 0. Respeto a prefers-reduced-motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .welcome__hero-zone::before,
  .welcome__zone-wordmark,
  .welcome__hero-zone .readiness-widget__score,
  .topbar,
  .welcome,
  [class*="btn"]::after,
  .habits__save-btn::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Keyframes globales ──────────────────────────────────────────────── */

@keyframes nlm-reveal-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes nlm-orb-drift {
  0%   { transform: translate(0%,   0%)   scale(1.0);  opacity: 0.65; }
  28%  { transform: translate(14%,  -9%)  scale(1.12); opacity: 0.88; }
  62%  { transform: translate(-6%,  11%)  scale(0.91); opacity: 0.72; }
  100% { transform: translate(9%,   6%)   scale(1.06); opacity: 0.82; }
}

@keyframes nlm-shimmer {
  0%, 52%  { left: -85%; opacity: 0; }
  55%      { opacity: 1; }
  100%     { left: 135%; opacity: 0; }
}

@keyframes nlm-score-pulse {
  0%, 100% { filter: drop-shadow(0 0 0px transparent);                                    opacity: 1;   }
  50%      { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--color-accent) 70%, #fff)); opacity: 0.88; }
}

@keyframes nlm-text-sweep {
  from { background-position: 200% center; }
  to   { background-position: -60% center; }
}

@keyframes nlm-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes nlm-fade-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes nlm-num-pop {
  0%   { opacity: 0; transform: scale(0.6)  translateY(6px);  }
  65%  { opacity: 1; transform: scale(1.08) translateY(-2px); }
  100% { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ─────────────────────────────────────────────────────────────────────
   1. SCROLL-REVEAL — tarjetas entran al viewport
   ───────────────────────────────────────────────────────────────────── */

@supports (animation-timeline: view()) {
  .habits,
.precision,
.constancy,
.card,
.coach-cc__tile,
.plan-updated-banner,
.coach-goal-widget,
.cycle-week-widget,
[class*="panel-card"],
[class*="data-card"],
[class*="info-card"] {
    animation: nlm-reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 18%;
  }
}

/* Fallback sin scroll-driven animations */
@supports not (animation-timeline: view()) {
  .habits    { animation: nlm-reveal-up 0.55s 0.08s ease-out both; }
  .precision { animation: nlm-reveal-up 0.55s 0.18s ease-out both; }
  .constancy { animation: nlm-reveal-up 0.55s 0.28s ease-out both; }
  .coach-cc__tile { animation: nlm-reveal-up 0.4s ease-out both; }
}

/* ─────────────────────────────────────────────────────────────────────
   2. HERO ORB — ambiente vivo en el hero zone
   ───────────────────────────────────────────────────────────────────── */

.welcome__hero-zone {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.welcome__hero-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 65% 55% at 18% 30%,
      color-mix(in srgb, var(--color-accent) 38%, transparent) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 50% 45% at 82% 72%,
      color-mix(in srgb, var(--color-accent) 22%, transparent) 0%,
      transparent 62%
    );
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  animation: nlm-orb-drift 11s ease-in-out infinite alternate;
}

.welcome__hero-zone > * {
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────────
   3. CARD LIFT — tarjetas responden al cursor
   ───────────────────────────────────────────────────────────────────── */

.habits,
.precision,
.constancy {
  transition:
    transform   0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow  0.28s ease;
  will-change: transform;
}

.habits:hover,
.precision:hover,
.constancy:hover {
  transform: translateY(-4px);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.13),
    0 4px 14px  rgba(0, 0, 0, 0.07),
    0 0 0 1px   var(--color-border);
}

.card {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.coach-cc__tile {
  transition:
    transform    0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow   0.22s ease,
    border-color 0.22s ease;
  will-change: transform;
}

.coach-cc__tile:hover {
  transform: translateY(-3px) scale(1.018);
  box-shadow: var(--shadow-heavy);
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
}

/* ─────────────────────────────────────────────────────────────────────
   4. BUTTON SHIMMER — brillo que barre los CTAs
   ───────────────────────────────────────────────────────────────────── */

.habits__save-btn,
.btn,
.btn-primary,
[class*="btn--fill"],
[class*="save-btn"],
[class*="--primary"],
.constancy__cta-btn,
.precision__cta-btn {
  position: relative;
  overflow: hidden;
}

.habits__save-btn::after,
.btn::after,
.btn-primary::after,
[class*="btn--fill"]::after,
[class*="--primary"]::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -85%;
  width: 42%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.20) 50%,
    transparent 100%
  );
  transform: skewX(-22deg);
  animation: nlm-shimmer 4s ease-in-out 1.2s infinite;
  pointer-events: none;
}

/* Shimmer inmediato en hover */
.habits__save-btn:hover::after,
.btn:hover::after,
.btn-primary:hover::after {
  animation-duration: 0.5s;
  animation-delay: 0s;
  animation-iteration-count: 1;
}

/* ─────────────────────────────────────────────────────────────────────
   5. CHIPS PRESS FEEDBACK — microinteracción táctil
   ───────────────────────────────────────────────────────────────────── */

.welcome-chips__chip,
.chip,
.theme-option,
[role="tab"],
[class*="pill-btn"],
[class*="filter-chip"],
[class*="tag-chip"] {
  transition:
    transform         0.13s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color  0.15s ease,
    border-color      0.15s ease,
    color             0.15s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.welcome-chips__chip:active,
.chip:active,
.theme-option:active,
[role="tab"]:active {
  transform: scale(0.90);
}

.welcome-chips__chip:hover,
.theme-option:hover:not([aria-checked="true"]) {
  transform: scale(1.05) translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────────
   6. READINESS PULSE — score que late suavemente
   ───────────────────────────────────────────────────────────────────── */

.welcome__hero-zone .readiness-widget__score {
  display: inline-block;
  animation: nlm-score-pulse 3.8s ease-in-out 2s infinite;
}

/* ─────────────────────────────────────────────────────────────────────
   7. WORDMARK SHIMMER — barrido de brillo al cargar
   ───────────────────────────────────────────────────────────────────── */

.welcome__zone-wordmark {
  background-image: linear-gradient(
    110deg,
    color-mix(in srgb, var(--color-accent) 28%, #ffffff)  0%,
    #ffffff                                                25%,
    rgba(255, 255, 255, 0.82)                              38%,
    #ffffff                                                50%,
    rgba(255, 255, 255, 0.88)                              62%,
    #ffffff                                                75%,
    color-mix(in srgb, var(--color-accent) 28%, #ffffff) 100%
  );
  background-size: 300% 100%;
  animation: nlm-text-sweep 2s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

/* ─────────────────────────────────────────────────────────────────────
   8. ROW ITEMS — slide lateral en hover
   ───────────────────────────────────────────────────────────────────── */

[class*="set-row"],
[class*="exercise-row"],
[class*="log-row"],
[class*="session-row"],
[class*="entry-row"],
[class*="athlete-row"],
[class*="list-row"],
[class*="check-row"] {
  transition: transform 0.16s ease, background-color 0.16s ease;
}

[class*="set-row"]:hover,
[class*="exercise-row"]:hover,
[class*="session-row"]:hover,
[class*="entry-row"]:hover,
[class*="athlete-row"]:hover {
  transform: translateX(4px);
}

/* ─────────────────────────────────────────────────────────────────────
   9. NÚMEROS STAT — pop al entrar en vista
   ───────────────────────────────────────────────────────────────────── */

[class*="__big-num"],
[class*="__metric-val"],
[class*="__stat-val"] {
  animation: nlm-num-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

/* ─────────────────────────────────────────────────────────────────────
   10. TOPBAR + WELCOME — entrada al montar el panel
   ───────────────────────────────────────────────────────────────────── */

.topbar {
  animation: nlm-slide-down 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.welcome {
  animation: nlm-fade-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

/* ─────────────────────────────────────────────────────────────────────
   11. FOCUS RING GLOBAL — accesible + temático
   ───────────────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-offset 0.12s ease;
}

/* ─────────────────────────────────────────────────────────────────────
   12. MODAL / DRAWER ENTRANCE — paneles secundarios
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

[class*="modal__dialog"],
[class*="modal-dialog"],
[class*="drawer__panel"],
[class*="sheet__panel"],
[class*="popup__body"] {
  animation: nlm-modal-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ─────────────────────────────────────────────────────────────────────
   13. STICKER / BADGE — aparecer con rebote
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-badge-pop {
  from { opacity: 0; transform: scale(0) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg);  }
}

[class*="badge"],
[class*="sticker"],
[class*="--dot"] {
  animation: nlm-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

/* ─────────────────────────────────────────────────────────────────────
   14. LINK / ANCHOR HOVER — subrayado animado
   ───────────────────────────────────────────────────────────────────── */

[class*="__link"],
[class*="__anchor"],
[class*="see-all"],
[class*="ver-todo"] {
  background-image: linear-gradient(
    currentColor,
    currentColor
  );
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
  text-decoration: none;
}

[class*="__link"]:hover,
[class*="__anchor"]:hover,
[class*="see-all"]:hover,
[class*="ver-todo"]:hover {
  background-size: 100% 1.5px;
}

/* ─────────────────────────────────────────────────────────────────────
   15. SKELETON / LOADING — pulse suave en placeholders
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

[class*="skeleton"],
[class*="--loading"],
[class*="__placeholder"],
[aria-busy="true"] {
  animation: nlm-skeleton-pulse 1.5s ease-in-out infinite;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NULLUM — Mejoras interacción v2
   2026-10 — counter roll · progress fill · ripple · nav pill · toast · confetti
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─────────────────────────────────────────────────────────────────────
   16. PROGRESS BARS — relleno animado al entrar en viewport
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-bar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Barras de hábitos */
.habits__fill,
.habits__track-wrap > [class*="fill"],
[class*="__bar-fill"],
[class*="__progress-fill"],
[class*="progress__bar"],
[class*="__track"] > [class*="fill"] {
  transform-origin: left center;
}

@supports (animation-timeline: view()) {
  .habits__fill,
  .habits__track-wrap > [class*="fill"],
  [class*="__bar-fill"],
  [class*="__progress-fill"] {
    animation: nlm-bar-fill 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-timeline: view();
    animation-range: entry 5% entry 40%;
  }
}

@supports not (animation-timeline: view()) {
  .habits__fill,
  [class*="__bar-fill"],
  [class*="__progress-fill"] {
    animation: nlm-bar-fill 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* Barra de progreso de onboarding/ciclo */
.cycle-week-widget__progress,
.welcome-onboarding__bar,
[class*="cycle__bar"],
[class*="week__fill"] {
  transform-origin: left center;
  animation: nlm-bar-fill 1.1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─────────────────────────────────────────────────────────────────────
   17. COUNTER ROLL — números grandes que "ruedan" al aparecer
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-counter-roll {
  0%   { opacity: 0; transform: perspective(400px) translateY(60%) scale(0.7) rotateX(-40deg); filter: blur(4px); }
  60%  { opacity: 1; filter: blur(0); }
  80%  { transform: perspective(400px) translateY(-4%) scale(1.04) rotateX(4deg); }
  100% { opacity: 1; transform: perspective(400px) translateY(0) scale(1) rotateX(0deg); filter: blur(0); }
}

/* readiness-widget__score excluido: ya tiene nlm-score-pulse con mayor especificidad */
[class*="__big-num"],
[class*="__metric-val"],
[class*="__stat-val"],
[class*="__score-num"],
[class*="streak-count"] {
  display: inline-block;
  animation: nlm-counter-roll 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

/* ─────────────────────────────────────────────────────────────────────
   18. RIPPLE — ola circular en botones al pulsar
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-ripple {
  0%   { transform: scale(0); opacity: 0.55; }
  60%  { opacity: 0.28; }
  100% { transform: scale(3.8); opacity: 0; }
}

.habits__save-btn,
.btn, .btn-primary,
[class*="btn--fill"],
[class*="--primary"],
.constancy__cta-btn,
.precision__cta-btn,
.nlm-nav__cta {
  position: relative;
  overflow: hidden;
}

.nlm-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  width: 60px;
  height: 60px;
  margin-top: -30px;
  margin-left: -30px;
  pointer-events: none;
  animation: nlm-ripple 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ─────────────────────────────────────────────────────────────────────
   19. NAV PILL INDICATOR — indicador deslizante en tabs
   ───────────────────────────────────────────────────────────────────── */

.nlm-tabs__rail {
  position: relative;
}

.nlm-tabs__btn {
  position: relative;
  transition: color 0.22s ease, background-color 0.22s ease;
  z-index: 1;
}

/* Pill real inyectada por JS como .nlm-pill-el — el ::before fue descartado */

/* ─────────────────────────────────────────────────────────────────────
   20. SIDEBAR LINKS — hover y activo mejorado
   ───────────────────────────────────────────────────────────────────── */

.sidebar__link {
  transition: background-color 0.18s ease, color 0.18s ease,
              transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s ease;
  will-change: transform;
}

.sidebar__link:hover {
  transform: translateX(3px);
  background-color: var(--cm-accent-8);
}

.sidebar__link--active,
.sidebar__link.is-active {
  background-color: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface));
  border-left: 2px solid var(--color-accent);
}

/* ─────────────────────────────────────────────────────────────────────
   21. TOAST / SNACKBAR — entrada y salida animada
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-toast-in {
  from { opacity: 0; transform: translateY(100%) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nlm-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(100%) scale(0.88); }
}

.app-toast-host,
[class*="toast"],
[class*="snackbar"],
[class*="pr-toast"] {
  animation: nlm-toast-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[class*="toast"].is-leaving,
[class*="snackbar"].is-leaving,
[class*="pr-toast"].is-leaving {
  animation: nlm-toast-out 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.pr-toast__inner {
  box-shadow:
    0 12px 40px rgba(0,0,0,0.22),
    0 4px 12px rgba(0,0,0,0.12),
    0 0 0 1px color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─────────────────────────────────────────────────────────────────────
   22. SUCCESS STATE — checkmark animado y confetti burst
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-check-draw {
  from { stroke-dashoffset: 40; opacity: 0; }
  to   { stroke-dashoffset: 0;  opacity: 1; }
}
@keyframes nlm-check-ring {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes nlm-confetti-a {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(-48px) rotate(340deg) scale(0.4); opacity: 0; }
}
@keyframes nlm-confetti-b {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(-52px) rotate(-270deg) scale(0.3); opacity: 0; }
}

[class*="__success-icon"],
[class*="success-check"],
[class*="check-icon"] {
  animation: nlm-check-ring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

[class*="__success-icon"] svg path,
[class*="success-check"] svg path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: nlm-check-draw 0.4s 0.3s ease forwards;
}

/* Confetti dots — se inyectan vía JS como .nlm-confetti-dot */
.nlm-confetti-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--color-accent);
}
.nlm-confetti-dot:nth-child(odd) {
  animation: nlm-confetti-a 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  background: color-mix(in srgb, var(--color-accent) 80%, #fff);
}
.nlm-confetti-dot:nth-child(even) {
  animation: nlm-confetti-b 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
  background: color-mix(in srgb, var(--color-accent) 55%, #fff);
}

/* ─────────────────────────────────────────────────────────────────────
   23. SECTION / PANEL TRANSITIONS — slide-fade entre vistas
   ───────────────────────────────────────────────────────────────────── */

@keyframes nlm-section-in {
  from { opacity: 0; transform: translateX(18px) scale(0.985); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes nlm-section-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(-18px) scale(0.985); }
}

/* Panels de tabs internos (nlm-tabs__panel) */
.nlm-tabs__panel {
  transition: opacity 0.22s ease;
}

/* Secciones del dashboard al activarse */
.dashboard > .welcome,
.dashboard > [class*="section"],
.dashboard > [class*="view"] {
  animation: nlm-section-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Clase que JS puede añadir al cambiar de sección */
.nlm-section-entering {
  animation: nlm-section-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}
.nlm-section-leaving {
  animation: nlm-section-out 0.22s cubic-bezier(0.4, 0, 1, 1) forwards !important;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────
   24. REDUCED MOTION — apaga todo lo nuevo
   ───────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .nlm-ripple-wave,
  .nlm-confetti-dot,
  .nlm-section-entering,
  .nlm-section-leaving {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .habits__fill,
.cycle-week-widget__progress,
.welcome-onboarding__bar,
[class*="__bar-fill"],
[class*="__progress-fill"],
[class*="__big-num"],
[class*="__metric-val"] {
    animation: none !important;
  }
}

/* ==========================================================================
   10 MEJORAS — NULLUM v2
   Features: KPI bar, charts, macros calc, templates, monthly report,
   messaging, photo upload, push, AI trends, offline
   ========================================================================== */

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes kpi-pop {
  0%   { transform: scale(0.7) translateY(10px); opacity: 0; }
  60%  { transform: scale(1.05) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}
@keyframes kpi-count {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ring-spin {
  from { stroke-dashoffset: 314; }
}
@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes msg-in-right {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes msg-in-left {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes photo-zone-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 30%, transparent); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-5px); }
}
@keyframes chart-appear {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0% 0 0); }
}

/* ── Feature 01: Coach KPI Bar ─────────────────────────────────────────── */
.coach-kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: var(--space-lg, 1.5rem);
}
@media (max-width: 600px) {
  .coach-kpi-bar { grid-template-columns: repeat(2, 1fr); }
}
.coach-kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border, rgba(0,0,0,.1));
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  animation: kpi-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  text-align: center;
}
.coach-kpi-card:nth-child(1) { animation-delay: 0ms; }
.coach-kpi-card:nth-child(2) { animation-delay: 60ms; }
.coach-kpi-card:nth-child(3) { animation-delay: 120ms; }
.coach-kpi-card:nth-child(4) { animation-delay: 180ms; }
.coach-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.coach-kpi-card[aria-pressed="true"] {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 18%, transparent);
}
.coach-kpi-card--attention[aria-pressed="true"] {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,.15);
}
.coach-kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-primary, var(--color-text));
  animation: kpi-count 0.4s ease both;
  animation-delay: inherit;
}
.coach-kpi-card__label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.coach-kpi-card__icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  color: #e53e3e;
  opacity: 0.8;
}
.coach-kpi-card--attention .coach-kpi-card__value { color: #e53e3e; }
.coach-kpi-card--checkin .coach-kpi-card__value { color: #2ecc71; }
.coach-kpi-card--streak .coach-kpi-card__value { color: var(--color-accent-gold, #8B5A3A); }
.coach-kpi-card__ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.coach-kpi-card[aria-pressed="true"] .coach-kpi-card__ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}

/* ── Feature 04: Trend Charts ──────────────────────────────────────────── */
.wci-trend-charts {
  background: var(--color-surface);
  border: 1px solid var(--color-border, rgba(0,0,0,.08));
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  animation: slide-up-fade 0.4s ease both;
}
.wci-trend-charts__tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wci-trend-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border, rgba(0,0,0,.12));
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.wci-trend-tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.wci-trend-tab.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.wci-trend-charts__canvas-wrap {
  position: relative;
  width: 100%;
  animation: chart-appear 0.6s ease both 0.1s;
}
.wci-trend-charts__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  text-align: center;
}

/* ── Feature 07: Photo Upload ──────────────────────────────────────────── */
.wci-photo-upload {
  margin-bottom: 20px;
  animation: slide-up-fade 0.3s ease both;
}
.wci-photo-upload__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wci-photo-upload__label { font-size: 0.85rem; font-weight: 600; color: var(--color-text-primary, var(--color-text)); }
.wci-photo-upload__optional { font-size: 0.75rem; color: var(--color-text-muted); }
.wci-photo-upload__zone {
  position: relative;
  border: 2px dashed var(--color-border-medium, rgba(0,0,0,.18));
  border-radius: 14px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.wci-photo-upload__zone:hover,
.wci-photo-upload__zone:focus {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 4%, transparent);
  animation: photo-zone-pulse 1.5s ease infinite;
  outline: none;
}
.wci-photo-upload__zone.has-photo { border-style: solid; border-color: var(--color-accent); }
.wci-photo-upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}
.wci-photo-upload__icon { width: 32px; height: 32px; opacity: 0.5; }
.wci-photo-upload__preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}
.wci-photo-upload__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.wci-photo-upload__remove:hover { background: rgba(229,62,62,.8); }
.wci-photo-upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wci-photo-upload__status {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  text-align: center;
}

/* ── Feature 08: Macros Calculator ────────────────────────────────────── */
.macros-calc { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.macros-calc__ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.macros-calc__ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.macros-ring__bg {
  stroke: color-mix(in srgb, var(--color-border, rgba(0,0,0,.1)) 60%, transparent);
}
.macros-ring__protein {
  stroke: #5C2430;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4,0,0.2,1), stroke-dasharray 0.5s;
}
.macros-ring__carbs {
  stroke: #2563eb;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4,0,0.2,1) 0.05s, stroke-dasharray 0.5s;
}
.macros-ring__fat {
  stroke: #d97706;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4,0,0.2,1) 0.1s, stroke-dasharray 0.5s;
}
.macros-calc__ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.macros-calc__kcal-val { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.macros-calc__kcal-unit { font-size: 0.68rem; color: var(--color-text-muted); }
.macros-calc__controls { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.macros-calc__kcal-row { display: flex; align-items: center; gap: 10px; }
.macros-calc__kcal-input {
  width: 90px;
  padding: 6px 10px;
  border: 1.5px solid var(--color-border, rgba(0,0,0,.12));
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-text-primary, var(--color-text));
  transition: border-color 0.2s;
}
.macros-calc__kcal-input:focus { border-color: var(--color-accent); outline: none; }
.macros-calc__slider-group { display: flex; flex-direction: column; gap: 10px; }
.macros-calc__slider-row {
  display: grid;
  grid-template-columns: 12px 62px 1fr 34px 58px;
  align-items: center;
  gap: 8px;
}
.macros-calc__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.macros-calc__dot--protein { background: #5C2430; }
.macros-calc__dot--carbs   { background: #2563eb; }
.macros-calc__dot--fat     { background: #d97706; }
.macros-calc__ctrl-label { font-size: 0.78rem; font-weight: 500; color: var(--color-text-muted); }
.macros-calc__slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.macros-calc__slider--protein { background: linear-gradient(to right, #5C2430 0%, #5C2430 30%, var(--color-border, #ddd) 30%); }
.macros-calc__slider--carbs   { background: linear-gradient(to right, #2563eb 0%, #2563eb 45%, var(--color-border, #ddd) 45%); }
.macros-calc__slider--fat     { background: linear-gradient(to right, #d97706 0%, #d97706 25%, var(--color-border, #ddd) 25%); }
.macros-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid currentColor;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  cursor: pointer;
  transition: transform 0.15s;
}
.macros-calc__slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.macros-calc__slider--protein::-webkit-slider-thumb { border-color: #5C2430; }
.macros-calc__slider--carbs::-webkit-slider-thumb   { border-color: #2563eb; }
.macros-calc__slider--fat::-webkit-slider-thumb     { border-color: #d97706; }
.macros-calc__pct-val { font-size: 0.78rem; font-weight: 700; text-align: right; }
.macros-calc__g-val   { font-size: 0.75rem; color: var(--color-text-muted); text-align: right; }
.macros-calc__total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-accent) 6%, transparent);
  font-size: 0.82rem;
}
.macros-calc__total-label { color: var(--color-text-muted); }
.macros-calc__total-val { font-weight: 700; color: var(--color-accent); }
.macros-calc__total-val.is-over { color: #e53e3e; }
.macros-calc__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ── Feature 05: Nutrition Templates ──────────────────────────────────── */
.nutri-templates__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.nutri-template-item {
  position: relative;
  padding: 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border, rgba(0,0,0,.1));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  animation: slide-up-fade 0.35s ease both;
  cursor: default;
}
.nutri-template-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.nutri-template-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, var(--color-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nutri-template-item__meta { font-size: 0.75rem; color: var(--color-text-muted); }
.nutri-template-item__actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.nutri-template-item__btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--color-border, rgba(0,0,0,.1));
  background: transparent;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nutri-template-item__btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.nutri-template-item__btn--delete:hover { background: #e53e3e; border-color: #e53e3e; color: #fff; }
.nutri-templates__empty { font-size: 0.82rem; color: var(--color-text-muted); grid-column: 1/-1; text-align: center; padding: 20px 0; }

/* ── Feature 09: Monthly Report ────────────────────────────────────────── */
.monthly-report__config { display: flex; flex-direction: column; gap: 14px; }
.monthly-report__preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.monthly-report__kpi {
  padding: 12px;
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
  border-radius: 10px;
  text-align: center;
  animation: slide-up-fade 0.3s ease both;
}
.monthly-report__kpi-val { font-size: 1.4rem; font-weight: 700; color: var(--color-accent); }
.monthly-report__kpi-label { font-size: 0.72rem; color: var(--color-text-muted); }

/* ── Feature 02: AI Trends ─────────────────────────────────────────────── */
.ai-trends { display: flex; flex-direction: column; gap: 14px; }
.ai-trends__output {
  border: 1.5px solid var(--color-border, rgba(0,0,0,.1));
  border-radius: 12px;
  overflow: hidden;
  animation: slide-up-fade 0.4s ease both;
}
.ai-trends__result {
  padding: 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-primary, var(--color-text));
}
.ai-trends__result h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--color-accent);
}
.ai-trends__result h4:first-child { margin-top: 0; }
.ai-trends__result ul { padding-left: 18px; margin: 4px 0; }
.ai-trends__result li { margin-bottom: 4px; }
.ai-trends__result strong { color: var(--color-text-primary, var(--color-text)); }

/* ── Feature 03: Push Notifications ───────────────────────────────────── */
.push-setup { display: flex; flex-direction: column; gap: 14px; }
.push-setup__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.push-setup__preset {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border, rgba(0,0,0,.12));
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.push-setup__preset:hover { border-color: var(--color-accent); color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 5%, transparent); }

/* ── Feature 06: Messaging Drawer ─────────────────────────────────────── */
.msg-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}
.msg-drawer:not([hidden]) { pointer-events: auto; }
.msg-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
  animation: backdrop-in 0.25s ease both;
}
.msg-drawer__panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,.2);
  animation: drawer-in 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
}
.msg-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,.08));
  flex-shrink: 0;
}
.msg-drawer__header-info { display: flex; align-items: center; gap: 12px; }
.msg-drawer__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.msg-drawer__title { font-size: 0.95rem; font-weight: 600; margin: 0; }
.msg-drawer__subtitle { font-size: 0.75rem; color: var(--color-text-muted); margin: 0; }
.msg-drawer__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-bg-deep, #f3efeb);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.msg-drawer__close:hover { background: var(--cm-accent-12); }
.msg-drawer__close svg { width: 14px; height: 14px; }
.msg-drawer__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}
.msg-bubble__time {
  font-size: 0.68rem;
  opacity: 0.6;
  margin-top: 4px;
  display: block;
}
.msg-drawer__loading {
  display: flex;
  gap: 5px;
  align-self: flex-start;
  padding: 12px 16px;
  background: var(--color-bg-deep, #f3efeb);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}
.msg-drawer__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typing-bounce 1.2s ease infinite;
}
.msg-drawer__typing-dot:nth-child(2) { animation-delay: 0.2s; }
.msg-drawer__typing-dot:nth-child(3) { animation-delay: 0.4s; }
.msg-drawer__empty { color: var(--color-text-muted); font-size: 0.85rem; text-align: center; margin: auto; }
.msg-drawer__compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border, rgba(0,0,0,.08));
  flex-shrink: 0;
  background: var(--color-surface);
}
.msg-drawer__input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--color-border, rgba(0,0,0,.12));
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 0.85rem;
  background: var(--color-bg, #faf8f6);
  color: var(--color-text-primary, var(--color-text));
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.4;
  transition: border-color 0.2s;
}
.msg-drawer__input:focus { outline: none; border-color: var(--color-accent); }
.msg-drawer__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  border: none;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}
.msg-drawer__send:hover { background: var(--color-accent-hover); transform: scale(1.08); }
.msg-drawer__send svg { width: 16px; height: 16px; }

/* ── Dark mode overrides ────────────────────────────────────────────────── */
[data-theme-mode="dark"] .coach-kpi-card {
  background: var(--color-surface);
  border-color: rgba(255,255,255,.1);
}
[data-theme-mode="dark"] .wci-trend-charts { background: var(--color-surface); }
[data-theme-mode="dark"] .msg-drawer__input { background: var(--color-bg-deep); }
[data-theme-mode="dark"] .macros-ring__bg { stroke: rgba(255,255,255,.08); }
[data-theme-mode="dark"] .macros-calc__kcal-input { background: var(--color-surface); color: inherit; border-color: rgba(255,255,255,.12); }
[data-theme-mode="dark"] .nutri-template-item { background: var(--color-surface); border-color: rgba(255,255,255,.08); }

/* ── coach-tower card shimmer on hover ─────────────────────────────────── */
.coach-tower__card {
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
.coach-tower__card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}



/* =============================================================================
   GENERADOR DE PAUTA BASE — nutri-gen-card
   ============================================================================= */

.nutri-gen-card {
  border: 2px dashed var(--color-accent, #5C2430);
  border-radius: 14px;
  margin-bottom: var(--space-lg, 1.5rem);
  overflow: hidden;
  transition: border-color .2s;
}
.nutri-gen-card[open] {
  border-style: solid;
  background: color-mix(in srgb, var(--color-accent, #5C2430) 4%, var(--color-bg, #fff));
}

.nutri-gen-card__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.1rem;
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
}
.nutri-gen-card__summary::-webkit-details-marker { display: none; }
.nutri-gen-card__summary::marker { display: none; }
.nutri-gen-card__title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--color-accent, #5C2430);
  flex-shrink: 0;
}
.nutri-gen-card__badge {
  background: var(--color-accent, #5C2430);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.nutri-gen-card__hint {
  color: var(--color-text-muted, #888);
  font-size: .8rem;
  flex: 1 1 160px;
}
.nutri-gen-card__body {
  padding: 0 1.1rem 1.2rem;
}

.nutri-gen-form { display: flex; flex-direction: column; gap: var(--space-sm, .75rem); }

.nutri-gen-row { display: grid; gap: .75rem; }
.nutri-gen-row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
  .nutri-gen-row--3 { grid-template-columns: 1fr; }
}

/* chips de restricciones */
.nutri-gen-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.nutri-gen-chip {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  padding: .3rem .7rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.nutri-gen-chip:hover { background: color-mix(in srgb, var(--color-accent, #5C2430) 6%, transparent); }
.nutri-gen-chip input { accent-color: var(--color-accent, #5C2430); }

/* resultado */
.nutri-gen-result {
  background: var(--color-surface, #f9f7f5);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  animation: slide-up-fade .35s ease both;
}
.nutri-gen-result__kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
  margin-bottom: .8rem;
}
.nutri-gen-kpi {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 8px;
  padding: .6rem .8rem;
  text-align: center;
}
.nutri-gen-kpi__val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-accent, #5C2430);
  line-height: 1.1;
}
.nutri-gen-kpi__lbl {
  display: block;
  font-size: .65rem;
  color: var(--color-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}

.nutri-gen-result__macros-per-meal {
  border-top: 1px solid var(--color-border, #eee);
  padding-top: .7rem;
}
.nutri-gen-meal-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted, #888);
  margin-bottom: .45rem;
}
.nutri-gen-meal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: .4rem;
}
.nutri-gen-meal-item {
  background: var(--color-bg, #fff);
  border-left: 3px solid var(--color-accent, #5C2430);
  border-radius: 0 6px 6px 0;
  padding: .4rem .6rem;
  font-size: .8rem;
}
.nutri-gen-meal-item strong { display: block; font-size: .75rem; color: var(--color-text-muted); }

.nutri-gen-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .2rem;
}
.nutri-gen-disclaimer {
  font-size: .72rem;
  color: var(--color-text-muted, #888);
  line-height: 1.5;
  padding: .5rem .75rem;
  border-left: 2px solid var(--color-border, #ddd);
  margin: 0;
}

/* =============================================================================
   SECCIONES DE CONTENIDO — separación visual pautas / suplementación / directrices
   ============================================================================= */

.nutri-content-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Cabecera de sección con acento lateral */
.nutri-content-sections .form__group > .form__label,
.nutri-content-sections .nutrition-supp-lib > .form__label {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-accent, #5C2430);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}
.nutri-content-sections .form__group > .form__label::before,
.nutri-content-sections .nutrition-supp-lib > .form__label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--color-accent, #5C2430);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Línea divisoria entre secciones */
.nutri-content-sections .form__group + .form__group,
.nutri-content-sections .form__group + .nutrition-supp-lib,
.nutri-content-sections .nutrition-supp-lib + .form__group,
.nutri-content-sections .form__group.nutrition-supp-lib + .form__group {
  border-top: 1px solid var(--color-border, #eee);
  padding-top: var(--space-lg, 1.5rem);
  margin-top: var(--space-sm, .5rem);
}

/* Textareas de pautas más grandes */
.nutri-content-sections #nutritionTextInput { min-height: 160px; }
.nutri-content-sections #nutritionDirectivesInput { min-height: 130px; }

/* Tabla de dieta — de-enfatizada (detalles colapsados) */
.nutri-diet-collapsible {
  border-color: var(--color-border, #ddd);
  border-radius: 10px;
  opacity: .85;
}
.nutri-diet-collapsible[open] { opacity: 1; }
.nutri-diet-collapsible__summary {
  color: var(--color-text-muted, #888);
}
.nutri-diet-collapsible__title { font-weight: 600; font-size: .88rem; }
.nutri-diet-collapsible__hint { font-size: .75rem; }

/* dark mode */
@media (prefers-color-scheme: dark) {
  .nutri-gen-card[open] { background: color-mix(in srgb, var(--color-accent, #5C2430) 8%, var(--color-bg, #111)); }
  .nutri-gen-result { background: var(--color-surface, #1c1917); }
  .nutri-gen-kpi { background: var(--color-bg, #111); }
  .nutri-gen-meal-item { background: var(--color-bg, #111); }
}
:root[data-theme-mode="dark"] .nutri-gen-card[open] { background: color-mix(in srgb, var(--color-accent, #5C2430) 8%, var(--color-bg, #111)); }

/* =============================================================
   NUTRI FEATURES 01-10 — Panel coach + viewer
   ============================================================= */

/* ---- Feature 02: Grafica evolucion ---- */
.nutri-evo-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
}
.nutri-evo-card__summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  list-style: none;
  user-select: none;
}
.nutri-evo-card[open] .nutri-evo-card__summary { color: var(--color-accent); }
.nutri-evo-card__body { padding: 0 1rem 1rem; }
.nutri-evo-tabs { display: flex; gap: .4rem; margin-bottom: .75rem; }
.nutri-evo-tab {
  padding: .25rem .75rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all .15s;
}
.nutri-evo-tab.is-active,
.nutri-evo-tab:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--cm-accent-10); }
.nutri-evo-canvas-wrap { position: relative; height: 160px; }
.nutri-evo-meta { font-size: .72rem; color: var(--color-text-muted); margin-top: .5rem; text-align: right; }

/* ---- Feature 05: Auto-ajuste ---- */
.nutri-autoadjust {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-accent-gold, #8B5A3A);
  background: var(--cm-gold-8);
  margin-top: 1rem;
  animation: slide-up-fade .3s ease;
}
.nutri-autoadjust__icon { flex-shrink: 0; color: var(--color-accent-gold, #8B5A3A); }
.nutri-autoadjust__body { flex: 1; min-width: 0; }
.nutri-autoadjust__title { font-size: .8rem; font-weight: 700; color: var(--color-accent-gold, #8B5A3A); margin-bottom: .15rem; }
.nutri-autoadjust__text { font-size: .78rem; color: var(--color-text-muted); }

/* ---- Feature 08: Scoring adherencia ---- */
.nutri-adherence-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
}
.nutri-adherence-card__summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  list-style: none;
  user-select: none;
}
.nutri-adherence-card[open] .nutri-adherence-card__summary { color: var(--color-accent); }
.nutri-adherence-card__body { padding: 0 1rem 1rem; }
.nutri-adherence-kpis { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.nutri-adherence-kpi { text-align: center; }
.nutri-adherence-kpi__val { font-size: 1.4rem; font-weight: 800; color: var(--color-accent); display: block; }
.nutri-adherence-kpi__lbl { font-size: .7rem; color: var(--color-text-muted); }
.nutri-adherence-bars { display: flex; flex-direction: column; gap: .4rem; }
.nutri-adherence-bar { display: flex; align-items: center; gap: .5rem; font-size: .75rem; }
.nutri-adherence-bar__label { width: 5rem; color: var(--color-text-muted); flex-shrink: 0; }
.nutri-adherence-bar__track { flex: 1; height: 6px; background: var(--color-border); border-radius: 3px; overflow: hidden; }
.nutri-adherence-bar__fill { height: 100%; background: var(--color-accent); border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.nutri-adherence-meta { font-size: .72rem; color: var(--color-text-muted); margin-top: .5rem; }

/* ---- Feature 01: Historial de versiones ---- */
.nutri-history-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
}
.nutri-history-card__summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  list-style: none;
  user-select: none;
}
.nutri-history-card[open] .nutri-history-card__summary { color: var(--color-accent); }
.nutri-history-card__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  margin-left: auto;
}
.nutri-history-card__body { padding: 0 1rem 1rem; }
.nutri-history-empty { font-size: .78rem; color: var(--color-text-muted); font-style: italic; }
.nutri-history-list { display: flex; flex-direction: column; gap: .5rem; }
.nutri-history-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color .15s;
}
.nutri-history-item:hover { border-color: var(--color-accent); }
.nutri-history-item__meta { flex: 1; min-width: 0; }
.nutri-history-item__date { font-size: .75rem; font-weight: 600; }
.nutri-history-item__title { font-size: .72rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nutri-history-item__restore {
  padding: .2rem .6rem;
  font-size: .72rem;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.nutri-history-item__restore:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- Feature 04: Exportar PDF ---- */
.nutri-pdf-export { margin-top: 1rem; }
.nutri-pdf-export .btn { display: flex; align-items: center; gap: .5rem; width: 100%; justify-content: center; }

/* ---- Feature 03: Menu semanal ---- */
.nutri-menu-card {
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  margin-bottom: .75rem;
}
.nutri-menu-card[open] { border-style: solid; }
.nutri-menu-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: .5rem;
  align-items: end;
  margin-bottom: .75rem;
}
@media (max-width: 600px) {
  .nutri-menu-controls { grid-template-columns: 1fr 1fr; }
}
.nutri-menu-table { display: flex; flex-direction: column; gap: .5rem; }
.nutri-menu-day { border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); }
.nutri-menu-day__head {
  padding: .4rem .75rem;
  background: var(--color-accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.nutri-menu-day__meals { display: flex; flex-direction: column; gap: 0; }
.nutri-menu-meal {
  padding: .4rem .75rem;
  font-size: .75rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: .5rem;
}
.nutri-menu-meal:last-child { border-bottom: none; }
.nutri-menu-meal__name { font-weight: 600; flex-shrink: 0; min-width: 5rem; }
.nutri-menu-meal__foods { color: var(--color-text-muted); }

/* ---- Feature 10: Banner revision ---- */
.nutri-revision-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-accent-gold, #8B5A3A);
  background: var(--cm-gold-8);
  margin-bottom: .75rem;
  animation: slide-up-fade .3s ease;
}
.nutri-revision-banner svg { flex-shrink: 0; color: var(--color-accent-gold, #8B5A3A); }
.nutri-revision-banner p { flex: 1; font-size: .78rem; color: var(--color-text-muted); }
#nutriRevisionDismiss {
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 .25rem;
}

/* ---- Feature 06: Presets de suplementacion ---- */
.nutri-supp-presets { margin-bottom: 1rem; }
.nutri-supp-presets__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.nutri-supp-presets__head p { font-size: .78rem; font-weight: 600; color: var(--color-text-muted); }
#nutriSuppPresetChips { display: flex; gap: .4rem; flex-wrap: wrap; }
.nutri-supp-preset-chip {
  padding: .25rem .75rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all .15s;
}
.nutri-supp-preset-chip:hover,
.nutri-supp-preset-chip.is-saved { border-color: var(--color-accent); color: var(--color-accent); background: var(--cm-accent-10); }

/* ---- Feature 09: Biblioteca comidas (viewer) ---- */
.nutri-foods-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-top: 1rem;
  overflow: hidden;
}
.nutri-foods-card__summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  list-style: none;
  user-select: none;
}
.nutri-foods-card[open] .nutri-foods-card__summary { color: var(--color-accent); }
.nutri-foods-card__body { padding: 0 1rem 1rem; }
.nutri-foods-add { display: flex; gap: .5rem; margin-bottom: .75rem; }
.nutri-foods-add .form__input { flex: 1; font-size: .8rem; }
.nutri-foods-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.nutri-foods-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: .78rem;
  animation: slide-up-fade .2s ease;
}
.nutri-foods-item__text { flex: 1; }
.nutri-foods-item__del {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: 0 .25rem;
  line-height: 1;
  transition: color .15s;
}
.nutri-foods-item__del:hover { color: var(--color-accent); }
.nutri-foods-empty { font-size: .78rem; color: var(--color-text-muted); font-style: italic; }

/* ===================================================================
   DESIGN UPGRADE — Animaciones, glassmorphism, macro rings, stagger
   =================================================================== */

/* --- Variables adicionales de diseño --- */
:root {
  --glow-accent: 0 0 0 1px rgba(92,36,48,.12), 0 4px 24px rgba(92,36,48,.18);
  --glow-accent-strong: 0 0 0 1px rgba(92,36,48,.25), 0 8px 40px rgba(92,36,48,.28);
  --glass-bg: rgba(255,255,255,.03);
  --glass-border: rgba(255,255,255,.08);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Keyframes globales adicionales --- */
@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes ring-draw {
  from { stroke-dashoffset: var(--ring-full); }
  to   { stroke-dashoffset: var(--ring-offset); }
}
@keyframes float-up {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes badge-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes progress-fill {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* =========================================================
   MACRO RINGS — Anillos SVG animados en el viewer
   ========================================================= */
.nutri-macro-rings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem 1rem;
  margin-bottom: .5rem;
}
.nutri-macro-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.nutri-macro-ring svg { overflow: visible; }
.nutri-macro-ring__track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 5;
}
.nutri-macro-ring__fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  transform: rotate(-90deg);
}
.nutri-macro-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nutri-macro-ring__wrap { position: relative; width: 72px; height: 72px; }
.nutri-macro-ring__val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
}
.nutri-macro-ring__unit { font-size: .6rem; color: var(--color-text-muted); }
.nutri-macro-ring__label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
}
.nutri-macro-ring--prot .nutri-macro-ring__label { color: #5C2430; }
.nutri-macro-ring--carb .nutri-macro-ring__label { color: #8B5A3A; }
.nutri-macro-ring--fat  .nutri-macro-ring__label { color: #b07b55; }

/* kcal hero */
.nutri-kcal-hero {
  text-align: center;
  padding: 1rem 1rem .25rem;
}
.nutri-kcal-hero__val {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: -.03em;
  display: block;
}
.nutri-kcal-hero__label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  display: block;
  margin-top: .2rem;
}

/* =========================================================
   STAGGER — secciones de nutricion, historial, etc.
   ========================================================= */
.nutrition-viewer[data-animate] .nutrition-section,
.nutrition-viewer[data-animate] .nutri-macro-rings,
.nutrition-viewer[data-animate] .nutri-kcal-hero,
.nutrition-viewer[data-animate] .nutri-ratio-bar,
.nutrition-viewer[data-animate] .nutri-foods-card {
  animation: slide-up-fade var(--transition-smooth) both;
}
.nutrition-viewer[data-animate] .nutri-kcal-hero    { animation-delay: 0ms; }
.nutrition-viewer[data-animate] .nutri-macro-rings  { animation-delay: 60ms; }
.nutrition-viewer[data-animate] .nutrition-section:nth-child(1) { animation-delay: 120ms; }
.nutrition-viewer[data-animate] .nutrition-section:nth-child(2) { animation-delay: 180ms; }
.nutrition-viewer[data-animate] .nutrition-section:nth-child(3) { animation-delay: 240ms; }
.nutrition-viewer[data-animate] .nutri-foods-card   { animation-delay: 300ms; }

/* =========================================================
   NUTRITION SECTION — mejora visual de etiquetas y cuerpo
   ========================================================= */
.nutrition-section {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: .75rem;
  background: var(--glass-bg);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.nutrition-section:hover { border-color: rgba(92,36,48,.3); }
.nutrition-section__label {
  padding: .6rem 1rem;
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: linear-gradient(135deg, rgba(92,36,48,.15), rgba(92,36,48,.05));
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-accent);
}
.nutrition-section__label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--color-accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.nutrition-section__body {
  padding: .9rem 1rem;
  font-size: .85rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* =========================================================
   MEAL-PLAN STAT CARDS — glassmorphism
   ========================================================= */
.meal-plan-stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .25rem 0 .75rem;
}
.meal-plan-stat {
  flex: 1;
  min-width: 80px;
  padding: .9rem .75rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  text-align: center;
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.meal-plan-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.04), transparent);
  pointer-events: none;
}
.meal-plan-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-accent);
}

/* ── _19-coach-video.css ── */
.meal-plan-stat__val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-accent);
  display: block;
  line-height: 1;
  letter-spacing: -.02em;
}
.meal-plan-stat__label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  margin-top: .3rem;
  display: block;
}

/* =========================================================
   COACH KPI BAR — glow + lift mejorados
   ========================================================= */
.coach-kpi-card {
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth), border-color var(--transition-fast) !important;
}
.coach-kpi-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--glow-accent-strong) !important;
  border-color: rgba(92,36,48,.4) !important;
}
.coach-kpi-card:hover .coach-kpi-card__val { color: var(--color-accent); }

/* =========================================================
   DETAILS EXPAND — animacion suave
   ========================================================= */
details > summary { cursor: pointer; outline: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; }
.nutri-gen-card > div,
.nutri-evo-card__body,
.nutri-adherence-card__body,
.nutri-history-card__body,
.nutri-foods-card__body,
.nutri-menu-card > div {
  animation: scale-in 220ms ease both;
}

/* =========================================================
   PROGRESS SCROLL — barra fina en viewer
   ========================================================= */
.nutri-scroll-progress {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 3px;
  background: transparent;
  margin: 0 -1rem;
  overflow: hidden;
}
.nutri-scroll-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #8B5A3A);
  width: 0%;
  transition: width 60ms linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(92,36,48,.5);
}

/* =========================================================
   NUTRITION VIEWER TOOLBAR — mejora visual
   ========================================================= */
.nutrition-viewer__toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  border-bottom: 1px solid var(--color-border);
  padding: .75rem 1rem;
}
.nutrition-viewer__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* =========================================================
   FORM TEXTAREAS — mejor feedback visual
   ========================================================= */
.form__textarea {
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast) !important;
}
.form__textarea:focus {
  box-shadow: 0 0 0 3px rgba(92,36,48,.15), 0 1px 4px rgba(0,0,0,.12) !important;
  background-color: color-mix(in srgb, var(--color-accent) 3%, var(--color-surface)) !important;
}
.form__input:focus {
  box-shadow: 0 0 0 3px rgba(92,36,48,.15) !important;
}

/* =========================================================
   NUTRI AUTOADJUST — animacion de entrada mejorada
   ========================================================= */
.nutri-autoadjust { animation: slide-up-fade .4s cubic-bezier(0.34,1.56,0.64,1) both; }
.nutri-revision-banner { animation: slide-up-fade .4s cubic-bezier(0.34,1.56,0.64,1) both; }

/* =========================================================
   BADGE COUNTER en historial
   ========================================================= */
.nutri-history-card__count { animation: badge-pop .4s cubic-bezier(0.34,1.56,0.64,1) both; }

/* =========================================================
   SUPPLEMENT TIMELINE — pills visuales
   ========================================================= */
.nutri-supp-timeline {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .5rem 0;
  margin-bottom: .5rem;
}

/* =========================================================
   WCI HISTORY — card lift
   ========================================================= */
[class*="wci-card"] {
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth) !important;
}
[class*="wci-card"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--glow-accent) !important;
}

/* =========================================================
   BOTONES — feedback mejorado
   ========================================================= */
.btn--primary:active  { transform: scale(.97) !important; }
.btn--secondary:active { transform: scale(.97) !important; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* =========================================================
   PANEL TRANSITION — fade+slide al abrir panel
   ========================================================= */
.panel:not([hidden]) {
  animation: slide-up-fade 280ms cubic-bezier(0.16,1,0.3,1) both;
}
@media (prefers-reduced-motion: reduce) {
  .panel:not([hidden]) { animation: none; }
  .nutrition-viewer[data-animate] * { animation: none !important; }
}

/* =========================================================
   NUTRI HISTORY ITEMS — stagger
   ========================================================= */
.nutri-history-item:nth-child(1) { animation-delay: 40ms; }
.nutri-history-item:nth-child(2) { animation-delay: 80ms; }
.nutri-history-item:nth-child(3) { animation-delay: 120ms; }
.nutri-history-item:nth-child(4) { animation-delay: 160ms; }
.nutri-history-item:nth-child(5) { animation-delay: 200ms; }
.nutri-history-item { animation: slide-up-fade 250ms ease both; }

/* =========================================================
   LOADING SKELETON — shimmer effect
   ========================================================= */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, color-mix(in srgb, var(--color-surface) 60%, var(--color-border)) 50%, var(--color-surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
  color: transparent !important;
  pointer-events: none;
}

/* =========================================================
   MOBILE — mejoras para pantallas pequenas
   ========================================================= */
@media (max-width: 480px) {
  .nutri-macro-rings { gap: .75rem; }
  .nutri-macro-ring__wrap { width: 60px; height: 60px; }
  .nutri-kcal-hero__val { font-size: 2.2rem; }
  .meal-plan-stat { min-width: 70px; }
  .meal-plan-stat__val { font-size: 1.3rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   COACH IMPROVEMENTS — 8 mejoras para amenizar el trabajo del coach
   ═══════════════════════════════════════════════════════════════════ */

/* ── Mejora 1+2: Bandeja respuesta rapida + plantillas ────────────── */
.coach-pending-review__item {
  border-bottom: 1px solid var(--cm-border-80, rgba(0,0,0,.08));
  padding-bottom: var(--space-sm, .75rem);
  margin-bottom: var(--space-sm, .75rem);
}
.coach-pending-review__item:last-child { border-bottom: none; margin-bottom: 0; }
.coach-pending-review__top {
  display: flex;
  align-items: center;
  gap: var(--space-xs, .5rem);
  flex-wrap: wrap;
}
.coach-pending-review__actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-xs, .5rem);
}
.coach-qreply {
  margin-top: var(--space-xs, .5rem);
  background: var(--cm-accent-4, rgba(92,36,48,.04));
  border: 1px solid var(--cm-accent-12, rgba(92,36,48,.12));
  border-radius: 10px;
  padding: var(--space-sm, .75rem);
  animation: slide-up-fade .18s ease both;
}
.coach-qreply__templates {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-bottom: var(--space-xs, .5rem);
}
.coach-qreply__tpl {
  font-size: .72rem;
  padding: .25rem .6rem;
  border-radius: 20px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1.4;
  text-align: left;
}
.coach-qreply__tpl:hover,
.coach-qreply__tpl.is-active {
  background: var(--color-accent, #5C2430);
  border-color: var(--color-accent, #5C2430);
  color: #fff;
}
.coach-qreply__compose {
  display: flex;
  gap: var(--space-xs, .5rem);
  align-items: flex-end;
}
.coach-qreply__textarea {
  flex: 1;
  font-size: .82rem;
  resize: none;
  min-height: 2.6rem;
}
.coach-pending-review__item--done {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .4s, transform .4s;
}

/* ── Mejora 3: Vista Hoy ─────────────────────────────────────────── */
.coach-today-view {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px;
  padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.coach-today-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-sm, .75rem);
}
.coach-today-view__eyebrow {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-accent, #5C2430);
  font-weight: 600;
  margin: 0 0 .2rem;
}
.coach-today-view__title { font-size: 1rem; font-weight: 700; margin: 0; }
.coach-today-view__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm, .75rem);
}
@media (max-width: 700px) { .coach-today-view__cols { grid-template-columns: 1fr; } }
.coach-today-view__col {
  background: var(--cm-accent-4, rgba(92,36,48,.04));
  border-radius: 10px;
  padding: var(--space-sm, .75rem);
}
.coach-today-view__col--urgent { border-left: 3px solid #ef4444; }
.coach-today-view__col--missing { border-left: 3px solid #f59e0b; }
.coach-today-view__col--done { border-left: 3px solid #22c55e; }
.coach-today-view__col-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted, #6b7280);
  margin: 0 0 .5rem;
}
.coach-today-view__list { list-style: none; margin: 0; padding: 0; }
.coach-today-view__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem 0;
  border-bottom: 1px solid var(--cm-border-80, rgba(0,0,0,.07));
}
.coach-today-view__item:last-child { border-bottom: none; }
.coach-today-view__name { font-size: .82rem; font-weight: 500; }
.coach-today-view__empty { font-size: .78rem; color: var(--color-text-muted, #9ca3af); margin: 0; }

/* ── Mejora 4: Notas rapidas por cliente (barra de acciones) ───────── */
.coach-note-btn {
  position: static;
  width: 2rem;
  height: 2rem;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 28%, transparent);
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 10%, transparent);
  color: #C9BDB4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 2;
}
.coach-note-btn:hover {
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 22%, transparent);
  color: #EDE8E3;
  border-color: color-mix(in srgb, var(--tower-wine, #5C2430) 45%, transparent);
}
.coach-note-btn--has {
  border-color: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 55%, transparent);
  color: #E8C9AE;
  background: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 18%, transparent);
}

.coach-note-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .18s;
  padding: 1rem;
}
.coach-note-modal.is-open { opacity: 1; }
.coach-note-modal__card {
  background: var(--color-surface, #fff);
  border-radius: 16px;
  padding: var(--space-md, 1.25rem);
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: scale-in .18s ease both;
}
.coach-note-modal__title { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.coach-note-modal__ta { width: 100%; font-size: .85rem; margin-bottom: .75rem; }
.coach-note-modal__actions { display: flex; gap: .5rem; justify-content: flex-end; }

/* ── Mejora 5: Barra busqueda y filtros de la torre ───────────────── */
.coach-tower-search {
  margin-bottom: var(--space-sm, .75rem);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.coach-tower-search__input {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  font-size: .85rem;
  background: var(--color-surface, #fff);
  color: inherit;
  outline-offset: 2px;
}
.coach-tower-search__input:focus {
  border-color: var(--color-accent, #5C2430);
  outline: 2px solid var(--cm-accent-16, rgba(92,36,48,.16));
}
.coach-tower-search__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}
.coach-tower-search__filter {
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 20px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.coach-tower-search__filter.is-active,
.coach-tower-search__filter:hover {
  background: var(--color-accent, #5C2430);
  border-color: var(--color-accent, #5C2430);
  color: #fff;
}

/* ── Mejora 6: Boton editar plan (barra de acciones) ──────────────── */
.coach-tower__edit-plan-btn {
  position: static;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .55rem;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 28%, transparent);
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 10%, transparent);
  color: #C9BDB4;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 2;
}
.coach-tower__edit-plan-btn:hover {
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 22%, transparent);
  color: #EDE8E3;
  border-color: color-mix(in srgb, var(--tower-wine, #5C2430) 45%, transparent);
}

/* ── Mejora 7: Barra resumen semanal ──────────────────────────────── */
.coach-weekly-summary {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-xs, .5rem);
}
.coach-weekly-summary .btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
}

/* ── Mejora 8: Objetivo semanal con difusion ──────────────────────── */
.coach-broadcast-goal {
  background: var(--cm-gold-8, rgba(139,90,58,.08));
  border: 1px solid var(--color-accent-gold, #8B5A3A);
  border-radius: 14px;
  padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.coach-broadcast-goal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.coach-broadcast-goal__eyebrow {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-accent-gold, #8B5A3A);
  font-weight: 600;
  margin: 0 0 .15rem;
}
.coach-broadcast-goal__title { font-size: .95rem; font-weight: 700; margin: 0; }
.coach-broadcast-goal__badge {
  font-size: .72rem;
  background: var(--color-accent-gold, #8B5A3A);
  color: #fff;
  border-radius: 20px;
  padding: .15rem .6rem;
  font-weight: 700;
}
.coach-broadcast-goal__hint {
  font-size: .78rem;
  color: var(--color-text-muted, #6b7280);
  margin: 0 0 .6rem;
}
.coach-broadcast-goal__form {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
}
.coach-broadcast-goal__textarea {
  flex: 1;
  font-size: .85rem;
  resize: none;
}
.coach-broadcast-goal__status {
  font-size: .78rem;
  color: #22c55e;
  margin: .4rem 0 0;
  font-weight: 600;
}

/* ── _20-payments.css ── */
/* =============================================================================
   STRIPE PAYMENTS — Selector de plan, código de descuento, resumen, retorno
   ============================================================================= */

/* ── Selector de plan en el registro ─────────────────────────────────────── */
.reg-plan-selector {
  margin-bottom: 1.5rem;
}
.reg-plan-selector__label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted, #888);
  margin-bottom: .6rem;
}
.reg-plan-selector__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
@media (max-width: 480px) {
  .reg-plan-selector__grid { grid-template-columns: 1fr; }
}
.reg-plan-option { cursor: pointer; }
.reg-plan-option__radio { position: absolute; opacity: 0; pointer-events: none; }
.reg-plan-option__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .7rem .5rem;
  border: 1.5px solid var(--color-border, rgba(92,36,48,.15));
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface, #fff);
  transition: border-color .15s, background .15s, box-shadow .15s;
  position: relative;
  text-align: center;
}
.reg-plan-option--featured .reg-plan-option__card {
  border-color: var(--color-primary, #5C2430);
}
.reg-plan-option--selected .reg-plan-option__card,
.reg-plan-option__radio:checked + .reg-plan-option__card {
  border-color: var(--color-primary, #5C2430);
  background: rgba(92,36,48,.05);
  box-shadow: 0 0 0 3px rgba(92,36,48,.12);
}
.reg-plan-option__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  font-weight: 700;
  background: var(--color-primary, #5C2430);
  color: #fff;
  padding: .15rem .5rem;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.reg-plan-option__name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
}
.reg-plan-option__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary, #5C2430);
}
.reg-plan-option__unit {
  font-size: .7rem;
  font-weight: 400;
  color: var(--color-text-muted, #888);
}

/* ── Campo de código de descuento ────────────────────────────────────────── */
.reg-discount { margin-top: 1rem; }
.reg-discount__row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}
.reg-discount__input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.reg-discount__btn { flex-shrink: 0; white-space: nowrap; }
.reg-discount__feedback {
  font-size: .8rem;
  margin-top: .35rem;
  min-height: 1.1em;
  font-weight: 500;
}
.reg-discount__feedback--error   { color: #dc2626; }

/* ── Resumen de pago ─────────────────────────────────────────────────────── */
.reg-summary {
  background: var(--color-surface-inset, #F3EFEB);
  border: 1px solid var(--color-border, rgba(92,36,48,.12));
  border-radius: var(--radius-md, 10px);
  padding: .9rem 1rem;
  margin: 1rem 0 1.2rem;
}
.reg-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .2rem 0;
}
.reg-summary__row--total {
  border-top: 1px solid var(--color-border, rgba(92,36,48,.12));
  margin-top: .4rem;
  padding-top: .5rem;
}
.reg-summary__label { font-size: .82rem; color: var(--color-text-muted, #888); }
.reg-summary__label--discount { color: #16a34a; }
.reg-summary__value { font-size: .88rem; font-weight: 600; color: var(--color-text, #1a1a1a); }
.reg-summary__value--discount { color: #16a34a; }
.reg-summary__value--total { font-size: 1rem; font-weight: 700; color: var(--color-primary, #5C2430); }
.reg-summary__trial {
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--color-text-muted, #888);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.reg-summary__trial-icon { font-size: .85rem; }

/* ── Modal de retorno de pago exitoso ────────────────────────────────────── */
.payment-success-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .2s ease;
}
.payment-success-modal__box {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem 1.8rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.payment-success-modal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.payment-success-modal__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin-bottom: .5rem;
}
.payment-success-modal__body {
  font-size: .9rem;
  color: var(--color-text-muted, #888);
  line-height: 1.55;
  margin-bottom: .8rem;
}
.payment-success-modal__hint {
  font-size: .78rem;
  color: var(--color-text-muted, #aaa);
  margin-bottom: 1.4rem;
}
.payment-success-modal__cta { width: 100%; }

/* =============================================================================
   PANEL COACH — Sección Códigos de Descuento
   ============================================================================= */

.coach-disc-section {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, rgba(92,36,48,.1));
  border-radius: var(--radius-lg, 14px);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
.coach-disc-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.coach-disc-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin-bottom: .2rem;
}
.coach-disc-section__sub {
  font-size: .78rem;
  color: var(--color-text-muted, #888);
}

.coach-disc-section__table-wrap { overflow-x: auto; }
.coach-disc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.coach-disc-table th {
  text-align: left;
  padding: .5rem .7rem;
  font-weight: 600;
  color: var(--color-text-muted, #888);
  border-bottom: 1px solid var(--color-border, rgba(92,36,48,.1));
  white-space: nowrap;
}
.coach-disc-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--color-layer-hairline, rgba(92,36,48,.05));
  vertical-align: middle;
}
.coach-disc__code { font-weight: 700; font-family: monospace; letter-spacing: .05em; }
.coach-disc__empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--color-text-muted, #aaa);
  font-style: italic;
}
.coach-disc__status {
  font-size: .74rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 20px;
  display: inline-block;
}
.coach-disc__status--active   { background: #dcfce7; color: #16a34a; }
.coach-disc__status--inactive { background: #f1f5f9; color: #94a3b8; }
.coach-disc__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn--xs {
  font-size: .72rem;
  padding: .2rem .55rem;
  min-height: unset;
  height: auto;
  line-height: 1.4;
}
.btn--danger { color: #dc2626 !important; border-color: #dc2626 !important; }
.btn--sm {
  font-size: .82rem;
  padding: .4rem .9rem;
}

/* Modal de nuevo código */
.coach-disc-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.coach-disc-modal[hidden] { display: none; }
.coach-disc-modal__box {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem 1.6rem;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.coach-disc-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.coach-disc-modal__title { font-size: 1rem; font-weight: 700; }
.coach-disc-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-text-muted, #888);
  padding: .2rem .4rem;
  line-height: 1;
}
.coach-disc-modal__pct-grid {
  display: flex;
  gap: .6rem;
  margin-top: .3rem;
}
.coach-disc-modal__pct-option {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--color-surface-inset, #F3EFEB);
  border: 1.5px solid var(--color-border, rgba(92,36,48,.15));
  border-radius: 8px;
  padding: .45rem .9rem;
  transition: border-color .15s, background .15s;
  flex: 1;
  justify-content: center;
}
.coach-disc-modal__pct-option:has(input:checked) {
  border-color: var(--color-primary, #5C2430);
  background: rgba(92,36,48,.07);
}
.coach-disc-modal__pct-option input { accent-color: var(--color-primary, #5C2430); }


/* ═══════════════════════════════════════════════════════════════════
   COACH + ATHLETE IMPROVEMENTS — mejoras 9-26
   ═══════════════════════════════════════════════════════════════════ */

/* ── Mejora 9: Historial feedbacks (modal, abre desde la torre) ────── */
.coach-feedback-log {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9998; opacity: 0; transition: opacity .2s; padding: 1rem;
}
.coach-feedback-log.is-open { opacity: 1; }
.coach-feedback-log__sheet {
  background: var(--color-surface, #fff); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; max-height: 70vh;
  overflow-y: auto; padding: var(--space-md, 1.25rem);
  transform: translateY(40px); transition: transform .22s ease;
  box-shadow: 0 -4px 32px rgba(0,0,0,.15);
}
.coach-feedback-log.is-open .coach-feedback-log__sheet { transform: none; }
.coach-feedback-log__title { font-size: .95rem; font-weight: 700; margin: 0 0 .75rem; }
.coach-feedback-log__list { list-style: none; margin: 0; padding: 0; }
.coach-feedback-log__item {
  padding: .6rem 0;
  border-bottom: 1px solid var(--cm-border-80, rgba(0,0,0,.07));
}
.coach-feedback-log__item:last-child { border-bottom: none; }
.coach-feedback-log__date { font-size: .72rem; color: var(--color-text-muted, #9ca3af); margin-bottom: .2rem; }
.coach-feedback-log__msg { font-size: .85rem; line-height: 1.5; }
.coach-feedback-log__close {
  display: block; width: 100%; margin-top: .75rem;
  padding: .55rem; border-radius: 10px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: transparent; cursor: pointer; font-size: .85rem;
  color: var(--color-text-muted, #6b7280);
  transition: background .15s;
}
.coach-feedback-log__close:hover { background: var(--cm-accent-5, rgba(92,36,48,.05)); }

/* ── Mejora 10: Selector carga (barra de acciones) ─────────────────── */
.coach-tower__load-ctrl {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  position: static;
  margin-right: .15rem;
  padding: .15rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 20%, transparent);
  z-index: 3;
}
.coach-tower__load-btn {
  width: 1.55rem;
  height: 1.55rem;
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 35%, transparent);
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 18%, transparent);
  color: #E8C9AE;
  font-size: .8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .13s, color .13s;
}
.coach-tower__load-btn:hover {
  background: var(--tower-wine, #5C2430);
  border-color: var(--tower-wine, #5C2430);
  color: #fff;
}
.coach-tower__load-val {
  font-size: .72rem;
  font-weight: 800;
  min-width: 2.35rem;
  text-align: center;
  color: #F5F0EB;
  font-variant-numeric: tabular-nums;
}

/* ── Mejora 11: Etiquetas de estado manual ─────────────────────────── */
.coach-client-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: .15rem .5rem; border-radius: 20px;
  border: 1px solid currentColor;
}

.coach-tag-picker {
  position: absolute; top: 2.4rem; right: .5rem; z-index: 20;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px; padding: .4rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: .25rem;
  animation: scale-in .15s ease both; min-width: 130px;
}
.coach-tag-picker__opt {
  font-size: .75rem; padding: .3rem .6rem; border-radius: 6px;
  cursor: pointer; background: none; border: none; text-align: left;
  transition: background .13s;
}
.coach-tag-picker__opt:hover { background: var(--cm-accent-5, rgba(92,36,48,.05)); }

/* ── Mejora 12: Log de cambios del coach ───────────────────────────── */
.coach-change-log {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9998; opacity: 0; transition: opacity .2s; padding: 1rem;
  pointer-events: none;
}
.coach-change-log.is-open { opacity: 1; pointer-events: all; }
.coach-change-log__sheet {
  background: var(--color-surface, #fff); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; max-height: 70vh;
  overflow-y: auto; padding: var(--space-md, 1.25rem);
  transform: translateY(40px); transition: transform .22s ease;
  box-shadow: 0 -4px 32px rgba(0,0,0,.15);
}
.coach-change-log.is-open .coach-change-log__sheet { transform: none; }
.coach-change-log__title { font-size: .95rem; font-weight: 700; margin: 0 0 .75rem; }
.coach-change-log__add {
  display: flex; gap: .5rem; margin-bottom: .75rem;
}
.coach-change-log__input { flex: 1; font-size: .82rem; }
.coach-change-log__list { list-style: none; margin: 0; padding: 0; }
.coach-change-log__entry {
  padding: .45rem 0;
  border-bottom: 1px solid var(--cm-border-80, rgba(0,0,0,.07));
  font-size: .83rem;
}
.coach-change-log__entry:last-child { border-bottom: none; }
.coach-change-log__ts { font-size: .7rem; color: var(--color-text-muted, #9ca3af); }

/* ── Mejora 13: Modo pausa cliente ─────────────────────────────────── */
.coach-tower__item--paused .coach-tower__card { opacity: .55; filter: grayscale(.45); }
.coach-tower__item--paused { opacity: .92; }
.coach-tower__pause-btn {
  position: static;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .55rem;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tower-wine, #5C2430) 28%, transparent);
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 10%, transparent);
  color: #C9BDB4;
  cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
}
.coach-tower__pause-btn:hover {
  background: color-mix(in srgb, var(--tower-wine, #5C2430) 22%, transparent);
  color: #EDE8E3;
}
.coach-tower__item--paused .coach-tower__pause-btn {
  color: #E8C9AE;
  border-color: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 55%, transparent);
  background: color-mix(in srgb, var(--color-accent-gold, #8B5A3A) 16%, transparent);
}

/* Controles de la barra: nunca heredar --touch-min 48px */
.coach-tower__actions .coach-tower__pause-btn,
.coach-tower__actions .coach-note-btn,
.coach-tower__actions .coach-tower__chat-btn,
.coach-tower__actions .coach-tower__edit-plan-btn,
.coach-tower__actions .coach-tower__load-btn {
  min-width: 0;
  min-height: 0;
}

/* ── Mejora 14: Grafica de peso interactiva ─────────────────────────── */
.weight-chart-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px; padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.weight-chart-card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-sm, .75rem);
}
.weight-chart-card__eyebrow {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-accent, #5C2430); font-weight: 600; margin: 0 0 .15rem;
}
.weight-chart-card__title { font-size: .95rem; font-weight: 700; margin: 0; }
.weight-chart-card__badge {
  font-size: .75rem; font-weight: 700;
  padding: .15rem .55rem; border-radius: 20px;
  background: var(--cm-accent-8, rgba(92,36,48,.08));
  color: var(--color-accent, #5C2430);
}
.weight-chart-card__wrap { position: relative; }

/* ── Mejora 15: Racha check-ins ─────────────────────────────────────── */
.checkin-streak {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--cm-accent-5, rgba(92,36,48,.05));
  border: 1px solid var(--cm-accent-16, rgba(92,36,48,.16));
  border-radius: 20px; padding: .3rem .75rem;
  margin-bottom: var(--space-sm, .75rem);
}
.checkin-streak__icon { color: var(--color-accent, #5C2430); display: flex; }
.checkin-streak__count { font-size: 1rem; font-weight: 800; color: var(--color-accent, #5C2430); }
.checkin-streak__label { font-size: .78rem; color: var(--color-text-muted, #6b7280); }

/* ── Mejora 16: Comparativa semanas ─────────────────────────────────── */
.week-compare {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px; padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.week-compare__head { margin-bottom: var(--space-sm, .75rem); }
.week-compare__eyebrow {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-accent, #5C2430); font-weight: 600; margin: 0 0 .15rem;
}
.week-compare__title { font-size: .95rem; font-weight: 700; margin: 0; }
.week-compare__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem;
}
@media (max-width: 480px) { .week-compare__grid { grid-template-columns: repeat(2, 1fr); } }
.week-compare__cell {
  background: var(--cm-accent-4, rgba(92,36,48,.04));
  border-radius: 10px; padding: .55rem .5rem; text-align: center;
}
.week-compare__cell-label { font-size: .68rem; color: var(--color-text-muted, #6b7280); margin-bottom: .2rem; }
.week-compare__cell-val { font-size: .95rem; font-weight: 800; }
.week-compare__cell-arrow { font-size: .75rem; font-weight: 700; margin-left: .2rem; }

/* ── Mejora 17: Banner feedback del coach ───────────────────────────── */
.coach-feedback-banner {
  display: flex; align-items: flex-start; gap: .75rem;
  background: var(--cm-gold-8, rgba(139,90,58,.08));
  border: 1px solid var(--color-accent-gold, #8B5A3A);
  border-radius: 12px; padding: .75rem 1rem;
  margin-bottom: var(--space-sm, .75rem);
  animation: slide-up-fade .2s ease both;
}
.coach-feedback-banner__icon {
  color: var(--color-accent-gold, #8B5A3A);
  flex-shrink: 0; margin-top: .1rem;
}
.coach-feedback-banner__body { flex: 1; min-width: 0; }
.coach-feedback-banner__title { font-size: .82rem; font-weight: 700; margin: 0 0 .2rem; color: var(--color-accent-gold, #8B5A3A); }
.coach-feedback-banner__text { font-size: .83rem; margin: 0; color: inherit; }
.coach-feedback-banner__close {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted, #9ca3af); padding: .1rem;
  flex-shrink: 0; display: flex;
}
.coach-feedback-banner__close:hover { color: var(--color-accent, #5C2430); }

/* ── Mejora 18: Vista semanal del entrenamiento ─────────────────────── */
.weekly-split-view {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px; padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.weekly-split-view__head { margin-bottom: var(--space-sm, .75rem); }
.weekly-split-view__eyebrow {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-accent, #5C2430); font-weight: 600; margin: 0 0 .15rem;
}
.weekly-split-view__title { font-size: .95rem; font-weight: 700; margin: 0; }
.weekly-split-view__days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem;
}
@media (max-width: 560px) { .weekly-split-view__days { grid-template-columns: repeat(4, 1fr); } }
.weekly-split-view__day {
  border-radius: 8px; padding: .4rem .3rem; text-align: center;
  background: var(--cm-accent-4, rgba(92,36,48,.04));
  border: 1px solid var(--color-border, #e5e7eb);
  transition: background .15s;
}
.weekly-split-view__day--today {
  background: var(--color-accent, #5C2430); color: #fff; border-color: var(--color-accent, #5C2430);
}
.weekly-split-view__day--rest {
  background: transparent; opacity: .55;
}
.weekly-split-view__day-name { font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.weekly-split-view__day-label { font-size: .7rem; margin-top: .15rem; }

/* ── Mejora 19: Generador mensaje WhatsApp ──────────────────────────── */
.coach-wa-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; transition: opacity .18s; padding: 1rem;
  pointer-events: none;
}
.coach-wa-modal.is-open { opacity: 1; pointer-events: all; }
.coach-wa-modal__card {
  background: var(--color-surface, #fff); border-radius: 16px;
  padding: var(--space-md, 1.25rem); width: 100%; max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: scale-in .18s ease both;
}
.coach-wa-modal__title { font-size: .95rem; font-weight: 700; margin: 0 0 .5rem; }
.coach-wa-modal__preview {
  font-size: .82rem; background: #dcfce7; border-radius: 10px;
  padding: .75rem; margin-bottom: .75rem; white-space: pre-wrap; line-height: 1.5;
  border: 1px solid #bbf7d0; max-height: 160px; overflow-y: auto;
}
.coach-wa-modal__actions { display: flex; gap: .5rem; justify-content: flex-end; }

/* ── Mejora 20: Recordatorio de contacto ────────────────────────────── */
.coach-tower__remind-badge {
  position: absolute; top: .45rem; left: .45rem;
  background: #f59e0b; color: #fff; border-radius: 20px;
  font-size: .65rem; font-weight: 800; padding: .1rem .4rem;
  z-index: 3; pointer-events: none;
}

/* ── Mejora 22: Dashboard cartera ───────────────────────────────────── */
.coach-portfolio-dash {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px; padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.coach-portfolio-dash__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-sm, .75rem);
}
.coach-portfolio-dash__eyebrow {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-accent, #5C2430); font-weight: 600; margin: 0 0 .15rem;
}
.coach-portfolio-dash__title { font-size: .95rem; font-weight: 700; margin: 0; }
.coach-portfolio-dash__stats {
  display: flex; gap: var(--space-sm, .75rem); flex-wrap: wrap;
  margin-top: .5rem;
}
.coach-portfolio-dash__stat {
  background: var(--cm-accent-5, rgba(92,36,48,.05));
  border-radius: 8px; padding: .4rem .65rem; font-size: .78rem;
}
.coach-portfolio-dash__stat strong { display: block; font-size: 1rem; font-weight: 800; }

/* ── Mejora 23: Plantillas de mesociclos ────────────────────────────── */
.coach-meso-templates {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px; padding: var(--space-md, 1.25rem);
  margin-bottom: var(--space-md, 1.25rem);
}
.coach-meso-templates__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--space-sm, .75rem);
}
.coach-meso-templates__eyebrow {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-accent, #5C2430); font-weight: 600; margin: 0 0 .15rem;
}
.coach-meso-templates__title { font-size: .95rem; font-weight: 700; margin: 0; }
.coach-meso-templates__list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem;
}
.coach-meso-tpl {
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px; padding: .7rem .75rem;
  background: var(--cm-accent-4, rgba(92,36,48,.04));
  cursor: pointer; transition: border-color .15s, background .15s;
}
.coach-meso-tpl:hover { border-color: var(--color-accent, #5C2430); background: var(--cm-accent-8, rgba(92,36,48,.08)); }
.coach-meso-tpl__name { font-size: .85rem; font-weight: 700; margin-bottom: .2rem; }
.coach-meso-tpl__meta { font-size: .72rem; color: var(--color-text-muted, #6b7280); }
.coach-meso-tpl__actions { margin-top: .5rem; display: flex; gap: .35rem; }

/* ── Mejora 24+25+26: Alertas AI — banner de sugerencia ──────────────── */
.coach-ai-suggestion {
  background: var(--color-surface, #fff);
  border: 1.5px solid var(--color-accent, #5C2430);
  border-radius: 12px; padding: .75rem 1rem;
  margin-bottom: var(--space-sm, .75rem);
  display: flex; gap: .75rem; align-items: flex-start;
  animation: slide-up-fade .2s ease both;
}
.coach-ai-suggestion__icon {
  font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem;
  color: var(--color-accent, #5C2430);
}
.coach-ai-suggestion__body { flex: 1; min-width: 0; }
.coach-ai-suggestion__label {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-accent, #5C2430); margin-bottom: .15rem;
}
.coach-ai-suggestion__text { font-size: .83rem; line-height: 1.5; margin: 0; }
.coach-ai-suggestion__actions { display: flex; gap: .35rem; margin-top: .5rem; flex-wrap: wrap; }

/* ── Apertura de plazas ────────────────────────────────────────────────────── */
.btn--success {
  background: #1a7a4a;
  color: #fff;
  border: 1.5px solid #1a7a4a;
}
.btn--success:hover { background: #15623b; border-color: #15623b; }

.coach-disc-section__status-line {
  font-size: .78rem;
  color: var(--color-muted, #888);
  margin: .25rem 0 0;
  padding: 0 1rem .75rem;
  line-height: 1.4;
}

/* ── Banner "sin plazas" en el formulario de registro ──────────────────────── */
.reg-closed-banner {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: rgba(92,36,48,.07);
  border: 1.5px solid rgba(92,36,48,.18);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.reg-closed-banner__icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.reg-closed-banner__title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 .25rem;
}
.reg-closed-banner__sub {
  font-size: .8rem;
  color: var(--color-muted, #666);
  margin: 0;
  line-height: 1.45;
}

.reg-closed-banner__wa { display: inline-flex; align-items: center; gap: .45rem; margin-top: .75rem; padding: .45rem .9rem; background: #25d366; color: #fff; border-radius: 8px; font-size: .82rem; font-weight: 600; text-decoration: none; line-height: 1; transition: background .18s; } .reg-closed-banner__wa:hover { background: #1ebe5d; }


/* ════════════════════════════════════════════════════════════════════════════
   NULLUM — Motion Layer v1.0
   Animaciones modernas: reveal on scroll, microinteracciones, stagger, hover
   Respeta prefers-reduced-motion en todos los casos.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Reveal base: elementos que entran desde abajo con fade ── */
.nlm-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.nlm-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes de dirección */
.nlm-reveal--left {
  transform: translateX(-28px);
}
.nlm-reveal--left.is-visible {
  transform: translateX(0);
}
.nlm-reveal--right {
  transform: translateX(28px);
}
.nlm-reveal--right.is-visible {
  transform: translateX(0);
}
.nlm-reveal--scale {
  transform: scale(0.94);
}
.nlm-reveal--scale.is-visible {
  transform: scale(1);
}

/* ── 2. Stagger delay helpers (aplica a hijos .nlm-reveal dentro de .nlm-stagger) ── */
.nlm-stagger .nlm-reveal:nth-child(1)  { transition-delay: 0ms; }
.nlm-stagger .nlm-reveal:nth-child(2)  { transition-delay: 75ms; }
.nlm-stagger .nlm-reveal:nth-child(3)  { transition-delay: 150ms; }
.nlm-stagger .nlm-reveal:nth-child(4)  { transition-delay: 225ms; }
.nlm-stagger .nlm-reveal:nth-child(5)  { transition-delay: 300ms; }
.nlm-stagger .nlm-reveal:nth-child(6)  { transition-delay: 375ms; }
.nlm-stagger .nlm-reveal:nth-child(7)  { transition-delay: 450ms; }
.nlm-stagger .nlm-reveal:nth-child(8)  { transition-delay: 525ms; }
.nlm-stagger .nlm-reveal:nth-child(9)  { transition-delay: 600ms; }
.nlm-stagger .nlm-reveal:nth-child(10) { transition-delay: 675ms; }

/* ── 3. Hero title: reveal de letras con clip-path ── */
.nlm-hero-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.nlm-hero-char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.nlm-hero-char.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── 4. Hover lift en tarjetas y listas de entrenamiento ── */
.nlm-card-hover {
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.nlm-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(92, 36, 48, 0.12), 0 2px 8px rgba(26, 26, 26, 0.08);
}

/* ── 5. Ripple en botones ── */
.btn {
  position: relative;
  overflow: hidden;
}
.nlm-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0);
  animation: nlm-ripple-anim 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes nlm-ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ── 6. Spotlight / cursor glow en el hero ── */
.nlm-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--nlm-mx, 50%) var(--nlm-my, 50%),
    rgba(92, 36, 48, 0.055) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 0;
  border-radius: inherit;
}
.nlm-spotlight.is-active {
  opacity: 1;
}

/* ── 7. Animación de entrada de números / métricas (count-up acompañado) ── */
.nlm-metric-val {
  display: inline-block;
  transition: color 0.3s;
}

/* ── 8. Indicador de loading shimmer para tarjetas que cargan datos ── */
.nlm-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-deep) 25%,
    var(--color-surface-hover) 50%,
    var(--color-bg-deep) 75%
  );
  background-size: 200% 100%;
  animation: nlm-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes nlm-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 9. Microinteracción: pulse en el badge "plazas limitadas" del hero ── */
@keyframes nlm-pulse-ring {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.nlm-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nlm-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  animation: nlm-pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

/* ── 10. Tabs de sección con indicador animado ── */
.nlm-tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px 2px 0 0;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: left, width;
}

/* ── 11. Transición de sección/vista ── */
.nlm-section-enter {
  animation: nlm-section-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes nlm-section-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 12. Hover en pills / badges de estado ── */
.nlm-pill-hover {
  transition: background 0.2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nlm-pill-hover:hover {
  transform: scale(1.04);
}

/* ── 13. Entrada flotante del navbar ── */
@keyframes nlm-nav-drop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.nlm-nav-anim {
  animation: nlm-nav-drop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── 14. CTA button: shine sweep en hover ── */
.btn--primary::after,
.btn.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 80%
  );
  transition: left 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn--primary:hover::after,
.btn.btn--primary:hover::after {
  left: 160%;
}

/* ── 15. Input focus: border animate + label float ── */
.form__input {
  transition:
    border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow   0.22s cubic-bezier(0.16, 1, 0.3, 1),
    background   0.22s;
}

/* ── Reduced motion: desactivar todo ── */
@media (prefers-reduced-motion: reduce) {
  .nlm-reveal,
  .nlm-hero-char,
  .nlm-card-hover,
  .nlm-section-enter,
  .nlm-nav-anim {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .nlm-ripple,
  .nlm-pulse::before,
  .nlm-skeleton {
    animation: none !important;
  }
  .btn--primary::after,
  .btn.btn--primary::after {
    display: none;
  }
}

/* ── _21-appshell.css ── */
/* ============================================================
   NULLUM — App shell v2 (barra inferior · hubs · tarjetas · inicio)
   Todo acotado a .dashboard--shell (lo añade nullumShell.js):
   si el script falla, la app conserva el sidebar y el aspecto anterior.
   Solo tokens --color-* → compatible con los 8 temas y el modo noche.
   ============================================================ */

.dashboard {
  --shell-r-card: 20px;
  --shell-r-tile: 18px;
  --shell-r-pill: 999px;
  --shell-gap: 12px;
  --shell-bar-h: 64px;
  --shell-bar-space: calc(var(--shell-bar-h) + 28px + env(safe-area-inset-bottom, 0px));
  --shell-bar-bg: #1A1A1A;
  --shell-bar-fg: rgba(255, 255, 255, 0.64);
  --shell-bar-ring: transparent;
}

html[data-theme-mode="dark"] .dashboard {
  --shell-bar-bg: var(--color-surface-raised);
  --shell-bar-fg: var(--color-text-secondary);
  --shell-bar-ring: var(--color-border-strong);
}

/* ─── Barra inferior flotante ─────────────────────────────── */
.shell-tabbar { display: none; }

.dashboard--shell .shell-tabbar {
  display: flex;
  position: fixed;
  z-index: 90;
  top: auto;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 460px);
  height: var(--shell-bar-h);
  padding: 6px;
  gap: 2px;
  box-sizing: border-box;
  align-items: stretch;
  border-radius: var(--shell-r-pill);
  background: var(--shell-bar-bg);
  box-shadow:
    0 0 0 1px var(--shell-bar-ring),
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.16);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

/* Desktop: ocultar tabbar móvil (misma regla que _21-appshell). */
@media (min-width: 900px) {
  .dashboard--shell .shell-tabbar {
    display: none !important;
  }
}

.dashboard--shell .shell-tabbar[data-hidden="1"] {
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
}

.shell-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--shell-r-pill);
  background: transparent;
  color: var(--shell-bar-fg);
  font-family: var(--font-heading);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--press-ms) ease;
}

.shell-tab:active { transform: scale(var(--press-scale)); }

.shell-tab:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 1px;
}

.shell-tab[aria-current="page"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.shell-tab__label {
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 340px) {
  .shell-tab__label { font-size: 0.54rem; }
}

/* ─── Sub-pestañas del hub (chips) ─────────────────────────── */
.dashboard .shell-subnav { display: none; }

.dashboard--shell .shell-subnav:not([hidden]) {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  padding: 4px max(var(--page-pad-x), env(safe-area-inset-right)) 6px max(var(--page-pad-x), env(safe-area-inset-left));
}

.shell-subnav__inner {
  display: flex;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shell-subnav__inner::-webkit-scrollbar { display: none; }

.shell-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-pill);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.shell-chip[aria-current="page"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.shell-chip:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* ─── Topbar: ligera, sin barra roja, con acciones a la derecha ─ */
/* Restaurar topbar en desktop (training.css la oculta en ≥1024px sin shell) */
.dashboard--shell .topbar {
  display: flex;
  background: transparent;
  border-bottom: 0;
  padding-bottom: var(--space-sm);
}

.dashboard--shell .topbar + .stripe { display: none; }

.dashboard--shell .topbar__heading { justify-content: flex-start; padding: 0 var(--space-xs); }

.dashboard--shell .topbar__greeting {
  text-align: left;
  font-size: clamp(0.95rem, 4.2vw, 1.12rem);
  font-weight: 800;
}

.dashboard--shell .topbar__actions { gap: 2px; }

/* Logo negro sobre fondo oscuro: invertir en modo noche */
html[data-theme-mode="dark"] .dashboard--shell .topbar__logo-mark {
  content: url("../assets/logo-blanco.png");
  filter: drop-shadow(0 0 7px rgba(255, 140, 165, 0.6));
}

.topbar__chat-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.topbar__chat-btn:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* El entrenador tiene Mensajes en la barra inferior */
.dashboard[data-role="trainer"] .topbar__chat-btn { display: none; }

/* Espacio para que la barra flotante no tape contenido */
.dashboard--shell .dashboard__content {
  padding-bottom: var(--shell-bar-space);
}

/* El FAB global "Sesión" queda redundante con la pestaña Entrenar */
html:has(.dashboard--shell) .global-session-fab { display: none !important; }

/* ─── Tarjetas: de "módulos abiertos" a tarjetas reales ────────── */
.dashboard--shell .card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-card);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.dashboard--shell .card + .card {
  margin-top: var(--shell-gap);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.dashboard--shell .card .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.dashboard--shell .card__body { padding-bottom: var(--space-sm); }

/* ─── Cabecera de pantalla: compacta, sin bloque oscuro ──────── */
/* Prefijo con #id: supera los overrides por panel (#panelCalendar .panel__header…) */
#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header {
  margin: 0 0 var(--space-md);
  padding: var(--space-xs) var(--space-xs) 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--color-text-primary);
  --color-text-primary: inherit;
  --color-text-secondary: inherit;
  --color-text-muted: inherit;
  --color-border: inherit;
  --color-border-strong: inherit;
  --color-surface: inherit;
  --color-accent-gold: inherit;
}

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header::before,
#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header::after,
#screenDashboard.dashboard--shell .panel--active::before,
#screenDashboard.dashboard--shell .panel-wm { display: none; }

#screenDashboard.dashboard--shell .panel__header-logo,
#screenDashboard.dashboard--shell .panel__eyebrow { display: none; }

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header .panel__title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
}

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header .panel__subtitle {
  margin: 2px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  letter-spacing: 0;
}

/* Hoy / Clientes / Herramientas del coach viven en la barra inferior */
.dashboard--shell .trainer-tabs { display: none; }

/* ============================================================
   INICIO — hero → semana → estado → coach → hábitos
   .welcome pasa a rejilla de 2 columnas; la zona hero se disuelve
   (display: contents) para que todos los widgets se ordenen juntos.
   ============================================================ */
.dashboard--shell .welcome {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
  align-content: start;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-lg);
}

.dashboard--shell .welcome > *,
.dashboard--shell .welcome__hero-zone > * {
  grid-column: 1 / -1;
  margin: 0;
  min-width: 0;
}

.dashboard--shell .welcome__hero-zone {
  display: contents;
  --color-text-primary: inherit;
  --color-text-secondary: inherit;
  --color-text-muted: inherit;
  --color-border-strong: inherit;
  --color-surface: inherit;
  --color-accent-gold: inherit;
}

.dashboard--shell .welcome__hero-zone::before,
.dashboard--shell .welcome__hero-zone::after,
.dashboard--shell .welcome__zone-brand,
.dashboard--shell .welcome-chips,
.dashboard--shell .welcome-command { display: none; }

/* Orden: saludo → acción de hoy → semana → atajos → avisos → estado → hábitos */
.dashboard--shell .welcome .welcome__hero-zone > .welcome__greeting { order: 1; }
.dashboard--shell .welcome .coach-tower          { order: 1; }
.dashboard--shell .welcome .weekly-split-view    { order: 3; }
.dashboard--shell .welcome .home-grid            { order: 4; }
.dashboard--shell .welcome .plan-updated-banner  { order: 5; }
.dashboard--shell .welcome .coach-feedback-banner{ order: 5; }
.dashboard--shell .welcome .checkin-streak       { order: 7; grid-column: auto; }
.dashboard--shell .welcome .cycle-week-widget    { order: 8; }
.dashboard--shell .welcome .coach-goal-widget    { order: 9; }
.dashboard--shell .welcome .progress-pulse       { order: 10; }
.dashboard--shell .welcome .habits               { order: 11; }
.dashboard--shell .welcome .week-compare         { order: 12; }
.dashboard--shell .welcome .weight-chart-card    { order: 13; }
.dashboard--shell .welcome .constancy            { order: 14; }
.dashboard--shell .welcome .precision            { order: 15; }
.dashboard--shell .welcome .welcome__grid        { order: 16; }

/* Tarjeta protagonista (order 2) */
.dashboard--shell .welcome .welcome-hero {
  order: 2;
  width: 100%;
  min-height: 7rem;
  padding: 1.35rem 1.35rem;
  border-radius: 26px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 16px 36px color-mix(in srgb, var(--color-accent) 35%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard--shell .welcome .welcome-hero:hover,
.dashboard--shell .welcome .welcome-hero:focus-visible {
  background: var(--color-accent-hover);
  transform: none;
}

.dashboard--shell .welcome-hero__label {
  font-size: clamp(1.35rem, 5.8vw, 1.7rem);
  font-weight: 900;
}

.dashboard--shell .welcome-hero__hint { opacity: 0.85; font-size: 0.86rem; }

.dashboard--shell .welcome-hero__cta {
  padding: 0.7rem 1.1rem;
  background: var(--color-on-accent);
  color: var(--color-accent);
  font-size: 0.8rem;
}

/* Tarjetas de estado (readiness, racha, ciclo, coach, comparativa, peso) */
.dashboard--shell .welcome .readiness-widget,
.dashboard--shell .welcome .checkin-streak,
.dashboard--shell .welcome .cycle-week-widget,
.dashboard--shell .welcome .coach-goal-widget,
.dashboard--shell .welcome .week-compare,
.dashboard--shell .welcome .weight-chart-card,
.dashboard--shell .welcome .weekly-split-view,
.dashboard--shell .welcome .progress-pulse,
.dashboard--shell .welcome .habits,
.dashboard--shell .welcome .constancy,
.dashboard--shell .welcome .precision {
  box-sizing: border-box;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-tile);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

.dashboard--shell .welcome .readiness-widget {
  order: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "score label" "score hint";
  column-gap: 0.9rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  text-align: left;
}

.dashboard--shell .welcome .readiness-widget__score-wrap { grid-area: score; }
.dashboard--shell .welcome .readiness-widget__label { grid-area: label; margin: 0; font-weight: 700; letter-spacing: 0; text-transform: none; }
.dashboard--shell .welcome .readiness-widget__hint { grid-area: hint; margin: 0; }

.dashboard--shell .welcome .readiness-widget[data-score="high"] { background: var(--color-success-bg); border-color: var(--color-success); }
.dashboard--shell .welcome .readiness-widget[data-score="mid"]  { background: var(--color-cal-missed-bg); border-color: var(--color-cal-missed); }
.dashboard--shell .welcome .readiness-widget[data-score="low"]  { background: var(--color-error-bg); border-color: var(--color-error); }

.dashboard--shell .welcome .progress-pulse,
.dashboard--shell .welcome .habits,
.dashboard--shell .welcome .constancy,
.dashboard--shell .welcome .precision,
.dashboard--shell .welcome .week-compare,
.dashboard--shell .welcome .weight-chart-card,
.dashboard--shell .welcome .weekly-split-view {
  padding: var(--space-md);
}

/* Semana: tira de píldoras (L M X J V S D) */
.dashboard--shell .weekly-split-view__days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.dashboard--shell .weekly-split-view__days::-webkit-scrollbar { display: none; }

.dashboard--shell .weekly-split-view__day {
  flex: 1 0 3.1rem;
  min-width: 3.1rem;
  min-height: 4.4rem;
  padding: 0.55rem 0.2rem;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.dashboard--shell .weekly-split-view__day--today {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg);
}

.dashboard--shell .weekly-split-view__day--rest { opacity: 0.55; }

.dashboard--shell .weekly-split-view__day-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   RUNNERS · paso 1 — pre-carrera (nullumRunnersUi.js)
   Estado de la carrera: #panelRunners[data-run-state]
   ============================================================ */
#screenDashboard.dashboard--shell #panelRunners > .panel__header { display: none; }

.run-hero { display: none; }

.dashboard--shell .run-hero {
  display: block;
  position: relative;
  margin: 0 0 var(--shell-gap);
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 85% 0%, color-mix(in srgb, var(--color-accent) 80%, #fff 8%) 0%, transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--color-accent) 72%, #000) 0%, #120609 78%);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.run-hero__hello {
  margin: 0 0 1.1rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 9vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.run-hero__week {
  margin: 0 0 0.9rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.run-hero__week strong { font-size: 1.5rem; font-weight: 900; }
.run-hero__week span { font-weight: 600; opacity: 0.7; }

.run-hero__bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 0 0 1.15rem;
}

.run-hero__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.run-hero__val {
  min-height: 0.9rem;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.8;
}

.run-hero__col {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 74px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.run-hero__col i {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.run-hero__day.is-today .run-hero__col i { background: #fff; }

.run-hero__lbl { font-size: 0.72rem; font-weight: 800; opacity: 0.75; }
.run-hero__day.is-today .run-hero__lbl { opacity: 1; }

.run-hero__start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--press-ms) ease;
}

.run-hero__start:active { transform: scale(var(--press-scale)); }

.run-hero__start:focus-visible {
  outline: 3px solid var(--color-accent-gold);
  outline-offset: 3px;
}

/* En carrera/pausa el hero y la estructura se apartan; manda el mapa */
#panelRunners[data-run-state="running"] .run-hero,
#panelRunners[data-run-state="paused"] .run-hero,
#panelRunners[data-run-state="running"] .runners__setup-card,
#panelRunners[data-run-state="paused"] .runners__setup-card { display: none; }

/* El Empezar del hero sustituye al del mapa en reposo */
.dashboard--shell #panelRunners[data-run-state="idle"] .runners-map-controls__start { display: none; }

/* Estructura de la sesión: sin título de tarjeta, chips en fila deslizable */
.dashboard--shell .runners__setup-card { padding-top: var(--space-sm); }

.dashboard--shell .runners-session-tabs--chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.dashboard--shell .runners-session-tabs--chips::-webkit-scrollbar { display: none; }
.dashboard--shell .runners-session-tabs--chips .runners-session-tab { flex: 0 0 auto; border-radius: 999px; }

.dashboard--shell .runners__setup-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: 0;
}

/* ============================================================
   INICIO v2 — saludo grande, brillo burdeos, atajos con icono
   (referencias: Hevy · Move/Sync · música oscura)
   ============================================================ */

/* Brillo difuso de marca detrás de la cabecera */
.dashboard--shell .dashboard__main { position: relative; isolation: isolate; }

.dashboard--shell .dashboard__main::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 12% -5%, color-mix(in srgb, var(--color-accent) 30%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 60% 55% at 100% 8%, color-mix(in srgb, var(--color-accent) 16%, transparent) 0%, transparent 72%);
}

/* Saludo grande en el inicio */

.dashboard--shell .welcome__hero-zone > .welcome__greeting {
  display: block;
  margin: 0;
  padding: var(--space-xs) var(--space-xs) 0;
  border: 0;
}

.dashboard--shell .welcome__hello {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  line-height: 1.02;
  text-transform: none;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

.dashboard--shell .welcome__role,
.dashboard--shell .welcome__next { display: none; }

.dashboard--shell .welcome-checkin-streak:not([hidden]) {
  display: inline-flex;
  margin: 0.8rem 0 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: 0.8rem;
  font-weight: 800;
}

/* Rejilla de atajos 2 × N */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
}

.home-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--press-ms) ease, background var(--transition-fast);
}

.home-card:active { transform: scale(var(--press-scale)); }

.home-card:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

.home-card__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 15px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.home-card__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.home-card__title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.home-card__sub {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cristal en modo noche: tarjetas translúcidas con borde luminoso */
html[data-theme-mode="dark"] .dashboard--shell .card,
html[data-theme-mode="dark"] .dashboard--shell .home-card,
html[data-theme-mode="dark"] .dashboard--shell .welcome .readiness-widget,
html[data-theme-mode="dark"] .dashboard--shell .welcome .progress-pulse,
html[data-theme-mode="dark"] .dashboard--shell .welcome .habits,
html[data-theme-mode="dark"] .dashboard--shell .welcome .weekly-split-view {
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  border-color: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Tira semanal: tamaño táctil como Move/Sync */
.dashboard--shell .weekly-split-view__head { display: none; }

/* ── _21-improvements.css ── */
/* ============================================================
   NULLUM — _21-improvements.css
   Mejoras UX/funcionales para pantallas de coach y atleta.
   ============================================================ */

/* ── 1. Recency badge en tarjetas de cliente (Coach Tower) ── */
.coach-tower__recency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 4px;
  line-height: 1.4;
  pointer-events: none;
}
.coach-tower__recency--green {
  background: rgba(47, 107, 94, 0.12);
  color: #2F6B5E;
}
.coach-tower__recency--amber {
  background: rgba(166, 107, 46, 0.14);
  color: #A66B2E;
}
.coach-tower__recency--red {
  background: rgba(92, 36, 48, 0.12);
  color: #5C2430;
}
[data-theme-mode="dark"] .coach-tower__recency--green { color: var(--color-success-dark); background: rgba(95, 207, 186, 0.12); }
[data-theme-mode="dark"] .coach-tower__recency--amber { color: var(--color-warning-dark); background: rgba(245, 192, 106, 0.12); }
[data-theme-mode="dark"] .coach-tower__recency--red   { color: var(--color-error-dark);   background: rgba(224, 112, 128, 0.14); }

/* ── 2. Barra diaria de estado en tab "Hoy" del coach ── */
.coach-daily-strip {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-sm) 0 var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.coach-daily-strip__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 60px;
  min-width: 60px;
  padding: var(--space-sm) var(--space-sm);
  border-radius: 10px;
  background: var(--color-surface-inset);
  text-align: center;
  gap: 2px;
}
.coach-daily-strip__val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.coach-daily-strip__lbl {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.coach-daily-strip__stat--accent .coach-daily-strip__val {
  color: var(--color-accent);
}
.coach-daily-strip__stat--warn .coach-daily-strip__val {
  color: #A66B2E;
}

/* ── 3. Selector de periodo rápido en stats ── */
.stats-period-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.stats-period-pill {
  padding: 5px 13px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  line-height: 1;
}
.stats-period-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.stats-period-pill.is-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── 4. Buscador de ejercicios en Training Designer ── */
.split-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-sm);
  background: var(--color-surface-inset);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.split-search-bar__icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.split-search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  outline: none;
  min-width: 0;
}
.split-search-bar__input::placeholder {
  color: var(--color-text-muted);
}
.split-search-bar__count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.split-day--hidden-by-search {
  display: none !important;
}
.exercise-row--hidden-by-search {
  display: none !important;
}

/* ── 5. Hint de peso anterior en check-in ── */
.wci-weight-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 5px 10px;
  background: var(--color-surface-inset);
  border-radius: 8px;
  border-left: 3px solid var(--color-border-strong);
}
.wci-weight-hint--up   { border-left-color: #5C2430; }
.wci-weight-hint--down { border-left-color: #2F6B5E; }
.wci-weight-hint--same { border-left-color: var(--color-border-strong); }
.wci-weight-hint__trend {
  font-weight: 900;
  font-size: 1rem;
}
.wci-weight-hint--up   .wci-weight-hint__trend { color: #5C2430; }
.wci-weight-hint--down .wci-weight-hint__trend { color: #2F6B5E; }

/* ── 6. Botón copiar macros en nutrición ── */
.nutri-copy-macros-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  margin-top: 4px;
}
.nutri-copy-macros-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.nutri-copy-macros-btn.is-copied {
  border-color: #2F6B5E;
  color: #2F6B5E;
}

/* ── 7. Toast de completado de sesión ── */
.session-complete-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  max-width: calc(100vw - 32px);
}
.session-complete-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.session-complete-toast__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 2px;
}

/* ── 8. Resumen de adherencia compacto en perfil ── */
.profile-adherence-summary {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-md);
}
.profile-adherence-summary__stat {
  flex: 1 1 70px;
  text-align: center;
  padding: var(--space-sm);
  background: var(--color-surface-inset);
  border-radius: 10px;
}
.profile-adherence-summary__val {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-accent);
  display: block;
  letter-spacing: -0.02em;
}
.profile-adherence-summary__lbl {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

/* ── 9. Indicador de progreso en Training Designer readonly ── */
.split-readonly-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: var(--space-sm) 0 var(--space-md);
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.split-readonly-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--color-surface-inset);
  border: 1px solid var(--color-border);
  font-weight: 600;
}

/* ── 10. Feedback visual al marcar check-in como listo ── */
.wci-step-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(47, 107, 94, 0.12);
  color: #2F6B5E;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}
[data-theme-mode="dark"] .wci-step-done-badge {
  color: var(--color-success-dark);
  background: rgba(95, 207, 186, 0.12);
}

/* ── 11. Estado vacío mejorado en stats ── */
.stats-empty-cta {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-text-muted);
}
.stats-empty-cta__title {
  font-size: var(--text-title);
  font-weight: var(--weight-title);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}
.stats-empty-cta__sub {
  font-size: var(--text-body);
  margin-bottom: var(--space-lg);
}

/* ── 12. Atajos de teclado visible para usuarios desktop ── */
.kb-hint {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .kb-hint {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
    color: var(--color-text-muted);
    background: var(--color-surface-inset);
    letter-spacing: 0.04em;
    margin-left: 6px;
    vertical-align: middle;
    pointer-events: none;
  }
}

/* ── 13. Quick-response templates en coach check-in review ── */
.coach-quick-replies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.coach-quick-reply {
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.coach-quick-reply:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .session-complete-toast,
  .stats-period-pill,
  .coach-quick-reply {
    transition: none;
  }
}

/* ── _22-runners-v2.css ── */
/* ============================================================
   NULLUM — Runners v2 (referencias: Nike Run Club · running oscuro)
   Mapa inmersivo oscuro · tarjeta de cristal · botones grandes · tiles.
   Estado: #panelRunners[data-run-state] (nullumRunnersUi.js).
   Prefijo #screenDashboard.dashboard--shell para superar _07-runners.
   ============================================================ */

#screenDashboard.dashboard--shell #panelRunners {
  --run-glass: rgba(16, 10, 12, 0.62);
  --run-glass-line: rgba(255, 255, 255, 0.14);
  --run-ink: #fff;
  --run-ink-dim: rgba(255, 255, 255, 0.66);
}

/* ─── Tarjeta "Carrera en vivo": sin chrome, solo mapa ───────── */
#screenDashboard.dashboard--shell #panelRunners .runners__live-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__live-card > .card__header {
  padding: 0 0 var(--space-sm);
  border: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__status-row .card__title { display: none; }

#screenDashboard.dashboard--shell #panelRunners .runners__live-card > .card__body { padding: 0; }

#screenDashboard.dashboard--shell #panelRunners .runners__badge {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

/* Selector de actividad: píldora ligera */
#screenDashboard.dashboard--shell #panelRunners .runners-activity-bar__pick {
  border-radius: 999px;
}

/* ─── Mapa oscuro a sangre ──────────────────────────────────── */
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage {
  height: 300px;
  min-height: 300px;
  border: 0;
  border-radius: 30px;
  background: #0c0809;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transition: height var(--transition-base);
}

#screenDashboard.dashboard--shell #panelRunners[data-run-state="running"] .runners-map-stage,
#screenDashboard.dashboard--shell #panelRunners[data-run-state="paused"] .runners-map-stage {
  height: min(calc(100svh - 190px), 640px);
  min-height: 460px;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage__map,
#screenDashboard.dashboard--shell #panelRunners #runnersLiveMap,
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-container {
  height: 100% !important;
  min-height: 0;
  background: #14100f;
}

/* Teselas en modo oscuro (OSM claro → gris carbón) */
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) saturate(0.3) brightness(0.72) contrast(1.08);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.45);
  color: var(--run-ink-dim);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-attribution a { color: var(--run-ink-dim); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-zoom a {
  background: var(--run-glass) !important;
  color: var(--run-ink) !important;
}

/* ─── Cristal: calidad GPS, barra viva, pastilla ───────────── */
#screenDashboard.dashboard--shell #panelRunners .runners-gps-quality,
#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar,
#screenDashboard.dashboard--shell #panelRunners .runners-map-pill {
  background: var(--run-glass);
  border: 1px solid var(--run-glass-line);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--run-ink);
}

#screenDashboard.dashboard--shell #panelRunners .runners-gps-quality__label,
#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar__value,
#screenDashboard.dashboard--shell #panelRunners .runners-map-pill { color: var(--run-ink); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar__label { color: var(--run-ink-dim); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar {
  top: 0.75rem;
  left: 0.75rem;
  right: 5.4rem;
}

/* Tarjeta principal de datos: abajo, números enormes */
#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics {
  top: auto;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 5.1rem;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: end;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  border-radius: 26px;
  background: var(--run-glass);
  border: 1px solid var(--run-glass-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__label {
  color: var(--run-ink-dim);
  font-size: 0.6rem;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__value {
  color: var(--run-ink);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__cell:nth-child(2) { order: -1; }

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__cell:nth-child(2) .runners-map-metrics__value {
  font-size: clamp(2.5rem, 12vw, 3.4rem);
  line-height: 0.95;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__unit { color: var(--run-ink-dim); font-size: 0.7rem; }

/* ─── Controles: pausa (blanca) + finalizar (acento) ───────── */
#screenDashboard.dashboard--shell #panelRunners .runners-map-controls {
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  gap: 0.6rem;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls .btn {
  min-height: 3.6rem;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__pause {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  color: #1a0a0e;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__finish {
  flex: 1.6 1 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__start {
  background: #fff;
  color: #1a0a0e;
}

/* ─── Tiles de métricas (2×2 como la referencia) ───────────── */
#screenDashboard.dashboard--shell #panelRunners .runners__metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
  margin: var(--shell-gap) 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric {
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero {
  grid-column: 1 / -1;
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-label,
#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-unit,
#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-value { color: var(--color-on-accent); }

#screenDashboard.dashboard--shell #panelRunners .runners__metric-value {
  font-size: clamp(1.7rem, 7vw, 2.2rem);
}

/* Antes de salir: el mapa es vista previa; las métricas en reposo no aportan */
#screenDashboard.dashboard--shell #panelRunners[data-run-state="idle"] .runners__metrics { display: none; }

/* ─── Resumen post-carrera ────────────────────────────────── */
#screenDashboard.dashboard--shell #panelRunners .runners__result-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__canvas-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: #0c0809;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__cell {
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-align: left;
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__value {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 900;
}

#screenDashboard.dashboard--shell #panelRunners .runners__result-actions .btn { border-radius: 999px; }

/* Perfil de terreno, splits e historial: tarjetas redondeadas */
#screenDashboard.dashboard--shell #panelRunners .runners-elev-chart,
#screenDashboard.dashboard--shell #panelRunners .runners-splits {
  border-radius: 22px;
}

/* ─── Estructura de la sesión: chips limpios, ajustes a la derecha ─ */
#screenDashboard.dashboard--shell #panelRunners .runners__setup-card {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#screenDashboard.dashboard--shell #panelRunners .runners__setup-header {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0;
  z-index: 2;
}

#screenDashboard.dashboard--shell #panelRunners .runners__setup-header .card__title { display: none; }

#screenDashboard.dashboard--shell #panelRunners .runners__setup-card > .card__body { padding: 0 0 var(--space-sm); }

#screenDashboard.dashboard--shell #panelRunners .runners__setup-intro {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  padding-right: 3.5rem;
  font-weight: 700;
}

#screenDashboard.dashboard--shell #panelRunners .runners-prefs-gear {
  border-radius: 50%;
}

/* ============================================================
   HUD EN CARRERA (#runnerHud) — referencias 7 y 8
   Oscuro con brillo de marca · cristal · cifras enormes.
   La especificidad supera los !important del HUD clínico claro.
   ============================================================ */
html:root #runnerHud:not([data-a]):not([data-b]) {
  --hud-tint: color-mix(in srgb, var(--color-accent) 30%, #ffe9ee);
  --hud-accent: color-mix(in srgb, var(--color-accent) 62%, #fff);
  --hud-glass: rgba(255, 255, 255, 0.07);
  --hud-line: rgba(255, 255, 255, 0.14);
  --hud-dim: rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(ellipse 100% 46% at 50% -4%, color-mix(in srgb, var(--color-accent) 58%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 24%, transparent) 0%, transparent 70%),
    #0a0506 !important;
  color: #fff !important;
}

html:root #runnerHud:not([data-a]):not([data-b]) .runner-hud__shell {
  background: transparent !important;
  color: #fff !important;
  gap: 0.85rem;
}

/* Cabecera: píldoras de cristal */
#runnerHud .runner-hud__type {
  color: var(--hud-dim);
  font-size: 0.74rem;
}

#runnerHud .runner-hud__badge,
#runnerHud .runner-hud__wake {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--hud-line);
  border-radius: 999px;
  background: var(--hud-glass);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#runnerHud .runner-hud__badge[data-state="running"] {
  background: var(--hud-accent);
  border-color: transparent;
  color: #1a0a0e;
}

#runnerHud .runner-hud__badge[data-state="paused"] { color: #ffd9a0; border-color: #ffd9a0; }
#runnerHud .runner-hud__wake[data-on="true"] { color: #b9f0d0; border-color: #b9f0d0; }

/* Bloque de intervalos y progreso */
#runnerHud .runner-hud__block {
  margin: 0;
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
}

#runnerHud .runner-hud__block-phase { color: var(--hud-tint); }
#runnerHud .runner-hud__block[data-phase="recover"] .runner-hud__block-phase { color: #b9f0d0; }
#runnerHud .runner-hud__block-meta { color: var(--hud-dim); }
#runnerHud .runner-hud__progress-label { color: var(--hud-dim); }

/* Ritmo actual: tarjeta de cristal protagonista */
#runnerHud .runner-hud__hero {
  flex: 1 1 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--hud-line);
  border-radius: 30px;
  background: var(--hud-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#runnerHud .runner-hud__label { color: var(--hud-dim); }

#runnerHud .runner-hud__pace {
  color: var(--hud-tint);
  letter-spacing: -0.05em;
}

#runnerHud .runner-hud__pace-unit { color: var(--hud-dim); }

/* Distancia y tiempo enormes (ref. 8), medio y cadencia debajo */
#runnerHud .runner-hud__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hud-line);
  border-radius: 28px;
  background: var(--hud-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#runnerHud .runner-hud__cell {
  padding: 0;
  text-align: left;
}

#runnerHud .runner-hud__cell:nth-child(2),
#runnerHud .runner-hud__cell:nth-child(3) { order: -1; }

#runnerHud .runner-hud__cell-label {
  color: var(--hud-dim);
  font-size: 0.64rem;
}

#runnerHud .runner-hud__cell-value {
  margin-top: 0.25rem;
  color: #fff;
  font-size: clamp(1.25rem, 5.4vw, 1.6rem);
}

#runnerHud .runner-hud__cell:nth-child(2) .runner-hud__cell-value,
#runnerHud .runner-hud__cell:nth-child(3) .runner-hud__cell-value {
  color: var(--hud-tint);
  font-size: clamp(2.5rem, 13vw, 3.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

/* Altimetría, zona, telemetría, aviso */
#runnerHud .runner-hud__elev {
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
}

#runnerHud .runner-hud__elev-item { color: var(--hud-dim); }
#runnerHud .runner-hud__elev-item b { color: #fff; }
#runnerHud .runner-hud__zone { margin: 0; color: #fff; }
#runnerHud .runner-hud__cue { color: var(--hud-dim); margin: 0; }
#runnerHud .runner-hud__fuel-label { color: var(--hud-tint); }
#runnerHud .runner-hud__fuel-next,
#runnerHud .runner-hud__tel-item { color: var(--hud-dim); }
#runnerHud .runner-hud__tel-item b { color: #fff; }

/* Controles: ghost pequeños + Pausa blanca y Fin en acento, como pastillas grandes */
#runnerHud .runner-hud__controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

#runnerHud .runner-hud__btn {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  background: #fff;
  color: #1a0a0e;
}

#runnerHud .runner-hud__btn--ghost {
  min-height: 46px;
  border: 1px solid var(--hud-line);
  background: var(--hud-glass);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#runnerHud .runner-hud__btn--finish {
  background: var(--hud-accent);
  color: #1a0a0e;
}

/* Leyenda de zonas: arriba, bajo la barra viva, para no tapar la tarjeta */
#screenDashboard.dashboard--shell #panelRunners .runners-heat-legend {
  top: 4.3rem;
  bottom: auto;
  left: 0.75rem;
  right: auto;
}

/* ============================================================
   RESUMEN POST-CARRERA (#runnersSuccessModal) — hoja oscura a
   pantalla completa, coherente con el HUD (refs 1 y 7).
   ============================================================ */
#runnersSuccessModal {
  --hud-tint: color-mix(in srgb, var(--color-accent) 30%, #ffe9ee);
  --hud-accent: color-mix(in srgb, var(--color-accent) 62%, #fff);
  --hud-glass: rgba(255, 255, 255, 0.07);
  --hud-line: rgba(255, 255, 255, 0.14);
  --hud-dim: rgba(255, 255, 255, 0.62);
  padding: 0;
  align-items: stretch;
}

#runnersSuccessModal .runners-success__backdrop { background: #0a0506; }

#runnersSuccessModal .runners-success__card {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  height: 100%;
  margin: 0 auto;
  padding: max(1.25rem, var(--safe-top)) 1.1rem 0;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  background:
    radial-gradient(ellipse 100% 40% at 50% -4%, color-mix(in srgb, var(--color-accent) 58%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 24%, transparent) 0%, transparent 70%),
    #0a0506;
}

#runnersSuccessModal .runners-success__eyebrow { color: var(--hud-dim); }

#runnersSuccessModal .runners-success__title {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: clamp(1.9rem, 8.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

#runnersSuccessModal .runners-success__sync {
  align-self: flex-start;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--hud-line);
  border-radius: 999px;
  background: var(--hud-glass);
  color: var(--hud-dim);
  order: 1;
}

#runnersSuccessModal .runners-success__sync[data-state="ok"] { color: #b9f0d0; }
#runnersSuccessModal .runners-success__sync[data-state="pending"] { color: #ffd9a0; }

/* Métricas: distancia protagonista + tiles de cristal */
#runnersSuccessModal .runners-success__metrics {
  order: 2;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

#runnersSuccessModal .runners-success__metric {
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
  text-align: left;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#runnersSuccessModal .runners-success__metric--hero {
  padding: 1.2rem 1.25rem;
  border-radius: 28px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--color-accent) 80%, #fff 6%) 0%, color-mix(in srgb, var(--color-accent) 45%, #0a0506) 100%);
  border-color: transparent;
}

#runnersSuccessModal .runners-success__metric-label { color: var(--hud-dim); font-size: 0.64rem; }
#runnersSuccessModal .runners-success__metric-value { color: #fff; font-size: clamp(1.55rem, 7vw, 2rem); }

#runnersSuccessModal .runners-success__metric--hero .runners-success__metric-value {
  color: #fff;
  font-size: clamp(3.2rem, 17vw, 4.6rem);
  line-height: 0.95;
}

#runnersSuccessModal .runners-success__metric-unit { color: var(--hud-dim); font-size: 0.74rem; }

/* Splits, aviso híbrido y firma biométrica: tarjetas de cristal */
#runnersSuccessModal .runners-success__splits,
#runnersSuccessModal .runners-success__hybrid,
#runnersSuccessModal .runners-bio-sign {
  order: 3;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hud-line);
  border-radius: 24px;
  background: var(--hud-glass);
  color: #fff;
}

#runnersSuccessModal .runners-success__splits[hidden],
#runnersSuccessModal .runners-success__hybrid[hidden] { display: none; }

#runnersSuccessModal .runners-success__splits-title,
#runnersSuccessModal .runners-bio-sign__eyebrow { color: var(--hud-dim); }
#runnersSuccessModal .runners-bio-sign__hint,
#runnersSuccessModal .runners-bio-sign__label { color: var(--hud-dim); }
#runnersSuccessModal .runners-bio-sign__label strong { color: #fff; }

#runnersSuccessModal .runners-success__splits-table th {
  color: var(--hud-dim);
  border-bottom-color: var(--hud-line);
}

#runnersSuccessModal .runners-success__splits-table td {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

#runnersSuccessModal .runners-success__splits-table td[data-best="1"] { color: #b9f0d0; }
#runnersSuccessModal .runners-success__splits-table td[data-worst="1"] { color: #ffb3c2; }

/* CTA fijo abajo */
#runnersSuccessModal .runners-success__actions {
  order: 4;
  position: sticky;
  bottom: 0;
  margin: auto -1.1rem 0;
  padding: 0.9rem 1.1rem max(1rem, var(--safe-bottom));
  background: linear-gradient(to top, #0a0506 60%, transparent);
}

#runnersSuccessModal .runners-success__actions .btn {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
}

/* Resumen en el panel: splits, calzado, háptica y nutrición como tarjetas */
#screenDashboard.dashboard--shell #panelRunners .runners-gear-finish,
#screenDashboard.dashboard--shell #panelRunners .haptic-therapy,
#screenDashboard.dashboard--shell #panelRunners .runners-nutrition {
  border-radius: 22px;
}

#runnersSuccessModal #runnersSuccessCadWrap { grid-column: 1 / -1; }

/* ── _23-stats-v2.css ── */
/* ============================================================
   NULLUM — Estadísticas v2 · "centro de mando"
   Escenario oscuro con rejilla y brillo de marca, cristal, neón rosa
   sobre burdeos. Datos y pestañas: nullumStatsUi.js.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelStats .panel__body {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --stx-neon:   var(--color-neon-primary);
  --stx-neon-2: var(--color-neon-soft);
  position: relative;
  margin: 0;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

#screenDashboard.dashboard--shell #panelStats .stats-card,
#screenDashboard.dashboard--shell #panelStats .card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#screenDashboard.dashboard--shell #panelStats .card__title,
#screenDashboard.dashboard--shell #panelStats .stats-card__title { color: #fff; }

/* ─── Pestañas ──────────────────────────────────────────────── */
.stx-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.stx-tabs::-webkit-scrollbar { display: none; }

.stx-tab {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.stx-tab.is-active {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.stx-tab:focus-visible { outline: 2px solid var(--stx-neon); outline-offset: 2px; }

/* Visibilidad por pestaña (solo atleta; el coach conserva la vista original) */
.dashboard[data-role="member"] #panelStats[data-stats-tab="overview"] [data-stats-group]:not([data-stats-group="overview"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="body"] [data-stats-group]:not([data-stats-group="body"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="lifts"] [data-stats-group]:not([data-stats-group="lifts"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="habits"] [data-stats-group]:not([data-stats-group="habits"]) { display: none; }

.dashboard[data-role="member"] #panelStats:not([data-stats-tab="overview"]) #statsViz { display: none; }

.dashboard[data-role="trainer"] #statsTabs,
.dashboard[data-role="trainer"] #statsViz,
.dashboard[data-role="trainer"] #statsBodyViz { display: none; }

/* ─── Bloques de resumen ───────────────────────────────────── */
.stx { display: grid; gap: 12px; margin: 0 0 12px; }

.stx-hero,
.stx-card,
.stx-tile {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stx-hero {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
}

.stx-ring { display: block; width: 100%; height: auto; overflow: visible; }

.stx-ring__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
}

.stx-ring__fg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.7));
  animation: stx-ring-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stx-ring-in {
  from { stroke-dashoffset: var(--c); }
}

.stx-ring__big {
  fill: #fff;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
}

.stx-ring__sub {
  fill: rgba(255, 255, 255, 0.6);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stx-eyebrow {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stx-legend {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stx-legend li {
  display: grid;
  grid-template-columns: 10px 1fr;
  grid-template-areas: "dot label" "dot value";
  column-gap: 8px;
  align-items: center;
}

.stx-legend span { grid-area: label; color: var(--color-text-secondary); font-size: 0.74rem; }
.stx-legend b { grid-area: value; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 900; }

.stx-dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.stx-dot--1 { background: #ff7a93; color: #ff7a93; }
.stx-dot--2 { background: #c45c7e; color: #c45c7e; }
.stx-dot--3 { background: #e58da1; color: #e58da1; }

/* Tiles con sparkline */
.stx-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stx-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 14px 10px;
  border-radius: 24px;
}

.stx-tile__label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stx-tile__value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 7vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.stx-tile__value span {
  margin-left: 4px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.stx-delta {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.stx-delta.is-good { color: #b9f0d0; }
.stx-delta.is-bad { color: #ffb3c2; }

.stx-spark { display: block; width: 100%; height: 36px; margin-top: 6px; overflow: visible; }

.stx-spark__line {
  fill: none;
  stroke: var(--stx-neon);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 140, 165, 0.8));
}

.stx-spark__area { fill: rgba(255, 157, 179, 0.12); }
.stx-spark__dot { fill: #fff; filter: drop-shadow(0 0 5px #8A5560); }
.stx-spark__flat { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: 3 4; }

/* Tarjetas de gráfico */
.stx-card {
  padding: 16px 16px 14px;
  border-radius: 28px;
}

.stx-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
}

.stx-card__head h3 {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

.stx-card__head span {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.stx-bars { display: block; width: 100%; height: auto; overflow: visible; }
.stx-bars__grid { stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 2 5; }
.stx-bars__bar { fill: url(#stxBar); opacity: 0.55; }

.stx-bars__bar.is-now {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 140, 165, 0.75));
}

.stx-bars__val {
  fill: rgba(255, 255, 255, 0.8);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
}

.stx-bars__lbl {
  fill: rgba(255, 255, 255, 0.5);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
}

/* Mapa de calor */
.stx-heat { display: block; width: 100%; height: auto; }
.stx-heat__c--0 { fill: rgba(255, 255, 255, 0.07); }
.stx-heat__c--2 { fill: #c45c7e; }
.stx-heat__c--3 { fill: #8A5560; filter: drop-shadow(0 0 5px rgba(255, 140, 165, 0.8)); }

.stx-heat__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.stx-heat__k { display: inline-block; width: 12px; height: 12px; margin-left: 6px; border-radius: 4px; }
.stx-heat__k--0 { margin-left: 0; background: rgba(255, 255, 255, 0.12); }
.stx-heat__k--2 { background: #c45c7e; }
.stx-heat__k--3 { background: #8A5560; }

/* Ranking horizontal */
.stx-hbars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

.stx-hbars__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.2rem;
  grid-template-areas: "name n" "track track";
  gap: 6px 8px;
  align-items: baseline;
}

.stx-hbars__name {
  grid-area: name;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-hbars__n { grid-area: n; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 900; text-align: right; }

.stx-hbars__track {
  grid-area: track;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stx-hbars__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 10px rgba(255, 140, 165, 0.7);
  animation: stx-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes stx-grow { from { width: 0; } }

.stx-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.stx-empty--hero {
  padding: 0 6px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .stx-ring__fg,
  .stx-hbars__track i { animation: none; }
}

@media (max-width: 340px) {
  .stx-hero { grid-template-columns: 1fr; }
  .stx-ring { max-width: 150px; margin: 0 auto; }
}

/* ─── Exportar: fila compacta de píldoras ──────────────────── */
#screenDashboard.dashboard--shell #panelStats .report-export {
  width: 100%;
  margin: 0;
}

#screenDashboard.dashboard--shell #panelStats .report-export__label { display: none; }

#screenDashboard.dashboard--shell #panelStats .report-export__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

#screenDashboard.dashboard--shell #panelStats .report-export__row::-webkit-scrollbar { display: none; }

#screenDashboard.dashboard--shell #panelStats .report-export__month {
  flex: 0 0 9.5rem;
  min-height: 38px;
  border-radius: 999px;
  font-size: 0.8rem;
}

#screenDashboard.dashboard--shell #panelStats .report-export__row .btn {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Tendencia de peso (pestaña Cuerpo) */
.stx-area { display: block; width: 100%; height: auto; overflow: visible; }

.stx-area__line {
  fill: none;
  stroke: var(--stx-neon);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.85));
}

.stx-stats3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.stx-stats3 div {
  padding: 10px 10px 8px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.stx-stats3 span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stx-stats3 b {
  display: block;
  margin-top: 2px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
}

/* ── _24-waves-topbar.css ── */
/* ============================================================
   NULLUM — Ondas de fondo + barra superior futurista
   Ondas: nullumWaves.js (canvas fijo dentro de #screenDashboard).
   Barra: marca NULLUM con brillo, borde con destello, botones de
   cristal y menú que se transforma en cruz.
   ============================================================ */

/* ─── Fondo de ondas ──────────────────────────────────────── */
.nlm-waves {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* sticky necesita que el contenedor no sea de scroll: clip en vez de hidden */
.dashboard--shell .dashboard__main {
  z-index: 1;
  overflow-x: clip;
}

/* ─── Barra superior: cristal flotante ─────────────────────── */
.dashboard--shell {
  --shell-topbar-h: 58px;
  --shell-topbar-top: max(8px, var(--safe-top));
}

.dashboard--shell .topbar {
  position: sticky;
  top: var(--shell-topbar-top);
  z-index: 40;
  width: auto;
  height: var(--shell-topbar-h);
  margin: 8px 12px 6px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 0;
  border-radius: 24px;
  background: color-mix(in srgb, var(--color-surface) 66%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 16%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 34px color-mix(in srgb, var(--color-accent) 14%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  animation: topbar-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes topbar-in {
  from { opacity: 0; transform: translateY(-18px) scale(0.98); }
}

/* Borde con destello que recorre la barra */
.dashboard--shell .topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 34%,
    color-mix(in srgb, var(--color-accent) 80%, #fff) 50%,
    transparent 66%,
    transparent 100%
  ) 0 0 / 280% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: topbar-sheen 5s linear infinite;
}

/* Línea de "señal" inferior */
.dashboard--shell .topbar::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--color-accent) 85%, #fff),
    transparent
  ) 0 0 / 40% 100% no-repeat;
  opacity: 0.85;
  pointer-events: none;
  animation: topbar-scan 3.8s ease-in-out infinite;
}

@keyframes topbar-sheen {
  from { background-position: 140% 0; }
  to { background-position: -140% 0; }
}

@keyframes topbar-scan {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* ─── Marca NULLUM en lugar del saludo ─────────────────────── */
.dashboard--shell .topbar__heading {
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}


.dashboard--shell .topbar__greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.dashboard--shell .topbar__greeting-text {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: visible;
  font-size: 0;
  line-height: 1;
}

.dashboard--shell .topbar__greeting-text::after {
  content: 'NULLUM';
  order: 1;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  background: linear-gradient(
    100deg,
    var(--color-text-primary) 0%,
    var(--color-text-primary) 38%,
    color-mix(in srgb, var(--color-accent) 55%, #fff) 50%,
    var(--color-text-primary) 62%,
    var(--color-text-primary) 100%
  ) 0 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: nlm-shine 4.2s ease-in-out infinite;
}

/* Punto de estado "en línea" */
.dashboard--shell .topbar__greeting-text::before {
  content: '';
  order: 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent);
  animation: nlm-ping 2.2s ease-out infinite;
}

@keyframes nlm-shine {
  0% { background-position: 130% 0; }
  60%, 100% { background-position: -130% 0; }
}

@keyframes nlm-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 8px transparent; }
}

.dashboard--shell .topbar__logo-mark {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--color-accent) 55%, transparent));
  animation: nlm-logo 5s ease-in-out infinite;
}

@keyframes nlm-logo {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.06); }
}

/* ─── Menú hamburguesa → cruz ──────────────────────────────── */
.dashboard--shell .topbar__hamburger {
  align-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 15px;
  background: color-mix(in srgb, var(--color-accent) 9%, transparent);
  transition: background var(--transition-fast), transform var(--press-ms) ease;
}

.dashboard--shell .topbar__hamburger:active { transform: scale(var(--press-scale)); }

.dashboard--shell .topbar__hamburger-line {
  height: 2px;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
    width 320ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease;
}

.dashboard--shell .topbar__hamburger-line:nth-child(1) { width: 20px; }
.dashboard--shell .topbar__hamburger-line:nth-child(2) { width: 13px; }
.dashboard--shell .topbar__hamburger-line:nth-child(3) { width: 17px; }

.dashboard--shell .topbar__hamburger:hover .topbar__hamburger-line:nth-child(2),
.dashboard--shell .topbar__hamburger:hover .topbar__hamburger-line:nth-child(3) { width: 20px; }

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(1) {
  width: 20px;
  transform: translateY(6px) rotate(45deg);
}

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(2) {
  width: 4px;
  opacity: 0;
}

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(3) {
  width: 20px;
  transform: translateY(-6px) rotate(-45deg);
}

/* ─── Acciones: botones de cristal ─────────────────────────── */
.dashboard--shell .topbar__actions { gap: 4px; }

.dashboard--shell .topbar__chat-btn,
.dashboard--shell .topbar__night-btn,
.dashboard--shell .topbar__notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--press-ms) ease;
}

.dashboard--shell .topbar__chat-btn:active,
.dashboard--shell .topbar__night-btn:active,
.dashboard--shell .topbar__notif-btn:active { transform: scale(0.92); }

.dashboard--shell .topbar__chat-btn:hover,
.dashboard--shell .topbar__night-btn:hover,
.dashboard--shell .topbar__notif-btn:hover {
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
  color: var(--color-accent);
}

.dashboard--shell .topbar__night-btn .topbar__night-icon { animation: nlm-spin-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes nlm-spin-in {
  from { opacity: 0; transform: rotate(-90deg) scale(0.6); }
}

.dashboard--shell .topbar__notif-badge:not([hidden]) { animation: nlm-badge 2s ease-in-out infinite; }

@keyframes nlm-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Sub-pestañas pegadas bajo la barra y translúcidas */
.dashboard--shell .shell-subnav:not([hidden]) {
  top: calc(var(--shell-topbar-top) + var(--shell-topbar-h) + 6px);
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Modo noche: barra más oscura + separador visible bajo la barra */
html[data-theme-mode="dark"] .dashboard--shell .topbar,
html[data-theme="burgundy-dark"] .dashboard--shell .topbar {
  background: color-mix(in srgb, var(--color-surface) 58%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 2px 0 rgba(255, 255, 255, 0.032),
    0 14px 38px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard--shell .topbar,
  .dashboard--shell .topbar::before,
  .dashboard--shell .topbar::after,
  .dashboard--shell .topbar__greeting-text::after,
  .dashboard--shell .topbar__greeting-text::before,
  .dashboard--shell .topbar__logo-mark,
  .dashboard--shell .topbar__notif-badge:not([hidden]),
  .dashboard--shell .topbar__night-btn .topbar__night-icon { animation: none; }
}

/* ── _25-nutrition-v2.css ── */
/* ============================================================
   NULLUM — Nutrición v2 (vista del atleta)
   Escenario oscuro con rejilla y brillo de marca, cabina del día,
   línea de tiempo de comidas y lista de la compra con casillas neón.
   Cabina: nullumNutritionUi.js. El coach conserva el editor original.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .panel__body {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --nx-neon:   var(--color-neon-primary);
  --nx-neon-2: var(--color-neon-soft);
  position: relative;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 42%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 18%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.dashboard[data-role="member"] #panelNutrition .card,
.dashboard[data-role="member"] #panelNutrition .nutrition-section,
.dashboard[data-role="member"] #panelNutrition details.nutri-foods-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dashboard[data-role="member"] #panelNutrition #nutritionPlanCard {
  padding: 12px;
}

.dashboard[data-role="member"] #panelNutrition .card__title,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__title { color: #fff; }

/* ─── Alcance del servicio: compacto, sigue visible ─────────── */
.dashboard[data-role="member"] #panelNutrition .nutri-role-banner {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-banner__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card--can {
  border-color: color-mix(in srgb, var(--nx-neon) 40%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--nx-neon) 14%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__title { color: #fff; font-size: 0.98rem; }

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list li {
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  line-height: 1.3;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list li::before { display: none; }

/* ─── Accordion "Fuera de mi alcance" ───────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion {
  cursor: pointer;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion summary {
  list-style: none;
  cursor: pointer;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion summary::-webkit-details-marker { display: none; }
.dashboard[data-role="member"] #panelNutrition .nutri-role-card__summary {
  display: block;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card__toggle-hint::after {
  content: '▸ Ver más';
  font-size: 0.65rem;
  opacity: 0.5;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin-left: 0.4em;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion[open] .nutri-role-card__toggle-hint::after {
  content: '▾ Ocultar';
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion .nutri-role-card__list,
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion .nutri-role-card__credential {
  margin-top: 10px;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__note {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

/* Puente con el check-in */
.dashboard[data-role="member"] #panelNutrition .bc-bridge {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ─── Barra del visor ─────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__toolbar {
  gap: 10px;
  margin: 0 0 12px;
  padding: 4px 4px 0;
  border: 0;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__title {
  font-size: 1.2rem;
  font-weight: 900;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__meta { color: var(--color-text-muted); }

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer .btn { border-radius: 999px; }

/* ─── Cabina del día ────────────────────────────────────────── */
.nx { display: grid; gap: 12px; margin: 0 0 14px; }
.nx[hidden] { display: none; }

.nx-hero,
.nx-macros,
.nx-next {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nx-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
}

.nx-ring { display: block; width: 100%; height: auto; overflow: visible; }

.nx-ring__orbit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  transform-origin: 70px 70px;
  animation: nx-orbit 22s linear infinite;
}

@keyframes nx-orbit { to { transform: rotate(360deg); } }

.nx-ring__bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 11; }

.nx-ring__fg {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.75));
  animation: nx-ring-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nx-ring-in { from { stroke-dashoffset: var(--c); } }

.nx-ring__big {
  fill: #fff;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
}

.nx-ring__sub {
  fill: rgba(255, 255, 255, 0.6);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nx-eyebrow {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nx-kcal { margin: 0; line-height: 1; }

.nx-kcal b {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 11vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 30%, var(--nx-neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nx-kcal span { margin-left: 6px; color: var(--color-text-muted); font-size: 0.85rem; font-weight: 800; }

.nx-sub { margin: 6px 0 0; color: var(--color-text-secondary); font-size: 0.82rem; font-weight: 600; }

/* Macros */
.nx-macros {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border-radius: 26px;
  list-style: none;
}

.nx-macro {
  display: grid;
  grid-template-columns: 1fr auto 2.4rem;
  grid-template-areas: "name g pct" "track track track";
  gap: 6px 10px;
  align-items: baseline;
  --mc: #ff7a93;
}

.nx-macro--c { --mc: #ffb48a; }
.nx-macro--f { --mc: #ffd0da; }

.nx-macro__name { grid-area: name; color: var(--color-text-secondary); font-size: 0.8rem; font-weight: 700; }
.nx-macro__g { grid-area: g; font-family: var(--font-heading); font-size: 0.95rem; font-weight: 900; }
.nx-macro__pct { grid-area: pct; color: var(--color-text-muted); font-size: 0.74rem; font-weight: 800; text-align: right; }

.nx-macro__track {
  grid-area: track;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.nx-macro__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 45%, #3a1019), var(--mc));
  box-shadow: 0 0 10px color-mix(in srgb, var(--mc) 70%, transparent);
  animation: nx-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nx-grow { from { width: 0; } }

/* Chips y próxima toma */
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.nx-chip {
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.nx-chip b { color: #fff; font-weight: 800; }

.nx-next {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 22px;
}

.nx-next__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--nx-neon);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-neon) 60%, transparent);
  animation: nx-ping 2.2s ease-out infinite;
}

@keyframes nx-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-neon) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.nx-next p { margin: 0; }
.nx-next__label { color: var(--color-text-muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.nx-next__name { margin-top: 2px; font-family: var(--font-heading); font-size: 1rem; font-weight: 900; }
.nx-next__foods { margin-top: 2px; color: var(--color-text-secondary); font-size: 0.8rem; line-height: 1.4; }

/* Con la cabina activa, lo que duplica se oculta */
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-overview,
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-ratio-bar,
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-cycle-info,
.dashboard[data-role="member"] #nutritionViewer.nx-on .meal-plan-stats,
.dashboard[data-role="member"] #nutritionViewer.nx-on .meal-plan-next { display: none; }

/* ─── Adherencia del día ────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutri-adherence {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__lbl { color: #fff; font-weight: 800; }

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btns { display: flex; gap: 8px; }

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
}

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btn[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .nutri-streak { margin: 0 0 12px; }

/* ─── Pauta semanal: línea de tiempo ────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__head,
.dashboard[data-role="member"] #panelNutrition .meal-plan-day,
.dashboard[data-role="member"] #panelNutrition .meal-plan-note,
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop,
.dashboard[data-role="member"] #panelNutrition .meal-plan-hydration,
.dashboard[data-role="member"] #panelNutrition .meal-plan-exchanges {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__head { padding: 14px 16px; margin-bottom: 12px; }
.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__title { color: #fff; font-size: 1.15rem; }
.dashboard[data-role="member"] #panelNutrition .meal-plan-cc__eyebrow,
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__title { color: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-days { gap: 12px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day { overflow: hidden; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day.is-today {
  border-color: color-mix(in srgb, var(--nx-neon) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nx-neon) 25%, transparent), 0 0 30px color-mix(in srgb, var(--nx-neon) 18%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__title,
.dashboard[data-role="member"] #panelNutrition .meal-plan-day.is-today > .meal-plan-day__title {
  padding: 14px 16px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__title::before {
  border-color: var(--nx-neon);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__today-pill {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-neon) 50%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__kcal {
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__badge {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__share-btn {
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

/* Cada toma: nodo y línea vertical */
.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0 16px 14px 36px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal {
  position: relative;
  padding: 0 0 16px 18px;
  border: 0;
  background: transparent;
  border-left: 2px dashed rgba(255, 255, 255, 0.16);
  margin-left: 0;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal:last-child { border-left-color: transparent; padding-bottom: 2px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--nx-neon);
  border-radius: 50%;
  background: #0a0506;
  box-shadow: 0 0 10px color-mix(in srgb, var(--nx-neon) 60%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal--done::before { background: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal--done .meal-plan-table__food { opacity: 0.55; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal-label {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 900;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal__done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal__done-btn.is-done {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 0 16px color-mix(in srgb, var(--nx-neon) 60%, transparent);
}

/* Alimentos: nombre a la izquierda, cantidad en neón */
.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals .meal-plan-table__food {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.84rem;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals .meal-plan-table__food:last-of-type { border-bottom: 0; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-table__grams {
  margin: 0;
  color: var(--nx-neon-2);
  font-weight: 800;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-table__note {
  flex-basis: 100%;
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-eq {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.74rem;
}

/* ─── Lista de la compra ────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop { margin-top: 12px; padding: 16px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__cat {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__cat-title { color: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__item {
  border-bottom-color: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__qty { color: var(--nx-neon-2); font-weight: 800; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__check-mark {
  border: 2px solid var(--color-border-strong);
  border-radius: 8px;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__check input:checked + .meal-plan-shop__check-mark {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  box-shadow: 0 0 12px color-mix(in srgb, var(--nx-neon) 55%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__item.is-bought .meal-plan-shop__check-name { opacity: 0.5; text-decoration: line-through; }

/* ─── Textos del coach y suplementación ─────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutrition-section { margin: 0 0 12px; padding: 16px; }

.dashboard[data-role="member"] #panelNutrition .nutrition-section__label {
  margin: 0 0 8px;
  color: var(--nx-neon);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-section__body { color: var(--color-text-secondary); }

.dashboard[data-role="member"] #panelNutrition .nutri-today-card {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

/* ── _20-payments.css ── */
/* ── _20-payments.css ──
   Nota (2026-11): el bloque Stripe/payments quedó en _19-coach-video.css
   tras el scramble de parciales del commit de engagement. Este archivo
   conserva la cola de nutrición que encaja con el final de _19.
   El volcado duplicado de _26–_39 (incl. landing-v2) se eliminó de aquí.
   ── */

.dashboard[data-role="member"] #panelNutrition .nutri-coach-banner {
  border: 1px solid color-mix(in srgb, var(--nx-neon) 35%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  color: #fff;
}

.dashboard[data-role="member"] #panelNutrition .nutri-foods-card { padding: 4px 4px; }

@media (prefers-reduced-motion: reduce) {
  .nx-ring__orbit,
  .nx-ring__fg,
  .nx-macro__track i,
  .nx-next__dot { animation: none; }
}

@media (max-width: 340px) {
  .nx-hero { grid-template-columns: 1fr; }
  .nx-ring { max-width: 140px; margin: 0 auto; }
}

/* Cabecera del visor: sin cajas ni sombras duras */
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__meta-block,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__actions {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__actions .btn,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer .btn--primary {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 50%, transparent);
  color: #fff;
}

/* La barra del visor deja de ser sticky: no debe tapar la pauta */
#screenDashboard.dashboard--shell #panelNutrition .nutrition-viewer__toolbar {
  position: static;
  top: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* ── _21-appshell.css ── */
/* ============================================================
   NULLUM — App shell v2 (barra inferior · hubs · tarjetas · inicio)
   Todo acotado a .dashboard--shell (lo añade nullumShell.js):
   si el script falla, la app conserva el sidebar y el aspecto anterior.
   Solo tokens --color-* → compatible con los 8 temas y el modo noche.
   ============================================================ */

.dashboard {
  --shell-r-card: 20px;
  --shell-r-tile: 18px;
  --shell-r-pill: 999px;
  --shell-gap: 12px;
  --shell-bar-h: 64px;
  --shell-bar-space: calc(var(--shell-bar-h) + 28px + env(safe-area-inset-bottom, 0px));
  --shell-bar-bg: #1A1A1A;
  --shell-bar-fg: rgba(255, 255, 255, 0.64);
  --shell-bar-ring: transparent;
}

html[data-theme-mode="dark"] .dashboard {
  --shell-bar-bg: var(--color-surface-raised);
  --shell-bar-fg: var(--color-text-secondary);
  --shell-bar-ring: var(--color-border-strong);
}

/* ─── Barra inferior flotante ─────────────────────────────── */
.shell-tabbar { display: none; }

.dashboard--shell .shell-tabbar {
  display: flex;
  position: fixed;
  z-index: 90;
  top: auto;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 460px);
  height: var(--shell-bar-h);
  padding: 6px;
  gap: 2px;
  box-sizing: border-box;
  align-items: stretch;
  border-radius: var(--shell-r-pill);
  background: var(--shell-bar-bg);
  box-shadow:
    0 0 0 1px var(--shell-bar-ring),
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.16);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.dashboard--shell .shell-tabbar[data-hidden="1"] {
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
}

/* Desktop: la tabbar móvil choca con sidebar + tapa formularios (perfil). */
@media (min-width: 900px) {
  .dashboard--shell .shell-tabbar {
    display: none !important;
  }
  .dashboard--shell {
    --shell-bar-space: 12px;
  }
}

/* Espacio inferior cuando la tabbar sí está visible (móvil). */
@media (max-width: 899px) {
  .dashboard--shell .dashboard__content,
  .dashboard--shell .section,
  .dashboard--shell .profile-panel,
  .dashboard--shell #section-profile {
    padding-bottom: max(var(--shell-bar-space, 92px), 6rem);
  }
}

.shell-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--shell-r-pill);
  background: transparent;
  color: var(--shell-bar-fg);
  font-family: var(--font-heading);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--press-ms) ease;
}

.shell-tab:active { transform: scale(var(--press-scale)); }

.shell-tab:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 1px;
}

.shell-tab[aria-current="page"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.shell-tab__label {
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 340px) {
  .shell-tab__label { font-size: 0.54rem; }
}

/* ─── Sub-pestañas del hub (chips) ─────────────────────────── */
.dashboard .shell-subnav { display: none; }

.dashboard--shell .shell-subnav:not([hidden]) {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  padding: 4px max(var(--page-pad-x), env(safe-area-inset-right)) 6px max(var(--page-pad-x), env(safe-area-inset-left));
}

.shell-subnav__inner {
  display: flex;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shell-subnav__inner::-webkit-scrollbar { display: none; }

.shell-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-pill);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.shell-chip[aria-current="page"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.shell-chip:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* ─── Topbar: ligera, sin barra roja, con acciones a la derecha ─ */
/* Restaurar topbar en desktop (training.css la oculta en ≥1024px sin shell) */
.dashboard--shell .topbar {
  display: flex;
  background: transparent;
  border-bottom: 0;
  padding-bottom: var(--space-sm);
}

.dashboard--shell .topbar + .stripe { display: none; }

.dashboard--shell .topbar__heading { justify-content: flex-start; padding: 0 var(--space-xs); }

.dashboard--shell .topbar__greeting {
  text-align: left;
  font-size: clamp(0.95rem, 4.2vw, 1.12rem);
  font-weight: 800;
}

.dashboard--shell .topbar__actions { gap: 2px; }

/* Logo negro sobre fondo oscuro: invertir en modo noche */
html[data-theme-mode="dark"] .dashboard--shell .topbar__logo-mark {
  content: url("../assets/logo-blanco.png");
  filter: drop-shadow(0 0 7px rgba(255, 140, 165, 0.6));
}

.topbar__chat-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.topbar__chat-btn:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* El entrenador tiene Mensajes en la barra inferior */
.dashboard[data-role="trainer"] .topbar__chat-btn { display: none; }

/* Espacio para que la barra flotante no tape contenido */
.dashboard--shell .dashboard__content {
  padding-bottom: var(--shell-bar-space);
}

/* El FAB global "Sesión" queda redundante con la pestaña Entrenar */
html:has(.dashboard--shell) .global-session-fab { display: none !important; }

/* ─── Tarjetas: de "módulos abiertos" a tarjetas reales ────────── */
.dashboard--shell .card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-card);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.dashboard--shell .card + .card {
  margin-top: var(--shell-gap);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.dashboard--shell .card .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.dashboard--shell .card__body { padding-bottom: var(--space-sm); }

/* ─── Cabecera de pantalla: compacta, sin bloque oscuro ──────── */
/* Prefijo con #id: supera los overrides por panel (#panelCalendar .panel__header…) */
#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header {
  margin: 0 0 var(--space-md);
  padding: var(--space-xs) var(--space-xs) 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--color-text-primary);
  --color-text-primary: inherit;
  --color-text-secondary: inherit;
  --color-text-muted: inherit;
  --color-border: inherit;
  --color-border-strong: inherit;
  --color-surface: inherit;
  --color-accent-gold: inherit;
}

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header::before,
#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header::after,
#screenDashboard.dashboard--shell .panel--active::before,
#screenDashboard.dashboard--shell .panel-wm { display: none; }

#screenDashboard.dashboard--shell .panel__header-logo,
#screenDashboard.dashboard--shell .panel__eyebrow { display: none; }

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header .panel__title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
}

#screenDashboard.dashboard--shell .panel:not(.about-panel-immersive) > .panel__header .panel__subtitle {
  margin: 2px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
  letter-spacing: 0;
}

/* Hoy / Clientes / Herramientas del coach viven en la barra inferior */
.dashboard--shell .trainer-tabs { display: none; }

/* ============================================================
   INICIO — hero → semana → estado → coach → hábitos
   .welcome pasa a rejilla de 2 columnas; la zona hero se disuelve
   (display: contents) para que todos los widgets se ordenen juntos.
   ============================================================ */
.dashboard--shell .welcome {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
  align-content: start;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-lg);
}

.dashboard--shell .welcome > *,
.dashboard--shell .welcome__hero-zone > * {
  grid-column: 1 / -1;
  margin: 0;
  min-width: 0;
}

.dashboard--shell .welcome__hero-zone {
  display: contents;
  --color-text-primary: inherit;
  --color-text-secondary: inherit;
  --color-text-muted: inherit;
  --color-border-strong: inherit;
  --color-surface: inherit;
  --color-accent-gold: inherit;
}

.dashboard--shell .welcome__hero-zone::before,
.dashboard--shell .welcome__hero-zone::after,
.dashboard--shell .welcome__zone-brand,
.dashboard--shell .welcome-chips,
.dashboard--shell .welcome-command { display: none; }

/* Orden: saludo → acción de hoy → semana → atajos → avisos → estado → hábitos */
.dashboard--shell .welcome .welcome__hero-zone > .welcome__greeting {
  order: 1;
  position: relative;
  z-index: 2;
}
.dashboard--shell .welcome .coach-tower          { order: 1; }
.dashboard--shell .welcome .weekly-split-view    { order: 3; }
/* Coach: atajos debajo de la torre, ritmo claro (antes competían visualmente) */
.dashboard--shell .welcome .home-grid            { order: 4; }
.dashboard[data-role="trainer"] .welcome .home-grid {
  order: 2;
  margin-top: 4px;
  margin-bottom: 4px;
}
.dashboard[data-role="trainer"] .welcome .coach-tower {
  order: 3;
}
.dashboard--shell .welcome .plan-updated-banner  { order: 5; }
.dashboard--shell .welcome .coach-feedback-banner{ order: 5; }
.dashboard--shell .welcome .checkin-streak       { order: 7; grid-column: auto; }
.dashboard--shell .welcome .cycle-week-widget    { order: 8; }
.dashboard--shell .welcome .coach-goal-widget    { order: 9; }
.dashboard--shell .welcome .progress-pulse       { order: 10; }
.dashboard--shell .welcome .habits               { order: 11; }
.dashboard--shell .welcome .week-compare         { order: 12; }
.dashboard--shell .welcome .weight-chart-card    { order: 13; }
.dashboard--shell .welcome .constancy            { order: 14; }
.dashboard--shell .welcome .precision            { order: 15; }
.dashboard--shell .welcome .welcome__grid        { order: 16; }

/* Tarjeta protagonista (order 2) */
.dashboard--shell .welcome .welcome-hero {
  order: 2;
  width: 100%;
  min-height: 7rem;
  padding: 1.35rem 1.35rem;
  border-radius: 26px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 16px 36px color-mix(in srgb, var(--color-accent) 35%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard--shell .welcome .welcome-hero:hover,
.dashboard--shell .welcome .welcome-hero:focus-visible {
  background: var(--color-accent-hover);
  transform: none;
}

.dashboard--shell .welcome-hero__label {
  font-size: clamp(1.35rem, 5.8vw, 1.7rem);
  font-weight: 900;
}

.dashboard--shell .welcome-hero__hint { opacity: 0.85; font-size: 0.86rem; }

.dashboard--shell .welcome-hero__cta {
  padding: 0.7rem 1.1rem;
  background: var(--color-on-accent);
  color: var(--color-accent);
  font-size: 0.8rem;
}

/* Tarjetas de estado (readiness, racha, ciclo, coach, comparativa, peso) */
.dashboard--shell .welcome .readiness-widget,
.dashboard--shell .welcome .checkin-streak,
.dashboard--shell .welcome .cycle-week-widget,
.dashboard--shell .welcome .coach-goal-widget,
.dashboard--shell .welcome .week-compare,
.dashboard--shell .welcome .weight-chart-card,
.dashboard--shell .welcome .weekly-split-view,
.dashboard--shell .welcome .progress-pulse,
.dashboard--shell .welcome .habits,
.dashboard--shell .welcome .constancy,
.dashboard--shell .welcome .precision {
  box-sizing: border-box;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--shell-r-tile);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

.dashboard--shell .welcome .readiness-widget {
  order: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "score label" "score hint";
  column-gap: 0.9rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  text-align: left;
}

.dashboard--shell .welcome .readiness-widget__score-wrap { grid-area: score; }
.dashboard--shell .welcome .readiness-widget__label { grid-area: label; margin: 0; font-weight: 700; letter-spacing: 0; text-transform: none; }
.dashboard--shell .welcome .readiness-widget__hint { grid-area: hint; margin: 0; }

.dashboard--shell .welcome .readiness-widget[data-score="high"] { background: var(--color-success-bg); border-color: var(--color-success); }
.dashboard--shell .welcome .readiness-widget[data-score="mid"]  { background: var(--color-cal-missed-bg); border-color: var(--color-cal-missed); }
.dashboard--shell .welcome .readiness-widget[data-score="low"]  { background: var(--color-error-bg); border-color: var(--color-error); }

.dashboard--shell .welcome .progress-pulse,
.dashboard--shell .welcome .habits,
.dashboard--shell .welcome .constancy,
.dashboard--shell .welcome .precision,
.dashboard--shell .welcome .week-compare,
.dashboard--shell .welcome .weight-chart-card,
.dashboard--shell .welcome .weekly-split-view {
  padding: var(--space-md);
}

/* Semana: tira de píldoras (L M X J V S D) */
.dashboard--shell .weekly-split-view__days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.dashboard--shell .weekly-split-view__days::-webkit-scrollbar { display: none; }

.dashboard--shell .weekly-split-view__day {
  flex: 1 0 3.1rem;
  min-width: 3.1rem;
  min-height: 4.4rem;
  padding: 0.55rem 0.2rem;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
}

.dashboard--shell .weekly-split-view__day--today {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg);
}

.dashboard--shell .weekly-split-view__day--rest { opacity: 0.55; }

.dashboard--shell .weekly-split-view__day-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   RUNNERS · paso 1 — pre-carrera (nullumRunnersUi.js)
   Estado de la carrera: #panelRunners[data-run-state]
   ============================================================ */
#screenDashboard.dashboard--shell #panelRunners > .panel__header { display: none; }

.run-hero { display: none; }

.dashboard--shell .run-hero {
  display: block;
  position: relative;
  margin: 0 0 var(--shell-gap);
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 85% 0%, color-mix(in srgb, var(--color-accent) 80%, #fff 8%) 0%, transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--color-accent) 72%, #000) 0%, #120609 78%);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.run-hero__hello {
  margin: 0 0 1.1rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 9vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.run-hero__week {
  margin: 0 0 0.9rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.run-hero__week strong { font-size: 1.5rem; font-weight: 900; }
.run-hero__week span { font-weight: 600; opacity: 0.7; }

.run-hero__bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 0 0 1.15rem;
}

.run-hero__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.run-hero__val {
  min-height: 0.9rem;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.8;
}

.run-hero__col {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 74px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.run-hero__col i {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.run-hero__day.is-today .run-hero__col i { background: #fff; }

.run-hero__lbl { font-size: 0.72rem; font-weight: 800; opacity: 0.75; }
.run-hero__day.is-today .run-hero__lbl { opacity: 1; }

.run-hero__start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--press-ms) ease;
}

.run-hero__start:active { transform: scale(var(--press-scale)); }

.run-hero__start:focus-visible {
  outline: 3px solid var(--color-accent-gold);
  outline-offset: 3px;
}

/* En carrera/pausa el hero y la estructura se apartan; manda el mapa */
#panelRunners[data-run-state="running"] .run-hero,
#panelRunners[data-run-state="paused"] .run-hero,
#panelRunners[data-run-state="running"] .runners__setup-card,
#panelRunners[data-run-state="paused"] .runners__setup-card { display: none; }

/* El Empezar del hero sustituye al del mapa en reposo */
.dashboard--shell #panelRunners[data-run-state="idle"] .runners-map-controls__start { display: none; }

/* Estructura de la sesión: sin título de tarjeta, chips en fila deslizable */
.dashboard--shell .runners__setup-card { padding-top: var(--space-sm); }

.dashboard--shell .runners-session-tabs--chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.dashboard--shell .runners-session-tabs--chips::-webkit-scrollbar { display: none; }
.dashboard--shell .runners-session-tabs--chips .runners-session-tab { flex: 0 0 auto; border-radius: 999px; }

.dashboard--shell .runners__setup-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: 0;
}

/* ============================================================
   INICIO v2 — saludo grande, brillo burdeos, atajos con icono
   (referencias: Hevy · Move/Sync · música oscura)
   ============================================================ */

/* Brillo difuso de marca detrás de la cabecera */
.dashboard--shell .dashboard__main { position: relative; isolation: isolate; }

.dashboard--shell .dashboard__main::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 12% -5%, color-mix(in srgb, var(--color-accent) 30%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 60% 55% at 100% 8%, color-mix(in srgb, var(--color-accent) 16%, transparent) 0%, transparent 72%);
}

/* Saludo grande en el inicio */

.dashboard--shell .welcome__hero-zone > .welcome__greeting {
  display: block;
  margin: 0;
  padding: var(--space-xs) var(--space-xs) 0;
  border: 0;
}

.dashboard--shell .welcome__hello {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  line-height: 1.02;
  text-transform: none;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

.dashboard--shell .welcome__role,
.dashboard--shell .welcome__next { display: none; }

.dashboard--shell .welcome-checkin-streak:not([hidden]) {
  display: inline-flex;
  margin: 0.8rem 0 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: 0.8rem;
  font-weight: 800;
}

/* Rejilla de atajos (miembro: 3 secundarios; entrenador: 2×2) */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
}
.dashboard--shell .home-grid[data-role="member"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--press-ms) ease, background var(--transition-fast);
}

.home-card:active { transform: scale(var(--press-scale)); }

.home-card:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

.home-card__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 15px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.home-card__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.home-card__title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.home-card__sub {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cristal en modo noche: tarjetas translúcidas con borde luminoso */
html[data-theme-mode="dark"] .dashboard--shell .card,
html[data-theme-mode="dark"] .dashboard--shell .home-card,
html[data-theme-mode="dark"] .dashboard--shell .welcome .readiness-widget,
html[data-theme-mode="dark"] .dashboard--shell .welcome .progress-pulse,
html[data-theme-mode="dark"] .dashboard--shell .welcome .habits,
html[data-theme-mode="dark"] .dashboard--shell .welcome .weekly-split-view {
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  border-color: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Tira semanal: tamaño táctil como Move/Sync */
.dashboard--shell .weekly-split-view__head { display: none; }

/* ── _21-improvements.css ── */
/* ============================================================
   NULLUM — _21-improvements.css
   Mejoras UX/funcionales para pantallas de coach y atleta.
   ============================================================ */

/* ── 1. Recency badge en tarjetas de cliente (Coach Tower) ── */
.coach-tower__recency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 4px;
  line-height: 1.4;
  pointer-events: none;
}
.coach-tower__recency--green {
  background: rgba(47, 107, 94, 0.12);
  color: #2F6B5E;
}
.coach-tower__recency--amber {
  background: rgba(166, 107, 46, 0.14);
  color: #A66B2E;
}
.coach-tower__recency--red {
  background: rgba(92, 36, 48, 0.12);
  color: #5C2430;
}
[data-theme-mode="dark"] .coach-tower__recency--green { color: var(--color-success-dark); background: rgba(95, 207, 186, 0.12); }
[data-theme-mode="dark"] .coach-tower__recency--amber { color: var(--color-warning-dark); background: rgba(245, 192, 106, 0.12); }
[data-theme-mode="dark"] .coach-tower__recency--red   { color: var(--color-error-dark);   background: rgba(224, 112, 128, 0.14); }

/* ── 2. Barra diaria de estado en tab "Hoy" del coach ── */
.coach-daily-strip {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-sm) 0 var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.coach-daily-strip__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 60px;
  min-width: 60px;
  padding: var(--space-sm) var(--space-sm);
  border-radius: 10px;
  background: var(--color-surface-inset);
  text-align: center;
  gap: 2px;
}
.coach-daily-strip__val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.coach-daily-strip__lbl {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.coach-daily-strip__stat--accent .coach-daily-strip__val {
  color: var(--color-accent);
}
.coach-daily-strip__stat--warn .coach-daily-strip__val {
  color: #A66B2E;
}

/* ── 3. Selector de periodo rápido en stats ── */
.stats-period-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.stats-period-pill {
  padding: 5px 13px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  line-height: 1;
}
.stats-period-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.stats-period-pill.is-active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── 4. Buscador de ejercicios en Training Designer ── */
.split-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-sm);
  background: var(--color-surface-inset);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.split-search-bar__icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.split-search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  outline: none;
  min-width: 0;
}
.split-search-bar__input::placeholder {
  color: var(--color-text-muted);
}
.split-search-bar__count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.split-day--hidden-by-search {
  display: none !important;
}
.exercise-row--hidden-by-search {
  display: none !important;
}

/* ── 5. Hint de peso anterior en check-in ── */
.wci-weight-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 5px 10px;
  background: var(--color-surface-inset);
  border-radius: 8px;
  border-left: 3px solid var(--color-border-strong);
}
.wci-weight-hint--up   { border-left-color: #5C2430; }
.wci-weight-hint--down { border-left-color: #2F6B5E; }
.wci-weight-hint--same { border-left-color: var(--color-border-strong); }
.wci-weight-hint__trend {
  font-weight: 900;
  font-size: 1rem;
}
.wci-weight-hint--up   .wci-weight-hint__trend { color: #5C2430; }
.wci-weight-hint--down .wci-weight-hint__trend { color: #2F6B5E; }

/* ── 6. Botón copiar macros en nutrición ── */
.nutri-copy-macros-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  margin-top: 4px;
}
.nutri-copy-macros-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.nutri-copy-macros-btn.is-copied {
  border-color: #2F6B5E;
  color: #2F6B5E;
}

/* ── 7. Toast de completado de sesión ── */
.session-complete-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  max-width: calc(100vw - 32px);
}
.session-complete-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.session-complete-toast__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 2px;
}

/* ── 8. Resumen de adherencia compacto en perfil ── */
.profile-adherence-summary {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-md);
}
.profile-adherence-summary__stat {
  flex: 1 1 70px;
  text-align: center;
  padding: var(--space-sm);
  background: var(--color-surface-inset);
  border-radius: 10px;
}
.profile-adherence-summary__val {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-accent);
  display: block;
  letter-spacing: -0.02em;
}
.profile-adherence-summary__lbl {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

/* ── 9. Indicador de progreso en Training Designer readonly ── */
.split-readonly-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: var(--space-sm) 0 var(--space-md);
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.split-readonly-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--color-surface-inset);
  border: 1px solid var(--color-border);
  font-weight: 600;
}

/* ── 10. Feedback visual al marcar check-in como listo ── */
.wci-step-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(47, 107, 94, 0.12);
  color: #2F6B5E;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}
[data-theme-mode="dark"] .wci-step-done-badge {
  color: var(--color-success-dark);
  background: rgba(95, 207, 186, 0.12);
}

/* ── 11. Estado vacío mejorado en stats ── */
.stats-empty-cta {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--color-text-muted);
}
.stats-empty-cta__title {
  font-size: var(--text-title);
  font-weight: var(--weight-title);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}
.stats-empty-cta__sub {
  font-size: var(--text-body);
  margin-bottom: var(--space-lg);
}

/* ── 12. Atajos de teclado visible para usuarios desktop ── */
.kb-hint {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .kb-hint {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
    color: var(--color-text-muted);
    background: var(--color-surface-inset);
    letter-spacing: 0.04em;
    margin-left: 6px;
    vertical-align: middle;
    pointer-events: none;
  }
}

/* ── 13. Quick-response templates en coach check-in review ── */
.coach-quick-replies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.coach-quick-reply {
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.coach-quick-reply:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .session-complete-toast,
  .stats-period-pill,
  .coach-quick-reply {
    transition: none;
  }
}

/* ── _21-motion.css ── */
/* ── _21-motion.css ── NULLUM Motion & Engagement System ──────────────────
   Objetivo: comodidad visual sostenida + enganche dopaminérgico.
   Cada animación tiene un propósito: feedback, recompensa o momentum.
   ─────────────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════
   1. LEGIBILIDAD GLOBAL
   ═══════════════════════════════════════ */

/* Line-height elevado para bloques de texto —
   reduce fatiga en sesiones largas */
body {
  line-height: var(--leading-body, 1.65);
}

p, li, .card__body, .msg__text,
.exercise-note, .coach-note, .plan-note,
[class*="__description"], [class*="__text"],
[class*="__body"], [class*="__content"] {
  line-height: var(--leading-relaxed, 1.8);
}

/* Eyebrows: peso reducido de 800 → 500, tracking más sutil.
   Se aplica por token en tokens.css, aquí forzamos la regla global */
[class*="__eyebrow"], [class*="-eyebrow"],
.section-label, .category-label,
.split-readonly-banner__eyebrow {
  font-weight: var(--weight-eyebrow, 500) !important;
  letter-spacing: 0.06em !important;
}

/* Blanco cálido en dark mode: #F5F5F5 → #EDE8E3
   Reduce halación (bleed) del texto sobre fondos negros */
html[data-theme-mode="dark"] body,
html[data-theme="burgundy-dark"] body,
html[data-theme="void-violet"] body,
html[data-theme="jungle-fire"] body,
html[data-theme="blueprint"] body,
html[data-theme="miami"] body {
  color: var(--color-text-primary);
}
html[data-theme="burgundy-dark"] {
  --color-text-primary: #EDE8E3;
}
html[data-theme="void-violet"] {
  --color-text-primary: #EAE6F8;
}
html[data-theme="miami"] {
  --color-text-primary: #E5F2F8;
}

/* Light themes: superficie ligeramente tintada en lugar de blanco puro */
html[data-theme="coastal"] {
  --color-surface: #F8FCFF;
  --color-surface-raised: #F8FCFF;
}
html[data-theme="blueprint-light"] {
  --color-surface: #F6F8FC;
  --color-surface-raised: #F6F8FC;
}


/* ═══════════════════════════════════════
   2. MICRO-INTERACTIONS — PRESS FEEDBACK
   El "clic que se siente" — dopamina táctil
   ═══════════════════════════════════════ */

/* Todo elemento interactivo reacciona al toque */
button, [role="button"], a,
.nav-item, .menu-item, .card--clickable,
.split-exercise-row, .workout-set-row,
.checkin-option, .metric-card,
[class*="__btn"], [class*="-btn"],
[class*="__cta"], [class*="-cta"],
.bottom-nav__item, .tab-item {
  transition:
    transform var(--dur-instant) var(--ease-in-back),
    opacity var(--dur-instant) linear,
    background-color var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Active: se hunde (simula presión física) */
button:active, [role="button"]:active,
.nav-item:active, .card--clickable:active,
.bottom-nav__item:active, .tab-item:active,
[class*="__btn"]:active, [class*="__cta"]:active {
  transform: scale(0.95);
  opacity: 0.88;
  transition:
    transform var(--dur-instant) var(--ease-in-back),
    opacity var(--dur-instant) linear;
}

/* Release: rebota ligeramente hacia arriba (spring) */
button:not(:active), [role="button"]:not(:active),
.card--clickable:not(:active) {
  transform: scale(1);
  transition:
    transform var(--dur-normal) var(--ease-spring),
    opacity var(--dur-fast) linear,
    background-color var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy);
}

/* Hover desktop: elevación sutil con sombra */
@media (hover: hover) {
  .card, .metric-card, .stat-card,
  [class*="__card"]:not([class*="--flat"]),
  .split-exercise-row, .workout-set-row {
    transition:
      transform var(--dur-fast) var(--ease-spring),
      box-shadow var(--dur-fast) var(--ease-snappy);
  }
  .card:hover, .metric-card:hover,
  [class*="__card"]:hover:not([class*="--flat"]),
  .split-exercise-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
  }
}


/* ═══════════════════════════════════════
   3. RIPPLE — EFECTO ONDA EN TAP
   Feedback visual inmediato en móvil
   ═══════════════════════════════════════ */

.ripple-host {
  position: relative;
  overflow: hidden;
}

/* Controles flotantes legacy: ripple-host no debe tumbar position:absolute.
   En la torre los controles viven en .coach-tower__actions (flujo estático). */
.cal-fab.ripple-host,
.lib-modal__close.ripple-host,
.lib-player__close.ripple-host,
.lib-player__coach-btn.ripple-host,
.lib-card__play-overlay.ripple-host,
.muscle-map-modal__close.ripple-host {
  position: absolute;
  overflow: visible;
}

.coach-tower__actions .ripple-host {
  position: static;
  overflow: visible;
}

@keyframes ripple-expand {
  0%   { transform: scale(0); opacity: 0.35; }
  100% { transform: scale(4); opacity: 0; }
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  animation: ripple-expand 500ms var(--ease-out-expo) forwards;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
}


/* ═══════════════════════════════════════
   4. STAGGER ENTRY — "APARICIÓN EN CASCADA"
   Las cards aparecen una a una, creando
   sensación de descubrimiento y novedad
   ═══════════════════════════════════════ */

@keyframes slide-up-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Clase aplicada via JS al renderizar listas */
.stagger-item {
  opacity: 0;
  animation: slide-up-in var(--dur-slow) var(--ease-spring) forwards;
}
.stagger-item:nth-child(1)  { animation-delay: 0ms; }
.stagger-item:nth-child(2)  { animation-delay: 60ms; }
.stagger-item:nth-child(3)  { animation-delay: 120ms; }
.stagger-item:nth-child(4)  { animation-delay: 180ms; }
.stagger-item:nth-child(5)  { animation-delay: 240ms; }
.stagger-item:nth-child(6)  { animation-delay: 300ms; }
.stagger-item:nth-child(7)  { animation-delay: 360ms; }
.stagger-item:nth-child(8)  { animation-delay: 420ms; }
.stagger-item:nth-child(9)  { animation-delay: 480ms; }
.stagger-item:nth-child(n+10){ animation-delay: 500ms; }


/* ═══════════════════════════════════════
   5. BARRA DE NAVEGACIÓN — VITA PROPIA
   El tab activo pulsa; el cambio de tab
   tiene momentum direccional
   ═══════════════════════════════════════ */

@keyframes nav-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.bottom-nav__item.is-active .bottom-nav__icon,
.bottom-nav__item[aria-current="page"] .bottom-nav__icon,
.tab-item.is-active .tab-icon {
  animation: nav-pop 350ms var(--ease-spring);
}

/* Indicador del tab activo: píldora que desliza */
.bottom-nav__indicator {
  position: absolute;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
  transition: left var(--dur-normal) var(--ease-spring),
              width var(--dur-fast) var(--ease-snappy);
}


/* ═══════════════════════════════════════
   6. NÚMERO CONTABLE — MÉTRICAS VIVAS
   Los números "cuentan" al hacerse visibles
   ═══════════════════════════════════════ */

@keyframes number-pop {
  0%   { transform: scale(0.7) translateY(8px); opacity: 0; }
  70%  { transform: scale(1.08) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.metric-value, .stat-number, .kpi-number,
[class*="__metric"], [class*="__count"],
[class*="__stat"] {
  display: inline-block;
}

.metric-value.is-visible,
.stat-number.is-visible,
.kpi-number.is-visible {
  animation: number-pop var(--dur-slow) var(--ease-spring);
}


/* ═══════════════════════════════════════
   7. BARRA DE PROGRESO — FILL ANIMADO
   Ver la barra llenarse dispara dopamina
   ═══════════════════════════════════════ */

@keyframes progress-fill {
  from { width: 0%; }
}

[role="progressbar"] > *, .progress-bar__fill,
[class*="__progress-fill"], [class*="-progress-bar"] {
  animation: progress-fill 800ms var(--ease-out-expo) both;
}

/* Shimmer activo en progreso */
@keyframes progress-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.progress-bar__fill::after,
[class*="__progress-fill"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: progress-shimmer 1.8s ease-in-out infinite;
}


/* ═══════════════════════════════════════
   8. STREAK / RACHA — GLOW PULSANTE
   La racha activa "late" — transmite
   energía y urgencia de mantenerla
   ═══════════════════════════════════════ */

@keyframes streak-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--streak-rgb, 200, 80, 106), 0.6); }
  60%  { box-shadow: 0 0 0 8px rgba(var(--streak-rgb, 200, 80, 106), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--streak-rgb, 200, 80, 106), 0); }
}

@keyframes streak-fire {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  25%       { transform: scaleY(1.08) scaleX(0.96); }
  50%       { transform: scaleY(0.96) scaleX(1.04); }
  75%       { transform: scaleY(1.04) scaleX(0.98); }
}

.streak-badge, [class*="streak"],
.check-in-streak, .racha-badge {
  animation: streak-pulse 2s ease-out infinite;
}

.streak-icon, .streak-emoji {
  display: inline-block;
  animation: streak-fire 1.4s ease-in-out infinite;
  transform-origin: bottom center;
}


/* ═══════════════════════════════════════
   9. SESSION DONE — PANTALLA ÉPICA
   El momento de mayor dopamina: terminar
   un entrenamiento debe sentirse a GANAR
   ═══════════════════════════════════════ */

@keyframes celebrate-scale {
  0%   { transform: scale(0.6) translateY(30px); opacity: 0; }
  65%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
  80%  { transform: scale(0.97) translateY(1px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes stat-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes confetti-drop {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120px) rotate(720deg); opacity: 0; }
}

.session-done__sheet.is-animate {
  animation: celebrate-scale 550ms var(--ease-spring) forwards;
}

.session-done__title {
  animation: celebrate-scale 600ms var(--ease-spring) 100ms both;
}

.session-done__stats dt {
  animation: stat-reveal var(--dur-slow) var(--ease-snappy) 200ms both;
}

.session-done__stats dd {
  animation: number-pop var(--dur-slow) var(--ease-spring) 280ms both;
}

/* Partículas de confeti (generadas vía JS) */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-drop 1.2s var(--ease-snappy) forwards;
}


/* ═══════════════════════════════════════
   10. PERSONAL RECORD — PR FLASH
   Un nuevo máximo personal dispara
   la respuesta más fuerte de dopamina
   ═══════════════════════════════════════ */

@keyframes pr-flash {
  0%   { box-shadow: 0 0 0 0 var(--color-accent); background: var(--color-accent-soft); }
  30%  { box-shadow: 0 0 0 12px transparent; background: var(--color-accent-soft); }
  60%  { background: transparent; }
  100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}

@keyframes pr-badge-pop {
  0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(4deg); opacity: 1; }
  80%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.is-personal-record, [class*="pr-row"],
.workout-set-row.is-pr {
  animation: pr-flash 1.2s var(--ease-snappy) forwards;
  border-radius: var(--radius-sm);
}

.pr-badge, .badge--pr, [class*="pr-label"] {
  animation: pr-badge-pop 500ms var(--ease-spring) forwards;
}


/* ═══════════════════════════════════════
   11. SKELETON LOADING — SHIMMER VIVO
   La app nunca parece "muerta" mientras carga
   ═══════════════════════════════════════ */

@keyframes skeleton-wave {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton, [class*="skeleton"],
[class*="--loading"]:not(.btn) {
  background: linear-gradient(
    90deg,
    var(--color-surface) 25%,
    color-mix(in srgb, var(--color-accent) 6%, var(--color-surface)) 50%,
    var(--color-surface) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-wave 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
}


/* ═══════════════════════════════════════
   12. TRANSICIÓN DE SECCIONES
   Cambiar de sección se siente como
   navegar, no como teleportarse
   ═══════════════════════════════════════ */

@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes section-exit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-12px);
  }
}

[data-section].is-entering {
  animation: section-enter var(--dur-normal) var(--ease-spring);
}

[data-section].is-exiting {
  animation: section-exit var(--dur-fast) var(--ease-snappy);
  pointer-events: none;
}


/* ═══════════════════════════════════════
   13. AMBIENT MOTION — EL ACENTO RESPIRA
   Elementos clave tienen vida propia sutil.
   El logo, el avatar activo, los indicadores
   emiten energía contenida.
   ═══════════════════════════════════════ */

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.85; transform: scale(0.97); }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-soft); }
  50%       { box-shadow: 0 0 12px 2px var(--color-accent-soft); }
}

/* Logo / brand mark: respira lentamente */
.app-logo, .brand-icon, [class*="nullum-logo"] {
  animation: breathe 4s ease-in-out infinite;
}

/* Avatar del atleta activo: glow contenido */
.avatar--active, .user-avatar.is-active,
.trainer-avatar.is-online {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

/* Notificación pendiente: flota */
.badge--notification, .unread-dot,
[class*="__badge"]:not(:empty) {
  animation: float-y 2s ease-in-out infinite;
}


/* ═══════════════════════════════════════
   14. CHECK-IN COMPLETADO — SATISFACCIÓN
   Marcar algo como hecho es el momento
   más gratificante. Que se note.
   ═══════════════════════════════════════ */

@keyframes check-pop {
  0%   { transform: scale(0) rotate(-20deg); }
  50%  { transform: scale(1.25) rotate(8deg); }
  75%  { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes check-ring {
  0%   { box-shadow: 0 0 0 0 var(--color-accent); opacity: 0.8; }
  100% { box-shadow: 0 0 0 16px transparent; opacity: 0; }
}

.checkbox-icon.is-checked,
[class*="check-icon"].is-checked,
.exercise-done-icon {
  animation: check-pop 400ms var(--ease-spring) forwards;
}

.checkbox-ring.is-checked,
[class*="completion-ring"].is-checked {
  animation: check-ring 500ms ease-out forwards;
}


/* ═══════════════════════════════════════
   15. RESPETO A REDUCE-MOTION
   Accesibilidad: usuarios que prefieren
   sin movimiento obtienen versión estática
   ═══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .stagger-item {
    opacity: 1;
    animation: none;
  }

  [data-section].is-entering,
  [data-section].is-exiting {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── _22-engagement.css ── */
/* _22-engagement.css — NULLUM Engagement Visuals
   Area 1: Empty states con personalidad
   Area 3: Coach feedback como momento especial
   Area 5: Streak como momento épico
   Area 6: Home screen personalizado
   ─────────────────────────────────────────── */

/* ══════════════════════════════════════════
   ÁREA 1 · EMPTY STATES CON PERSONALIDAD
   ══════════════════════════════════════════ */

.nlm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-7) var(--space-4);
  gap: var(--space-3);
}

.nlm-empty-state__illustration {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-surface-elevated, var(--color-surface));
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: breathe 3s ease-in-out infinite;
  flex-shrink: 0;
}

.nlm-empty-state__headline {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  margin: 0;
}

.nlm-empty-state__sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
  max-width: 26ch;
}

.nlm-empty-state__cta {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring),
              opacity var(--dur-fast) var(--ease-snappy);
}

.nlm-empty-state__cta:active {
  transform: scale(0.94);
  opacity: 0.9;
}


/* ══════════════════════════════════════════
   ÁREA 3 · COACH FEEDBACK COMO MOMENTO ÉPICO
   ══════════════════════════════════════════ */

.coach-feedback-banner {
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-4);
  margin: var(--space-3) 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-accent) 12%, var(--color-surface)),
    color-mix(in srgb, var(--color-accent) 5%, var(--color-surface))
  );
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  animation: stat-reveal 0.4s var(--ease-spring) both;
}

/* Shimmer bar */
.coach-feedback-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    color-mix(in srgb, var(--color-accent) 8%, transparent) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: progress-shimmer 3s ease-in-out infinite;
}

.coach-feedback-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.coach-feedback-banner__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  margin: 0 0 2px;
  letter-spacing: 0.02em;
}

.coach-feedback-banner__text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--leading-body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coach-feedback-banner__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--dur-fast) var(--ease-snappy);
}

.coach-feedback-banner__close:hover { opacity: 1; }

/* WCI variant */
.wci-coach-feedback-banner {
  border-radius: var(--radius-card);
  padding: var(--space-4);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-accent) 10%, var(--color-surface)),
    color-mix(in srgb, var(--color-accent) 4%, var(--color-surface))
  );
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  animation: stat-reveal 0.4s var(--ease-spring) both;
}

.wci-coach-feedback-banner__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

.wci-coach-feedback-banner__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}

.wci-coach-feedback-banner__text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: var(--leading-body);
  margin: 0 0 var(--space-3);
}


/* ══════════════════════════════════════════
   ÁREA 5 · STREAK COMO MOMENTO ÉPICO
   ══════════════════════════════════════════ */

.checkin-streak {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  grid-column: 1 / -1 !important; /* span full width of parent grid */
  box-sizing: border-box;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #FF8C42 15%, var(--color-surface)),
    color-mix(in srgb, #FF8C42 5%, var(--color-surface))
  );
  border: 1.5px solid color-mix(in srgb, #FF8C42 30%, transparent);
  margin: var(--space-3) 0;
}

.checkin-streak--epic {
  /* Triggered by JS when streak >= 4 weeks */
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #FF8C42 22%, var(--color-surface)),
    color-mix(in srgb, #F5D060 12%, var(--color-surface))
  );
  border-color: color-mix(in srgb, #FF8C42 50%, transparent);
}

.checkin-streak__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, #FF8C42 20%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF8C42;
  flex-shrink: 0;
  animation: streak-pulse 2s ease-in-out infinite;
}

.checkin-streak--epic .checkin-streak__icon {
  background: color-mix(in srgb, #FF8C42 30%, transparent);
  animation: streak-fire 0.6s var(--ease-spring) both, streak-pulse 2s ease-in-out infinite 0.6s;
}

.checkin-streak__count {
  font-size: var(--text-3xl, 2rem);
  font-weight: 800;
  color: #FF8C42;
  line-height: 1;
  letter-spacing: -0.02em;
  animation: number-pop 0.5s var(--ease-spring) both;
}

.checkin-streak__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.checkin-streak__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
}

.checkin-streak__sublabel {
  font-size: var(--text-xs, 0.72rem);
  color: color-mix(in srgb, #FF8C42 80%, var(--color-text-secondary));
  font-weight: var(--weight-medium);
}

.checkin-streak__badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FF8C42;
  color: #fff;
  font-size: var(--text-xs, 0.72rem);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: celebrate-scale 0.5s var(--ease-spring) 0.2s both;
}


/* ══════════════════════════════════════════
   ÁREA 6 · HOME PERSONALIZADO
   ══════════════════════════════════════════ */

/* Stat row bajo el hero */
.home-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.home-stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: stat-reveal 0.5s var(--ease-spring) both;
}

.home-stat-tile:nth-child(2) { animation-delay: 60ms; }
.home-stat-tile:nth-child(3) { animation-delay: 120ms; }

.home-stat-tile__value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-stat-tile__label {
  font-size: var(--text-xs, 0.72rem);
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-stat-tile--accent .home-stat-tile__value {
  color: var(--color-accent);
}


/* ── Progress chart container ──────────────────────────────────────── */
.progress-chart-wrap {
  position: relative;
  margin: var(--space-4) 0 var(--space-2);
  height: 140px;
}

.progress-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.progress-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── Heatmap de actividad ───────────────────────────────────────────── */
.activity-heatmap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.activity-heatmap__label {
  font-size: var(--text-xs, 0.72rem);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--weight-medium);
}

.activity-heatmap__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.activity-heatmap__cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--color-border);
  transition: transform var(--dur-fast) var(--ease-spring);
}

.activity-heatmap__cell[data-level="1"] {
  background: color-mix(in srgb, var(--color-accent) 30%, var(--color-border));
}

.activity-heatmap__cell[data-level="2"] {
  background: color-mix(in srgb, var(--color-accent) 60%, var(--color-border));
}

.activity-heatmap__cell[data-level="3"] {
  background: var(--color-accent);
}

.activity-heatmap__cell:hover {
  transform: scale(1.3);
}

/* ── Stats section chart cards ─────────────────────────────────────── */
.stats-chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.stats-chart-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Reduced motion overrides ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nlm-empty-state__illustration,
  .checkin-streak__icon,
  .checkin-streak--epic .checkin-streak__icon,
  .checkin-streak__count,
  .checkin-streak__badge,
  .coach-feedback-banner,
  .home-stat-tile {
    animation: none;
  }
  .coach-feedback-banner::before {
    animation: none;
  }
}

/* ── _22-runners-v2.css ── */
/* ============================================================
   NULLUM — Runners v2 (referencias: Nike Run Club · running oscuro)
   Mapa inmersivo oscuro · tarjeta de cristal · botones grandes · tiles.
   Estado: #panelRunners[data-run-state] (nullumRunnersUi.js).
   Prefijo #screenDashboard.dashboard--shell para superar _07-runners.
   ============================================================ */

#screenDashboard.dashboard--shell #panelRunners {
  --run-glass: rgba(16, 10, 12, 0.62);
  --run-glass-line: rgba(255, 255, 255, 0.14);
  --run-ink: #fff;
  --run-ink-dim: rgba(255, 255, 255, 0.66);
}

/* ─── Tarjeta "Carrera en vivo": sin chrome, solo mapa ───────── */
#screenDashboard.dashboard--shell #panelRunners .runners__live-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__live-card > .card__header {
  padding: 0 0 var(--space-sm);
  border: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__status-row .card__title { display: none; }

#screenDashboard.dashboard--shell #panelRunners .runners__live-card > .card__body { padding: 0; }

#screenDashboard.dashboard--shell #panelRunners .runners__badge {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

/* Selector de actividad: píldora ligera */
#screenDashboard.dashboard--shell #panelRunners .runners-activity-bar__pick {
  border-radius: 999px;
}

/* ─── Mapa oscuro a sangre ──────────────────────────────────── */
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage {
  height: 300px;
  min-height: 300px;
  border: 0;
  border-radius: 30px;
  background: #0c0809;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transition: height var(--transition-base);
}

#screenDashboard.dashboard--shell #panelRunners[data-run-state="running"] .runners-map-stage,
#screenDashboard.dashboard--shell #panelRunners[data-run-state="paused"] .runners-map-stage {
  height: min(calc(100svh - 190px), 640px);
  min-height: 460px;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage__map,
#screenDashboard.dashboard--shell #panelRunners #runnersLiveMap,
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-container {
  height: 100% !important;
  min-height: 0;
  background: #14100f;
}

/* Teselas en modo oscuro (OSM claro → gris carbón) */
#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) saturate(0.3) brightness(0.72) contrast(1.08);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.45);
  color: var(--run-ink-dim);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-attribution a { color: var(--run-ink-dim); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-stage .leaflet-control-zoom a {
  background: var(--run-glass) !important;
  color: var(--run-ink) !important;
}

/* ─── Cristal: calidad GPS, barra viva, pastilla ───────────── */
#screenDashboard.dashboard--shell #panelRunners .runners-gps-quality,
#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar,
#screenDashboard.dashboard--shell #panelRunners .runners-map-pill {
  background: var(--run-glass);
  border: 1px solid var(--run-glass-line);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--run-ink);
}

#screenDashboard.dashboard--shell #panelRunners .runners-gps-quality__label,
#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar__value,
#screenDashboard.dashboard--shell #panelRunners .runners-map-pill { color: var(--run-ink); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar__label { color: var(--run-ink-dim); }

#screenDashboard.dashboard--shell #panelRunners .runners-map-livebar {
  top: 0.75rem;
  left: 0.75rem;
  right: 5.4rem;
}

/* Tarjeta principal de datos: abajo, números enormes */
#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics {
  top: auto;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 5.1rem;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: end;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  border-radius: 26px;
  background: var(--run-glass);
  border: 1px solid var(--run-glass-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__label {
  color: var(--run-ink-dim);
  font-size: 0.6rem;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__value {
  color: var(--run-ink);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__cell:nth-child(2) { order: -1; }

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__cell:nth-child(2) .runners-map-metrics__value {
  font-size: clamp(2.5rem, 12vw, 3.4rem);
  line-height: 0.95;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-metrics__unit { color: var(--run-ink-dim); font-size: 0.7rem; }

/* ─── Controles: pausa (blanca) + finalizar (acento) ───────── */
#screenDashboard.dashboard--shell #panelRunners .runners-map-controls {
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  gap: 0.6rem;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls .btn {
  min-height: 3.6rem;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__pause {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  color: #1a0a0e;
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__finish {
  flex: 1.6 1 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
}

#screenDashboard.dashboard--shell #panelRunners .runners-map-controls__start {
  background: #fff;
  color: #1a0a0e;
}

/* ─── Tiles de métricas (2×2 como la referencia) ───────────── */
#screenDashboard.dashboard--shell #panelRunners .runners__metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
  margin: var(--shell-gap) 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric {
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero {
  grid-column: 1 / -1;
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-label,
#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-unit,
#screenDashboard.dashboard--shell #panelRunners .runners__metric--hero .runners__metric-value { color: var(--color-on-accent); }

#screenDashboard.dashboard--shell #panelRunners .runners__metric-value {
  font-size: clamp(1.7rem, 7vw, 2.2rem);
}

/* Antes de salir: el mapa es vista previa; las métricas en reposo no aportan */
#screenDashboard.dashboard--shell #panelRunners[data-run-state="idle"] .runners__metrics { display: none; }

/* ─── Resumen post-carrera ────────────────────────────────── */
#screenDashboard.dashboard--shell #panelRunners .runners__result-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#screenDashboard.dashboard--shell #panelRunners .runners__canvas-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: #0c0809;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shell-gap);
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__cell {
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-align: left;
}

#screenDashboard.dashboard--shell #panelRunners .runners-analytics__value {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 900;
}

#screenDashboard.dashboard--shell #panelRunners .runners__result-actions .btn { border-radius: 999px; }

/* Perfil de terreno, splits e historial: tarjetas redondeadas */
#screenDashboard.dashboard--shell #panelRunners .runners-elev-chart,
#screenDashboard.dashboard--shell #panelRunners .runners-splits {
  border-radius: 22px;
}

/* ─── Estructura de la sesión: chips limpios, ajustes a la derecha ─ */
#screenDashboard.dashboard--shell #panelRunners .runners__setup-card {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#screenDashboard.dashboard--shell #panelRunners .runners__setup-header {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0;
  z-index: 2;
}

#screenDashboard.dashboard--shell #panelRunners .runners__setup-header .card__title { display: none; }

#screenDashboard.dashboard--shell #panelRunners .runners__setup-card > .card__body { padding: 0 0 var(--space-sm); }

#screenDashboard.dashboard--shell #panelRunners .runners__setup-intro {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  padding-right: 3.5rem;
  font-weight: 700;
}

#screenDashboard.dashboard--shell #panelRunners .runners-prefs-gear {
  border-radius: 50%;
}

/* ============================================================
   HUD EN CARRERA (#runnerHud) — referencias 7 y 8
   Oscuro con brillo de marca · cristal · cifras enormes.
   La especificidad supera los !important del HUD clínico claro.
   ============================================================ */
html:root #runnerHud:not([data-a]):not([data-b]) {
  --hud-tint: color-mix(in srgb, var(--color-accent) 30%, #ffe9ee);
  --hud-accent: color-mix(in srgb, var(--color-accent) 62%, #fff);
  --hud-glass: rgba(255, 255, 255, 0.07);
  --hud-line: rgba(255, 255, 255, 0.14);
  --hud-dim: rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(ellipse 100% 46% at 50% -4%, color-mix(in srgb, var(--color-accent) 58%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 24%, transparent) 0%, transparent 70%),
    #0a0506 !important;
  color: #fff !important;
}

html:root #runnerHud:not([data-a]):not([data-b]) .runner-hud__shell {
  background: transparent !important;
  color: #fff !important;
  gap: 0.85rem;
}

/* Cabecera: píldoras de cristal */
#runnerHud .runner-hud__type {
  color: var(--hud-dim);
  font-size: 0.74rem;
}

#runnerHud .runner-hud__badge,
#runnerHud .runner-hud__wake {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--hud-line);
  border-radius: 999px;
  background: var(--hud-glass);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#runnerHud .runner-hud__badge[data-state="running"] {
  background: var(--hud-accent);
  border-color: transparent;
  color: #1a0a0e;
}

#runnerHud .runner-hud__badge[data-state="paused"] { color: #ffd9a0; border-color: #ffd9a0; }
#runnerHud .runner-hud__wake[data-on="true"] { color: #b9f0d0; border-color: #b9f0d0; }

/* Bloque de intervalos y progreso */
#runnerHud .runner-hud__block {
  margin: 0;
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
}

#runnerHud .runner-hud__block-phase { color: var(--hud-tint); }
#runnerHud .runner-hud__block[data-phase="recover"] .runner-hud__block-phase { color: #b9f0d0; }
#runnerHud .runner-hud__block-meta { color: var(--hud-dim); }
#runnerHud .runner-hud__progress-label { color: var(--hud-dim); }

/* Ritmo actual: tarjeta de cristal protagonista */
#runnerHud .runner-hud__hero {
  flex: 1 1 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--hud-line);
  border-radius: 30px;
  background: var(--hud-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#runnerHud .runner-hud__label { color: var(--hud-dim); }

#runnerHud .runner-hud__pace {
  color: var(--hud-tint);
  letter-spacing: -0.05em;
}

#runnerHud .runner-hud__pace-unit { color: var(--hud-dim); }

/* Distancia y tiempo enormes (ref. 8), medio y cadencia debajo */
#runnerHud .runner-hud__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hud-line);
  border-radius: 28px;
  background: var(--hud-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#runnerHud .runner-hud__cell {
  padding: 0;
  text-align: left;
}

#runnerHud .runner-hud__cell:nth-child(2),
#runnerHud .runner-hud__cell:nth-child(3) { order: -1; }

#runnerHud .runner-hud__cell-label {
  color: var(--hud-dim);
  font-size: 0.64rem;
}

#runnerHud .runner-hud__cell-value {
  margin-top: 0.25rem;
  color: #fff;
  font-size: clamp(1.25rem, 5.4vw, 1.6rem);
}

#runnerHud .runner-hud__cell:nth-child(2) .runner-hud__cell-value,
#runnerHud .runner-hud__cell:nth-child(3) .runner-hud__cell-value {
  color: var(--hud-tint);
  font-size: clamp(2.5rem, 13vw, 3.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

/* Altimetría, zona, telemetría, aviso */
#runnerHud .runner-hud__elev {
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
}

#runnerHud .runner-hud__elev-item { color: var(--hud-dim); }
#runnerHud .runner-hud__elev-item b { color: #fff; }
#runnerHud .runner-hud__zone { margin: 0; color: #fff; }
#runnerHud .runner-hud__cue { color: var(--hud-dim); margin: 0; }
#runnerHud .runner-hud__fuel-label { color: var(--hud-tint); }
#runnerHud .runner-hud__fuel-next,
#runnerHud .runner-hud__tel-item { color: var(--hud-dim); }
#runnerHud .runner-hud__tel-item b { color: #fff; }

/* Controles: ghost pequeños + Pausa blanca y Fin en acento, como pastillas grandes */
#runnerHud .runner-hud__controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

#runnerHud .runner-hud__btn {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  background: #fff;
  color: #1a0a0e;
}

#runnerHud .runner-hud__btn--ghost {
  min-height: 46px;
  border: 1px solid var(--hud-line);
  background: var(--hud-glass);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#runnerHud .runner-hud__btn--finish {
  background: var(--hud-accent);
  color: #1a0a0e;
}

/* Leyenda de zonas: arriba, bajo la barra viva, para no tapar la tarjeta */
#screenDashboard.dashboard--shell #panelRunners .runners-heat-legend {
  top: 4.3rem;
  bottom: auto;
  left: 0.75rem;
  right: auto;
}

/* ============================================================
   RESUMEN POST-CARRERA (#runnersSuccessModal) — hoja oscura a
   pantalla completa, coherente con el HUD (refs 1 y 7).
   ============================================================ */
#runnersSuccessModal {
  --hud-tint: color-mix(in srgb, var(--color-accent) 30%, #ffe9ee);
  --hud-accent: color-mix(in srgb, var(--color-accent) 62%, #fff);
  --hud-glass: rgba(255, 255, 255, 0.07);
  --hud-line: rgba(255, 255, 255, 0.14);
  --hud-dim: rgba(255, 255, 255, 0.62);
  padding: 0;
  align-items: stretch;
}

#runnersSuccessModal .runners-success__backdrop { background: #0a0506; }

#runnersSuccessModal .runners-success__card {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  height: 100%;
  margin: 0 auto;
  padding: max(1.25rem, var(--safe-top)) 1.1rem 0;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  background:
    radial-gradient(ellipse 100% 40% at 50% -4%, color-mix(in srgb, var(--color-accent) 58%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 24%, transparent) 0%, transparent 70%),
    #0a0506;
}

#runnersSuccessModal .runners-success__eyebrow { color: var(--hud-dim); }

#runnersSuccessModal .runners-success__title {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: clamp(1.9rem, 8.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

#runnersSuccessModal .runners-success__sync {
  align-self: flex-start;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--hud-line);
  border-radius: 999px;
  background: var(--hud-glass);
  color: var(--hud-dim);
  order: 1;
}

#runnersSuccessModal .runners-success__sync[data-state="ok"] { color: #b9f0d0; }
#runnersSuccessModal .runners-success__sync[data-state="pending"] { color: #ffd9a0; }

/* Métricas: distancia protagonista + tiles de cristal */
#runnersSuccessModal .runners-success__metrics {
  order: 2;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

#runnersSuccessModal .runners-success__metric {
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border: 1px solid var(--hud-line);
  border-radius: 22px;
  background: var(--hud-glass);
  text-align: left;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#runnersSuccessModal .runners-success__metric--hero {
  padding: 1.2rem 1.25rem;
  border-radius: 28px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--color-accent) 80%, #fff 6%) 0%, color-mix(in srgb, var(--color-accent) 45%, #0a0506) 100%);
  border-color: transparent;
}

#runnersSuccessModal .runners-success__metric-label { color: var(--hud-dim); font-size: 0.64rem; }
#runnersSuccessModal .runners-success__metric-value { color: #fff; font-size: clamp(1.55rem, 7vw, 2rem); }

#runnersSuccessModal .runners-success__metric--hero .runners-success__metric-value {
  color: #fff;
  font-size: clamp(3.2rem, 17vw, 4.6rem);
  line-height: 0.95;
}

#runnersSuccessModal .runners-success__metric-unit { color: var(--hud-dim); font-size: 0.74rem; }

/* Splits, aviso híbrido y firma biométrica: tarjetas de cristal */
#runnersSuccessModal .runners-success__splits,
#runnersSuccessModal .runners-success__hybrid,
#runnersSuccessModal .runners-bio-sign {
  order: 3;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hud-line);
  border-radius: 24px;
  background: var(--hud-glass);
  color: #fff;
}

#runnersSuccessModal .runners-success__splits[hidden],
#runnersSuccessModal .runners-success__hybrid[hidden] { display: none; }

#runnersSuccessModal .runners-success__splits-title,
#runnersSuccessModal .runners-bio-sign__eyebrow { color: var(--hud-dim); }
#runnersSuccessModal .runners-bio-sign__hint,
#runnersSuccessModal .runners-bio-sign__label { color: var(--hud-dim); }
#runnersSuccessModal .runners-bio-sign__label strong { color: #fff; }

#runnersSuccessModal .runners-success__splits-table th {
  color: var(--hud-dim);
  border-bottom-color: var(--hud-line);
}

#runnersSuccessModal .runners-success__splits-table td {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

#runnersSuccessModal .runners-success__splits-table td[data-best="1"] { color: #b9f0d0; }
#runnersSuccessModal .runners-success__splits-table td[data-worst="1"] { color: #ffb3c2; }

/* CTA fijo abajo */
#runnersSuccessModal .runners-success__actions {
  order: 4;
  position: sticky;
  bottom: 0;
  margin: auto -1.1rem 0;
  padding: 0.9rem 1.1rem max(1rem, var(--safe-bottom));
  background: linear-gradient(to top, #0a0506 60%, transparent);
}

#runnersSuccessModal .runners-success__actions .btn {
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
}

/* Resumen en el panel: splits, calzado, háptica y nutrición como tarjetas */
#screenDashboard.dashboard--shell #panelRunners .runners-gear-finish,
#screenDashboard.dashboard--shell #panelRunners .haptic-therapy,
#screenDashboard.dashboard--shell #panelRunners .runners-nutrition {
  border-radius: 22px;
}

#runnersSuccessModal #runnersSuccessCadWrap { grid-column: 1 / -1; }

/* ── _23-stats-v2.css ── */
/* ============================================================
   NULLUM — Estadísticas v2 · "centro de mando"
   Escenario oscuro con rejilla y brillo de marca, cristal, neón rosa
   sobre burdeos. Datos y pestañas: nullumStatsUi.js.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelStats .panel__body {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --stx-neon:   var(--color-neon-primary);
  --stx-neon-2: var(--color-neon-soft);
  position: relative;
  margin: 0;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

#screenDashboard.dashboard--shell #panelStats .stats-card,
#screenDashboard.dashboard--shell #panelStats .card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#screenDashboard.dashboard--shell #panelStats .card__title,
#screenDashboard.dashboard--shell #panelStats .stats-card__title { color: #fff; }

/* ─── Pestañas ──────────────────────────────────────────────── */
.stx-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.stx-tabs::-webkit-scrollbar { display: none; }

.stx-tab {
  flex: 1 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.stx-tab.is-active {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.stx-tab:focus-visible { outline: 2px solid var(--stx-neon); outline-offset: 2px; }

/* Visibilidad por pestaña (solo atleta; el coach conserva la vista original) */
.dashboard[data-role="member"] #panelStats[data-stats-tab="overview"] [data-stats-group]:not([data-stats-group="overview"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="body"] [data-stats-group]:not([data-stats-group="body"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="lifts"] [data-stats-group]:not([data-stats-group="lifts"]),
.dashboard[data-role="member"] #panelStats[data-stats-tab="habits"] [data-stats-group]:not([data-stats-group="habits"]) { display: none; }

.dashboard[data-role="member"] #panelStats:not([data-stats-tab="overview"]) #statsViz { display: none; }

.dashboard[data-role="trainer"] #statsTabs,
.dashboard[data-role="trainer"] #statsViz,
.dashboard[data-role="trainer"] #statsBodyViz { display: none; }

/* ─── Bloques de resumen ───────────────────────────────────── */
.stx { display: grid; gap: 12px; margin: 0 0 12px; }

.stx-hero,
.stx-card,
.stx-tile {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stx-hero {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
}

.stx-ring { display: block; width: 100%; height: auto; overflow: visible; }

.stx-ring__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
}

.stx-ring__fg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.7));
  animation: stx-ring-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stx-ring-in {
  from { stroke-dashoffset: var(--c); }
}

.stx-ring__big {
  fill: #fff;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
}

.stx-ring__sub {
  fill: rgba(255, 255, 255, 0.6);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stx-eyebrow {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stx-legend {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stx-legend li {
  display: grid;
  grid-template-columns: 10px 1fr;
  grid-template-areas: "dot label" "dot value";
  column-gap: 8px;
  align-items: center;
}

.stx-legend span { grid-area: label; color: var(--color-text-secondary); font-size: 0.74rem; }
.stx-legend b { grid-area: value; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 900; }

.stx-dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.stx-dot--1 { background: #ff7a93; color: #ff7a93; }
.stx-dot--2 { background: #c45c7e; color: #c45c7e; }
.stx-dot--3 { background: #e58da1; color: #e58da1; }

/* Tiles con sparkline */
.stx-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stx-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 14px 10px;
  border-radius: 24px;
}

.stx-tile__label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stx-tile__value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 7vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.stx-tile__value span {
  margin-left: 4px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.stx-delta {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.stx-delta.is-good { color: #b9f0d0; }
.stx-delta.is-bad { color: #ffb3c2; }

.stx-spark { display: block; width: 100%; height: 36px; margin-top: 6px; overflow: visible; }

.stx-spark__line {
  fill: none;
  stroke: var(--stx-neon);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 140, 165, 0.8));
}

.stx-spark__area { fill: rgba(255, 157, 179, 0.12); }
.stx-spark__dot { fill: #fff; filter: drop-shadow(0 0 5px #8A5560); }
.stx-spark__flat { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: 3 4; }

/* Tarjetas de gráfico */
.stx-card {
  padding: 16px 16px 14px;
  border-radius: 28px;
}

.stx-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
}

.stx-card__head h3 {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

.stx-card__head span {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.stx-bars { display: block; width: 100%; height: auto; overflow: visible; }
.stx-bars__grid { stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 2 5; }
.stx-bars__bar { fill: url(#stxBar); opacity: 0.55; }

.stx-bars__bar.is-now {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 140, 165, 0.75));
}

.stx-bars__val {
  fill: rgba(255, 255, 255, 0.8);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
}

.stx-bars__lbl {
  fill: rgba(255, 255, 255, 0.5);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
}

/* Mapa de calor */
.stx-heat { display: block; width: 100%; height: auto; }
.stx-heat__c--0 { fill: rgba(255, 255, 255, 0.07); }
.stx-heat__c--2 { fill: #c45c7e; }
.stx-heat__c--3 { fill: #8A5560; filter: drop-shadow(0 0 5px rgba(255, 140, 165, 0.8)); }

.stx-heat__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 700;
}

.stx-heat__k { display: inline-block; width: 12px; height: 12px; margin-left: 6px; border-radius: 4px; }
.stx-heat__k--0 { margin-left: 0; background: rgba(255, 255, 255, 0.12); }
.stx-heat__k--2 { background: #c45c7e; }
.stx-heat__k--3 { background: #8A5560; }

/* Ranking horizontal */
.stx-hbars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

.stx-hbars__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.2rem;
  grid-template-areas: "name n" "track track";
  gap: 6px 8px;
  align-items: baseline;
}

.stx-hbars__name {
  grid-area: name;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-hbars__n { grid-area: n; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 900; text-align: right; }

.stx-hbars__track {
  grid-area: track;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stx-hbars__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 10px rgba(255, 140, 165, 0.7);
  animation: stx-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes stx-grow { from { width: 0; } }

.stx-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.stx-empty--hero {
  padding: 0 6px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .stx-ring__fg,
  .stx-hbars__track i { animation: none; }
}

@media (max-width: 340px) {
  .stx-hero { grid-template-columns: 1fr; }
  .stx-ring { max-width: 150px; margin: 0 auto; }
}

/* ─── Exportar: fila compacta de píldoras ──────────────────── */
#screenDashboard.dashboard--shell #panelStats .report-export {
  width: 100%;
  margin: 0;
}

#screenDashboard.dashboard--shell #panelStats .report-export__label { display: none; }

#screenDashboard.dashboard--shell #panelStats .report-export__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

#screenDashboard.dashboard--shell #panelStats .report-export__row::-webkit-scrollbar { display: none; }

#screenDashboard.dashboard--shell #panelStats .report-export__month {
  flex: 0 0 9.5rem;
  min-height: 38px;
  border-radius: 999px;
  font-size: 0.8rem;
}

#screenDashboard.dashboard--shell #panelStats .report-export__row .btn {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Tendencia de peso (pestaña Cuerpo) */
.stx-area { display: block; width: 100%; height: auto; overflow: visible; }

.stx-area__line {
  fill: none;
  stroke: var(--stx-neon);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.85));
}

.stx-stats3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.stx-stats3 div {
  padding: 10px 10px 8px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.stx-stats3 span {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stx-stats3 b {
  display: block;
  margin-top: 2px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
}

/* ── _24-waves-topbar.css ── */
/* ============================================================
   NULLUM — Ondas de fondo + barra superior futurista
   Ondas: nullumWaves.js (canvas fijo dentro de #screenDashboard).
   Barra: marca NULLUM con brillo, borde con destello, botones de
   cristal y menú que se transforma en cruz.
   ============================================================ */

/* ─── Fondo de ondas ──────────────────────────────────────── */
.nlm-waves {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* sticky necesita que el contenedor no sea de scroll: clip en vez de hidden */
.dashboard--shell .dashboard__main {
  z-index: 1;
  overflow-x: clip;
}

/* ─── Barra superior: cristal flotante ─────────────────────── */
.dashboard--shell {
  --shell-topbar-h: 58px;
  --shell-topbar-top: max(8px, var(--safe-top));
}

.dashboard--shell .topbar {
  position: sticky;
  top: var(--shell-topbar-top);
  z-index: 40;
  width: auto;
  height: var(--shell-topbar-h);
  margin: 8px 12px 6px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 0;
  border-radius: 24px;
  background: color-mix(in srgb, var(--color-surface) 66%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 16%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 34px color-mix(in srgb, var(--color-accent) 14%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  animation: topbar-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes topbar-in {
  from { opacity: 0; transform: translateY(-18px) scale(0.98); }
}

/* Borde con destello que recorre la barra */
.dashboard--shell .topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 34%,
    color-mix(in srgb, var(--color-accent) 80%, #fff) 50%,
    transparent 66%,
    transparent 100%
  ) 0 0 / 280% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: topbar-sheen 5s linear infinite;
}

/* Línea de "señal" inferior */
.dashboard--shell .topbar::after {
  content: '';
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--color-accent) 85%, #fff),
    transparent
  ) 0 0 / 40% 100% no-repeat;
  opacity: 0.85;
  pointer-events: none;
  animation: topbar-scan 3.8s ease-in-out infinite;
}

@keyframes topbar-sheen {
  from { background-position: 140% 0; }
  to { background-position: -140% 0; }
}

@keyframes topbar-scan {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* ─── Marca NULLUM en lugar del saludo ─────────────────────── */
.dashboard--shell .topbar__heading {
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}


.dashboard--shell .topbar__greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.dashboard--shell .topbar__greeting-text {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: visible;
  font-size: 0;
  line-height: 1;
}

.dashboard--shell .topbar__greeting-text::after {
  content: 'NULLUM';
  order: 1;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  background: linear-gradient(
    100deg,
    var(--color-text-primary) 0%,
    var(--color-text-primary) 38%,
    color-mix(in srgb, var(--color-accent) 55%, #fff) 50%,
    var(--color-text-primary) 62%,
    var(--color-text-primary) 100%
  ) 0 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: nlm-shine 4.2s ease-in-out infinite;
}

/* Punto de estado "en línea" */
.dashboard--shell .topbar__greeting-text::before {
  content: '';
  order: 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent);
  animation: nlm-ping 2.2s ease-out infinite;
}

@keyframes nlm-shine {
  0% { background-position: 130% 0; }
  60%, 100% { background-position: -130% 0; }
}

@keyframes nlm-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 8px transparent; }
}

.dashboard--shell .topbar__logo-mark {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--color-accent) 55%, transparent));
  animation: nlm-logo 5s ease-in-out infinite;
}

@keyframes nlm-logo {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.06); }
}

/* ─── Menú hamburguesa → cruz ──────────────────────────────── */
.dashboard--shell .topbar__hamburger {
  align-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 15px;
  background: color-mix(in srgb, var(--color-accent) 9%, transparent);
  transition: background var(--transition-fast), transform var(--press-ms) ease;
}

.dashboard--shell .topbar__hamburger:active { transform: scale(var(--press-scale)); }

.dashboard--shell .topbar__hamburger-line {
  height: 2px;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
    width 320ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease;
}

.dashboard--shell .topbar__hamburger-line:nth-child(1) { width: 20px; }
.dashboard--shell .topbar__hamburger-line:nth-child(2) { width: 13px; }
.dashboard--shell .topbar__hamburger-line:nth-child(3) { width: 17px; }

.dashboard--shell .topbar__hamburger:hover .topbar__hamburger-line:nth-child(2),
.dashboard--shell .topbar__hamburger:hover .topbar__hamburger-line:nth-child(3) { width: 20px; }

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(1) {
  width: 20px;
  transform: translateY(6px) rotate(45deg);
}

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(2) {
  width: 4px;
  opacity: 0;
}

.dashboard--shell .topbar__hamburger[aria-expanded="true"] .topbar__hamburger-line:nth-child(3) {
  width: 20px;
  transform: translateY(-6px) rotate(-45deg);
}

/* ─── Acciones: botones de cristal ─────────────────────────── */
.dashboard--shell .topbar__actions { gap: 4px; }

.dashboard--shell .topbar__chat-btn,
.dashboard--shell .topbar__night-btn,
.dashboard--shell .topbar__notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--press-ms) ease;
}

.dashboard--shell .topbar__chat-btn:active,
.dashboard--shell .topbar__night-btn:active,
.dashboard--shell .topbar__notif-btn:active { transform: scale(0.92); }

.dashboard--shell .topbar__chat-btn:hover,
.dashboard--shell .topbar__night-btn:hover,
.dashboard--shell .topbar__notif-btn:hover {
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
  color: var(--color-accent);
}

.dashboard--shell .topbar__night-btn .topbar__night-icon { animation: nlm-spin-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes nlm-spin-in {
  from { opacity: 0; transform: rotate(-90deg) scale(0.6); }
}

.dashboard--shell .topbar__notif-badge:not([hidden]) { animation: nlm-badge 2s ease-in-out infinite; }

@keyframes nlm-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Sub-pestañas pegadas bajo la barra y translúcidas */
.dashboard--shell .shell-subnav:not([hidden]) {
  top: calc(var(--shell-topbar-top) + var(--shell-topbar-h) + 6px);
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Modo noche: barra más oscura + separador visible bajo la barra */
html[data-theme-mode="dark"] .dashboard--shell .topbar,
html[data-theme="burgundy-dark"] .dashboard--shell .topbar {
  background: color-mix(in srgb, var(--color-surface) 58%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 2px 0 rgba(255, 255, 255, 0.032),
    0 14px 38px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard--shell .topbar,
  .dashboard--shell .topbar::before,
  .dashboard--shell .topbar::after,
  .dashboard--shell .topbar__greeting-text::after,
  .dashboard--shell .topbar__greeting-text::before,
  .dashboard--shell .topbar__logo-mark,
  .dashboard--shell .topbar__notif-badge:not([hidden]),
  .dashboard--shell .topbar__night-btn .topbar__night-icon { animation: none; }
}

/* ── _25-nutrition-v2.css ── */
/* ============================================================
   NULLUM — Nutrición v2 (vista del atleta)
   Escenario oscuro con rejilla y brillo de marca, cabina del día,
   línea de tiempo de comidas y lista de la compra con casillas neón.
   Cabina: nullumNutritionUi.js. El coach conserva el editor original.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .panel__body {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --nx-neon:   var(--color-neon-primary);
  --nx-neon-2: var(--color-neon-soft);
  position: relative;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 42%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 18%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.dashboard[data-role="member"] #panelNutrition .card,
.dashboard[data-role="member"] #panelNutrition .nutrition-section,
.dashboard[data-role="member"] #panelNutrition details.nutri-foods-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dashboard[data-role="member"] #panelNutrition #nutritionPlanCard {
  padding: 12px;
}

.dashboard[data-role="member"] #panelNutrition .card__title,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__title { color: #fff; }

/* ─── Alcance del servicio: colapsable, debajo del plan ─────────── */
.nutri-role-banner--collapsed {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.nutri-role-banner__summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
}
.nutri-role-banner__summary::-webkit-details-marker { display: none; }
.nutri-role-banner--collapsed[open] .nutri-role-banner__summary {
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-banner {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-banner__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card--can {
  border-color: color-mix(in srgb, var(--nx-neon) 40%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--nx-neon) 14%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__title { color: #fff; font-size: 0.98rem; }

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list li {
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  line-height: 1.3;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__list li::before { display: none; }

/* ─── Accordion "Fuera de mi alcance" ───────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion {
  cursor: pointer;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion summary {
  list-style: none;
  cursor: pointer;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion summary::-webkit-details-marker { display: none; }
.dashboard[data-role="member"] #panelNutrition .nutri-role-card__summary {
  display: block;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card__toggle-hint::after {
  content: '▸ Ver más';
  font-size: var(--text-eyebrow);
  opacity: 0.5;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin-left: 0.4em;
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion[open] .nutri-role-card__toggle-hint::after {
  content: '▾ Ocultar';
}
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion .nutri-role-card__list,
.dashboard[data-role="member"] #panelNutrition .nutri-role-card--accordion .nutri-role-card__credential {
  margin-top: 10px;
}

.dashboard[data-role="member"] #panelNutrition .nutri-role-card__note {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

/* Puente con el check-in */
.dashboard[data-role="member"] #panelNutrition .bc-bridge {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ─── Barra del visor ─────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__toolbar {
  gap: 10px;
  margin: 0 0 12px;
  padding: 4px 4px 0;
  border: 0;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__title {
  font-size: 1.2rem;
  font-weight: 900;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__meta { color: var(--color-text-muted); }

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer .btn { border-radius: 999px; }

/* ─── Cabina del día ────────────────────────────────────────── */
.nx { display: grid; gap: 12px; margin: 0 0 14px; }
.nx[hidden] { display: none; }

.nx-hero,
.nx-macros,
.nx-next {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nx-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
}

.nx-ring { display: block; width: 100%; height: auto; overflow: visible; }

.nx-ring__orbit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  transform-origin: 70px 70px;
  animation: nx-orbit 22s linear infinite;
}

@keyframes nx-orbit { to { transform: rotate(360deg); } }

.nx-ring__bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 11; }

.nx-ring__fg {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 140, 165, 0.75));
  animation: nx-ring-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nx-ring-in { from { stroke-dashoffset: var(--c); } }

.nx-ring__big {
  fill: #fff;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
}

.nx-ring__sub {
  fill: rgba(255, 255, 255, 0.6);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nx-eyebrow {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nx-kcal { margin: 0; line-height: 1; }

.nx-kcal b {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 11vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 30%, var(--nx-neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nx-kcal span { margin-left: 6px; color: var(--color-text-muted); font-size: 0.85rem; font-weight: 800; }

.nx-sub { margin: 6px 0 0; color: var(--color-text-secondary); font-size: 0.82rem; font-weight: 600; }

/* Macros */
.nx-macros {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border-radius: 26px;
  list-style: none;
}

.nx-macro {
  display: grid;
  grid-template-columns: 1fr auto 2.4rem;
  grid-template-areas: "name g pct" "track track track";
  gap: 6px 10px;
  align-items: baseline;
  --mc: #ff7a93;
}

.nx-macro--c { --mc: #ffb48a; }
.nx-macro--f { --mc: #ffd0da; }

.nx-macro__name { grid-area: name; color: var(--color-text-secondary); font-size: 0.8rem; font-weight: 700; }
.nx-macro__g { grid-area: g; font-family: var(--font-heading); font-size: 0.95rem; font-weight: 900; }
.nx-macro__pct { grid-area: pct; color: var(--color-text-muted); font-size: 0.74rem; font-weight: 800; text-align: right; }

.nx-macro__track {
  grid-area: track;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.nx-macro__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 45%, #3a1019), var(--mc));
  box-shadow: 0 0 10px color-mix(in srgb, var(--mc) 70%, transparent);
  animation: nx-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nx-grow { from { width: 0; } }

/* Chips y próxima toma */
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.nx-chip {
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.nx-chip b { color: #fff; font-weight: 800; }

.nx-next {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 22px;
}

.nx-next__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--nx-neon);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-neon) 60%, transparent);
  animation: nx-ping 2.2s ease-out infinite;
}

@keyframes nx-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-neon) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.nx-next p { margin: 0; }
.nx-next__label { color: var(--color-text-muted); font-size: var(--text-eyebrow); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.nx-next__name { margin-top: 2px; font-family: var(--font-heading); font-size: 1rem; font-weight: 900; }
.nx-next__foods { margin-top: 2px; color: var(--color-text-secondary); font-size: 0.8rem; line-height: 1.4; }

/* Con la cabina activa, lo que duplica se oculta */
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-overview,
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-ratio-bar,
.dashboard[data-role="member"] #nutritionViewer.nx-on .nutri-cycle-info,
.dashboard[data-role="member"] #nutritionViewer.nx-on .meal-plan-stats,
.dashboard[data-role="member"] #nutritionViewer.nx-on .meal-plan-next { display: none; }

/* ─── Adherencia del día ────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutri-adherence {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__lbl { color: #fff; font-weight: 800; }

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btns { display: flex; gap: 8px; }

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
}

.dashboard[data-role="member"] #panelNutrition .nutri-adherence__btn[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .nutri-streak { margin: 0 0 12px; }

/* ─── Pauta semanal: línea de tiempo ────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__head,
.dashboard[data-role="member"] #panelNutrition .meal-plan-day,
.dashboard[data-role="member"] #panelNutrition .meal-plan-note,
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop,
.dashboard[data-role="member"] #panelNutrition .meal-plan-hydration,
.dashboard[data-role="member"] #panelNutrition .meal-plan-exchanges {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__head { padding: 14px 16px; margin-bottom: 12px; }
.dashboard[data-role="member"] #panelNutrition .meal-plan-athlete__title { color: #fff; font-size: 1.15rem; }
.dashboard[data-role="member"] #panelNutrition .meal-plan-cc__eyebrow,
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__title { color: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-days { gap: 12px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day { overflow: hidden; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day.is-today {
  border-color: color-mix(in srgb, var(--nx-neon) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nx-neon) 25%, transparent), 0 0 30px color-mix(in srgb, var(--nx-neon) 18%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__title,
.dashboard[data-role="member"] #panelNutrition .meal-plan-day.is-today > .meal-plan-day__title {
  padding: 14px 16px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__title::before {
  border-color: var(--nx-neon);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__today-pill {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-neon) 50%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__kcal {
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__badge {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__share-btn {
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

/* Cada toma: nodo y línea vertical */
.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0 16px 14px 36px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal {
  position: relative;
  padding: 0 0 16px 18px;
  border: 0;
  background: transparent;
  border-left: 2px dashed rgba(255, 255, 255, 0.16);
  margin-left: 0;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal:last-child { border-left-color: transparent; padding-bottom: 2px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--nx-neon);
  border-radius: 50%;
  background: #0a0506;
  box-shadow: 0 0 10px color-mix(in srgb, var(--nx-neon) 60%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal--done::before { background: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal--done .meal-plan-table__food { opacity: 0.55; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meal-label {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 900;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal__done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-meal__done-btn.is-done {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 0 16px color-mix(in srgb, var(--nx-neon) 60%, transparent);
}

/* Alimentos: nombre a la izquierda, cantidad en neón */
.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals .meal-plan-table__food {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.84rem;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-day__meals .meal-plan-table__food:last-of-type { border-bottom: 0; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-table__grams {
  margin: 0;
  color: var(--nx-neon-2);
  font-weight: 800;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-table__note {
  flex-basis: 100%;
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-eq {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.74rem;
}

/* ─── Lista de la compra ────────────────────────────────────── */
.dashboard[data-role="member"] #panelNutrition .meal-plan-shop { margin-top: 12px; padding: 16px; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__cat {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__cat-title { color: var(--nx-neon); }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__item {
  border-bottom-color: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__qty { color: var(--nx-neon-2); font-weight: 800; }

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__check-mark {
  border: 2px solid var(--color-border-strong);
  border-radius: 8px;
  background: transparent;
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__check input:checked + .meal-plan-shop__check-mark {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  box-shadow: 0 0 12px color-mix(in srgb, var(--nx-neon) 55%, transparent);
}

.dashboard[data-role="member"] #panelNutrition .meal-plan-shop__item.is-bought .meal-plan-shop__check-name { opacity: 0.5; text-decoration: line-through; }

/* ─── Textos del coach y suplementación ─────────────────────── */
.dashboard[data-role="member"] #panelNutrition .nutrition-section { margin: 0 0 12px; padding: 16px; }

.dashboard[data-role="member"] #panelNutrition .nutrition-section__label {
  margin: 0 0 8px;
  color: var(--nx-neon);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-section__body { color: var(--color-text-secondary); }

.dashboard[data-role="member"] #panelNutrition .nutri-today-card {
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.dashboard[data-role="member"] #panelNutrition .nutri-coach-banner {
  border: 1px solid color-mix(in srgb, var(--nx-neon) 35%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  color: #fff;
}

.dashboard[data-role="member"] #panelNutrition .nutri-foods-card { padding: 4px 4px; }

@media (prefers-reduced-motion: reduce) {
  .nx-ring__orbit,
  .nx-ring__fg,
  .nx-macro__track i,
  .nx-next__dot { animation: none; }
}

@media (max-width: 340px) {
  .nx-hero { grid-template-columns: 1fr; }
  .nx-ring { max-width: 140px; margin: 0 auto; }
}

/* Cabecera del visor: sin cajas ni sombras duras */
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__meta-block,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__actions {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard[data-role="member"] #panelNutrition .nutrition-viewer__actions .btn,
.dashboard[data-role="member"] #panelNutrition .nutrition-viewer .btn--primary {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 50%, transparent);
  color: #fff;
}

/* La barra del visor deja de ser sticky: no debe tapar la pauta */
#screenDashboard.dashboard--shell #panelNutrition .nutrition-viewer__toolbar {
  position: static;
  top: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* ── _26-checkin-v2.css ── */
/* ============================================================
   NULLUM — Check-in semanal v2 (vista del atleta)
   Escenario oscuro con rejilla y brillo, asistente de 3 pasos con
   neón, puntuaciones redondas y barra de acciones flotante.
   El coach conserva su vista original.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .panel__body.wci {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --wx-neon:   var(--color-neon-primary);
  --wx-neon-2: var(--color-neon-soft);
  position: relative;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* ─── Pestañas: Nuevo / Historial ───────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.dashboard[data-role="member"] #panelCheckIn .wci-tabs__btn {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
}

.dashboard[data-role="member"] #panelCheckIn .wci-tabs__btn.is-active {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.dashboard[data-role="member"] #panelCheckIn .wci-tabs__btn::after { display: none; }

/* ─── Tarjeta del formulario ───────────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-form,
.dashboard[data-role="member"] #panelCheckIn .wci-history,
.dashboard[data-role="member"] #panelCheckIn .wci-alert {
  border: 1px solid var(--color-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  color: #fff;
}

.dashboard[data-role="member"] #panelCheckIn .wci-fieldset { padding: 16px 14px 150px; border: 0; }

.dashboard[data-role="member"] #panelCheckIn .wci-form__title { color: #fff; font-size: 1.15rem; }

.dashboard[data-role="member"] #panelCheckIn .wci-eta {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.08em;
}

/* ─── Asistente: pasos y progreso ──────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-stepper {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.dashboard[data-role="member"] #panelCheckIn .wci-stepper__item { flex: 1; min-width: 0; }

.dashboard[data-role="member"] #panelCheckIn .wci-stepper__btn {
  width: 100%;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px solid var(--color-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dashboard[data-role="member"] #panelCheckIn .wci-stepper__item.is-current .wci-stepper__btn {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.dashboard[data-role="member"] #panelCheckIn .wci-stepper__item.is-done .wci-stepper__btn {
  border-color: color-mix(in srgb, var(--wx-neon) 55%, transparent);
  color: var(--wx-neon-2);
}

.dashboard[data-role="member"] #panelCheckIn .wci-progress__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.dashboard[data-role="member"] #panelCheckIn .wci-progress__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 12px rgba(255, 140, 165, 0.8);
}

.dashboard[data-role="member"] #panelCheckIn .wci-progress__label { color: var(--color-text-muted); }

/* ─── Contenido de cada paso ───────────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-step__kicker {
  color: var(--wx-neon);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.09em;
}

.dashboard[data-role="member"] #panelCheckIn .wci-step__title { color: #fff; font-size: 1.35rem; }

.dashboard[data-role="member"] #panelCheckIn .wci-hint,
.dashboard[data-role="member"] #panelCheckIn .wci-metrics__legend { color: var(--color-text-secondary); }

/* Peso: campo grande */
.dashboard[data-role="member"] #panelCheckIn .wci-scale__input {
  min-height: 76px;
  border: 1px solid var(--color-border-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
}

.dashboard[data-role="member"] #panelCheckIn .wci-scale__input:focus {
  border-color: var(--wx-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-neon) 25%, transparent), 0 0 24px color-mix(in srgb, var(--wx-neon) 30%, transparent);
  outline: none;
}

.dashboard[data-role="member"] #panelCheckIn .form__input-suffix { color: var(--color-text-muted); font-weight: 800; }

.dashboard[data-role="member"] #panelCheckIn .wci-fasting-confirm {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--color-text-secondary);
}

/* Media móvil: tres tiles */
.dashboard[data-role="member"] #panelCheckIn .wci-sma {
  border: 0;
  background: transparent;
  padding: 0;
}

.dashboard[data-role="member"] #panelCheckIn .wci-sma__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard[data-role="member"] #panelCheckIn .wci-sma__cell {
  padding: 12px 10px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.dashboard[data-role="member"] #panelCheckIn .wci-sma__label {
  color: var(--color-text-muted);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard[data-role="member"] #panelCheckIn .wci-sma__value {
  display: block;
  margin-top: 2px;
  color: var(--wx-neon-2);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
}

.dashboard[data-role="member"] #panelCheckIn .wci-sma__hint { color: var(--color-text-muted); }

.dashboard[data-role="member"] #panelCheckIn .wci-scale__history,
.dashboard[data-role="member"] #panelCheckIn .wci-fatigue-insight,
.dashboard[data-role="member"] #panelCheckIn .wci-outlier {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelCheckIn .wci-fatigue-insight__title,
.dashboard[data-role="member"] #panelCheckIn .wci-scale__history-title { color: var(--wx-neon); }

/* Recuperación: tarjetas con puntuaciones redondas */
.dashboard[data-role="member"] #panelCheckIn .wci-metrics__grid { display: grid; gap: 10px; }

.dashboard[data-role="member"] #panelCheckIn .wci-metric {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.dashboard[data-role="member"] #panelCheckIn .wci-metric__label { color: #fff; font-weight: 900; }
.dashboard[data-role="member"] #panelCheckIn .wci-metric__hint { color: var(--color-text-muted); }

.dashboard[data-role="member"] #panelCheckIn .wci-metric__scores {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.dashboard[data-role="member"] #panelCheckIn .wci-metric__score {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--color-border-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard[data-role="member"] #panelCheckIn .wci-metric__score[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 0 18px color-mix(in srgb, var(--wx-neon) 60%, transparent);
}

/* Fotos y notas */
.dashboard[data-role="member"] #panelCheckIn .wci-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.dashboard[data-role="member"] #panelCheckIn .wci-slot,
.dashboard[data-role="member"] #panelCheckIn .wci-photo-upload__zone {
  border: 1px dashed color-mix(in srgb, var(--wx-neon) 55%, transparent);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--color-text-secondary);
}

.dashboard[data-role="member"] #panelCheckIn .wci-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.dashboard[data-role="member"] #panelCheckIn .wci-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard[data-role="member"] #panelCheckIn textarea.form__input,
.dashboard[data-role="member"] #panelCheckIn .wci-comments .form__input {
  border: 1px solid var(--color-border-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ─── Barra de acciones flotante ───────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-form__footer--sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--shell-bar-h, 64px) + 20px + var(--safe-bottom, 0px));
  z-index: 60;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 26px;
  background: color-mix(in srgb, #0a0506 78%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.dashboard[data-role="member"] #panelCheckIn .wci-form__ready,
.dashboard[data-role="member"] #panelCheckIn .wci-form__status {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  text-align: center;
}

.dashboard[data-role="member"] #panelCheckIn .wci-wizard__nav { display: flex; gap: 8px; }

.dashboard[data-role="member"] #panelCheckIn .wci-wizard__nav .btn {
  flex: 1;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 900;
  box-shadow: none;
}

.dashboard[data-role="member"] #panelCheckIn .wci-wizard__nav .btn--primary {
  background: #fff;
  color: #1a0a0e;
}

.dashboard[data-role="member"] #panelCheckIn .wci-wizard__nav .btn--ghost {
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.dashboard[data-role="member"] #panelCheckIn .wci-nutrition-link .btn { border-radius: 999px; }

/* ─── Historial ────────────────────────────────────────────── */
.dashboard[data-role="member"] #panelCheckIn .wci-history { padding: 16px; }
.dashboard[data-role="member"] #panelCheckIn .wci-history__title { color: #fff; }
.dashboard[data-role="member"] #panelCheckIn .wci-history__empty { color: var(--color-text-muted); }

.dashboard[data-role="member"] #panelCheckIn .wci-trend-charts__tabs { display: flex; gap: 6px; overflow-x: auto; }

.dashboard[data-role="member"] #panelCheckIn .wci-trend-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-weight: 800;
}

.dashboard[data-role="member"] #panelCheckIn .wci-trend-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
}

.dashboard[data-role="member"] #panelCheckIn .wci-trend-charts__canvas-wrap {
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.dashboard[data-role="member"] #panelCheckIn .wci-acc {
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.dashboard[data-role="member"] #panelCheckIn .wci-acc.is-open { border-color: color-mix(in srgb, var(--wx-neon) 45%, transparent); }

.dashboard[data-role="member"] #panelCheckIn .wci-streak-badge {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--wx-neon) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: #fff;
  font-weight: 800;
}

.dashboard[data-role="member"] #panelCheckIn .wci-coach-feedback-banner {
  border: 1px solid color-mix(in srgb, var(--wx-neon) 40%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-accent) 24%, transparent);
  color: #fff;
}

/* Casilla de condiciones: tamaño normal y color de marca */
.dashboard[data-role="member"] #panelCheckIn .wci-fasting-confirm input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: var(--wx-neon);
}

/* position: fixed necesita que ningún ancestro cree contexto de transformación
   (las reglas GPU de _16 aplican translate3d a .wci-fieldset y al panel) */
#screenDashboard.dashboard--shell[data-role="member"] #panelCheckIn,
#screenDashboard.dashboard--shell[data-role="member"] #panelCheckIn .wci-fieldset {
  transform: none;
  backface-visibility: visible;
}

/* La animación de entrada del panel deja un transform residual (fill both):
   solo se aplica mientras anima, para no romper el position: fixed de la barra */
#screenDashboard.dashboard--shell[data-role="member"] #panelCheckIn.panel--active {
  animation-fill-mode: backwards;
}

.dashboard[data-role="member"] #panelCheckIn .wci-form__status:empty { display: none; }

/* ── _27-profile-v2.css ── */
/* ============================================================
   NULLUM — Perfil y ajustes v2
   Escenario oscuro de cristal, tarjeta de identidad con aro neón,
   secciones como tarjetas con icono, temas como muestras.
   Aplica a atleta y entrenador (el panel es común).
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelProfile .panel__body {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-bg: #0a0506;
  --px-neon: #8A5560;
  --px-neon-2: #ffd0da;
  position: relative;
  padding: 14px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* ─── Tarjeta de identidad ──────────────────────────────────── */
#screenDashboard.dashboard--shell #panelProfile .profile-hero__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none;
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar-wrap { position: relative; flex: 0 0 auto; }

#screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar {
  display: block;
  width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent), #8A5560);
  box-shadow:
    0 0 0 3px #0a0506,
    0 0 0 5px color-mix(in srgb, var(--px-neon) 70%, transparent),
    0 0 26px color-mix(in srgb, var(--px-neon) 45%, transparent);
  animation: px-aura 3.6s ease-in-out infinite;
}

@keyframes px-aura {
  0%, 100% { box-shadow: 0 0 0 3px #0a0506, 0 0 0 5px color-mix(in srgb, var(--px-neon) 60%, transparent), 0 0 20px color-mix(in srgb, var(--px-neon) 35%, transparent); }
  50% { box-shadow: 0 0 0 3px #0a0506, 0 0 0 5px var(--px-neon), 0 0 34px color-mix(in srgb, var(--px-neon) 60%, transparent); }
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar-img { width: 100%; height: 100%; object-fit: cover; }

#screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid #0a0506;
  border-radius: 50%;
  background: #fff;
  color: #1a0a0e;
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__label {
  margin: 0 0 2px;
  color: var(--px-neon);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__name {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__stats { margin: 8px 0 0; }

#screenDashboard.dashboard--shell #panelProfile .profile-hero__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

#screenDashboard.dashboard--shell #panelProfile .profile-hero__stat dt { color: var(--color-text-muted); font-size: 0.7rem; }
#screenDashboard.dashboard--shell #panelProfile .profile-hero__stat dd { margin: 0; color: var(--px-neon-2); font-weight: 900; }
#screenDashboard.dashboard--shell #panelProfile .profile-hero__hint { margin: 8px 0 0; color: var(--color-text-muted); font-size: 0.72rem; }

/* ─── Secciones como tarjetas ──────────────────────────────── */
#screenDashboard.dashboard--shell #panelProfile .profile-section,
#screenDashboard.dashboard--shell #panelProfile .card.profile-section {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#screenDashboard.dashboard--shell #panelProfile .profile-section--danger {
  border-color: color-mix(in srgb, #ff6b6b 40%, transparent);
}

#screenDashboard.dashboard--shell #panelProfile .profile-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
}

#screenDashboard.dashboard--shell #panelProfile .profile-section__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 70%, transparent), color-mix(in srgb, var(--px-neon) 25%, transparent));
  color: #fff;
  box-shadow: 0 0 18px color-mix(in srgb, var(--color-accent) 45%, transparent);
}

#screenDashboard.dashboard--shell #panelProfile .profile-section__title {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
}

#screenDashboard.dashboard--shell #panelProfile .profile-section__desc {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

#screenDashboard.dashboard--shell #panelProfile .profile-section .card__body { padding: 0; }

/* ─── Formularios ──────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelProfile .form__input,
#screenDashboard.dashboard--shell #panelProfile .form__select,
#screenDashboard.dashboard--shell #panelProfile textarea {
  min-height: 50px;
  border: 1px solid var(--color-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelProfile .form__input:focus,
#screenDashboard.dashboard--shell #panelProfile .form__select:focus {
  border-color: var(--px-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--px-neon) 25%, transparent);
  outline: none;
}

#screenDashboard.dashboard--shell #panelProfile .form__label { color: var(--color-text-secondary); }

#screenDashboard.dashboard--shell #panelProfile .btn {
  min-height: 48px;
  border-radius: 999px;
  box-shadow: none;
}

#screenDashboard.dashboard--shell #panelProfile .btn--primary {
  border: 0;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 50%, transparent);
}

#screenDashboard.dashboard--shell #panelProfile .btn--ghost,
#screenDashboard.dashboard--shell #panelProfile .btn--secondary {
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ─── Temas: muestras ──────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelProfile .theme-settings__intro { color: var(--color-text-muted); font-size: 0.8rem; }

#screenDashboard.dashboard--shell #panelProfile .theme-settings__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#screenDashboard.dashboard--shell #panelProfile .theme-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--press-ms) ease;
}

#screenDashboard.dashboard--shell #panelProfile .theme-option:active { transform: scale(var(--press-scale)); }

#screenDashboard.dashboard--shell #panelProfile .theme-option[aria-checked="true"] {
  border-color: var(--px-neon);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--px-neon) 40%, transparent), 0 0 24px color-mix(in srgb, var(--px-neon) 28%, transparent);
}

#screenDashboard.dashboard--shell #panelProfile .theme-option__preview { border-radius: 14px; overflow: hidden; }
#screenDashboard.dashboard--shell #panelProfile .theme-option__name { color: #fff; font-weight: 800; }
#screenDashboard.dashboard--shell #panelProfile .theme-option__desc { color: var(--color-text-muted); font-size: 0.72rem; }

/* ─── Listas: conexiones, logros, privacidad ───────────────── */
#screenDashboard.dashboard--shell #panelProfile .profile-connections__list > li,
#screenDashboard.dashboard--shell #panelProfile .streak-milestones__grid > * {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

#screenDashboard.dashboard--shell #panelProfile .profile-privacy__links a { color: var(--px-neon); }

@media (prefers-reduced-motion: reduce) {
  #screenDashboard.dashboard--shell #panelProfile .profile-hero__avatar { animation: none; }
}

/* Tarjeta de identidad: una sola capa */
#screenDashboard.dashboard--shell #panelProfile .profile-hero {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* ── _28-trainer-v2.css ── */
/* ============================================================
   NULLUM — Panel del entrenador v2
   Cabina de supervisión: escenario oscuro de cristal, KPIs con neón,
   triaje con píldoras y tarjetas desplegables. También la Torre de
   control de la pantalla de inicio del coach.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #trainer-dashboard .panel__body,
#screenDashboard.dashboard--shell .coach-tower {
  /* Tokens de color heredados de .dark-scene en _01-tokens.css */
  --tx-neon:    var(--color-neon-primary);
  --tx-neon-2:  var(--color-neon-soft);
  --td-surface: var(--color-surface);
  --td-surface2: var(--color-surface-raised);
  --td-border:  var(--color-border);
  --td-accent:  var(--color-neon-primary);
  --td-text:    var(--color-text-primary);
  --td-text-muted: var(--color-text-muted);
  position: relative;
  padding: 14px;
  border-radius: var(--radius-panel);
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* ─── Tarjetas ──────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #trainer-dashboard .card,
#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel,
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed {
  margin-bottom: 12px;
  padding: 16px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-2xl) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#screenDashboard.dashboard--shell #trainer-dashboard .card__title,
#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel__list-title,
#screenDashboard.dashboard--shell #trainer-dashboard .sf2__title { color: #fff !important; font-family: var(--font-heading); font-weight: 900; }

#screenDashboard.dashboard--shell #trainer-dashboard .card__subtitle,
#screenDashboard.dashboard--shell #trainer-dashboard .ecr-panel__subtitle,
#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel__subtitle { color: var(--color-text-muted) !important; }

#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel__empty {
  border: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--color-text-muted) !important;
}

#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel__list-title span {
  border-color: var(--color-border-strong);
  color: var(--tx-neon) !important;
}

#screenDashboard.dashboard--shell #trainer-dashboard .card__eyebrow { color: var(--tx-neon); }

/* Desplegables: chevrón neón */
#screenDashboard.dashboard--shell #trainer-dashboard .card--collapsible .card__header { padding: 0; }
#screenDashboard.dashboard--shell #trainer-dashboard .card--collapsible .card__header::after { color: var(--tx-neon); }
#screenDashboard.dashboard--shell #trainer-dashboard .card--collapsible.is-open { border-color: color-mix(in srgb, var(--tx-neon) 40%, transparent); }

/* ─── KPIs de cartera ──────────────────────────────────────── */
#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-bar[hidden] { display: none; }

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  text-align: left;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--press-ms) ease;
}

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card:active { transform: scale(var(--press-scale)); }

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card[aria-pressed="true"] {
  border-color: var(--tx-neon);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tx-neon) 35%, transparent), 0 0 26px color-mix(in srgb, var(--tx-neon) 24%, transparent);
}

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card__value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--tx-neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card__label {
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

#screenDashboard.dashboard--shell #trainer-dashboard .coach-kpi-card--attention .coach-kpi-card__icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  color: #ffb3c2;
  filter: drop-shadow(0 0 6px rgba(255, 120, 150, 0.7));
}

/* ─── Atención de hoy: triaje ──────────────────────────────── */
#screenDashboard.dashboard--shell #trainer-dashboard .sf2__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

#screenDashboard.dashboard--shell #trainer-dashboard .sf2__refresh {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#screenDashboard.dashboard--shell #trainer-dashboard .sf2__tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

#screenDashboard.dashboard--shell #trainer-dashboard .sf2__tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-weight: 800;
}

#screenDashboard.dashboard--shell #trainer-dashboard .sf2__tab.is-active {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

#screenDashboard.dashboard--shell #trainer-dashboard .sf2__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
}

#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__stat {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Smart-feed: texto visible sobre fondo oscuro ──────────────── */
/* Los tokens --color-text-* resuelven al modo light si el sistema
   no hereda .dark-scene, dejando texto oscuro sobre fondo negro. */
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__name,
#screenDashboard.dashboard--shell #trainer-dashboard .sf2__title { color: #fff !important; }

#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__reason,
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__meta-row,
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__meta-row span,
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__empty,
#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__digest { color: rgba(255, 255, 255, 0.55) !important; }

#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__item {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Tabs inactivos: texto legible sobre fondo oscuro */
#screenDashboard.dashboard--shell #trainer-dashboard .sf2__tab:not(.is-active) {
  color: rgba(255, 255, 255, 0.5);
}

#screenDashboard.dashboard--shell #trainer-dashboard .smart-feed__list > li,
#screenDashboard.dashboard--shell #trainer-dashboard .access-gate-panel__list > li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.045);
}

/* ─── Controles ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #trainer-dashboard .form__input,
#screenDashboard.dashboard--shell #trainer-dashboard .form__select,
#screenDashboard.dashboard--shell #trainer-dashboard textarea {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#screenDashboard.dashboard--shell #trainer-dashboard .btn {
  border-radius: 999px;
  box-shadow: none;
}

#screenDashboard.dashboard--shell #trainer-dashboard .btn--primary {
  border: 0;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 50%, transparent);
}

#screenDashboard.dashboard--shell #trainer-dashboard .btn--ghost,
#screenDashboard.dashboard--shell #trainer-dashboard .btn--secondary {
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ─── Torre de control (inicio del coach) ──────────────────── */
#screenDashboard.dashboard--shell .coach-tower { margin: 0 0 12px; }

#screenDashboard.dashboard--shell .coach-tower__title,
#screenDashboard.dashboard--shell .coach-cc__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

#screenDashboard.dashboard--shell .coach-tower__eyebrow,
#screenDashboard.dashboard--shell .coach-cc__eyebrow { color: var(--tx-neon); }

/* Torre: paneles alineados al shell oscuro (burdeos / perla) */
#screenDashboard.dashboard--shell .coach-tower {
  --tower-panel: rgba(255, 255, 255, 0.055);
  --tower-panel-edge: rgba(255, 255, 255, 0.1);
  --tower-ink: #EDE8E3;
  --tower-muted: #A89A90;
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__card,
#screenDashboard.dashboard--shell .coach-tower .coach-tower__item {
  color: var(--tower-ink);
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__name,
#screenDashboard.dashboard--shell .coach-tower .coach-tower__metric-v {
  color: #F5F0EB;
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__detail,
#screenDashboard.dashboard--shell .coach-tower .coach-tower__metric-k {
  color: var(--tower-muted);
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__card-cta {
  color: color-mix(in srgb, var(--color-accent, #5C2430) 42%, #fff);
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__grid {
  align-items: stretch;
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower-search {
  margin: 0 0 12px;
}

#screenDashboard.dashboard--shell .coach-cc__bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#screenDashboard.dashboard--shell .coach-cc__tile {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.055);
}

#screenDashboard.dashboard--shell .coach-cc__tile-label { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell .coach-cc__tile-value {
  color: var(--tx-neon-2);
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
}

#screenDashboard.dashboard--shell .coach-cc__tile--alerts {
  border-color: color-mix(in srgb, #ff6b8a 45%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, #ff6b8a 16%, transparent);
}

#screenDashboard.dashboard--shell .coach-disc-section {
  margin: 12px 0 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.05);
}

#screenDashboard.dashboard--shell .coach-disc-section__title { color: #fff; }
#screenDashboard.dashboard--shell .coach-disc-section__sub { color: var(--color-text-muted); }

/* Product depth — inbox + tools groups (audit follow-through) */
#screenDashboard.dashboard--shell .coach-pending-review--inbox {
  margin-top: 12px;
  border-color: color-mix(in srgb, var(--color-accent) 42%, transparent);
  background: rgba(255, 255, 255, 0.07);
}

#screenDashboard.dashboard--shell .trainer-tools-group {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

#screenDashboard.dashboard--shell .trainer-tools-group__title { color: #fff; }
#screenDashboard.dashboard--shell .trainer-tools-group__sub { color: var(--color-text-muted); }

/* ─── Overrides dark-scene: tokens hardcoded en _08-welcome-profile ─── */
/* coach-cc usa --tower-cream y --tower-card que no existen en dark-scene */
.dark-scene .coach-cc {
  background:
    linear-gradient(145deg, rgba(138, 85, 96, 0.08), transparent 55%),
    var(--color-surface);
  border-color: var(--color-border);
}
.dark-scene .coach-cc__eyebrow { color: var(--color-neon-primary, #8A5560); }
.dark-scene .coach-cc__title   { color: var(--color-text-primary); }
.dark-scene .coach-cc__meta    { color: var(--color-text-muted); }
.dark-scene .coach-cc__tile {
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}
/* coach-mirror (Carreras en directo) */
.dark-scene .coach-mirror {
  background: var(--color-surface);
  border-color: var(--color-border);
}
.dark-scene .coach-mirror__title { color: var(--color-text-primary); }
.dark-scene .coach-mirror__sub   { color: var(--color-text-muted); }

/* Selector de cliente en Gráficas y Stats (panel con dark-scene) */
.dark-scene .form__label { color: var(--color-text-muted); }
.dark-scene .form__select,
.dark-scene .form__input {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  color-scheme: dark;
}
.dark-scene .coach-client-hint { color: var(--color-text-muted); }

/* ── _29-library-v2.css ── */
/* ============================================================
   NULLUM — Biblioteca v2
   Escenario oscuro de cristal: buscador, filtros en píldoras, filas
   horizontales de pósters con brillo neón, progreso y reproductor.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .panel__body {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-surface-raised: rgba(255, 255, 255, 0.07);
  --color-bg: #0a0506;
  --lx-neon: #5C2430;
  --lx-neon-2: #8A5560;
  position: relative;
  padding: 14px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* ─── Buscador ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .library-search-wrap {
  position: relative;
  margin: 0 0 12px;
}

#screenDashboard.dashboard--shell #panelLibrary .library-search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 46px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  box-sizing: border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#screenDashboard.dashboard--shell #panelLibrary .library-search-input::placeholder { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelLibrary .library-search-input:focus {
  border-color: var(--lx-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-neon) 25%, transparent), 0 0 26px color-mix(in srgb, var(--lx-neon) 22%, transparent);
  outline: none;
}

#screenDashboard.dashboard--shell #panelLibrary .library-search-icon { color: var(--lx-neon); }

/* ─── Filtros ──────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .library-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

#screenDashboard.dashboard--shell #panelLibrary .library-filter-cats {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

#screenDashboard.dashboard--shell #panelLibrary .library-filter-cats::-webkit-scrollbar { display: none; }

#screenDashboard.dashboard--shell #panelLibrary .library-filter-btn,
#screenDashboard.dashboard--shell #panelLibrary .library-tag-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

#screenDashboard.dashboard--shell #panelLibrary .library-filter-btn.is-active,
#screenDashboard.dashboard--shell #panelLibrary .library-filter-btn[aria-pressed="true"],
#screenDashboard.dashboard--shell #panelLibrary .library-tag-btn.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

#screenDashboard.dashboard--shell #panelLibrary .library-view-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ─── Progreso global ──────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .library-global-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

#screenDashboard.dashboard--shell #panelLibrary .library-global-progress[hidden] { display: none; }

#screenDashboard.dashboard--shell #panelLibrary .library-global-progress__bar-wrap,
#screenDashboard.dashboard--shell #panelLibrary .library-category__progress-bar-wrap {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

#screenDashboard.dashboard--shell #panelLibrary .library-global-progress__bar,
#screenDashboard.dashboard--shell #panelLibrary .library-category__progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 12px rgba(255, 140, 165, 0.8);
}

#screenDashboard.dashboard--shell #panelLibrary .library-global-progress__label,
#screenDashboard.dashboard--shell #panelLibrary .library-category__progress-label {
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

/* ─── Filas y categorías ───────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .library-recents__title,
#screenDashboard.dashboard--shell #panelLibrary .library-category__title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
}

#screenDashboard.dashboard--shell #panelLibrary .library-category__count {
  padding: 2px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
}

#screenDashboard.dashboard--shell #panelLibrary .library-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

#screenDashboard.dashboard--shell #panelLibrary .library-row::-webkit-scrollbar { display: none; }

#screenDashboard.dashboard--shell #panelLibrary .library-row--wrap {
  flex-wrap: wrap;
  overflow: visible;
}

/* ─── Pósters de vídeo ─────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .lib-card {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  scroll-snap-align: start;
  transition: transform var(--press-ms) ease, border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card:active { transform: scale(0.98); }

#screenDashboard.dashboard--shell #panelLibrary .lib-card:hover,
#screenDashboard.dashboard--shell #panelLibrary .lib-card:focus-within {
  border-color: color-mix(in srgb, var(--lx-neon) 55%, transparent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35), 0 0 26px color-mix(in srgb, var(--lx-neon) 22%, transparent);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card__thumb { border-radius: 0; }

#screenDashboard.dashboard--shell #panelLibrary .lib-card__title {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card__play-overlay {
  background: linear-gradient(to top, rgba(10, 5, 6, 0.75), transparent 60%);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card__play-icon {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1a0a0e;
  box-shadow: 0 0 24px color-mix(in srgb, var(--lx-neon) 50%, transparent);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card__duration {
  padding: 3px 9px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(10, 5, 6, 0.6);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card__tag {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

#screenDashboard.dashboard--shell #panelLibrary .lib-card--watched { opacity: 0.72; }

#screenDashboard.dashboard--shell #panelLibrary .lib-card__watched,
#screenDashboard.dashboard--shell #panelLibrary .lib-card__watched-toggle { color: var(--lx-neon-2); }

/* ─── Estados vacíos y administración ──────────────────────── */
#screenDashboard.dashboard--shell #panelLibrary .library-empty-state,
#screenDashboard.dashboard--shell #panelLibrary .library-error-state {
  padding: 24px 16px;
  border: 1px dashed color-mix(in srgb, var(--lx-neon) 45%, transparent);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

#screenDashboard.dashboard--shell #panelLibrary .library-empty-state__title { color: #fff; }

#screenDashboard.dashboard--shell #panelLibrary .library-admin-bar .btn,
#screenDashboard.dashboard--shell #panelLibrary .library-error-state__retry {
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* Cargando */
#screenDashboard.dashboard--shell #panelLibrary .lib-skeleton__card,
#screenDashboard.dashboard--shell #panelLibrary .lib-skeleton__row-title {
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05)) 0 0 / 200% 100%;
  animation: lx-shimmer 1.6s ease-in-out infinite;
}

@keyframes lx-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* ─── Reproductor y modal ──────────────────────────────────── */
.lib-player { background: #0a0506; }

.lib-player__controls,
.lib-player__top-gradient { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.lib-player__seek-fill {
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 10px rgba(255, 140, 165, 0.8);
}

.lib-player__btn {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lib-modal__box {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: #130a0c;
  color: #fff;
}

.lib-modal__input {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  #screenDashboard.dashboard--shell #panelLibrary .lib-skeleton__card,
  #screenDashboard.dashboard--shell #panelLibrary .lib-skeleton__row-title { animation: none; }
}

/* ── _30-session-v2.css ── */
/* ============================================================
   NULLUM — Sesión de entrenamiento v2
   1) Pantalla de sesión (atleta): escenario de cristal.
   2) Cuaderno de la sesión: sin papel, tarjeta de cristal.
   3) Modo enfoque (entrenamiento activo): inmersivo, neón, cristal.
   ============================================================ */

/* ─── 1 · Escenario de la pantalla de sesión ────────────────── */
.dashboard[data-role="member"] #panelSession .panel__body {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-surface-raised: rgba(255, 255, 255, 0.07);
  --color-bg: #0a0506;
  --sx-neon: #8A5560;
  --sx-neon-2: #ffd0da;
  position: relative;
  padding: 14px;
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.dashboard[data-role="member"] #panelSession .card {
  border: 1px solid var(--color-border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dashboard[data-role="member"] #panelSession .card__title { color: #fff; }

.dashboard[data-role="member"] #panelSession .form__select,
.dashboard[data-role="member"] #panelSession .form__input {
  min-height: 52px;
  border: 1px solid var(--color-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.dashboard[data-role="member"] #panelSession .form__label { color: var(--color-text-secondary); }

.dashboard[data-role="member"] #panelSession #startSession {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.dashboard[data-role="member"] #panelSession #startSession:disabled { opacity: 0.55; box-shadow: none; }

/* ─── 2 · Cuaderno de la sesión ────────────────────────────── */
.dashboard[data-role="member"] #panelSession .card--logbook {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

.dashboard[data-role="member"] #panelSession .logbook__spiral-strip { display: none; }

.dashboard[data-role="member"] #panelSession .logbook__paper {
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.dashboard[data-role="member"] #panelSession .session__table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sx-neon);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.dashboard[data-role="member"] #panelSession .session__table td {
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dashboard[data-role="member"] #panelSession .logbook__body .btn {
  border-radius: 999px;
}

/* ─── 3 · Modo enfoque (entrenamiento activo) ──────────────── */
#activeWorkoutFocus {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-raised: rgba(255, 255, 255, 0.07);
  --color-bg: #0a0506;
  --fx-neon: #8A5560;
  --fx-neon-2: #ffd0da;
  --fx-glass: rgba(255, 255, 255, 0.07);
  --fx-line: rgba(255, 255, 255, 0.14);
  color: #fff;
  background:
    radial-gradient(ellipse 100% 40% at 50% -4%, color-mix(in srgb, var(--color-accent) 58%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 24%, transparent) 0%, transparent 70%),
    #0a0506;
}

#activeWorkoutFocus .focus-mode__shell { background: transparent; color: #fff; }

/* Cabecera: cristal, métricas en píldoras */
#activeWorkoutFocus .focus-metrics {
  border: 1px solid var(--fx-line);
  border-radius: 28px;
  background: color-mix(in srgb, #0a0506 55%, transparent);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#activeWorkoutFocus .focus-mode__routine { color: #fff; font-family: var(--font-heading); font-weight: 900; }

#activeWorkoutFocus .focus-mode__icon-btn,
#activeWorkoutFocus .focus-metrics__collapse {
  border: 1px solid var(--fx-line);
  border-radius: 50%;
  background: var(--fx-glass);
  color: #fff;
}

#activeWorkoutFocus .focus-metrics__cell {
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: var(--fx-glass);
}

#activeWorkoutFocus .focus-metrics__label { color: var(--color-text-muted); }

#activeWorkoutFocus .focus-metrics__value {
  color: var(--fx-neon-2);
  font-family: var(--font-heading);
  font-weight: 900;
}

#activeWorkoutFocus .focus-metrics__bar {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

#activeWorkoutFocus .focus-metrics__fill {
  background: linear-gradient(90deg, #8a2f4a, #8A5560);
  box-shadow: 0 0 12px rgba(255, 140, 165, 0.8);
}

#activeWorkoutFocus .focus-metrics__start {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1a0a0e;
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-accent) 45%, transparent);
}

#activeWorkoutFocus .focus-sync-pill {
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-glass);
  color: var(--color-text-secondary);
}

/* Ejercicios y series */
#activeWorkoutFocus .focus-mode__ex-card,
#activeWorkoutFocus .focus-mode__current {
  border: 1px solid var(--fx-line);
  border-radius: 26px;
  background: var(--fx-glass);
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#activeWorkoutFocus .focus-mode__ex-name { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#activeWorkoutFocus .focus-mode__ex-target,
#activeWorkoutFocus .focus-mode__set-meta { color: var(--color-text-secondary); }

#activeWorkoutFocus .focus-mode__ex-pill,
#activeWorkoutFocus .focus-mode__set-tab,
#activeWorkoutFocus .focus-mode__chip {
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-glass);
  color: var(--color-text-secondary);
}

#activeWorkoutFocus .focus-mode__ex-pill.is-current,
#activeWorkoutFocus .focus-mode__set-tab.is-current,
#activeWorkoutFocus .focus-mode__chip--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

#activeWorkoutFocus .focus-set-row {
  border: 1px solid var(--fx-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

#activeWorkoutFocus .focus-set-row__input {
  border: 1px solid var(--color-border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
}

#activeWorkoutFocus .focus-set-row__input:focus {
  border-color: var(--fx-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fx-neon) 25%, transparent);
  outline: none;
}

#activeWorkoutFocus .focus-set-row__check {
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
}

#activeWorkoutFocus .focus-set-row__check.is-done,
#activeWorkoutFocus .focus-set-row__check[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 0 18px color-mix(in srgb, var(--fx-neon) 60%, transparent);
}

#activeWorkoutFocus .focus-mode__complete,
#activeWorkoutFocus .focus-mode__finish {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

/* Base: descanso y salida */
#activeWorkoutFocus .focus-mode__dock {
  border-top: 0;
  background: transparent;
}

#activeWorkoutFocus .focus-mode__timer,
#activeWorkoutFocus .focus-mode__timer-toggle,
#activeWorkoutFocus .focus-mode__finish {
  border: 1px solid var(--fx-line);
  border-radius: 24px;
  background: color-mix(in srgb, #0a0506 60%, transparent);
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#activeWorkoutFocus .focus-mode__timer-toggle-time {
  color: var(--fx-neon-2);
  font-family: var(--font-heading);
  font-weight: 900;
}

#activeWorkoutFocus .focus-mode__finish {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  border-color: transparent;
}

/* Reglas heredadas de _12/_17 con !important o mayor especificidad */
#activeWorkoutFocus .focus-metrics .focus-metrics__cell {
  border: 1px solid var(--fx-line);
  border-radius: 18px;
  background: var(--fx-glass);
}

#activeWorkoutFocus .focus-metrics .focus-metrics__value { color: var(--fx-neon-2); }
#activeWorkoutFocus .focus-metrics .focus-metrics__label { color: var(--color-text-muted); }

#activeWorkoutFocus .focus-metrics__identity .focus-mode__routine,
#activeWorkoutFocus .focus-mode__routine {
  color: #fff !important;
}

#activeWorkoutFocus .focus-mode__icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
}

#activeWorkoutFocus .focus-mode__chip,
#activeWorkoutFocus .focus-mode__step {
  border-radius: 999px !important;
}

/* ── _31-drawer-v2.css ── */
/* ============================================================
   NULLUM — Menú lateral v2
   Panel de cristal con brillo de marca, tarjeta de usuario con aro
   neón, entradas en píldora con icono y animación escalonada.
   ============================================================ */

#screenDashboard.dashboard--shell .sidebar__overlay {
  background: rgba(8, 3, 5, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#screenDashboard.dashboard--shell .sidebar {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-border: rgba(255, 255, 255, 0.13);
  --dx-neon: #8A5560;
  --dx-neon-2: #ffd0da;
  border: 0;
  color: #fff;
  background:
    radial-gradient(ellipse 120% 40% at 0% 0%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 90% 40% at 100% 100%, color-mix(in srgb, var(--color-accent) 30%, transparent) 0%, transparent 70%),
    color-mix(in srgb, #0a0506 90%, transparent);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  padding-top: var(--safe-top);
}

/* ─── Cabecera ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell .sidebar__header {
  padding: 18px 18px 8px;
  border: 0;
  background: transparent;
}

#screenDashboard.dashboard--shell .sidebar__logo {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.3em;
}

#screenDashboard.dashboard--shell .sidebar__logo-accent { color: var(--dx-neon); text-shadow: 0 0 16px color-mix(in srgb, var(--dx-neon) 60%, transparent); }

#screenDashboard.dashboard--shell .sidebar__logo-mark {
  content: url("../assets/logo-blanco.png");
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--dx-neon) 60%, transparent));
}

#screenDashboard.dashboard--shell .sidebar__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#screenDashboard.dashboard--shell .sidebar .stripe {
  height: 2px;
  margin: 0 18px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--dx-neon), transparent) 0 0 / 50% 100% no-repeat;
  animation: dx-scan 4s ease-in-out infinite;
}

@keyframes dx-scan {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* ─── Tarjeta de usuario ───────────────────────────────────── */
#screenDashboard.dashboard--shell .sidebar__user {
  width: calc(100% - 28px);
  box-sizing: border-box;
  margin: 14px 14px 6px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

#screenDashboard.dashboard--shell .sidebar__user:hover,
#screenDashboard.dashboard--shell .sidebar__user--active {
  border-color: color-mix(in srgb, var(--dx-neon) 55%, transparent);
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
}

#screenDashboard.dashboard--shell .sidebar__avatar {
  box-shadow:
    0 0 0 2px #0a0506,
    0 0 0 4px color-mix(in srgb, var(--dx-neon) 65%, transparent),
    0 0 18px color-mix(in srgb, var(--dx-neon) 40%, transparent);
}

#screenDashboard.dashboard--shell .sidebar__user-name { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenDashboard.dashboard--shell .sidebar__user-tag { color: var(--dx-neon); font-weight: 800; letter-spacing: 0.12em; }

/* ─── Navegación ───────────────────────────────────────────── */
#screenDashboard.dashboard--shell .sidebar__nav { padding: 6px 12px; }

#screenDashboard.dashboard--shell .sidebar__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }

#screenDashboard.dashboard--shell .sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 6px 12px 6px 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--press-ms) ease;
}

#screenDashboard.dashboard--shell .sidebar__link:active { transform: scale(0.98); }

#screenDashboard.dashboard--shell .sidebar__link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

#screenDashboard.dashboard--shell .sidebar__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
}

#screenDashboard.dashboard--shell .sidebar__link--highlight { color: var(--dx-neon-2); }

#screenDashboard.dashboard--shell .sidebar__link--highlight .sidebar__icon {
  background: color-mix(in srgb, var(--color-accent) 45%, transparent);
  color: #fff;
}

#screenDashboard.dashboard--shell .sidebar__link--active {
  border-color: color-mix(in srgb, var(--dx-neon) 50%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 70%, transparent), color-mix(in srgb, var(--dx-neon) 22%, transparent));
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

#screenDashboard.dashboard--shell .sidebar__link--active .sidebar__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

#screenDashboard.dashboard--shell .sidebar__link-text { flex: 1; line-height: 1.2; }

#screenDashboard.dashboard--shell .sidebar__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--dx-neon);
  color: #3a0b17;
  font-weight: 900;
}

#screenDashboard.dashboard--shell .sidebar__separator {
  height: 1px;
  margin: 8px 12px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

/* ─── Pie ──────────────────────────────────────────────────── */
#screenDashboard.dashboard--shell .sidebar__footer {
  padding: 12px 14px calc(16px + var(--safe-bottom));
  border: 0;
  background: transparent;
}

#screenDashboard.dashboard--shell .sidebar__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.06em;
}

#screenDashboard.dashboard--shell .sidebar__logout .sidebar__icon { background: transparent; }

#screenDashboard.dashboard--shell .sidebar__logout:hover {
  border-color: color-mix(in srgb, #ff6b8a 55%, transparent);
  background: color-mix(in srgb, #ff6b8a 14%, transparent);
}

/* ─── Móvil: panel más ancho, esquinas redondas, entrada escalonada ─ */
@media (max-width: 1023px) {
#screenDashboard.dashboard--shell .sidebar {
  width: min(86vw, 340px);
  border-radius: 0 32px 32px 0;
}

#screenDashboard.dashboard--shell .sidebar .sidebar__list > li,
#screenDashboard.dashboard--shell .sidebar .sidebar__user,
#screenDashboard.dashboard--shell .sidebar .sidebar__footer {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 360ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li,
#screenDashboard.dashboard--shell .sidebar--open .sidebar__user,
#screenDashboard.dashboard--shell .sidebar--open .sidebar__footer {
  opacity: 1;
  transform: none;
}

#screenDashboard.dashboard--shell .sidebar--open .sidebar__user { transition-delay: 60ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(1) { transition-delay: 100ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(2) { transition-delay: 140ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(3) { transition-delay: 180ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(4) { transition-delay: 220ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(5) { transition-delay: 260ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(6) { transition-delay: 300ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(7) { transition-delay: 340ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(8) { transition-delay: 380ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__list > li:nth-child(n+9) { transition-delay: 420ms; }
#screenDashboard.dashboard--shell .sidebar--open .sidebar__footer { transition-delay: 460ms; }
}

@media (prefers-reduced-motion: reduce) {
  #screenDashboard.dashboard--shell .sidebar .sidebar__list > li,
  #screenDashboard.dashboard--shell .sidebar .sidebar__user,
  #screenDashboard.dashboard--shell .sidebar .sidebar__footer {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #screenDashboard.dashboard--shell .sidebar .stripe { animation: none; }
}

/* ── _32-notifs-v2.css ── */
/* ============================================================
   NULLUM — Centro de notificaciones v3
   Móvil: hoja inferior con asa, fondo difuminado y gesto de cerrar.
   Escritorio: tarjeta flotante bajo la campana.
   Filas con icono por tipo, agrupadas por Hoy / Ayer / Esta semana.
   ============================================================ */

#screenDashboard.dashboard--shell .notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12040;
  background: rgba(5, 2, 3, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: nf-fade 220ms ease both;
}

#screenDashboard.dashboard--shell .notif-backdrop[hidden] { display: none; }

html.notif-open { overscroll-behavior: none; }

#screenDashboard.dashboard--shell .notif-panel {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.76);
  --color-text-muted: rgba(255, 255, 255, 0.5);
  --nf-neon: #8A5560;
  --nf-neon-2: #ffd0da;
  position: fixed;
  z-index: 12050;
  inset: auto 0 0 0;
  width: auto;
  max-height: min(84dvh, 42rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, color-mix(in srgb, var(--color-accent) 42%, transparent) 0%, transparent 75%),
    color-mix(in srgb, #0a0506 97%, transparent);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: nf-sheet 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#screenDashboard.dashboard--shell .notif-panel[hidden] { display: none !important; }

@keyframes nf-sheet { from { transform: translateY(100%); } }
@keyframes nf-fade { from { opacity: 0; } }
@keyframes nf-row { from { opacity: 0; transform: translateY(8px); } }

/* Asa */
#screenDashboard.dashboard--shell .notif-panel__grab {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  touch-action: none;
}

#screenDashboard.dashboard--shell .notif-panel__grab span {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

/* Cabecera */
#screenDashboard.dashboard--shell .notif-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#screenDashboard.dashboard--shell .notif-panel__heading { flex: 1; min-width: 0; }

#screenDashboard.dashboard--shell .notif-panel__title {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-transform: none;
}

#screenDashboard.dashboard--shell .notif-panel__sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

#screenDashboard.dashboard--shell .notif-panel__sub.is-unread { color: var(--nf-neon); }

#screenDashboard.dashboard--shell .notif-panel__mark-all {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--nf-neon-2);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}

#screenDashboard.dashboard--shell .notif-panel__mark-all:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-accent) 40%, transparent);
  color: #fff;
}

#screenDashboard.dashboard--shell .notif-panel__mark-all:disabled { opacity: 0.35; }

#screenDashboard.dashboard--shell .notif-panel__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 150ms ease, transform 120ms ease;
}

#screenDashboard.dashboard--shell .notif-panel__close:hover { background: rgba(255, 255, 255, 0.16); }
#screenDashboard.dashboard--shell .notif-panel__close:active { transform: scale(0.9); }

/* Lista */
#screenDashboard.dashboard--shell .notif-panel__list {
  list-style: none;
  margin: 0;
  padding: 4px 10px 14px;
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#screenDashboard.dashboard--shell .notif-group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px 6px;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #0a0506 60%, transparent);
}

#screenDashboard.dashboard--shell .notif-panel__list > li:not(.notif-group) { margin-bottom: 6px; }

#screenDashboard.dashboard--shell .notif-item {
  --nf-hue: var(--nf-neon);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px 12px 12px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  animation: nf-row 380ms cubic-bezier(0.16, 1, 0.3, 1) var(--nf-delay, 0ms) both;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}

#screenDashboard.dashboard--shell .notif-item[data-type="chat_message"] { --nf-hue: #7cc4ff; }
#screenDashboard.dashboard--shell .notif-item[data-type="session_completed"] { --nf-hue: #7ee2a8; }
#screenDashboard.dashboard--shell .notif-item[data-type="weekly_checkin"] { --nf-hue: #ffc46b; }
#screenDashboard.dashboard--shell .notif-item[data-type="spot_request"] { --nf-hue: #c9a2ff; }
#screenDashboard.dashboard--shell .notif-item[data-type="review"] { --nf-hue: #ffd76b; }

#screenDashboard.dashboard--shell .notif-item:hover,
#screenDashboard.dashboard--shell .notif-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  outline: none;
}

#screenDashboard.dashboard--shell .notif-item:active { transform: scale(0.985); }

#screenDashboard.dashboard--shell .notif-item--unread {
  border-color: color-mix(in srgb, var(--nf-hue) 30%, transparent);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--nf-hue) 14%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.05);
}

#screenDashboard.dashboard--shell .notif-item__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--nf-hue);
  background: color-mix(in srgb, var(--nf-hue) 14%, rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nf-hue) 28%, transparent);
}

#screenDashboard.dashboard--shell .notif-item:not(.notif-item--unread) .notif-item__ico {
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

#screenDashboard.dashboard--shell .notif-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#screenDashboard.dashboard--shell .notif-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

#screenDashboard.dashboard--shell .notif-item__eyebrow {
  margin: 0;
  color: var(--nf-hue);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#screenDashboard.dashboard--shell .notif-item:not(.notif-item--unread) .notif-item__eyebrow { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell .notif-item__time {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

#screenDashboard.dashboard--shell .notif-item__title {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

#screenDashboard.dashboard--shell .notif-item:not(.notif-item--unread) .notif-item__title {
  color: var(--color-text-secondary);
  font-weight: 700;
}

#screenDashboard.dashboard--shell .notif-item__body {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#screenDashboard.dashboard--shell .notif-item__dot {
  align-self: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--nf-hue);
  box-shadow: 0 0 12px var(--nf-hue);
}

/* Vacío */
#screenDashboard.dashboard--shell .notif-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 36px 28px 44px;
  text-align: center;
}

#screenDashboard.dashboard--shell .notif-panel__empty[hidden] { display: none; }

#screenDashboard.dashboard--shell .notif-panel__empty-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: var(--nf-neon);
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--color-accent) 35%, transparent);
}

#screenDashboard.dashboard--shell .notif-panel__empty-title {
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
}

#screenDashboard.dashboard--shell .notif-panel__empty-text {
  margin: 0;
  max-width: 17rem;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* Escritorio: tarjeta flotante bajo la campana */
@media (min-width: 641px) {
  #screenDashboard.dashboard--shell .notif-backdrop {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #screenDashboard.dashboard--shell .notif-panel {
    inset: 72px 20px auto auto;
    width: 24rem;
    max-height: min(74vh, 34rem);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    padding-bottom: 0;
    transform-origin: calc(100% - 28px) 0;
    animation: nf-pop 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  #screenDashboard.dashboard--shell .notif-panel__grab { display: none; }
  #screenDashboard.dashboard--shell .notif-panel__header { padding-top: 16px; }
}

@keyframes nf-pop { from { opacity: 0; transform: translateY(-10px) scale(0.95); } }

@media (prefers-reduced-motion: reduce) {
  #screenDashboard.dashboard--shell .notif-panel,
  #screenDashboard.dashboard--shell .notif-backdrop,
  #screenDashboard.dashboard--shell .notif-item { animation: none; }
}

/* ── _33-messaging-v2.css ── */
/* ============================================================
   NULLUM — Mensajería v2
   Chat de cristal oscuro: lista de conversaciones con aro neón,
   burbujas con degradado de marca, compositor en píldora flotante.
   Solo cambia el aspecto; el layout lo sigue controlando _09.
   ============================================================ */

/* ─── Escenario ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelMessaging .panel__body--messaging {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-surface-raised: rgba(255, 255, 255, 0.07);
  --color-bg: #0a0506;
  --mx-neon: #8A5560;
  --mx-neon-2: #ffd0da;
  border-radius: 32px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 34% at 50% -6%, color-mix(in srgb, var(--color-accent) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 100% 100%, color-mix(in srgb, var(--color-accent) 28%, transparent) 0%, transparent 70%),
    #0a0506;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

#screenDashboard.dashboard--shell #panelMessaging .chat,
#screenDashboard.dashboard--shell #panelMessaging .chat__sidebar,
#screenDashboard.dashboard--shell #panelMessaging .chat__main {
  border-color: var(--color-border);
  background: transparent;
  color: #fff;
}

/* ─── Lista de conversaciones ──────────────────────────────── */
#screenDashboard.dashboard--shell #panelMessaging .chat__sidebar-title {
  color: var(--mx-neon);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__thread {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--press-ms) ease;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__thread:active { transform: scale(0.985); }

#screenDashboard.dashboard--shell #panelMessaging .chat__thread--active {
  border-color: color-mix(in srgb, var(--mx-neon) 55%, transparent);
  background: color-mix(in srgb, var(--color-accent) 28%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--mx-neon) 18%, transparent);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__thread-name { color: #fff; font-family: var(--font-heading); font-weight: 800; }
#screenDashboard.dashboard--shell #panelMessaging .chat__thread-preview { color: var(--color-text-secondary); }
#screenDashboard.dashboard--shell #panelMessaging .chat__thread-time { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelMessaging .chat__unread {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--mx-neon);
  color: #3a0b17;
  font-weight: 900;
  box-shadow: 0 0 14px color-mix(in srgb, var(--mx-neon) 60%, transparent);
}

/* Empty state: dark glass overrides to muted-white; light-mode fallback uses full-contrast text */
#panelMessaging .chat__empty,
#panelMessaging .chat__placeholder {
  color: var(--color-text-secondary);
}

@media (prefers-color-scheme: dark) {
  #panelMessaging .chat__empty,
  #panelMessaging .chat__placeholder { color: rgba(255, 255, 255, 0.65); }
}
:root[data-theme="dark"] #panelMessaging .chat__empty,
:root[data-theme="dark"] #panelMessaging .chat__placeholder { color: rgba(255, 255, 255, 0.65); }

#screenDashboard.dashboard--shell #panelMessaging .chat__empty,
#screenDashboard.dashboard--shell #panelMessaging .chat__placeholder {
  color: var(--color-text-secondary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.25rem 1rem;
}
#screenDashboard.dashboard--shell #panelMessaging .chat__placeholder-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-muted);
  max-width: 22rem;
}

/* ─── Cabecera de la conversación ──────────────────────────── */
#screenDashboard.dashboard--shell #panelMessaging .chat__header {
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, #0a0506 55%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__peer-name { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenDashboard.dashboard--shell #panelMessaging .chat__peer-status { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelMessaging .chat__back,
#screenDashboard.dashboard--shell #panelMessaging .chat__search-btn,
#screenDashboard.dashboard--shell #panelMessaging .chat__broadcast-btn,
#screenDashboard.dashboard--shell #panelMessaging .chat__push-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__push-btn--active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  box-shadow: 0 0 16px color-mix(in srgb, var(--color-accent) 60%, transparent);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__search-bar,
#screenDashboard.dashboard--shell #panelMessaging .chat__pinned-bar {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ─── Burbujas ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelMessaging .chat__bubble {
  max-width: 82%;
  padding: 10px 14px;
  border: 1px solid transparent;
  box-shadow: none;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__bubble--mine {
  border-radius: 22px 22px 6px 22px;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__bubble--theirs {
  border-color: var(--color-border);
  border-radius: 22px 22px 22px 6px;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__bubble-text { color: inherit; }
#screenDashboard.dashboard--shell #panelMessaging .chat__bubble-time { color: rgba(255, 255, 255, 0.6); }
#screenDashboard.dashboard--shell #panelMessaging .chat__checks--read { color: var(--mx-neon-2); }

#screenDashboard.dashboard--shell #panelMessaging .chat__day,
#screenDashboard.dashboard--shell #panelMessaging .chat__unread-sep {
  padding: 4px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__reaction {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__reaction--mine {
  border-color: var(--mx-neon);
  background: color-mix(in srgb, var(--color-accent) 40%, transparent);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__typing-wrap { color: var(--color-text-secondary); }
#screenDashboard.dashboard--shell #panelMessaging .chat__typing-dot { background: var(--mx-neon); }

/* ─── Compositor ───────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelMessaging .chat__composer {
  border: 0;
  background: transparent;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__composer-bar {
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, #0a0506 70%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__input {
  border: 0;
  background: transparent;
  color: #fff;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__input::placeholder { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelMessaging .chat__attach,
#screenDashboard.dashboard--shell #panelMessaging .chat__template-trigger,
#screenDashboard.dashboard--shell #panelMessaging .chat__schedule-trigger {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelMessaging .chat__send,
#screenDashboard.dashboard--shell #panelMessaging .chat__mic {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 0 20px color-mix(in srgb, var(--mx-neon) 55%, transparent);
}

#screenDashboard.dashboard--shell #panelMessaging .chat__send:disabled { opacity: 0.45; box-shadow: none; }

#screenDashboard.dashboard--shell #panelMessaging .chat__reply-preview,
#screenDashboard.dashboard--shell #panelMessaging .chat__edit-bar {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
}

/* ─── Ventanas auxiliares (plantillas, programar, difusión) ─ */
.chat__template-picker,
.chat__schedule-modal-inner,
.chat__broadcast-inner {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: #130a0c;
  color: #fff;
}

.chat__template-item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ── _34-calendar-week-about-v2.css ── */
/* ============================================================
   NULLUM — Calendario, Distribución semanal y Sobre mí v2
   Mismo lenguaje que el resto: escenario oscuro con rejilla, cristal,
   neón rosa y degradados de marca. Solo aspecto; el layout lo mantiene
   _05 / _13.
   ============================================================ */

/* ─── Variables compartidas (escenario oscuro) ─────────────── */
#screenDashboard.dashboard--shell #panelCalendar .panel__body--calendar,
#screenDashboard.dashboard--shell #panelTrainingDesigner .panel__body,
#screenDashboard.dashboard--shell #panelAbout .panel__body {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.52);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --cw-neon: #8A5560;
  --cw-neon-2: #ffd0da;
  --cw-done: #5fd6a0;
  --cw-plan: #7ab8ff;
  --cw-miss: #ffb35c;
}

/* ─── Calendario ───────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelCalendar .calendar-shell,
#screenDashboard.dashboard--shell #panelCalendar .cal-day-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, color-mix(in srgb, var(--color-accent) 45%, transparent) 0%, transparent 70%),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

#screenDashboard.dashboard--shell #panelCalendar .calendar-legend {
  gap: 6px 8px;
}

#screenDashboard.dashboard--shell #panelCalendar .calendar-legend > * {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-size: 0.66rem;
  font-weight: 700;
}

#screenDashboard.dashboard--shell #panelCalendar #calPrev,
#screenDashboard.dashboard--shell #panelCalendar #calNext {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transition: background var(--transition-fast), transform var(--press-ms) ease;
}

#screenDashboard.dashboard--shell #panelCalendar #calPrev:active,
#screenDashboard.dashboard--shell #panelCalendar #calNext:active { transform: scale(0.92); }

#screenDashboard.dashboard--shell #panelCalendar #calMonthYear {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: 0.1em;
}

#screenDashboard.dashboard--shell #panelCalendar #calMonthToggle {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cw-neon-2);
  font-weight: 800;
}

/* Celdas del mes y de la tira semanal */
#screenDashboard.dashboard--shell #panelCalendar .calendar__cell,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  transition: transform var(--press-ms) ease, border-color var(--transition-fast), background var(--transition-fast);
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell:active,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day:active { transform: scale(0.94); }

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--empty {
  border-color: transparent;
  background: transparent;
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__day-label {
  color: var(--color-text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--done,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--done {
  border-color: color-mix(in srgb, var(--cw-done) 38%, transparent);
  background: color-mix(in srgb, var(--cw-done) 14%, rgba(255, 255, 255, 0.03));
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--planned,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--planned {
  border-color: color-mix(in srgb, var(--cw-plan) 34%, transparent);
  background: color-mix(in srgb, var(--cw-plan) 12%, rgba(255, 255, 255, 0.03));
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--missed,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--missed {
  border-color: color-mix(in srgb, var(--cw-miss) 38%, transparent);
  background: color-mix(in srgb, var(--cw-miss) 13%, rgba(255, 255, 255, 0.03));
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--today,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--today {
  border-color: var(--cw-neon);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cw-neon) 45%, transparent), 0 0 20px color-mix(in srgb, var(--cw-neon) 30%, transparent);
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--selected,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--selected {
  border-color: transparent;
  background: linear-gradient(145deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 45%, #8A5560));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--color-accent) 55%, transparent);
}

#screenDashboard.dashboard--shell #panelCalendar .calendar__cell--selected *,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__day--selected * { color: #fff; }

#screenDashboard.dashboard--shell #panelCalendar .calendar__day-number,
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__num { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenDashboard.dashboard--shell #panelCalendar .calendar-week__dow { color: var(--color-text-muted); font-weight: 800; }

#screenDashboard.dashboard--shell #panelCalendar .calendar-dot--done { background: var(--cw-done); box-shadow: 0 0 8px var(--cw-done); }
#screenDashboard.dashboard--shell #panelCalendar .calendar-dot--planned { background: var(--cw-plan); box-shadow: 0 0 8px var(--cw-plan); }
#screenDashboard.dashboard--shell #panelCalendar .calendar-dot--missed { background: var(--cw-miss); box-shadow: 0 0 8px var(--cw-miss); }
#screenDashboard.dashboard--shell #panelCalendar .calendar-dot--note { background: var(--cw-neon); box-shadow: 0 0 8px var(--cw-neon); }

/* Tarjeta del día */
#screenDashboard.dashboard--shell #panelCalendar .cal-day-card__eyebrow { color: var(--cw-neon); letter-spacing: 0.09em; font-weight: 800; }
#screenDashboard.dashboard--shell #panelCalendar .cal-day-card .card__title { color: #fff; }

#screenDashboard.dashboard--shell #panelCalendar .cal-day-card__badge {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
}

#screenDashboard.dashboard--shell #panelCalendar .cal-day-card__badge--planned { border-color: color-mix(in srgb, var(--cw-plan) 55%, transparent); color: var(--cw-plan); }
#screenDashboard.dashboard--shell #panelCalendar .cal-day-card__badge--done { border-color: color-mix(in srgb, var(--cw-done) 55%, transparent); color: var(--cw-done); }
#screenDashboard.dashboard--shell #panelCalendar .cal-day-card__badge--missed { border-color: color-mix(in srgb, var(--cw-miss) 55%, transparent); color: var(--cw-miss); }

#screenDashboard.dashboard--shell #panelCalendar .cal-day-summary,
#screenDashboard.dashboard--shell #panelCalendar .cal-trainer-note {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelCalendar .cal-day-summary__title { color: #fff; font-family: var(--font-heading); font-weight: 800; }
#screenDashboard.dashboard--shell #panelCalendar .cal-day-summary__meta,
#screenDashboard.dashboard--shell #panelCalendar .cal-trainer-note__text { color: var(--color-text-secondary); }
#screenDashboard.dashboard--shell #panelCalendar .cal-trainer-note__label { color: var(--cw-neon); letter-spacing: 0.14em; font-weight: 800; }

#screenDashboard.dashboard--shell #panelCalendar .cal-note-input {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelCalendar .cal-note-input::placeholder { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelCalendar #calNoteSave {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  font-weight: 900;
  box-shadow: 0 0 22px color-mix(in srgb, var(--cw-neon) 45%, transparent);
}

#screenDashboard.dashboard--shell #panelCalendar .cal-fab {
  border: 0;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--cw-neon) 50%, transparent);
}

/* ─── Distribución semanal ─────────────────────────────────── */
#screenDashboard.dashboard--shell #panelTrainingDesigner .panel__body {
  border-radius: 32px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 90% 30% at 50% -6%, color-mix(in srgb, var(--color-accent) 55%, transparent) 0%, transparent 72%);
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .card__title { color: #fff; }

#screenDashboard.dashboard--shell #panelTrainingDesigner .tag {
  border: 1px solid color-mix(in srgb, var(--cw-neon) 50%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 35%, transparent);
  color: var(--cw-neon-2);
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-readonly-banner {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-readonly-banner__eyebrow { color: var(--cw-neon); }
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-readonly-banner__text { color: var(--color-text-secondary); }

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__header {
  background: color-mix(in srgb, var(--color-accent) 24%, transparent);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__volume {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cw-neon-2);
  font-weight: 800;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__body { background: transparent; color: #fff; }

#screenDashboard.dashboard--shell #panelTrainingDesigner .voice-note-editor,
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__coach-note {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .voice-note-editor__label,
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__coach-note-label,
#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-labels__text { color: var(--cw-neon); letter-spacing: 0.14em; font-weight: 800; }

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__name-display,
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__coach-note-display { color: #fff; }

#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-row {
  margin: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-row__name { color: #fff; font-weight: 800; }
#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-row__sets-display { color: var(--cw-neon-2); font-weight: 800; }
#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-row__block-display,
#screenDashboard.dashboard--shell #panelTrainingDesigner .exercise-row__tech-hint { color: var(--color-text-muted); }

#screenDashboard.dashboard--shell #panelTrainingDesigner .form__select,
#screenDashboard.dashboard--shell #panelTrainingDesigner .form__input {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-changelog {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

#screenDashboard.dashboard--shell #panelTrainingDesigner .split-empty__eyebrow { color: var(--cw-neon); }
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-empty__title { color: #fff; }
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-empty__text { color: var(--color-text-secondary); }

/* ─── Sobre mí ─────────────────────────────────────────────── */
#screenDashboard.dashboard--shell #panelAbout .about__ring {
  border-color: var(--cw-neon);
  box-shadow:
    0 0 0 4px #0a0506,
    0 0 0 6px color-mix(in srgb, var(--cw-neon) 60%, transparent),
    0 0 40px color-mix(in srgb, var(--cw-neon) 45%, transparent);
  animation: cw-ring 5s ease-in-out infinite;
}

@keyframes cw-ring {
  50% { box-shadow: 0 0 0 4px #0a0506, 0 0 0 6px var(--cw-neon), 0 0 56px color-mix(in srgb, var(--cw-neon) 65%, transparent); }
}

#screenDashboard.dashboard--shell #panelAbout .about__copy {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#screenDashboard.dashboard--shell #panelAbout .about__eyebrow { color: var(--cw-neon); letter-spacing: 0.09em; font-weight: 800; }
#screenDashboard.dashboard--shell #panelAbout .about__name { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenDashboard.dashboard--shell #panelAbout .about__text { color: var(--color-text-secondary); }

#screenDashboard.dashboard--shell #panelAbout .about__cred-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelAbout .about__cred-icon {
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-accent) 50%, transparent);
  color: #fff;
}

#screenDashboard.dashboard--shell #panelAbout .about__cred-text { color: var(--color-text-secondary); }

#screenDashboard.dashboard--shell #panelAbout .about__contact-link {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 800;
}

#screenDashboard.dashboard--shell #panelAbout .about__contact-link:hover {
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
}

@media (prefers-reduced-motion: reduce) {
  #screenDashboard.dashboard--shell #panelAbout .about__ring { animation: none; }
}

/* ─── Custom Select (Training Designer) ─────────────────────── */
.null-csel {
  position: relative;
  width: 100%;
}

.null-csel__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--control-min-height, 48px);
  padding: var(--control-pad-y, 12px) var(--control-pad-x, 16px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #fff;
  font-family: var(--control-font, inherit);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
  gap: 8px;
}

.null-csel__btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
}

.null-csel__btn:focus-visible {
  border-color: var(--color-primary, #ff7a93);
  box-shadow: 0 0 0 3px rgba(255, 122, 147, 0.25);
}

.null-csel__btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.null-csel__label {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.null-csel__chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  opacity: 0.7;
}

.null-csel--open .null-csel__chevron {
  transform: rotate(180deg);
}

.null-csel__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 999;
  background: #1a0a0e;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.null-csel__list[hidden] { display: none; }

.null-csel__group-label {
  padding: 6px 10px 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.null-csel__option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  outline: none;
}

.null-csel__option:hover,
.null-csel__option:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.null-csel__option[aria-selected="true"] {
  background: rgba(255, 122, 147, 0.18);
  color: #ff7a93;
}

.null-csel__option[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── _35-landing-v2.css ── */
/* ============================================================
   NULLUM — Landing pública + acceso v2
   Escenario oscuro con aurora burdeos, cristal, neón rosa y píldoras,
   el mismo lenguaje que la app interior. Solo aspecto (excepto el
   bloque .nlm-hero__preview): el layout lo siguen controlando _14/_18.
   Todo va bajo #screenAuth para no tocar el dashboard.
   ============================================================ */

/* ─── Escenario y tokens ───────────────────────────────────── */
#screenAuth.app--auth {
  --auth-bg: #0a0506;
  --auth-bg-deep: #070304;
  --auth-surface: rgba(255, 255, 255, 0.06);
  --auth-surface-inset: rgba(255, 255, 255, 0.05);
  --auth-border: rgba(255, 255, 255, 0.13);
  --auth-border-strong: rgba(255, 255, 255, 0.22);
  --auth-text: #fff;
  --auth-text-secondary: rgba(255, 255, 255, 0.76);
  --auth-text-muted: rgba(255, 255, 255, 0.54);
  --auth-wine: var(--color-accent);
  --auth-wine-soft: color-mix(in srgb, var(--color-accent) 30%, transparent);
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.76);
  --color-text-muted: rgba(255, 255, 255, 0.54);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-bg: #0a0506;
  --color-bg-deep: #070304;
  /* Acento marca Guía — sin rosa neón */
  --lx-neon: #5C2430;
  --lx-neon-2: #8A5560;
  position: relative;
  isolation: isolate;
  color: #fff;
  background-color: #0a0506;
  background-image:
    radial-gradient(ellipse 120% 40% at 50% 0%, color-mix(in srgb, var(--color-accent) 55%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 80% 30% at 100% 45%, color-mix(in srgb, var(--color-accent) 30%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 80% 30% at 0% 80%, color-mix(in srgb, var(--color-accent) 26%, transparent) 0%, transparent 70%),
    #0a0506;
  overflow-x: hidden;
}

#screenAuth::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 85%);
}

/* Aurora que respira detrás de todo */
#screenAuth .nlm-hero::before,
#screenAuth .nlm-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

#screenAuth .nlm-hero::before {
  top: -14%;
  left: -30%;
  width: 90%;
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 85%, transparent), transparent 68%);
  animation: lx-drift-a 14s ease-in-out infinite alternate;
}

#screenAuth .nlm-hero::after {
  right: -34%;
  bottom: 6%;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, #ff7a93 55%, transparent), transparent 68%);
  animation: lx-drift-b 17s ease-in-out infinite alternate;
}

@keyframes lx-drift-a { to { transform: translate(28%, 22%) scale(1.15); } }
@keyframes lx-drift-b { to { transform: translate(-26%, -18%) scale(1.2); } }

/* ─── Hero ─────────────────────────────────────────────────── */
#screenAuth .nlm-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  color: #fff;
}

#screenAuth .nlm-grain { opacity: 0.18; mix-blend-mode: overlay; }
#screenAuth .nlm-orb { opacity: 0.25; }
#screenAuth .nlm-corner-tick { border-color: rgba(255, 255, 255, 0.28); }
#screenAuth .nlm-dotgrid { opacity: 0.55; filter: invert(1); }

#screenAuth .nlm-hero__logo-wm img {
  content: url("../assets/logo-blanco.png");
  opacity: 0.1;
  filter: drop-shadow(0 0 40px color-mix(in srgb, var(--lx-neon) 40%, transparent));
}

#screenAuth .nlm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: color-mix(in srgb, #0a0506 55%, transparent);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

#screenAuth .nlm-nav__logo { color: #fff; margin-inline-end: auto; }
#screenAuth .nlm-nav__logo-mark { content: url("../assets/logo-blanco.png"); }
#screenAuth .nlm-nav__logo-accent { color: var(--lx-neon); text-shadow: 0 0 14px color-mix(in srgb, var(--lx-neon) 60%, transparent); }

#screenAuth .nlm-nav__cta {
  flex: 0 0 auto;
  margin-inline-start: 0.5rem;
  padding-inline: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
}

/* Wordmark: no desbordar viewport (antes width calc(100%+20px) generaba overflow). */
#screenAuth .nlm-hero__wordmark {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  overflow: hidden;
}

#screenAuth .nlm-hero__tagline {
  color: var(--lx-neon-2);
  letter-spacing: 0.22em;
}

/* Wordmark: blanco → rosa neón */
#screenAuth .nlm-hero__wordmark .nlm-char {
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}

#screenAuth .nlm-hero__wordmark .nlm-char--accent {
  background: linear-gradient(135deg, #8A5560, #ffd0da);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--lx-neon) 55%, transparent));
}

#screenAuth .nlm-hero__proof { color: var(--color-text-secondary); }
#screenAuth .nlm-proof-dot { background: var(--lx-neon); box-shadow: 0 0 12px var(--lx-neon); animation: lx-ping 2s ease-in-out infinite; }

@keyframes lx-ping { 50% { transform: scale(1.5); opacity: 0.6; } }

/* CTA principal: píldora blanca con halo */
#screenAuth .nlm-btn-primary {
  border: 0;
  border-radius: 999px;
  background: #5C2430;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(92, 36, 48, 0.35);
  overflow: hidden;
}

#screenAuth .nlm-btn-primary::after {
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.8) 50%, transparent 70%);
}

#screenAuth .nlm-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#screenAuth .nlm-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─── Método (3 pasos) ─────────────────────────────────────── */
#screenAuth .nlm-how { background: transparent; color: #fff; }
#screenAuth .nlm-how__eyebrow,
#screenAuth .auth-land__eyebrow,
#screenAuth .nlm-tiers__eyebrow { color: var(--lx-neon); letter-spacing: 0.2em; font-weight: 800; }
#screenAuth .nlm-how__title,
#screenAuth .nlm-land-intro__title,
#screenAuth .nlm-includes-section__title,
#screenAuth .nlm-tiers__title,
#screenAuth .nlm-faq-block__title,
#screenAuth .auth-land__title { color: #fff; }

#screenAuth .nlm-how__card,
#screenAuth .nlm-stat,
#screenAuth .nlm-include-card,
#screenAuth .nlm-commit-block__inner,
#screenAuth .nlm-faq-item,
#screenAuth .auth-spot__card,
#screenAuth .nlm-fit-col,
#screenAuth .nlm-vs-col {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

#screenAuth .nlm-how__card-title,
#screenAuth .nlm-include-card__label,
#screenAuth .nlm-commit-block__title,
#screenAuth .nlm-faq-item__q { color: #fff; font-family: var(--font-heading); font-weight: 800; }

#screenAuth .nlm-how__card-desc,
#screenAuth .nlm-include-card__desc,
#screenAuth .nlm-commit-block__copy,
#screenAuth .nlm-faq-item__a,
#screenAuth .nlm-land-intro__sub,
#screenAuth .auth-land__copy,
#screenAuth .nlm-how__cta-note,
#screenAuth .nlm-process-step__text { color: var(--color-text-secondary); }

#screenAuth .nlm-how__card-header { color: var(--lx-neon); }
#screenAuth .nlm-how__conn-line { background: linear-gradient(to bottom, transparent, var(--lx-neon), transparent); }
#screenAuth .nlm-how__conn-arrow { color: var(--lx-neon); }

#screenAuth .nlm-include-card__icon {
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-accent) 50%, transparent);
  color: #fff;
  box-shadow: 0 0 18px color-mix(in srgb, var(--lx-neon) 30%, transparent);
}

/* ─── Intro, cifras y coach ────────────────────────────────── */
#screenAuth .nlm-stat__val {
  background: linear-gradient(135deg, #fff, var(--lx-neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-heading);
  font-weight: 900;
}

#screenAuth .nlm-stat__lbl { color: var(--color-text-muted); }

#screenAuth .nlm-coach-section__card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: 2rem 1.35rem 1.75rem;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, color-mix(in srgb, var(--color-accent) 40%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.05);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#screenAuth .nlm-coach-section__fig img {
  border-radius: 50%;
  box-shadow:
    0 0 0 3px #0a0506,
    0 0 0 5px color-mix(in srgb, var(--lx-neon) 65%, transparent),
    0 0 40px color-mix(in srgb, var(--lx-neon) 40%, transparent);
}

#screenAuth .nlm-coach-section__name { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenAuth .nlm-coach-section__role { color: var(--lx-neon); letter-spacing: 0.14em; font-weight: 800; }
#screenAuth .nlm-coach-section__story { color: var(--color-text-secondary); border-color: var(--lx-neon); }
#screenAuth .nlm-coach-section__creds { color: var(--color-text-secondary); }

#screenAuth .nlm-coach-section__links a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 800;
}

/* ─── Pestañas Para quién / vs apps ────────────────────────── */
#screenAuth .nlm-tabs__rail {
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

#screenAuth .nlm-tabs__btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-secondary);
  font-weight: 800;
}

#screenAuth .nlm-tabs__btn.is-active {
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 50%, #8A5560));
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--color-accent) 50%, transparent);
}

#screenAuth .nlm-fit-col--yes { border-color: color-mix(in srgb, #5fd6a0 40%, transparent); }
#screenAuth .nlm-fit-col--no { border-color: color-mix(in srgb, #ff6b8a 38%, transparent); }
#screenAuth .nlm-vs-col--us { border-color: color-mix(in srgb, var(--lx-neon) 55%, transparent); box-shadow: 0 0 34px color-mix(in srgb, var(--lx-neon) 22%, transparent); }

/* ─── Planes ───────────────────────────────────────────────── */
#screenAuth .nlm-tier {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

#screenAuth .nlm-tier--featured {
  padding-top: 3.4rem;
  border-color: color-mix(in srgb, var(--lx-neon) 60%, transparent);
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, color-mix(in srgb, var(--color-accent) 60%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 46px color-mix(in srgb, var(--lx-neon) 25%, transparent), 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* Dentro de la tarjeta: con top negativo un ancestro lo recortaba */
#screenAuth .nlm-tier__badge {
  top: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  font-weight: 900;
}

#screenAuth .nlm-tier__name { color: var(--lx-neon); letter-spacing: 0.16em; font-weight: 800; }
#screenAuth .nlm-tier__price { color: #fff; font-family: var(--font-heading); font-weight: 900; }
#screenAuth .nlm-tier__tagline,
#screenAuth .nlm-tier__list { color: var(--color-text-secondary); }
#screenAuth .nlm-tier__divider { border-color: rgba(255, 255, 255, 0.12); }
#screenAuth .nlm-tier__scarcity { color: var(--lx-neon-2); }

#screenAuth .nlm-tier__cta.btn--primary,
#screenAuth .btn--auth-cta.btn--primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, var(--lx-neon-2));
  color: #3a0b17;
  font-weight: 900;
  box-shadow: 0 0 26px color-mix(in srgb, var(--lx-neon) 40%, transparent);
}

#screenAuth .nlm-tier__cta.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
}

/* ─── FAQ ──────────────────────────────────────────────────── */
#screenAuth .nlm-faq-item { border-radius: 22px; margin-bottom: 10px; }
#screenAuth .nlm-faq-item[open] { border-color: color-mix(in srgb, var(--lx-neon) 45%, transparent); background: color-mix(in srgb, var(--color-accent) 20%, transparent); }

/* ─── Solicitud de plaza, WhatsApp y pie ───────────────────── */
#screenAuth .nlm-process-step__num {
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-accent) 55%, transparent);
  color: #fff;
}

#screenAuth .nlm-wa-cta {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#screenAuth .app__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 3, 4, 0.8);
}

#screenAuth .app__footer-link { color: var(--color-text-secondary); }

/* ─── Campos de formulario (login, registro, solicitud) ────── */
#screenAuth .form__input,
#screenAuth .form__select,
#screenAuth .form__input--area,
#screenAuth .auth-login-credentials input {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#screenAuth .form__input:focus,
#screenAuth .form__select:focus {
  border-color: var(--lx-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-neon) 25%, transparent);
  outline: none;
}

#screenAuth .form__label,
#screenAuth .form__hint { color: var(--color-text-muted); }
/* Non-float inputs only — float labels own the empty-state text. */
#screenAuth .form__input:not(.form__input--float)::placeholder { color: var(--color-text-muted); }

/* ─── Modal de acceso (hoja inferior) ──────────────────────── */
#screenAuth .auth-login-modal__backdrop {
  background: rgba(8, 3, 5, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#screenAuth .auth-login-modal__dialog {
  --color-text-primary: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px 34px 0 0;
  color: #fff;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 70%),
    #0d0709;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#screenAuth .auth-login-modal__handle { background: rgba(255, 255, 255, 0.3); }
#screenAuth .auth-login-modal__wordmark { color: #fff; font-family: var(--font-heading); font-weight: 900; letter-spacing: 0.26em; }
#screenAuth .auth-login-modal__logo-mark { content: url("../assets/logo-blanco.png"); }
#screenAuth .auth-login-modal__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

#screenAuth .auth-login-modal__close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#screenAuth .auth-gate__btn {
  width: 100%;
  min-height: 64px;
  justify-content: space-between;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--press-ms) ease;
}

#screenAuth .auth-gate__btn:hover,
#screenAuth .auth-gate__btn:focus-visible {
  border-color: color-mix(in srgb, var(--lx-neon) 55%, transparent);
  background: color-mix(in srgb, var(--color-accent) 28%, transparent);
}

#screenAuth .auth-gate__btn:active { transform: scale(0.985); }
#screenAuth .auth-gate__label { color: #fff; font-family: var(--font-heading); font-weight: 800; }
#screenAuth .auth-gate__desc { color: var(--color-text-secondary); }
#screenAuth .auth-gate__arrow { color: var(--lx-neon); }

#screenAuth .auth__tabs { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
#screenAuth .auth__tab { color: var(--color-text-muted); }
#screenAuth .auth__tab--active { color: #fff; border-color: var(--lx-neon); }

#screenAuth .auth-support-hint,
#screenAuth .auth-invite-cta,
#screenAuth .auth-gate__no-invite { color: var(--color-text-secondary); }

#screenAuth .auth-support-hint__link,
#screenAuth .auth-invite-cta__link,
#screenAuth .auth-gate__spot-link { color: var(--lx-neon-2); }

#screenAuth .auth-otp-details,
#screenAuth .auth-demo,
#screenAuth .reg-summary,
#screenAuth .reg-plan-selector__grid > * {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ─── Estudio de encaje (4 pasos) ──────────────────────────── */
#screenAuth .wa-qualify-modal__backdrop {
  background: rgba(8, 3, 5, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#screenAuth .wa-qualify-modal__dialog {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%, color-mix(in srgb, var(--color-accent) 50%, transparent), transparent 70%),
    #0d0709;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

#screenAuth .wa-qualify-modal__eyebrow { color: var(--lx-neon); letter-spacing: 0.16em; }
#screenAuth .wa-qualify-modal__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

#screenAuth .wa-qualify-modal__close {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  #screenAuth .nlm-hero::before,
  #screenAuth .nlm-hero::after,
  #screenAuth .nlm-proof-dot { animation: none; }
}

/* ─── Vista previa del panel en el hero ────────────────────── */
#screenAuth .nlm-hero__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(19rem, calc(100% - 40px));
  margin: 26px auto 0;
  padding: 12px 18px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--lx-neon);
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  animation: lx-float 6s ease-in-out infinite;
}

@keyframes lx-float { 50% { translate: 0 -6px; } }

#screenAuth .nlm-hero__preview-ring { flex: 0 0 auto; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--lx-neon) 60%, transparent)); }
#screenAuth .nlm-hero__preview-copy { display: grid; flex: 1; gap: 1px; }
#screenAuth .nlm-hero__preview-eyebrow { color: var(--lx-neon); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
#screenAuth .nlm-hero__preview-title { color: #fff; font-family: var(--font-heading); font-size: 1rem; font-weight: 900; }
#screenAuth .nlm-hero__preview-meta { color: var(--color-text-muted); font-size: 0.72rem; }
#screenAuth .nlm-hero__preview-pct { color: #fff; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 900; }

/* Wordmark: "NUL" en blanco liso */
#screenAuth .nlm-hero__wordmark .nlm-char:not(.nlm-char--accent) {
  background: none;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  #screenAuth .nlm-hero__preview { animation: none; }
}

/* ─── Fondos claros heredados → transparentes ──────────────── */
#screenAuth .nlm-hero__below,
#screenAuth .nlm-landing,
#screenAuth .nlm-coach-section,
#screenAuth .nlm-land-intro,
#screenAuth .nlm-includes-section,
#screenAuth .nlm-tiers,
#screenAuth .nlm-faq-block,
#screenAuth .auth-spot,
#screenAuth .nlm-tabs { background: transparent; color: #fff; }

#screenAuth .nlm-nav.is-scrolled {
  background: color-mix(in srgb, #0a0506 78%, transparent);
  border-color: rgba(255, 255, 255, 0.16);
}

#screenAuth .nlm-how__card-header * { color: color-mix(in srgb, var(--lx-neon) 70%, transparent); }

/* ─── Texto oscuro heredado dentro de listas y botones ─────── */
#screenAuth .nlm-tier__item,
#screenAuth .nlm-process-step__text strong,
#screenAuth .nlm-fit-col li,
#screenAuth .nlm-vs-col li,
#screenAuth .nlm-fit-col p,
#screenAuth .nlm-vs-col p,
#screenAuth .nlm-fit-col h4,
#screenAuth .nlm-vs-col h4 { color: #fff; }

#screenAuth .nlm-tier__item--yes::before { color: #5fd6a0; }
#screenAuth .nlm-tier__item--no { color: var(--color-text-muted); }

#screenAuth .btn--primary,
#screenAuth .btn--primary .btn__text { color: #3a0b17; }

#screenAuth .btn--primary:disabled { opacity: 0.55; }

/* ─── Acceso: opciones a todo el ancho ─────────────────────── */
#screenAuth .auth-gate__options { display: grid; gap: 10px; }
#screenAuth .auth-gate__btn--ghost {
  border-style: dashed;
  background: transparent;
}

#screenAuth .auth-login-form input[type='checkbox'] { accent-color: var(--lx-neon); }

#screenAuth .auth-otp-details,
#screenAuth .auth-demo {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
}

#screenAuth .auth-otp-details__summary { padding: 12px 16px; color: var(--color-text-secondary); }
#screenAuth .auth-demo { margin-top: 12px; padding: 14px 16px; }
#screenAuth .auth-demo__label { color: var(--lx-neon); letter-spacing: 0.14em; font-weight: 800; }

/* ═══════════════════════════════════════════════════════
   AUDIT FIXES — Screen 1 Landing (2026-11)
   ═══════════════════════════════════════════════════════ */

/* ── Screen 2: Login Modal ─────────────────────────────
   Fix A: Ocultar divisor "O ACCEDE DIRECTAMENTE" — el gate
   y el form ya son suficientemente claros sin este label
   Fix B: Botón "Tengo código de invitación" — span full
   en mobile (375px) para evitar wrapping de 3 líneas
   ────────────────────────────────────────────────────── */
#screenAuth .auth-gate::after {
  display: none;
}

/* Invite siempre a ancho completo (antes solo en ≤480px → media columna rota). */
#authGateInvite {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 58px;
}

/* Fix 1: Evitar scroll horizontal en móvil (landing interior) */
#screenAuth .nlm-landing {
  overflow-x: hidden;
}

/* Fix 2: Pills hero — scroll horizontal con fade-right en pantallas pequeñas */
#screenAuth .nlm-hero__below .nlm-pills {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: 24px;
  padding-bottom: 4px;
  justify-content: flex-start;
  mask-image: linear-gradient(to right, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
#screenAuth .nlm-hero__below .nlm-pills::-webkit-scrollbar { display: none; }

/* Fix 3: Credenciales del coach — siempre alineadas a la izquierda */
#screenAuth .nlm-coach-section__creds,
#screenAuth .nlm-coach-section__creds li {
  text-align: left;
}
@media (max-width: 520px) {
  #screenAuth .nlm-coach-section__creds {
    align-items: flex-start;
    text-align: left;
  }
}

/* Fix 4: Eyebrow labels — reducir letter-spacing en móvil para legibilidad */
@media (max-width: 480px) {
  #screenAuth .auth-land__eyebrow,
  #screenAuth .nlm-how__eyebrow,
  #screenAuth .nlm-tiers__eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.6rem;
  }
}

/* ── _36-landing-fx.css ── */
/* ============================================================
   NULLUM — Landing: contraste + movimiento e interacción
   Acompaña a nullumLandingFx.js. Todo bajo #screenAuth.
   ============================================================ */

/* ─── Contraste de columnas "para ti / vs apps" ────────────── */
#screenAuth .nlm-vs-col--them li,
#screenAuth .nlm-vs-col--them p { color: var(--color-text-secondary); }

#screenAuth .nlm-vs-col--them > :first-child,
#screenAuth .nlm-fit-col > :first-child {
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.14em;
  font-weight: 800;
}

#screenAuth .nlm-fit-col--yes > :first-child { color: #7ee8b6; }
#screenAuth .nlm-fit-col--no > :first-child { color: #ff9aae; }
#screenAuth .nlm-fit-col--no li { color: var(--color-text-secondary); }

/* ─── Constelación ─────────────────────────────────────────── */
#screenAuth .nlm-fx-constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

/* ─── Palabra rotatoria ────────────────────────────────────── */
#screenAuth .nlm-hero__rotator {
  margin: 14px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

#screenAuth .nlm-hero__rotator-word {
  display: inline-block;
  min-width: 6.5ch;
  background: linear-gradient(135deg, #8A5560, #ffd0da);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-heading);
  font-weight: 900;
  text-align: left;
}

#screenAuth .nlm-hero__rotator-word.is-in { animation: lx-word 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes lx-word {
  from { opacity: 0; transform: translateY(0.6em) scale(0.94); filter: blur(6px); }
}

/* ─── Brillo que cruza el wordmark ─────────────────────────── */
#screenAuth .nlm-hero__wordmark { position: relative; }

#screenAuth .nlm-hero__wordmark::after {
  content: '';
  position: absolute;
  inset: -4% 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%);
  mix-blend-mode: overlay;
  transform: translateX(-120%);
  animation: lx-sweep 5.5s ease-in-out 1.8s infinite;
}

@keyframes lx-sweep {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* ─── Tarjeta de vista previa: inclinación 3D (JS) + chips ─── */
#screenAuth .nlm-hero__preview {
  position: relative;
  margin-bottom: 34px;
  transition: transform 160ms ease-out;
  will-change: transform;
}

#screenAuth .nlm-hero__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: color-mix(in srgb, #0a0506 65%, transparent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#screenAuth .nlm-hero__chip svg { color: var(--lx-neon); }
#screenAuth .nlm-hero__chip--a { top: -16px; right: -8px; animation: lx-chip 4.6s ease-in-out infinite; }
#screenAuth .nlm-hero__chip--b { bottom: -30px; left: 10px; animation: lx-chip 5.4s ease-in-out -2s infinite; }

@keyframes lx-chip { 50% { translate: 0 -7px; } }

/* ─── Botones: onda al pulsar, imán y pulso ────────────────── */
#screenAuth .nlm-fx-btn {
  position: relative;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}

#screenAuth .nlm-fx-btn:hover {
  box-shadow: 0 10px 28px rgba(92, 36, 48, 0.40);
}

#screenAuth .nlm-fx-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(92, 36, 48, 0.35), transparent 70%);
  transform: scale(0);
  animation: lx-ripple 650ms ease-out forwards;
}

@keyframes lx-ripple { to { transform: scale(1); opacity: 0; } }

/* Sin pulso neón en CTA — presencia estática de marca */
#screenAuth #authHeroStudyCta { animation: none; }

@keyframes lx-cta-pulse {
  0%, 100%, 50% { box-shadow: 0 8px 24px rgba(92, 36, 48, 0.35); }
}

/* ─── Barra de progreso de scroll ──────────────────────────── */
#screenAuth .nlm-fx-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

#screenAuth .nlm-fx-progress.is-on { opacity: 1; }

#screenAuth .nlm-fx-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #8A5560, #ffd0da);
  box-shadow: 0 0 12px var(--lx-neon);
  transform: scaleX(0);
  transform-origin: left;
}

/* ─── Marquesina de pills ──────────────────────────────────── */
#screenAuth .nlm-fx-marquee {
  display: block;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

#screenAuth .nlm-fx-marquee__track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: lx-marquee 26s linear infinite;
}

#screenAuth .nlm-fx-marquee:hover .nlm-fx-marquee__track { animation-play-state: paused; }

@keyframes lx-marquee { to { transform: translateX(-33.333%); } }

/* ─── Brillo que sigue al dedo en tarjetas ─────────────────── */
#screenAuth .nlm-fx-spot { position: relative; overflow: hidden; }

#screenAuth .nlm-fx-spot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(180px circle at var(--sx, 50%) var(--sy, 0%), color-mix(in srgb, var(--lx-neon) 26%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 260ms ease;
}

#screenAuth .nlm-fx-spot:hover::before,
#screenAuth .nlm-fx-spot:active::before { opacity: 1; }

/* ─── Entrada escalonada de tarjetas y plan destacado vivo ─── */
#screenAuth .auth-land__reveal.is-visible .nlm-include-card,
#screenAuth .auth-land__reveal.is-visible .nlm-tier,
#screenAuth .auth-land__reveal.is-visible .nlm-stat { animation: lx-pop 640ms cubic-bezier(0.16, 1, 0.3, 1) both; }

#screenAuth .nlm-include-card:nth-child(2),
#screenAuth .nlm-tier:nth-child(2),
#screenAuth .nlm-stat:nth-child(2) { animation-delay: 80ms; }

#screenAuth .nlm-include-card:nth-child(3),
#screenAuth .nlm-tier:nth-child(3),
#screenAuth .nlm-stat:nth-child(3) { animation-delay: 160ms; }

#screenAuth .nlm-include-card:nth-child(4) { animation-delay: 240ms; }
#screenAuth .nlm-include-card:nth-child(5) { animation-delay: 320ms; }
#screenAuth .nlm-include-card:nth-child(6) { animation-delay: 400ms; }

/* `to` explícito: la base de .nlm-tier tiene opacity:0, sin él la tarjeta acaba invisible */
@keyframes lx-pop {
  from { opacity: 0; transform: translateY(26px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

#screenAuth .nlm-tier--featured { animation: lx-glow 3.6s ease-in-out infinite; }

@keyframes lx-glow {
  50% { box-shadow: 0 0 64px color-mix(in srgb, var(--lx-neon) 42%, transparent), 0 24px 60px rgba(0, 0, 0, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
  #screenAuth .nlm-hero__wordmark::after,
  #screenAuth .nlm-hero__chip,
  #screenAuth #authHeroStudyCta,
  #screenAuth .nlm-tier--featured,
  #screenAuth .nlm-fx-marquee__track,
  #screenAuth .nlm-hero__rotator-word.is-in,
  #screenAuth .auth-land__reveal.is-visible .nlm-include-card,
  #screenAuth .auth-land__reveal.is-visible .nlm-tier,
  #screenAuth .auth-land__reveal.is-visible .nlm-stat { animation: none; }

  #screenAuth .nlm-tier { opacity: 1; transform: none; }
}

/* ── _36b-landing-how.css ── */
/* ═══════════════════════════════════════════════════════════════════
   Método — "Del registro al resultado" (pipeline vivo)
   Cada tarjeta lleva un mini-visual que solo se reproduce cuando el
   paso está activo (.is-active: rota solo, o por toque / hover / foco,
   ver initHow en nullumLandingFx.js). Inactivo = estado final estático.
   ═══════════════════════════════════════════════════════════════════ */

/* Número: contorno neón que se rellena en el paso activo */
#screenAuth .nlm-how__card .nlm-how__card-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.7rem;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.25px color-mix(in srgb, var(--lx-neon) 70%, transparent);
  background: linear-gradient(135deg, var(--lx-neon-2), var(--lx-neon) 55%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 100% 0%;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 520ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;
}
#screenAuth .nlm-how__card.is-active .nlm-how__card-num {
  background-size: 100% 100%;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--lx-neon) 55%, transparent));
}

/* Icono en cristal con anillo que late en el paso activo */
#screenAuth .nlm-how__card-ico {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--lx-neon);
  background: color-mix(in srgb, var(--color-accent) 38%, transparent);
  border: 1px solid color-mix(in srgb, var(--lx-neon) 28%, transparent);
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 260ms ease;
}
#screenAuth .nlm-how__card-ico * { color: inherit; }
#screenAuth .nlm-how__card-ico::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid var(--lx-neon);
  opacity: 0;
}
#screenAuth .nlm-how__card.is-active .nlm-how__card-ico {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 22px color-mix(in srgb, var(--lx-neon) 38%, transparent);
}
#screenAuth .nlm-how__card.is-active .nlm-how__card-ico::after { animation: hv-ring 1.8s ease-out infinite; }
@keyframes hv-ring {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.55); }
}

/* Tarjeta activa: borde y resplandor neón */
#screenAuth .nlm-how__card {
  cursor: pointer;
  outline: none;
  transition: border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
}
#screenAuth .nlm-how__card.is-active,
#screenAuth .nlm-how__card:focus-visible {
  border-color: color-mix(in srgb, var(--lx-neon) 55%, transparent);
  background: color-mix(in srgb, var(--color-accent) 16%, rgba(255, 255, 255, 0.055));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34),
              0 0 34px color-mix(in srgb, var(--lx-neon) 20%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Barra de progreso del autoavance en la base de la tarjeta activa */
#screenAuth .nlm-how__card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--lx-neon));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
#screenAuth .nlm-how.is-cycling .nlm-how__card.is-active::after {
  animation: hv-timer var(--hv-cycle, 4.2s) linear forwards;
}
@keyframes hv-timer { to { transform: scaleX(1); } }

/* Mini-visual: pantalla de cristal oscuro */
#screenAuth .nlm-how__viz {
  margin-top: 1.2rem;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0.72;
  transition: opacity 300ms ease;
}
#screenAuth .nlm-how__card.is-active .nlm-how__viz { opacity: 1; }

/* 01 · Registro: filas que entran y se marcan */
#screenAuth .hv-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.46rem 0.1rem;
}
#screenAuth .hv-row + .hv-row { border-top: 1px solid rgba(255, 255, 255, 0.07); }
#screenAuth .hv-chk {
  position: relative;
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--lx-neon);
  background: color-mix(in srgb, var(--lx-neon) 14%, transparent);
}
#screenAuth .hv-chk::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 3.5px;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--lx-neon-2);
  border-bottom: 1.6px solid var(--lx-neon-2);
  transform: rotate(-45deg);
}
#screenAuth .hv-v {
  margin-left: auto;
  font-weight: 800;
  color: var(--lx-neon-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#screenAuth .nlm-how__card.is-active .hv-row {
  animation: hv-row 5.2s cubic-bezier(0.16, 1, 0.3, 1) infinite both;
  animation-delay: calc(var(--i) * 0.45s);
}
#screenAuth .nlm-how__card.is-active .hv-chk {
  animation: hv-pop 5.2s ease infinite both;
  animation-delay: calc(var(--i) * 0.45s + 0.35s);
}
@keyframes hv-row {
  0%       { opacity: 0; transform: translateX(-14px); }
  10%, 86% { opacity: 1; transform: none; }
  100%     { opacity: 0; transform: translateX(8px); }
}
@keyframes hv-pop {
  0%        { transform: scale(0.4); background: transparent; }
  14%       { transform: scale(1.3); background: color-mix(in srgb, var(--lx-neon) 55%, transparent); }
  24%, 100% { transform: scale(1);   background: color-mix(in srgb, var(--lx-neon) 14%, transparent); }
}

/* 02 · Detección: barras + escáner + alerta */
#screenAuth .hv-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 66px;
}
#screenAuth .hv-bar {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: rgba(255, 255, 255, 0.17);
  transform-origin: bottom;
}
#screenAuth .hv-bar--hot {
  background: linear-gradient(to top, var(--color-accent), var(--lx-neon));
  box-shadow: 0 0 16px color-mix(in srgb, var(--lx-neon) 45%, transparent);
}
#screenAuth .hv-scan {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  width: 2px;
  background: var(--lx-neon);
  box-shadow: 0 0 14px var(--lx-neon), 0 0 34px color-mix(in srgb, var(--lx-neon) 60%, transparent);
  opacity: 0;
  pointer-events: none;
}
#screenAuth .hv-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.42rem 0.7rem;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--lx-neon-2);
  background: color-mix(in srgb, var(--color-accent) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--lx-neon) 40%, transparent);
}
#screenAuth .hv-alert__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lx-neon);
  box-shadow: 0 0 10px var(--lx-neon);
}
#screenAuth .nlm-how__card.is-active .hv-bar {
  animation: hv-grow 4.6s cubic-bezier(0.16, 1, 0.3, 1) infinite both;
  animation-delay: calc(var(--i) * 0.07s);
}
#screenAuth .nlm-how__card.is-active .hv-scan { animation: hv-sweep 4.6s ease-in-out infinite; }
#screenAuth .nlm-how__card.is-active .hv-alert { animation: hv-alert 4.6s ease infinite both; }
#screenAuth .nlm-how__card.is-active .hv-alert__dot { animation: hv-blink 0.9s ease-in-out infinite; }
@keyframes hv-grow {
  0%       { transform: scaleY(0); }
  22%, 90% { transform: scaleY(1); }
  100%     { transform: scaleY(0.2); opacity: 0.3; }
}
@keyframes hv-sweep {
  0%      { left: 0; opacity: 0; }
  8%      { opacity: 1; }
  62%     { left: calc(100% - 2px); opacity: 1; }
  70%, 100% { left: calc(100% - 2px); opacity: 0; }
}
@keyframes hv-alert {
  0%, 52% { opacity: 0; transform: translateY(8px) scale(0.96); }
  62%, 90% { opacity: 1; transform: none; }
  100%    { opacity: 0; }
}
@keyframes hv-blink { 50% { opacity: 0.25; transform: scale(0.7); } }

/* 03 · Decisión: control que se ajusta y confirmación */
#screenAuth .hv-plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
#screenAuth .hv-plan__val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lx-neon-2);
  font-variant-numeric: tabular-nums;
}
#screenAuth .hv-track {
  position: relative;
  height: 6px;
  margin: 0.95rem 0.5rem 0.95rem 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}
#screenAuth .hv-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 78%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--lx-neon));
  box-shadow: 0 0 12px color-mix(in srgb, var(--lx-neon) 50%, transparent);
}
#screenAuth .hv-knob {
  position: absolute;
  top: 50%;
  left: 78%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lx-neon) 35%, transparent), 0 2px 8px rgba(0, 0, 0, 0.5);
}
#screenAuth .hv-done {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
  background: color-mix(in srgb, var(--lx-neon) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--lx-neon) 45%, transparent);
}
#screenAuth .nlm-how__card.is-active .hv-fill { animation: hv-fill 4.6s cubic-bezier(0.65, 0, 0.35, 1) infinite both; }
#screenAuth .nlm-how__card.is-active .hv-knob { animation: hv-knob 4.6s cubic-bezier(0.65, 0, 0.35, 1) infinite both; }
#screenAuth .nlm-how__card.is-active .hv-plan__val { animation: hv-val 4.6s ease infinite both; }
#screenAuth .nlm-how__card.is-active .hv-done { animation: hv-alert 4.6s ease infinite both; }
@keyframes hv-fill { 0%, 14% { width: 100%; } 46%, 92% { width: 78%; } 100% { width: 100%; } }
@keyframes hv-knob { 0%, 14% { left: 100%; } 46%, 92% { left: 78%; } 100% { left: 100%; } }
@keyframes hv-val {
  0%, 14% { opacity: 0.35; }
  46%, 92% { opacity: 1; text-shadow: 0 0 14px var(--lx-neon); }
  100%    { opacity: 0.35; }
}

/* Conectores: pulso de datos que viaja de un paso al siguiente */
#screenAuth .nlm-how__conn-line { position: relative; overflow: hidden; }
#screenAuth .nlm-how__conn-line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  opacity: 0;
}
#screenAuth .nlm-how.is-cycling .nlm-how__conn-line::after {
  animation: hv-flow 1.6s ease-in-out infinite;
  opacity: 1;
}
#screenAuth .nlm-how.is-cycling .nlm-how__conn-arrow { animation: hv-nudge 1.6s ease-in-out infinite; }
@keyframes hv-flow { to { top: 110%; } }
@keyframes hv-nudge { 50% { translate: 0 4px; opacity: 0.55; } }

@media (min-width: 680px) {
  #screenAuth .nlm-how__card { padding: 1.6rem 1.35rem; }
  #screenAuth .nlm-how__card .nlm-how__card-num { font-size: 2.2rem; }
  #screenAuth .nlm-how__conn-line { height: 44px; }
  #screenAuth .nlm-how.is-cycling .nlm-how__conn-arrow { animation-name: hv-nudge-x; }
  @keyframes hv-nudge-x { 50% { translate: 4px 0; opacity: 0.55; } }
}

@media (prefers-reduced-motion: reduce) {
  #screenAuth .nlm-how__card .hv-row,
  #screenAuth .nlm-how__card .hv-chk,
  #screenAuth .nlm-how__card .hv-bar,
  #screenAuth .nlm-how__card .hv-scan,
  #screenAuth .nlm-how__card .hv-alert,
  #screenAuth .nlm-how__card .hv-alert__dot,
  #screenAuth .nlm-how__card .hv-fill,
  #screenAuth .nlm-how__card .hv-knob,
  #screenAuth .nlm-how__card .hv-plan__val,
  #screenAuth .nlm-how__card .hv-done,
  #screenAuth .nlm-how__card-ico::after,
  #screenAuth .nlm-how__card::after,
  #screenAuth .nlm-how__conn-line::after,
  #screenAuth .nlm-how__conn-arrow { animation: none !important; }
}

/* ── _37-legal-v2.css ── */
/* ============================================================
   NULLUM — Páginas legales, ventana legal y banner de cookies v2
   Mismo escenario oscuro con aurora burdeos que la landing.
   ============================================================ */

body.legal-page {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.76);
  --color-text-muted: rgba(255, 255, 255, 0.58);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --lg-neon: #8A5560;
  --lg-neon-2: #ffd0da;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  color: #fff;
  background-color: #0a0506;
  background-image:
    radial-gradient(ellipse 120% 40% at 50% 0%, color-mix(in srgb, var(--color-accent, #8c1f24) 52%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 80% 30% at 100% 60%, color-mix(in srgb, var(--color-accent, #8c1f24) 28%, transparent) 0%, transparent 70%);
}

body.legal-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 85%);
}

body.legal-page .legal-page__top {
  position: sticky;
  top: 10px;
  z-index: 20;
  width: min(calc(100% - 24px), 46rem);
  margin: 10px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: color-mix(in srgb, #0a0506 60%, transparent);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

body.legal-page .legal-page__brand {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: 0.22em;
}

body.legal-page .legal-page__brand span {
  color: var(--lg-neon);
  text-shadow: 0 0 14px color-mix(in srgb, var(--lg-neon) 60%, transparent);
}

body.legal-page .legal-page__docs a {
  font-size: 0.7rem;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--color-text-secondary);
  font-weight: 800;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

body.legal-page .legal-page__docs a[aria-current='page'],
body.legal-page .legal-page__docs a:hover,
body.legal-page .legal-page__docs a:focus-visible {
  border-color: color-mix(in srgb, var(--lg-neon) 45%, transparent);
  background: color-mix(in srgb, var(--color-accent, #8c1f24) 45%, transparent);
  color: #fff;
}

body.legal-page .legal-page__main {
  width: min(calc(100% - 24px), 46rem);
  margin: 22px auto 0;
  padding: 26px 20px 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

body.legal-page .legal-page__eyebrow {
  color: var(--lg-neon);
  font-weight: 800;
  letter-spacing: 0.2em;
}

body.legal-page .legal-page__main h1 {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
}

body.legal-page .legal-page__lead { color: var(--color-text-secondary); }
body.legal-page .legal-page__lead strong { color: #fff; }

body.legal-page .legal-doc h2 {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--lg-neon-2);
  font-family: var(--font-heading);
  font-weight: 800;
}

body.legal-page .legal-doc p,
body.legal-page .legal-doc li { color: var(--color-text-secondary); }
body.legal-page .legal-doc strong { color: #fff; }

body.legal-page .legal-doc a { color: var(--lg-neon-2); text-underline-offset: 3px; }

body.legal-page .legal-doc code {
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--lg-neon-2);
}

body.legal-page .legal-page__updated { color: var(--color-text-muted); }

body.legal-page .legal-page__foot {
  margin-top: 22px;
  color: var(--color-text-muted);
}

body.legal-page .legal-page__foot a { color: var(--color-text-secondary); }

body.legal-page .legal-page__skip:focus {
  border-radius: 999px;
  background: #fff;
  color: #3a0b17;
}

/* ─── Ventana legal (desde pie y formularios) ──────────────── */
.legal-modal {
  background: rgba(8, 3, 5, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-modal__dialog {
  --color-text-primary: #fff;
  --color-text-muted: rgba(255, 255, 255, 0.62);
  --color-text: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px 34px 0 0;
  color: #fff;
  background:
    radial-gradient(ellipse 100% 26% at 50% 0%, color-mix(in srgb, var(--color-accent, #8c1f24) 50%, transparent), transparent 70%),
    #0d0709;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.legal-modal__eyebrow { color: #8A5560; font-weight: 800; letter-spacing: 0.16em; }
.legal-modal__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

.legal-modal__close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.legal-modal__tab { font-weight: 800; }

.legal-modal__tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--color-accent, #8c1f24), color-mix(in srgb, var(--color-accent, #8c1f24) 45%, #8A5560));
  color: #fff;
}

.legal-modal .legal-doc h4,
.legal-modal .legal-doc h2 { color: #ffd0da; font-family: var(--font-heading); }
.legal-modal .legal-doc p,
.legal-modal .legal-doc li { color: rgba(255, 255, 255, 0.76); }
.legal-modal .legal-doc a { color: #ffd0da; }

/* ─── Banner de cookies ────────────────────────────────────── */
.cookie-banner {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  color: #fff;
  background: color-mix(in srgb, #0a0506 82%, transparent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.cookie-banner__copy,
.cookie-banner p { color: rgba(255, 255, 255, 0.78); }
.cookie-banner a { color: #ffd0da; }

.cookie-banner .btn { border-radius: 999px; font-weight: 800; }

.cookie-banner .btn--primary {
  border: 0;
  background: linear-gradient(135deg, #fff, #ffd0da);
  color: #3a0b17;
}

.cookie-banner .btn--ghost,
.cookie-banner .btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ── _38-modals-v2.css ── */
/* ============================================================
   NULLUM — Registro, ventanas y hojas v2
   Un solo tratamiento de cristal oscuro para los diálogos del
   dashboard (cliente, técnica, confirmaciones, descuentos, onboarding…)
   y para el selector de plan / resumen del registro.
   Solo aspecto; el posicionamiento sigue en los CSS originales.
   ============================================================ */

/* ─── Registro: selector de plan ───────────────────────────── */
#screenAuth .reg-plan-selector__label { color: var(--lx-neon); letter-spacing: 0.09em; font-weight: 800; }

#screenAuth .reg-plan-option__card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--press-ms) ease;
}

#screenAuth .reg-plan-option:active .reg-plan-option__card { transform: scale(0.985); }
#screenAuth .reg-plan-option__name { color: #fff; font-family: var(--font-heading); font-weight: 800; }
#screenAuth .reg-plan-option__price { color: var(--lx-neon-2); font-family: var(--font-heading); font-weight: 900; }
#screenAuth .reg-plan-option__unit { color: var(--color-text-muted); }

#screenAuth .reg-plan-option__radio:checked + .reg-plan-option__card {
  border-color: color-mix(in srgb, var(--lx-neon) 70%, transparent);
  background: color-mix(in srgb, var(--color-accent) 35%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--lx-neon) 28%, transparent);
}

#screenAuth .reg-plan-option__badge {
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  font-weight: 900;
}

/* ─── Registro: consentimiento, descuento y resumen ────────── */
#screenAuth .form__consent-input { accent-color: var(--lx-neon); }
#screenAuth .form__consent-text,
#screenAuth .form__consent-docs { color: var(--color-text-secondary); }
#screenAuth .form__consent-required { color: var(--lx-neon-2); }
#screenAuth .form__consent-link { color: var(--lx-neon-2); }
#screenAuth .form__float-label { color: var(--color-text-muted); }
#screenAuth .form__password-toggle,
#screenAuth .form__input-suffix { color: var(--color-text-muted); }

#screenAuth .reg-summary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

#screenAuth .reg-summary__label { color: var(--color-text-muted); }
#screenAuth .reg-summary__value { color: #fff; font-weight: 800; }

#screenAuth .reg-summary__trial {
  border-radius: 18px;
  background: color-mix(in srgb, #5fd6a0 14%, transparent);
  color: #9af0c6;
}

#screenAuth .reg-discount__feedback { color: var(--color-text-secondary); }

#screenAuth .reg-closed-banner {
  border: 1px solid color-mix(in srgb, var(--lx-neon) 40%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: #fff;
}

#screenAuth .reg-closed-banner__title { color: #fff; font-weight: 800; }
#screenAuth .reg-closed-banner__sub { color: var(--color-text-secondary); }

/* ─── Diálogos del dashboard: tokens oscuros ───────────────── */
.coach-disc-modal,
.client-profile-modal__dialog,
.client-delete-confirm__dialog,
.client-unlink-confirm__dialog,
.tech-modal__dialog,
.tech-fb__dialog,
.muscle-map-modal__dialog,
.ex-suggest-modal__sheet,
.ex-history__sheet,
.wci-source-sheet__panel,
.lib-modal__box,
.msg-drawer,
.welcome-onboarding {
  --color-text-primary: #fff;
  --color-text-secondary: rgba(255, 255, 255, 0.76);
  --color-text-muted: rgba(255, 255, 255, 0.56);
  --color-text: #fff;
  --color-border: rgba(255, 255, 255, 0.13);
  --color-border-strong: rgba(255, 255, 255, 0.26);
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-inset: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-bg: #0d0709;
  color: #fff;
}

/* ─── Diálogos: cristal con brillo de marca ────────────────── */
.client-profile-modal__dialog,
.client-delete-confirm__dialog,
.client-unlink-confirm__dialog,
.tech-modal__dialog,
.tech-fb__dialog,
.muscle-map-modal__dialog,
.ex-suggest-modal__sheet,
.ex-history__sheet,
.wci-source-sheet__panel,
.lib-modal__box,
.coach-disc-modal {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(ellipse 100% 26% at 50% 0%, color-mix(in srgb, var(--color-accent) 50%, transparent), transparent 70%),
    #0d0709;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Hojas ancladas abajo: solo esquinas superiores */
.ex-history__sheet,
.wci-source-sheet__panel,
.tech-modal--drawer .tech-modal__dialog,
.ex-suggest-modal__sheet { border-radius: 30px 30px 0 0; }

/* Fondos oscurecidos con desenfoque */
.client-profile-modal,
.client-delete-confirm,
.client-unlink-confirm,
.tech-modal,
.tech-fb,
.muscle-map-modal,
.ex-suggest-modal__backdrop,
.lib-modal__backdrop,
.wci-source-sheet {
  background: rgba(8, 3, 5, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Títulos y cierres */
.client-profile-modal__title,
.tech-modal__title,
.tech-fb__title,
.muscle-map-modal__title,
.ex-suggest-modal__title,
.ex-history__title,
.lib-modal__title { color: #fff; font-family: var(--font-heading); font-weight: 900; }

.ex-suggest-modal__eyebrow { color: #8A5560; letter-spacing: 0.09em; font-weight: 800; }

.client-profile-modal__close,
.tech-modal__close,
.tech-fb__close,
.muscle-map-modal__close,
.ex-suggest-modal__close,
.ex-history__close,
.lib-modal__close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* Campos dentro de diálogos */
.client-profile-modal .form__input,
.client-profile-modal .form__select,
.tech-fb .form__input,
.tech-modal .form__input,
.ex-suggest-modal .form__input,
.ex-suggest-modal .form__select,
.lib-modal .form__input,
.lib-modal__input,
.lib-modal .form__select,
.coach-disc-modal .form__input,
.coach-disc-modal .form__select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.client-profile-modal .btn--primary,
.tech-fb .btn--primary,
.ex-suggest-modal .btn--primary,
.lib-modal .btn--primary,
.coach-disc-modal .btn--primary,
.client-delete-confirm .btn--primary,
.client-unlink-confirm .btn--primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a93, #ffd0da);
  color: #3a0b17;
  font-weight: 900;
  box-shadow: 0 0 22px color-mix(in srgb, #8A5560 40%, transparent);
}

.client-profile-modal .btn--ghost,
.client-profile-modal .btn--outline,
.tech-fb .btn--ghost,
.ex-suggest-modal .btn--ghost,
.lib-modal .btn--ghost,
.coach-disc-modal .btn--ghost,
.client-delete-confirm .btn--ghost,
.client-unlink-confirm .btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Confirmaciones destructivas */
.client-delete-confirm .btn--danger,
.client-unlink-confirm .btn--danger {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0334f, #ff6b8a);
  color: #fff;
  font-weight: 900;
}

/* ─── Onboarding de bienvenida ─────────────────────────────── */
.welcome-onboarding {
  background:
    radial-gradient(ellipse 100% 34% at 50% 0%, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 70%),
    #0a0506;
}

.welcome-onboarding h2,
.welcome-onboarding h3 { color: #fff; font-family: var(--font-heading); font-weight: 900; }
.welcome-onboarding p { color: rgba(255, 255, 255, 0.76); }

.welcome-onboarding .btn--primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #ffd0da);
  color: #3a0b17;
  font-weight: 900;
  box-shadow: 0 0 30px color-mix(in srgb, #8A5560 45%, transparent);
}

.welcome-onboarding .btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ─── Registro: código de descuento en una fila ────────────── */
#screenAuth .reg-discount__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

#screenAuth .reg-discount__row .form__input { flex: 1 1 auto; min-width: 0; }

#screenAuth .reg-discount__row .btn {
  flex: 0 0 auto;
  width: auto;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 800;
}

/* ─── Los paneles no deben dejar un transform residual ─────────
   Con animation-fill-mode: both el último fotograma deja
   transform: matrix(1,0,0,1,0,0) y los hijos position:fixed
   (onboarding, hojas, modales) pasan a medirse contra el panel. */
#screenDashboard .panel,
#screenDashboard .welcome {
  animation-fill-mode: backwards;
}

/* ─── Avisos (toasts) v3 ───────────────────────────────────────
   Tarjeta de cristal con icono por tipo, barra de cuenta atrás y
   color propio por tipo (a juego con el centro de notificaciones). */
/* La animación genérica [class*="toast"] pisa el translateX(-50%) del contenedor */
body .app-toast-host { animation: none; }

.app-toast-host .app-toast {
  --tt-hue: #8A5560;
  animation: none;
  transform: translateY(-1rem) scale(0.96);
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-toast-host .app-toast.is-visible { transform: translateY(0) scale(1); }
.app-toast-host .app-toast.is-leaving { animation: none; opacity: 0; transform: translateY(-0.75rem) scale(0.97); }

.app-toast[data-type="success"] { --tt-hue: #7ee2a8; }
.app-toast[data-type="error"] { --tt-hue: #ff6b8a; }
.app-toast[data-kind="chat_message"] { --tt-hue: #7cc4ff; }
.app-toast[data-kind="session_completed"] { --tt-hue: #7ee2a8; }
.app-toast[data-kind="weekly_checkin"] { --tt-hue: #ffc46b; }
.app-toast[data-kind="spot_request"] { --tt-hue: #c9a2ff; }
.app-toast[data-kind="review"] { --tt-hue: #ffd76b; }

.app-toast__inner,
.pr-toast__inner {
  --color-text-primary: #fff;
  --color-text-muted: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, color-mix(in srgb, var(--tt-hue, var(--color-accent)) 26%, transparent), transparent 70%),
    color-mix(in srgb, #0a0506 92%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.app-toast__inner {
  position: relative;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px 12px;
}

/* La barra lateral antigua cede el sitio al icono */
.app-toast__accent { display: none; }

.app-toast__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--tt-hue);
  background: color-mix(in srgb, var(--tt-hue) 16%, rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tt-hue) 30%, transparent);
}

.app-toast__body { padding-top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.app-toast__eyebrow,
.pr-toast__eyebrow {
  color: var(--tt-hue, #8A5560);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.app-toast__message,
.pr-toast__title {
  margin: 0;
  color: #fff;
}

.app-toast__message {
  font-size: 0.88rem;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.86);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pr-toast__detail { color: rgba(255, 255, 255, 0.7); }

.app-toast__action {
  margin-top: 8px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--tt-hue) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tt-hue) 18%, transparent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 150ms ease, transform 120ms ease;
}

.app-toast__action:hover,
.app-toast__action:focus-visible {
  background: color-mix(in srgb, var(--tt-hue) 34%, transparent);
  outline: none;
}

.app-toast__action:active { transform: scale(0.95); }

.app-toast__close {
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.app-toast__close:hover,
.app-toast__close:focus-visible { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Barra de cuenta atrás */
.app-toast__bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 5px;
  height: 3px;
  border-radius: 3px;
  background: var(--tt-hue);
  opacity: 0.75;
  transform-origin: left center;
  animation: tt-bar var(--toast-dur, 3400ms) linear forwards;
}

@keyframes tt-bar { to { transform: scaleX(0); } }

/* Variante de credenciales (login): sin icono ni barra, se mantiene su estilo propio */
.app-toast[data-variant="auth-credentials"] .app-toast__ico,
.app-toast[data-variant="auth-credentials"] .app-toast__bar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .app-toast__bar { animation: none; display: none; }
}

/* ─── Ficha de cliente y confirmaciones ────────────────────── */
.client-profile-modal__metric {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.client-profile-modal__danger {
  border: 1px solid color-mix(in srgb, #ff6b8a 40%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, #ff6b8a 8%, transparent);
}

.client-profile-modal__danger-title { color: #ff9aae; letter-spacing: 0.12em; font-weight: 800; }

.client-delete-confirm .btn,
.client-unlink-confirm .btn { padding-inline: 20px; white-space: nowrap; }

/* ── _39-demo-story-v2.css ── */
/* ============================================================
   NULLUM — Demo Story · Rediseño cinematográfico
   Full-screen, escenas animadas, lenguaje del hero.
   Fondo oscuro #0a0506 + orbes de acento que cambian por escena.
   Prefijo .nds para aislamiento; html .nds para especificidad.
   ============================================================ */

/* ── Tokens propios ─────────────────────────────────────────── */
.nds {
  --nds-r: 20px;
  --nds-r-pill: 999px;
  --nds-bg: #0a0506;
  --nds-bg-deep: #070304;
  --nds-text: #fff;
  --nds-text-2: rgba(255,255,255,0.72);
  --nds-text-3: rgba(255,255,255,0.48);
  --nds-border: rgba(255,255,255,0.12);
  --nds-border-2: rgba(255,255,255,0.22);
  --nds-glass: rgba(255,255,255,0.055);
  --nds-glass-2: rgba(255,255,255,0.09);
  --nds-wine: var(--color-accent, #8b2135);
  --nds-neon: #8A5560;
  --nds-neon-2: #ffd0da;
  /* orbes por escena — se sobreescriben por [data-scene] */
  --nds-orb-a: var(--nds-wine);
  --nds-orb-b: #ff7a93;
  --nds-orb-a-x: 15%;  --nds-orb-a-y: 8%;
  --nds-orb-b-x: 88%;  --nds-orb-b-y: 88%;
}

/* ── Reset del overlay ──────────────────────────────────────── */
html .nds {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  justify-content: center;
  isolation: isolate;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--nds-text);
}

html .nds[hidden] { display: none; }

/* ── Fondo: escena oscura + grid + orbes animados ───────────── */
html .nds__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--nds-bg-deep);
  overflow: hidden;
}

/* Patrón de grid sutil (igual que el hero) */
html .nds__scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.024) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 25%, transparent 80%);
  pointer-events: none;
}

/* Orbe A */
html .nds__orb-a {
  position: absolute;
  width: 70vmax; aspect-ratio: 1;
  left: var(--nds-orb-a-x); top: var(--nds-orb-a-y);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--nds-orb-a) 70%, transparent), transparent 68%);
  filter: blur(72px);
  opacity: 0.55;
  animation: nds-drift-a 16s ease-in-out infinite alternate;
  transition: left 1.2s cubic-bezier(0.16,1,0.3,1), top 1.2s cubic-bezier(0.16,1,0.3,1),
              background 1s ease;
  pointer-events: none;
}

/* Orbe B */
html .nds__orb-b {
  position: absolute;
  width: 55vmax; aspect-ratio: 1;
  left: var(--nds-orb-b-x); top: var(--nds-orb-b-y);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--nds-orb-b) 55%, transparent), transparent 68%);
  filter: blur(80px);
  opacity: 0.38;
  animation: nds-drift-b 20s ease-in-out infinite alternate;
  transition: left 1.4s cubic-bezier(0.16,1,0.3,1), top 1.4s cubic-bezier(0.16,1,0.3,1),
              background 1s ease;
  pointer-events: none;
}

@keyframes nds-drift-a { to { transform: translate(-50%, -50%) translate(18%, 14%) scale(1.12); } }
@keyframes nds-drift-b { to { transform: translate(-50%, -50%) translate(-14%, -10%) scale(1.18); } }

/* ── Escenas por paso: data-scene en .nds (ancestro común de scene+panel) ── */
html .nds[data-scene="athlete"]  { --nds-orb-a-x:10%; --nds-orb-a-y:5%;  --nds-orb-b-x:85%; --nds-orb-b-y:90%; }
html .nds[data-scene="objective"]{ --nds-orb-a-x:80%; --nds-orb-a-y:10%; --nds-orb-b-x:10%; --nds-orb-b-y:75%; }
html .nds[data-scene="plan"]     { --nds-orb-a-x:50%; --nds-orb-a-y:0%;  --nds-orb-b-x:90%; --nds-orb-b-y:80%; }
html .nds[data-scene="evolution"]{ --nds-orb-a: #1a8c4e; --nds-orb-b: #34d399;
                                    --nds-orb-a-x:20%; --nds-orb-a-y:10%; --nds-orb-b-x:80%; --nds-orb-b-y:80%; }
html .nds[data-scene="signal"]   { --nds-orb-a: #c0392b; --nds-orb-b: #ff6b6b;
                                    --nds-orb-a-x:30%; --nds-orb-a-y:15%; --nds-orb-b-x:70%; --nds-orb-b-y:75%; }
html .nds[data-scene="context"]  { --nds-orb-a-x:60%; --nds-orb-a-y:5%;  --nds-orb-b-x:20%; --nds-orb-b-y:85%; }
html .nds[data-scene="decision"] { --nds-orb-a-x:15%; --nds-orb-a-y:20%; --nds-orb-b-x:80%; --nds-orb-b-y:60%; }
html .nds[data-scene="response"] { --nds-orb-a: #0e6b44; --nds-orb-b: #10b981;
                                    --nds-orb-a-x:25%; --nds-orb-a-y:8%;  --nds-orb-b-x:75%; --nds-orb-b-y:85%; }
html .nds[data-scene="nutrition"]{ --nds-orb-a: #92400e; --nds-orb-b: #f59e0b;
                                    --nds-orb-a-x:70%; --nds-orb-a-y:5%;  --nds-orb-b-x:20%; --nds-orb-b-y:80%; }
html .nds[data-scene="cycle"]    { --nds-orb-a: #1a5e3a; --nds-orb-b: #7c3aed;
                                    --nds-orb-a-x:15%; --nds-orb-a-y:10%; --nds-orb-b-x:85%; --nds-orb-b-y:70%; }
html .nds[data-scene="next"]     { --nds-orb-a-x:50%; --nds-orb-a-y:5%;  --nds-orb-b-x:50%; --nds-orb-b-y:100%;
                                    --nds-orb-a: var(--nds-wine); --nds-orb-b: #ff7a93; }

/* ── Panel principal ────────────────────────────────────────── */
html .nds__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

/* ── Header ─────────────────────────────────────────────────── */
html .nds__top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.6rem;
  flex-shrink: 0;
}

html .nds__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

html .nds__logo {
  font-family: var(--font-heading, system-ui);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: #fff;
  text-transform: uppercase;
}

html .nds__mode {
  padding: 0.22rem 0.65rem;
  border-radius: var(--nds-r-pill);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nds-text-2);
  text-transform: uppercase;
}

html .nds__close {
  width: 2.8rem;
  height: 2.8rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--nds-r-pill);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  color: var(--nds-text-2);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html .nds__close:hover { background: var(--nds-glass-2); border-color: var(--nds-border-2); }
html .nds__close:active { transform: scale(0.9); }

/* ── Barra de progreso ───────────────────────────────────────── */
html .nds__progress {
  height: 3px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  overflow: hidden;
}

html .nds__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--nds-wine), var(--nds-neon));
  box-shadow: 0 0 16px color-mix(in srgb, var(--nds-wine) 65%, transparent);
  transition: width 0.55s cubic-bezier(0.16,1,0.3,1);
  border-radius: 2px;
}

/* ── Chapter pill ────────────────────────────────────────────── */
html .nds__chapter {
  display: inline-flex;
  align-self: flex-start;
  margin: 0.8rem 1.25rem 0;
  padding: 0.28rem 0.8rem;
  border-radius: var(--nds-r-pill);
  border: 1px solid color-mix(in srgb, var(--nds-wine) 55%, transparent);
  background: color-mix(in srgb, var(--nds-wine) 18%, transparent);
  font-family: var(--font-heading, system-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--nds-neon) 80%, #fff);
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Body: zona scrollable ───────────────────────────────────── */
html .nds__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 1.25rem 7rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

html .nds__title {
  margin: 0.3rem 0 1rem;
  font-family: var(--font-heading, system-ui);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}

/* ── Animación de entrada del contenido ─────────────────────── */
@keyframes nds-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.982); }
  to   { opacity: 1; transform: none; }
}

html .nds__content--enter {
  animation: nds-enter 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── Hero stat: el número grande por paso ───────────────────── */
html .nds-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 1.2rem;
}

html .nds-hero-stat__value {
  font-family: var(--font-heading, system-ui);
  font-size: clamp(3.5rem, 15vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 0 60px color-mix(in srgb, var(--nds-neon) 50%, transparent);
}

html .nds-hero-stat__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--nds-text-3);
  text-transform: uppercase;
}

html .nds-hero-stat__sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nds-text-2);
  margin-top: 0.2rem;
}

/* ── Métricas grid ───────────────────────────────────────────── */
html .nds-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
  list-style: none;
  padding: 0; margin: 0 0 1rem;
}

html .nds-metrics__item {
  padding: 0.75rem 0.9rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: nds-metric-in 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes nds-metric-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

html .nds-metrics__item:nth-child(1) { animation-delay: 0.05s; }
html .nds-metrics__item:nth-child(2) { animation-delay: 0.1s; }
html .nds-metrics__item:nth-child(3) { animation-delay: 0.15s; }
html .nds-metrics__item:nth-child(4) { animation-delay: 0.2s; }
html .nds-metrics__item:nth-child(5) { animation-delay: 0.25s; }
html .nds-metrics__item:nth-child(6) { animation-delay: 0.3s; }

html .nds-metrics__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nds-text-3);
}

html .nds-metrics__value {
  font-family: var(--font-heading, system-ui);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

html .nds-metrics__value--good { color: #34d399; }
html .nds-metrics__value--ok   { color: #6ee7b7; }
html .nds-metrics__value--warn { color: #fca5a5; }

/* Barra visual debajo del valor */
html .nds-metrics__bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  margin-top: 0.35rem;
}

html .nds-metrics__bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--nds-wine), var(--nds-neon));
  transform-origin: left;
  animation: nds-bar-grow 0.7s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}

@keyframes nds-bar-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

html .nds-metrics__bar-fill--good { background: linear-gradient(90deg, #059669, #34d399); }
html .nds-metrics__bar-fill--warn { background: linear-gradient(90deg, #991b1b, #fca5a5); }

/* ── Insight: bloque NULLUM ──────────────────────────────────── */
html .nds-insight {
  position: relative;
  padding: 1rem 1.1rem 1rem 1.3rem;
  border-radius: var(--nds-r);
  border: 1px solid color-mix(in srgb, var(--nds-wine) 45%, transparent);
  background: color-mix(in srgb, var(--nds-wine) 10%, rgba(255,255,255,0.04));
  backdrop-filter: blur(12px);
  overflow: hidden;
  margin: 0.9rem 0;
}

html .nds-insight::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--nds-wine), var(--nds-neon));
  box-shadow: 0 0 12px color-mix(in srgb, var(--nds-wine) 60%, transparent);
}

html .nds-insight__mark {
  font-family: var(--font-heading, system-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  color: color-mix(in srgb, var(--nds-neon) 80%, #fff);
  text-transform: uppercase;
}

html .nds-insight__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

html .nds-k {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  display: block;
  margin-bottom: 0.15rem;
}

html .nds-insight__see,
html .nds-insight__mean,
html .nds-insight__review,
html .nds-insight__body {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--nds-text-2);
  margin: 0.3rem 0 0;
}

html .nds-why-btn {
  padding: 0.24rem 0.65rem;
  border-radius: var(--nds-r-pill);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--nds-text-2);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

html .nds-why-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }

html .nds-insight__why {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: var(--nds-text-2);
  line-height: 1.55;
}

html .nds-insight__why[hidden] { display: none; }

/* ── Claim: tarjeta de impacto ───────────────────────────────── */
html .nds-claim {
  margin: 1.2rem 0 0;
  padding: 1.15rem 1.2rem;
  border-radius: var(--nds-r);
  background: linear-gradient(135deg, var(--nds-wine), color-mix(in srgb, var(--nds-wine) 60%, #c0392b));
  box-shadow: 0 16px 40px color-mix(in srgb, var(--nds-wine) 40%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.14);
  font-family: var(--font-heading, system-ui);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}

/* ── Semáforo / DL ───────────────────────────────────────────── */
html .nds-dl {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
}

html .nds-dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 1rem;
}

html .nds-dl > div:last-child { border-bottom: 0; }

html .nds-dl dt {
  font-family: var(--font-heading, system-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  white-space: nowrap;
}

html .nds-dl dd {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-align: right;
}

/* ── Semanas / evolution ──────────────────────────────────────── */
html .nds-weeks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

html .nds-week {
  padding: 0.9rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
  animation: nds-metric-in 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-week:nth-child(1) { animation-delay: 0.05s; }
html .nds-week:nth-child(2) { animation-delay: 0.15s; }
html .nds-week:nth-child(3) { animation-delay: 0.25s; }

html .nds-week__title {
  font-family: var(--font-heading, system-ui);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.5rem;
}

/* ── Spark chart (evolución) ─────────────────────────────────── */
html .nds-spark {
  margin: 0.6rem 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
}

html .nds-spark__label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.5rem;
}

html .nds-spark svg {
  width: 100%;
  height: 56px;
  overflow: visible;
}

/* ── Signal: alerta dramática ────────────────────────────────── */
html .nds-signal {
  padding: 1.1rem 1.15rem;
  border-radius: var(--nds-r);
  border: 1px solid rgba(239,68,68,0.5);
  background: rgba(239,68,68,0.1);
  backdrop-filter: blur(12px);
  margin: 0.8rem 0;
  animation: nds-signal-pulse 2.5s ease-in-out infinite;
}

@keyframes nds-signal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); border-color: rgba(239,68,68,0.5); }
  50%       { box-shadow: 0 0 28px rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.85); }
}

html .nds-signal__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-heading, system-ui);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fca5a5;
  margin-bottom: 0.55rem;
}

html .nds-signal__dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.3);
  animation: nds-dot-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes nds-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239,68,68,0.3); }
  50%       { box-shadow: 0 0 0 7px rgba(239,68,68,0.1); }
}

html .nds-signal__lead {
  font-size: 0.78rem;
  color: rgba(252,165,165,0.85);
  margin-bottom: 0.55rem;
}

html .nds-signal__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

html .nds-signal__list li {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  padding-left: 1.1rem;
  position: relative;
}

html .nds-signal__list li::before {
  content: '·';
  position: absolute;
  left: 0.35rem;
  color: #ef4444;
  font-weight: 900;
}

/* ── Decision / choices ──────────────────────────────────────── */
html .nds-lede {
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  font-weight: 600;
  color: var(--nds-text-2);
  line-height: 1.5;
  margin-bottom: 1rem;
}

html .nds-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

html .nds-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading, system-ui);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--nds-text-2);
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  backdrop-filter: blur(10px);
  animation: nds-metric-in 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-choice:nth-child(1) { animation-delay: 0.04s; }
html .nds-choice:nth-child(2) { animation-delay: 0.1s; }
html .nds-choice:nth-child(3) { animation-delay: 0.16s; }
html .nds-choice:nth-child(4) { animation-delay: 0.22s; }

html .nds-choice:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  transform: translateX(4px);
}

html .nds-choice:active { transform: scale(0.98) translateX(2px); }

html .nds-choice.is-selected {
  border-color: color-mix(in srgb, var(--nds-wine) 80%, transparent);
  background: color-mix(in srgb, var(--nds-wine) 20%, rgba(255,255,255,0.05));
  color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nds-wine) 60%, transparent),
              0 8px 28px color-mix(in srgb, var(--nds-wine) 28%, transparent);
}

html .nds-choice__key {
  width: 2rem; height: 2rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: var(--nds-text-2);
  font-family: var(--font-heading, system-ui);
  font-size: 0.75rem;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s, color 0.2s;
}

html .nds-choice.is-selected .nds-choice__key {
  background: var(--nds-wine);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 12px color-mix(in srgb, var(--nds-wine) 60%, transparent);
}

html .nds-choices--compact .nds-choice {
  flex-direction: row;
}

html .nds-choices--compact .nds-choice__label {
  font-size: 0.8rem;
}

/* ── Feedback / nota ─────────────────────────────────────────── */
html .nds-feedback {
  padding: 0.8rem 1rem;
  border-radius: var(--nds-r);
  border: 1px solid rgba(52,211,153,0.35);
  background: rgba(16,185,129,0.1);
  font-size: 0.82rem;
  color: #6ee7b7;
  margin: 0.7rem 0;
}

html .nds-feedback--ok { color: #34d399; }

html .nds-note {
  margin: 0.7rem 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--nds-r);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--nds-text-2);
  line-height: 1.55;
}

html .nds-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--nds-text-3);
  padding: 0.6rem 0;
}

/* ── Decision log ────────────────────────────────────────────── */
html .nds-log {
  padding: 0.9rem 1rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
  margin: 0.7rem 0;
}

html .nds-log__title {
  font-family: var(--font-heading, system-ui);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.6rem;
}

/* ── Decision tag ────────────────────────────────────────────── */
html .nds-decision-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0;
  font-size: 0.78rem;
  color: var(--nds-text-2);
}

html .nds-decision-tag span {
  padding: 0.18rem 0.6rem;
  border-radius: var(--nds-r-pill);
  background: color-mix(in srgb, var(--nds-wine) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--nds-wine) 50%, transparent);
  font-family: var(--font-heading, system-ui);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nds-neon);
}

/* ── Flow (contexto) ─────────────────────────────────────────── */
html .nds-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

html .nds-flow__col {
  padding: 0.8rem 0.9rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
}

html .nds-flow__col--pending {
  border-color: rgba(255,255,255,0.06);
  opacity: 0.65;
}

html .nds-flow__col h3 {
  font-family: var(--font-heading, system-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.4rem;
}

html .nds-flow__col p, html .nds-flow__col ul li { font-size: 0.78rem; color: var(--nds-text-2); }
html .nds-flow__col ul { padding-left: 0.9rem; }

html .nds-flow__arrow {
  font-size: 1.1rem;
  color: var(--nds-text-3);
  flex-shrink: 0;
}

/* ── Comparativa (precision) ──────────────────────────────────── */
html .nds-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

html .nds-compare__bad, html .nds-compare__good {
  padding: 0.9rem 1rem;
  border-radius: var(--nds-r);
  backdrop-filter: blur(10px);
}

html .nds-compare__bad {
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
}

html .nds-compare__good {
  border: 1px solid rgba(52,211,153,0.35);
  background: rgba(16,185,129,0.1);
}

html .nds-compare__bad h3 { color: #fca5a5; }
html .nds-compare__good h3 { color: #6ee7b7; }

html .nds-compare__bad h3, html .nds-compare__good h3 {
  font-family: var(--font-heading, system-ui);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

html .nds-compare__bad p, html .nds-compare__good p {
  font-size: 0.8rem;
  color: var(--nds-text-2);
  line-height: 1.5;
}

/* ── Plan grid ────────────────────────────────────────────────── */
html .nds-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

html .nds-plan-block {
  padding: 0.85rem 0.9rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
  animation: nds-metric-in 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-plan-block:nth-child(1) { animation-delay: 0.05s; }
html .nds-plan-block:nth-child(2) { animation-delay: 0.12s; }
html .nds-plan-block:nth-child(3) { animation-delay: 0.19s; }
html .nds-plan-block:nth-child(4) { animation-delay: 0.26s; }

html .nds-plan-block h3 {
  font-family: var(--font-heading, system-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.4rem;
}

html .nds-plan-block p, html .nds-plan-block ul li { font-size: 0.8rem; color: var(--nds-text-2); }
html .nds-plan-block ul { padding-left: 1rem; }

/* ── Cycle animation (respuesta) ─────────────────────────────── */
html .nds-cycle-anim {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(10px);
}

html .nds-cycle-anim > span:not(.nds-cycle-anim__sep) {
  padding: 0.35rem 0.75rem;
  border-radius: var(--nds-r-pill);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  animation: nds-tag-in 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-cycle-anim > span:nth-child(1) { animation-delay: 0.05s; }
html .nds-cycle-anim > span:nth-child(3) { animation-delay: 0.15s; }
html .nds-cycle-anim > span:nth-child(5) { animation-delay: 0.25s; }
html .nds-cycle-anim > span:nth-child(7) { animation-delay: 0.35s; }
html .nds-cycle-anim > span:nth-child(9) { animation-delay: 0.45s; background: var(--nds-wine); border-color: transparent;
  box-shadow: 0 0 16px color-mix(in srgb, var(--nds-wine) 55%, transparent); color: #fff; }

@keyframes nds-tag-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: none; }
}

html .nds-cycle-anim__sep { color: var(--nds-text-3); font-size: 0.9rem; }

/* ── Bullets y listas ─────────────────────────────────────────── */
html .nds-bullets, html .nds-decisions, html .nds-indicators {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
}

html .nds-bullets li, html .nds-decisions li {
  font-size: 0.85rem;
  color: var(--nds-text-2);
  line-height: 1.5;
  padding-left: 1.1rem;
  position: relative;
}

html .nds-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--nds-text-3);
  font-size: 0.7rem;
}

html .nds-decisions li { padding-left: 1.5rem; }
html .nds-decisions li::before {
  content: counter(nds-dec);
  counter-increment: nds-dec;
  position: absolute;
  left: 0;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--nds-wine) 30%, transparent);
  border: 1px solid color-mix(in srgb, var(--nds-wine) 60%, transparent);
  font-family: var(--font-heading, system-ui);
  font-size: 0.58rem;
  font-weight: 900;
  color: var(--nds-neon);
  display: flex; align-items: center; justify-content: center;
  top: 0.15rem;
}

html ol.nds-decisions { counter-reset: nds-dec; }

html .nds-indicators li {
  padding: 0.7rem 0.9rem;
  border-radius: var(--nds-r);
  border: 1px solid var(--nds-border);
  background: var(--nds-glass);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  animation: nds-metric-in 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-indicators li:nth-child(1) { animation-delay: 0.05s; }
html .nds-indicators li:nth-child(2) { animation-delay: 0.1s; }
html .nds-indicators li:nth-child(3) { animation-delay: 0.15s; }
html .nds-indicators li:nth-child(4) { animation-delay: 0.2s; }

html .nds-indicators li strong { color: #fff; font-weight: 800; }
html .nds-indicators li span {
  font-family: var(--font-heading, system-ui);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--nds-neon);
}

/* ── H3 interno ───────────────────────────────────────────────── */
html .nds-h3 {
  font-family: var(--font-heading, system-ui);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin: 1rem 0 0.5rem;
}

html .nds-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nds-text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

/* ── Report ───────────────────────────────────────────────────── */
html .nds-report {
  padding: 1rem 1.1rem;
  border-radius: var(--nds-r);
  border: 1px solid rgba(52,211,153,0.3);
  background: rgba(16,185,129,0.08);
  backdrop-filter: blur(10px);
  margin: 0.9rem 0;
}

html .nds-report__eyebrow {
  font-family: var(--font-heading, system-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6ee7b7;
  margin-bottom: 0.5rem;
}

html .nds-report p { font-size: 0.82rem; color: var(--nds-text-2); line-height: 1.5; }
html .nds-report__worked { color: var(--nds-text-3) !important; font-size: 0.75rem !important; margin-top: 0.4rem; }

/* ── Siguiente / CTA final ────────────────────────────────────── */
html .nds-next {
  margin-bottom: 1rem;
}

html .nds-next h3 {
  font-family: var(--font-heading, system-ui);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nds-text-3);
  margin-bottom: 0.5rem;
}

html .nds-tagline {
  font-family: var(--font-heading, system-ui);
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin: 1.2rem 0 0.3rem;
  text-shadow: 0 0 40px color-mix(in srgb, var(--nds-neon) 35%, transparent);
}

html .nds-tagline span {
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--nds-text-2);
  display: block;
}

html .nds-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.4rem 0 0.8rem;
}

html .nds-cta .btn {
  min-height: 56px;
  border-radius: var(--nds-r-pill);
  font-family: var(--font-heading, system-ui);
  font-weight: 900;
  letter-spacing: 0.07em;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

html .nds-cta .btn:active { transform: scale(0.97); }

html .nds-cta__primary {
  background: linear-gradient(135deg, var(--nds-wine), color-mix(in srgb, var(--nds-wine) 60%, #c0392b));
  color: #fff;
  border: 0;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--nds-wine) 42%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.15);
}

html .nds-cta__primary:hover {
  box-shadow: 0 20px 50px color-mix(in srgb, var(--nds-wine) 55%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

html .nds-cta__secondary {
  background: rgba(255,255,255,0.06);
  color: var(--nds-text-2);
  border: 1px solid var(--nds-border);
}

html .nds-cta__secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--nds-border-2);
}

html .nds-cta-note {
  font-size: 0.72rem;
  color: var(--nds-text-3);
  text-align: center;
  line-height: 1.5;
}

/* ── Nav flotante ────────────────────────────────────────────── */
html .nds__nav {
  position: absolute;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 480px);
  height: 64px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--nds-r-pill);
  background: color-mix(in srgb, #0a0506 70%, rgba(255,255,255,0.05));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3),
              inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html .nds__nav .btn {
  height: 100%;
  min-height: 0;
  padding: 0 1.3rem;
  border-radius: var(--nds-r-pill);
  font-family: var(--font-heading, system-ui);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}

html .nds__nav #ndsNext {
  background: linear-gradient(135deg, var(--nds-wine), color-mix(in srgb, var(--nds-wine) 60%, #c0392b));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--nds-wine) 50%, transparent);
}

html .nds__nav #ndsNext:disabled {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.35);
  box-shadow: none;
  cursor: not-allowed;
}

html .nds__nav #ndsPrev {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.5);
}

html .nds__nav #ndsPrev:disabled { opacity: 0.3; cursor: default; }

html .nds__step {
  font-family: var(--font-heading, system-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38);
}

/* ── body lock ───────────────────────────────────────────────── */
body.nds-open { overflow: hidden; }

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html .nds__orb-a, html .nds__orb-b { animation: none !important; }
  html .nds__content--enter, html .nds-metrics__item,
  html .nds-plan-block, html .nds-week, html .nds-choice,
  html .nds-cycle-anim > span:not(.nds-cycle-anim__sep) { animation: none !important; }
  html .nds-metrics__bar-fill { animation: none !important; transform: scaleX(1); }
  html .nds-signal, html .nds-signal__dot { animation: none !important; }
  html .nds__progress-bar { transition: none; }
}

/* ── Mobile tweaks ───────────────────────────────────────────── */
@media (max-width: 480px) {
  html .nds__body { padding: 0.3rem 1rem 6.5rem; }
  html .nds__title { font-size: clamp(1.8rem, 10vw, 2.4rem); }
  html .nds-hero-stat__value { font-size: clamp(3rem, 18vw, 5rem); }
  html .nds-flow {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  html .nds-flow__arrow { transform: rotate(90deg); text-align: center; }
  html .nds-compare { grid-template-columns: 1fr; }
  html .nds-weeks { grid-template-columns: 1fr; }
}

/* ================================================================
   DOPAMINE LAYER — Ring charts · Particles · Danger ring · 3D hover
   ================================================================ */

/* ── Floating particles ─────────────────────────────────────── */
html .nds__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

html .nds-particle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: nds-particle-float linear infinite;
}

@keyframes nds-particle-float {
  0%   { transform: translateY(0) scale(1);    opacity: var(--nds-p-op, 0.35); }
  50%  { transform: translateY(-38px) scale(1.3); opacity: calc(var(--nds-p-op, 0.35) * 1.6); }
  100% { transform: translateY(-76px) scale(0.6); opacity: 0; }
}

/* ── Ring chart ─────────────────────────────────────────────── */
html .nds-rings-row {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  margin: 0 0 1.4rem;
  flex-wrap: wrap;
}

html .nds-ring {
  position: relative;
  width: 108px;
  flex-shrink: 0;
}

html .nds-ring__svg {
  width: 108px;
  height: 108px;
  transform: rotate(-90deg);
  overflow: visible;
}

html .nds-ring__track {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 8;
}

html .nds-ring__fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px currentColor);
  transition: stroke-dashoffset 0.05s linear;
}

html .nds-ring__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

html .nds-ring__val {
  font-family: var(--font-heading, system-ui);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.04em;
}

html .nds-ring__lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nds-text-3);
  text-transform: uppercase;
  text-align: center;
}

/* ── Danger ring (Signal step) ──────────────────────────────── */
html .nds-danger-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.4rem;
}

html .nds-danger-ring__rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

html .nds-danger-ring__r {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(192, 57, 43, 0.6);
  animation: nds-danger-pulse 2.4s ease-out infinite;
}

html .nds-danger-ring__r--1 { width: 200px; height: 200px; animation-delay: 0s; }
html .nds-danger-ring__r--2 { width: 150px; height: 150px; animation-delay: 0.5s; border-color: rgba(255, 107, 107, 0.5); }
html .nds-danger-ring__r--3 { width: 100px; height: 100px; animation-delay: 1s; border-color: rgba(255, 157, 179, 0.4); }

@keyframes nds-danger-pulse {
  0%   { transform: scale(0.85); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

html .nds-danger-ring__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: radial-gradient(ellipse at center, rgba(192,57,43,0.25), transparent 70%);
  border-radius: 50%;
  width: 120px;
  height: 120px;
}

html .nds-danger-ring__val {
  font-family: var(--font-heading, system-ui);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: #ff6b6b;
  letter-spacing: -0.05em;
  text-shadow: 0 0 24px rgba(255,107,107,0.7), 0 0 48px rgba(192,57,43,0.4);
  animation: nds-danger-glow 1.8s ease-in-out infinite alternate;
}

@keyframes nds-danger-glow {
  from { text-shadow: 0 0 16px rgba(255,107,107,0.6), 0 0 32px rgba(192,57,43,0.3); }
  to   { text-shadow: 0 0 32px rgba(255,107,107,0.9), 0 0 64px rgba(192,57,43,0.6); }
}

html .nds-danger-ring__lbl {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,157,179,0.8);
  text-transform: uppercase;
  text-align: center;
}

html .nds-danger-ring__sub {
  font-size: 0.55rem;
  color: var(--nds-text-3);
  text-align: center;
}

/* ── Animated coaching cycle flow (Response step) ────────────── */
html .nds-cycle-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 1.4rem 0 0.8rem;
  flex-wrap: wrap;
  row-gap: 0.6rem;
}

html .nds-cycle-flow__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: nds-cycle-node-in 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}

html .nds-cycle-flow__node.is-active .nds-cycle-flow__dot {
  background: var(--nds-neon);
  box-shadow: 0 0 12px var(--nds-neon), 0 0 24px rgba(255,157,179,0.4);
}

html .nds-cycle-flow__node.is-active .nds-cycle-flow__label {
  color: var(--nds-neon);
}

@keyframes nds-cycle-node-in {
  from { opacity: 0; transform: translateY(12px) scale(0.8); }
  to   { opacity: 1; transform: none; }
}

html .nds-cycle-flow__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.4);
  transition: background 0.4s, box-shadow 0.4s;
}

html .nds-cycle-flow__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nds-text-3);
  text-transform: uppercase;
  text-align: center;
  transition: color 0.4s;
}

html .nds-cycle-flow__arrow {
  width: 32px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  align-self: center;
  margin-bottom: 1.4rem;
  position: relative;
  flex-shrink: 0;
  transition: background 0.4s;
}

html .nds-cycle-flow__arrow::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid rgba(255,255,255,0.15);
  transition: border-left-color 0.4s;
}

html .nds-cycle-flow__arrow.is-active {
  background: var(--nds-neon);
}

html .nds-cycle-flow__arrow.is-active::after {
  border-left-color: var(--nds-neon);
}

/* ── Stat box row (Cycle step) ──────────────────────────────── */
html .nds-statbox-row {
  display: flex;
  gap: 0.8rem;
  margin: 0 0 1.2rem;
  flex-wrap: wrap;
}

html .nds-statbox {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.9rem 0.6rem;
  background: var(--nds-glass);
  border: 1px solid var(--nds-border);
  border-radius: var(--nds-r);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: nds-enter 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

html .nds-statbox:nth-child(1) { animation-delay: 0.05s; }
html .nds-statbox:nth-child(2) { animation-delay: 0.12s; }
html .nds-statbox:nth-child(3) { animation-delay: 0.19s; }

html .nds-statbox__val {
  font-family: var(--font-heading, system-ui);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  color: var(--nds-neon);
  letter-spacing: -0.04em;
  text-shadow: 0 0 20px rgba(255,157,179,0.4);
}

html .nds-statbox__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nds-text-3);
  text-transform: uppercase;
  text-align: center;
}

html .nds-statbox__sub--good { color: #34d399; font-size: 0.6rem; }
html .nds-statbox__sub--ok   { color: var(--nds-neon); font-size: 0.6rem; }

/* ── 3D hover on metric cards ────────────────────────────────── */
html .nds-metrics__item {
  transform-style: preserve-3d;
  transition: transform 0.25s ease, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

html .nds-metrics__item:hover {
  transform: perspective(600px) rotateX(-2deg) scale(1.02);
  background: var(--nds-glass-2);
  border-color: var(--nds-border-2);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── Chapter pill shimmer ────────────────────────────────────── */
html .nds__chapter {
  position: relative;
  overflow: hidden;
}

html .nds__chapter::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: nds-shimmer 3s ease-in-out infinite;
}

@keyframes nds-shimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* ── Glow pulse on hero stat value ──────────────────────────── */
html .nds-hero-stat__value {
  animation: nds-value-glow 3s ease-in-out infinite alternate;
}

@keyframes nds-value-glow {
  from { text-shadow: 0 0 20px rgba(139,33,53,0.3); }
  to   { text-shadow: 0 0 40px rgba(255,157,179,0.5), 0 0 80px rgba(139,33,53,0.25); }
}

/* ── Progress bar animated fill ─────────────────────────────── */
html .nds-metrics__bar-fill {
  transition: width 0.05s linear;
}

/* ── Neon progress bar moving highlight ─────────────────────── */
html .nds__progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  border-radius: 2px;
  animation: nds-progress-shine 2s ease-in-out infinite;
}

html .nds__progress {
  position: relative;
}

@keyframes nds-progress-shine {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ── Reduced motion additions ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html .nds-particle,
  html .nds-danger-ring__r,
  html .nds-danger-ring__val,
  html .nds-cycle-flow__node,
  html .nds-ring__fill,
  html .nds-hero-stat__value,
  html .nds__chapter::after,
  html .nds__progress-bar::after { animation: none !important; }
}

/* ── Mobile ring adjustments ─────────────────────────────────── */
@media (max-width: 480px) {
  html .nds-ring { width: 88px; }
  html .nds-ring__svg { width: 88px; height: 88px; }
  html .nds-rings-row { gap: 0.8rem; }
  html .nds-danger-ring { width: 160px; height: 160px; }
  html .nds-danger-ring__r--1 { width: 160px; height: 160px; }
  html .nds-danger-ring__r--2 { width: 120px; height: 120px; }
  html .nds-danger-ring__r--3 { width: 80px; height: 80px; }
  html .nds-danger-ring__val { font-size: 2.2rem; }
  html .nds-cycle-flow__arrow { width: 20px; }
}

/* ── _40-skeleton.css ── */
/* _23-skeleton.css — NULLUM Loading & Error States
   Skeleton screens, error states, form micro-feedback
   ─────────────────────────────────────────────────── */

/* ══════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════ */

@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes feedback-pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes success-check {
  0%   { stroke-dashoffset: 24; opacity: 0; }
  30%  { opacity: 1; }
  100% { stroke-dashoffset: 0; }
}


/* ══════════════════════════════════════════
   SKELETON BASE
   ══════════════════════════════════════════ */

.nlm-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-elevated, var(--color-surface)) 25%,
    color-mix(in srgb, var(--color-border) 60%, var(--color-surface)) 50%,
    var(--color-surface-elevated, var(--color-surface)) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm, 6px);
}

/* ── Card skeleton ──────────────────────────────────────────────────── */
.nlm-skeleton-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  animation: none; /* card itself doesn't shimmer, children do */
}

.nlm-skeleton-card + .nlm-skeleton-card { margin-top: var(--space-3); }

.nlm-skeleton-line {
  height: 14px;
  border-radius: 4px;
}

.nlm-skeleton-line--sm  { height: 10px; }
.nlm-skeleton-line--lg  { height: 20px; }
.nlm-skeleton-line--xl  { height: 28px; }
.nlm-skeleton-line--w25 { width: 25%; }
.nlm-skeleton-line--w40 { width: 40%; }
.nlm-skeleton-line--w60 { width: 60%; }
.nlm-skeleton-line--w75 { width: 75%; }
.nlm-skeleton-line--w100 { width: 100%; }

.nlm-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nlm-skeleton-hero {
  height: 80px;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-3);
}

/* ── Panel skeleton wrapper ─────────────────────────────────────────── */
.nlm-panel-skeleton {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Nav tile skeleton (2-col grid) ─────────────────────────────────── */
.nlm-skeleton-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.nlm-skeleton-tile {
  height: 72px;
  border-radius: var(--radius-card);
}

/* ── Stat row skeleton ──────────────────────────────────────────────── */
.nlm-skeleton-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.nlm-skeleton-stat {
  height: 64px;
  border-radius: var(--radius-card);
}


/* ══════════════════════════════════════════
   ERROR STATES
   ══════════════════════════════════════════ */

.nlm-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  gap: var(--space-3);
}

.nlm-error-state__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, #E53E3E 10%, var(--color-surface));
  border: 1.5px solid color-mix(in srgb, #E53E3E 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E53E3E;
  font-size: 1.4rem;
  flex-shrink: 0;
  animation: feedback-pop 0.4s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) both;
}

.nlm-error-state__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.nlm-error-state__sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 28ch;
  line-height: var(--leading-relaxed);
}

.nlm-error-state__retry {
  margin-top: var(--space-1);
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  background: none;
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background var(--dur-fast, 120ms) ease,
              color var(--dur-fast, 120ms) ease;
}

.nlm-error-state__retry:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Network error toast — compacto, no sticky full-bleed */
.nlm-network-banner {
  position: fixed;
  z-index: 120;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(calc(100% - 24px), 420px);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--color-surface-raised, #fff);
  border: 1px solid color-mix(in srgb, var(--color-accent, #5C2430) 35%, transparent);
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.16);
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text-primary, #1A1A1A);
  margin: 0;
  animation: feedback-pop 0.3s ease both;
}

.nlm-network-banner__icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent, #5C2430);
}
.nlm-network-banner__text { flex: 1; font-weight: 500; }
.nlm-network-banner__retry,
.nlm-network-banner__dismiss {
  background: none;
  border: none;
  color: var(--color-accent, #5C2430);
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  flex-shrink: 0;
}
.nlm-network-banner__dismiss {
  font-size: 1rem;
  line-height: 1;
  color: var(--color-text-muted, #6B6058);
}


/* ══════════════════════════════════════════
   FORM MICRO-FEEDBACK
   ══════════════════════════════════════════ */

/* ── Field wrapper ──────────────────────────────────────────────────── */
.nlm-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nlm-field__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.nlm-field__input {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  background: var(--color-surface);
  color: var(--color-text-primary);
  transition: border-color var(--dur-fast, 120ms) ease,
              box-shadow var(--dur-fast, 120ms) ease;
  outline: none;
}

.nlm-field__input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

/* States */
.nlm-field--valid   .nlm-field__input { border-color: #38A169; }
.nlm-field--invalid .nlm-field__input {
  border-color: #E53E3E;
  animation: error-shake 0.4s ease both;
}
.nlm-field--invalid .nlm-field__input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, #E53E3E 15%, transparent);
}

.nlm-field__hint {
  font-size: var(--text-xs, 0.72rem);
  color: var(--color-text-secondary);
  min-height: 1.2em;
  transition: color var(--dur-fast, 120ms) ease;
}

.nlm-field--valid   .nlm-field__hint { color: #38A169; }
.nlm-field--invalid .nlm-field__hint { color: #E53E3E; }

/* ── Submit feedback ────────────────────────────────────────────────── */
.nlm-submit-feedback {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  animation: feedback-pop 0.35s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) both;
}

.nlm-submit-feedback--success {
  background: color-mix(in srgb, #38A169 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, #38A169 30%, transparent);
  color: #38A169;
}

.nlm-submit-feedback--error {
  background: color-mix(in srgb, #E53E3E 8%, var(--color-surface));
  border: 1px solid color-mix(in srgb, #E53E3E 25%, transparent);
  color: #E53E3E;
}

.nlm-submit-feedback__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nlm-submit-feedback--success .nlm-submit-feedback__icon {
  background: #38A169;
  color: #fff;
}

.nlm-submit-feedback--error .nlm-submit-feedback__icon {
  background: #E53E3E;
  color: #fff;
}

/* ── Button loading state ───────────────────────────────────────────── */
.nlm-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.nlm-btn-loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Inline number input nudge (weight, reps) ───────────────────────── */
.nlm-number-nudge {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  background: var(--color-surface);
}

.nlm-number-nudge__btn {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast, 120ms) ease;
}

.nlm-number-nudge__btn:active {
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.nlm-number-nudge__input {
  width: 52px;
  text-align: center;
  border: none;
  outline: none;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  background: transparent;
}


/* ══════════════════════════════════════════
   TABLET RESPONSIVE · 768px+
   ══════════════════════════════════════════ */

@media (min-width: 768px) {

  /* Panels get max-width and center */
  .dashboard__main,
  .panel,
  .panel--active {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Cards grid → 2 columns on tablet */
  .cards-grid,
  .home-quick-access {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Nav tiles at bottom → hide on tablet, show side rail */
  .bottom-nav {
    display: none;
  }

  /* Side nav rail */
  .dashboard {
    display: flex;
    flex-direction: row;
  }

  .dashboard__sidebar {
    display: flex !important;
    flex-direction: column;
    width: 220px;
    min-height: 100vh;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    flex-shrink: 0;
  }

  .dashboard__sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 0;
    transition: background var(--dur-fast, 120ms) ease, color var(--dur-fast, 120ms) ease;
    border-left: 3px solid transparent;
  }

  .dashboard__sidebar .nav-item.is-active,
  .dashboard__sidebar .nav-item:hover {
    background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface));
    color: var(--color-accent);
    border-left-color: var(--color-accent);
  }

  /* Streak and coach banner full-width on tablet */
  .checkin-streak,
  .coach-feedback-banner {
    max-width: 100%;
  }

  /* Home stats row: 4 cols on tablet */
  .home-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Typography scale up */
  .checkin-streak__count { font-size: 2.5rem; }
}

/* ══════════════════════════════════════════
   REDUCED MOTION OVERRIDES
   ══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .nlm-skeleton,
  .nlm-skeleton-line,
  .nlm-skeleton-avatar,
  .nlm-skeleton-hero,
  .nlm-skeleton-tile,
  .nlm-skeleton-stat {
    animation: none;
    background: var(--color-surface-elevated, var(--color-border));
  }

  .nlm-error-state__icon,
  .nlm-submit-feedback,
  .nlm-network-banner {
    animation: none;
  }

  .nlm-field--invalid .nlm-field__input {
    animation: none;
  }
}

/* ══════════════════════════════════════════
   WCAG AA CONTRAST FIXES
   Correcciones para texto muted que no alcanza 4.5:1
   ══════════════════════════════════════════ */

/* Coastal light: #5080A0 sobre #FFF → 3.7:1 → sube a #3A6080 → 5.2:1 */
html[data-theme="coastal"] {
  --color-text-muted: #3A6080;
}

/* Miami dark: #4A7890 sobre #0F1828 → 3.9:1 → sube a #5A90A8 → 5.0:1 */
html[data-theme="miami"] {
  --color-text-muted: #5A90A8;
}

/* Blueprint dark: text-secondary #9AAAC8 sobre #161928 OK (9.2:1) ✅ */
/* Jungle-fire: text-muted #6A8860 sobre #111A0E → 4.9:1 ✅ */
/* Void-violet: text-muted #706898 sobre #100D20 → 4.6:1 ✅ */


/* ══════════════════════════════════════════════════════════════
   VISUAL FIXES — Tarjeta blanca, tokens faltantes, date inputs
   ══════════════════════════════════════════════════════════════ */

/* ── 1 · Token --color-surface-2 no definido → fallback blanco en temas oscuros
       Definirlo aquí evita que cualquier componente muestre #f5f0eb en dark ── */
:root {
  --color-surface-2: #f5f0eb; /* light theme default */
}

/* Todos los temas oscuros (base dark es el default en _02-base.css) */
html,
html[data-theme="classic"],
html[data-theme="burgundy-dark"],
html[data-theme="void-violet"],
html[data-theme="coastal"],
html[data-theme="blueprint"],
html[data-theme="miami"],
html[data-theme="jungle-fire"] {
  --color-surface-2: rgba(255, 255, 255, 0.07);
}

/* ── 2 · Tarjeta blanca "sin plan asignado" en sesión de entrenamiento ── */
.session__no-split-hint {
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface)) !important;
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  color: var(--color-text-secondary);
}

/* ── 3 · Date inputs: respetar el color-scheme del tema actual ── */
.form__input[type="date"],
.form__input[type="time"],
.form__input[type="datetime-local"] {
  color-scheme: dark; /* sintoniza el picker con el tema oscuro */
}

/* En temas light (si se añaden en el futuro) */
html[data-theme="light"] .form__input[type="date"],
html[data-theme="light"] .form__input[type="time"],
html[data-theme="light"] .form__input[type="datetime-local"] {
  color-scheme: light;
}

/* ── 4 · Sidebar links: evitar herencia de text-decoration ── */
.sidebar__link,
.sidebar__link-text,
.sidebar__link * {
  text-decoration: none !important;
}

/* ── 5 · Select options: forzar fondo oscuro en dropdown nativo ── */
.form__select option {
  background-color: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
}

/* ── 6 · Panel de sesión: espacio mínimo cuando está vacío ── */
[data-panel="session"] .card__body {
  min-height: auto;
}

/* ── 7 · Nutrición: asegurar que los colores de fondo respetan el tema ── */
.nutri-coaching-box,
.nutri-header,
.nutri-hero {
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface)) !important;
  border-color: color-mix(in srgb, var(--color-accent) 25%, transparent) !important;
}

/* ── _41-native-auth-shell.css ── */
/* ============================================================
   NULLUM — Shell de auth en APK (Capacitor)
   Misma atmósfera que la landing web (#screenAuth _35):
   fondo oscuro, aurora, tipografía, neón burdeos y reveals.
   Sin marketing de planes; login directo bajo el wordmark.
   ============================================================ */

html.is-native-app #screenAuth {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Hero: misma escena web, compacta (sin CTAs comerciales) */
html.is-native-app #nlmHero {
  position: relative;
  min-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
}

html.is-native-app .nlm-hero__above {
  min-height: clamp(240px, 42dvh, 420px);
  padding-bottom: 0.75rem;
  /* Deja respirar orbs / aurora como en web */
  justify-content: center;
}

html.is-native-app .nlm-nav,
html.is-native-app .nlm-hero__proof,
html.is-native-app .nlm-hero__cta-wrap,
html.is-native-app .nlm-hero__preview,
html.is-native-app .nlm-hero__below,
html.is-native-app #waQualifyModal,
html.is-native-app #nlmHowSection,
html.is-native-app #authLanding,
html.is-native-app #authOffer,
html.is-native-app #authSpotRequest,
html.is-native-app .nlm-tiers,
html.is-native-app .nlm-faq,
html.is-native-app .nlm-wa-cta {
  display: none !important;
}

/* Footer legal en escena oscura */
html.is-native-app #screenAuth > .app__footer {
  display: block !important;
  flex: 0 0 auto;
  margin-top: auto;
  padding:
    0.85rem max(1rem, env(safe-area-inset-right))
    max(1.15rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  text-align: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html.is-native-app #screenAuth > .app__footer .nlm-fx-orb-wrap {
  display: none !important;
}

html.is-native-app #screenAuth > .app__footer .app__footer-text,
html.is-native-app #screenAuth > .app__footer .app__footer-link,
html.is-native-app #screenAuth > .app__footer .app__footer-sep {
  color: rgba(255, 255, 255, 0.72);
}

html.is-native-app #screenAuth > .app__footer .app__footer-link:hover,
html.is-native-app #screenAuth > .app__footer .app__footer-link:focus-visible {
  color: #ffd0da;
}

html.is-native-app #cookieBanner:not([hidden]) {
  display: flex !important;
  z-index: 13000;
}

/* Login embebido: hoja cristal oscura (mismo lenguaje que modal web) */
html.is-native-app .auth-login-modal,
html.is-native-app .auth-login-modal[hidden],
html.is-native-app .auth-login-modal.is-open {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0;
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2;
  padding: 0 max(1rem, env(safe-area-inset-right)) 0.5rem max(1rem, env(safe-area-inset-left));
  flex: 1 1 auto;
  background: transparent;
  transform: none !important;
  transition: none !important;
}

html.is-native-app .auth-login-modal__backdrop,
html.is-native-app .auth-login-modal__grab,
html.is-native-app .auth-login-modal__close,
html.is-native-app .auth-login-modal__header,
html.is-native-app #authGate,
html.is-native-app #authTabs,
html.is-native-app #registerView,
html.is-native-app .auth-invite-cta,
html.is-native-app .auth-demo,
html.is-native-app .auth-gate__no-invite {
  display: none !important;
}

html.is-native-app .auth-login-modal__dialog {
  --color-text-primary: #fff;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  max-height: none;
  opacity: 0;
  transform: translateY(28px);
  border-radius: 24px;
  overflow: visible;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(ellipse 100% 40% at 50% 0%, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 70%),
    #0d0709;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: none;
}

/* Entrada con el mismo sistema nlm-fade-up del hero web */
html.is-native-app .auth-login-modal__dialog.is-visible {
  animation: nlm-fade-up 0.75s 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.is-native-app .auth-login-modal__title {
  margin: 1.15rem 1.2rem 0.4rem;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

html.is-native-app .auth-login-modal__body {
  padding: 0.35rem 1.2rem 1.35rem;
}

html.is-native-app #loginView {
  display: block !important;
}

html.is-native-app #loginView[hidden] {
  display: block !important;
}

html.is-native-app #authGate ~ #loginView,
html.is-native-app #authGate:not([hidden]) ~ #loginView,
html.is-native-app #authGate ~ #loginView[hidden],
html.is-native-app #authGate:not([hidden]) ~ #loginView[hidden] {
  display: block !important;
}

html.is-native-app #authGate ~ #registerView,
html.is-native-app #authGate:not([hidden]) ~ #registerView {
  display: none !important;
}

html.is-native-app body.auth-login-modal-open {
  overflow: auto;
}

/* Tipografía hero: misma escala/acento que web (un pelín más contenida) */
html.is-native-app #screenAuth .nlm-hero__wordmark {
  font-size: clamp(2.75rem, 13vw, 4.6rem);
  animation: nlm-wordmark-draw 0.75s 0.28s both ease-out;
}

html.is-native-app #screenAuth .nlm-hero__tagline {
  margin-bottom: 0.4rem;
}

/* Inputs / CTA: contraste sobre cristal oscuro */
html.is-native-app .auth-login-modal .form__input,
html.is-native-app .auth-login-modal .form__input--float {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

html.is-native-app .auth-login-modal .form__float-label,
html.is-native-app .auth-login-modal .form__check-label,
html.is-native-app .auth-login-modal .auth-forgot-link,
html.is-native-app .auth-login-modal .auth-support-hint,
html.is-native-app .auth-login-modal .auth-otp-details__summary {
  color: rgba(255, 255, 255, 0.72);
}

html.is-native-app .auth-login-modal .auth-forgot-link:hover,
html.is-native-app .auth-login-modal .auth-support-hint__link {
  color: #ffd0da;
}

html.is-native-app .auth-login-modal .btn--auth-cta.btn--primary,
html.is-native-app .auth-login-modal #loginSubmit {
  border: 0;
  border-radius: 999px;
  background: #5C2430;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(92, 36, 48, 0.45);
}

html.is-native-app .auth-login-modal .form__password-toggle {
  color: rgba(255, 255, 255, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  html.is-native-app .auth-login-modal__dialog,
  html.is-native-app .auth-login-modal__dialog.is-visible,
  html.is-native-app #screenAuth .nlm-hero__wordmark {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── _42-comfort-dopamine.css ── */
/* ============================================================
   NULLUM — _42-comfort-dopamine.css
   Capa de comodidad visual + dopamina para pantallas internas.
   No toca landing/hero. Solo .dashboard--shell y chrome de app.
   Objetivo: quedarse más tiempo sin romper layouts ni flujos.
   ============================================================ */

/* ═══════════════════════════════════════
   1. TABBAR VIVA — pill deslizante + pop
   (el motion legacy apuntaba a .bottom-nav)
   ═══════════════════════════════════════ */

.dashboard--shell .shell-tabbar {
  position: fixed; /* ya lo es; refuerzo para el indicador absolute */
}

/* Pill medido por nullumShell.js — se desliza bajo el tab activo */
.dashboard--shell .shell-tabbar__pill {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 0;
  height: calc(100% - 12px);
  border-radius: var(--shell-r-pill, 999px);
  background: var(--color-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 45%, transparent);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition:
    left var(--dur-normal) var(--ease-spring),
    width var(--dur-fast) var(--ease-snappy),
    opacity var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .shell-tabbar__pill.is-ready {
  opacity: 1;
}

.dashboard--shell .shell-tab {
  position: relative;
  z-index: 1;
  transition:
    background var(--dur-fast) var(--ease-snappy),
    color var(--dur-fast) var(--ease-snappy),
    transform var(--dur-instant) var(--ease-in-back),
    box-shadow var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .shell-tab:active {
  transform: scale(0.92);
}

/* Con pill JS: el acento lo pinta el indicador; sin él, fallback sólido */
.dashboard--shell .shell-tabbar[data-pill="1"] .shell-tab[aria-current="page"] {
  background: transparent;
  box-shadow: none;
}

.dashboard--shell .shell-tabbar:not([data-pill="1"]) .shell-tab[aria-current="page"] {
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 45%, transparent);
  animation: nlm-tab-settle 420ms var(--ease-spring) both;
}

@keyframes nlm-tab-settle {
  0%   { transform: scale(0.88); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.dashboard--shell .shell-tab[aria-current="page"] svg,
.dashboard--shell .shell-tab[aria-current="page"] .shell-tab__icon {
  animation: nav-pop 350ms var(--ease-spring);
}

/* Chips del hub: spring + brillo al activar */
.dashboard--shell .shell-chip {
  transition:
    background var(--dur-fast) var(--ease-snappy),
    color var(--dur-fast) var(--ease-snappy),
    border-color var(--dur-fast) var(--ease-snappy),
    transform var(--dur-normal) var(--ease-spring),
    box-shadow var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .shell-chip:active {
  transform: scale(0.94);
}

.dashboard--shell .shell-chip[aria-current="page"] {
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-accent) 40%, transparent);
  animation: nlm-chip-glow 480ms var(--ease-spring) both;
}

@keyframes nlm-chip-glow {
  0%   { transform: scale(0.94); filter: brightness(1.15); }
  100% { transform: scale(1); filter: brightness(1); }
}


/* ═══════════════════════════════════════
   2. ENTRADA DE PANEL — navegar, no teletransportar
   ═══════════════════════════════════════ */

@keyframes nlm-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Clase .nlm-enter la pone nullumMotion al activar un panel */
.dashboard--shell .nlm-enter {
  animation: nlm-panel-enter var(--dur-slow) var(--ease-out-expo) both;
}

/* Escenarios oscuros: brillo de marca muy suave (comodidad, no ruido) */
@keyframes nlm-stage-breathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.03); }
}

.dashboard--shell #panelStats .panel__body,
.dashboard--shell #panelNutrition .panel__body,
.dashboard--shell #panelCheckIn .panel__body.wci,
.dashboard--shell #panelProfile .panel__body,
.dashboard--shell #panelSession .panel__body,
.dashboard--shell #panelLibrary .panel__body,
.dashboard--shell #panelMessaging .panel__body--messaging,
.dashboard--shell #trainer-dashboard .panel__body {
  animation: nlm-stage-breathe 8s ease-in-out infinite;
}

.dashboard--shell #panelStats .panel__body.nlm-enter,
.dashboard--shell #panelNutrition .panel__body.nlm-enter,
.dashboard--shell #panelCheckIn .panel__body.wci.nlm-enter,
.dashboard--shell #panelProfile .panel__body.nlm-enter,
.dashboard--shell #panelSession .panel__body.nlm-enter,
.dashboard--shell #panelLibrary .panel__body.nlm-enter,
.dashboard--shell #panelMessaging .panel__body--messaging.nlm-enter,
.dashboard--shell #trainer-dashboard .panel__body.nlm-enter {
  animation:
    nlm-panel-enter var(--dur-slow) var(--ease-out-expo) both,
    nlm-stage-breathe 8s ease-in-out 700ms infinite;
}


/* ═══════════════════════════════════════
   3. INICIO — comodidad + vida (pearl con dopamina)
   ═══════════════════════════════════════ */

/* Ambient más presente detrás del feed de inicio */
.dashboard--shell .dashboard__main::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 0 0 0;
  height: 280px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 80% 100%, color-mix(in srgb, var(--color-accent) 10%, transparent) 0%, transparent 70%);
  opacity: 0.9;
}

/* Saludo: entrada suave */
.dashboard--shell .welcome__hello {
  animation: nlm-hello-in 700ms var(--ease-out-expo) both;
}

@keyframes nlm-hello-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    letter-spacing: -0.06em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.03em;
  }
}

/* CTA del día: late y responde al toque */
.dashboard--shell .welcome .welcome-hero {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-spring),
    box-shadow var(--dur-fast) var(--ease-snappy),
    background var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .welcome .welcome-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 48%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: progress-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

.dashboard--shell .welcome .welcome-hero:hover,
.dashboard--shell .welcome .welcome-hero:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px color-mix(in srgb, var(--color-accent) 42%, transparent);
}

.dashboard--shell .welcome .welcome-hero:active {
  transform: scale(0.98);
}

/* Atajos: icono con bounce al tocar; elevación hover desktop */
.dashboard--shell .home-card {
  transition:
    transform var(--dur-normal) var(--ease-spring),
    background var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy),
    border-color var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .home-card:hover {
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  box-shadow: var(--shadow-elev-1);
  transform: translateY(-2px);
}

.dashboard--shell .home-card:active {
  transform: scale(0.96);
}

.dashboard--shell .home-card:active .home-card__icon {
  animation: nav-pop 320ms var(--ease-spring);
}

.dashboard--shell .home-card__icon {
  transition:
    transform var(--dur-normal) var(--ease-spring),
    background var(--dur-fast) var(--ease-snappy),
    color var(--dur-fast) var(--ease-snappy);
}

@media (hover: hover) {
  .dashboard--shell .home-card:hover .home-card__icon {
    transform: scale(1.08) rotate(-4deg);
    background: var(--color-accent);
    color: var(--color-on-accent);
  }
}

/* Widgets del inicio: elevación táctil + stagger visual */
.dashboard--shell .welcome .readiness-widget,
.dashboard--shell .welcome .checkin-streak,
.dashboard--shell .welcome .cycle-week-widget,
.dashboard--shell .welcome .coach-goal-widget,
.dashboard--shell .welcome .week-compare,
.dashboard--shell .welcome .weight-chart-card,
.dashboard--shell .welcome .weekly-split-view,
.dashboard--shell .welcome .progress-pulse,
.dashboard--shell .welcome .habits,
.dashboard--shell .welcome .constancy,
.dashboard--shell .welcome .precision {
  transition:
    transform var(--dur-normal) var(--ease-spring),
    box-shadow var(--dur-fast) var(--ease-snappy),
    border-color var(--dur-fast) var(--ease-snappy);
}

@media (hover: hover) {
  .dashboard--shell .welcome .readiness-widget:hover,
  .dashboard--shell .welcome .checkin-streak:hover,
  .dashboard--shell .welcome .weekly-split-view:hover,
  .dashboard--shell .welcome .progress-pulse:hover,
  .dashboard--shell .welcome .habits:hover,
  .dashboard--shell .welcome .week-compare:hover,
  .dashboard--shell .welcome .weight-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elev-1);
  }
}

/* Días de la semana: feedback inmediato */
.dashboard--shell .weekly-split-view__day {
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-snappy),
    border-color var(--dur-fast) var(--ease-snappy),
    color var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy);
  cursor: pointer;
}

.dashboard--shell .weekly-split-view__day:active {
  transform: scale(0.92);
}

.dashboard--shell .weekly-split-view__day--today {
  box-shadow: 0 8px 18px rgba(26, 26, 26, 0.18);
  animation: nlm-today-pulse 2.4s ease-in-out infinite;
}

@keyframes nlm-today-pulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(26, 26, 26, 0.16); }
  50%      { box-shadow: 0 10px 24px rgba(92, 36, 48, 0.28); }
}


/* ═══════════════════════════════════════
   4. CRISTAL INTERACTIVO — paneles v2
   Las tarjetas de escenario responden al dedo
   ═══════════════════════════════════════ */

.dashboard--shell #panelStats .stx-hero,
.dashboard--shell #panelStats .stx-card,
.dashboard--shell #panelStats .stx-tile,
.dashboard--shell #panelNutrition .card,
.dashboard--shell #panelCheckIn .wci-form,
.dashboard--shell #panelProfile .profile-hero__card,
.dashboard--shell #panelLibrary .library-row,
.dashboard--shell #trainer-dashboard .coach-kpi-card {
  transition:
    transform var(--dur-normal) var(--ease-spring),
    border-color var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy),
    background var(--dur-fast) var(--ease-snappy);
}

@media (hover: hover) {
  .dashboard--shell #panelStats .stx-card:hover,
  .dashboard--shell #panelStats .stx-tile:hover,
  .dashboard--shell #panelNutrition .card:hover,
  .dashboard--shell #trainer-dashboard .coach-kpi-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, #8A5560 55%, transparent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }
}

/* Tabs internas (stats / check-in): pop al activar */
.dashboard--shell .stx-tab.is-active,
.dashboard--shell .wci-tabs__btn.is-active {
  animation: nlm-chip-glow 420ms var(--ease-spring) both;
}

/* KPI / métricas: pop al hacerse visibles (refuerzo) */
.dashboard--shell .stx-ring__big,
.dashboard--shell .stx-tile__value,
.dashboard--shell .coach-kpi-card__val,
.dashboard--shell .home-stat-tile__value {
  display: inline-block;
}

.dashboard--shell .stx-tile__value.is-visible,
.dashboard--shell .coach-kpi-card__val.is-visible,
.dashboard--shell .home-stat-tile__value.is-visible {
  animation: number-pop var(--dur-slow) var(--ease-spring);
}


/* ═══════════════════════════════════════
   5. BOTONES PRIMARIOS — recompensa táctil
   ═══════════════════════════════════════ */

.dashboard--shell .btn--primary,
.dashboard--shell .btn.btn--primary,
.dashboard--shell #startSession,
.dashboard--shell .run-hero__start,
.dashboard--shell .welcome-hero__cta {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-spring),
    box-shadow var(--dur-fast) var(--ease-snappy),
    background var(--dur-fast) var(--ease-snappy),
    filter var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .btn--primary:active,
.dashboard--shell #startSession:active,
.dashboard--shell .run-hero__start:active {
  transform: scale(0.96);
  filter: brightness(0.96);
}

@media (hover: hover) {
  .dashboard--shell .btn--primary:hover,
  .dashboard--shell #startSession:hover,
  .dashboard--shell .run-hero__start:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
  }
}


/* ═══════════════════════════════════════
   6. LISTAS Y FILAS — cascada + press
   ═══════════════════════════════════════ */

.dashboard--shell .split-exercise-row,
.dashboard--shell .workout-set-row,
.dashboard--shell .exercise-row,
.dashboard--shell .library-row,
.dashboard--shell .sf2__card,
.dashboard--shell .coach-tower__card {
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-snappy),
    border-color var(--dur-fast) var(--ease-snappy),
    box-shadow var(--dur-fast) var(--ease-snappy);
}

.dashboard--shell .split-exercise-row:active,
.dashboard--shell .workout-set-row:active,
.dashboard--shell .exercise-row:active,
.dashboard--shell .library-row:active,
.dashboard--shell .sf2__card:active,
.dashboard--shell .coach-tower__card:active {
  transform: scale(0.985);
}

/* Completar set: flash de éxito */
@keyframes nlm-done-flash {
  0%   { background: color-mix(in srgb, var(--color-success) 28%, transparent); }
  100% { background: transparent; }
}

.dashboard--shell .workout-set-row.is-done,
.dashboard--shell .set-row.is-done,
.dashboard--shell [data-set].is-done {
  animation: nlm-done-flash 700ms var(--ease-snappy) both;
}


/* ═══════════════════════════════════════
   7. COMFORT SCROLL — menos fatiga visual
   ═══════════════════════════════════════ */

.dashboard--shell .dashboard__content {
  scroll-behavior: smooth;
}

.dashboard--shell .panel__body {
  /* Ritmo vertical más aireado entre bloques densos */
  --nlm-block-gap: clamp(10px, 2.2vw, 14px);
}

.dashboard--shell .card + .card {
  margin-top: max(var(--shell-gap, 12px), var(--nlm-block-gap, 12px));
}

/* Focus rings más suaves (comodidad, sin perder accesibilidad) */
.dashboard--shell :focus-visible {
  outline-color: color-mix(in srgb, var(--color-accent-gold) 85%, #fff);
  outline-offset: 3px;
  transition: outline-offset var(--dur-fast) var(--ease-snappy);
}


/* ═══════════════════════════════════════
   8. SIDEBAR — entradas con cascada
   ═══════════════════════════════════════ */

.dashboard--shell .sidebar.is-open .sidebar__link,
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link {
  animation: slide-up-in var(--dur-slow) var(--ease-spring) both;
}

.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(1),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(1) { animation-delay: 40ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(2),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(2) { animation-delay: 80ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(3),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(3) { animation-delay: 120ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(4),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(4) { animation-delay: 160ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(5),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(5) { animation-delay: 200ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(6),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(6) { animation-delay: 240ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(7),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(7) { animation-delay: 280ms; }
.dashboard--shell .sidebar.is-open .sidebar__link:nth-child(n+8),
.dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link:nth-child(n+8) { animation-delay: 300ms; }


/* ═══════════════════════════════════════
   8b. COACH INICIO — ritmo + contraste en clientes
   ═══════════════════════════════════════ */

.dashboard[data-role="trainer"] .welcome .home-grid {
  order: 2;
  margin-top: 4px;
  margin-bottom: 4px;
}

.dashboard[data-role="trainer"] .welcome .coach-tower {
  order: 3;
}

/* Torre: hereda tokens del shell; no forzar cream/oscuro aquí. */
#screenDashboard.dashboard--shell .coach-tower .coach-tower__card,
#screenDashboard.dashboard--shell .coach-tower .coach-tower__item {
  color: inherit;
}

#screenDashboard.dashboard--shell .coach-tower .coach-tower__grid {
  align-items: stretch;
}

/* Atajos inicio (3 cols): el subtítulo se corta en móvil — título basta */
.dashboard--shell .home-grid[data-role="member"] .home-card__sub {
  display: none;
}

/* Check-in: badge franja matutina legible en modo noche */
html[data-theme-mode="dark"] .wci-morning-badge {
  color: #f3d4d8;
  background: color-mix(in srgb, #5C2430 42%, var(--color-surface, #1a1416));
  border-left-color: #e8a8b0;
}


/* ═══════════════════════════════════════
   9. TRAINING DESIGNER — sin brutalismo (miembro)
   _05 deja box-shadow 3px 3px 0; v2 no lo anulaba.
   ═══════════════════════════════════════ */

.dashboard[data-role="member"] .split-day,
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day {
  box-shadow: none;
  border-width: 1px;
}

.dashboard[data-role="member"] .split-day__header,
#screenDashboard.dashboard--shell #panelTrainingDesigner .split-day__header {
  border-bottom-width: 1px;
}

/* Coach editor: conservar peso visual técnico, solo suavizar el bloque duro */
.dashboard[data-role="trainer"] #panelTrainingDesigner .split-day {
  box-shadow: var(--shadow-elev-1, 0 8px 24px rgba(0, 0, 0, 0.12));
  border-radius: 12px;
}


/* ═══════════════════════════════════════
   10. EMPTY STATES TIPOGRAFICOS + CELEBRACIONES
   ═══════════════════════════════════════ */

.nlm-empty-state__mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong, var(--color-border));
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: breathe 3s ease-in-out infinite;
  flex-shrink: 0;
}

/* Si hay marca tipográfica, oculta el nodo emoji legacy */
.nlm-empty-state:has(.nlm-empty-state__mark) .nlm-empty-state__illustration {
  display: none;
}

/* Hábitos guardados / paso check-in completado */
@keyframes nlm-celebrate-flash {
  0%   { transform: scale(0.96); filter: brightness(1.2); }
  55%  { transform: scale(1.02); }
  100% { transform: scale(1); filter: brightness(1); }
}

.habits__done.is-celebrate,
.wci-stepper__item.is-done.is-celebrate .wci-stepper__btn {
  animation: nlm-celebrate-flash 480ms var(--ease-spring) both;
}

.wci-stepper__item.is-done .wci-stepper__num {
  position: relative;
}

.wci-stepper__item.is-done .wci-stepper__num::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-success, #2F6B5E) 70%, transparent);
  animation: check-ring 500ms ease-out both;
  pointer-events: none;
}


/* ═══════════════════════════════════════
   11. REDUCED MOTION
   ═══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .dashboard--shell .shell-tab[aria-current="page"],
  .dashboard--shell .shell-tab[aria-current="page"] svg,
  .dashboard--shell .shell-chip[aria-current="page"],
  .dashboard--shell .nlm-enter,
  .dashboard--shell #panelStats .panel__body,
  .dashboard--shell #panelNutrition .panel__body,
  .dashboard--shell #panelCheckIn .panel__body.wci,
  .dashboard--shell #panelProfile .panel__body,
  .dashboard--shell #panelSession .panel__body,
  .dashboard--shell #panelLibrary .panel__body,
  .dashboard--shell #panelMessaging .panel__body--messaging,
  .dashboard--shell #trainer-dashboard .panel__body,
  .dashboard--shell .welcome__hello,
  .dashboard--shell .welcome .welcome-hero::after,
  .dashboard--shell .weekly-split-view__day--today,
  .dashboard--shell .stx-tab.is-active,
  .dashboard--shell .wci-tabs__btn.is-active,
  .dashboard--shell .sidebar.is-open .sidebar__link,
  .dashboard--shell .sidebar[aria-hidden="false"] .sidebar__link,
  .dashboard--shell .workout-set-row.is-done,
  .dashboard--shell .set-row.is-done,
  .nlm-empty-state__mark,
  .habits__done.is-celebrate,
  .wci-stepper__item.is-done.is-celebrate .wci-stepper__btn,
  .wci-stepper__item.is-done .wci-stepper__num::after {
    animation: none !important;
  }

  .dashboard--shell .shell-tabbar__pill {
    transition: none;
  }

  .dashboard--shell .dashboard__content {
    scroll-behavior: auto;
  }

  .dashboard--shell .home-card:hover,
  .dashboard--shell .welcome .welcome-hero:hover {
    transform: none;
  }
}
