/* Forja · sistema visual
   Concepto: pantalla de una sola columna para usar con una mano. Colores de los discos olímpicos:
   azul (20 kg) = acción principal, rojo (25) = proteína, amarillo (15) = hidratos, verde (10) = grasa. */
:root {
  --bg: #0b0e13;
  --surface: #141920;
  --surface2: #1a2029;
  --raise: #222a35;
  --line: #29313d;
  --track: #252d39;
  --fg: #eef2f7;
  --muted: #8a94a6;
  --dim: #5b6576;
  --accent: #3b7cff;
  --accent-fg: #ffffff;
  --accent-soft: rgba(59, 124, 255, .15);
  --c-prot: #f0524a;
  --c-carb: #f4b42a;
  --c-fat: #2db87a;
  --good: #2db87a;
  --warn: #f4b42a;
  --bad: #f0524a;
  --warm: #ff8a3d;
  --water: #4fb8f0;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --backdrop: rgba(3, 5, 9, .62);
  --glass: rgba(14, 18, 24, .82);
  --glass-top: rgba(28, 34, 44, .42);
  --glass-bot: rgba(12, 15, 20, .62);
  --glass-edge: rgba(255, 255, 255, .14);
  --glass-shine: rgba(255, 255, 255, .10);
  --lens-top: rgba(255, 255, 255, .17);
  --lens-bot: rgba(255, 255, 255, .04);
  --lens-edge: rgba(255, 255, 255, .24);

  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-body: "Figtree", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --tabbar: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1f3f7; --surface: #ffffff; --surface2: #f5f7fa; --raise: #eaeef4; --line: #e0e5ed; --track: #e5e9f0;
    --fg: #0e1320; --muted: #5d6778; --dim: #9aa3b2;
    --accent: #2463eb; --accent-soft: rgba(36, 99, 235, .1);
    --c-prot: #d93a32; --c-carb: #c98a0a; --c-fat: #15965f; --good: #15965f; --warn: #c98a0a; --bad: #d93a32; --warm: #e0671a; --water: #1f97d4;
    --shadow: 0 10px 40px rgba(20, 30, 50, .14); --backdrop: rgba(15, 20, 30, .4); --glass: rgba(255, 255, 255, .86);
    --glass-top: rgba(255, 255, 255, .45); --glass-bot: rgba(245, 247, 250, .68); --glass-edge: rgba(15, 20, 30, .08); --glass-shine: rgba(255, 255, 255, .9); --lens-top: rgba(255, 255, 255, .95); --lens-bot: rgba(255, 255, 255, .55); --lens-edge: rgba(15, 20, 30, .08);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f1f3f7; --surface: #ffffff; --surface2: #f5f7fa; --raise: #eaeef4; --line: #e0e5ed; --track: #e5e9f0;
  --fg: #0e1320; --muted: #5d6778; --dim: #9aa3b2;
  --accent: #2463eb; --accent-soft: rgba(36, 99, 235, .1);
  --c-prot: #d93a32; --c-carb: #c98a0a; --c-fat: #15965f; --good: #15965f; --warn: #c98a0a; --bad: #d93a32; --warm: #e0671a; --water: #1f97d4;
  --shadow: 0 10px 40px rgba(20, 30, 50, .14); --backdrop: rgba(15, 20, 30, .4); --glass: rgba(255, 255, 255, .86);
    --glass-top: rgba(255, 255, 255, .45); --glass-bot: rgba(245, 247, 250, .68); --glass-edge: rgba(15, 20, 30, .08); --glass-shine: rgba(255, 255, 255, .9); --lens-top: rgba(255, 255, 255, .95); --lens-bot: rgba(255, 255, 255, .55); --lens-edge: rgba(15, 20, 30, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
@media (display-mode: standalone) { html, body { height: 100lvh; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.sm { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 20px 12px; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 18px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.foot-note { color: var(--dim); font-size: 12px; text-align: center; padding: 8px 12px 0; line-height: 1.6; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Estructura ---------- */
#app { position: relative; height: var(--app-h, 100%); overflow: hidden; }
#view { position: absolute; inset: 0; }
.screen {
  height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-inline: max(16px, calc((100% - 560px) / 2));
  padding-top: calc(var(--safe-t) + 12px);
  padding-bottom: calc(var(--tabbar) + var(--safe-b) + 28px);
  display: flex; flex-direction: column; gap: 14px;
}
#view.has-mini .screen { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 96px); }
.top { display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 2px 2px; }
.title { font-family: var(--f-display); font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.display { font-family: var(--f-display); font-weight: 800; letter-spacing: .01em; }
.label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.label .i { width: 15px; height: 15px; }
.section-t { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 8px 2px -4px; }
.section-t.cap::first-letter { text-transform: uppercase; }

.card { background: var(--surface); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.card.inset { background: var(--surface2); border-color: transparent; border-radius: var(--r-md); padding: 14px; gap: 6px; }
.card h2 { font-size: 22px; font-weight: 800; line-height: 1.15; }
.card h3 { font-size: 17px; font-weight: 700; }

/* Los hijos de contenedores con scroll no deben encogerse */
.screen > *, .sheet-b > *, .wk-body > *, .ob-body > *, .ob-hero > * { flex-shrink: 0; }

/* ---------- Tabbar ---------- */
.tabbar {
  --pad-x: max(10px, calc((100% - 560px) / 2));
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 7px var(--pad-x) calc(var(--safe-b) + 7px);
  /* Liquid glass: cristal esmerilado, saturado, con borde y brillo especular */
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  backdrop-filter: blur(24px) saturate(190%) brightness(1.06); -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.06);
  border-top: .5px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 -10px 30px rgba(0, 0, 0, .18);
}
.tab-lens {
  position: absolute; top: 5px; left: var(--pad-x); width: calc((100% - 2 * var(--pad-x)) / 5); height: 54px;
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s cubic-bezier(.3, 1.35, .45, 1);
  pointer-events: none;
}
.tab-lens::before {
  content: ""; position: absolute; inset: 0 6px; border-radius: 20px;
  background: linear-gradient(180deg, var(--lens-top), var(--lens-bot));
  border: .5px solid var(--lens-edge);
  box-shadow: inset 0 1px 1px var(--glass-shine), inset 0 -2px 6px rgba(0, 0, 0, .12), 0 6px 18px rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px) saturate(170%); -webkit-backdrop-filter: blur(8px) saturate(170%);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 54px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 18px; transition: color .25s; }
.tabbar a .i { width: 24px; height: 24px; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.tabbar a:active .i { transform: scale(.88); }
.tabbar a.on { color: var(--fg); }
.tabbar a.on .i { color: var(--accent); stroke-width: 2.2; }
.status-veil {
  position: absolute; top: 0; left: 0; right: 0; height: var(--safe-t); z-index: 19; pointer-events: none;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 55%, transparent));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#wk-layer:empty, #mini:empty { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  background: var(--raise); color: var(--fg); transition: transform .12s, background .2s, opacity .2s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.primary.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.text { background: transparent; color: var(--muted); font-weight: 600; }
.btn.danger, .row.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; min-width: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:active:not(:disabled) { background: var(--raise); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm .i { width: 18px; height: 18px; }
.icon-btn.danger { color: var(--bad); }
.play-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex: none; box-shadow: 0 6px 20px var(--accent-soft); }
.play-btn .i { margin-left: 3px; }
.i.fill { fill: currentColor; stroke-width: 1.2; }

/* ---------- Chips y segmentos ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--line);
}
.chip em { font-style: normal; color: var(--dim); font-weight: 500; }
.chip .i { width: 15px; height: 15px; }
button.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.chip.on em { color: inherit; opacity: .7; }
.chip.soft { background: var(--surface2); border-color: transparent; height: 26px; font-size: 12px; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; height: 24px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.chip.warm { background: color-mix(in srgb, var(--warm) 15%, transparent); color: var(--warm); border-color: transparent; }
.chip.sm { height: 24px; font-size: 11.5px; align-self: flex-start; margin-top: 4px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 14px; gap: 4px; }
.seg button { height: 38px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.seg button.on { background: var(--raise); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.seg.sm button { height: 36px; font-size: 13.5px; }

/* ---------- Listas ---------- */
.list { gap: 0; padding: 4px 0; }
.list.flush { padding: 0; }
.card.list { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; min-height: 52px; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.row b { font-weight: 650; }
.list.flush .row { padding-inline: 4px; }
.mk { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; background: var(--dim); }
.m-pecho { background: #f0524a; } .m-espalda { background: #3b7cff; } .m-hombros { background: #ff8a3d; }
.m-biceps { background: #a970ff; } .m-triceps { background: #ef5da8; } .m-cuadriceps { background: #2db87a; }
.m-femoral { background: #16b3b3; } .m-gluteo { background: #d946ef; } .m-gemelos { background: #9ccc3c; }
.m-abdomen { background: #f4b42a; } .m-antebrazo { background: #94a3b8; }
.ex-row .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.ex-row.sel .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.ex-row.sel .tick .i { width: 16px; height: 16px; stroke-width: 3; }
.pr-mini { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .ed-grid input, .ed-grid select, textarea.code {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface2); font-size: 16px; outline: none; transition: border-color .15s;
}
.field textarea, textarea.code { padding: 12px 14px; resize: vertical; line-height: 1.45; }
textarea.code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.field input:focus, .field textarea:focus, .ed-grid input:focus, textarea.code:focus { border-color: var(--accent); }
.field-row { display: flex; gap: 12px; }
.field-row.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.field-row.four input { padding: 0 8px; text-align: center; }
.field-row.wrap2 { display: grid; grid-template-columns: 1fr 1fr; }
.m-p-t > span, .m-p-t { color: var(--c-prot) !important; }
.m-c-t > span, .m-c-t { color: var(--c-carb) !important; }
.m-f-t > span, .m-f-t { color: var(--c-fat) !important; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--muted); }
.screen > .search { background: var(--surface); }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; outline: none; font-size: 16px; color: var(--fg); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.toggle { cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .sw { width: 50px; height: 30px; border-radius: 99px; background: var(--track); position: relative; flex: none; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.toggle input:checked + .sw { background: var(--good); }
.toggle input:checked + .sw::after { transform: translateX(20px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }

.stepper { display: flex; align-items: center; gap: 6px; background: var(--surface2); border-radius: 12px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--raise); }
.stepper span { min-width: 44px; text-align: center; font-weight: 700; }
.stepper.sm button { width: 34px; height: 34px; }

/* ---------- Hoy ---------- */
.hero-card { gap: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 62%); }
.hero-card.live { background: linear-gradient(160deg, color-mix(in srgb, var(--good) 18%, var(--surface)) 0%, var(--surface) 62%); }
.hero-card.done { background: linear-gradient(160deg, color-mix(in srgb, var(--good) 12%, var(--surface)) 0%, var(--surface) 62%); }
.hero-card h2 { font-family: var(--f-display); font-size: 32px; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.good-i { color: var(--good); } .accent-i { color: var(--accent); } .warm-i { color: var(--warm); } .water-i { color: var(--water); }
.mini-ex { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: ex; }
.mini-ex li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; counter-increment: ex; }
.mini-ex li span::before { content: counter(ex); display: inline-block; width: 20px; color: var(--dim); font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-ex li.muted span::before { content: ""; }
.mini-ex small { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-l { color: var(--good); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 1.8s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.nutri-card { flex-direction: row; align-items: center; gap: 18px; cursor: pointer; }
.ring-wrap { position: relative; flex: none; display: grid; place-items: center; }
.ring-val { transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-in b { font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; }
.ring-in span { font-size: 11.5px; color: var(--muted); font-weight: 600; max-width: 80px; line-height: 1.2; margin-top: 2px; }
.macros { display: flex; flex-direction: column; gap: 10px; }
.kcal-line { font-size: 14px; color: var(--muted); }
.kcal-line b { color: var(--fg); font-size: 17px; }
.macro-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.macro-l { font-weight: 700; }
.macro-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.macro-v b { color: var(--fg); }
.bar { height: 7px; border-radius: 9px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.m-p .bar i { background: var(--c-prot); } .m-c .bar i { background: var(--c-carb); } .m-f .bar i { background: var(--c-fat); }
.m-p .macro-l { color: var(--c-prot); } .m-c .macro-l { color: var(--c-carb); } .m-f .macro-l { color: var(--c-fat); }
.add-food { margin-top: -4px; }

.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.wd i { width: 100%; max-width: 38px; aspect-ratio: 1; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; border: 1px solid var(--line); }
.wd.on i { background: var(--accent); border-color: var(--accent); color: #fff; }
.wd.on i .i { width: 18px; height: 18px; stroke-width: 2.8; }
.wd.today span { color: var(--fg); }
.wd.today i { border-color: var(--fg); }
.week b.num { font-family: var(--f-display); font-size: 30px; font-weight: 800; }

.weight .num.xl, .num.xl { font-family: var(--f-display); font-size: 40px; font-weight: 800; line-height: 1.05; }
.num.xl small { font-size: 18px; color: var(--muted); }
.spark { flex: none; }
.water .num { font-family: var(--f-display); font-size: 28px; font-weight: 800; }
.glasses { display: flex; gap: 6px; flex-wrap: wrap; }
.glass { width: 30px; height: 38px; border-radius: 4px 4px 10px 10px; border: 2px solid var(--line); position: relative; overflow: hidden; }
.glass::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--water); transition: height .3s; }
.glass.on { border-color: var(--water); }
.glass.on::after { height: 78%; }

.coach .advice { background: var(--surface2); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border-left: 3px solid var(--dim); }
.coach .advice.good { border-left-color: var(--good); }
.coach .advice.warn { border-left-color: var(--warn); }
.tip b { display: block; margin-bottom: 3px; }
.tip p { color: var(--muted); font-size: 14px; }

.kv3, .stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv3 > div { display: flex; flex-direction: column; }
.kv3 b { font-size: 17px; }
.kv3 span { font-size: 12px; color: var(--muted); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet .stat { background: var(--surface2); border-color: transparent; }
.stat b { font-family: var(--f-display); font-size: 26px; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { font-size: 12px; color: var(--muted); }
.stat .label { font-size: 10.5px; }

/* ---------- Entrenar ---------- */
.live-banner { flex-direction: row; align-items: center; gap: 12px; border-color: color-mix(in srgb, var(--good) 50%, var(--line)); text-align: left; width: 100%; }
.live-banner small { display: block; color: var(--muted); font-size: 12.5px; }
.program h2 { font-family: var(--f-display); text-transform: uppercase; font-size: 26px; }
.routine { gap: 8px; }
.routine.is-next { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.routine h3 { font-size: 19px; margin: 4px 0 2px; }
.routine [data-a="editRoutine"] { cursor: pointer; }
.ex-line { font-size: 13px; color: var(--muted); line-height: 1.5; }

.ed-list { display: flex; flex-direction: column; gap: 10px; }
.ed-ex { background: var(--surface2); border-radius: var(--r-md); padding: 10px 10px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ed-head { display: flex; align-items: center; gap: 2px; }
.ed-head small { display: block; color: var(--muted); font-size: 12px; }
.ed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ed-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ed-grid input, .ed-grid select { min-height: 42px; padding: 0 6px; text-align: center; background: var(--surface); }

.days-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.days-pick button { display: flex; flex-direction: column; align-items: center; padding: 14px 0 10px; border-radius: var(--r-md); background: var(--surface2); border: 2px solid transparent; }
.days-pick b { font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; }
.days-pick span { font-size: 12px; color: var(--muted); }
.days-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.plain { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 8px; }
.plain small { display: block; color: var(--muted); font-size: 12.5px; }

.hist { flex-direction: row; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 12px 14px; }
.hist small { display: block; }
.hist-date { width: 48px; height: 52px; border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.hist-date b { font-family: var(--f-display); font-size: 22px; line-height: 1; font-weight: 800; }
.hist-date span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.sess-ex { gap: 6px; padding: 14px; }
.sets-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.sets-t td { padding: 5px 0; border-top: 1px solid var(--line); }
.sets-t td:first-child { width: 28px; }
.sets-t td:last-child { text-align: right; font-size: 12.5px; }
.set-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.set-pills span { background: var(--surface2); border-radius: 8px; padding: 3px 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tipbox { flex-direction: row; gap: 10px; align-items: flex-start; }
.tipbox .i { color: var(--accent); margin-top: 1px; }
.tipbox p { font-size: 14px; }

/* ---------- Entreno en curso ---------- */
#wk-layer { position: absolute; inset: 0; z-index: 50; background: var(--bg); animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
.wk { height: 100%; display: flex; flex-direction: column; }
.wk-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) max(12px, calc((100% - 560px) / 2)) 8px; }
.wk-title { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.wk-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-title span { font-family: var(--f-display); font-size: 24px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.wk-progress { height: 3px; background: var(--track); }
.wk-progress i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.wk-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px max(12px, calc((100% - 560px) / 2)) calc(var(--safe-b) + 40px); display: flex; flex-direction: column; gap: 12px; }
.wk.resting .wk-body { padding-bottom: calc(var(--safe-b) + 140px); }
.wk-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 4px 0 2px; }
.wk-stats b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.wk-stats span { font-size: 11.5px; color: var(--muted); }
.wk-ex { padding: 14px 12px; gap: 8px; }
.wk-ex.complete { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.wk-ex-head { display: flex; align-items: flex-start; gap: 6px; }
.wk-ex-title { text-align: left; padding: 2px 4px; }
.wk-ex-title b { font-size: 17px; display: block; }
.wk-ex-title small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.coach-chip { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 9px 11px; border-radius: 11px; line-height: 1.35; }
.coach-chip .i { width: 16px; height: 16px; margin-top: 1px; }
.coach-chip.up { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.coach-chip.down { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.coach-chip.plain { background: var(--surface2); color: var(--muted); font-weight: 500; }
.set { display: grid; grid-template-columns: 34px minmax(0, 1fr) 76px 66px 46px; gap: 7px; align-items: center; }
.set.head { font-size: 11px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 0 0; }
.set.head span { text-align: center; }
.set-n { height: 40px; border-radius: 10px; background: var(--surface2); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.set.warm .set-n { color: var(--warm); }
.set-prev { height: 40px; color: var(--muted); font-size: 13.5px; text-align: center; font-variant-numeric: tabular-nums; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-prev:disabled { opacity: .6; }
.set input { height: 44px; width: 100%; border-radius: 10px; border: 1px solid transparent; background: var(--surface2); text-align: center; font-size: 17px; font-weight: 700; outline: none; padding: 0 4px; }
.set input::placeholder { color: var(--dim); font-weight: 600; opacity: 1; }
.set input:focus { border-color: var(--accent); background: var(--surface); }
.set-ok { height: 44px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--dim); transition: background .15s, color .15s; }
.set-ok .i { width: 22px; height: 22px; stroke-width: 2.6; }
.set.done .set-ok { background: var(--good); color: #fff; }
.set.done input, .set.done .set-n { background: color-mix(in srgb, var(--good) 14%, transparent); }
.set.done .set-ok { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(1.15); } }
.wk-ex-foot { display: flex; gap: 8px; justify-content: space-between; padding-top: 4px; }

.rest { position: absolute; left: 0; right: 0; bottom: 0; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 0 max(12px, calc((100% - 560px) / 2)) calc(var(--safe-b) + 12px); animation: rise .25s; }
.rest-bar { height: 4px; background: var(--track); margin: 0 calc(-1 * max(12px, calc((100% - 560px) / 2))) 10px; }
.rest-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform .25s linear; }
.rest-row { display: flex; align-items: center; gap: 8px; }
.rest-mid { flex: 1; display: flex; flex-direction: column; align-items: center; }
.rest-mid b { font-family: var(--f-display); font-size: 40px; font-weight: 800; line-height: 1; }

.mini-wk {
  position: absolute; z-index: 21; left: max(12px, calc((100% - 560px) / 2)); right: max(12px, calc((100% - 560px) / 2));
  bottom: calc(var(--tabbar) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px;
  background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow); text-align: left;
}
.mini-wk .pulse { background: #fff; }
.mini-wk small { display: block; opacity: .8; font-size: 12px; }
.mini-wk .num { font-family: var(--f-display); font-size: 22px; font-weight: 800; }

/* ---------- Nutrición ---------- */
.date-nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px; }
.date-btn { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 4px; }
.date-btn b { font-size: 16px; }
.date-btn small { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.meal { gap: 4px; padding: 12px 14px; }
.meal-head { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.meal-head b { font-size: 16px; display: block; }
.meal-head small { font-size: 12.5px; }
.add-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.add-btn .i { stroke-width: 2.4; }
.food-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.food-row b { font-weight: 600; font-size: 14.5px; display: block; }
.food-row small { font-size: 12.5px; }
.food-row .kc { font-weight: 700; }
.food-pick em { font-style: normal; color: var(--dim); }
.amount-prev { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 4px 0 8px; }
.amount-kcal { display: flex; align-items: baseline; gap: 6px; }
.amount-kcal b { font-family: var(--f-display); font-size: 52px; font-weight: 800; line-height: 1; }
.amount-kcal span { color: var(--muted); font-weight: 600; }
.mac3, .mac4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; text-align: center; }
.mac4 { grid-template-columns: repeat(4, 1fr); }
.mac3 > div, .mac4 > div { background: var(--surface2); border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; border-top: 3px solid var(--dim); }
.mac3 b, .mac4 b { font-size: 17px; }
.mac3 span, .mac4 span { font-size: 11.5px; color: var(--muted); }
.mac3 .m-p, .mac4 .m-p { border-top-color: var(--c-prot); }
.mac3 .m-c, .mac4 .m-c { border-top-color: var(--c-carb); }
.mac3 .m-f, .mac4 .m-f { border-top-color: var(--c-fat); }
.mac4 > div:first-child { border-top-color: var(--accent); }
.grams-row { display: flex; align-items: center; gap: 10px; }
.grams-row .icon-btn { background: var(--raise); width: 48px; height: 48px; }
.grams { flex: 1; display: flex; align-items: center; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.grams input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; outline: none; text-align: center; font-size: 22px; font-weight: 800; }
.grams span { color: var(--muted); font-weight: 600; }
.plan { gap: 0; padding: 0; overflow: hidden; }
.plan-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px; width: 100%; text-align: left; }
.plan-head b { font-size: 17px; display: block; }
.plan-head small { display: block; font-size: 13px; margin: 2px 0 8px; }
.plan-mac { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; }
.plan-mac i { font-style: normal; }
.plan-meal { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.plan-meal b { display: block; }
.plan-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.plan-items li { display: flex; justify-content: space-between; gap: 10px; }
.plan-items li span:last-child { color: var(--muted); }
.plan > .btn { margin: 4px 16px 16px; width: calc(100% - 32px); }
.guide-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--c-prot) 14%, var(--surface)) 0%, var(--surface) 60%); }
.formula { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.formula > div { display: flex; flex-direction: column; }
.formula b { font-family: var(--f-display); font-size: 28px; font-weight: 800; line-height: 1.05; }
.formula .m-p b { color: var(--c-prot); }
.formula span { font-size: 12px; color: var(--muted); }
.acc { gap: 0; padding: 0; }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc[open] summary .i { transform: rotate(180deg); }
.acc > p, .acc > ul, .acc > div { padding: 0 16px 16px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.acc b { color: var(--fg); }
.dots-list { margin: 0; padding-left: 34px !important; display: flex; flex-direction: column; gap: 8px; }
.dots-list li::marker { color: var(--accent); }
.shop { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Progreso ---------- */
.chart-card { width: 100%; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ct { fill: var(--muted); font: 600 10.5px var(--f-body); font-variant-numeric: tabular-nums; }
.chart .ct-strong { fill: var(--fg); font-size: 12px; font-weight: 800; }
.chart-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 34px 12px; background: var(--surface2); border-radius: var(--r-md); }
.measures { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.measures > div { display: flex; flex-direction: column; background: var(--surface2); border-radius: 12px; padding: 10px 12px; }
.measures b { font-family: var(--f-display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.measures small { font-size: 12px; }
.vol-legend { font-size: 12.5px; color: var(--muted); }
.vol-legend .zone { display: inline-block; width: 18px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--good) 22%, transparent); margin-right: 6px; vertical-align: -1px; }
.vol-bars { display: flex; flex-direction: column; gap: 9px; }
.vb { display: grid; grid-template-columns: 84px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.vb-l { font-weight: 600; }
.vb b { text-align: right; }
.vb-track { position: relative; height: 12px; background: var(--track); border-radius: 6px; overflow: hidden; }
.vb-zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--good) 22%, transparent); }
.vb-fill { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 4px; background: var(--dim); }
.vb-fill.ok { background: var(--good); } .vb-fill.mid { background: var(--warn); } .vb-fill.low { background: var(--dim); } .vb-fill.high { background: var(--bad); }

/* ---------- Perfil ---------- */
.profile-head { flex-direction: row; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-family: var(--f-display); font-size: 30px; font-weight: 800; flex: none; }
.profile-head h2 { font-size: 20px; }
.calc { display: flex; flex-direction: column; gap: 6px; background: var(--surface2); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
.calc > div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.calc b { color: var(--fg); font-variant-numeric: tabular-nums; }
.calc-tot { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.calc-tot span, .calc-tot b { color: var(--fg); font-weight: 800; }
.adjust { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row.toggle b { font-weight: 600; display: block; }

/* ---------- Onboarding ---------- */
.ob { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ob-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: calc(var(--safe-t) + 10px) max(12px, calc((100% - 520px) / 2)) 6px; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--track); transition: background .3s; }
.dots i.on { background: var(--accent); }
.ob-body { flex: 1; overflow-y: auto; padding: 16px max(20px, calc((100% - 520px) / 2)) 24px; display: flex; flex-direction: column; gap: 14px; }
.ob-foot { padding: 12px max(20px, calc((100% - 520px) / 2)) calc(var(--safe-b) + 16px); }
.ob-hero { display: flex; flex-direction: column; gap: 16px; padding-top: 4vh; }
.ob-hero h1 { font-size: 76px; line-height: .9; text-transform: uppercase; }
.brand-mark { width: 64px; height: 64px; border-radius: 20px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.brand-mark .i { width: 36px; height: 36px; stroke-width: 2.4; }
.lead { font-size: 17px; color: var(--muted); line-height: 1.5; max-width: 34ch; }
.ob-list { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.ob-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.ob-list .i { color: var(--accent); background: var(--accent-soft); padding: 7px; width: 34px; height: 34px; border-radius: 10px; }
.ob-t { font-family: var(--f-display); font-size: 40px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.ob-s { color: var(--muted); margin-top: -4px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--line); text-align: left; }
.sheet .opt { background: var(--surface2); border-color: transparent; }
.opt span { font-size: 13.5px; color: var(--muted); }
.opt.on { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
.plan-sum { align-items: stretch; }
.big-kcal { display: flex; align-items: baseline; gap: 8px; justify-content: center; }
.big-kcal .display { font-size: 64px; line-height: 1; }
.big-kcal small { color: var(--muted); font-weight: 600; }

/* ---------- Hojas modales ---------- */
.sheet-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.backdrop { position: absolute; inset: 0; background: var(--backdrop); }
.sheet-wrap:not(.top) .backdrop { background: transparent; }
.sheet-wrap.enter .backdrop { animation: fade .25s; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100% - var(--safe-t) - 24px);
  background: var(--surface); border-radius: 26px 26px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow); border: 1px solid var(--line); border-bottom: 0;
}
.sheet.full { height: calc(100% - var(--safe-t) - 24px); }
.sheet-wrap.enter .sheet { animation: rise .32s cubic-bezier(.2, .8, .2, 1); }
.grip { width: 38px; height: 5px; border-radius: 5px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 6px 20px; flex: none; }
.sheet-h h2 { font-size: 19px; font-weight: 800; min-width: 0; }
.sheet-b { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet-f { padding: 12px 20px calc(var(--safe-b) + 14px); border-top: 1px solid var(--line); flex: none; }
.sheet .card { background: var(--surface2); border-color: transparent; }
.sheet .card.inset { background: var(--surface2); }
.sheet .search, .sheet .field input, .sheet .field textarea, .sheet .field select { background: var(--surface2); }
.sheet .chips.scroll-x { margin-inline: -20px; padding-inline: 20px; }
@media (min-width: 600px) {
  .sheet-wrap { justify-content: center; padding: 24px; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line); max-height: min(760px, 100%); }
  .sheet.full { height: min(760px, 100%); }
  .grip { display: none; }
}
.big-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0; }
.big-stepper > button { width: 56px; height: 56px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; }
.bs-val { display: flex; align-items: baseline; gap: 4px; }
.bs-val input { width: 150px; border: 0; background: none; text-align: center; font-family: var(--f-display); font-size: 64px; font-weight: 800; outline: none; padding: 0; }
.bs-val span { color: var(--muted); font-weight: 700; font-size: 18px; }
.summary-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.trophy { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--warm) 16%, transparent); color: var(--warm); animation: pop .5s; }
.trophy .i { width: 40px; height: 40px; }
.summary-hero h2 { font-family: var(--f-display); font-size: 30px; text-transform: uppercase; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 20px; color: var(--muted); }
.empty > .i { width: 44px; height: 44px; color: var(--dim); margin-bottom: 6px; }
.empty h3 { color: var(--fg); font-size: 18px; }
.empty p { max-width: 32ch; }
.empty .btn { margin-top: 10px; }

#toast {
  position: fixed; z-index: 400; left: 50%; top: calc(var(--safe-t) + 12px); transform: translate(-50%, calc(-100% - var(--safe-t) - 30px));
  opacity: 0; visibility: hidden;
  background: var(--fg); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s, visibility .3s; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 370px) {
  .set { grid-template-columns: 30px minmax(0, 1fr) 64px 56px 42px; gap: 5px; }
  .title { font-size: 34px; }
  .nutri-card { gap: 12px; }
}

/* ---------- Mi gimnasio y planificador ---------- */
.eq-group { display: flex; flex-direction: column; gap: 8px; }
.eq-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sheet .eq-list { background: var(--surface2); border-color: transparent; }
.eq { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font-size: 14.5px; font-weight: 600; min-height: 48px; }
.eq + .eq { border-top: 1px solid var(--line); }
.eq i { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: background .15s; }
.eq.on i { background: var(--accent); border-color: var(--accent); color: #fff; }
.eq.on i .i { width: 15px; height: 15px; stroke-width: 3.2; }
.eq:not(.on) span { color: var(--muted); }
.wd-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd-pick button { aspect-ratio: 1; max-height: 48px; border-radius: 12px; background: var(--surface2); border: 2px solid var(--line); font-weight: 800; font-size: 15px; text-align: center; }
.ob .wd-pick button { background: var(--surface); }
.wd-pick button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.wd-strip { display: flex; gap: 5px; }
.wd-strip span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface2); color: var(--dim); }
.wd-strip span.on { background: var(--accent-soft); color: var(--accent); }
.wd.plan:not(.on) i { border-style: dashed; border-color: var(--accent); }
.gym-row { background: var(--surface2); border-radius: var(--r-md); }
.prog-prev { gap: 10px; }
.pp-name { font-size: 16px; }
.pp-r { border-top: 1px solid var(--line); padding-top: 10px; }
.pp-r ul, .pp-changes ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.pp-r li { display: flex; justify-content: space-between; gap: 10px; }
.pp-r li small { color: var(--muted); white-space: nowrap; }
.pp-changes { border-top: 1px solid var(--line); padding-top: 10px; }
.pp-changes li { color: var(--muted); }
.pp-changes b { color: var(--fg); font-weight: 600; }
em.na { font-style: normal; color: var(--warn); }
.hero-card.rest-day { background: var(--surface); }
.hero-card.rest-day p b { color: var(--fg); }
.chip .i { flex: none; }

/* ---------- Estilo de rutina ---------- */
.opt b em.rec { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.split-ed { gap: 10px; }
.zone-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.zone-row + .zone-row { border-top: 1px solid var(--line); padding-top: 10px; }
.zone-row small { display: block; font-size: 12px; color: var(--muted); }
.split-ed .stepper { background: var(--surface); }
.split-ed .btn { align-self: flex-start; }
.advice-mini { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); padding: 9px 11px; border-radius: 11px; line-height: 1.4; }
.advice-mini .i { width: 16px; height: 16px; margin-top: 1px; }
.pp-sets { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pp-sets-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.pps { background: var(--surface); border-radius: 10px; padding: 7px 4px; text-align: center; display: flex; flex-direction: column; border-bottom: 3px solid var(--dim); min-width: 0; }
.pps b { font-size: 17px; }
.pps span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pps.ok { border-bottom-color: var(--good); } .pps.mid { border-bottom-color: var(--warn); } .pps.low { border-bottom-color: var(--bad); } .pps.high { border-bottom-color: var(--warm); }

/* ---------- Suplementos ---------- */
.supp-card { gap: 10px; }
.supp-list { display: flex; flex-direction: column; gap: 6px; }
.supp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface2); text-align: left; width: 100%; transition: background .2s; }
.supp-row b { display: block; font-size: 15px; }
.supp-row small { display: block; color: var(--muted); font-size: 12.5px; }
.supp-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: background .2s, border-color .2s; }
.supp-row.on { background: color-mix(in srgb, var(--good) 12%, var(--surface2)); }
.supp-row.on .supp-check { background: var(--good); border-color: var(--good); color: #fff; animation: pop .25s; }
.supp-row.on .supp-check .i { width: 18px; height: 18px; stroke-width: 3; }
.supp-row.on b { color: var(--muted); }
.chip.ok { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); border-color: transparent; }
.supp-item { gap: 10px; }
.supp-name { font-size: 16px; display: block; }
.supp-item small { display: block; font-size: 12.5px; }
.supp-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.sd { aspect-ratio: 1; border-radius: 7px; background: var(--surface2); display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: var(--dim); min-width: 0; }
.sd.on { background: var(--good); color: #fff; }
.sd.miss { background: color-mix(in srgb, var(--bad) 14%, var(--surface2)); color: var(--bad); }
.sd.today { border: 2px dashed var(--good); color: var(--good); }
.sd.off { opacity: .35; }
.supp-stats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.supp-stats span { display: inline-flex; align-items: center; gap: 4px; }
.supp-stats .i { width: 15px; height: 15px; color: var(--warm); }
.supp-stats b { color: var(--fg); }
.advice-mini.info { color: var(--accent); background: var(--accent-soft); }
em.ev { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.row em.ev { display: inline-block; margin-top: 5px; }
.ev-A { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.ev-B { color: var(--accent); background: var(--accent-soft); }
.ev-C { color: var(--muted); background: var(--surface2); }
.acc summary .grow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.supp-lib small { line-height: 1.4; }

/* ---------- Platos personalizables, comidas guardadas y recetas ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dish-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: var(--r-md); background: var(--surface2); text-align: left; min-height: 72px; justify-content: center; }
.dish-tile b { font-size: 14.5px; line-height: 1.25; }
.dish-tile small { color: var(--muted); font-size: 12px; }
.dish-tile:active { transform: scale(.98); }
.dish-i { width: 16px; height: 16px; color: var(--c-carb); vertical-align: -3px; }
.fav-i { width: 14px; height: 14px; color: var(--warn); fill: var(--warn); vertical-align: -2px; }
.dish-row .dish-i { width: 22px; height: 22px; }
.dish-prev { position: sticky; top: -8px; z-index: 2; background: var(--surface); padding-top: 8px; margin-top: -8px; }
.dish-group { display: flex; flex-direction: column; gap: 8px; }
.dish-group .label em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--dim); }
.opt-chip { height: auto; min-height: 36px; padding: 6px 12px; white-space: normal; text-align: left; }
.opt-chip em { font-variant-numeric: tabular-nums; }
.opt-chip .ck { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--dim); display: grid; place-items: center; flex: none; }
.opt-chip.on .ck { border-color: currentColor; }
.opt-chip .ck .i { width: 12px; height: 12px; stroke-width: 3.4; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-row > span:first-child { font-size: 13px; font-weight: 600; color: var(--muted); flex: 1; }
.dish-ing summary { cursor: pointer; list-style: none; }
.dish-ing summary::-webkit-details-marker { display: none; }
.dish-ing ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.dish-ing li { display: flex; justify-content: space-between; color: var(--muted); }
.fav-btn { align-self: flex-start; }
.fav-btn.on { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: transparent; }
.fav-btn.on .i { fill: currentColor; }
.saved-meal { padding-inline: 4px; gap: 6px; }
.sm-main { text-align: left; display: flex; flex-direction: column; }
.sm-main small { font-size: 12.5px; }
.rc-list { gap: 4px; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rc-row b { display: block; font-size: 14.5px; }
.rc-row small { font-size: 12.5px; }
.rc-list .btn { align-self: flex-start; margin-top: 6px; }
.list.flush > .section-t { margin: 14px 4px 2px; }
.meal-head .icon-btn { margin-right: -4px; }

/* ---------- Emoticonos ---------- */
.emo { font-size: 22px; line-height: 1; width: 30px; text-align: center; flex: none; }
.food-row .emo { font-size: 20px; }
.meal-emo { font-size: 22px; line-height: 1; margin-right: 2px; }
.dish-emo { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.plan-items li span:first-child { min-width: 0; }

/* ---------- Cardio ---------- */
.cardio-bar i { background: var(--c-fat); }
.cardio-card .num.xl { font-size: 34px; }
.cw-main { display: flex; align-items: baseline; gap: 6px; }
.cw-main b { font-family: var(--f-display); font-size: 48px; font-weight: 800; line-height: 1; }
.cw-main span { color: var(--muted); font-weight: 600; }
.cardio-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ct-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; border-radius: 12px; background: var(--surface2); font-size: 11.5px; font-weight: 600; color: var(--muted); border: 2px solid transparent; text-align: center; }
.ct-btn span { font-size: 22px; line-height: 1; }
.ct-btn.on { border-color: var(--c-fat); color: var(--fg); background: color-mix(in srgb, var(--c-fat) 12%, var(--surface2)); }
.cd-prev, .live-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.cd-prev > div, .live-stats > div { background: var(--surface2); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.cd-prev b, .live-stats b { font-family: var(--f-display); font-size: 26px; font-weight: 800; line-height: 1.1; }
.cd-prev span, .live-stats span { font-size: 11.5px; color: var(--muted); }
.live-clock { text-align: center; display: flex; flex-direction: column; padding: 8px 0; }
.live-clock b { font-family: var(--f-display); font-size: 72px; font-weight: 800; line-height: 1; color: var(--c-fat); }
.live-clock span { color: var(--muted); font-weight: 600; }
.cardio-row .kc { font-weight: 700; font-size: 13px; color: var(--muted); }
.cardio-note { margin-top: -6px; }

/* ---------- Búsqueda en internet ---------- */
.off-btn { flex-direction: column; gap: 2px; min-height: 60px; margin-top: 10px; white-space: normal; }
.off-btn small { font-weight: 500; font-size: 12px; color: var(--muted); }
.off-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 14px; padding: 18px 8px; }
.opt-warn { font-style: normal; font-size: 12.5px; color: var(--warn); margin-top: 4px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-row .btn { flex: 1 1 auto; }
