/**
 * components.css — Componentes Escultorapp (estilo Apple)
 */

/* ================================================================
   CARDS
   ================================================================ */
.card {
  position: relative;
  background: var(--surface);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  box-shadow: var(--window-shadow);
}
/* Brillo superior interno (borde de luz tipo ventana macOS) */
.card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  border-top: 1px solid var(--glass-hi);
  pointer-events: none;
  -webkit-mask: linear-gradient(180deg, #000, transparent 40%);
          mask: linear-gradient(180deg, #000, transparent 40%);
}
.card-elevated { background: var(--surface-2); }
.card-glass {
  background: var(--glass);
  border: 1px solid var(--hairline-2);
}
.card-accent { border-color: rgba(255,69,58,0.4); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }

/* ================================================================
   BUTTONS (iOS)
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 22px;
  border-radius: var(--r-full);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease-spring), background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--accent-soft); color: var(--accent); }
.btn-secondary:hover { background: rgba(255,46,58,0.22); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: rgba(255,69,58,0.16); color: var(--danger); }
.btn-danger:hover { background: rgba(255,69,58,0.26); }
.btn-sm { padding: 8px 15px; font-size: var(--fs-sm); }
.btn-lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn-full { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ================================================================
   INPUTS
   ================================================================ */
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--s-md); }
label, .form-label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }

input[type="text"], input[type="number"], input[type="password"], input[type="email"],
input[type="date"], textarea, select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text);
  padding: 13px 15px;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none; -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: var(--surface-3); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 84px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aab3c0' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.input-sm { width: 62px !important; text-align: center; padding: 9px 4px; border-radius: var(--r-sm); }

/* ================================================================
   SEGMENTED CONTROL (reemplaza tabs)
   ================================================================ */
.segmented {
  display: flex;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.seg-item {
  flex: 1 0 auto;
  text-align: center;
  padding: 9px 14px;
  border-radius: calc(var(--r-md) - 4px);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.15s var(--ease-spring);
}
.seg-item:active { transform: scale(0.97); }
.seg-item.active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }

/* ================================================================
   SELECTOR DE DÍA (entrenamiento) — claro: número + de qué va
   ================================================================ */
.day-selector {
  display: flex;
  gap: var(--s-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
}
.day-selector::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto;
  width: 124px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1.5px solid transparent;
  color: var(--text-2);
  transition: transform 0.15s var(--ease-spring), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.day-chip:active { transform: scale(0.96); }
.day-chip-icon { color: var(--text-3); transition: color 0.2s; }
.day-chip-tag { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.day-chip-name { font-size: var(--fs-sm); font-weight: 700; color: var(--text); line-height: 1.25; }
.day-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.day-chip.active .day-chip-icon,
.day-chip.active .day-chip-tag { color: var(--accent); }

/* Cabecera grande del día elegido — cambia visiblemente al seleccionar */
.day-hero {
  --htype: var(--accent);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--s-md);
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--htype) 16%, transparent), transparent 60%),
    var(--surface);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  backdrop-filter: saturate(150%) blur(20px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  margin-bottom: var(--s-md);
  box-shadow: var(--window-shadow);
}
/* Color por tipo de sesión */
.day-hero.kind-cardio  { --htype: #ff7a45; }
.day-hero.kind-rehab   { --htype: #30d158; }
.day-hero.kind-partido { --htype: #bf5af2; }
.day-hero-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--htype);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  animation: float-soft 3.6s var(--ease-out) infinite;
}
@keyframes float-soft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.day-hero-text { min-width: 0; }
.day-hero-eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--htype); }
.day-hero-title { font-size: var(--fs-lg); font-weight: 800; line-height: 1.2; margin-top: 1px; }
.day-hero-sub { font-size: var(--fs-sm); color: var(--text-2); margin-top: 3px; line-height: 1.4; }

/* Animación de transición al cambiar de día */
.switch-anim { animation: slide-up-fade 0.32s var(--ease-out); }

/* ================================================================
   BLOQUE PLEGABLE (calentamiento / enfriamiento opcionales)
   ================================================================ */
.collapse {
  background: var(--surface);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  margin-bottom: var(--s-sm);
  overflow: hidden;
  box-shadow: var(--window-shadow);
}
/* Tipos de bloque con color propio (se distinguen de un vistazo) */
.collapse-warmup   { --ctype: #ff9f0a; }   /* calentamiento → ámbar */
.collapse-cooldown { --ctype: #30d158; }   /* estiramiento → verde (recuperación) */
.collapse-summary {
  display: flex; align-items: center; gap: 11px;
  padding: 12px var(--s-md);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.collapse-summary::-webkit-details-marker { display: none; }
.collapse-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--ctype, var(--accent));
  background: color-mix(in srgb, var(--ctype, var(--accent)) 16%, transparent);
}
.collapse-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.collapse-title { font-size: var(--fs-base); font-weight: 700; }
.collapse-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 1px; }
.collapse-chevron { color: var(--text-3); flex-shrink: 0; transition: transform 0.25s var(--ease-out); }
.collapse[open] .collapse-chevron { transform: rotate(90deg); }
.collapse-body { padding: 0 var(--s-md) var(--s-md); animation: slide-up-fade 0.28s var(--ease-out); }

