/* ==========================================================================
   Champion — Nocturne (monocromo acero sobre negro)
   Tokens + componentes. Mobile-first (iPhone/Safari), centrado en escritorio.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  /* Color base */
  --color-bg: #000;
  --color-surface: #141618;
  --color-text: #e9e9ed;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  /* Acento (acero) — línea y brillo, nunca relleno grande */
  --color-accent: #b5c7d3;
  --color-accent-2: #b5c7d3;
  --color-accent-100: #f4f7fa;
  --color-accent-200: #e6edf2;
  --color-accent-300: #d3dee7;
  --color-accent-400: #b5c7d3;
  --color-accent-500: #9fb3c2;
  --color-accent-600: #7f93a3;
  --color-accent-700: #61727f;
  --color-accent-800: #44515b;
  --color-accent-900: #2c353c;

  /* Neutros (rampa Nocturne, 800/900 sobreescritos por Champion) */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #2a2d31;
  --color-neutral-900: #1a1c1f;

  /* Tipografía */
  --font-heading: "Inter", -apple-system, system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;

  /* Espaciado */
  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  /* Radios */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Elevación */
  --shadow-sm: 0 0 0 1px var(--color-neutral-800);
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65);
}

/* ── Reset mínimo ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  letter-spacing: -0.02em;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--color-accent);
}

/* ── Accesibilidad ────────────────────────────────────────────────────── */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection {
  background: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* ── Base de página (iOS Safari: safe areas, sin overscroll de goma) ───── */
html {
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── Layout raíz — centrado en escritorio, full-bleed en móvil ─────────── */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-bg);
}

main.scr-body {
  flex: 1;
  padding: calc(16px + env(safe-area-inset-top)) 20px 96px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  overscroll-behavior: contain;
  transition: filter 0.15s ease;
}
body.sheet-open main.scr-body {
  filter: blur(2px) brightness(0.55);
  pointer-events: none;
}

/* ── Paneles de pantalla (tabs) ──────────────────────────────────────── */
section.panel {
  display: none;
}
section.panel.on {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ── Barra de tabs inferior ──────────────────────────────────────────── */
nav.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  justify-content: space-around;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
  z-index: 20;
}
button.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--color-neutral-500);
  width: 64px;
  background: none;
  border: 0;
}
button.tab svg {
  width: 22px;
  height: 22px;
}
button.tab.on {
  color: var(--color-accent);
}
button.tab:active {
  opacity: 0.7;
}

/* ── Cabecera de pantalla ────────────────────────────────────────────── */
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hdr h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.hdr .mu {
  font-size: 13px;
}
.wknav {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--color-neutral-500);
}
button.ibtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 0;
  color: var(--color-neutral-500);
}
button.ibtn svg {
  width: 18px;
  height: 18px;
}
button.ibtn:hover {
  color: var(--color-accent);
}
button.ibtn:active {
  opacity: 0.7;
}

/* ── Primitivas de texto ─────────────────────────────────────────────── */
.k {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-neutral-500);
  font-weight: 500;
}
.mu {
  color: var(--color-neutral-500);
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ── Bloque de sección ───────────────────────────────────────────────── */
.sec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

/* ── Fila de lista — regla desvanecida en los extremos ──────────────── */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: linear-gradient(
      to right,
      transparent,
      var(--color-divider) 24px,
      var(--color-divider) calc(100% - 24px),
      transparent
    )
    no-repeat bottom / 100% 1px;
}
.row:last-child {
  background: none;
}
.row.tight {
  padding: 7px 0;
}
.row .grow {
  flex: 1;
  min-width: 0;
}
.row .sub {
  font-size: 12px;
  color: var(--color-neutral-500);
}

/* ── Checkbox circular (hábitos, logros, tira, grid) ────────────────── */
.chk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-neutral-700);
  display: grid;
  place-items: center;
  background: none;
  padding: 0;
  color: var(--color-neutral-900);
  flex: none;
}
.chk svg {
  width: 12px;
  height: 12px;
  display: none;
}
.chk.on {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 35%, transparent);
}
.chk.on svg {
  display: block;
}
.chk.x {
  border-style: dashed;
  color: var(--color-neutral-500);
  font-size: 11px;
  line-height: 1;
}
.chk.sm {
  width: 16px;
  height: 16px;
}
.chk.sm svg {
  width: 10px;
  height: 10px;
}
.chk.dim {
  border-color: var(--color-neutral-800);
}
.chk.today {
  border-color: var(--color-accent);
}

/* ── XP a la derecha de una fila ─────────────────────────────────────── */
.xp {
  font-size: 12px;
  color: var(--color-neutral-500);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: right;
}

/* ── Barra de progreso ───────────────────────────────────────────────── */
.bar {
  height: 4px;
  border-radius: 2px;
  background: var(--color-neutral-800);
  overflow: hidden;
}
.bar > div {
  height: 100%;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
  transition: width 0.25s;
}
.bar.lg {
  height: 6px;
}

