/* Estilos comunes de MyGymLog Web.
   Colores y jerarquía de texto: PROJECT_RULES.md (módulo mobile).
   Animaciones: solo transform y opacity. Con "reducir movimiento" del sistema solo quedan fundidos de opacidad.
   Índice: 1 Tema · 2 Base · 3 Orbes · 4 Cabecera · 5 Botones · 6 Portada
           7 Dispositivos · 8 Secciones y tarjetas · 9 Pie · 10 Animaciones
           11 Menú de la cabecera · 12 Apartados de funciones (al final del archivo) */

/* ---------- 1. Tema ---------- */
:root {
  /* Claro (por defecto) */
  --fondo: #F4F4F4;
  --tarjeta: #FFFFFF;
  --texto-titulo: #000000;
  --texto-cuerpo: #333333;
  --texto-subtitulo: #666666;
  --borde-sutil: rgba(0, 0, 0, 0.08);
  --acento: #FF7F00;                 /* naranja de marca (R.color.naranja) */
  --acento-suave: rgba(255, 127, 0, 0.12);
  /* Accesibilidad: #FF7F00 es solo marca (orbes, iconos, bordes). Botones con texto y texto naranja
     usan variantes que cumplen AA. Diferencia consciente respecto a la app. */
  --acento-boton: #C44D00;           /* blanco sobre él: 4,76:1 */
  --acento-texto: #A64000;           /* texto naranja sobre fondo claro y sobre el tinte de las etiquetas: 5,1:1 */
  --degradado: linear-gradient(100deg, #BF4A00, #E06A00);
  --texto-sobre-acento: #FFFFFF;
  --orbe-intensidad: 1.6;            /* PROJECT_RULES: claro x1,6 · oscuro x1 (getAmbientOrbIntensity) */
  --ver-logo-claro: inline;
  --ver-logo-oscuro: none;
  --ver-luna: block;
  --ver-sol: none;
  --radio-tarjeta: 22px;
  --ancho-max: 1120px;
  color-scheme: light;
}

/* AMOLED: el oscuro con el fondo negro (como la app) */
:root[data-tema="oscuro"][data-amoled] { --fondo: #000000; }

/* Oscuro elegido por la persona */
:root[data-tema="oscuro"] {
  --fondo: #212121;
  --tarjeta: #171719;
  --texto-titulo: #FFFFFF;
  --texto-cuerpo: #F4F4F4;
  --texto-subtitulo: #CCCCCC;
  --borde-sutil: rgba(244, 244, 244, 0.08);
  --orbe-intensidad: 1;
  --acento-texto: #FF7F00;
  --degradado: linear-gradient(100deg, #FF7F00, #FFB347);
  --ver-logo-claro: none;
  --ver-logo-oscuro: inline;
  --ver-luna: none;
  --ver-sol: block;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto-cuerpo);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;   /* clip no crea un contenedor de scroll: la cabecera pegajosa no se descoloca en móvil */
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 { color: var(--texto-titulo); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 9vw, 4.5rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.subtitulo { color: var(--texto-subtitulo); }

a { color: var(--texto-titulo); text-decoration-color: var(--acento); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 3px; border-radius: 8px; }

.contenedor { width: min(100% - 40px, var(--ancho-max)); margin-inline: auto; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--acento-boton); color: var(--texto-sobre-acento); font-weight: 800;
  padding: 10px 18px; border-radius: 999px; z-index: 30;
}
.saltar:focus { left: 12px; top: 12px; }

/* ---------- 3. Orbes de fondo (como el fondo ambiental de Inicio en la app) ---------- */
.orbes { position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none; }   /* sin recorte: al ocultarse la barra del navegador en móvil no queda un borde duro en el degradado */
.orbe { position: absolute; }
.orbe i {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acento) 55%, transparent), transparent);
  opacity: calc(0.34 * var(--orbe-intensidad));
  animation: deriva 44s ease-in-out infinite alternate;
}
.orbe-1 { width: 90vmax; height: 90vmax; left: -35vmax; top: -40vmax; }
.orbe-2 { width: 70vmax; height: 70vmax; right: -30vmax; top: 18vh; }
.orbe-2 i { animation-duration: 58s; animation-delay: -9s; }
.orbe-3 { width: 80vmax; height: 80vmax; left: 10vmax; bottom: -55vmax; }
.orbe-3 i { animation-duration: 50s; animation-delay: -17s; }

/* ---------- 4. Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  padding: 12px 0 20px;
  /* Arriba del todo es transparente: los orbes pasan por detrás sin quedar recortados.
     Al desplazarse gana un fondo casi opaco que se desvanece por abajo (sin línea de borde). */
  background: transparent;
  transition: background-color 0.3s ease;
}
.cabecera.con-borde {
  /* Fondo en degradado: casi sólido donde está el texto y desvanecido en el último tramo, así el resplandor naranja de los
     orbes no queda cortado por una línea dura bajo la cabecera y el contenido que pasa por debajo no molesta al leer */
  background: var(--fondo);
  background: linear-gradient(to bottom, var(--fondo) 0%, color-mix(in srgb, var(--fondo) 99%, transparent) 70%, transparent 100%);
}
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.marca { display: inline-flex; line-height: 0; }
.marca img { height: 36px; width: auto; }
.logo-claro { display: var(--ver-logo-claro); }
.logo-oscuro { display: var(--ver-logo-oscuro); }

.cabecera-derecha { display: flex; align-items: center; gap: 8px; }
.nav { display: none; gap: 4px; }
.nav a { color: var(--texto-cuerpo); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--acento-suave); }

.idiomas { display: flex; gap: 2px; }
.idioma { padding: 6px 8px; border-radius: 999px; font-weight: 700; font-size: 0.8125rem; text-decoration: none; color: var(--texto-subtitulo); }
.idioma:hover { color: var(--texto-titulo); }
.idioma[aria-current] { background: var(--acento-suave); color: var(--texto-titulo); }
@media (max-width: 480px) { .idioma { padding: 6px 5px; font-size: 0.75rem; } .cabecera-derecha { gap: 4px; } }
.tema-boton {
  width: 44px; height: 44px; border-radius: 999px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tarjeta); border: 1px solid var(--borde-sutil);
  color: var(--texto-titulo); cursor: pointer;
}
.tema-boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tema-boton .icono-luna { display: var(--ver-luna); }
.tema-boton .icono-sol { display: var(--ver-sol); }
.tema-boton:hover { border-color: var(--acento); }

@media (min-width: 900px) { .nav { display: flex; } }   /* con 4 idiomas, el menú largo solo cabe a partir de 900 px */

/* ---------- 5. Botones (cápsula, 46 px) ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px;
  border-radius: 999px; border: 0;
  font: inherit; font-size: 0.9375rem; font-weight: 800;
  text-decoration: none; cursor: pointer;
  background: var(--acento-boton); color: var(--texto-sobre-acento);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.boton:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* Tienda aún no disponible: botón neutro propio, sin logos de marca ni enlace.
   Al publicar las apps se sustituye por la insignia oficial sin modificar. */
.tienda { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tienda .boton[aria-disabled="true"] {
  background: var(--tarjeta); color: var(--texto-titulo);
  border: 1px solid var(--borde-sutil); cursor: default;
}
.tienda .boton[aria-disabled="true"]:hover { filter: none; transform: none; }
.tienda small { color: var(--texto-subtitulo); font-size: 0.8125rem; padding-left: 14px; }

/* ---------- 6. Portada ---------- */
.portada { padding: 28px 0 56px; }
.portada-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.portada-texto { text-align: center; }
.portada-texto .subtitulo { max-width: 34em; margin-inline: auto; font-size: 1.125rem; }
.degradado {
  color: var(--acento-texto);
  background: var(--degradado);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.acciones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.aviso-tiendas { margin-top: 14px; font-size: 0.875rem; color: var(--texto-subtitulo); }

@media (min-width: 900px) {
  .portada { padding: 56px 0 96px; }
  .portada-grid { grid-template-columns: 1fr 1.05fr; }
  .portada-texto { text-align: left; }
  .portada-texto .subtitulo { margin-inline: 0; }
  .acciones { justify-content: flex-start; }
}

/* ---------- 7. Dispositivos dibujados en CSS (marcos genéricos) ---------- */
/* Escenario: las medidas de cada dispositivo son porcentajes de su ancho, así todo escala junto */
.escenario { position: relative; width: min(100%, 580px); aspect-ratio: 1 / 1; margin-inline: auto; }
.escenario::before {          /* resplandor tras los dispositivos */
  content: ""; position: absolute; inset: 6% 4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 127, 0, 0.30), rgba(255, 127, 0, 0));
  opacity: calc(0.55 * var(--orbe-intensidad));
}

.dispositivo { position: absolute; will-change: transform; }
.interior { animation: entra-dispositivo 2s cubic-bezier(0.16, 1, 0.3, 1) both; }

.d-android { left: 3%;  top: 3%;  width: 40%; z-index: 2; --giro: -5deg; --dx: -85vw; --dy: 0px; }
.d-iphone  { left: 55%; top: 11%; width: 40%; z-index: 1; --giro: 5deg; --dx: 85vw; --dy: 0px; }
.d-wear    { left: -3%; top: 71%; width: 27%; z-index: 3; --giro: -8deg; --dx: -85vw; --dy: 30vh; }
.d-apple   { left: 79%; top: 73%; width: 23%; z-index: 3; --giro: 6deg; --dx: 85vw; --dy: 30vh; }

.dispositivo[data-i="1"] .interior { animation-delay: 0.5s; }
.dispositivo[data-i="2"] .interior { animation-delay: 0.9s; }
.dispositivo[data-i="3"] .interior { animation-delay: 1.4s; }
.dispositivo[data-i="4"] .interior { animation-delay: 1.7s; }

/* Móvil genérico: marco liso, sin muesca ni botones de ningún fabricante */
.movil {
  position: relative; aspect-ratio: 9 / 19.5;
  border-radius: 13% / 6%; padding: 3%;
  background: #0e0e10;
  box-shadow:
    inset 0 0 0 2px #3a3a40, inset 0 0 0 4px #09090a,
    0 40px 60px -30px rgba(0, 0, 0, 0.6), 0 12px 22px -12px rgba(0, 0, 0, 0.45);
}

.movil .pantalla { width: 100%; height: 100%; border-radius: 10.5% / 4.9%; overflow: hidden; background: #000; }
.movil .isla {                                  /* isla: cápsula negra simple, solo en la variante iPhone */
  position: absolute; top: 2.8%; left: 50%; width: 27%; aspect-ratio: 3.3 / 1;
  border-radius: 999px; background: #000; transform: translateX(-50%);
}
.movil .camara {                                /* punto de cámara frontal, solo en la variante Android */
  position: absolute; top: 3.4%; left: 50%; width: 3.6%; aspect-ratio: 1; border-radius: 50%;
  background: #000; box-shadow: 0 0 0 2px #1d1d20; transform: translateX(-50%);
}

/* Reloj genérico (redondo para Wear OS, rectangular para el otro) con correa dibujada */
.reloj {
  position: relative; aspect-ratio: 1; border-radius: 50%; padding: 6%;
  background: #101012;
  box-shadow:
    inset 0 0 0 3px #3d3d43, inset 0 0 0 6px #09090a,
    0 30px 44px -24px rgba(0, 0, 0, 0.6), 0 10px 18px -10px rgba(0, 0, 0, 0.45);
}
.reloj::before, .reloj::after {
  content: ""; position: absolute; left: 50%; width: 58%; height: 42%;
  transform: translateX(-50%); z-index: -1;
  background: linear-gradient(#2b2b2f, #17171a);
}
.reloj::before { top: -28%; border-radius: 16% 16% 0 0 / 22% 22% 0 0; }
.reloj::after  { bottom: -28%; border-radius: 0 0 16% 16% / 0 0 22% 22%; }
/* Cuerpo del Apple Watch: medidas tomadas del mockup real de iOS (Desktop/mockup/ios/onboarding):
   caja 474 x 534 px (proporción 0,888), pantalla 402 x 482, marco de 36 px a los lados y ~26 px arriba y abajo,
   y corona a la derecha. La correa es la misma que la del reloj de Android. */
.reloj.rect { aspect-ratio: 0.8876; border-radius: 28.7% / 25.5%; padding: 5.5% 7.6%; }
/* La correa es la misma que la del reloj redondo (reglas .reloj::before y .reloj::after de arriba) */
.corona {                                       /* corona digital del lateral derecho */
  position: absolute; z-index: -1; right: -5.2%; top: 21.3%; width: 5.7%; height: 17.8%;
  border-radius: 0 30% 30% 0 / 0 10% 10% 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #1b1b1e, #35353a);
}
.reloj .pantalla { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #000; }
.reloj.rect .pantalla { border-radius: 27.2% / 22.8%; }
.reloj.rect .pantalla { position: relative; }
.reloj.rect .pantalla img { position: absolute; left: 3.5%; top: 3.5%; width: 93%; height: 93%; margin: 0; border-radius: 25.3% / 21.3%; }   /* captura con esquinas redondeadas, concéntricas con la pantalla (113 px - 14,6 px de margen), cerca del negro */
/* En watch-menu los botones quedan 9 px más abajo que el centro (61 px de aire arriba y 43 abajo): se sube un 1,8 % para centrarlos a la vista */
.reloj.rect .pantalla img.ajuste-menu { transform: translateY(-1.8%); }

.pantalla img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 8. Secciones y tarjetas ---------- */
.seccion { padding: 72px 0; }
.seccion-cabecera { text-align: center; max-width: 40em; margin: 0 auto 40px; }
.seccion-cabecera .subtitulo { font-size: 1.0625rem; }

/* "Un día con MyGymLog": pestañas, texto y móvil + reloj juntos */
/* Sección fijada: el carril mide 3 pantallas y el contenido se queda pegado arriba mientras el día avanza */
.dia { padding: 0; }
.dia-carril { height: 300vh; }
.dia-fijo {
  position: sticky; top: 64px; min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; justify-content: center; padding-block: 12px 24px;
}
.dia .seccion-cabecera { margin-bottom: 16px; }
.dia h2 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); margin-bottom: 0.3em; }
@media (max-width: 899px) { .dia .seccion-cabecera .subtitulo { display: none; } }   /* en móvil todo debe caber fijado en una pantalla */
.tabs {
  display: flex; gap: 8px; width: fit-content; max-width: 100%; margin: 0 auto 20px;
  overflow-x: auto; padding: 4px; scrollbar-width: none; position: relative;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; position: relative; overflow: hidden; min-height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--borde-sutil);
  background: var(--tarjeta); color: var(--texto-subtitulo);
  font: inherit; font-weight: 700; cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease;
}
.tab:hover { color: var(--texto-titulo); }
.tab[aria-selected="true"] { color: var(--texto-titulo); border-color: var(--acento); }
.dia-tiempo { display: flex; align-items: center; gap: 16px; width: min(100%, 520px); margin: 0 auto 20px; }
.hora {
  min-width: 3.4em; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.375rem;
  color: var(--texto-titulo); letter-spacing: 0.02em;
}
.pista { position: relative; flex: 1; height: 4px; border-radius: 999px; background: var(--borde-sutil); overflow: hidden; }
.pista i { position: absolute; inset: 0; background: var(--acento); transform: scaleX(0); transform-origin: left; }

.dia-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; justify-items: center; }
.paneles { display: grid; width: 100%; text-align: center; }
.panel {
  grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translate3d(0, 12px, 0);
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s linear 0.8s;
}
.panel.activo { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
html:not(.js) .panel { grid-area: auto; opacity: 1; visibility: visible; transform: none; margin-bottom: 24px; }
.panel h3 { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 800; }
.panel p { color: var(--texto-subtitulo); font-size: 1.0625rem; margin: 0 auto; max-width: 28em; }
.etiqueta {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--acento-suave); color: var(--acento-texto);
  font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.02em;
}