/* Icono del "Resumen de ayer" — circulito tintado */
.insight-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
}
.insight-icon.alert { color: var(--amber); background: rgba(255,159,10,0.14); }

/* Tabs antiguos (compat) */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: var(--s-md); background: var(--surface-2); border-radius: var(--r-md); padding: 3px; }
.tabs::-webkit-scrollbar { display: none; }
.tab-item { padding: 9px 14px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: var(--transition-base); }
.tab-item.active { background: var(--surface-3); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: slide-up-fade 0.3s var(--ease-out); }

/* ================================================================
   SLIDERS
   ================================================================ */
.slider-group { display: flex; flex-direction: column; gap: 8px; }
.slider-header { display: flex; justify-content: space-between; align-items: center; }
.slider-value { background: var(--accent); color: #ffffff; border-radius: var(--r-full); padding: 3px 12px; font-size: var(--fs-sm); font-weight: 700; min-width: 38px; text-align: center; }
input[type="range"] { width: 100%; height: 8px; background: var(--surface-3); border-radius: var(--r-full); outline: none; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--val,50%), var(--surface-3) var(--val,50%)); border-radius: var(--r-full); height: 8px; }

/* ================================================================
   BADGES
   ================================================================ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; }
.badge-primary { background: var(--accent-soft); color: var(--accent); }
.badge-muted { background: var(--surface-3); color: var(--text-2); }
.badge-alert { background: var(--accent-soft); color: var(--accent); }
.badge-error { background: var(--accent-soft); color: var(--danger); }
.badge-move  { background: var(--accent-soft); color: var(--move); }

/* ================================================================
   ACTIVITY RING (estilo Apple)
   ================================================================ */
.ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease-out); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* ================================================================
   HIDRATACIÓN
   ================================================================ */
.water-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s-sm) 0; }
.water-drop {
  width: 34px; height: 40px; cursor: pointer;
  transition: transform 0.25s var(--ease-spring);
}
.water-drop:active { transform: scale(0.8); }
.water-drop path { fill: var(--surface-3); transition: fill 0.3s ease; }
.water-drop.filled path { fill: var(--stand); }
.water-drop.filled { animation: pop-in 0.4s var(--ease-spring); }
.water-controls { display: flex; align-items: center; gap: var(--s-sm); }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--text); font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.15s var(--ease-spring), background 0.2s;
}
.round-btn:active { transform: scale(0.9); }
.round-btn:hover { background: var(--surface-3); }
.big-count { font-size: var(--fs-2xl); font-weight: 800; color: var(--stand); min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }

/* ================================================================
   EXERCISE CARD (formato nuevo)
   ================================================================ */
.ex-card {
  background: var(--surface);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  margin-bottom: var(--s-sm);
  box-shadow: var(--window-shadow);
  transition: border-color 0.3s ease, opacity 0.3s ease;
}
.ex-card.done { border-color: rgba(255,69,58,0.45); }

/* Variante PLEGABLE (lista manual de Entrenar) */
.ex-card-c { padding: 0; overflow: hidden; }
.ex-card-c > .ex-summary { display: flex; align-items: flex-start; gap: var(--s-sm); padding: var(--s-md); cursor: pointer; list-style: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.ex-card-c > .ex-summary::-webkit-details-marker { display: none; }
.ex-card-c .ex-summary .yt-btn { align-self: center; }
.ex-summary .ex-expand { color: var(--text-3); flex-shrink: 0; align-self: center; transition: transform 0.25s var(--ease-out); }
.ex-card-c[open] .ex-summary .ex-expand { transform: rotate(90deg); color: var(--accent); }
.ex-card-c[open] { border-color: var(--hairline-2); }
.ex-cbody { padding: 0 var(--s-md) var(--s-md); animation: slide-up-fade 0.28s var(--ease-out); }
.ex-cbody .ex-coach:first-child, .ex-cbody .ex-alts:first-child { margin-top: 0; }
.ex-top { display: flex; align-items: flex-start; gap: var(--s-sm); }
.ex-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 800;
}
.ex-card.done .ex-num { background: var(--accent); color: #ffffff; }
.ex-headinfo { flex: 1; min-width: 0; }
.ex-group { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.ex-name { font-size: var(--fs-md); font-weight: 700; margin-top: 1px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 7px; }
.ex-chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-full); padding: 4px 10px; }
.ex-chip s { color: var(--text-3); }
.ex-chip strong { color: var(--text); font-weight: 700; }
.ex-line { font-size: var(--fs-sm); margin-top: 9px; line-height: 1.5; }
.ex-line b { color: var(--text); font-weight: 700; }
.ex-line.trabaja { color: var(--text); }
.ex-line.sirve   { color: var(--text-2); }
.ex-line.alt     { color: var(--text-2); }
.ex-line .lbl { color: var(--accent); font-weight: 700; }
.ex-line.alt .lbl { color: var(--amber); }