/* ── Tira de 7 días (racha) ──────────────────────────────────────────── */
.strk {
  display: flex;
  gap: 6px;
}
.strk > div,
.strk > button {
  flex: 1;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--color-neutral-500);
  border: 1px solid var(--color-neutral-800);
  background: none;
}
.strk > .on {
  background: var(--color-accent-900);
  border-color: var(--color-accent-700);
  color: var(--color-accent-200);
}
.strk > .dim {
  border-color: var(--color-neutral-900);
  color: var(--color-neutral-700);
}
.strk > .x {
  border-style: dashed;
  color: var(--color-neutral-600);
}
.strk > .today {
  border-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 0 14px color-mix(in srgb, var(--color-accent) 35%, transparent);
}

/* ── Segmented control ───────────────────────────────────────────────── */
.seg {
  display: flex;
  width: 100%;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
button.seg-opt {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.seg-opt + .seg-opt {
  border-left: 1px solid var(--color-divider);
}
.seg-opt.on {
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}
.seg-opt:not(.on):hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}

/* ── Botón "Ver" (pequeño, outline acento) ──────────────────────────── */
.ver {
  font-size: 11.5px;
  color: var(--color-accent);
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  border-radius: var(--radius-sm);
  background: none;
  flex: none;
}
.ver:hover {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.ver:active {
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
}

/* ── Etiquetas (lugar: gym/casa) ─────────────────────────────────────── */
.tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}
.tag-accent {
  background: var(--color-accent-800);
  color: var(--color-accent-100);
}
.tag-neutral {
  background: var(--color-neutral-800);
  color: var(--color-neutral-100);
}

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.btn-primary {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.btn-primary:active {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
}
.btn-secondary {
  border-color: var(--color-divider);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}
.btn-secondary:active {
  background: color-mix(in srgb, var(--color-text) 14%, transparent);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Formularios ─────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
.input:hover {
  border-color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.input:focus-visible {
  border-color: var(--color-accent);
  outline-offset: 0;
}
.form-row {
  display: flex;
  gap: 8px;
}
.form-row > * {
  flex: 1;
}

/* Evitar zoom automático de iOS al enfocar inputs en pantallas táctiles */
@media (pointer: coarse) {
  .input {
    font-size: 16px;
  }
}

/* ── Estadísticas (stats) ────────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 20px;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stat .v {
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat .v small {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-neutral-500);
}
.stat .v.acc {
  color: var(--color-accent-300);
}

/* ── Nivel (lvl) ─────────────────────────────────────────────────────── */
.lvl {
  display: flex;
  gap: 16px;
  align-items: center;
}
.lvl .n {
  font-size: 40px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--color-accent-300);
}
.lvl .n.big {
  font-size: 56px;
  letter-spacing: -0.04em;
  text-shadow: 0 0 24px color-mix(in srgb, var(--color-accent) 40%, transparent);
}
.lvl .r {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lvl .r .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-neutral-500);
}

/* ── Grid semanal por hábito (grid7) ─────────────────────────────────── */
.grid7 {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  gap: 6px 4px;
  align-items: center;
  justify-items: center;
  font-size: 12px;
}
.grid7 > .lab {
  justify-self: start;
  color: var(--color-neutral-400);
  font-size: 12.5px;
}
.grid7 > .dh {
  font-size: 10.5px;
  color: var(--color-neutral-500);
  font-weight: 500;
}
.grid7 > .dh.today {
  color: var(--color-accent);
}
.grid7 > .lab.total {
  color: var(--color-text);
  font-weight: 500;
  margin-top: 4px;
}

/* ── Gráfico de barras ───────────────────────────────────────────────── */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}
.bars > .b {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}
.bars .b .v {
  font-size: 11px;
  color: var(--color-neutral-500);
  font-variant-numeric: tabular-nums;
}
.bars .b i {
  display: block;
  width: 100%;
  border-radius: 2px;
  background: var(--color-neutral-800);
  font-style: normal;
}
.bars .b.cur i {
  background: var(--color-accent-800);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 30%, transparent);
}
.bars .b.cur .v {
  color: var(--color-accent-300);
}
.bars-x {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.bars-x span {
  flex: 1;
  font-size: 10px;
  text-align: center;
  color: var(--color-neutral-500);
  font-variant-numeric: tabular-nums;
}

/* ── Nota ────────────────────────────────────────────────────────────── */
.note {
  color: var(--color-neutral-500);
  font-size: 12px;
  line-height: 1.5;
}

/* ── Tarjeta de ejercicio desplegado ─────────────────────────────────── */
.ex-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 6px -12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.ex-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ex-list {
  display: flex;
  flex-direction: column;
}
.ex-name {
  flex: 1;
  font-size: 13.5px;
  min-width: 0;
}
.ex-name.done {
  color: var(--color-neutral-500);
}
.ex-name .nt {
  font-size: 12px;
  color: var(--color-neutral-500);
  display: block;
}

/* ── Estados vacíos / descanso ───────────────────────────────────────── */
.rest {
  color: var(--color-neutral-500);
  text-align: center;
  padding: 24px 0;
}
.empty {
  color: var(--color-neutral-500);
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
}

/* ==========================================================================
   Hoja inferior (sheet) — "Ver", protocolos, formularios
   ========================================================================== */
#sheet.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}
#sheet.sheet[hidden] {
  display: none;
}
#sheet-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sheet-card {
  width: 100%;
  max-width: 430px;
  max-height: 88dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-md);
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: sheet-up 0.22s ease-out;
}
@keyframes sheet-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-card {
    animation: none;
  }
}
.sheet-grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-neutral-700);
  margin: 0 auto;
  flex: none;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.sheet-head h2 {
  font-size: 24px;
  margin: 2px 0 0;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.sheet-head .dose {
  font-size: 15px;
  color: var(--color-accent-300);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Ilustración del ejercicio ───────────────────────────────────────── */
.illus {
  display: grid;
  place-items: center;
  background: #000;
  border-radius: var(--radius-md);
  padding: 16px;
  height: 300px;
  overflow: hidden;
}
.illus img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* Ilustraciones fuente: líneas negras sobre blanco. Invertidas + lighten
     quedan como líneas claras sobre el fondo negro de la app. */
  mix-blend-mode: lighten;
  filter: invert(1) brightness(0.85);
}

/* ── Columnas de datos (Hoy / Semana pasada / Mejor serie) ───────────── */
.cols3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cols3 > * {
  flex: 0 1 auto;
  min-width: 0;
}
.cols3 .k {
  white-space: nowrap;
}
.cols3 .v {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.cols3 .v.mu {
  color: var(--color-neutral-500);
}

/* ── Acciones de la hoja ─────────────────────────────────────────────── */
.actions {
  display: flex;
  gap: 8px;
}
.actions > * {
  flex: 1;
}

/* ── Pasos de protocolo ──────────────────────────────────────────────── */
.step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 10px 0;
  background: linear-gradient(
      to right,
      transparent,
      var(--color-divider) 24px,
      var(--color-divider) calc(100% - 24px),
      transparent
    )
    no-repeat bottom / 100% 1px;
}
.step:last-child {
  background: none;
}
.step .sn {
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.step .st {
  font-size: 14px;
}
.step .sd {
  font-size: 12px;
  color: var(--color-accent-300);
}
.step .sc {
  font-size: 12px;
  color: var(--color-neutral-500);
}

/* ── Cronómetro del protocolo ────────────────────────────────────────── */
.timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.timer .t {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Registro (Plan) y reglas
   ========================================================================== */
.log li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: linear-gradient(
      to right,
      transparent,
      var(--color-divider) 24px,
      var(--color-divider) calc(100% - 24px),
      transparent
    )
    no-repeat bottom / 100% 1px;
}
.log li:last-child {
  background: none;
}
.log .l1 {
  font-size: 13.5px;
}
.log .l2 {
  font-size: 12px;
  color: var(--color-neutral-500);
}
.log .del {
  background: none;
  border: 0;
  color: var(--color-neutral-500);
  flex: none;
}
.log .del:hover {
  color: var(--color-accent);
}

.rules li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: linear-gradient(
      to right,
      transparent,
      var(--color-divider) 24px,
      var(--color-divider) calc(100% - 24px),
      transparent
    )
    no-repeat bottom / 100% 1px;
}
.rules li:last-child {
  background: none;
}
.rules li b {
  font-size: 14px;
  display: block;
  font-weight: 500;
}
.rules li span {
  font-size: 12.5px;
  color: var(--color-neutral-500);
}

/* --- Gráficos del análisis de sueño --- */
.gr-caja { margin: 10px 0 2px; }
.gr { width: 100%; height: auto; display: block; overflow: visible; }
/* Jerarquía de tinta: la rejilla casi no se ve, la etiqueta de fila pesa más
   que la del eje. Es de donde sale la sensación de sobriedad, más que del
   color de las marcas. */
.gr-grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.gr-ref { stroke: rgba(255, 255, 255, .38); stroke-width: 1; stroke-dasharray: 3 3; }
.gr-tick { fill: rgba(255, 255, 255, .25); font-size: 8px; font-variant-numeric: tabular-nums; }
.gr-lab { fill: rgba(255, 255, 255, .55); font-size: 8px; }
.sub-head { margin-top: 18px; }
.stat .sub { color: var(--color-neutral-500); font-size: 11px; margin-top: 2px; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px;
  color: var(--color-neutral-500); font-size: 12px; }
.leyenda .lg { display: flex; align-items: center; gap: 6px; }
.leyenda .lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* Registro por series: controles táctiles y referencia sin guardar. */
.exercise-head { flex-wrap: wrap; }
.exercise-head .dose { white-space: normal; }
.exercise-details summary, .series-variant summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--color-accent-300); }
.exercise-details .illus { height: 160px; }
/* WebP animados: fotos a color, sin inversión. */
.illus.illus-anim { background: #000; padding: 0; height: 240px; }
.illus.illus-anim img { mix-blend-mode: normal; filter: none; border-radius: var(--radius-md); }
.exercise-details .illus.illus-anim { height: 240px; }
.session-summary p { margin: 6px 0 16px; overflow-wrap: anywhere; }
.series-list { display: grid; gap: 12px; }
.series-card, .series-reference { border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 12px; min-width: 0; }
.series-card-head, .series-weight-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.series-card-head { margin-bottom: 8px; }
.series-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.series-fields .field { min-width: 0; }
.series-fields label { font-size: 13px; }
.series-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
.series-stepper .input { width: 100%; min-width: 0; padding: 6px 2px; text-align: center; font-size: 16px; }
.series-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.series-stepper input { appearance: textfield; -moz-appearance: textfield; }
.series-adjust, .series-remove, .series-use { min-height: 44px; min-width: 44px; border: 1px solid var(--color-divider); border-radius: var(--radius-sm); background: var(--color-neutral-900); touch-action: manipulation; }
.series-adjust { font-size: 22px; }
.series-remove, .series-use { padding: 8px; color: var(--color-accent-300); font-size: 13px; }
.series-unit { width: 64px; min-height: 44px; padding: 6px; font-size: 16px; }
.series-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--color-neutral-400); overflow-wrap: anywhere; }
.series-variant label { display: block; margin-bottom: 8px; font-size: 13px; }
.series-step-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.series-step-choice select { width: 90px; min-height: 44px; font-size: 16px; }
.series-reference .note { margin: 8px 0 12px; }
.series-reference .btn { min-height: 44px; }
.series-error { color: var(--color-text); margin: 0; font-size: 14px; }
.series-error:empty { display: none; }
.series-save-actions { position: sticky; bottom: -1px; background: var(--color-surface); padding-top: 12px; }
.series-adjust:focus-visible, .series-remove:focus-visible, .series-use:focus-visible, summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.series-adjust:active, .series-use:active, .series-remove:active { background: var(--color-neutral-800); }
@media (max-width: 390px) { .series-fields { gap: 8px; } .series-card { padding: 10px; } }