.dia-escenario { position: relative; width: min(100%, 300px, 36vh); aspect-ratio: 1 / 1.02; order: -1; }
.cielo {                                         /* luz ambiente del momento del día; JS regula la opacidad */
  position: absolute; inset: 4% -4%; border-radius: 50%; opacity: 0; pointer-events: none;
}
.cielo-1 { background: radial-gradient(closest-side, rgba(255, 196, 90, 0.55), rgba(255, 196, 90, 0)); }
.cielo-2 { background: radial-gradient(closest-side, rgba(255, 127, 0, 0.55), rgba(255, 127, 0, 0)); }
.cielo-3 { background: radial-gradient(closest-side, rgba(255, 84, 40, 0.50), rgba(255, 84, 40, 0)); }
.cielo-4 { background: radial-gradient(closest-side, rgba(150, 100, 255, 0.40), rgba(150, 100, 255, 0)); }
.cielo-5 { background: radial-gradient(closest-side, rgba(70, 110, 255, 0.40), rgba(70, 110, 255, 0)); }
.dia-movil { position: absolute; left: 36%; top: 0; width: 48%; }
/* El marco cambia de Android (punto de cámara) a iPhone (isla) con cada momento */
.dia-movil .camara, .dia-movil .isla { transition: opacity 0.6s ease; }
.dia-movil[data-plataforma="iphone"] .camara { opacity: 0; }
.dia-movil[data-plataforma="android"] .isla { opacity: 0; }
.plataforma {
  min-width: 5.2em; text-align: center; padding: 4px 12px; border-radius: 999px;
  background: var(--acento-suave); color: var(--acento-texto); font-size: 0.8125rem; font-weight: 800;
}
.dia-reloj { position: absolute; left: 0; top: 50%; width: 32%; z-index: 2; isolation: isolate; }
.dia-reloj .reloj { transition: opacity 0.6s ease; }
.dia-reloj .rel-wear { position: absolute; left: -8%; top: 0; width: 116%; }   /* Wear OS algo más ancho: su pantalla redonda se ve del mismo tamaño que la del Apple Watch */
/* Una sola correa fija detrás de los dos relojes: al cambiar de reloj solo se intercambia la caja, la correa no parpadea ni se duplica */
.dia-reloj .reloj::before, .dia-reloj .reloj::after { display: none; }
.dia-reloj::before, .dia-reloj::after {
  content: ""; position: absolute; left: 50%; width: 58%; height: 42%; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(#2b2b2f, #17171a);
}
.dia-reloj::before { top: -28%; border-radius: 16% 16% 0 0 / 22% 22% 0 0; }
.dia-reloj::after { bottom: -28%; border-radius: 0 0 16% 16% / 0 0 22% 22%; }
.dia-reloj[data-plataforma="iphone"] .rel-wear { opacity: 0; }
.dia-reloj[data-plataforma="android"] .rel-apple { opacity: 0; }
.capa { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.capa.activa { opacity: 1; }
.dia .pantalla { position: relative; }

@media (min-width: 900px) {
  .dia-cuerpo { grid-template-columns: 1fr 1fr; gap: 56px; }
  .paneles { text-align: left; }
  .panel p { margin-inline: 0; }
  .dia-escenario { order: 0; width: min(100%, 440px, 46vh); }
}

/* Personalización: selector de color y tema con una interfaz de ejemplo dibujada en CSS */
.oculto { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.oculto-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.personaliza-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.grupo { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.grupo legend { padding: 0; margin-bottom: 14px; font-weight: 700; color: var(--texto-titulo); }
.grupo legend strong { color: var(--acento-texto); }

.muestras { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
@media (max-width: 640px) { .muestras { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 320px; } }
.muestra { display: block; cursor: pointer; border-radius: 50%; aspect-ratio: 1; position: relative; }
.muestra i { position: absolute; inset: 4px; border-radius: 50%; background: var(--m, #FF7F00); transition: transform 0.25s ease; }
.muestra:hover i { transform: scale(1.1); }
input:checked + .muestra { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--texto-titulo); }
input:focus-visible + .muestra, input:focus-visible + .chip-paleta, input:focus-visible + label { outline: 3px solid var(--acento-texto); outline-offset: 3px; }

.paletas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; max-width: 520px; }
.paletas input#paleta-multi + .chip-paleta { grid-column: 1 / -1; }
@media (max-width: 480px) { .paletas { grid-template-columns: minmax(0, 1fr); } }   /* nombres largos (neerlandés) no caben en dos columnas */
.chip-paleta {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 10px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--borde-sutil); background: var(--tarjeta);
  color: var(--texto-subtitulo); font-weight: 700; transition: color 0.3s ease, border-color 0.3s ease;
}
.chip-paleta { min-width: 0; white-space: nowrap; }
.chip-paleta i { flex: none; width: 52px; height: 22px; border-radius: 999px; background: var(--g, #FF7F00); }
input:checked + .chip-paleta { color: var(--texto-titulo); border-color: var(--texto-titulo); }

.segmentado { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--tarjeta); border: 1px solid var(--borde-sutil); }
.segmentado label {
  min-height: 40px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: 999px;
  cursor: pointer; font-weight: 700; color: var(--texto-subtitulo); transition: background-color 0.3s ease, color 0.3s ease;
}
.segmentado input:checked + label { background: var(--acento-boton); color: var(--texto-sobre-acento); }

.personaliza-escenario {
  --d-c1: #FF7F00; --d-c2: #FF7F00; --d-c3: #FF7F00; --d-c4: #FF7F00; --d-c5: #FF7F00;
  position: relative; width: min(54vw, 220px); aspect-ratio: 1 / 1.1; margin: 0 auto;
}
/* Contenedor fijo (móvil): se queda bajo la cabecera con su propio fondo mientras se eligen colores */
.personaliza-fijo {
  order: -1; position: sticky; top: 64px; z-index: 6; padding: 8px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: transparent; border-bottom: 1px solid transparent; transition: background-color 0.2s ease;
}
.personaliza-fijo.pegado { background: var(--fondo); }
.personaliza-fijo::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 36px; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; background: linear-gradient(to bottom, var(--fondo), transparent); }
.personaliza-fijo.pegado::after { opacity: 1; }
@media (max-width: 899px) { .personaliza-fijo { margin-inline: -20px; padding-inline: 20px; } }   /* el bloque fijo ocupa todo el ancho de la pantalla, sin dejar ver el contenido por los lados */
.personaliza-escenario::before {
  content: ""; position: absolute; inset: 6% 0; border-radius: 50%; opacity: 0.55; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--d-c1) 60%, transparent), transparent);
  transition: background 0.5s ease;
}
.personaliza-movil { position: absolute; left: 26%; top: 0; width: 48%; }
.personaliza-movil .pantalla { container-type: inline-size; }   /* las unidades cqw de la interfaz de ejemplo miden esta pantalla */
.pers-reloj { position: absolute; z-index: 2; isolation: isolate; }
/* Los dos relojes van a los lados del móvil, a la misma altura, sin tapar su pantalla */
.pers-wear { left: -4%; top: 62%; width: 29%; }
.pers-apple { right: -4%; top: 62%; width: 25.5%; }

/* Menú del reloj de ejemplo: cuatro botones con los colores elegidos */
.demo-reloj { position: relative; width: 100%; height: 100%; background: #000; }
.demo-reloj .bt { position: absolute; display: grid; place-items: center; border-radius: 50%; transition: background-color 0.5s ease; }
.demo-reloj .bt svg { width: 52%; height: 52%; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-reloj .b1 { background: var(--d-c1); } .demo-reloj .b2 { background: var(--d-c2); }
.demo-reloj .b3 { background: var(--d-c3); } .demo-reloj .b4 { background: var(--d-c4); }
.demo-reloj.redondo .bt { width: 36%; aspect-ratio: 1; }
.demo-reloj.redondo .b1 { left: 32%; top: 5%; } .demo-reloj.redondo .b2 { left: 5%; top: 32%; }
.demo-reloj.redondo .b3 { left: 59%; top: 32%; } .demo-reloj.redondo .b4 { left: 32%; top: 59%; }
/* Apple Watch: los cuatro botones, centrados en la pantalla (en horizontal y en vertical) */
.demo-reloj.cuadrado { display: grid; grid-template-columns: repeat(2, 40%); gap: 7% 7%; place-content: center; }
.demo-reloj.cuadrado .bt { position: static; width: 100%; aspect-ratio: 1; }

/* Interfaz de ejemplo (no es una captura real): colores y tema salen de variables */
.demo-ui {
  --d-fondo: #212121; --d-tarjeta: #171719; --d-sub: #CCCCCC;
    --d-orbe-op: 0.5;
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; height: 100%; display: flex; flex-direction: column;
  padding: 11cqw 6cqw 6cqw; background: var(--d-fondo); transition: background-color 0.5s ease;
}
.d-vista { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4cqw; position: relative; z-index: 1; }
.demo-ui[data-demo-tema="claro"] { --d-fondo: #F4F4F4; --d-tarjeta: #FFFFFF; --d-sub: #666666; --d-orbe-op: 0.8; }
.demo-ui[data-demo-tema="amoled"] { --d-fondo: #000000; --d-tarjeta: #141416; --d-orbe-op: 0.32; }
.d-cab { display: flex; align-items: center; gap: 3cqw; height: 8cqw; }
.d-logo { width: 14cqw; fill: none; stroke: var(--d-c1); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s ease; }
.d-barra { display: block; height: 2.6cqw; border-radius: 999px; background: var(--d-sub); opacity: 0.45; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w80 { width: 80%; }
.d-tarjeta { background: var(--d-tarjeta); border-radius: 5cqw; padding: 4cqw; transition: background-color 0.5s ease; }
.d-grande { display: flex; align-items: center; gap: 5cqw; }
.d-anillo { width: 22cqw; flex: none; }
.d-pista { fill: none; stroke: var(--d-sub); stroke-opacity: 0.25; stroke-width: 5; }
.d-arco { fill: none; stroke: var(--d-c1); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 64 94.2; transition: stroke 0.5s ease; }
.d-lineas { flex: 1; display: grid; gap: 3cqw; }
.d-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.d-fila .d-tarjeta { display: grid; gap: 3cqw; }
.d-franja { display: block; height: 8cqw; border-radius: 3cqw; transition: background-color 0.5s ease; }
.f2 { background: var(--d-c2); } .f3 { background: var(--d-c3); }
.d-grafica { flex: 1; display: flex; align-items: flex-end; gap: 3cqw; min-height: 24cqw; }
.d-col { flex: 1; border-radius: 2cqw 2cqw 1cqw 1cqw; background: var(--d-c4); transition: background-color 0.5s ease; }
.h1 { height: 35%; } .h2 { height: 55%; } .h3 { height: 45%; } .h4 { height: 75%; } .h5 { height: 60%; } .h6 { height: 90%; }
.d-nav { display: flex; justify-content: space-around; align-items: center; height: 11cqw; padding: 0 4cqw; border-radius: 999px; background: var(--d-tarjeta); transition: background-color 0.5s ease; }
.d-nav span { width: 5cqw; height: 5cqw; border-radius: 50%; background: var(--d-sub); opacity: 0.4; }
.d-nav .activo { width: 9cqw; border-radius: 999px; background: var(--d-c5); opacity: 1; transition: background-color 0.5s ease; }

/* Orbes del fondo ambiental (existen en Android y en iOS; su intensidad depende del tema) */
.d-orbe { position: absolute; border-radius: 50%; z-index: 0; pointer-events: none; opacity: var(--d-orbe-op); transition: opacity 0.5s ease;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--d-c1) 60%, transparent), transparent); }
.d-orbe-1 { width: 95cqw; height: 95cqw; left: -35cqw; top: -30cqw; }
.d-orbe-2 { width: 80cqw; height: 80cqw; right: -35cqw; bottom: 10cqw; background: radial-gradient(closest-side, color-mix(in srgb, var(--d-c3) 50%, transparent), transparent); }
.d-tarjeta { background-image: linear-gradient(135deg, color-mix(in srgb, var(--d-c1) 24%, transparent), transparent 65%); }
.demo-ui[data-diseno="clasico"] .d-tarjeta { border-radius: 3cqw; }
.f4 { background: var(--d-c4); }
@media (min-width: 900px) {
  .personaliza-cuerpo { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .personaliza-cuerpo { align-items: start; }
  .personaliza-fijo { order: 0; top: 90px; padding: 0; background: none; border: 0; }
  .personaliza-escenario { width: min(100%, 420px); }
}

/* Tiendas y plataformas */
.plataformas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.pastilla {
  padding: 8px 18px; border-radius: 999px;
  background: var(--tarjeta); border: 1px solid var(--borde-sutil);
  color: var(--texto-titulo); font-weight: 600;
}
.tiendas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.tiendas .tienda { align-items: center; }
.tiendas .tienda small { padding-left: 0; }

/* ---------- 9. Pie ---------- */
.pie { padding: 40px 0 56px; text-align: center; color: var(--texto-subtitulo); font-size: 0.9375rem; border-top: 1px solid var(--borde-sutil); }
.pie a { color: var(--texto-subtitulo); }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; margin-bottom: 12px; }

.enlace-boton {
  background: none; border: 0; padding: 0; margin-left: 12px; font: inherit; cursor: pointer;
  color: var(--texto-subtitulo); text-decoration: underline; text-decoration-color: var(--acento); text-underline-offset: 3px;
}

/* ---------- 10. Animaciones ---------- */
@keyframes entra-dispositivo {
  from { transform: translate3d(var(--dx), var(--dy), 0) rotate(calc(var(--giro) * 4)); }
  to   { transform: translate3d(0, 0, 0) rotate(var(--giro)); }
}
@keyframes entra-texto {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes deriva {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to   { transform: translate3d(5%, 4%, 0) scale(1.08); }
}

/* Hasta que la página está pintada (JavaScript añade "listo") los elementos de entrada esperan
   ocultos; así la animación empieza cuando se ve y no mientras carga. */
.js:not(.listo) .interior,
.js:not(.listo) .entra,
.js:not(.listo) .orbes { animation: none; opacity: 0; }

/* Texto de la portada: entradas escalonadas */
.entra { animation: entra-texto 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.orbes { animation: aparece 3s ease backwards; }
@keyframes aparece { from { opacity: 0; } }
@keyframes aparece-suave { from { opacity: 0; } }
@keyframes entra-arriba {
  from { opacity: 0; transform: translate3d(0, -24px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.entra.desde-arriba { animation-name: entra-arriba; }
.entra[data-i="1"] { animation-delay: 0.15s; }
.entra[data-i="2"] { animation-delay: 0.4s; }
.entra[data-i="3"] { animation-delay: 0.65s; }
.entra[data-i="4"] { animation-delay: 0.9s; }
.entra[data-i="5"] { animation-delay: 1.15s; }
.entra[data-i="6"] { animation-delay: 1.4s; }

/* Revelado al hacer scroll (solo si hay JavaScript) */
.js .rev {
  opacity: 0; transform: translate3d(0, 32px, 0);
  transition: opacity 1.3s ease, transform 1.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .rev.visible { opacity: 1; transform: none; }
.js .rev[data-i="1"] { transition-delay: 0.1s; }
.js .rev[data-i="2"] { transition-delay: 0.25s; }
.js .rev[data-i="3"] { transition-delay: 0.4s; }
.js .rev[data-i="4"] { transition-delay: 0.55s; }
.js .rev[data-i="5"] { transition-delay: 0.7s; }
.js .rev[data-i="6"] { transition-delay: 0.85s; }
.js .rev[data-i="7"] { transition-delay: 1s; }
.js .rev[data-i="8"] { transition-delay: 1.15s; }

/* Movimiento reducido (ajuste del sistema): sin desplazamientos, giros ni deriva, pero con fundidos
   suaves de opacidad, que no son movimiento. Así la portada nunca aparece "de golpe". */
:root[data-movimiento="reducido"] { scroll-behavior: auto; }
:root[data-movimiento="reducido"] .interior { animation-name: aparece-suave; animation-duration: 1.6s; transform: rotate(var(--giro)); }
:root[data-movimiento="reducido"] .entra { animation-name: aparece-suave; animation-duration: 1.3s; }
:root[data-movimiento="reducido"] .orbe i { animation: none; }
:root[data-movimiento="reducido"] .rev { opacity: 0; transform: none; transition: opacity 1.2s ease; }
:root[data-movimiento="reducido"] .rev.visible { opacity: 1; }
:root[data-movimiento="reducido"] .panel { transform: none; }
:root[data-movimiento="reducido"] .boton { transition: none; }
:root[data-movimiento="reducido"] .boton:hover { transform: none; }

/* Sin JavaScript no hay data-movimiento: respetar directamente el ajuste del sistema */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-movimiento]) .interior { animation-name: aparece-suave; transform: rotate(var(--giro)); }
  :root:not([data-movimiento]) .entra { animation-name: aparece-suave; }
  :root:not([data-movimiento]) .orbe i { animation: none; }
}

/* ---------- Páginas legales y de ayuda ---------- */
.legal.contenedor { width: min(100% - 40px, 760px); padding-block: 36px 64px; }
.legal h1 { font-size: clamp(2rem, 6vw, 3rem); }
.legal h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin: 1.8em 0 0.5em; }
.legal p, .legal li { color: var(--texto-cuerpo); }
.legal ul, .legal ol { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.5em; }
.legal a { color: var(--texto-titulo); }
.aviso-borrador {
  padding: 12px 16px; border-radius: 14px; border: 1px solid var(--borde-sutil);
  background: var(--acento-suave); color: var(--texto-titulo); font-weight: 600;
}
mark.por-validar { background: rgba(255, 193, 7, 0.28); color: inherit; padding: 0.05em 0.25em; border-radius: 5px; }
.volver { margin-top: 2.5em; }

/* Raíz del sitio y página 404 */
.raiz { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px; text-align: center; }
.raiz img { height: auto; max-width: 70vw; }
.raiz h1 { font-size: 4rem; margin: 0; }
.raiz p { margin: 0; }

/* Pantallas bajas (móviles pequeños en horizontal o con barras): la sección fijada del día debe caber */
@media (max-height: 700px) {
  .dia-fijo { padding-block: 4px 12px; }
  .dia .seccion-cabecera { margin-bottom: 6px; }
  .dia h2 { font-size: 1.25rem; }
  .tabs { margin-bottom: 8px; }
  .dia-tiempo { margin-bottom: 8px; }
  .dia-escenario { width: min(100%, 300px, 30vh); }
  .dia-cuerpo { gap: 12px; }
  .panel h3 { font-size: 1.35rem; margin-bottom: 0.2em; }
  .panel p { font-size: 0.9375rem; }
  .etiqueta { margin-bottom: 6px; }
}

/* Sin JavaScript: la sección del día no se fija ni deja huecos; se leen todos los momentos seguidos */
html:not(.js) .dia-carril { height: auto; }
html:not(.js) .dia-fijo { position: static; min-height: 0; }
html:not(.js) .tabs, html:not(.js) .dia-tiempo { display: none; }

/* Altura visible real en móviles con barras que se ocultan (Safari de iPhone, Chrome de Android) */
@supports (height: 100svh) {
  .dia-fijo { min-height: calc(100svh - 64px); }
  .dia-escenario { width: min(100%, 300px, 36svh); }
  @media (min-width: 900px) { .dia-escenario { width: min(100%, 440px, 46svh); } }
  @media (max-height: 700px) { .dia-escenario { width: min(100%, 300px, 30svh); } }
}

/* Selector de tema bajo el móvil de ejemplo: compacto, para no alargar la sección */
.grupo-tema { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.grupo-tema .segmentado label { min-height: 34px; padding: 0 16px; font-size: 0.9375rem; }

/* Reparto de líneas: títulos y subtítulos equilibrados; párrafos sin última línea de una sola palabra */
h1, h2, h3, .subtitulo, .seccion-cabecera p { text-wrap: balance; }
p, li { text-wrap: pretty; }

.personaliza-controles { max-width: 520px; margin-inline: auto; width: 100%; }
@media (min-width: 900px) { .personaliza-controles { max-width: none; margin-inline: 0; } }

/* Pestañas de "Un día" en móvil: solo la activa y sus vecinas, siempre enteras (sin pestañas cortadas por el borde) */
@media (max-width: 640px) {
  .tabs { overflow: visible; justify-content: center; }
  .tab.lejos { display: none; }
}
/* Textos cortos de la sección del día, equilibrados */
.panel p { text-wrap: balance; }
/* Subrayado resaltado de lo "por validar": al partirse en dos líneas conserva el relleno en cada una */
mark.por-validar { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* 404: los enlaces no se parten en dos líneas */
.raiz a { white-space: nowrap; }
/* Plataformas: rejilla 2 x 2 en móvil, sin una píldora suelta */
@media (max-width: 480px) { .plataformas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 320px; margin-inline: auto; } .plataformas .pastilla { text-align: center; } }

/* Móvil: el bloque fijo (móvil de ejemplo + relojes + tema) ocupa ~25 % de la altura visible.
   La altura sale de la altura visible (svh), el selector de tema queda al lado en columna. */
@media (max-width: 899px) {
  .personaliza-fijo { --h-fijo: clamp(150px, 24svh, 215px); top: 50px; padding-top: 26px; flex-direction: row; justify-content: center; align-items: center; gap: 12px; padding-block: 6px 8px; }
  .personaliza-escenario { height: var(--h-fijo); width: calc(var(--h-fijo) / 1.1); aspect-ratio: auto; margin: 0; flex: none; }
}
/* Pantalla muy baja (móvil en horizontal): el bloque no se queda fijo, no deja sitio para elegir colores */
@media (max-width: 899px) and (max-height: 520px) {
  .personaliza-fijo { position: static; }
}
@media (min-width: 900px) {
  .personaliza-escenario { height: auto; width: min(100%, 420px); aspect-ratio: 1 / 1.1; margin: 0 auto; }
}

/* "Hazla tuya" en móvil (hasta 640 px): sin bloque fijo y con aire. Título, demostración grande, colores en 2 filas de 10,
   paletas en 2 filas de chips grandes y el tema en una línea. No hace falta que quepa justo en una pantalla. */
@media (max-width: 640px) {
  .personaliza.seccion { padding-block: 40px 48px; }
  .personaliza .seccion-cabecera { margin-bottom: 20px; }
  .personaliza .seccion-cabecera .subtitulo { display: none; }
  .personaliza h2 { margin-bottom: 0; }
  .personaliza-cuerpo { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .personaliza-fijo { display: contents; }
  .personaliza-escenario { order: 1; --h-fijo: clamp(230px, 40svh, 340px); height: var(--h-fijo); width: calc(var(--h-fijo) / 1.1); align-self: center; margin: 0 auto; }
  .personaliza-controles { order: 2; max-width: none; }
  .grupo { margin: 0; }
  .grupo legend { margin-bottom: 14px; text-align: center; width: 100%; }
  .muestras { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; max-width: none; }
  .muestra i { inset: 2px; }
  input:checked + .muestra { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 3.5px var(--texto-titulo); }
  .paletas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; max-width: none; }
  .paletas input#paleta-multi + .chip-paleta { grid-column: auto; }
  .chip-paleta { flex: 0 0 calc(25% - 9px); min-height: 44px; padding: 0 8px; font-size: 0; gap: 0; justify-content: center; }   /* el nombre sigue ahí para lectores de pantalla; se ve en el título */
  .chip-paleta i { width: 100%; height: 22px; }
  .grupo-tema { margin-top: 28px; display: flex; justify-content: center; }
  .grupo-tema .segmentado label { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
}

/* Escritorio: paletas en tres columnas y el selector de tema debajo, en la columna de la izquierda, para que todo se vea en una pantalla */
@media (min-width: 900px) {
  .paletas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; max-width: 560px; }
  .paletas input#paleta-multi + .chip-paleta { grid-column: auto; }
  .chip-paleta { min-height: 40px; gap: 8px; padding: 0 12px 0 8px; }
  .chip-paleta i { width: 38px; height: 20px; }
  .grupo { margin-bottom: 16px; }
  .muestras { gap: 6px; }
}
@media (min-width: 900px) and (max-width: 1100px) { .paletas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .paletas input#paleta-multi + .chip-paleta { grid-column: 1 / -1; } }

/* Subtítulo de la portada: dos frases cortas, cada una en su bloque */
.portada-texto .subtitulo .frase { display: block; text-wrap: balance; }

/* ---------- 11. Menú de la cabecera (desplegables con <details>, funcionan sin JavaScript) ---------- */
.menu { position: relative; }
.menu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none;
  color: var(--texto-cuerpo); font-weight: 600; padding: 8px 14px; border-radius: 999px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--acento-suave); }
.menu summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; display: grid; min-width: 220px; padding: 8px;
  border-radius: 18px; background: var(--tarjeta); border: 1px solid var(--borde-sutil); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.35);
}
.menu-panel a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px;
  color: var(--texto-cuerpo); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.menu-panel a:hover { background: var(--acento-suave); }
.menu-movil summary { width: 44px; height: 44px; padding: 0; justify-content: center; background: var(--tarjeta); border: 1px solid var(--borde-sutil); color: var(--texto-titulo); }
.menu-movil summary svg { width: 20px; height: 20px; }
.menu-movil .menu-panel { left: auto; right: 0; width: min(280px, calc(100vw - 40px)); max-height: calc(100vh - 96px); overflow-y: auto; }
@media (min-width: 900px) { .menu-movil { display: none; } }
@media (max-width: 480px) { .marca img { height: 30px; } }

/* ---------- 12. Apartados de funciones ---------- */
/* Texto (etiqueta, frase y puntos) + escena. En móvil, uno debajo del otro; en escritorio, dos columnas que se alternan. */
.apartado { padding: 56px 0; }
.apartado-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.apartado-texto { text-align: center; }
.apartado h2 { font-size: clamp(1.625rem, 3.6vw, 2.375rem); margin-bottom: 0.7em; }
.apartado .etiqueta { margin-bottom: 14px; }
.puntos { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 12px; width: fit-content; max-width: 30em; text-align: left; }
.puntos li { position: relative; padding-left: 26px; font-size: 1.0625rem; line-height: 1.45; }
.puntos li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 14px; height: 3px; border-radius: 2px; background: var(--acento); }
@media (min-width: 900px) {
  .apartado { padding: 88px 0; }
  .apartado-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .apartado-texto { text-align: left; }
  .puntos { margin-inline: 0; }
  .apartado.inverso .apartado-texto { order: 2; }
}

/* Escena: las medidas son porcentajes de su ancho (y cqw dentro de las tarjetas), así todo escala junto */
.escena { --a: #FF7F00; position: relative; width: min(100%, 380px); aspect-ratio: 1 / 1.08; margin-inline: auto; container-type: inline-size; }
@media (min-width: 900px) { .escena { width: min(100%, 460px); } }
.escena::before {
  content: ""; position: absolute; inset: 8% 2%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 127, 0, 0.30), rgba(255, 127, 0, 0)); opacity: calc(0.5 * var(--orbe-intensidad));
}
.par { will-change: transform; }
.entrada { isolation: isolate; }
.ap-movil { position: absolute; width: 46%; }
.pos-a { left: 2%; top: 0; z-index: 1; }
.pos-a .movil { transform: rotate(-3deg); }
.pos-b { left: 52%; top: 6%; }
.pos-b .movil { transform: rotate(3deg); }
.pos-c { left: 14%; top: 1%; width: 49%; }
.pos-c .movil { transform: rotate(-3deg); }
.ap-reloj { position: absolute; z-index: 5; }
.pos-r { left: 79%; top: 60%; width: 21%; }
.flota { position: absolute; z-index: 4; }

/* Tarjeta flotante: ampliación dibujada de lo que se ve en la app (tema oscuro, como las capturas) */
.tarjeta-f {
  display: grid; gap: 1.9cqw; padding: 3.6cqw; border-radius: 4.6cqw;
  background: #171719 linear-gradient(135deg, rgba(255, 127, 0, 0.16), transparent 60%); color: #F4F4F4;
  border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.55);
  font-size: max(10.5px, 3cqw); line-height: 1.3; text-align: left;
}
.f-tit { display: flex; align-items: center; gap: 0.4em; font-size: 1.12em; font-weight: 800; color: #FFFFFF; }
.f-sub { color: #B8B8B8; font-size: 0.92em; }
.f-n { color: #B8B8B8; text-align: center; font-variant-numeric: tabular-nums; }
.f-carril { display: block; height: 0.5em; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.f-carril i { display: block; height: 100%; border-radius: 999px; background: rgba(255, 127, 0, 0.5); }
.f-carril i.fuerte, .macro .f-carril i { background: var(--a); }
.a74 { width: 74%; } .a75 { width: 75%; } .a78 { width: 78%; } .a79 { width: 79%; } .a84 { width: 84%; } .a90 { width: 90%; } .a100 { width: 100%; }
.check { display: block; position: relative; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--a, #FF7F00); }
.check::after { content: ""; position: absolute; left: 36%; top: 20%; width: 24%; height: 46%; border: solid #FFFFFF; border-width: 0 0.16em 0.16em 0; transform: rotate(45deg); }
.check.vacio { background: rgba(255, 255, 255, 0.08); }
.check.vacio::after { border-color: rgba(255, 255, 255, 0.25); }

/* Fuerza: series que se marcan y descanso con cuenta atrás */
.f-series { left: 0; top: 47%; width: 56%; }
.f-serie { display: grid; grid-template-columns: 1.5em 1fr auto; align-items: center; gap: 0.6em; padding: 0.3em 0.4em 0.3em 0.6em; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-weight: 700; }
.f-descanso { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.25em 0.6em; color: #B8B8B8; }
.f-descanso b { color: var(--a); font-size: 1.25em; font-variant-numeric: tabular-nums; }
.f-pista { grid-column: 1 / -1; height: 0.35em; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.f-pista i { display: block; height: 100%; background: var(--a); transform-origin: left center; }

/* Cardio: ruta que se dibuja y ritmo por km */
.f-ruta { left: 0; top: 4%; width: 57%; }
.mapa { display: block; width: 100%; border-radius: 3cqw; background: #EFE8D8; }
.mapa-calles { fill: none; stroke: #F6D58F; stroke-width: 3; }
.tramo { fill: none; stroke: var(--a); stroke-width: 3.4; stroke-linecap: round; }
.mapa-fin { fill: var(--a); stroke: #FFFFFF; stroke-width: 1.6; transform-box: fill-box; transform-origin: center; }
.f-barra { display: grid; grid-template-columns: 1.2em 1fr; align-items: center; gap: 0.5em; }

/* Nutrición: anillo de calorías (dos mitades que giran: solo transform) y macros */
.f-kcal { left: 0; top: 57%; width: 68%; }
.f-kcal-fila { display: flex; align-items: center; gap: 3.4cqw; }
.anillo { position: relative; flex: none; width: 25cqw; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 2.4cqw rgba(255, 255, 255, 0.12); }
.mitad { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; }
.mitad.der { left: 50%; }
.mitad.izq { left: 0; }
.mitad i { position: absolute; top: 0; width: 200%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 2.4cqw var(--a); }
.mitad.der i { left: -100%; clip-path: inset(0 50% 0 0); transform: rotate(180deg); transition: transform 0.8s linear 1s; }
.mitad.izq i { left: 0; clip-path: inset(0 0 0 50%); transform: rotate(88deg); transition: transform 0.4s linear 1.8s; }
.anillo-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anillo-txt b { font-size: 1.3em; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.anillo-txt small { color: #B8B8B8; font-size: 0.7em; }
.macros { flex: 1; min-width: 0; display: grid; gap: 1.6cqw; }
.macro { display: grid; grid-template-columns: 1fr auto; gap: 0.2em 0.5em; }
.macro b { font-variant-numeric: tabular-nums; }
.macro .f-carril { grid-column: 1 / -1; }

/* Hidratación: bloque propio dentro de Nutrición. La tarjeta (cifra, botones y onda) y el aviso están dibujados. */
.agua { margin-top: 24px; }
.agua h3 { font-size: clamp(1.625rem, 3.6vw, 2.375rem); font-weight: 800; margin-bottom: 0.7em; }
.agua .etiqueta { margin-bottom: 14px; }
.agua-demo { display: grid; justify-items: center; gap: 18px; }
.agua-card {
  width: min(100%, 340px); padding: 22px 20px 24px; border-radius: 22px; text-align: left; color: #F4F4F4;
  background: #171719 linear-gradient(135deg, rgba(255, 127, 0, 0.16), transparent 60%); border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.5);
}
.agua-card .f-tit { font-size: 1.125rem; }
.agua-cifra { margin: 10px 0 16px; font-size: 1.125rem; color: #CCCCCC; font-weight: 700; }
.agua-cifra b { font-size: 2.5rem; color: #FFFFFF; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.agua-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agua-b {
  min-height: 46px; border: 0; border-radius: 14px; font: inherit; font-weight: 800; cursor: pointer;
  background: rgba(255, 255, 255, 0.09); color: #F4F4F4;
}
.agua-b.agua-mas { background: rgba(255, 127, 0, 0.2); color: #FF9A33; }
.agua-b:hover { filter: brightness(1.15); }
.agua-b:disabled { opacity: 0.45; cursor: default; filter: none; }
/* Línea ondulada que se rellena en naranja de izquierda a derecha (solo transform: la tapa y la onda se mueven en sentidos contrarios) */
.onda { --p: 0.6; position: relative; margin-top: 22px; height: 22px; }
.onda svg { display: block; width: 100%; height: 100%; }
.onda path { fill: none; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.onda-fondo path { stroke: rgba(255, 255, 255, 0.14); }
.onda-llena { position: absolute; inset: 0; overflow: hidden; transform: translateX(calc((var(--p) - 1) * 100%)); transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.3, 1) 0.4s; }
.onda-llena svg { transform: translateX(calc((1 - var(--p)) * 100%)); transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.3, 1) 0.4s; }
.onda-llena path { stroke: #FF7F00; }
.boton:disabled { opacity: 0.5; cursor: default; filter: none; transform: none; }
@media (min-width: 900px) {
  .agua { margin-top: 40px; }
  .agua .apartado-texto { order: 2; }
}

/* Aviso (notificación) dibujado, con los textos reales de la app */
.aviso {
  display: flex; align-items: flex-start; gap: 10px; max-width: 340px; padding: 12px 14px; border-radius: 18px; text-align: left;
  background: #26262A; color: #F4F4F4; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 20px 36px -18px rgba(0, 0, 0, 0.5);
  font-size: 0.875rem; line-height: 1.35;
}
.aviso-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 127, 0, 0.18); }
.aviso-ico img { display: block; width: 100%; height: 100%; border-radius: 22%; }
.aviso-ico svg { width: 56%; height: 56%; fill: none; stroke: #FF7F00; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aviso-txt { display: grid; gap: 1px; min-width: 0; }
.aviso-txt small { color: #B8B8B8; font-size: 0.75rem; }
.aviso-txt strong { color: #FFFFFF; }
.aviso-txt > span { color: #D6D6D6; }
.flota .aviso { max-width: none; gap: 2.4cqw; padding: 2.8cqw; border-radius: 4.4cqw; font-size: max(10.5px, 2.9cqw); }
.flota .aviso-ico { width: 7.6cqw; height: 7.6cqw; }
.aviso-ico { background: none; }

/* Pantalla de ejemplo dibujada dentro de un marco de móvil (no es una captura): suplementos y social */
.pantalla.cq { container-type: inline-size; }
.demo-app {
  height: 100%; display: flex; flex-direction: column; gap: 4cqw; padding: 14cqw 6cqw 6cqw;
  background: #212121 radial-gradient(circle at 0 0, rgba(255, 127, 0, 0.22), transparent 55%); color: #F4F4F4;
  font-size: 6.6cqw; line-height: 1.25; text-align: left;
}
.da-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2cqw; }
.da-cab b { font-size: 1.35em; color: #FFFFFF; }
.da-cont { display: inline-grid; color: #FF7F00; font-weight: 800; }
.da-cont span { grid-area: 1 / 1; transition: opacity 0.5s ease; }
.antes { opacity: 0; }
.da-fila { display: flex; align-items: center; gap: 4cqw; padding: 4cqw; border-radius: 5cqw; background: #171719; }
.da-ico { flex: none; width: 9cqw; height: 9cqw; border-radius: 50%; background: rgba(255, 127, 0, 0.2); box-shadow: inset 0 0 0 2.4cqw rgba(255, 127, 0, 0.9); }
.da-txt { flex: 1; min-width: 0; display: grid; }
.da-txt small, .da-post small { color: #B8B8B8; font-size: 0.82em; }
.check.tardio { transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.f-aviso { left: 36%; top: 63%; width: 64%; }
.da-hist { display: grid; gap: 2.4cqw; margin-top: 3cqw; padding: 4cqw; border-radius: 5cqw; background: #171719; }
.da-hist small { color: #B8B8B8; font-size: 0.82em; }
.da-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2.2cqw; }
.da-semana i { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.da-semana i.si { background: #FF7F00; }

.da-post { display: grid; gap: 2.4cqw; padding: 5cqw 4.4cqw; border-radius: 5cqw; background: #171719; }
.da-autor { display: flex; align-items: center; gap: 3cqw; }
.da-avatar { flex: none; display: grid; place-items: center; width: 9cqw; height: 9cqw; border-radius: 50%; background: #FF7F00; color: #FFFFFF; font-style: normal; font-weight: 800; font-size: 0.8em; }
.av-2 { background: #086FD0; }
.av-3 { background: #11B624; }
.da-acciones { display: flex; gap: 5cqw; color: #B8B8B8; font-size: 0.85em; }
.da-acciones > span { display: inline-flex; align-items: center; gap: 1.4cqw; }
.da-acciones svg { width: 5.5cqw; height: 5.5cqw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.da-gusta.late { color: #FF7F00; }
.da-gusta.late svg { fill: #FF7F00; }
.f-coment { left: 44%; top: 72%; width: 54%; }
.f-coment .tarjeta-f { display: flex; align-items: center; gap: 2.6cqw; }
.f-coment .da-avatar { width: 8cqw; height: 8cqw; font-size: 1em; }

/* Asistente: el mensaje aparece palabra a palabra y lo importante se subraya en el color de acento */
.f-chat { left: 0; top: 30%; width: 62%; }
.chispa { flex: none; width: 1.2em; height: 1.2em; fill: var(--a); }
.escribe { margin: 0; color: #E6E6E6; line-height: 1.5; text-wrap: wrap; }
.pal { transition: opacity 0.3s ease var(--r, 0s); }
.clave { position: relative; color: var(--a); font-weight: 800; }
.clave::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.1em; height: 0.13em; border-radius: 1px; background: var(--a); opacity: 0.55;
  transform-origin: left center; transition: transform 0.5s ease calc(var(--r, 0s) + 0.45s);
}
.f-chip { justify-self: start; padding: 0.45em 0.95em; border-radius: 999px; background: rgba(255, 127, 0, 0.18); color: var(--a); font-weight: 800; }

/* Progreso: sueño por fases e informe del mes */
.f-sueno { left: 0; top: 5%; width: 58%; }
.f-mes { left: 0; top: 64%; width: 58%; }
.f-cifra { font-size: 1.6em; font-weight: 800; color: #FFFFFF; }
.fases { display: flex; gap: 0.25em; height: 0.9em; }
.fases i { display: block; border-radius: 0.3em; }
.fase-1 { flex: 85; background: var(--a); }
.fase-2 { flex: 276; background: rgba(255, 127, 0, 0.5); }
.fase-3 { flex: 95; background: #FFC27A; }
.fase-4 { flex: 12; background: rgba(255, 255, 255, 0.4); }
.leyenda { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2em 0.8em; color: #B8B8B8; font-size: 0.88em; }
.leyenda span { display: flex; align-items: center; gap: 0.45em; }
.leyenda i { flex: none; width: 0.6em; height: 0.6em; border-radius: 50%; }
.f-dato { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; color: #B8B8B8; }
.f-dato b { color: #FFFFFF; font-variant-numeric: tabular-nums; }
.columnas { display: flex; align-items: flex-end; gap: 0.5em; height: 3.6em; }
.columnas span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.columnas i { display: block; width: 100%; border-radius: 0.3em 0.3em 0.15em 0.15em; background: var(--a); }
.columnas .c6 { height: 100%; }
.columnas .c5 { height: 83%; }
.columnas .cero { height: 0.2em; background: rgba(255, 255, 255, 0.15); }

/* Reloj: dos filas de tres relojes (Wear OS y Apple Watch) */
.relojes { --a: #FF7F00; width: min(100%, 400px); margin-inline: auto; display: grid; justify-items: center; gap: 6px; }
@media (min-width: 900px) { .relojes { width: min(100%, 460px); } }
.relojes-eti { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.04em; color: var(--texto-subtitulo); }
.relojes-fila { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8%; align-items: center; padding-block: 9% 12%; }
.relojes-fila.rectos { padding-inline: 2.5%; padding-bottom: 9%; }
.relojes .reloj .pantalla { position: relative; }
/* Los botones del menú aparecen uno a uno: cuatro tapas negras sobre la captura real se desvanecen por turno */
.tapa { position: absolute; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #000000; opacity: 0; transition: opacity 0.6s ease var(--r, 0s); }
.banda { position: absolute; left: 0; width: 100%; height: 34%; background: #000000; opacity: 0; transition: opacity 0.6s ease var(--r, 0s); }
.banda-1 { top: 0; } .banda-2 { top: 33%; } .banda-3 { top: 66%; }
.rect .tapa { width: 45.5%; }
.rect .tapa-1 { left: 4.65%; top: 12%; } .rect .tapa-2 { left: 49.85%; top: 12%; } .rect .tapa-3 { left: 4.65%; top: 49.8%; } .rect .tapa-4 { left: 49.85%; top: 49.8%; }
.tapa-1 { left: 30%; top: 0.5%; } .tapa-2 { left: 1%; top: 30%; } .tapa-3 { left: 59%; top: 30%; } .tapa-4 { left: 30%; top: 59%; }
/* La cuenta atrás del descanso: un punto de luz da una vuelta al aro, una sola vez */
.orbita { position: absolute; inset: 2.5%; border-radius: 50%; opacity: 0; }
.orbita i { position: absolute; left: 50%; top: 0; width: 7%; aspect-ratio: 1; margin-left: -3.5%; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.7); }
.js .en-escena .orbita { animation: orbita 2.8s ease-in-out 1.6s 1 both; }
@keyframes orbita {
  0% { opacity: 0; transform: rotate(0deg); }
  12%, 88% { opacity: 1; }
  100% { opacity: 0; transform: rotate(360deg); }
}

/* Salud: esquema propio (sin logos de marca). Los datos fluyen hacia la app. */
.ap-salud .seccion-cabecera { margin-bottom: 32px; }
.flujo { position: relative; width: min(100%, 680px); margin-inline: auto; display: grid; justify-items: center; gap: 22px; }
.flujo-fuentes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.fuente { display: grid; padding: 10px 18px; border-radius: 16px; text-align: center; background: var(--tarjeta); border: 1px solid var(--borde-sutil); }
.fuente small { color: var(--texto-subtitulo); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.fuente b { color: var(--texto-titulo); }
.flujo-datos { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .flujo-datos { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dato { display: grid; justify-items: center; gap: 8px; padding: 14px 4px; border-radius: 18px; background: var(--tarjeta); border: 1px solid var(--borde-sutil); color: var(--texto-titulo); font-size: 0.875rem; }
.dato svg, .vuela { width: 28px; height: 28px; fill: none; stroke: var(--acento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vuela { position: absolute; z-index: 2; pointer-events: none; }
.flujo-app { position: relative; display: grid; justify-items: center; gap: 6px; margin-top: 34px; }
.flujo-app::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 8px); width: 2px; height: 34px; margin-left: -1px; border-radius: 2px; background: linear-gradient(to bottom, transparent, var(--acento)); }
.flujo-app img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 0 0 6px var(--acento-suave), 0 20px 40px -16px rgba(255, 127, 0, 0.6); }
.flujo-app b { color: var(--texto-titulo); margin-top: 6px; }
.flujo-app small { color: var(--texto-subtitulo); }

/* Animaciones de las escenas: el estado final es el normal (así se ve todo sin JavaScript); con JavaScript, cada escena
   espera en su estado inicial hasta entrar en pantalla (clase "en-escena", una sola vez). Solo transform y opacity.
   El retardo de cada pieza (--r) lo pone comun.js a partir de data-e y data-d. */
.entrada { transition: opacity 0.9s ease var(--r, 0s), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) var(--r, 0s); }
.js [data-escena]:not(.en-escena) .entrada { opacity: 0; transform: translate3d(0, 48px, 0) scale(0.96); }
.paso { transition: opacity 0.5s ease var(--r, 0s), transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) var(--r, 0s); }
.js [data-escena]:not(.en-escena) .paso { opacity: 0; transform: scale(0.5); }
.js [data-escena]:not(.en-escena) .paso.sube { transform: translate3d(0, 16px, 0); }
.paso.crece-x { transform-origin: left center; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--r, 0s); }
.js [data-escena]:not(.en-escena) .paso.crece-x { opacity: 1; transform: scaleX(0); }
.paso.crece-y { transform-origin: center bottom; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--r, 0s); }
.js [data-escena]:not(.en-escena) .paso.crece-y { opacity: 1; transform: scaleY(0); }
.tramo { transition: opacity 0.2s linear var(--r, 0s); }
.js [data-escena]:not(.en-escena) .tramo,
.js [data-escena]:not(.en-escena) .pal { opacity: 0; }
.js [data-escena]:not(.en-escena) .clave::after { transform: scaleX(0); }
.js [data-escena]:not(.en-escena) .mitad i { transform: rotate(0deg); }
.js [data-escena]:not(.en-escena) .onda { --p: 0; }
.js [data-escena]:not(.en-escena) .tapa, .js [data-escena]:not(.en-escena) .banda { opacity: 1; }
.js .en-escena .f-pista i { transform: scaleX(0); transition: transform 3s linear 2.4s; }
/* Paso posterior (clase p1, que pone comun.js al cabo de un momento): la toma se marca y sube el contador */
.js [data-escena]:not(.p1) .antes { opacity: 1; }
.js [data-escena]:not(.p1) .despues { opacity: 0; }
.js [data-escena]:not(.p1) .check.tardio { opacity: 0; transform: scale(0.4); }
.js .p1 .late svg { animation: late 0.7s ease 1; }
@keyframes late { 40% { transform: scale(1.5); } }

/* "Un día": el reloj solo acompaña en Tarde y Correr; en el resto el móvil se centra */
.dia-reloj, .dia-movil { transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dia-escenario.sin-reloj .dia-reloj { opacity: 0; }
.dia-escenario.sin-reloj .dia-movil { transform: translateX(-21%); }
html:not(.js) .dia-reloj { display: none; }

/* Movimiento reducido: las escenas se muestran ya terminadas, sin transiciones ni parallax */
:root[data-movimiento="reducido"] [data-escena] *, :root[data-movimiento="reducido"] [data-escena] *::after { transition: none !important; animation: none !important; }
:root[data-movimiento="reducido"] .f-pista i { transform: none !important; }
:root[data-movimiento="reducido"] .dia-reloj, :root[data-movimiento="reducido"] .dia-movil { transition: opacity 0.6s ease; }
/* Salud en móvil: las dos fuentes caben una al lado de la otra */
@media (max-width: 480px) {
  .flujo-fuentes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .fuente { padding: 10px 6px; }
  .fuente b { font-size: 0.875rem; }
}

/* ---------- 13. Objetivos táctiles de 44 px como mínimo (misma apariencia, más área pulsable) ---------- */
.marca { min-height: 44px; align-items: center; }
.menu-idioma { display: none; }
.menu-idioma summary { min-height: 44px; padding: 0 10px; font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); }
.menu-idioma .menu-panel { left: auto; right: 0; min-width: 160px; }
.menu-idioma .menu-panel a[aria-current] { background: var(--acento-suave); color: var(--texto-titulo); }
@media (max-width: 899px) {
  .idiomas { display: none; }
  .menu-idioma { display: block; }
}
.pie a, .enlace-boton { display: inline-flex; align-items: center; min-height: 44px; }
.pie-enlaces { gap: 0 20px; margin-bottom: 4px; }
.tienda small, .tiendas .tienda small { font-size: 0.875rem; color: var(--texto-cuerpo); }

/* Indicador de los cinco momentos de "Un día" (solo móvil; no es un objetivo táctil) */
.dia-puntos { display: none; }
html:not(.js) .dia-puntos { display: none; }
@media (max-width: 640px) {
  .js .dia-puntos { display: flex; justify-content: center; gap: 6px; margin: -10px 0 14px; pointer-events: none; }
  .dia-puntos i { width: 8px; height: 8px; border-radius: 999px; background: var(--borde-sutil); box-shadow: inset 0 0 0 1px var(--texto-subtitulo); opacity: 0.8; transition: transform 0.4s ease, background-color 0.4s ease; }
  .dia-puntos i.activo { background: var(--acento); box-shadow: none; opacity: 1; transform: scaleX(2.4); }
}
/* Idioma actual con marca de seleccionado en el desplegable */
.menu-idioma .menu-panel a[aria-current]::after { content: ""; width: 14px; height: 8px; margin-left: auto; border-left: 2.5px solid var(--acento); border-bottom: 2.5px solid var(--acento); transform: translateY(-2px) rotate(-45deg); }

@media (max-width: 400px) { .tab { padding: 0 14px; } }

/* Progreso: tres moviles en abanico (fotos, sueno y medidas, informe anual) */
.tri-a { left: 0; top: 10%; width: 38%; z-index: 1; }
.tri-a .movil { transform: rotate(-4deg); }
.tri-b { left: 31%; top: 0; width: 38%; z-index: 3; }
.tri-c { left: 62%; top: 10%; width: 38%; z-index: 2; }
.tri-c .movil { transform: rotate(4deg); }

/* Música: reloj Wear OS con la página Multimedia y una tarjeta con los controles */
.pos-m { left: 76%; top: 80%; width: 25%; z-index: 5; }
.pos-n { left: 48%; top: 80%; width: 25%; z-index: 5; }
.mus-controles { display: flex; justify-content: space-between; align-items: center; margin-top: 3cqw; }
.mus-b { display: grid; place-items: center; width: 9.5cqw; height: 9.5cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #F4F4F4; }
.mus-b svg { width: 46%; height: 46%; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mus-play { width: 12.5cqw; height: 12.5cqw; background: var(--a); color: #FFFFFF; }

/* Relojes en arcos y ondas en vez de una cuadrícula: la primera fila forma un arco, la segunda un valle y la tercera otro arco (solo transform, estático) */
.relojes-fila { padding-block: 12% 14%; }
.relojes-fila:nth-of-type(1) .rel:nth-child(1) .giro { transform: translateY(16%) rotate(-8deg); }
.relojes-fila:nth-of-type(1) .rel:nth-child(2) .giro { transform: translateY(-8%); }
.relojes-fila:nth-of-type(1) .rel:nth-child(3) .giro { transform: translateY(16%) rotate(8deg); }
.relojes-fila:nth-of-type(2) .rel:nth-child(1) .giro { transform: translateY(-6%) rotate(8deg); }
.relojes-fila:nth-of-type(2) .rel:nth-child(2) .giro { transform: translateY(12%); }
.relojes-fila:nth-of-type(2) .rel:nth-child(3) .giro { transform: translateY(-6%) rotate(-8deg); }
.relojes-fila:nth-of-type(3) .rel:nth-child(1) .giro { transform: translateY(16%) rotate(-8deg); }
.relojes-fila:nth-of-type(3) .rel:nth-child(2) .giro { transform: translateY(-8%); }
.relojes-fila:nth-of-type(3) .rel:nth-child(3) .giro { transform: translateY(16%) rotate(8deg); }
/* El giro va en un contenedor aparte: si el transform estuviera en .reloj, la correa (z-index -1) quedaria por encima de la caja */
.giro { width: 100%; }

/* ---------- 14. Móvil: sin "Un día con MyGymLog" y menos espacio vacío (decisión de Roberto) ---------- */
@media (max-width: 899px) {
  .seccion.dia { padding: 0; min-height: 0; height: 0; }
  .dia > * { display: none; }                                      /* queda un ancla vacía: "Descubre las funciones" sigue bajando a Fuerza */
  .menu-movil .menu-panel a[href$="#funciones"] { display: none; }
  .seccion { padding: 44px 0; }
  .apartado { padding: 20px 0; }
  .portada { padding-bottom: 12px; }
  .apartado-grid { gap: 18px; }
  .seccion-cabecera { margin-bottom: 26px; }
  .agua { margin-top: 12px; }
}

/* Móvil: capturas más grandes, en abanico (dos móviles que se solapan en vez de dos pequeños lado a lado) */
@media (max-width: 640px) {
  .escena { width: 100%; aspect-ratio: 1 / 1.32; }
  .ap-movil { width: 50%; }
  .pos-a { left: 2%; top: 0; }
  .pos-b { left: 48%; top: 10%; }
  .pos-c { left: 25%; top: 0; width: 50%; }
  .tri-a { width: 44%; left: 2%; top: 10%; }
  .tri-b { width: 44%; left: 28%; top: 0; }
  .tri-c { width: 44%; left: 54%; top: 10%; }
  .esc-progreso { aspect-ratio: 1 / 1.18; }
  .esc-musica { aspect-ratio: 1 / 1.3; }
}

/* ---------- 15. Móvil: ritmo distinto en cada sección (escena arriba o abajo, abanico en espejo y entradas desde los lados) ---------- */
@media (max-width: 640px) {
  .apartado.inverso .pos-a { left: 48%; }
  .apartado.inverso .pos-b { left: 2%; }
  .apartado.inverso .pos-a .movil { transform: rotate(3deg); }
  .apartado.inverso .pos-b .movil { transform: rotate(-3deg); }
  .apartado.inverso .tri-a .movil { transform: rotate(4deg); }
  .apartado.inverso .tri-c .movil { transform: rotate(-4deg); }
  .apartado.inverso .ap-reloj.pos-n { left: 18%; }
  /* Entradas: los móviles llegan girando desde los lados, el del centro sube */
  .js [data-escena]:not(.en-escena) .pos-a .entrada,
  .js [data-escena]:not(.en-escena) .tri-a .entrada { transform: translate3d(-44px, 36px, 0) rotate(-9deg) scale(0.9); }
  .js [data-escena]:not(.en-escena) .pos-b .entrada,
  .js [data-escena]:not(.en-escena) .tri-c .entrada { transform: translate3d(44px, 70px, 0) rotate(9deg) scale(0.9); }
  .js [data-escena]:not(.en-escena) .tri-b .entrada,
  .js [data-escena]:not(.en-escena) .pos-c .entrada { transform: translate3d(0, 90px, 0) scale(0.88); }
  .js .apartado.inverso [data-escena]:not(.en-escena) .pos-a .entrada { transform: translate3d(44px, 36px, 0) rotate(9deg) scale(0.9); }
  .js .apartado.inverso [data-escena]:not(.en-escena) .pos-b .entrada { transform: translate3d(-44px, 70px, 0) rotate(-9deg) scale(0.9); }
  /* Textos: la etiqueta y las viñetas entran desde un lado distinto según la sección, y el título crece */
  .js .apartado .etiqueta.rev { transform: translate3d(-48px, 0, 0); }
  .js .apartado.inverso .etiqueta.rev { transform: translate3d(48px, 0, 0); }
  .js .apartado h2.rev { transform: translate3d(0, 24px, 0) scale(0.92); }
  .js .apartado .puntos li.rev { transform: translate3d(-36px, 0, 0); }
  .js .apartado.inverso .puntos li.rev { transform: translate3d(36px, 0, 0); }
  .js .apartado .etiqueta.rev.visible, .js .apartado h2.rev.visible, .js .apartado .puntos li.rev.visible,
  .js .apartado.inverso .etiqueta.rev.visible, .js .apartado.inverso .puntos li.rev.visible { transform: none; }
}

/* ---------- 16. Móvil: portada compacta (sin fijado del scroll; nada se sale de la pantalla) ---------- */
@media (max-width: 640px) {
  .portada { padding: 6px 0 28px; }
  .portada-grid { gap: 4px; }
  .portada-texto h1 { font-size: clamp(2rem, 9.4vw, 2.5rem); margin-bottom: 0.35em; }
  .portada-texto .subtitulo { font-size: 1rem; margin-bottom: 14px; }
  .portada-texto .subtitulo .frase:nth-child(2) { display: none; }
  .portada-texto .acciones .boton { min-height: 48px; }
  .escenario { width: 100%; margin-top: 4px; }
  /* Orden en la portada: título y frase, luego los dispositivos y debajo los botones */
  .portada-texto { display: contents; }
  .portada-texto h1 { order: 1; }
  .portada-texto .subtitulo { order: 2; margin-inline: auto; }
  .escenario { order: 3; }
  .portada-texto .acciones { order: 4; justify-content: center; }
  .portada-texto .acciones ~ .acciones { order: 5; }
  .portada-texto .acciones { margin-top: 14px; }
}

/* ---------- 17. Móvil: el fondo de manchas naranjas va en un elemento que mide toda la página (sin capa fija ni animada). Pintarlo en el fondo del body hacía que el navegador lo cortara a la altura de la primera pantalla. ---------- */
@media (max-width: 640px) {
  .orbes { display: none; }
  body { position: relative; }
  body::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
      radial-gradient(70vmax 70vmax at 0% 6%, color-mix(in srgb, var(--acento) calc(0.30 * var(--orbe-intensidad) * 100%), transparent), transparent 70%),
      radial-gradient(60vmax 60vmax at 100% 40%, color-mix(in srgb, var(--acento) calc(0.24 * var(--orbe-intensidad) * 100%), transparent), transparent 70%),
      radial-gradient(60vmax 60vmax at 20% 78%, color-mix(in srgb, var(--acento) calc(0.20 * var(--orbe-intensidad) * 100%), transparent), transparent 70%);
    background-size: 100% 1600px; background-repeat: repeat-y;
  }
}

/* ---------- 18. Portal personal (solo lectura): menú lateral y cabecera propios ---------- */
[hidden] { display: none !important; }
.boton-sec { background: var(--tarjeta); color: var(--texto-titulo); border: 1px solid var(--borde-sutil); }
.p-herramientas { display: flex; align-items: center; gap: 8px; }

/* Sin sesión: presentación con los dispositivos de la web */
.p-entrada-pagina { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.p-entrada-barra { display: flex; align-items: center; justify-content: space-between; width: min(100% - 40px, var(--ancho-max)); margin: 0 auto; padding: 14px 0; }
.p-entrada-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; width: min(100% - 40px, var(--ancho-max)); margin: 0 auto; padding: 12px 0 48px; }
.p-entrada { text-align: center; }
.p-entrada h1 { font-size: clamp(2.4rem, 8vw, 4.25rem); margin-bottom: 0.4em; }
.p-entrada .subtitulo { font-size: 1.125rem; max-width: 30em; margin: 0 auto 22px; }
.p-estado { min-height: 1.6em; color: var(--texto-subtitulo); margin: 0 0 8px; }
.p-boton-entrar { min-height: 54px; padding: 0 32px; font-size: 1.0625rem; }
.p-nota { margin: 18px 0 0; font-size: 0.875rem; color: var(--texto-subtitulo); }
.p-escenario { width: min(100%, 560px); }
@media (min-width: 900px) {
  .p-entrada-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; }
  .p-entrada { text-align: left; }
  .p-entrada .subtitulo { margin-inline: 0; }
}

/* Con sesión: menú lateral flotante y redondo (se puede colapsar a una columna de iconos) + cabecera sin caja */
.p-shell { --lw: 244px; display: grid; grid-template-columns: var(--lw) minmax(0, 1fr); gap: 10px; min-height: 100vh; min-height: 100svh; padding: 10px; box-sizing: border-box; }
.p-shell.compacto { --lw: 64px; }
.p-lateral {
  position: sticky; top: 10px; align-self: start; height: calc(100vh - 20px); height: calc(100svh - 20px); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 8px 8px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
  border-radius: 26px; border: 1px solid var(--borde-sutil);
  background: color-mix(in srgb, var(--tarjeta) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.p-lateral::-webkit-scrollbar { display: none; }
:root:not([data-tema="oscuro"]) .p-lateral, :root:not([data-tema="oscuro"]) .p-contenido { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.p-marca { display: flex; justify-content: center; padding: 4px 0 10px; }
.p-marca img { height: 44px; width: auto; }
.p-menu { display: grid; gap: 2px; }
.p-menu-pie { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--borde-sutil); }
.p-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; box-sizing: border-box;
  background: none; color: var(--texto-cuerpo); font: inherit; font-size: 0.9375rem; font-weight: 600; text-align: left; cursor: pointer; list-style: none; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.p-item::-webkit-details-marker { display: none; }
.p-item svg { width: 22px; height: 22px; flex: none; }
.p-item:hover { background: var(--acento-suave); }
.p-item[aria-current="page"] { background: var(--acento-boton); color: var(--texto-sobre-acento); }
.p-flecha-grupo { margin-left: auto; width: 18px !important; height: 18px !important; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; }
.p-grupo-menu[open] > summary .p-flecha-grupo { transform: rotate(180deg); }
.p-sub-menu { display: grid; gap: 2px; padding: 2px 0 4px 10px; }
.p-hijo { min-height: 36px; font-size: 0.9rem; }
.p-sin-icono { width: 22px; height: 22px; flex: none; }

/* Colapsado: solo iconos (los nombres quedan para lectores de pantalla y como ayuda al pasar el ratón) */
.p-shell.compacto .p-lateral { padding-inline: 6px; align-items: center; }
/* Menú colapsado: se cambia el logo completo por la M suelta de la app */
.p-marca .logo-m { display: none; height: 20px; width: auto; }
.p-shell.compacto .p-marca { padding: 4px 0 10px; }
.p-shell.compacto .p-marca .logo-claro, .p-shell.compacto .p-marca .logo-oscuro { display: none; }
.p-shell.compacto .p-marca .logo-m-claro { display: var(--ver-logo-claro); }
.p-shell.compacto .p-marca .logo-m-oscuro { display: var(--ver-logo-oscuro); }
.p-shell.compacto .p-menu, .p-shell.compacto .p-grupo-menu { justify-items: center; width: 100%; }
.p-shell.compacto .p-item { width: 44px; min-height: 44px; padding: 0; justify-content: center; margin-inline: auto; }
.p-shell.compacto .p-item > span, .p-shell.compacto .p-flecha-grupo, .p-shell.compacto .p-sub-menu { display: none; }

.p-principal { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.p-cab { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px 0 6px; }
.p-cab h1 { flex: 1; margin: 0; font-size: 1.375rem; outline: none; }
.p-cab .tema-boton { width: 40px; height: 40px; }
.p-cab .menu-idioma summary { min-height: 40px; }
.p-cab .p-salir { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.p-abrir { display: none; }
.p-colapsar { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin: 4px 0 0; padding: 0 14px; border: 1px solid var(--borde-sutil); border-radius: 999px; background: var(--tarjeta); color: var(--texto-cuerpo); font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; flex: none; }
.p-shell.compacto .p-colapsar { width: 44px; min-height: 44px; padding: 0; margin-inline: auto; }
.p-shell.compacto .p-colapsar span { display: none; }
.p-colapsar:hover { background: var(--acento-suave); }
.p-colapsar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; }
.p-shell.compacto .p-colapsar svg { transform: rotate(180deg); }
.p-abrir svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.p-usuario { font-weight: 700; font-size: 0.9375rem; color: var(--texto-subtitulo); margin-right: 2px; }
.p-contenido {
  flex: 1; padding: 20px; width: 100%; box-sizing: border-box; border-radius: 26px; border: 1px solid var(--borde-sutil);
  background: color-mix(in srgb, var(--tarjeta) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.p-velo { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.45); }
.p-cab .menu-idioma .menu-panel { right: 0; left: auto; }
@media (max-width: 899px) {
  .p-shell, .p-shell.compacto { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 8px; }
  .p-lateral { position: fixed; z-index: 30; left: 8px; top: 8px; bottom: 8px; height: auto; width: min(270px, 82vw); transform: translateX(-115%); transition: transform 0.25s ease; background: var(--tarjeta); align-items: stretch; padding-inline: 8px; }
  .p-lateral.abierto { transform: none; }
  /* En móvil el menú es siempre un panel con nombres, aunque en escritorio esté colapsado */
  .p-shell.compacto .p-item { width: 100%; padding: 0 12px; justify-content: flex-start; }
  .p-shell.compacto .p-item > span { display: revert; }
  .p-shell.compacto .p-flecha-grupo { display: block; }
  .p-shell.compacto .p-sub-menu { display: grid; }
  .p-shell.compacto .p-marca .logo-claro { display: var(--ver-logo-claro); }
  .p-shell.compacto .p-marca .logo-oscuro { display: var(--ver-logo-oscuro); }
  .p-shell.compacto .p-marca .logo-m { display: none; }
  .p-abrir { display: inline-grid; }
  .p-colapsar { display: none; }
  .p-usuario { display: none; }
  .p-contenido { padding: 14px 12px 40px; }
}
@media (max-width: 480px) { .p-cab .p-salir { padding: 0 12px; } }
:root[data-movimiento="reducido"] .p-lateral, :root[data-movimiento="reducido"] .p-flecha-grupo, :root[data-movimiento="reducido"] .p-colapsar svg { transition: none; }

/* Contenido: las tarjetas van directamente sobre el fondo, como en la app */
.p-contenido { background: none !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 4px 0 24px !important; }

/* Inicio: cabecera y rejilla de tarjetas (1, 2 o 3 columnas, cada tarjeta con su alto) */
.p-inicio-cab { margin: 0 0 24px; }
.p-saludo-titulo { margin: 0 0 10px; font-size: 1.75rem; }
.p-frase { background: color-mix(in srgb, var(--tarjeta) 70%, transparent); border: 1px solid var(--borde-sutil); border-radius: 22px; padding: 14px 20px; color: var(--texto-subtitulo); }
.p-frase p { margin: 0; }
.p-frase:has(p:empty) { display: none; }
.p-rejilla-inicio { display: flex; gap: 24px; align-items: flex-start; max-width: 1000px; margin-inline: auto; }
.p-inicio-cab { max-width: 1000px; margin-inline: auto; }
.p-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.p-card { background: var(--tarjeta); border: 1px solid var(--borde-sutil); border-radius: 28px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
:root:not([data-tema="oscuro"]) .p-card { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.p-card h2 { margin: 0; font-size: 1.0625rem; letter-spacing: -0.01em; }
.p-card-cuerpo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.p-card p { margin: 0; }
.p-chip { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--acento-suave); color: var(--texto-titulo); font-weight: 700; font-size: 0.8125rem; }
.p-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.p-eti { color: var(--acento-texto); font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; }
.p-grande { font-size: 1.25rem; font-weight: 800; color: var(--texto-titulo); line-height: 1.2; overflow-wrap: anywhere; }
.p-cifra { color: var(--texto-subtitulo); font-weight: 700; }
.p-cifra b { font-size: 1.75rem; color: var(--texto-titulo); margin-right: 4px; }
.p-sub, .p-nota-peq { color: var(--texto-subtitulo); font-size: 0.875rem; }
.p-vacio, .p-error { color: var(--texto-subtitulo); }
.p-error { color: var(--acento-texto); font-weight: 700; }
.p-card hr { border: 0; border-top: 1px solid var(--borde-sutil); margin: 2px 0; width: 100%; }
.p-card .hoy { color: var(--acento-texto); }
.p-circulos, .p-letras { display: flex; justify-content: space-between; font-weight: 700; color: var(--texto-subtitulo); }
.p-circulos button { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--texto-subtitulo); font: inherit; font-weight: 700; cursor: pointer; }
.p-circulos button.con { background: var(--acento-suave); color: var(--acento-texto); }
.p-circulos button.hoy { color: var(--acento-texto); }
.p-circulos button.sel { background: var(--acento-boton); color: var(--texto-sobre-acento); }
.p-rutinas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.p-rutinas li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.p-circulos i, .p-letras i { position: absolute; bottom: -8px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--acento); }
.p-letras b { position: relative; }
.p-letras b.con { color: var(--texto-titulo); }
.p-semana { display: flex; align-items: center; justify-content: space-between; text-align: center; }
.p-semana b { display: block; color: var(--texto-titulo); } .p-semana span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-sel { width: 40px; height: 40px; border: 0; background: none; color: var(--texto-titulo); font-size: 1.75rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.p-sel:hover { background: var(--acento-suave); }
.p-dos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.p-sesiones span { display: block; font-size: 0.8125rem; color: var(--texto-subtitulo); line-height: 1.3; }
.p-tiempo span { display: block; font-size: 0.8125rem; color: var(--texto-subtitulo); } .p-tiempo b { font-size: 1.25rem; color: var(--texto-titulo); font-variant-numeric: tabular-nums; }
.p-datos { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.p-dato { display: flex; flex-direction: column; } .p-dato b { color: var(--texto-titulo); } .p-dato span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-anillo { position: relative; width: 88px; height: 88px; flex: none; }
.p-anillo-svg { width: 100%; height: 100%; }
.p-anillo-fondo { fill: none; stroke: var(--borde-sutil); stroke-width: 10; }
.p-anillo-valor { fill: none; stroke: var(--acento); stroke-width: 10; stroke-linecap: round; }
.p-anillo-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.p-anillo-txt b { font-size: 1.125rem; color: var(--texto-titulo); } .p-anillo-txt span { font-size: 0.6875rem; color: var(--texto-subtitulo); max-width: 72px; }
.p-nut { display: flex; align-items: center; gap: 18px; }
.p-macros { flex: 1; display: grid; gap: 10px; min-width: 0; }
.p-macro { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 0.875rem; } .p-macro b { color: var(--texto-titulo); } .p-macro .p-barra-fondo { grid-column: 1 / -1; }
.p-barra-fondo { display: block; height: 8px; border-radius: 999px; background: var(--borde-sutil); overflow: hidden; }
.p-barra-relleno { display: block; height: 100%; border-radius: 999px; background: var(--acento); }
.p-vbarras { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.p-vbarras > div { flex: 1; display: grid; gap: 6px; justify-items: center; font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); }
.p-vbarra { position: relative; display: block; width: 100%; max-width: 22px; height: 58px; border-radius: 999px; background: var(--borde-sutil); overflow: hidden; }
.p-vbarra i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--acento); border-radius: 999px; }
.p-hbarras { display: grid; gap: 8px; }
.p-hbarras > div { display: grid; grid-template-columns: 18px 1fr 52px; gap: 10px; align-items: center; font-weight: 700; color: var(--texto-subtitulo); font-size: 0.875rem; }
.p-hbarras em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.p-logros-dias { display: flex; justify-content: space-between; gap: 2px; }
.p-logro-dia { display: grid; gap: 2px; justify-items: center; min-width: 36px; padding: 6px 2px; border: 0; border-radius: 16px; background: none; color: var(--texto-subtitulo); font: inherit; font-weight: 700; cursor: pointer; }
.p-logro-dia span { font-size: 0.9375rem; } .p-logro-dia.hoy span { color: var(--texto-titulo); }
.p-logro-dia.sel { background: var(--acento-suave); color: var(--texto-titulo); }
.p-logro-dia i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--borde-sutil); }
.p-logro-dia i.cumplido { background: var(--acento); border-color: var(--acento); }
.p-lista-ej, .p-lista-tomas, .p-lista-fases { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.p-lista-ej li { color: var(--texto-cuerpo); }
.p-lista-tomas li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--borde-sutil); }
.p-lista-tomas li.tomada span { text-decoration: line-through; opacity: 0.6; } .p-lista-tomas em { font-style: normal; color: var(--texto-subtitulo); }
.p-fases { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--borde-sutil); }
.f-prof { --c: var(--acento); } .f-lig { --c: color-mix(in srgb, var(--acento) 45%, transparent); } .f-rem { --c: color-mix(in srgb, var(--acento) 70%, transparent); } .f-des { --c: color-mix(in srgb, var(--acento) 25%, transparent); }
.p-fases span { background: var(--c); }
.p-lista-fases li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: 0.875rem; color: var(--texto-subtitulo); }
.p-lista-fases i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.p-lista-fases b { color: var(--texto-titulo); }
.p-onda { width: 100%; height: 30px; }
.p-onda-fondo, .p-onda-valor { fill: none; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.p-onda-fondo { stroke: var(--borde-sutil); } .p-onda-valor { stroke: var(--acento); }
.p-linea { width: 100%; height: auto; max-height: 120px; }
.p-linea-area { fill: var(--acento-suave); stroke: none; }
.p-linea-trazo { fill: none; stroke: var(--acento); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.p-linea-punto { fill: var(--acento); }
.p-fechas { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--texto-subtitulo); }

/* Cabecera: el idioma es siempre un desplegable pequeño y "Iniciar sesión" es un botón aparte, al final y con aire (solo escritorio; en móvil va en el menú) */
.idiomas { display: none; }
.menu-idioma { display: block; }
.boton-sesion { display: none; margin-left: 14px; padding: 10px 20px; border-radius: 999px; background: var(--acento-boton); color: var(--texto-sobre-acento); font-weight: 800; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.boton-sesion:hover { filter: brightness(1.08); }
@media (min-width: 900px) { .boton-sesion { display: inline-flex; align-items: center; min-height: 44px; } .cabecera-derecha { gap: 10px; } }
.menu-panel .menu-sesion { font-weight: 800; color: var(--acento-texto); }

/* ---------- 19. Apariencia del portal y colores por tarjeta ---------- */
.p-ajustes { display: grid; gap: 16px; max-width: 760px; margin-inline: auto; }
.p-ajuste { background: var(--tarjeta); border: 1px solid var(--borde-sutil); border-radius: 28px; padding: 18px 22px; display: grid; gap: 14px; }
:root:not([data-tema="oscuro"]) .p-ajuste { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); }
.p-ajuste h2 { margin: 0; font-size: 1.0625rem; }
.p-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.p-seg button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--borde-sutil); background: var(--fondo); color: var(--texto-cuerpo); font: inherit; font-weight: 700; cursor: pointer; }
.p-seg button[aria-pressed="true"] { background: var(--acento-boton); color: var(--texto-sobre-acento); border-color: transparent; }
.p-colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 12px; }
.p-color { position: relative; width: 100%; max-width: 48px; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.p-color.sel::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--texto-titulo); }
.p-paletas { display: flex; flex-wrap: wrap; gap: 10px; }
.p-paletas button { display: grid; gap: 6px; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--borde-sutil); background: var(--fondo); color: var(--texto-cuerpo); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.p-paletas button[aria-pressed="true"] { border-color: var(--acento); }
.p-tira { display: flex; height: 12px; border-radius: 999px; overflow: hidden; min-width: 120px; }
.p-tira i { flex: 1; }
.p-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.45); display: grid; place-items: center; padding: 16px; }
.p-modal-caja { background: var(--tarjeta); border-radius: 28px; padding: 20px; width: min(560px, 100%); max-height: 86vh; overflow: auto; display: grid; gap: 14px; }
.p-modal-caja h2 { margin: 0; font-size: 1.125rem; }
.p-card { position: relative; }
.p-cc { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--tarjeta); background: var(--acento); box-shadow: 0 0 0 1px var(--borde-sutil); cursor: pointer; display: none; }
.p-card.multi .p-cc { display: block; }
/* Multicolor: fases del sueño y macros con los colores de la app */
.p-card.multi .f-prof { --c: #9C27B0; } .p-card.multi .f-lig { --c: #2196F3; } .p-card.multi .f-rem { --c: #00BCD4; } .p-card.multi .f-des { --c: #FFC107; }
.p-card.multi .p-macro:nth-child(1) .p-barra-relleno { background: #E53935; }
.p-card.multi .p-macro:nth-child(2) .p-barra-relleno { background: #AB47BC; }
.p-card.multi .p-macro:nth-child(3) .p-barra-relleno { background: #43A047; }

/* ---------- 20. Historial ---------- */
.p-historial { max-width: 1000px; margin-inline: auto; display: grid; gap: 24px; }
.p-historial .p-inicio-cab { margin: 0; }
.p-hist-dias { display: flex; justify-content: space-between; gap: 2px; }
.p-hist-dias > div { display: grid; gap: 4px; justify-items: center; min-width: 34px; }
.p-hist-dias b { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-hist-dias span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--texto-subtitulo); }
.p-hist-dias span.con { background: var(--acento-suave); color: var(--acento-texto); }
.p-hist-dias span.hoy { box-shadow: inset 0 0 0 2px var(--acento); }
.p-hist-dias i { display: flex; gap: 3px; height: 6px; }
.p-hist-dias u { width: 6px; height: 6px; border-radius: 50%; background: var(--acento); }
.p-totales { display: flex; justify-content: space-around; text-align: center; }
.p-totales > div { display: grid; flex: 1; } .p-totales b { font-size: 1.125rem; color: var(--texto-titulo); } .p-totales span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-totales > div + div { border-left: 1px solid var(--borde-sutil); }
.p-hist-lista { display: flex; gap: 24px; align-items: flex-start; }
.p-hist-lista .p-col { gap: 24px; }
.p-hist-card { background-image: linear-gradient(135deg, transparent 55%, var(--acento-suave)); }
.p-hist-stats { font-weight: 800; color: var(--texto-titulo); }
.p-miniaturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; margin-top: 6px; }
.p-mini { display: grid; gap: 6px; justify-items: center; text-align: center; min-width: 0; }
.p-mini-caja { position: relative; width: 72px; height: 72px; }
.p-mini-img { display: block; width: 100%; height: 100%; border-radius: 18px; background: var(--acento-suave); overflow: hidden; }
.p-mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.p-mini-caja em { position: absolute; top: -4px; right: -4px; min-width: 28px; padding: 2px 6px; border-radius: 999px; background: var(--acento-boton); color: var(--texto-sobre-acento); font-style: normal; font-weight: 800; font-size: 0.75rem; text-align: center; }
.p-mini-nombre { font-size: 0.8125rem; color: var(--texto-cuerpo); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; overflow-wrap: anywhere; }
.p-mas-caja { display: flex; justify-content: center; }

.p-dia-btn { display: grid; gap: 4px; justify-items: center; min-width: 38px; padding: 2px; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 16px; }
.p-dia-btn.sel span { background: var(--acento-boton); color: var(--texto-sobre-acento); }
.p-hist-boton { width: 100%; background: var(--acento-suave); color: var(--acento-texto); }
.p-miniaturas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 420px) { .p-miniaturas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.p-meses { display: grid; gap: 16px; }
.p-mes { background: color-mix(in srgb, var(--tarjeta) 70%, transparent); border: 1px solid var(--borde-sutil); border-radius: 24px; }
.p-mes summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; min-height: 48px; }
.p-mes summary span { color: var(--texto-subtitulo); font-size: 0.875rem; }
.p-mes-cuerpo { display: grid; gap: 16px; padding: 0 16px 16px; }
@media (min-width: 900px) { .p-mes-cuerpo { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.p-hist-ranura .p-card { max-width: 480px; }

.p-rutinas li { align-items: center; }
.p-rutina-quitar { margin-left: auto; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--borde-sutil); background: none; color: var(--texto-subtitulo); font: inherit; font-size: 0.8125rem; cursor: pointer; min-height: 32px; }
.p-rutina-quitar:hover { background: var(--acento-suave); color: var(--texto-titulo); }
.p-asignar { align-self: flex-start; min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.p-modal-sub { margin: 4px 0 0; font-size: 0.9375rem; color: var(--texto-subtitulo); }
.p-elegir { display: grid; gap: 8px; }
.p-elegir-item { text-align: left; min-height: 46px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--borde-sutil); background: var(--fondo); color: var(--texto-titulo); font: inherit; font-weight: 700; cursor: pointer; }
.p-elegir-item:hover { background: var(--acento-suave); }

/* ---------- 21. Detalle de entreno y de cardio ---------- */
.p-pulsable { cursor: pointer; }
.p-pulsable:hover { box-shadow: 0 0 0 2px var(--acento-suave); }
.p-volver-hist { justify-self: start; min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.p-detalle-cont { display: grid; gap: 16px; }
.p-det-ejercicios { display: grid; gap: 16px; }
.p-det-ej-cab { display: flex; align-items: center; gap: 14px; }
.p-det-img { width: 64px; height: 64px; flex: none; }
.p-det-img .p-mini-img { width: 100%; height: 100%; }
.p-det-nombre { margin: 0; font-size: 1.0625rem; }
.p-det-series { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.p-det-series li { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.p-det-series li.calen { opacity: 0.65; }
.p-det-series em { font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); padding: 1px 8px; border-radius: 999px; background: var(--acento-suave); }
.p-ruta { width: 100%; max-width: 420px; height: auto; align-self: center; }
.p-ruta-trazo { fill: none; stroke: var(--acento); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.p-ruta-ini { fill: var(--acento); } .p-ruta-fin { fill: var(--texto-titulo); }
.p-borrar { justify-self: start; color: var(--acento-texto); }
.p-peligro { background: #B3261E; color: #fff; }

/* ---------- 22. Biblioteca de ejercicios ---------- */
.p-ej-barra { display: flex; flex-wrap: wrap; gap: 10px; }
.p-buscar { flex: 1 1 240px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--borde-sutil); background: var(--tarjeta); color: var(--texto-titulo); font: inherit; }
.p-select { flex: 0 1 260px; min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--borde-sutil); background: var(--tarjeta); color: var(--texto-titulo); font: inherit; }
.p-chips-filtro { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.p-chips-filtro button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--borde-sutil); background: var(--tarjeta); color: var(--texto-cuerpo); font: inherit; font-weight: 700; cursor: pointer; }
.p-chips-filtro button[aria-pressed="true"] { background: var(--acento-boton); color: var(--texto-sobre-acento); border-color: transparent; }
.p-ej-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-ej-card { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.p-ej-card:hover { box-shadow: 0 0 0 2px var(--acento-suave); }
.p-ej-txt { display: grid; gap: 2px; min-width: 0; } .p-ej-txt b { color: var(--texto-titulo); overflow-wrap: anywhere; } .p-ej-txt span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-ej-gif { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: contain; border-radius: 20px; background: #fff; justify-self: center; }

.p-detalle-cont .p-hist-lista .p-col { gap: 24px; }

.p-archivo { font: inherit; color: var(--texto-cuerpo); max-width: 100%; }
.p-modal-caja .p-buscar, .p-modal-caja .p-select { width: 100%; flex: none; }
.p-zona-img { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.p-elegir-img { min-height: 44px; }
.p-img-vista img { width: 56px; height: 56px; object-fit: cover; border-radius: 14px; display: block; }
.p-zona-img .p-sub { margin: 0; overflow-wrap: anywhere; min-width: 0; }

/* ---------- 23. Carga y aparición de las tarjetas ---------- */
.p-carga { display: inline-grid; place-items: center; }
.p-carga svg { width: 56px; height: 56px; animation: p-gira 1.5s linear infinite; }
.p-carga path { fill: none; stroke: var(--acento); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; animation: p-arco 1.6s ease-in-out infinite; }
@keyframes p-gira { to { transform: rotate(360deg); } }
@keyframes p-arco { 0% { stroke-dasharray: 6 94; stroke-dashoffset: 0; } 50% { stroke-dasharray: 62 38; stroke-dashoffset: -18; } 100% { stroke-dasharray: 6 94; stroke-dashoffset: -100; } }
:root[data-movimiento="reducido"] .p-carga svg { animation: none; }
:root[data-movimiento="reducido"] .p-carga path { animation: none; stroke-dasharray: 70 30; }
.p-carga-centro { min-height: calc(100vh - 150px); min-height: calc(100svh - 150px); display: grid; place-items: center; opacity: 1; transition: opacity 0.2s ease; }
.p-carga-centro.sale { opacity: 0; }
.p-inicio-wrap { position: relative; }
.p-oculto { visibility: hidden; position: absolute; left: 0; right: 0; top: 0; }
.p-inicio-cont.p-revela .p-card, .p-inicio-cont.p-revela .p-inicio-cab, .p-historial.p-revela .p-card { animation: p-entra-card 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes p-entra-card { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
:root[data-movimiento="reducido"] .p-inicio-cont.p-revela .p-card, :root[data-movimiento="reducido"] .p-inicio-cont.p-revela .p-inicio-cab, :root[data-movimiento="reducido"] .p-historial.p-revela .p-card { animation: none; }
.p-historial > .p-carga, .p-detalle-cont > .p-carga, .p-card-cuerpo > .p-carga, .p-panel > .p-carga { justify-self: center; margin: 40px auto; }

/* Historial: título grande, carga por semana y tarjeta de espera */
.p-hero { margin: 4px 0 18px; font-size: clamp(1.625rem, 3.4vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
.p-carga-tarjeta { min-height: 260px; display: grid; place-items: center; }
.p-historial.p-revela .p-sin-anim { animation: none; }
.p-fundido { animation: p-fundido 0.35s ease both; }
@keyframes p-fundido { from { opacity: 0; } to { opacity: 1; } }
:root[data-movimiento="reducido"] .p-fundido { animation: none; }

/* Ejercicios: tarjetas de músculos y cabecera de lista (sin pills) */
.p-ej-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.p-grupo-tile { padding: 14px 18px; }
.p-grupo-tile .p-det-img { width: 72px; height: 72px; }
.p-ej-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.p-ej-titulo { margin: 0; font-size: 1.375rem; }

/* Ejercicios: pills de músculo y tarjetas que aparecen animadas, sin huecos grandes */
.p-ej-pag { gap: 12px; }
.p-ej-pag .p-sub { margin: 0; }
.p-entra { animation: p-entra-card 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
:root[data-movimiento="reducido"] .p-entra { animation: none; }

/* Frecuencia cardíaca en el detalle */
.p-linea-ejes { display: flex; justify-content: space-between; font-size: 0.75rem; opacity: 0.7; margin-top: 2px; }
.p-linea { margin-top: 10px; max-height: 140px; }

/* Detalle de fuerza: el nombre y los datos del entreno van como titulo de la pantalla, sin tarjeta */
.p-det-titulo { margin: 4px 0 22px; }
.p-det-titulo .p-hero { margin: 0 0 6px; }
.p-det-fecha { margin: 0 0 16px; color: var(--texto-subtitulo); }
.p-datos-grandes { gap: 10px 36px; }
.p-datos-grandes .p-dato b { font-size: 1.5rem; letter-spacing: -0.01em; }

/* Fuerza: Entrenar, plantillas, semana, marcas, volumen por músculo y últimas sesiones */
.p-fz-hoy { margin: 14px 0 2px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; color: var(--acento-texto); }
.p-fz-nombre { margin: 0 0 4px; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: var(--texto-titulo); line-height: 1.1; }
.p-fz-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.p-fz-plantilla { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 108px; border-radius: 20px; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); }
.p-fz-plantilla i { position: absolute; right: 8px; bottom: -14px; font-style: normal; font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--acento); opacity: 0.18; }
.p-fz-plantilla b { color: var(--texto-titulo); line-height: 1.2; position: relative; }
.p-fz-plantilla span { font-size: 0.8125rem; color: var(--texto-subtitulo); position: relative; }
.p-fz-semana-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.p-fz-semana-cab h2 { margin-bottom: 2px; }
.p-fz-sel { display: flex; gap: 6px; flex-shrink: 0; }
.p-fz-volumen { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.p-fz-volumen div { display: flex; flex-direction: column; color: var(--texto-subtitulo); font-size: 0.9375rem; }
.p-fz-volumen div b { color: var(--texto-titulo); font-size: 1.25rem; }
.p-fz-volumen strong { font-size: clamp(2.25rem, 7vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; color: var(--acento); opacity: 0.55; line-height: 1; }
.p-fz-stats { margin: 12px 0 14px; color: var(--texto-subtitulo); } .p-fz-stats b { color: var(--texto-titulo); }
.p-fz-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; align-items: end; }
.p-fz-dias > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.p-fz-barra { display: block; width: 100%; max-width: 26px; height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 12%, transparent); transition: transform 0.4s, opacity 0.4s; }
.p-fz-barra.on { height: 56px; background: var(--acento); }
.p-fz-dias em { font-style: normal; font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); } .p-fz-dias em.hoy { color: var(--acento-texto); }
.p-fz-marcas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.p-fz-marca { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 20px; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); min-width: 0; }
.p-fz-marca-nombre { font-size: 0.8125rem; font-weight: 600; color: var(--texto-subtitulo); line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-fz-marca b { font-size: 1.375rem; font-weight: 800; color: var(--texto-titulo); }
.p-fz-marca span:last-child { font-size: 0.75rem; color: var(--texto-subtitulo); } .p-fz-marca span.mejora { color: var(--acento-texto); font-weight: 700; }
.p-fz-toggle { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 4px; margin-top: 10px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 7%, transparent); }
.p-fz-toggle button { border: 0; border-radius: 99px; padding: 10px 8px; min-height: 40px; background: transparent; color: var(--texto-cuerpo, var(--texto-titulo)); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.p-fz-toggle button.sel { background: var(--acento-boton); color: var(--texto-sobre-acento, #fff); }
.p-fz-filas { margin-top: 12px; }
.p-fz-fila { padding: 7px 0; }
.p-fz-fila-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.p-fz-fila-cab b { flex: 1; color: var(--texto-titulo); font-size: 0.875rem; } .p-fz-fila-cab span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-fz-fila-cab em { font-style: normal; font-size: 0.6875rem; font-weight: 800; min-width: 64px; text-align: center; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-subtitulo); }
.p-fz-fila-cab em.opt { background: var(--acento-boton); color: var(--texto-sobre-acento, #fff); }
.p-fz-pista { position: relative; display: block; height: 10px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--texto-titulo) 9%, transparent); }
.p-fz-pista u { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--texto-titulo) 12%, transparent); }
.p-fz-pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: color-mix(in srgb, var(--acento) 62%, transparent); transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.p-fz-pista i.opt { background: var(--acento); }
.p-fz-sesiones { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.p-fz-sesion { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 6px; border: 0; border-radius: 18px; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.p-fz-sesion:hover { background: color-mix(in srgb, var(--texto-titulo) 5%, transparent); }
.p-fz-ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--acento-suave); color: var(--acento); } .p-fz-ico svg { width: 26px; height: 26px; }
.p-fz-sesion-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p-fz-sesion-txt b { color: var(--texto-titulo); font-size: 1.0625rem; } .p-fz-sesion-txt span, .p-fz-sesion-txt em { font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-fz-kcal { flex: none; font-size: 0.8125rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-subtitulo); }
.p-fz-toggle button { white-space: nowrap; padding-inline: 4px; }

/* Cardio: deportes de la semana (cuadrícula) y detalles de la pantalla */
.p-cd-debajo { margin-top: 28px; }
.p-cd-titulo { margin: 0 0 4px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.p-cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.p-cd-deporte { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 3px; min-height: 150px; padding: 18px; }
.p-cd-deporte strong { position: absolute; right: 12px; bottom: 6px; font-size: 4.125rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--texto-subtitulo); opacity: 0.22; }
.p-cd-deporte.on strong { color: var(--acento); opacity: 0.4; }
.p-cd-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; position: relative; }
.p-cd-cab b { font-size: 0.875rem; font-weight: 800; color: var(--texto-titulo); }
.p-cd-ico { display: grid; place-items: center; width: 28px; height: 28px; color: var(--acento); } .p-cd-ico svg { width: 28px; height: 28px; }
.p-cd-sub { position: relative; font-size: 0.75rem; color: var(--texto-subtitulo); }
.p-cd-sub:nth-of-type(1) { font-weight: 700; }

/* Últimas sesiones a todo el ancho: las sesiones en línea, de tres en tres cuando hay sitio */
.p-cd-debajo > .p-card { margin-bottom: 28px; }
.p-fz-sesiones.fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.p-fz-sesiones.fila .p-fz-sesion { padding: 14px; background: color-mix(in srgb, var(--texto-titulo) 5%, transparent); }

/* Fuerza y Cardio (diseño C): títulos fuera de la tarjeta, tarjetas pequeñas para los datos y secciones apiladas */
.p-secciones { display: grid; gap: 34px; }
.p-sec-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.p-sec-cab h2 { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.p-sec-cab p { margin: 3px 0 0; font-size: 0.875rem; color: var(--texto-subtitulo); }
.p-sec-cuerpo > .p-vacio { border: 1.5px dashed var(--borde-sutil); border-radius: 20px; padding: 16px 18px; margin: 0; }
.p-fz-hoy-card { align-items: flex-start; }
.p-fz-hoy-card .p-fz-hoy { margin-top: 0; }
.p-fz-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.p-fz-cifra { gap: 2px; padding: 14px 16px; } .p-fz-cifra span { font-size: 0.8125rem; color: var(--texto-subtitulo); } .p-fz-cifra b { font-size: 1.75rem; letter-spacing: -0.02em; color: var(--texto-titulo); }
.p-fz-cifras + .p-fz-dias { margin-top: 16px; max-width: 380px; }
.p-fz-marcas { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 0; }
.p-fz-marca-c { gap: 4px; padding: 14px 16px; min-width: 0; }
.p-fz-marca-c .p-fz-marca-nombre { font-size: 0.8125rem; font-weight: 600; color: var(--texto-subtitulo); line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-fz-marca-c b { font-size: 1.5rem; font-weight: 800; color: var(--texto-titulo); }
.p-fz-marca-c > span:last-child { font-size: 0.75rem; color: var(--texto-subtitulo); } .p-fz-marca-c > span.mejora { color: var(--acento-texto); font-weight: 700; }
.p-fz-plantillas { margin-top: 0; }
.p-fz-sesiones.fila { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.p-fz-sesion-c { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
.p-fz-sesion-c.p-pulsable { cursor: pointer; }
.p-fz-sesion-c .p-fz-sesion-txt { flex: 1; min-width: 0; }
.p-sec-cuerpo > .p-cd-grid { margin-top: 0; }
.p-historial.p-revela .p-sec-cab, .p-historial.p-revela .p-fz-plantilla { animation: p-entra-card 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
:root[data-movimiento="reducido"] .p-historial.p-revela .p-sec-cab, :root[data-movimiento="reducido"] .p-historial.p-revela .p-fz-plantilla { animation: none; }

.p-fz-toggle { max-width: 520px; }

/* Barras por día dentro de una tarjeta, junto a las tres cifras */
.p-fz-dias-card { justify-content: center; padding: 14px 18px; min-width: 0; }
.p-fz-dias-card .p-fz-dias { margin: 0; max-width: none; gap: 4px; }
.p-fz-dias-card .p-fz-barra.on { height: 40px; }
.p-fz-cifras { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.p-fz-cifras .p-fz-dias-card { grid-column: span 1; }
@media (min-width: 1100px) { .p-fz-cifras { grid-template-columns: repeat(3, 1fr) 1.3fr; } }

/* Nutrición: día, resumen del día y diario de comidas */
.p-nu-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 20px; align-items: start; }
.p-nu-comidas { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; align-items: start; }
.p-nu-cab { display: flex; align-items: baseline; gap: 10px; } .p-nu-cab b { font-size: 1.0625rem; color: var(--texto-titulo); } .p-nu-cab span { font-size: 0.875rem; font-weight: 800; color: var(--acento-texto); }
.p-nu-total { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--acento-texto); }
.p-nu-items { display: flex; flex-direction: column; margin-top: 4px; }
.p-nu-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--borde-sutil); }
.p-nu-item:first-child { border-top: 0; }
.p-nu-item > div { display: flex; flex-direction: column; min-width: 0; } .p-nu-item b { color: var(--texto-titulo); font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-nu-item span { font-size: 0.75rem; color: var(--texto-subtitulo); } .p-nu-der { align-items: flex-end; flex: none; }
.p-fz-hoy-btn { padding: 8px 16px; min-height: 36px; font-size: 0.875rem; }
.p-secciones.p-cargando { opacity: 0.55; transition: opacity 0.2s; }
.p-secciones { transition: opacity 0.2s; }

.p-agua-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 4px; }
.p-agua-btn { justify-content: center; min-height: 44px; font-weight: 800; }
.p-agua-btn:disabled { opacity: 0.45; cursor: default; }

/* Suplementación: tomas del día y lista de suplementos */
.p-su-lista { display: flex; flex-direction: column; }
.p-su-toma { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--borde-sutil); }
.p-su-toma:first-child { border-top: 0; }
.p-su-hora { flex: none; width: 3.4em; font-weight: 800; font-size: 1.0625rem; color: var(--texto-titulo); font-variant-numeric: tabular-nums; }
.p-su-nombre { flex: 1; min-width: 0; display: flex; flex-direction: column; } .p-su-nombre b { color: var(--texto-titulo); } .p-su-nombre span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-su-toma em { font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); font-variant-numeric: tabular-nums; }
.p-su-check { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--borde-sutil); color: var(--texto-sobre-acento, #fff); }
.p-su-toma.hecha .p-su-check { background: var(--acento-boton); border-color: var(--acento-boton); } .p-su-check svg { width: 18px; height: 18px; }
.p-su-mis { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.p-su-sup { gap: 3px; } .p-su-sup b { font-size: 1.0625rem; color: var(--texto-titulo); } .p-su-sup span { font-size: 0.875rem; color: var(--texto-subtitulo); }
.p-su-sup .p-su-horas { font-weight: 700; color: var(--acento-texto); font-variant-numeric: tabular-nums; }
.p-su-sup em { font-style: normal; font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-subtitulo); align-self: flex-start; margin-top: 4px; }
.p-su-sup.pausa { opacity: 0.7; }

/* Nutrición: las tarjetas de calorías e hidratación miden lo mismo */
.p-nu-fila { align-items: stretch; }
.p-nu-fila > .p-sec { display: flex; flex-direction: column; }
.p-nu-fila .p-sec-cuerpo { flex: 1; display: flex; }
.p-nu-fila .p-sec-cuerpo > .p-card { flex: 1; }
.p-nu-fila .p-card > .p-card-cuerpo { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }

/* Suplementación: cada toma es un interruptor */
button.p-su-toma { width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 12px; }
button.p-su-toma:hover:not(:disabled) .p-su-check { border-color: var(--acento-boton); }
button.p-su-toma:disabled { cursor: default; opacity: 0.75; }
button.p-su-toma:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }

/* Asistente IA: chat sencillo */
.p-as { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; height: calc(100svh - 92px); min-height: 420px; }
.p-as-aviso { margin: 0; padding: 12px 16px; border-radius: 18px; background: var(--acento-suave); color: var(--texto-titulo); font-size: 0.875rem; line-height: 1.45; }
.p-as-chat { padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.p-as-lista { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; min-height: 0; overflow-y: auto; }
.p-as-msg { max-width: min(75%, 760px); padding: 10px 14px; border-radius: 20px; line-height: 1.5; font-size: 0.9375rem; overflow-wrap: anywhere; }
.p-as-msg.yo { align-self: flex-end; background: var(--acento-boton); color: var(--texto-sobre-acento, #fff); border-bottom-right-radius: 6px; }
.p-as-msg.ia { align-self: flex-start; background: color-mix(in srgb, var(--texto-titulo) 7%, transparent); color: var(--texto-titulo); border-bottom-left-radius: 6px; }
.p-as-msg.error { background: color-mix(in srgb, #D71919 12%, transparent); }
.p-as-msg p { margin: 0; } .p-as-msg p + p { margin-top: 6px; } .p-as-li { padding-left: 1.1em; text-indent: -1.1em; } .p-as-li::before { content: "\2022\00a0\00a0"; }
.p-as-esperando { display: flex; align-items: center; gap: 4px; color: var(--texto-subtitulo); } .p-as-esperando[hidden] { display: none; }
.p-as-esperando i { width: 6px; height: 6px; border-radius: 50%; background: var(--acento); animation: p-as-punto 1s infinite ease-in-out; } .p-as-esperando i:nth-of-type(2) { animation-delay: 0.15s; } .p-as-esperando i:nth-of-type(3) { animation-delay: 0.3s; }
@keyframes p-as-punto { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
:root[data-movimiento="reducido"] .p-as-esperando i { animation: none; }
.p-as-entrada { display: flex; align-items: flex-end; gap: 10px; padding: 12px; border-top: 1px solid var(--borde-sutil); }
.p-as-caja { flex: 1; resize: none; border: 1px solid var(--borde-sutil); border-radius: 20px; padding: 12px 16px; font: inherit; font-size: 0.9375rem; background: var(--tarjeta); color: var(--texto-titulo); max-height: 160px; }
.p-as-caja:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; }
.p-as-enviar { flex: none; min-height: 46px; }
.p-as-acciones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.p-as-confirma { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--texto-subtitulo); } .p-as-confirma[hidden] { display: none; }
.p-as-nueva { padding: 8px 14px; min-height: 36px; font-size: 0.875rem; } .p-as-nueva[hidden] { display: none; }
.p-as-caja { overflow-y: hidden; scrollbar-width: thin; }

.p-as .p-sec-cab { margin-bottom: 0; align-items: center; }
@media (max-width: 820px) { .p-as { height: calc(100svh - 96px); } .p-as-msg { max-width: 90%; } }

/* Perfil: cifras, evolución y sueño */
.p-pf-cifras { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.p-pf-cifras .p-fz-cifra b { font-size: 1.5rem; }
.p-pf-evo { min-height: 150px; display: grid; align-content: center; }
.p-pf-evo > .p-carga { justify-self: center; }
.p-pf-extremos { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; } .p-pf-extremos span { font-size: 0.8125rem; color: var(--texto-subtitulo); } .p-pf-extremos b { font-size: 1.5rem; color: var(--texto-titulo); }
.p-pf-grafica .p-linea { max-height: 170px; }
.p-pf-barras { display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; min-height: 150px; padding-top: 8px; }
.p-pf-barras > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; flex: 1; min-width: 0; }
.p-pf-barras b { font-size: 0.75rem; color: var(--texto-titulo); white-space: nowrap; } .p-pf-barras em { font-style: normal; font-size: 0.75rem; color: var(--texto-subtitulo); }
.p-pf-barra { display: block; width: min(100%, 34px); border-radius: 10px 10px 4px 4px; background: var(--acento); opacity: 0.85; }

.p-pf-grafica .p-linea { width: 100%; height: 170px; max-height: none; } .p-pf-grafica .p-linea-trazo { vector-effect: non-scaling-stroke; }

/* Fotos de progreso: sesiones con miniatura borrosa y fotos nítidas al abrir */
.p-fo-sesiones { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-fo-card { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; cursor: pointer; }
.p-fo-mini { flex: none; width: 76px; height: 96px; border-radius: 16px; background: var(--acento-suave) center / cover no-repeat; filter: blur(3px); image-rendering: auto; }
.p-fo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .p-fo-txt b { color: var(--texto-titulo); font-size: 1rem; } .p-fo-txt span, .p-fo-txt em { font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-fo-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.p-fo-foto { margin: 0; position: relative; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); aspect-ratio: 3 / 4; display: grid; }
.p-fo-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-fo-foto figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.8125rem; font-weight: 700; }
.p-fo-carga { place-self: center; font-size: 0.8125rem; color: var(--texto-subtitulo); padding: 0 12px; text-align: center; }

/* Sueño y descanso */
.p-sn-fila2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 880px) { .p-sn-fila2 { grid-template-columns: 1fr; } }
.p-sn-fila2 > .p-sec { min-width: 0; }
.p-sn-cab { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.p-sn-cab .p-anillo { width: 132px; height: 132px; flex: none; }
.p-sn-dato { display: flex; flex-direction: column; gap: 6px; } .p-sn-dato b { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; color: var(--texto-titulo); line-height: 1; }
.p-sn-ef { align-self: flex-start; font-size: 0.8125rem; font-weight: 800; padding: 5px 12px; border-radius: 99px; background: var(--acento-suave); color: var(--acento-texto); }
.p-sn-fases { height: 14px; gap: 2px; margin-top: 16px; } .p-sn-fases span { border-radius: 2px; }
.p-sn-filas { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.p-sn-fila > div { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .p-sn-fila span { flex: 1; font-size: 0.875rem; font-weight: 700; color: var(--texto-subtitulo); } .p-sn-fila b { font-size: 1rem; color: var(--texto-titulo); } .p-sn-fila em { width: 44px; text-align: right; font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-sn-punto { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.p-sn-pista { display: block; height: 7px; border-radius: 99px; background: var(--borde-sutil); overflow: hidden; } .p-sn-pista i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.p-sn-veredicto { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.01em; color: var(--acento-texto); }
.p-sn-texto { margin: 0; line-height: 1.6; color: var(--texto-cuerpo, var(--texto-titulo)); }
.p-sn-grafica { position: relative; margin-bottom: 12px; }
.p-sn-ideal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--borde-sutil); }
.p-sn-barras { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.p-sn-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: 0.55; font: inherit; }
.p-sn-col.sel, .p-sn-col:hover { opacity: 1; } .p-sn-col:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; border-radius: 10px; }
.p-sn-col em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--texto-subtitulo); height: 18px; } .p-sn-col.sel em { color: var(--acento-texto); }
.p-sn-pila { display: flex; flex-direction: column-reverse; width: min(100%, 44px); border-radius: 10px; overflow: hidden; } .p-sn-pila i { display: block; background: var(--c); } .p-sn-pila.vacia { height: 6px; background: var(--borde-sutil); }
.p-sn-medias { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-sn-media { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 20px; background: color-mix(in srgb, var(--texto-titulo) 5%, transparent); }
.p-sn-media span { font-size: 0.8125rem; font-weight: 800; color: var(--acento-texto); } .p-sn-media i { width: 24px; height: 4px; border-radius: 99px; background: var(--c, var(--acento)); } .p-sn-media b { font-size: 1.125rem; color: var(--texto-titulo); }

/* Plantillas: tarjetas pulsables y editor */
button.p-fz-plantilla { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; } button.p-fz-plantilla:hover { background: color-mix(in srgb, var(--texto-titulo) 10%, transparent); } button.p-fz-plantilla:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pl { max-width: 860px; }
.p-pl-nombre { width: 100%; max-width: 520px; flex: none; font-size: 1.0625rem; }
.p-pl-lista { display: grid; gap: 14px; margin: 14px 0; }
.p-pl-acciones { margin-left: auto; display: flex; gap: 4px; }
.p-pl-icono { width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 1.125rem; cursor: pointer; line-height: 1; } .p-pl-icono:disabled { opacity: 0.35; cursor: default; } .p-pl-icono:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pl-opciones { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.p-pl-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; cursor: pointer; } .p-pl-check input { width: 20px; height: 20px; accent-color: var(--acento-boton); }
.p-pl-cabeza, .p-pl-serie { display: grid; grid-template-columns: 28px minmax(70px, 1fr) minmax(70px, 1fr) minmax(110px, 1.3fr) 36px; gap: 8px; align-items: center; }
.p-pl-cabeza { font-size: 0.75rem; font-weight: 700; color: var(--texto-subtitulo); } .p-pl-cabeza span { padding-left: 4px; }
.p-pl-num { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--borde-sutil); border-radius: 14px; background: var(--tarjeta); color: var(--texto-titulo); font: inherit; font-size: 1rem; }
.p-pl-num:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; }
.p-pl-tipo { width: 100%; min-width: 0; padding: 10px 8px; }
.p-pl-mas { align-self: flex-start; padding: 8px 14px; min-height: 36px; font-size: 0.875rem; }
.p-pl-desc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.875rem; } .p-pl-desc .p-pl-num { width: 90px; } .p-pl-desc em { font-style: normal; font-size: 0.75rem; color: var(--texto-subtitulo); }
.p-pl-modal { width: min(620px, 100%); }
.p-pl-res { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; border-radius: 16px; }
.p-pl-opcion { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--borde-sutil); background: transparent; color: var(--texto-titulo); font: inherit; cursor: pointer; } .p-pl-opcion:hover { background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); } .p-pl-opcion span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
@media (max-width: 520px) { .p-pl-cabeza, .p-pl-serie { grid-template-columns: 22px 1fr 1fr 96px 32px; gap: 6px; } }
.p-pl-ej .p-buscar, .p-pl .p-buscar { flex: none; height: auto; min-height: 0; }
.p-pl-ej { gap: 12px; }
.p-pl > .boton { align-self: flex-start; }

/* Botones de color de las tarjetas ocultos desde Ajustes */
:root[data-botones-color="no"] .p-cc { display: none !important; }

.p-pl-pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .p-pl-pasos li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--borde-sutil); } .p-pl-pasos li:first-child { border-top: 0; }
.p-pl-pasos span { color: var(--texto-subtitulo); } .p-pl-pasos b { color: var(--texto-titulo); } .p-pl-pasos em { grid-column: 1 / -1; font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-cp-fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.p-cp-campo { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); min-width: 0; } .p-cp-campo .p-select, .p-cp-campo .p-pl-num { min-width: 120px; }
.p-cp-dur { display: inline-flex; align-items: center; gap: 4px; } .p-cp-dur .p-pl-num { width: 78px; min-width: 0; }
.p-cp-fase { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--borde-sutil); }

.p-cp-campo .p-select, .p-cp-campo .p-pl-num { flex: none; height: auto; min-height: 0; }

/* Suplementos: interruptor de pausa y editor */
.p-su-sup-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-su-sw { flex: none; position: relative; width: 46px; height: 28px; border-radius: 99px; border: 0; background: color-mix(in srgb, var(--texto-titulo) 18%, transparent); cursor: pointer; transition: background 0.2s; padding: 0; }
.p-su-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.2s; }
.p-su-sw.on { background: var(--acento-boton); } .p-su-sw.on::after { transform: translateX(18px); } .p-su-sw:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; } .p-su-sw:disabled { opacity: 0.5; }
.p-su-edit { width: min(520px, 100%); }
.p-su-horas-ed { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } .p-su-hora-fila { display: flex; align-items: center; gap: 8px; }
.p-su-dias { display: flex; gap: 6px; flex-wrap: wrap; } .p-su-dias button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--borde-sutil); background: var(--tarjeta); color: var(--texto-titulo); font: inherit; font-weight: 800; cursor: pointer; } .p-su-dias button[aria-pressed="true"] { background: var(--acento-boton); border-color: var(--acento-boton); color: var(--texto-sobre-acento, #fff); }

/* Nutrición: añadir comida, editar registros y ventanas de búsqueda */
.p-nu-cab { justify-content: flex-start; } .p-nu-mas { margin-left: auto; align-self: center; padding: 6px 14px; border: 0; border-radius: 99px; background: var(--acento-suave); color: var(--acento-texto); font: inherit; font-size: 0.8125rem; font-weight: 800; cursor: pointer; } .p-nu-mas:hover { filter: brightness(0.96); } .p-nu-mas:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
button.p-nu-item { width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 12px; } button.p-nu-item:hover { background: color-mix(in srgb, var(--texto-titulo) 5%, transparent); } button.p-nu-item:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-co-caja { width: min(560px, 100%); }
.p-co-res { display: flex; flex-direction: column; max-height: 42vh; overflow: auto; border-radius: 16px; min-height: 80px; }
.p-co-cant { max-width: 160px; font-size: 1.25rem; font-weight: 800; }
.p-co-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .p-co-macros > div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 16px; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); } .p-co-macros b { font-size: 1.25rem; color: var(--texto-titulo); } .p-co-macros span { font-size: 0.75rem; color: var(--texto-subtitulo); }

/* Detalle: notas y avisos */
.p-det-notas { display: flex; flex-direction: column; gap: 4px; margin: 18px 0 0; padding: 14px 18px; border-radius: 20px; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); max-width: 640px; }
.p-det-notas b { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-subtitulo); } .p-det-notas p { margin: 0; color: var(--texto-titulo); line-height: 1.5; }
.p-det-titulo + .p-det-notas, .p-det-notas + .p-hist-lista { margin-bottom: 20px; }
.p-det-aviso { max-width: 640px; margin: 0 0 20px; }

/* Selector de ejercicios con su GIF */
.p-pl-opcion { flex-direction: row; align-items: center; gap: 14px; }
.p-pl-gif { flex: none; width: 68px; height: 68px; border-radius: 16px; background: #fff; overflow: hidden; display: grid; place-items: center; } .p-pl-gif img { width: 100%; height: 100%; object-fit: contain; }
.p-pl-opcion-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Editor de plantillas de fuerza: diseño de la app (tarjeta de nombre, ajustes en una fila, series en píldoras, botones tonal y primario) */
.p-pl-ed { max-width: 760px; }
.p-pl-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 6px; } .p-pl-titulo .p-hero { margin: 0; }
.p-pl-cab-icono { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); cursor: pointer; } .p-pl-cab-icono svg { width: 24px; height: 24px; } .p-pl-cab-icono:disabled { opacity: 0.35; cursor: default; } .p-pl-cab-icono:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pl-tarjeta-nombre { padding: 20px; border-radius: 32px; background-image: linear-gradient(135deg, color-mix(in srgb, var(--acento) 14%, transparent), transparent 55%); } .p-pl-tarjeta-nombre label { display: flex; flex-direction: column; gap: 8px; }
.p-pl-etq { font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); }
.p-pl-nombre-inp { width: 100%; height: 52px; padding: 0 22px; border: 0; border-radius: 26px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 1rem; font-weight: 600; } .p-pl-nombre-inp:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; } .p-pl-nombre-inp::placeholder { color: var(--texto-subtitulo); }
.p-pl-lista { display: grid; gap: 16px; margin: 16px 0; }
.p-pl-vacio { text-align: center; color: var(--texto-subtitulo); font-size: 0.875rem; padding: 18px 8px; margin: 0; }
.p-pl-ej { padding: 20px; gap: 14px; border-radius: 32px; background-image: linear-gradient(135deg, color-mix(in srgb, var(--acento) 12%, transparent), transparent 55%); }
.p-pl-ej-cab { display: flex; align-items: center; gap: 16px; }
.p-pl-gif80 { flex: none; width: 80px; height: 80px; border-radius: 20px; background: #fff; overflow: hidden; display: grid; place-items: center; } .p-pl-gif80 img { width: 100%; height: 100%; object-fit: contain; }
.p-pl-ej-nombre { flex: 1; margin: 0; font-size: 1.0625rem; font-weight: 800; color: var(--texto-titulo); line-height: 1.25; }
.p-pl-cerrar { flex: none; align-self: flex-start; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--texto-subtitulo); cursor: pointer; } .p-pl-cerrar svg { width: 22px; height: 22px; } .p-pl-cerrar:hover { background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); } .p-pl-cerrar.redondo { width: 44px; height: 44px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); align-self: center; } .p-pl-cerrar:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pl-ajustes { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 28px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); overflow: hidden; }
.p-pl-seg { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border: 0; background: transparent; color: var(--texto-titulo); font: inherit; cursor: pointer; border-left: 1px solid var(--borde-sutil); } .p-pl-seg:first-child { border-left: 0; } .p-pl-seg:hover { background: color-mix(in srgb, var(--texto-titulo) 5%, transparent); } .p-pl-seg:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: -3px; }
.p-pl-seg span { font-size: 0.6875rem; color: var(--texto-subtitulo); } .p-pl-seg b { font-size: 0.8125rem; font-weight: 800; } .p-pl-seg.acento b { color: var(--acento-texto); }
.p-pl-nota { width: 100%; height: 44px; padding: 0 20px; border: 0; border-radius: 22px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 0.8125rem; } .p-pl-nota::placeholder { color: var(--texto-subtitulo); } .p-pl-nota:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; }
.p-pl-tabla { display: grid; grid-template-columns: 56px 1fr 1fr 76px; gap: 10px; align-items: center; } .p-pl-tabla.tiempo { grid-template-columns: 56px 1fr 1fr; }
.p-pl-tabla.cabeza { font-size: 0.8125rem; font-weight: 800; color: var(--texto-subtitulo); text-align: center; margin-top: 4px; }
.p-pl-pil { width: 100%; min-width: 0; height: 46px; padding: 0 8px; border: 0; border-radius: 23px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 1rem; font-weight: 800; text-align: center; } .p-pl-pil::placeholder { color: var(--texto-subtitulo); font-weight: 700; } .p-pl-pil:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; }
button.p-pl-nserie { cursor: pointer; position: relative; } button.p-pl-nserie.tipo::after { content: ""; position: absolute; right: 9px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--acento); }
.p-pl-botones { display: flex; gap: 10px; }
.p-pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 99px; font: inherit; font-size: 0.9375rem; font-weight: 800; cursor: pointer; } .p-pl-btn:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; } .p-pl-btn:disabled { cursor: default; }
.p-pl-botones .p-pl-btn { flex: 1; } .p-pl-botones .p-pl-btn.gris { flex: 0 0 34%; }
.p-pl-btn.tonal { background: var(--acento-suave); color: var(--acento-texto); } .p-pl-btn.gris { background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); } .p-pl-btn.gris:disabled { opacity: 0.5; } .p-pl-btn.primario { background: var(--acento-boton); color: var(--texto-sobre-acento, #fff); }
.p-pl-btn.grande { width: 100%; min-height: 52px; } .p-pl-mas-ico { width: 20px; height: 20px; }
.p-pl-guardar { position: sticky; bottom: 12px; margin-top: 18px; padding-top: 8px; z-index: 5; }
.p-pl-menu { position: fixed; z-index: 90; display: flex; flex-direction: column; padding: 6px; border-radius: 20px; background: var(--tarjeta); border: 1px solid var(--borde-sutil); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.p-pl-menu > button { text-align: left; padding: 12px 16px; border: 0; border-radius: 14px; background: transparent; color: var(--texto-titulo); font: inherit; font-size: 0.9375rem; cursor: pointer; } .p-pl-menu > button:hover, .p-pl-menu > button.sel { background: var(--acento-suave); } .p-pl-menu > button.sel { font-weight: 800; color: var(--acento-texto); } .p-pl-menu > button:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: -3px; }
.p-pl-desc { width: 280px; padding: 16px; gap: 10px; } .p-pl-desc-fila { display: flex; align-items: center; gap: 8px; } .p-pl-desc .p-pl-botones { flex-direction: column; } .p-pl-desc .p-pl-btn.gris { flex: none; }
.p-hoja-abajo { align-items: end; padding: 0; } .p-hoja-abajo .p-hoja-caja { width: min(640px, 100%); border-radius: 32px 32px 0 0; padding: 24px 20px 28px; max-height: 88vh; }
.p-hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .p-hoja-cab h2 { font-size: 1.375rem; }
.p-pl-fila-orden { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 10px; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); }
.p-pl-gif56 { flex: none; width: 56px; height: 56px; border-radius: 50%; background: #fff; overflow: hidden; display: grid; place-items: center; } .p-pl-gif56 img { width: 100%; height: 100%; object-fit: contain; }
.p-pl-orden-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .p-pl-orden-txt i { font-style: normal; font-weight: 800; color: var(--acento-texto); font-size: 0.875rem; } .p-pl-orden-txt b { color: var(--texto-titulo); }
.p-pl-flecha { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--texto-titulo); cursor: pointer; } .p-pl-flecha svg { width: 24px; height: 24px; } .p-pl-flecha:disabled { opacity: 0.3; cursor: default; } .p-pl-flecha:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-picker .p-hoja-caja { width: min(720px, 100%); height: min(88vh, 900px); max-height: none; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.p-pk-cab { display: flex; align-items: center; gap: 10px; } .p-pk-cab h2 { flex: 1; margin: 0; font-size: 1.375rem; } .p-pk-cuenta { font-size: 0.875rem; color: var(--texto-subtitulo); }
.p-pk-buscar { width: 100%; height: 52px; padding: 0 22px; border: 0; border-radius: 26px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 1rem; } .p-pk-buscar:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 1px; }
.p-pk-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; flex: none; scrollbar-width: thin; }
.p-pk-chip { flex: none; padding: 10px 18px; border: 0; border-radius: 99px; background: color-mix(in srgb, var(--texto-titulo) 8%, transparent); color: var(--texto-titulo); font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; } .p-pk-chip.sel { background: var(--acento-suave); color: var(--acento-texto); } .p-pk-chip:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pk-res { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.p-pk-fila { flex: none; display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 0; border-radius: 28px; background: color-mix(in srgb, var(--texto-titulo) 6%, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer; } .p-pk-fila:hover { background: color-mix(in srgb, var(--texto-titulo) 10%, transparent); } .p-pk-fila:focus-visible { outline: 3px solid var(--acento-texto); outline-offset: 2px; }
.p-pl-gif75 { flex: none; width: 75px; height: 75px; border-radius: 20px; background: #fff; overflow: hidden; display: grid; place-items: center; } .p-pl-gif75 img { width: 100%; height: 100%; object-fit: contain; }
.p-pk-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .p-pk-txt b { font-size: 1.0625rem; font-weight: 800; color: var(--texto-titulo); } .p-pk-txt span { font-size: 0.9375rem; color: var(--texto-subtitulo); }
@media (max-width: 520px) { .p-pl-tabla { grid-template-columns: 46px 1fr 1fr 64px; gap: 8px; } .p-pl-tabla.tiempo { grid-template-columns: 46px 1fr 1fr; } }

.p-sec-cuerpo > .p-as-aviso { margin: 0 0 14px; }

/* Cabecera del Perfil en la web: datos a la izquierda y foto grande a la derecha (sin seguidores ni botones de editar y compartir) */
.p-pf-cab { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 32px 36px; border-radius: 36px; background-image: linear-gradient(135deg, color-mix(in srgb, var(--acento) 14%, transparent), transparent 60%); }
.p-pf-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.p-pf-foto { display: grid; place-items: center; width: clamp(150px, 20vw, 240px); height: clamp(150px, 20vw, 240px); border-radius: 50%; background: var(--acento-suave); color: var(--acento-texto); font-size: 4.5rem; font-weight: 800; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); } .p-pf-foto img { width: 100%; height: 100%; object-fit: cover; }
.p-pf-cab h2 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.p-pf-usr { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--acento-texto); } .p-pf-mail, .p-pf-desde { margin: 0; font-size: 0.9375rem; color: var(--texto-subtitulo); } .p-pf-desde { font-size: 0.8125rem; }
.p-pf-bio { margin: 10px 0 0; font-size: 1rem; color: var(--texto-titulo); max-width: 52ch; line-height: 1.55; }
.p-pf-cuenta { display: inline-flex; flex-direction: column; align-items: flex-start; margin-top: 16px; padding: 10px 20px; border-radius: 20px; background: color-mix(in srgb, var(--texto-titulo) 7%, transparent); } .p-pf-cuenta b { font-size: 1.5rem; letter-spacing: -0.02em; } .p-pf-cuenta span { font-size: 0.8125rem; color: var(--texto-subtitulo); }
@media (max-width: 620px) { .p-pf-cab { grid-template-columns: 1fr; padding: 24px 20px; } .p-pf-foto { order: -1; justify-self: center; } .p-pf-info { align-items: center; text-align: center; } }
/* Los avisos de "solo desde la app" entran animados como el resto */
.p-historial.p-revela .p-as-aviso { animation: p-entra-card 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
:root[data-movimiento="reducido"] .p-historial.p-revela .p-as-aviso { animation: none; }
/* Pantalla de un deporte */
.p-dp-cab { display: flex; align-items: center; gap: 14px; } .p-dp-cab .p-hero { margin: 0; } .p-dp-ico { color: var(--acento); } .p-dp-ico svg { width: 40px; height: 40px; }
.p-dp-marcas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.p-dp-marca { gap: 4px; padding: 16px 18px; } .p-dp-marca span { font-size: 0.8125rem; font-weight: 700; color: var(--texto-subtitulo); } .p-dp-marca b { font-size: 1.625rem; letter-spacing: -0.02em; color: var(--texto-titulo); } .p-dp-marca em { font-style: normal; font-size: 0.8125rem; color: var(--texto-subtitulo); }
.p-dp-barras { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; min-height: 200px; }
.p-dp-barras > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; } .p-dp-barras b { font-size: 0.8125rem; color: var(--texto-titulo); }
.p-dp-barra { display: block; width: min(100%, 38px); border-radius: 10px 10px 4px 4px; background: color-mix(in srgb, var(--acento) 45%, transparent); } .p-dp-barra.actual { background: var(--acento); }
.p-dp-barras em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--texto-subtitulo); white-space: nowrap; } .p-dp-barras em.actual { color: var(--acento-texto); }
.p-secciones > * { min-width: 0; }
.p-pf-cab { max-width: 100%; box-sizing: border-box; }
.p-pf-mail { overflow-wrap: anywhere; }
@media (max-width: 620px) { .p-pf-cab { grid-template-columns: minmax(0, 1fr); } }

/* Botones de entrada: Google y Apple */
.p-botones-entrar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.p-boton-apple { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 32px; font-size: 1.0625rem; background: #000; color: #fff; border: 1px solid #000; } .p-boton-apple[hidden] { display: none; } .p-boton-apple svg { width: 20px; height: 20px; }
:root[data-tema="oscuro"] .p-boton-apple { background: #fff; color: #000; border-color: #fff; }

/* Botones de entrada alineados con el texto; Google con su icono sobre fondo blanco */
.p-botones-entrar { justify-content: flex-start; }
.p-boton-entrar { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; } .p-boton-entrar[hidden] { display: none; } .p-boton-entrar svg { width: 20px; height: 20px; }
@media (max-width: 620px) { .p-botones-entrar { justify-content: center; } }
@media (max-width: 620px) { .p-botones-entrar { flex-direction: column; align-items: stretch; max-width: 300px; margin-inline: auto; } .p-botones-entrar .boton { justify-content: center; } }

/* Eliminar un ejercicio propio */
.p-ej-eliminar { color: #c0392b; border-color: color-mix(in srgb, #c0392b 45%, transparent); }
.p-ej-eliminar-si { background: #c0392b; border-color: #c0392b; color: #fff; }
.p-aviso-error { margin: 8px 0 0; color: #c0392b; font-weight: 600; }
.p-modal-acciones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
/* Cabeceras de sección: los botones de la derecha no se estrechan; si no caben, pasan a la línea de abajo */
.p-sec-cab { flex-wrap: wrap; }
.p-sec-cab > :first-child { flex: 1 1 auto; min-width: 0; }
.p-sec-cab > :last-child:not(:first-child) { flex: none; max-width: 100%; }
.p-sec-cab button, .p-sec-cab .boton { flex: none; white-space: nowrap; }