/* Bloque "Trabaja" (consejo) — negro mate, SIN bordes, con punto que late */
.ex-coach {
  margin-top: 10px; padding: 11px 13px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-3));
  border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.5; color: var(--text);
}
.ex-coach-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-right: 6px; }
.ex-coach-tag svg { animation: soft-blink 2.6s var(--ease-out) infinite; }

/* Bloque de alternativas — negro mate, SIN bordes, con icono que late */
.ex-alts {
  margin-top: 10px; padding: 11px 13px;
  background: color-mix(in srgb, #ff9f0a 13%, var(--surface-3));
  border-radius: var(--r-md);
}
.ex-alts-h { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: #ff9f0a; margin-bottom: 8px; }
.ex-alts-h svg { animation: soft-blink 2.6s var(--ease-out) infinite; }
@keyframes soft-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.ex-alt-line { display: flex; gap: 9px; align-items: baseline; font-size: var(--fs-sm); line-height: 1.45; color: var(--text); padding: 3px 0; }
.ex-alt-line + .ex-alt-line { border-top: 1px solid var(--hairline); margin-top: 3px; padding-top: 7px; }
.ex-alt-tag { flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); background: var(--surface-solid); border: 1px solid var(--hairline); border-radius: var(--r-full); padding: 2px 8px; min-width: 84px; text-align: center; }

/* sets */
.sets-row { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s-sm); }
.set-item { display: flex; align-items: center; gap: var(--s-xs); padding: 10px 12px; background: var(--surface-3); border-radius: var(--r-sm); border: 1px solid var(--hairline); transition: var(--transition-base); }
.set-item.completed { border-color: rgba(255,46,58,0.4); opacity: 0.6; }
/* Siguiente serie tras el descanso: resaltada para guiar el ojo (modo manual). */
.set-item.next { border-color: var(--accent); background: var(--accent-soft); opacity: 1; animation: next-pulse 1.4s var(--ease-out) infinite; }
.set-item.next .set-label { color: var(--text); }
@keyframes next-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,46,58,0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(255,46,58,0.18); }
}
.set-label { font-size: var(--fs-sm); color: var(--text-2); min-width: 30px; font-weight: 600; }
.set-separator { color: var(--text-3); }
.set-checkbox { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--hairline-2); background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.15s var(--ease-spring), background 0.2s; padding: 0; color: #ffffff; font-size: 14px; font-weight: 800; }
.set-checkbox:active { transform: scale(0.85); }
.set-checkbox.done { border-color: var(--accent); background: var(--accent); animation: pop-in 0.35s var(--ease-spring); }

/* timer / descanso */
.timer-row { display: flex; align-items: center; gap: var(--s-sm); margin-top: var(--s-sm); flex-wrap: wrap; }
.timer-display { font-size: 1.5rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 74px; }
.rest-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rest-chip { padding: 5px 12px; border-radius: var(--r-full); border: 1px solid var(--hairline); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; transition: var(--transition-base); }
.rest-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
/* Botón mientras corre el descanso */
.rest-btn.resting, .timer-btn.resting { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.cardio-big { font-size: 3.4rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* YouTube btn */
.yt-btn {
  display: inline-flex; align-items: center; gap: 5px;
  width: 40px; height: 40px; justify-content: center;
  border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--surface-2); color: var(--text-2); flex-shrink: 0;
  transition: transform 0.15s var(--ease-spring), background 0.2s, color 0.2s;
}
.yt-btn:active { transform: scale(0.88); }
.yt-btn:hover { background: var(--move); color: #fff; border-color: var(--move); }

/* ================================================================
   TOGGLE iOS
   ================================================================ */
.toggle { display: flex; align-items: center; gap: var(--s-sm); cursor: pointer; user-select: none; }
.toggle input[type="checkbox"] { display: none; }
.toggle-track { width: 52px; height: 31px; background: var(--surface-3); border-radius: var(--r-full); position: relative; transition: background 0.3s var(--ease-out); flex-shrink: 0; }
.toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--ease-spring); box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(21px); }