/* Medidas corporales: misma superficie nocturna y acento acero del resto de Champion. */
.measure-section { margin: 4px 0 24px; }
.measure-card { border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface); padding: 16px; display: grid; gap: 14px; }
.measure-top, .measure-actions, .measure-record-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.measure-status { color: var(--color-neutral-300); margin: 5px 0 0; font-size: 14px; }
.measure-period, .measure-unit { color: var(--color-neutral-400); font-size: 12px; white-space: nowrap; }
.measure-date { max-width: 280px; }
.measure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.measure-grid .field { min-width: 0; }
.measure-grid .field label { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--color-neutral-200); }
.measure-grid .input, .measure-date .input { min-height: 44px; font-size: 16px; }
.measure-notes { min-height: 64px; resize: vertical; font-size: 16px; }
.measure-actions { justify-content: flex-start; flex-wrap: wrap; }
.measure-actions .btn { min-height: 44px; }
.measure-feedback, .measure-error { margin: 0; font-size: 13px; }
.measure-feedback { color: var(--color-neutral-300); }
.measure-error { color: var(--color-accent-200); }
.measure-history { margin-top: 18px; }
.measure-record { padding: 14px 0; border-bottom: 1px solid var(--color-divider); }
.measure-record-date { font-size: 14px; color: var(--color-text); }
.measure-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; margin-top: 10px; }
.measure-value { display: flex; flex-direction: column; gap: 2px; color: var(--color-neutral-300); font-size: 13px; min-width: 0; }
.measure-value b { color: var(--color-neutral-500); font-weight: 400; }
.measure-baseline { margin-top: 14px; border-top: 1px solid var(--color-divider); padding-top: 8px; }
.measure-baseline summary { min-height: 44px; display: flex; align-items: center; color: var(--color-neutral-300); cursor: pointer; }
.measure-baseline .measure-values { margin-bottom: 8px; }
.measure-week-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 18px; padding: 12px 14px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface); }
.measure-week-link .ver { min-height: 44px; }
@media (min-width: 640px) { .measure-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .measure-values { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 360px) { .measure-card { padding: 12px; } .measure-grid { gap: 10px 8px; } .measure-week-link { align-items: flex-start; flex-direction: column; } }
