/* Monina · Rutinas. Letra grande a propósito: se lee en el gimnasio, con el
   móvil apoyado en la máquina. No bajar la escala. */
:root {
  --tinta: #171719;
  --texto: #2c272c;
  --suave: #6a6169;
  --rosa: #d90070;
  --rosa-osc: #8a0047;
  --rosa-claro: #ffe3f0;
  --rosa-fondo: #fff5fa;
  --fondo: #f3f0ec;
  --tarjeta: #ffffff;
  --linea: #e8e2e4;
  --verde: #1f7a4d;
  --radio: 18px;
  --nav: 74px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fondo);
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 24px);
}
body.sin-scroll { overflow: hidden; }
h1, h2, h3, h4 { color: var(--tinta); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---------- Cabecera y pestañas ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: var(--tinta);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
}
.marca { color: #fff; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.marca span { color: #ff9ccb; font-weight: 500; margin-left: 6px; }

main { max-width: 680px; margin: 0 auto; padding: 0 16px; }

.pestanas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: #fff; border-top: 1px solid var(--linea);
  padding-bottom: env(safe-area-inset-bottom);
}
.pestanas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--nav); text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--suave);
}
.pestanas svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pestanas a.activa { color: var(--rosa); }

/* ---------- Bloques comunes ---------- */
.intro { padding: 24px 0 12px; }
.intro h1 { font-size: 34px; font-weight: 800; }
.intro p { margin-top: 8px; font-size: 19px; }
.intro .dur { color: var(--rosa-osc); font-weight: 700; margin-top: 4px; }
.volver { display: inline-block; margin-top: 18px; font-weight: 700; color: var(--rosa); text-decoration: none; font-size: 18px; }
.explica { font-size: 19px; margin: 14px 0 18px; }
.pie { color: var(--suave); font-size: 16px; margin: 20px 0 8px; }