/* ================================================================
   CHECKLIST
   ================================================================ */
.checklist-item { display: flex; align-items: center; gap: var(--s-sm); padding: 11px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: var(--transition-base); }
.checklist-item:last-child { border-bottom: none; }
.checklist-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--hairline-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.15s var(--ease-spring), background 0.2s; color: transparent; font-weight: 800; }
.checklist-item.checked .checklist-check { background: var(--accent); border-color: var(--accent); color: #ffffff; animation: pop-in 0.35s var(--ease-spring); }
.checklist-item-label { flex: 1; font-size: var(--fs-sm); }
.checklist-item.checked .checklist-item-label { text-decoration: line-through; opacity: 0.5; color: var(--text-2); }

/* ================================================================
   LISTAS estilo iOS (inset grouped)
   ================================================================ */
.list { background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(20px); backdrop-filter: saturate(150%) blur(20px); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--window-shadow); }
.list-row { display: flex; align-items: center; gap: var(--s-sm); padding: 14px var(--s-md); border-bottom: 1px solid var(--hairline); transition: background 0.15s; }
.list-row:last-child { border-bottom: none; }
.list-row:active { background: var(--surface-2); }
.list-row .lr-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: var(--fs-base); font-weight: 600; }
.list-row .lr-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 1px; }
.list-row .lr-chevron { color: var(--text-3); flex-shrink: 0; }

/* ================================================================
   SECTION HEADER / STAT
   ================================================================ */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-sm); }
.section-header h3, .section-title { font-size: var(--fs-md); font-weight: 700; margin: 0; }
.section-eyebrow { font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: var(--s-md) 0 var(--s-sm); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-sm); }
.stat-tile { background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-md); box-shadow: var(--window-shadow); }
.stat-tile .st-label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-tile .st-value { font-size: var(--fs-xl); font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat-tile .st-unit { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }

.chips-row { display: flex; flex-wrap: wrap; gap: var(--s-sm); }
.stat-chip { display: flex; flex-direction: column; align-items: center; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; min-width: 64px; gap: 3px; border: 1px solid transparent; }
.stat-chip-alert { border-color: var(--amber); }
.stat-chip .stat-value { font-size: var(--fs-base); font-weight: 800; }
.stat-chip .stat-label { font-size: 10px; color: var(--text-2); }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.progress-bar { background: var(--surface-3); border-radius: var(--r-full); height: 9px; overflow: hidden; width: 100%; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: var(--r-full); transition: width 0.8s var(--ease-out); }
.progress-orange .progress-fill { background: var(--amber); }

/* ================================================================
   INFO BOX
   ================================================================ */
.info-box { background: color-mix(in srgb, var(--accent) 8%, var(--surface-3)); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 11px var(--s-md); font-size: var(--fs-sm); color: var(--text); margin-bottom: var(--s-sm); line-height: 1.5; }
.info-box-alert { background: color-mix(in srgb, var(--amber) 12%, var(--surface-3)); }
.info-box-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface-3)); }
.info-box-move  { background: color-mix(in srgb, var(--move) 10%, var(--surface-3)); }

/* ================================================================
   CALENDARIO
   ================================================================ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-dayname { font-size: 10px; color: var(--text-3); text-align: center; font-weight: 700; }
.cal-day { aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); position: relative; }
.cal-day .cal-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 2px; }
.cal-day.train { background: var(--accent-soft); color: var(--accent); }
.cal-day.active-only { background: var(--surface-3); color: var(--text); }
.cal-day.rest { color: var(--text-3); }
.cal-day.future { opacity: 0.3; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.cal-empty { aspect-ratio: 1; }

/* ================================================================
   STAGE CARD
   ================================================================ */
.stage-card { background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: var(--s-md); margin-bottom: var(--s-sm); box-shadow: var(--window-shadow); transition: var(--transition-base); position: relative; overflow: hidden; }
.stage-current { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.stage-done { opacity: 0.7; }
.stage-future.locked { opacity: 0.85; }
.stage-header { display: flex; align-items: center; gap: var(--s-sm); margin-bottom: var(--s-xs); }
.stage-badge { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--fs-base); font-weight: 800; color: #ffffff; flex-shrink: 0; }
.stage-name { font-weight: 800; font-size: var(--fs-md); }
.stage-lock-tag { font-size: var(--fs-xs); color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }

/* ================================================================
   ONBOARDING / CUESTIONARIO
   ================================================================ */
.ob-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 900; display: flex; flex-direction: column; overflow-y: auto; }
.ob-progress { height: 4px; background: var(--surface-3); position: sticky; top: 0; z-index: 2; }
.ob-progress-fill { height: 100%; background: var(--accent); transition: width 0.4s var(--ease-out); width: 0; }
.ob-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--s-lg); max-width: 460px; margin: 0 auto; width: 100%; }
.ob-step { width: 100%; animation: slide-up-fade 0.4s var(--ease-out); }
.ob-emoji { font-size: 3rem; text-align: center; margin-bottom: var(--s-md); }
.ob-emoji svg { display: inline-block; color: var(--accent); }
.ob-icon-wrap { display: flex; justify-content: center; margin-bottom: var(--s-md); }
.ob-title { font-size: var(--fs-xl); font-weight: 800; text-align: center; }
.ob-desc { color: var(--text-2); text-align: center; margin: var(--s-sm) 0 var(--s-lg); }
.ob-options { display: flex; flex-direction: column; gap: var(--s-sm); }
.ob-opt { display: flex; align-items: center; gap: var(--s-sm); padding: 16px; border: 1.5px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); transition: var(--transition-base); text-align: left; }
.ob-opt:active { transform: scale(0.98); }
.ob-opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.ob-opt .ob-opt-emoji { font-size: 1.5rem; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.ob-opt.selected .ob-opt-emoji { background: var(--accent); color: #fff; }
.ob-opt .ob-opt-emoji svg { display: block; }
.ob-opt .ob-opt-main { flex: 1; }
.ob-opt .ob-opt-title { font-weight: 700; font-size: var(--fs-base); }
.ob-opt .ob-opt-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }
.ob-opt .ob-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--hairline-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: transparent; }
.ob-opt.selected .ob-check { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.ob-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); }
.ob-nav { position: sticky; bottom: 0; display: flex; gap: var(--s-sm); padding: var(--s-md); padding-bottom: max(var(--s-md), env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 60%, transparent); max-width: 460px; margin: 0 auto; width: 100%; }
.ob-nav .btn { flex: 1; }
.ob-num-display { font-size: var(--fs-2xl); font-weight: 800; text-align: center; color: var(--accent); margin: var(--s-sm) 0; font-variant-numeric: tabular-nums; }

/* Reveal del plan generado */
.plan-reveal-card { background: linear-gradient(160deg, var(--accent-soft), transparent 70%); border: 1px solid rgba(255,46,58,0.4); border-radius: var(--r-lg); padding: var(--s-lg); margin-bottom: var(--s-md); animation: pop-in 0.5s var(--ease-spring); }

/* Hero "hoy te toca" — ventana de vidrio macOS con acento rojo sutil */
.today-hero {
  border-radius: var(--r-xl);
  padding: 24px 24px 22px;
  position: relative; overflow: hidden;
  color: var(--text);
  min-height: 200px;
  display: flex; flex-direction: column; justify-content: flex-end;
  isolation: isolate;
  background: var(--glass-strong);
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur));
  backdrop-filter: saturate(160%) blur(var(--blur));
  border: 1px solid var(--hairline);
  box-shadow: var(--window-shadow);
}
/* Brillo superior interno + glow de color en la esquina (según estado) */
.today-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  border-top: 1px solid var(--glass-hi);
  -webkit-mask: linear-gradient(180deg, #000, transparent 45%); mask: linear-gradient(180deg, #000, transparent 45%);
}
.today-hero.train { background:
  radial-gradient(130% 90% at 100% 0%, rgba(255,69,58,0.22), transparent 55%),
  var(--glass-strong);
  border-color: rgba(255,69,58,0.32); }
.today-hero.rest  { background:
  radial-gradient(130% 90% at 100% 0%, rgba(120,130,160,0.18), transparent 55%),
  var(--glass-strong); }
.today-hero.done  { background:
  radial-gradient(130% 90% at 100% 0%, rgba(255,69,58,0.14), transparent 55%),
  var(--glass-strong); }
.today-hero .th-eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.today-hero.rest .th-eyebrow, .today-hero.done .th-eyebrow { color: var(--text-2); }
.today-hero .th-title { font-size: var(--fs-2xl); font-weight: 800; margin: 8px 0 6px; letter-spacing: -0.02em; line-height: 1.05; }
.today-hero .th-sub { color: var(--text-2); font-size: var(--fs-base); max-width: 92%; }
.today-hero .th-cta { width: 100%; margin-top: 20px; }
.today-hero .th-icon { position: absolute; top: -20px; right: -14px; opacity: 0.10; z-index: -1; color: var(--text); animation: float-soft 5s var(--ease-out) infinite; }
.today-hero.train .th-icon { color: var(--accent); opacity: 0.18; }
.today-hero .th-icon svg { display: block; width: 156px; height: 156px; }