/* Los tres días */
.dias { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.flecha { color: var(--suave); font-size: 26px; }
.dia {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px; border-radius: 16px; background: #fff; border: 2px solid var(--linea);
  text-decoration: none; min-height: 76px; justify-content: center;
}
.dia-num { font-size: 14px; font-weight: 700; color: var(--suave); }
.dia-nombre { font-size: 19px; font-weight: 800; color: var(--tinta); }
.dia.activo { background: var(--rosa); border-color: var(--rosa); }
.dia.activo .dia-num { color: #ffd1e6; }
.dia.activo .dia-nombre { color: #fff; }

.dia-hero {
  margin-top: 18px; border-radius: var(--radio); min-height: 150px; display: flex; align-items: flex-end;
  padding: 18px; color: #fff;
  background: linear-gradient(180deg, rgba(23,23,25,0) 20%, rgba(23,23,25,.85)), var(--foto) center 22% / cover, var(--tinta);
}
.dia-hero.alto { min-height: 190px; margin-top: 20px; }
.dia-hero h1, .dia-hero h2 { color: #fff; font-size: 32px; font-weight: 800; }
.dia-sub { margin-top: 4px; font-size: 17px; color: #ffd1e6; font-weight: 600; }

/* Versiones */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 11px 16px; border-radius: 999px; background: #fff; border: 2px solid var(--linea);
  text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; color: var(--tinta);
}
.chip.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.nota-version { margin: 12px 0 14px; color: var(--suave); font-size: 17px; }

/* Plegables */
.plegable { background: #fff; border-radius: var(--radio); margin: 12px 0; border: 1px solid var(--linea); }
.plegable summary { padding: 16px 18px; font-weight: 800; font-size: 19px; color: var(--tinta); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.plegable summary::-webkit-details-marker { display: none; }
.plegable summary::after { content: "+"; color: var(--rosa); font-size: 24px; line-height: 1; }
.plegable[open] summary::after { content: "–"; }
.plegable .pasos { padding: 0 18px 16px 40px; }

.pasos { margin: 10px 0 0; padding-left: 24px; }
.pasos li { margin: 8px 0; padding-left: 4px; }
.pasos li::marker { color: var(--rosa); font-weight: 800; }

/* Bloques de la rutina */
.bloque { margin: 26px 0 0; }
.bloque-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bloque-cab h3 { font-size: 24px; font-weight: 800; }
.bloque-cab p { font-size: 16px; color: var(--suave); margin-top: 3px; }
.bloque-cab p.bloque-formato { color: var(--rosa-osc); font-weight: 700; }
.btn-descanso {
  flex: none; border: 0; background: var(--rosa-claro); color: var(--rosa-osc); font-weight: 800;
  border-radius: 14px; padding: 8px 14px; font-size: 15px; line-height: 1.2;
}

/* Tarjeta de ejercicio */
.ej {
  display: grid; grid-template-columns: 100px 1fr; gap: 12px;
  background: var(--tarjeta); border-radius: var(--radio); padding: 12px; margin-bottom: 10px;
  border: 1px solid var(--linea);
}
.ej-foto { border: 0; padding: 0; background: var(--rosa-fondo); border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; width: 100px; align-self: start; }
.ej-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sin-foto { display: flex; align-items: center; justify-content: center; }
.sin-foto svg { width: 44px; height: 44px; fill: none; stroke: #f0a7c9; stroke-width: 1.8; stroke-linecap: round; }
.ej-cuerpo h4 { font-size: 20px; font-weight: 800; }
.dosis { font-size: 22px; font-weight: 800; color: var(--rosa); margin-top: 2px; }
.para { font-weight: 600; color: var(--tinta); margin-top: 4px; font-size: 17px; }
.como { font-size: 16px; color: var(--suave); margin-top: 4px; }
.puntos { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.punto {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--linea); background: #fff;
  font-weight: 800; font-size: 16px; color: var(--suave);
}
.punto.hecho { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.recambio {
  display: block; margin-top: 10px; border: 0; background: none; padding: 0; text-align: left;
  color: var(--rosa-osc); font-weight: 700; font-size: 15.5px; text-decoration: underline; text-underline-offset: 3px;
}

/* Listas de cintas */
.lista { display: grid; gap: 10px; }
.fila {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  background: #fff; border-radius: var(--radio); padding: 12px; text-decoration: none; border: 1px solid var(--linea);
}
.fila-fotos { display: flex; }
.fila-fotos img { width: 46px; height: 62px; object-fit: cover; object-position: top; border-radius: 10px; border: 2px solid #fff; margin-left: -14px; }
.fila-fotos img:first-child { margin-left: 0; }
.fila h3 { font-size: 20px; font-weight: 800; }
.fila p { color: var(--suave); font-size: 16px; margin-top: 2px; }
.formato { background: var(--tinta); color: #fff; border-radius: var(--radio); padding: 16px 18px; margin: 8px 0 16px; }
.formato p { font-size: 17px; font-weight: 600; }
.btn-grande {
  display: block; width: 100%; margin-top: 14px; border: 0; border-radius: 14px; padding: 16px;
  background: var(--rosa); color: #fff; font-weight: 800; font-size: 19px;
}

/* Sesiones de correr, nadar y golf */
.sesion { background: #fff; border-radius: var(--radio); padding: 18px; margin-bottom: 12px; border: 1px solid var(--linea); }
.sesion header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sesion h3 { font-size: 22px; font-weight: 800; }
.sesion .dur { color: var(--rosa-osc); font-weight: 700; font-size: 16px; }
.cuando { margin-top: 6px; color: var(--suave); font-size: 17px; }
.mini-fotos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.mini-fotos button { border: 0; background: none; padding: 0; text-align: left; }
.mini-fotos img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; width: 100%; }
.mini-fotos span { display: block; font-size: 11.5px; line-height: 1.25; margin-top: 4px; color: var(--suave); }

/* Guía */
.guia-bloque { background: #fff; border-radius: var(--radio); padding: 20px 18px; margin-bottom: 12px; border: 1px solid var(--linea); }
.guia-bloque h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.guia-bloque p { margin-top: 10px; }
.guia-bloque p:first-of-type { margin-top: 0; }
.mitades { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.mitad { border-radius: 14px; padding: 14px; background: var(--rosa-fondo); }
.mitad:last-child { background: #eef1f4; }
.mitad h3 { font-size: 18px; font-weight: 800; }
.mitad p { font-size: 16px; margin-top: 6px !important; }
.ej-tipo { color: var(--suave); }
.rotacion { list-style: none; padding: 0; margin: 4px 0 12px; counter-reset: r; }
.rotacion li { counter-increment: r; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.rotacion li::before { content: counter(r); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--rosa); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rotacion b { font-size: 19px; color: var(--tinta); }
.rotacion span { font-size: 16px; color: var(--suave); }
.tiempos { list-style: none; padding: 0; margin: 6px 0 16px; display: grid; gap: 8px; }
.tiempos li { display: grid; grid-template-columns: 118px 1fr 58px; align-items: center; gap: 10px; font-size: 16px; }
.tiempos span { font-weight: 700; color: var(--tinta); }
.tiempos i { display: block; height: 14px; border-radius: 7px; width: calc(var(--w) / 20 * 100%); background: #ddd3d7; }
.tiempos .t-fuerte i { background: var(--rosa); }
.tiempos b { text-align: right; color: var(--suave); font-size: 15px; }
.escala { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.escala li { border-radius: 12px; padding: 12px 14px; background: #f6f3f4; display: flex; flex-direction: column; }
.escala li.ok { background: var(--rosa); color: #fff; }
.escala li.ok b { color: #fff; }
.escala b { color: var(--tinta); }
.escala span { font-size: 16px; }
.semana { list-style: none; padding: 0; margin: 4px 0 12px; }
.semana li { padding: 9px 0; border-bottom: 1px solid var(--linea); }
.semana b { display: inline-block; width: 52px; color: var(--rosa); }

/* ---------- Descanso entre series ---------- */
.descanso {
  position: fixed; left: 12px; right: 12px; z-index: 40;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 10px);
  display: flex; align-items: center; gap: 10px;
  background: var(--tinta); color: #fff; border-radius: 18px; padding: 10px 12px 10px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 656px; margin: 0 auto;
}
.descanso[hidden] { display: none; }
.descanso-txt { font-weight: 700; color: #ffb4d6; }
.descanso-num { font-size: 34px; font-weight: 800; flex: 1; font-variant-numeric: tabular-nums; }
.descanso button { border: 0; border-radius: 12px; padding: 12px 14px; font-weight: 800; background: #2f2c30; color: #fff; font-size: 16px; }
.descanso #descanso-fin { background: var(--rosa); }

/* ---------- Visor de fotos ---------- */
.visor { position: fixed; inset: 0; z-index: 60; background: rgba(15,15,17,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.visor[hidden] { display: none; }
.visor img { max-height: 76vh; border-radius: 16px; }
.visor p { color: #fff; font-weight: 800; font-size: 20px; margin-top: 14px; text-align: center; }
.visor-cerrar { position: absolute; top: calc(env(safe-area-inset-top) + 10px); right: 14px; border: 0; background: none; color: #fff; font-size: 40px; }

/* ---------- Temporizador de circuito ---------- */
.crono {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 20px calc(env(safe-area-inset-bottom) + 18px);
  background: var(--tinta); color: #fff; text-align: center; overflow-y: auto;
}
.crono[hidden] { display: none; }
.crono.fase-trabajo { background: var(--rosa); }
.crono.fase-descanso { background: #1f4f6b; }
.crono-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 17px; }
.crono-top button { border: 0; background: none; color: #fff; font-size: 40px; line-height: 1; }
.crono-estado { margin-top: 6px; font-size: 20px; font-weight: 700; opacity: .9; }
.crono h2 { color: #fff; font-size: 28px; font-weight: 800; margin-top: 4px; }
.crono img { width: 46vw; max-width: 220px; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 16px; margin-top: 12px; }
.crono-num { font-size: 110px; font-weight: 800; line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.crono-como { font-size: 17px; max-width: 420px; margin-top: 6px; opacity: .92; }
.crono-botones { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; width: 100%; max-width: 440px; }
.crono-botones button { flex: 1; border: 0; border-radius: 14px; padding: 16px 8px; font-weight: 800; font-size: 18px; background: rgba(255,255,255,.18); color: #fff; }
.crono-fin { font-size: 56px !important; margin-top: 30vh !important; }

@media (min-width: 640px) {
  .ej { grid-template-columns: 150px 1fr; }
  .ej-foto { width: 150px; }
}

/* Tu formato en el gimnasio */
.formato-gym { font-weight: 700; color: var(--rosa-osc); margin: 4px 0 12px; font-size: 16px; }
.enlace-biblio {
  display: inline-block; margin-top: 12px; padding: 10px 16px; border-radius: 999px;
  background: var(--tinta); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none;
}
.ej-nombre { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; text-decoration: underline; text-decoration-color: #f0a7c9; text-underline-offset: 4px; }
.ej-foto.sin-foto { flex-direction: column; gap: 6px; color: var(--rosa-osc); font-weight: 700; font-size: 13px; }

/* Biblioteca */
.grupo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px 16px; text-decoration: none; color: inherit;
}
.grupo h3 { font-size: 20px; font-weight: 800; }
.grupo p { color: var(--suave); font-size: 15.5px; margin-top: 2px; }
.grupo > span { font-size: 28px; color: var(--rosa); font-weight: 800; }
.grupo.destacado { background: var(--rosa); border-color: var(--rosa); color: #fff; margin-bottom: 12px; }
.grupo.destacado h3, .grupo.destacado p, .grupo.destacado > span { color: #fff; }
.biblio { display: grid; gap: 8px; }
.biblio-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; width: 100%;
  background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 8px; text-align: left; font: inherit; color: inherit;
}
.biblio-foto { width: 56px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--rosa-fondo); display: flex; align-items: center; justify-content: center; }
.biblio-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.biblio-foto svg { width: 30px; height: 30px; fill: none; stroke: #f0a7c9; stroke-width: 1.8; stroke-linecap: round; }
.biblio-txt b { display: block; font-size: 17.5px; line-height: 1.25; }
.biblio-txt small { display: block; color: var(--suave); font-size: 14.5px; margin-top: 3px; }

/* Ficha de ejercicio */
.ficha { position: fixed; inset: 0; z-index: 55; background: rgba(15,15,17,.6); display: flex; align-items: flex-end; justify-content: center; }
.ficha[hidden] { display: none; }
.ficha-caja {
  position: relative; background: var(--fondo); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
}
.ficha-cerrar { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 38px; line-height: 1; color: var(--tinta); }
.ficha-foto { display: block; border: 0; padding: 0; background: none; margin: 0 auto 14px; }
.ficha-foto img { max-height: 42vh; border-radius: 16px; }
.ficha h2 { font-size: 28px; font-weight: 800; padding-right: 30px; line-height: 1.15; }
.ficha h3 { font-size: 17px; font-weight: 800; color: var(--rosa-osc); margin-top: 16px; text-transform: uppercase; letter-spacing: .04em; }
.ficha h3 + p { margin-top: 4px; }
.ficha-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ficha-tags span { background: #fff; border: 1px solid var(--linea); border-radius: 999px; padding: 4px 12px; font-size: 14.5px; font-weight: 600; }
.ficha-top { margin-top: 12px; background: var(--rosa-claro); color: var(--rosa-osc); font-weight: 700; border-radius: 12px; padding: 10px 12px; }
.btn-video { text-align: center; text-decoration: none; margin-top: 20px; }
.ficha-fuente { font-size: 14px; color: var(--suave); text-align: center; margin-top: 8px; }