/* Fila de stats del día (Etapa / Semana / Racha) */
.today-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tstat { background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px 8px; text-align: center; box-shadow: var(--window-shadow); transition: var(--transition-base); }
.tstat-val { font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.tstat-lbl { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; margin-top: 6px; }
.tstat.hot { border-color: rgba(255,69,58,0.35); }
.tstat.hot .tstat-val { color: var(--accent); }

/* Danger zone */
.danger-zone { border: 1px solid rgba(255,69,58,0.4); border-radius: var(--r-md); padding: var(--s-md); margin-top: var(--s-md); }
.danger-zone-header { font-weight: 700; color: var(--danger); font-size: var(--fs-sm); margin-bottom: var(--s-sm); }

/* ================================================================
   EXPLORAR — categorías, planes hechos para ti (estilo Apple/Nike)
   ================================================================ */
/* Carrusel horizontal genérico */
.h-scroll { display: flex; gap: var(--s-sm); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 2px 6px; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--s-md)); padding-left: var(--s-md); padding-right: var(--s-md); }
.h-scroll::-webkit-scrollbar { display: none; }

/* Mosaico de categoría (full-color, como Apple "Tipos de actividad") */
.cat-tile {
  flex: 0 0 auto; width: 132px; height: 96px; scroll-snap-align: start;
  border-radius: var(--r-md); padding: 12px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; border: none; text-align: left;
  box-shadow: var(--window-shadow);
  transition: transform 0.15s var(--ease-spring);
}
.cat-tile:active { transform: scale(0.96); }
.cat-tile .cat-ico { position: absolute; top: 10px; right: 10px; opacity: 0.9; }
.cat-tile .cat-ico svg { width: 22px; height: 22px; }
.cat-tile .cat-name { font-weight: 800; font-size: var(--fs-base); letter-spacing: -0.01em; text-shadow: 0 1px 4px rgba(0,0,0,0.25); }

/* Tarjeta de plan grande (hero del catálogo) */
.plan-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: 22px; min-height: 188px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; border: none; text-align: left; width: 100%;
  box-shadow: var(--window-shadow);
}
.plan-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--g, linear-gradient(135deg,#ff5e3a,#d81f2a)); }
.plan-hero::after  { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.45) 100%); }
.plan-hero .ph-ico { position: absolute; top: -10px; right: -8px; opacity: 0.22; color: #fff; z-index: -1; }
.plan-hero .ph-ico svg { width: 150px; height: 150px; }
.plan-hero .ph-eyebrow { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.92; }
.plan-hero .ph-title { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.04; margin: 6px 0 4px; letter-spacing: -0.02em; }
.plan-hero .ph-sub { font-size: var(--fs-base); opacity: 0.92; }

/* Tarjeta de plan en lista (mediana, como Nike Programas) */
.plan-card {
  position: relative; overflow: hidden;
  display: flex; align-items: stretch; gap: 0; width: 100%; text-align: left;
  background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--window-shadow); margin-bottom: var(--s-sm);
  transition: transform 0.15s var(--ease-spring), border-color 0.2s;
}
.plan-card:active { transform: scale(0.985); }
.plan-card .pc-art {
  flex: 0 0 84px; border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: var(--g, linear-gradient(135deg,#ff5e3a,#d81f2a));
  display: flex; align-items: center; justify-content: center; color: #fff; position: relative;
}
.plan-card .pc-art svg { width: 30px; height: 30px; }
.plan-card .pc-body { flex: 1; min-width: 0; padding: 13px 14px; display: flex; flex-direction: column; justify-content: center; }
.plan-card .pc-title { font-weight: 700; font-size: var(--fs-md); display: flex; align-items: center; gap: 7px; }
.plan-card .pc-tagline { font-size: var(--fs-sm); color: var(--text-2); margin-top: 1px; }
.plan-card .pc-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 8px; }
.plan-card .pc-chip { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); background: var(--surface-3); border-radius: var(--r-full); padding: 3px 9px; }
.plan-card .pc-chev { align-self: center; color: var(--text-3); padding-right: 12px; flex-shrink: 0; }

/* Insignia premium (corona dorada) / gratis */
.tier-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: var(--r-full); }
.tier-premium { background: linear-gradient(135deg,#ffd60a,#ff9f0a); color: #1c1300; }
.tier-free { background: var(--surface-3); color: var(--text-2); }

/* ================================================================
   RETOS (challenges) — barra de progreso + meta
   ================================================================ */
.challenge {
  position: relative; overflow: hidden;
  background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: var(--s-md);
  box-shadow: var(--window-shadow); margin-bottom: var(--s-sm);
}
.challenge.done { border-color: rgba(48,209,88,0.5); }
.ch-top { display: flex; align-items: center; gap: var(--s-sm); }
.ch-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--g, linear-gradient(135deg,#ff5e3a,#d81f2a)); }
.ch-ico svg { width: 22px; height: 22px; }
.ch-info { flex: 1; min-width: 0; }
.ch-title { font-weight: 700; font-size: var(--fs-base); }
.ch-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 1px; }
.ch-count { font-size: var(--fs-sm); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-2); flex-shrink: 0; }
.ch-count b { color: var(--text); }
.ch-bar { margin-top: 12px; }
.ch-done-tag { display: inline-flex; align-items: center; gap: 5px; color: #30d158; font-size: var(--fs-xs); font-weight: 700; margin-top: 10px; }

/* ================================================================
   LOGROS (achievements / trofeos) — rejilla, bloqueados en gris
   ================================================================ */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-sm); }
.ach {
  background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px 8px; text-align: center;
  box-shadow: var(--window-shadow); position: relative;
}
.ach-medal { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--g, linear-gradient(135deg,#ffd60a,#ff9f0a)); }
.ach-medal svg { width: 28px; height: 28px; }
.ach-name { font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; }
.ach-sub { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.ach.locked { opacity: 1; }
.ach.locked .ach-medal { background: var(--surface-3); color: var(--text-3); }
.ach.locked .ach-name { color: var(--text-3); }
.ach-unlocked-mark { position: absolute; top: 8px; right: 8px; color: #30d158; }

/* ================================================================
   REPRODUCTOR A PANTALLA COMPLETA (guided workout)
   ================================================================ */
.player-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column;
  background: var(--bg);
  background-image: var(--ambient);
  background-attachment: fixed;
  animation: player-in 0.3s var(--ease-out);
}
.player-overlay.closing { animation: fade-in 0.2s ease reverse; }
@keyframes player-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

.player-head {
  display: flex; align-items: center; gap: var(--s-md);
  padding: max(var(--s-md), env(safe-area-inset-top)) var(--s-md) var(--s-sm);
}
.player-progress { flex: 1; min-width: 0; }
.player-progress-txt { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); text-align: center; margin-bottom: 6px; }
.player-progress-bar { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.player-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: var(--r-full); transition: width 0.4s var(--ease-out); }

.player-body { flex: 1; overflow-y: auto; padding: var(--s-sm) var(--s-md) var(--s-md); max-width: 620px; margin: 0 auto; width: 100%; }

.player-media {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  aspect-ratio: 16/10; margin-bottom: var(--s-md);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline); box-shadow: var(--window-shadow);
  display: flex; align-items: center; justify-content: center;
}
.player-media-img { width: 100%; height: 100%; object-fit: cover; }
.player-media-ph { color: var(--text-3); opacity: 0.5; }
.player-demo-btn {
  position: absolute; bottom: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--hairline-2); color: var(--text);
  border-radius: var(--r-full); padding: 8px 14px; font-size: var(--fs-sm); font-weight: 700;
}

.player-info { margin-bottom: var(--s-md); }
.player-ex-group { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.player-ex-name { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin-top: 3px; }
.player-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.player-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-full); padding: 7px 13px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.player-chip b { color: var(--text); font-weight: 800; }

/* Series grandes (toca para marcar) */
.player-sets { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--s-md); }
.player-set {
  display: flex; align-items: center; gap: var(--s-sm);
  padding: 16px var(--s-md); border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--hairline);
  box-shadow: var(--shadow-sm); text-align: left; transition: transform 0.12s var(--ease-spring), border-color 0.2s, background 0.2s;
}
.player-set:active { transform: scale(0.985); }
.player-set.done { border-color: var(--accent); background: var(--accent-soft); }
.player-set-n { font-weight: 800; font-size: var(--fs-md); min-width: 78px; }
.player-set-reps { flex: 1; color: var(--text-2); font-size: var(--fs-base); font-weight: 600; }
.player-set-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--hairline-2); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.player-set.done .player-set-check { background: var(--accent); border-color: var(--accent); }

.player-rest { margin-bottom: var(--s-md); }
.player-rest-row { display: flex; align-items: center; gap: var(--s-md); margin-top: 8px; }
.player-timer { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: var(--s-md); }
.player-timer-disp { font-size: 2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 96px; }

.player-tip { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); border-radius: var(--r-md); padding: var(--s-md); margin-bottom: var(--s-md); box-shadow: var(--shadow-sm); }
.player-tip-h { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.player-tip-h svg { animation: soft-blink 2.6s var(--ease-out) infinite; }
.player-tip-b { font-size: var(--fs-base); color: var(--text); line-height: 1.5; }

.player-nav {
  display: flex; gap: var(--s-sm); padding: var(--s-md);
  padding-bottom: max(var(--s-md), env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  max-width: 620px; margin: 0 auto; width: 100%;
}
.player-nav .btn { flex: 1; }
.player-nav .btn-primary { flex: 1.4; }

/* Pantalla de DESCANSO (interstitial) */
.player-rest-screen {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-md); padding: var(--s-lg); text-align: center; max-width: 480px; margin: 0 auto; width: 100%;
  animation: slide-up-fade 0.3s var(--ease-out);
}
.player-rest-eyebrow { font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.player-rest-ring {
  width: 220px; height: 220px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, var(--accent-soft), transparent 70%);
  border: 2px solid var(--accent); box-shadow: 0 0 0 10px var(--accent-soft), var(--window-shadow);
  animation: rest-pulse 2.4s var(--ease-out) infinite;
}
@keyframes rest-pulse { 0%,100% { box-shadow: 0 0 0 10px var(--accent-soft), var(--window-shadow); } 50% { box-shadow: 0 0 0 18px transparent, var(--window-shadow); } }
.player-rest-big { font-size: 3.6rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.player-rest-chips { justify-content: center; }
.player-rest-next { font-size: var(--fs-base); color: var(--text-2); }
.player-rest-next b { color: var(--text); }
.player-rest-actions { display: flex; gap: var(--s-sm); width: 100%; margin-top: 6px; }
.player-rest-actions .btn-primary { flex: 1.6; }
.player-rest-actions .btn-ghost { flex: 1; }

/* Pantalla de FELICITACIÓN final */
.player-done {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: var(--s-lg); text-align: center; max-width: 480px; margin: 0 auto; width: 100%;
  animation: slide-up-fade 0.4s var(--ease-out);
}
.player-done-medal {
  width: 104px; height: 104px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #1c1300; background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  box-shadow: 0 14px 40px rgba(255,159,10,0.4); margin-bottom: 6px;
  animation: pop-in 0.6s var(--ease-spring);
}
.player-done-title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; }
.player-done-sub { color: var(--text-2); font-size: var(--fs-base); margin-bottom: 8px; }
.player-done-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); width: 100%; }

/* Botón de lanzamiento del reproductor */
.start-workout-btn { width: 100%; margin-bottom: var(--s-md); }

/* ================================================================
   NUTRICIÓN
   ================================================================ */
.kcal-remain { text-align: center; margin-top: 6px; }
.kcal-remain-num { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.kcal-remain-num.over { color: var(--amber); }
.kcal-remain-lbl { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; margin-top: 4px; }
.kcal-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-sm); }
.kcal-cell { text-align: center; background: var(--surface-3); border-radius: var(--r-md); padding: 12px 6px; }
.kcal-cell-v { font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.kcal-cell-l { font-size: 10.5px; color: var(--text-2); font-weight: 600; margin-top: 3px; display: flex; align-items: center; justify-content: center; gap: 4px; }

.ideas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-sm); }
.idea-card {
  text-align: left; padding: 14px; border-radius: var(--r-md);
  background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline); box-shadow: var(--window-shadow);
  border-top: 2px solid #30d158;
  transition: transform 0.12s var(--ease-spring);
}
.idea-card:active { transform: scale(0.98); }
.idea-meal { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #30d158; }
.idea-name { font-size: var(--fs-base); font-weight: 700; margin-top: 3px; line-height: 1.2; }
.idea-kcal { font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }

.recipe-ings, .recipe-steps { margin: 4px 0 14px; padding-left: 20px; }
.recipe-ings li { list-style: disc; font-size: var(--fs-sm); color: var(--text); padding: 3px 0; }
.recipe-steps li { list-style: decimal; font-size: var(--fs-sm); color: var(--text); padding: 4px 0; line-height: 1.5; }

.week-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.week-row:last-child { border-bottom: none; }
.week-day { font-size: var(--fs-xs); font-weight: 800; color: var(--accent); width: 34px; flex-shrink: 0; padding-top: 1px; }
.week-meals { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; }

/* ================================================================
   MIS RUTINAS (switcher multi-rutina)
   ================================================================ */
.routine-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--surface); -webkit-backdrop-filter: saturate(150%) blur(18px); backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  box-shadow: var(--window-shadow); transition: transform 0.12s var(--ease-spring), border-color 0.2s;
}
.routine-row:active { transform: scale(0.99); }
.routine-row.active { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.routine-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); flex-shrink: 0; }
.routine-row.active .routine-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.routine-name { display: block; font-weight: 700; font-size: var(--fs-base); }
.routine-sub { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 1px; }
