/* Mioforz — estilos compartidos (panel y página del usuario)
   Concepto: consultorio claro con cinta kinesiológica como acento; tipografía
   Archivo expandida para títulos y Atkinson Hyperlegible para lectura. */
:root {
  --bg: #F1F4F3;
  --surface: #FFFFFF;
  --surface-2: #E6ECEA;
  --ink: #132320;
  --ink-2: #4E605B;
  --line: #D3DCD9;
  --primary: #17423A;
  --primary-ink: #FFFFFF;
  --tape: #C93062;
  --tape-ink: #FFFFFF;
  --tape-soft: #FBE4EC;
  --ok: #2B7A57;
  --warn: #B07216;
  --bad: #BC3A2E;
  --shadow: 0 1px 2px rgba(19,35,32,.06), 0 8px 24px rgba(19,35,32,.07);
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1614; --surface: #15201D; --surface-2: #1D2B27; --ink: #E5EEEB; --ink-2: #9AAEA8; --line: #2A3A36;
    --primary: #86D3BF; --primary-ink: #0A1A16; --tape: #EE7499; --tape-ink: #2A0B16; --tape-soft: #3A1B26;
    --ok: #63C99C; --warn: #E2B25A; --bad: #EF8073; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
ul, ol { padding: 0; }
img, video { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--primary); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--tape); outline-offset: 2px; border-radius: 6px; }

.shell { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 64px; }

/* ---------- Barra superior ---------- */
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 16px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; min-width: 0; }
.mark { width: 30px; height: 30px; position: relative; flex: none; }
.mark::before, .mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 10px; border-radius: 5px; transform: translate(-50%, -50%) rotate(45deg); background: var(--tape); }
.mark::after { transform: translate(-50%, -50%) rotate(-45deg); background: var(--primary); opacity: .92; }
.brand-name { font-family: var(--font-display); font-stretch: 125%; font-weight: 850; font-size: 1.3rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: .82rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.topnav { display: flex; align-items: flex-end; gap: 4px 16px; flex-wrap: wrap; min-width: 0; }
.tabs { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; }
.tab { appearance: none; border: 0; background: none; padding: 10px 12px 14px; font-weight: 700; font-size: .95rem; color: var(--ink-2); position: relative; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 5px; background: var(--tape); transform: skewX(-20deg); border-radius: 1px; }
@media (max-width: 520px) { .tab { padding: 10px 8px 12px; font-size: .88rem; } .tab[aria-current="page"]::after { left: 4px; right: 4px; } }
.who { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; font-size: .85rem; color: var(--ink-2); }
.who b { color: var(--ink); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); }
.role.admin { background: var(--tape-soft); color: var(--tape); }

/* ---------- Genéricos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.tape { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.btn.tape:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: .85rem; }
.btn.danger { color: var(--bad); }
.btn.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 34px; padding: 0; }
.grow { flex: 1; }
.muted { color: var(--ink-2); }
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.label { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.hint { font-weight: 400; letter-spacing: 0; text-transform: none; }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--tape-soft); color: var(--tape); vertical-align: 2px; }
.h-page { font-family: var(--font-display); font-stretch: 118%; font-weight: 820; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.015em; line-height: 1.1; text-wrap: balance; }
.h-sec { font-family: var(--font-display); font-stretch: 110%; font-weight: 780; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; }
.count { font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--ink-2); background: var(--surface-2); padding: 1px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.count:empty { display: none; }
.lede { color: var(--ink-2); max-width: 64ch; margin-top: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); color: var(--ink-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.st-activo { color: var(--ok); }
.status.st-pausa { color: var(--warn); }
.status.st-alta, .status.st-off { color: var(--ink-2); }
.notice { margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: var(--tape-soft); font-size: .9rem; }

input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.field .help { font-size: .82rem; color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-err { color: var(--bad); font-size: .9rem; font-weight: 700; }
.form-ok { color: var(--ok); font-size: .9rem; font-weight: 700; }

/* ---------- Acceso ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { width: min(420px, 100%); display: grid; gap: 22px; }
.auth-card .brand { padding: 0; }
.auth-card .brand-name { font-size: 1.6rem; }
.auth-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.auth-box h1 { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.3rem; }
.auth-foot { font-size: .85rem; color: var(--ink-2); text-align: center; }

/* ---------- Pacientes ---------- */
.pv { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.plist { display: grid; gap: 12px; min-width: 0; }
.plist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 4px 10px; font-size: .8rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.chip span { font-weight: 400; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pitems { list-style: none; display: grid; gap: 2px; }
.pitem { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; }
.pitem:hover { background: var(--surface-2); }
.pitem[aria-current="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.pi-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-st { width: 9px; height: 9px; border-radius: 50%; justify-self: end; }
.pi-st.st-activo { background: var(--ok); }
.pi-st.st-pausa { background: var(--warn); }
.pi-st.st-alta { background: var(--line); }
.pi-dx { font-size: .85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-meta { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; justify-self: end; }
.list-empty { padding: 14px 12px; color: var(--ink-2); font-size: .9rem; }

.pdetail { min-width: 0; display: grid; gap: 26px; }
.back { display: none; justify-self: start; margin-left: -8px; }
.banner { padding: 10px 14px; border-radius: 10px; background: var(--tape-soft); font-size: .9rem; }
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; flex-wrap: wrap; }
.pd-id { display: grid; gap: 6px; min-width: 0; flex: 1 1 320px; }
.pd-name { font-family: var(--font-display); font-stretch: 120%; font-weight: 850; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; overflow-wrap: anywhere; }
.pd-dx { font-size: 1.05rem; }
.pd-meta { font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.pd-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-block: 1px solid var(--line); }
.fact { padding: 14px 18px 16px 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--line); }
.fact-v { font-family: var(--font-display); font-stretch: 108%; font-weight: 720; font-size: 1.1rem; line-height: 1.25; }
.fact-s { font-size: .85rem; color: var(--ink-2); }
@media (max-width: 640px) { .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

.eva { display: grid; gap: 6px; }
.eva-cells { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; max-width: 260px; }
.eva-cell { height: 18px; border-radius: 3px; background: var(--surface-2); font-size: .62rem; font-weight: 700; color: var(--ink-2); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.eva-cell.on.lo { background: var(--ok); color: var(--surface); }
.eva-cell.on.mid { background: var(--warn); color: var(--surface); }
.eva-cell.on.hi { background: var(--bad); color: var(--surface); }
.eva-cell.start { outline: 2px dashed var(--ink-2); outline-offset: 1px; }
.eva-sum { font-size: .85rem; color: var(--ink-2); }
.eva-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }

.notes2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.notes2 section { display: grid; gap: 6px; align-content: start; min-width: 0; }
.prose { white-space: pre-line; max-width: 65ch; overflow-wrap: anywhere; }

.share { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.share-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-link code { flex: 1 1 260px; min-width: 0; font-size: .82rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; user-select: all; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.routine { display: grid; gap: 14px; }
.hint-row { font-size: .88rem; color: var(--ink-2); padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.linklike { color: var(--primary); font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.rx-list { list-style: none; display: grid; gap: 12px; }
.rx { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 16px; }
@media (max-width: 680px) { .rx { grid-template-columns: minmax(0, 1fr); } }
.media { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.media video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.media-empty { width: 100%; height: 100%; display: grid; place-content: center; gap: 2px; text-align: center; border: 1.5px dashed var(--line); border-radius: 9px; background: transparent; color: var(--ink-2); font-size: .85rem; cursor: pointer; padding: 8px; }
.media-empty strong { color: var(--primary); }
div.media-empty { cursor: default; }
.media-link { width: 100%; height: 100%; display: grid; place-content: center; gap: 4px; text-align: center; text-decoration: none; color: var(--ink); background: var(--surface-2); padding: 8px; }
.media-link small { color: var(--ink-2); font-size: .78rem; }
.yt-lite { width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; position: relative; display: grid; place-items: center; }
.yt-lite .play { margin: 0; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.yt-lite small { position: absolute; left: 8px; bottom: 8px; font-size: .72rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 99px; }
.media iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-buscador { display: grid; gap: 10px; margin-top: 6px; }
.yt-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.yt-item { display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); min-width: 0; }
.yt-item.elegido { border-color: var(--tape); box-shadow: 0 0 0 2px var(--tape); }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 7px; overflow: hidden; background: #000 center / cover no-repeat; display: grid; place-items: center; cursor: pointer; }
.yt-thumb iframe { width: 100%; height: 100%; border: 0; }
.yt-thumb .play { width: 34px; height: 34px; margin: 0; }
.yt-dur { position: absolute; right: 6px; bottom: 6px; font-size: .7rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.75); padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.yt-item .help { font-size: .78rem; color: var(--ink-2); }
.yt-tit { font-size: .85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-aviso { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.play { width: 44px; height: 44px; border-radius: 50%; background: var(--tape); color: var(--tape-ink); display: grid; place-items: center; margin: 0 auto 4px; }
.play svg { width: 18px; height: 18px; margin-left: 2px; }
.rx-body { display: grid; gap: 10px; align-content: start; min-width: 0; }
.rx-title { display: flex; align-items: flex-start; gap: 10px; }
.rx-num { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; margin-top: 1px; background: var(--tape); color: var(--tape-ink); transform: skewX(-14deg); border-radius: 3px; font: 800 .85rem var(--font-display); font-variant-numeric: tabular-nums; }
.rx-num > span { transform: skewX(14deg); }
.rx-name { font-family: var(--font-display); font-stretch: 108%; font-weight: 750; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.rx-region { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.dose { display: flex; flex-wrap: wrap; gap: 6px; }
.dose > span { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 7px; padding: 4px 9px; font-size: .86rem; font-variant-numeric: tabular-nums; }
.dose b { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; }
.sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); flex: none; display: inline-block; }
.rx-note { font-size: .9rem; border-left: 3px solid var(--tape); padding-left: 10px; overflow-wrap: anywhere; }
.rx-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-left: -6px; }
.steps { padding-left: 1.3em; display: grid; gap: 4px; }
.caution { font-size: .86rem; padding: 8px 10px; border-radius: 8px; background: var(--tape-soft); }

.empty { padding: 28px; border: 1.5px dashed var(--line); border-radius: 14px; display: grid; gap: 10px; justify-items: start; }
.empty h2, .empty h3 { font-family: var(--font-display); font-stretch: 110%; font-weight: 780; font-size: 1.15rem; }
.empty p { color: var(--ink-2); max-width: 58ch; }

@media (max-width: 820px) {
  .pv { grid-template-columns: minmax(0, 1fr); }
  .pv.has-sel .plist { display: none; }
  .pv:not(.has-sel) .pdetail { display: none; }
  .back { display: inline-flex; }
}

/* ---------- Biblioteca ---------- */
.lib { margin-top: 26px; display: grid; gap: 18px; }
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lib-head > div { min-width: 0; }
.lib-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lib-tools input { flex: 1 1 220px; max-width: 340px; }
.lib-tools select { flex: 0 1 200px; width: auto; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.excard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; }
.excard .media { border-radius: 0; }
.ex-body { padding: 14px 16px 16px; display: grid; gap: 8px; min-width: 0; }
.ex-name { font-family: var(--font-display); font-stretch: 108%; font-weight: 760; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.ex-goal { font-size: .9rem; color: var(--ink-2); }
.excard details { font-size: .9rem; }
.excard summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.excard .steps { margin-top: 8px; }
.excard .caution { margin-top: 8px; }
.ex-ref { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ex-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.gen { color: var(--primary); }
.badge.ia { color: var(--tape); background: var(--tape-soft); }
.badge.bad { color: var(--bad); }

/* ---------- Videos con IA ---------- */
.ia-box { display: grid; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line); }
.ia-box .vid-current video { max-height: 240px; }
.ia-admin { display: grid; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ia-admin .row { gap: 10px; }
.ia-gasto { display: grid; gap: 6px; max-width: 520px; }
.num { font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--tape); border-radius: 99px; }

/* ---------- Panel maestro ---------- */
.admin { margin-top: 26px; display: grid; gap: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.stat b { font-family: var(--font-display); font-stretch: 112%; font-weight: 850; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--ink-2); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--ink-2); font-size: .82rem; overflow-wrap: anywhere; }
td .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
tr.off td { color: var(--ink-2); }
.cred { display: grid; gap: 6px; padding: 14px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; }
.cred code { font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Mi consultorio ---------- */
.settings { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .settings { grid-template-columns: minmax(0, 1fr); } }
.sform { display: grid; gap: 16px; margin-top: 20px; }
.form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.side-box h2 { font-family: var(--font-display); font-stretch: 110%; font-weight: 780; font-size: 1.1rem; }
.side-box ol { padding-left: 1.2em; display: grid; gap: 8px; font-size: .92rem; }

/* ---------- Diálogos ---------- */
dialog { position: fixed; inset: 0; margin: auto; z-index: 60; height: -webkit-fit-content; height: fit-content; border: 0; border-radius: 16px; padding: 0; width: min(660px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(8, 18, 16, .5); }
.dlg-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; flex: 1; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.dlg-head h2 { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.dlg-head p { color: var(--ink-2); font-size: .9rem; margin-top: 2px; }
.x { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; flex: none; color: var(--ink); }
.dlg-body { padding: 14px 20px 18px; display: grid; gap: 14px; align-content: start; overflow: auto; min-height: 0; }
.dlg-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); }
.upload-state { font-size: .88rem; color: var(--ink-2); }
.vid-current { display: grid; gap: 8px; }
.vid-current video { width: 100%; max-height: 220px; border-radius: 9px; background: #000; }
.radios { display: flex; flex-wrap: wrap; gap: 6px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: .85rem; cursor: pointer; position: relative; }
.radios input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.radios label.sel, .radios label:has(input:checked) { border-color: var(--ink); background: var(--surface-2); font-weight: 700; }
.radios label:has(input:focus-visible) { outline: 2px solid var(--tape); outline-offset: 2px; }
.pick-list { list-style: none; display: grid; gap: 4px; max-height: 46dvh; overflow: auto; }
.pick { width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.pick:hover { border-color: var(--ink-2); }
.pick b { overflow-wrap: anywhere; }
.pick small { color: var(--ink-2); grid-column: 1; }
.pick .badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* ---------- Avisos ---------- */
#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); animation: tin .2s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.loading { margin-top: 40px; display: grid; gap: 10px; color: var(--ink-2); }
.bar { height: 12px; border-radius: 6px; background: var(--surface-2); }

/* ---------- Página pública de rutina ---------- */
.pub { max-width: 820px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 64px; display: grid; gap: 24px; }
.pub-head { display: grid; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pub-hello { font-family: var(--font-display); font-stretch: 120%; font-weight: 850; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); letter-spacing: -.02em; line-height: 1.05; }
.pub .rx { grid-template-columns: minmax(0, 1fr); }
.pub-contact { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Versión Coach: formularios con dos modos y plan por días ---------- */
.dlg-form.es-gym .solo-rehab, .dlg-form:not(.es-gym) .solo-gym { display: none !important; }
.dlg-form div.solo-rehab:not(.field):not(.grid2), .dlg-form div.solo-gym:not(.field):not(.grid2) { display: grid; gap: 14px; }
.dia { display: grid; gap: 10px; }
.dia + .dia { margin-top: 18px; }
.dia-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-stretch: 105%; font-weight: 760; font-size: 1rem; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border-left: 4px solid var(--tape); }
.dia-head .count { margin-left: auto; background: var(--surface); }
.pub .dia-head { margin-top: 6px; }

/* ---------- Ventanas: respaldo sin <dialog>, y bloqueo del fondo ---------- */
dialog:not([open]) { display: none; }
body.modal-abierto { overflow: hidden; }
body.modal-manual::before { content: ""; position: fixed; inset: 0; z-index: 59; background: rgba(8, 18, 16, .5); }
.x { width: 40px; height: 40px; }

/* ---------- "Más datos (opcional)" en los formularios ---------- */
details.mas { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details.mas > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; font-weight: 700; }
details.mas > summary::-webkit-details-marker { display: none; }
details.mas > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
details.mas[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
details.mas .hint { font-weight: 400; color: var(--ink-2); }
.mas-body { display: grid; gap: 14px; padding: 4px 14px 16px; }

/* ---------- Navegación inferior (celular), como en la app ---------- */
.bottomnav { display: none; }
.bnav { appearance: none; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border-radius: 12px; font: inherit; font-size: .74rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.bnav svg { width: 24px; height: 24px; }
.bnav[aria-current="page"] { color: var(--primary); background: var(--surface-2); }

@media (max-width: 820px) {
  .tabs { display: none; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 20px rgba(19, 35, 32, .06); }
  .shell { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .topbar { flex-wrap: nowrap; align-items: center; padding-block: max(10px, env(safe-area-inset-top, 0px)) 10px; }
  .brand { padding-bottom: 0; gap: 10px; }
  .brand-name { font-size: 1.12rem; }
  .topnav { align-items: center; }
  .who { padding-bottom: 0; }
  .who b, .who .role { display: none; }
  #toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .btn { min-height: 44px; }
  input, select, textarea { min-height: 46px; }
  textarea { min-height: 90px; }
}

/* ---------- Celular: las ventanas ocupan toda la pantalla ---------- */
@media (max-width: 640px) {
  dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border-radius: 0; margin: 0; inset: 0; }
  .dlg-form { height: 100%; }
  .dlg-head { padding: max(14px, env(safe-area-inset-top, 0px)) 16px 8px; border-bottom: 1px solid var(--line); align-items: center; }
  .dlg-body { padding: 16px; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .dlg-foot { padding: 10px 16px max(12px, env(safe-area-inset-bottom, 0px)); flex-wrap: nowrap; }
  .dlg-foot .btn { flex: 1 1 auto; min-height: 50px; }
  .dlg-foot .grow { display: none; }
  .radios label { padding: 10px 14px; font-size: .95rem; }
}


/* =====================================================================
   MIOFORZ
   ===================================================================== */
.aviso-sql { margin: 0; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--tape-soft); color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--line); }

/* Casillas */
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; line-height: 1.35; }
.check input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--primary); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks .check { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px 6px 9px; background: var(--bg); font-size: .85rem; min-height: 38px; }
.checks .check:has(input:checked) { border-color: var(--primary); background: var(--surface-2); font-weight: 700; }
.checks .check input { width: 16px; height: 16px; }

/* Biblioteca: GIF, carpetas, filtros */
.media.gif { background: #fff; }
.media.gif img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gif-prev { width: 100%; max-width: 240px; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
.carpetas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.carpetas .label { margin-right: 2px; }
.chip.carpeta::before { content: ""; display: inline-block; width: 11px; height: 8px; border-radius: 2px 2px 1px 1px; background: currentColor; opacity: .55; margin-right: 6px; }
.chip.nueva { border-style: dashed; color: var(--primary); }
#exfiltros:empty { display: none; }
.gl-lista { list-style: none; max-height: 38vh; overflow: auto; display: grid; gap: 3px; font-size: .85rem; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.gl-lista li.no { color: var(--bad); }
.gl-lista small { color: var(--ink-2); }

/* Lista de usuarios: alertas */
.pi-alertas { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; }
.alerta { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.alerta.dolor { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.alerta.inactivo { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.alerta.dolor::before, .alerta.inactivo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Rutina: herramientas, balance muscular, progreso */
.rt-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.rt-tools:empty { display: none; }
.balance { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.bar-row:first-child .bar-track i { background: var(--tape); }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.balance-notas { list-style: none; display: grid; gap: 4px; font-size: .86rem; color: var(--warn); }
.balance-notas li::before { content: "⚠ "; }
.progreso-pro { display: grid; gap: 12px; }
.progreso-pro .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sesiones { list-style: none; display: grid; gap: 10px; }
.sesiones > li { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ses-ej { list-style: none; display: grid; gap: 2px; font-size: .88rem; }
.ses-ej li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* Opciones para elegir (rutinas, usuarios) */
.sel-opt { grid-template-columns: minmax(0, 1fr); position: relative; }
.sel-opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.sel-opt.sel, .sel-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); background: var(--surface); }
.sel-opt:has(input:focus-visible) { outline: 2px solid var(--tape); outline-offset: 2px; }

/* Planes */
.plan-box { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.uso { display: grid; gap: 4px; font-size: .88rem; }
.uso-top { display: flex; justify-content: space-between; gap: 8px; }
.meter.lleno > i { background: var(--bad); }
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan-card { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.plan-card h3 { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.1rem; }
.plan-card .precio { font-family: var(--font-display); font-stretch: 115%; font-weight: 850; font-size: 1.7rem; line-height: 1.1; }
.plan-card .precio small { font-family: var(--font-body); font-size: .85rem; font-weight: 400; color: var(--ink-2); }
.plan-card ul { list-style: none; display: grid; gap: 6px; font-size: .9rem; }
.plan-card li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 8px; }
.plan-card.destacado { border: 2px solid var(--tape); background: var(--surface); }
.planes-admin summary { cursor: pointer; }

/* Colores de la marca */
.tema-form { padding-top: 20px; border-top: 1px solid var(--line); }
.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.tema-opt { display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: .82rem; font-weight: 700; position: relative; text-align: center; }
.tema-opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }

.tema-opt.sel, .tema-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.tema-opt:has(input:focus-visible) { outline: 2px solid var(--tape); outline-offset: 2px; }
input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }

/* =====================================================================
   PÁGINA DEL USUARIO (rutina.html): la marca de su profesional
   ===================================================================== */
.monograma { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: var(--primary-ink); font: 850 1rem/1 var(--font-display); font-stretch: 115%; letter-spacing: .02em; position: relative; overflow: hidden; }
.monograma::after { content: ""; position: absolute; right: -6px; bottom: 6px; width: 26px; height: 7px; border-radius: 4px; background: var(--tape); transform: rotate(-35deg); opacity: .95; }
.monograma.vacio { background: var(--surface-2); }
.monograma.vacio::after { display: none; }
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; }
.marca-n { font-family: var(--font-display); font-stretch: 118%; font-weight: 850; font-size: 1.15rem; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.marca-s { font-size: .85rem; color: var(--ink-2); }
.marca.grande { flex-direction: column; text-align: center; gap: 16px; }
.marca.grande .monograma { width: 84px; height: 84px; border-radius: 26px; font-size: 1.9rem; }
.marca.grande .monograma::after { width: 50px; height: 12px; border-radius: 6px; right: -10px; bottom: 12px; }
.marca.grande .marca-n { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); }
.marca.grande .marca-s { font-size: 1rem; }

.splash-on { min-height: 100vh; min-height: 100dvh; place-content: center; }
.splash { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 24px 8px; animation: aparecer .4s ease-out both; }
.splash-txt { color: var(--ink-2); font-size: 1rem; }
.splash-bar { width: 160px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.splash-bar i { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--tape); animation: cargando 1.1s ease-in-out infinite; }
@keyframes cargando { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.con-mioforz { font-size: .78rem; color: var(--ink-2); letter-spacing: .02em; }
.con-mioforz b { font-family: var(--font-display); font-stretch: 120%; font-weight: 850; color: var(--ink); }

.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: env(safe-area-inset-top, 0px); }
.pub-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); padding-top: 8px; }
.pub-entra { animation: aparecer .35s ease-out both; }

.gate { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.gate .check { font-size: .95rem; align-items: flex-start; }
.gate .check input { margin-top: 2px; }

.pg-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 16px; background: var(--primary); color: var(--primary-ink); }
.pg-stat { display: grid; gap: 2px; align-content: start; text-align: center; padding: 4px 2px; }
.pg-stat b { font-family: var(--font-display); font-stretch: 115%; font-weight: 850; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pg-stat b small { font-size: .9rem; font-weight: 700; opacity: .8; }
.pg-stat span { font-size: .78rem; opacity: .85; line-height: 1.25; }
.pg-dots { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.pg-dots i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .28; }
.pg-dots i.on { opacity: 1; background: var(--tape); box-shadow: 0 0 0 1.5px var(--primary-ink); }
.pg-off { grid-template-columns: minmax(0, 1fr); text-align: left; gap: 10px; }
.pg-off .btn { justify-self: start; }
.pg-alerta { font-size: .92rem; padding: 10px 14px; border-radius: 12px; background: var(--tape-soft); border-left: 4px solid var(--tape); }
.pg-alerta.suave { background: var(--surface-2); border-left-color: var(--primary); }

.dias-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.dias-tabs::-webkit-scrollbar { display: none; }
.dia-tab { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; min-height: 42px; font-weight: 700; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.dia-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.dia-tab small { font-weight: 400; opacity: .8; margin-left: 4px; }

.pub .rx.hecho { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.log { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding-top: 4px; }
.log-check { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px 0 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; cursor: pointer; }
.log-check .caja { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); color: transparent; font-weight: 900; font-size: .9rem; }
.log-check[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.log-check[aria-pressed="true"] .caja { background: var(--ok); border-color: var(--ok); color: #fff; }
.log-f { display: grid; gap: 2px; font-size: .75rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; flex: 1 1 96px; max-width: 150px; }
.log-f input { min-height: 46px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ver-video { justify-self: start; }

.fin-bar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px max(10px, env(safe-area-inset-bottom, 0px)); margin: 0 -16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(19, 35, 32, .08); }
.fin-bar .btn { min-height: 50px; padding: 0 20px; font-size: 1rem; }
.fin-n { font-size: .9rem; color: var(--ink-2); }
.fin-n b { color: var(--ink); font-size: 1.1rem; }

.hoja-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(10, 20, 18, .45); display: grid; align-items: end; justify-items: center; animation: aparecer .2s ease-out both; }
.hoja { width: min(560px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px max(18px, env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; box-shadow: var(--shadow); }
@media (min-width: 641px) { .hoja-fondo { align-items: center; } .hoja { border-radius: 20px; } }
.hoja h2 { font-family: var(--font-display); font-stretch: 115%; font-weight: 850; font-size: 1.4rem; }
.escala { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 6px; }
.escala label { position: relative; display: grid; place-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; background: var(--bg); }
.escala input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.escala label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.escala label:has(input:focus-visible) { outline: 2px solid var(--tape); outline-offset: 2px; }
.escala-ext { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-2); margin-top: -6px; }
.hoja-botones { display: flex; gap: 8px; }
.hoja-botones .btn { flex: 1; min-height: 50px; }

.felicita { text-align: center; justify-items: center; }
.felicita .sello { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--tape); color: var(--tape-ink); animation: sello .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.felicita .sello svg { width: 44px; height: 44px; }
.felicita p { color: var(--ink-2); font-size: 1.02rem; max-width: 36ch; }
@keyframes sello { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Clips cortos (IA o Flow) que se ven como GIF, y estilo de los videos */
.media.gif video { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.estilo-ia summary { cursor: pointer; }
.estilo-ia[open] { display: grid; gap: 10px; }
.estilo-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.estilo-slot { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.estilo-prev { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; background: var(--surface-2); }
.estilo-slot .btn input[hidden] { display: none; }


/* =====================================================================
   MIOFORZ 2 · marca, configuración, perfil, variantes y app de clientes
   ===================================================================== */
/* Marca: logo + MIOFORZ */
.wordmark { font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: 1.35rem; letter-spacing: .03em; line-height: 1; text-transform: uppercase;
  background: linear-gradient(100deg, var(--primary) 0%, var(--primary) 45%, var(--tape) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-block: .08em; }
.brand .logo { height: calc(34px * var(--logo-escala, 1)); width: auto; max-width: calc(120px * var(--logo-escala, 1)); object-fit: contain; flex: none; }
.brand.grande { flex-direction: column; gap: 14px; text-align: center; justify-content: center; }
.brand.grande .logo { height: calc(88px * var(--logo-escala, 1)); max-width: min(calc(220px * var(--logo-escala, 1)), 80vw); }
.brand.grande .mark { width: 46px; height: 46px; }
.brand.grande .mark::before, .brand.grande .mark::after { width: 52px; height: 15px; border-radius: 8px; }
.brand.grande .wordmark { font-size: clamp(2.6rem, 1.8rem + 4vw, 3.6rem); letter-spacing: .02em; }
.auth-card { width: min(440px, 100%); }
.auth-card .brand { padding: 0; }
.quien { display: grid; gap: 10px; }
.quien-op { display: grid; gap: 4px; text-align: left; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; font: inherit; color: var(--ink); }
.quien-op b { font-family: var(--font-display); font-stretch: 110%; font-size: 1.1rem; }
.quien-op span { color: var(--ink-2); font-size: .9rem; }
.quien-op:hover:not(:disabled) { border-color: var(--primary); }
.quien-op:disabled { opacity: .55; cursor: not-allowed; }

/* Configuración */
.cfg { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.cfg-menu { position: sticky; top: 12px; display: grid; gap: 10px; }
.cfg-menu ul { list-style: none; display: grid; gap: 2px; margin-top: 6px; }
.cfg-item { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink); font: inherit; }
.cfg-item svg { width: 22px; height: 22px; color: var(--ink-2); }
.cfg-item b { display: block; font-size: .95rem; }
.cfg-item small { display: block; color: var(--ink-2); font-size: .8rem; }
.cfg-item i { color: var(--ink-2); font-style: normal; font-size: 1.2rem; }
.cfg-item:hover { background: var(--surface-2); }
.cfg-item[aria-current="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.cfg-item[aria-current="true"] svg { color: var(--primary); }
.cfg-cont { display: grid; gap: 18px; min-width: 0; }
.cfg-volver { display: none; justify-self: start; }
.cfg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cfg-head p { max-width: 62ch; margin-top: 4px; }
.cfg-titulo { font-family: var(--font-display); font-stretch: 115%; font-weight: 830; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); letter-spacing: -.01em; }
.cfg-sub { font-family: var(--font-display); font-stretch: 108%; font-weight: 760; font-size: 1.05rem; margin-top: 4px; }
.cfg-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cfg-pend { list-style: none; display: grid; gap: 8px; }
.cfg-pend li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cfg-pasos, .cfg-lista { padding-left: 1.2em; display: grid; gap: 6px; font-size: .92rem; }
.tabla-datos th { width: 34%; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink-2); white-space: normal; }
.tabla-datos code { font-size: .82rem; overflow-wrap: anywhere; }
.switch input { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); }
.logo-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logo-prev > div { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 12px; min-height: 90px; }
.logo-prev .logo { height: calc(46px * var(--logo-escala, 1)); max-width: calc(140px * var(--logo-escala, 1)); object-fit: contain; }
.logo-claro { background: #f6f7f7; border: 1px solid #e3e6e5; }
.logo-oscuro { background: #121516; }
.logo-oscuro .wordmark { background: linear-gradient(100deg, #fff, #ffd4e1); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 820px) {
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .cfg-menu { position: static; }
  .cfg.con-sec .cfg-menu { display: none; }
  .cfg-volver { display: inline-flex; }
  .cfg-item { padding: 14px 12px; background: var(--surface); border-color: var(--line); }
  .cfg-item[aria-current="true"] { box-shadow: none; }
}

/* Mi perfil */
.perfil { margin-top: 24px; display: grid; gap: 20px; }
.perfil-head .monograma { width: 60px; height: 60px; border-radius: 18px; font-size: 1.35rem; }
.perfil-head .marca { gap: 16px; }
.perfil-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.perfil-col { display: grid; gap: 20px; min-width: 0; }
.card { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.card-t { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.15rem; }
.card .sform { margin-top: 4px; }
.card ol { padding-left: 1.2em; display: grid; gap: 8px; font-size: .92rem; }
@media (max-width: 900px) { .perfil-grid { grid-template-columns: minmax(0, 1fr); } }

/* Editor de colores */
.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tema-opt { padding: 8px 8px 10px; gap: 8px; }
.tema-mini { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 5px; width: 100%; aspect-ratio: 4 / 3; padding: 7px; border-radius: 9px; border: 1px solid; }
.tema-mini i { grid-column: 1 / -1; border-radius: 6px; border: 1px solid; display: grid; align-content: center; gap: 4px; padding: 0 7px; }
.tema-mini s { display: block; height: 4px; border-radius: 4px; text-decoration: none; }
.tema-mini s + s { width: 60%; opacity: .8; }
.tema-mini b { height: 12px; border-radius: 5px; }
.tema-mini em { height: 12px; border-radius: 5px; width: 60%; justify-self: end; }
.tema-propio { display: grid; gap: 12px; padding-top: 6px; }
input[type="color"] { width: 100%; }

/* Biblioteca: variantes */
.variante { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.variante select { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 15px; min-height: 42px; padding: 7px 10px; }
.pick-grupo.abierto > .pick { border-color: var(--primary); }
.pick-list.sub { margin: 4px 0 8px 14px; padding-left: 10px; border-left: 2px solid var(--line); max-height: none; }
.pick-var { background: var(--surface); }
.app-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }

/* App de clientes */
.capp { max-width: 640px; margin: 0 auto; min-height: 100dvh; display: grid; align-content: start; gap: 18px; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.capp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.capp-top .brand { padding: 0; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-ink); font: 850 1rem var(--font-display); cursor: pointer; }
.capp-main { display: grid; gap: 18px; }
.capp-fecha { color: var(--ink-2); font-size: .95rem; margin-bottom: -12px; }
.hoy-card { display: grid; gap: 14px; padding: 20px; border-radius: 24px; background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }
.hoy-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .8rem; }
.hoy-eyebrow { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.hoy-de { opacity: .8; font-size: .85rem; }
.hoy-titulo { font-family: var(--font-display); font-stretch: 115%; font-weight: 850; font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem); letter-spacing: -.02em; line-height: 1.05; }
.hoy-lista { list-style: none; display: grid; gap: 8px; font-size: 1rem; }
.hoy-lista li { display: flex; justify-content: space-between; gap: 10px; }
.hoy-dosis, .hoy-mas { opacity: .8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hoy-btn { min-height: 56px; font-size: 1.05rem; border-radius: 16px; }
.capp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capp-stat { display: grid; gap: 2px; align-content: start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.capp-stat b { font-family: var(--font-display); font-stretch: 112%; font-weight: 850; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.capp-stat b small { font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.capp-stat .muted { font-size: .8rem; }
.capp-stat .pg-dots { justify-content: flex-start; color: var(--ink-2); }
.capp-stat .pg-dots i.on { box-shadow: none; }
.capp-sec { display: grid; gap: 10px; }
.capp-sub { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.capp-lista { list-style: none; display: grid; gap: 8px; }
.capp-fila { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.capp-fila .monograma { width: 42px; height: 42px; border-radius: 13px; font-size: .9rem; }
.capp-fila-txt b { display: block; }
.capp-fila-txt small { display: block; color: var(--ink-2); font-size: .85rem; }
.capp-flecha { color: var(--ink-2); font-size: 1.5rem; }
.capp-pre { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pre-card { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pre-card h4 { font-family: var(--font-display); font-stretch: 110%; font-weight: 800; font-size: 1.1rem; }
.pre-card p { font-size: .9rem; color: var(--ink-2); }
.pre-card .btn, .pre-card .badge { justify-self: start; margin-top: 4px; }
.pre-card.actual { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.volver-app { margin-left: auto; }
@media (max-width: 420px) { .capp-stat b { font-size: 1.4rem; } .capp-stat { padding: 12px 10px; } }

.demo-nota { margin: 0; padding: 4px 14px 0; font-size: .75rem; color: var(--ink-2); }

/* =====================================================================
   MIOFORZ 3 · enchulado: movimiento, botones, logo animado y la app del cliente
   ===================================================================== */
/* Botones con vida */
.btn { transition: transform .14s cubic-bezier(.3,.7,.4,1.4), box-shadow .2s, background-color .2s, border-color .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn.primary { background-image: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 60%); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary) 80%, transparent), inset 0 -1px 0 rgba(0,0,0,.12); }
.btn.tape { background-image: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 60%); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--tape) 85%, transparent), inset 0 -1px 0 rgba(0,0,0,.12); }
@media (hover: hover) {
  .btn.primary:hover, .btn.tape:hover { transform: translateY(-1px); filter: brightness(1.06); }
  .excard, .capp-fila, .pre-card, .atajo, .stat, .cfg-pend li, .ses, .cat { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
  .excard:hover, .capp-fila:hover, .pre-card:hover, .atajo:hover, .ses:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}
.chip, .tab, .bnav, .ctab, .dia-tab, .hoy-dia, .tecla, .cat { transition: background-color .2s, color .2s, transform .12s, border-color .2s; }
.chip:active, .dia-tab:active, .hoy-dia:active, .cat:active { transform: scale(.95); }
.tab[aria-current="page"]::after { animation: subrayar .35s cubic-bezier(.3,.7,.4,1.3) both; transform-origin: left center; }
@keyframes subrayar { from { transform: skewX(-20deg) scaleX(0); } to { transform: skewX(-20deg) scaleX(1); } }
.bnav[aria-current="page"] svg, .ctab[aria-current="page"] svg { animation: brinco .45s cubic-bezier(.3,.7,.4,1.6); }
@keyframes brinco { 0% { transform: scale(.7) translateY(3px); } 100% { transform: none; } }
.toast { animation: tin .35s cubic-bezier(.3,.7,.4,1.3); }
@keyframes tin { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
/* Entradas escalonadas */
.entra > * { animation: aparecer .45s cubic-bezier(.2,.7,.3,1) both; }
.entra > *:nth-child(2) { animation-delay: .05s; } .entra > *:nth-child(3) { animation-delay: .1s; } .entra > *:nth-child(4) { animation-delay: .15s; }
.entra > *:nth-child(5) { animation-delay: .2s; } .entra > *:nth-child(6) { animation-delay: .25s; } .entra > *:nth-child(n+7) { animation-delay: .3s; }
.lib-grid > .excard { animation: aparecer .4s ease-out both; }
.lib-grid > .excard:nth-child(2) { animation-delay: .03s; } .lib-grid > .excard:nth-child(3) { animation-delay: .06s; } .lib-grid > .excard:nth-child(4) { animation-delay: .09s; } .lib-grid > .excard:nth-child(n+5) { animation-delay: .12s; }
.confeti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

/* Logo animado al entrar */
.splash-app { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; }
.sa-marca { width: 92px; height: 92px; display: grid; place-items: center; animation: saCaer .7s cubic-bezier(.3,.7,.3,1.4) both; }
.sa-marca .logo, .sa-logo { max-width: min(calc(120px * var(--logo-escala, 1)), 70vw); max-height: calc(92px * var(--logo-escala, 1)); object-fit: contain; animation: saCaer .6s cubic-bezier(.3,.7,.3,1.4) both; }
.sa-mark { width: 64px; height: 64px; }
.sa-mark::before, .sa-mark::after { width: 74px; height: 21px; border-radius: 11px; }
.sa-mark::before { animation: saCinta1 .8s cubic-bezier(.3,.7,.3,1.2) .1s both; }
.sa-mark::after { animation: saCinta2 .8s cubic-bezier(.3,.7,.3,1.2) .25s both; }
@keyframes saCaer { from { opacity: 0; transform: translateY(-18px) scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes saCinta1 { from { transform: translate(-160%, -50%) rotate(45deg); opacity: 0; } to { transform: translate(-50%, -50%) rotate(45deg); opacity: 1; } }
@keyframes saCinta2 { from { transform: translate(60%, -50%) rotate(-45deg); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-45deg); opacity: .92; } }
.sa-word { display: flex; gap: .02em; font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: clamp(2.6rem, 1.8rem + 4vw, 3.6rem); letter-spacing: .02em; line-height: 1; }
.sa-word span { display: inline-block; color: var(--primary); animation: saLetra .55s cubic-bezier(.3,.7,.3,1.4) both; animation-delay: calc(.35s + var(--i) * .06s); }
.sa-word span:nth-child(n+4) { color: color-mix(in srgb, var(--primary) 40%, var(--tape)); }
.sa-word span:nth-child(n+6) { color: var(--tape); }
@keyframes saLetra { from { opacity: 0; transform: translateY(22px) scale(.8); } to { opacity: 1; transform: none; } }
.sa-msg { color: var(--ink-2); font-size: .92rem; min-height: 1.4em; animation: aparecer .4s ease 1s both; }
.wordmark { background-size: 200% 100%; animation: brillo 6s ease-in-out infinite; }
@keyframes brillo { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* App del cliente: pestañas abajo */
.capp { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.ctabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(10px, env(safe-area-inset-bottom, 0px)); z-index: 40; width: min(460px, calc(100vw - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgba(0,0,0,.25); }
.ctab { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border: 0; border-radius: 16px; background: none; color: var(--ink-2); font: 700 .74rem var(--font-body); cursor: pointer; }
.ctab svg { width: 24px; height: 24px; }
.ctab[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.vista { display: grid; gap: 18px; }

/* Hoy */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sd { display: grid; justify-items: center; gap: 4px; padding: 8px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .75rem; color: var(--ink-2); font-weight: 700; }
.sd b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 800 .85rem var(--font-display); color: var(--ink); }
.sd.hoy { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.sd.hecho b { background: var(--tape); color: var(--tape-ink); animation: sello .5s cubic-bezier(.3,1.6,.5,1) both; }
.hoy-card { position: relative; overflow: hidden; background-image: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.14), transparent 55%); }
.hoy-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 46px; border-radius: 30px; background: var(--tape); opacity: .18; transform: rotate(-35deg); pointer-events: none; }
.hoy-dias { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px -4px 0; padding: 2px 4px; }
.hoy-dias::-webkit-scrollbar { display: none; }
.hoy-dia { flex: none; border: 1px solid rgba(255,255,255,.35); background: transparent; color: inherit; border-radius: 99px; padding: 6px 12px; font: 700 .82rem var(--font-body); cursor: pointer; opacity: .85; }
.hoy-dia[aria-selected="true"] { background: var(--primary-ink); color: var(--primary); opacity: 1; border-color: transparent; }
.hoy-btn svg { width: 20px; height: 20px; }
.atajos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.atajo { display: grid; gap: 4px; align-content: start; text-align: left; padding: 14px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: inherit; cursor: pointer; }
.atajo-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--c); margin-bottom: 4px; }
.atajo-ico svg { width: 20px; height: 20px; }
.atajo b { font: 850 1.25rem/1.1 var(--font-display); font-stretch: 110%; }
.atajo b small { font-size: .78rem; color: var(--ink-2); font-weight: 700; }
.atajo > span:last-of-type { font-size: .78rem; color: var(--ink-2); }
.atajo-barra { display: block; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.atajo-barra i { display: block; height: 100%; background: #F07A4A; border-radius: 99px; animation: llenarAncho .9s ease-out both; }
@keyframes llenarAncho { from { width: 0; } }
.mas-rutinas > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.mas-rutinas > summary::after { content: "›"; transform: rotate(90deg); color: var(--ink-2); font-size: 1.4rem; transition: transform .2s; }
.mas-rutinas[open] > summary::after { transform: rotate(-90deg); }
.mas-rutinas[open] { gap: 10px; }

/* Peso: solo para ti */
.solo-ti { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, color-mix(in srgb, #B48CF2 22%, var(--surface)), color-mix(in srgb, var(--tape) 14%, var(--surface))); border: 1px solid var(--line); }
.solo-ti-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--surface); color: #8B5CF6; box-shadow: var(--shadow); }
.solo-ti-ico svg { width: 22px; height: 22px; }
.solo-ti b { display: block; font-family: var(--font-display); font-stretch: 112%; font-size: 1.05rem; }
.solo-ti span { font-size: .85rem; color: var(--ink-2); }
.candado { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px 8px; }
.candado-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; color: #fff; background: linear-gradient(140deg, #B48CF2, var(--tape)); box-shadow: 0 16px 30px -14px #8B5CF6; animation: flotar 3.5s ease-in-out infinite; }
.candado-ico svg { width: 40px; height: 40px; }
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.candado-t { font-family: var(--font-display); font-stretch: 118%; font-weight: 850; font-size: 1.7rem; letter-spacing: -.01em; }
.candado .muted { max-width: 30ch; }
.pin-puntos { display: flex; gap: 14px; margin: 6px 0; }
.pin-puntos i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-2); transition: background .15s, transform .15s, border-color .15s; }
.pin-puntos i.on { background: var(--primary); border-color: var(--primary); transform: scale(1.15); }
.candado.mal .pin-puntos { animation: temblar .4s; }
@keyframes temblar { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.teclado { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.tecla { height: 64px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 800 1.5rem var(--font-display); cursor: pointer; }
.tecla:active { transform: scale(.92); background: var(--surface-2); }
.peso-hero { display: grid; gap: 4px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.peso-num { display: flex; align-items: baseline; gap: 6px; }
.peso-num b { font: 900 clamp(3rem, 2.4rem + 3vw, 4rem)/1 var(--font-display); font-stretch: 112%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.peso-num span { font: 800 1.2rem var(--font-display); color: var(--ink-2); }
.peso-meta { font-size: .95rem; }
.peso-vacio { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.4rem; }
.peso-form { display: grid; gap: 8px; }
.peso-form > label { font-weight: 700; }
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 56px; align-items: center; gap: 8px; }
.stepper input { text-align: center; font: 850 1.6rem var(--font-display); min-height: 56px; }
.stepper span { color: var(--ink-2); font-weight: 700; }
.paso { height: 56px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font: 800 1.6rem var(--font-display); color: var(--ink); cursor: pointer; }
.paso:active { transform: scale(.92); }
.peso-form .btn { min-height: 52px; }
.graf { margin: 0; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.graf svg { width: 100%; height: auto; display: block; overflow: visible; }
.graf-linea { fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: dibujar 1.2s ease-out .1s forwards; }
@keyframes dibujar { to { stroke-dashoffset: 0; } }
.graf-punto { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.graf-meta { stroke: var(--tape); stroke-width: 1.5; stroke-dasharray: 5 5; }
.graf-txt { font-size: 10px; fill: var(--ink-2); font-family: var(--font-body); }
.hist { list-style: none; display: grid; gap: 2px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 4px 6px; }
.hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hist li:last-child { border-bottom: 0; }
.icon-mini { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.icon-mini svg { width: 16px; height: 16px; }
.icon-mini:hover { background: var(--surface-2); }
.icon-mini.armado { background: var(--bad); color: #fff; }
.icon-mini.grande { width: 42px; height: 42px; font-size: 1.5rem; border: 1px solid var(--line); background: var(--surface); }
.icon-mini:disabled { opacity: .35; cursor: default; }
.ajustes { display: grid; gap: 10px; }
.ajuste { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }

/* Comida */
.fecha-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fecha-nav b { font-family: var(--font-display); font-stretch: 112%; font-size: 1.15rem; }
.kcal-hero { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.anillo { width: 150px; height: 150px; transform: rotate(-90deg); grid-row: 1; grid-column: 1; }
.anillo-fondo { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.anillo-valor { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; animation: anilloLlenar 1.1s cubic-bezier(.3,.7,.3,1) both; }
.anillo-valor.pasado { stroke: var(--tape); }
@keyframes anilloLlenar { from { stroke-dashoffset: var(--L); } }
.kcal-centro { grid-row: 1; grid-column: 1; align-self: center; justify-self: center; display: grid; justify-items: center; text-align: center; }
.kcal-centro b { font: 900 1.9rem/1 var(--font-display); font-stretch: 110%; font-variant-numeric: tabular-nums; }
.kcal-centro span { font-size: .78rem; color: var(--ink-2); }
.kcal-lado { display: grid; gap: 10px; }
.kcal-resto { font-size: 1rem; }
.kcal-resto b { font-family: var(--font-display); font-size: 1.2rem; }
.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.macros span { display: grid; padding: 8px; border-radius: 12px; background: var(--surface-2); font-size: .72rem; color: var(--ink-2); }
.macros b { font: 800 .98rem var(--font-display); color: var(--ink); }
.kcal-lado .btn { justify-self: start; }
.momento { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.momento-h { display: flex; align-items: center; gap: 10px; }
.momento-h h3 { font-family: var(--font-display); font-stretch: 110%; font-weight: 800; font-size: 1.05rem; }
.momento-h .btn { margin-left: auto; }
.momento-h .btn svg { width: 16px; height: 16px; }
.items { list-style: none; display: grid; gap: 2px; }
.items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.it-n b { display: block; font-size: .95rem; }
.it-n small { color: var(--ink-2); font-size: .8rem; }
.it-k { font: 800 1rem var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.it-k small { font-size: .7rem; color: var(--ink-2); }
.nota-chica { font-size: .78rem; }
.agr { display: grid; gap: 10px; }
.agr-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.agr-cats::-webkit-scrollbar { display: none; }
.agr-cats .chip { flex: none; }
.agr-lista { list-style: none; display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.agr-it { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.agr-it b { display: block; }
.agr-it small { color: var(--ink-2); font-size: .8rem; }
.agr-it:active { transform: scale(.98); }
.cant { display: grid; gap: 12px; }
.cant .radios label { min-width: 52px; justify-content: center; font-size: 1rem; padding: 10px 14px; }
.cant-total { text-align: center; font-size: 1rem; color: var(--ink-2); }
.cant-total b { font: 900 2.2rem var(--font-display); color: var(--ink); }
.hoja.alta { max-height: 94vh; max-height: 94dvh; }
.hoja-asa { justify-self: center; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: -8px 0 2px; }
.hoja { animation: subirHoja .32s cubic-bezier(.2,.8,.3,1) both; }
@keyframes subirHoja { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Calma */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cat { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 74px; padding: 12px; border-radius: 18px; border: 0; cursor: pointer; text-align: left; font: 800 .98rem var(--font-display); font-stretch: 108%; color: #fff;
  background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
.cat::before { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.18); }
.cat[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); transform: translateY(-2px); }
.cat span { position: relative; }
.cat-sec { padding: 16px; border-radius: 22px; background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); }
.sesiones-c { list-style: none; display: grid; gap: 8px; }
.ses { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ses-play { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 8px 16px -10px var(--c); }
.ses-play svg { width: 20px; height: 20px; margin-left: 2px; }
.ses-mini { width: 76px; height: 46px; object-fit: cover; border-radius: 10px; }
.ses-txt b { display: block; }
.ses-txt small { color: var(--ink-2); font-size: .82rem; }
/* Reproductor */
.cp-fondo { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--cp) 55%, #0b0f14), #0b0f14 70%); color: #fff; animation: aparecer .35s ease both; }
.cp { width: min(460px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center; }
.cp-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.cp-cat { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.cp-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; cursor: pointer; }
.cp-titulo { font-family: var(--font-display); font-stretch: 115%; font-weight: 850; font-size: 1.6rem; }
.cp-orbe { position: relative; width: 230px; height: 230px; display: grid; place-items: center; margin: 10px 0; }
.cp-circulo { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), var(--cp) 55%, color-mix(in srgb, var(--cp) 60%, #000)); box-shadow: 0 0 60px -6px var(--cp); transform: scale(.55); transition-property: transform; transition-timing-function: ease-in-out; }
.cp-halo { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); animation: halo 4s ease-in-out infinite; }
@keyframes halo { 0%, 100% { transform: scale(.85); opacity: .3; } 50% { transform: scale(1.02); opacity: .7; } }
.cp-orbe.libre .cp-circulo { animation: respirarLibre 10s ease-in-out infinite; }
@keyframes respirarLibre { 0%, 100% { transform: scale(.6); } 50% { transform: scale(.9); } }
.cp-fase { font: 800 1.3rem var(--font-display); min-height: 1.6em; }
.cp-texto { max-width: 36ch; min-height: 4.5em; font-size: 1.05rem; line-height: 1.5; opacity: .92; }
.cp-texto.nueva { animation: aparecer .6s ease both; }
.cp-barra { width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.cp-barra i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; transition: width .25s linear; }
.cp-tiempos { width: 100%; display: flex; justify-content: space-between; font-size: .8rem; opacity: .75; font-variant-numeric: tabular-nums; }
.cp-play { width: 76px; height: 76px; border-radius: 50%; border: 0; background: #fff; color: #0b0f14; cursor: pointer; display: grid; place-items: center; box-shadow: 0 12px 30px -10px var(--cp); }
.cp-play svg { width: 30px; height: 30px; }
.cp-play:active { transform: scale(.94); }
.cp-opts { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: .9rem; }
.cp-op { display: inline-flex; align-items: center; gap: 8px; }
.cp-op input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: #fff; }
.cp-op select { width: auto; min-height: 38px; padding: 4px 10px; font-size: 15px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.cp-op select option { color: #000; }
.cp-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.cp-video iframe, .cp-video video { width: 100%; height: 100%; border: 0; display: block; }
.cp .btn { color: #0b0f14; }

/* Panel: clientes de la app, días, meditaciones */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg button { border: 0; border-radius: 10px; padding: 8px 6px; background: none; font: 700 .85rem var(--font-body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg .count { background: var(--tape); color: var(--tape-ink); }
.asignar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--tape-soft); border-left: 4px solid var(--tape); }
.asignar p { flex: 1 1 280px; font-size: .92rem; }
.checks-col { display: grid; gap: 6px; }
.elige-dia { margin-bottom: -16px; }
.hoy-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); margin-right: 6px; vertical-align: 1px; }
.med-lista { list-style: none; display: grid; gap: 6px; }
.med-lista li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.med-lista img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.med-ico { display: grid; place-items: center; width: 96px; height: 54px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.med-txt b { display: block; font-size: .92rem; }
.med-txt small { color: var(--ink-2); font-size: .8rem; }
@media (max-width: 560px) { .med-lista li { grid-template-columns: 72px minmax(0, 1fr); } .med-lista img, .med-ico { width: 72px; height: 42px; } .med-lista li .switch, .med-lista li .btn { grid-column: 2; justify-self: start; } }
@media (max-width: 420px) { .kcal-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .kcal-lado .btn { justify-self: center; } .atajos { gap: 6px; } .atajo { padding: 12px 8px; } .teclado { grid-template-columns: repeat(3, 70px); } }
@media (prefers-reduced-motion: reduce) { .wordmark { animation: none; } .graf-linea { stroke-dashoffset: 0; } }
body:has(.ctabs) #toast { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.seg button .count { margin-left: 4px; }


/* =====================================================================
   MIOFORZ 4 · Racha (la flama), voces naturales y más Calma
   ===================================================================== */
.top-der { display: flex; align-items: center; gap: 10px; }
.capp[data-vista="hoy"] .flama.en-top { display: none; }
.hola-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flama { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 850 1.1rem var(--font-display); font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .15s, box-shadow .2s, border-color .2s; }
.flama:active { transform: scale(.94); }
.flama .fl { width: 26px; height: 26px; flex: none; overflow: visible; }
.fl-a { fill: color-mix(in srgb, var(--ink-2) 45%, var(--surface)); }
.fl-b { fill: color-mix(in srgb, var(--ink-2) 20%, var(--surface)); transform-box: fill-box; transform-origin: 50% 100%; }
.fl { transform-origin: 50% 90%; }
.flama.on { color: color-mix(in srgb, #EA580C 75%, var(--ink)); border-color: color-mix(in srgb, #FF8A1F 50%, var(--line)); background: color-mix(in srgb, #FF8A1F 14%, var(--surface)); box-shadow: 0 6px 18px -8px rgba(234, 88, 12, .55); }
.flama.on .fl-a, .ff-flama .fl-a, .rh-flama.on .fl-a, .rd.on .fl-a { fill: #FF6B1A; }
.flama.on .fl-b, .ff-flama .fl-b, .rh-flama.on .fl-b, .rd.on .fl-b { fill: #FFC93C; }
.flama.on .fl, .ff-flama .fl, .rh-flama.on .fl { animation: flamear 1.6s ease-in-out infinite; }
.flama.on .fl-b, .ff-flama .fl-b, .rh-flama.on .fl-b { animation: flamearIn 1.1s ease-in-out infinite; }
@keyframes flamear { 0%, 100% { transform: scale(1) rotate(-2deg); } 25% { transform: scale(1.05, .97) rotate(1.5deg); } 50% { transform: scale(.97, 1.04) rotate(-1deg); } 75% { transform: scale(1.03, .98) rotate(2deg); } }
@keyframes flamearIn { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.14); } }

.flama-fiesta { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: radial-gradient(90% 70% at 50% 40%, rgba(255, 120, 30, .35), rgba(10, 14, 20, .82) 70%); animation: aparecer .3s ease both; }
.ff-caja { width: min(380px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; padding: 26px 22px 22px; margin-top: 50px; border-radius: 28px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); animation: ffEntrar .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ffEntrar { from { transform: translateY(30px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.ff-flama { width: 124px; height: 124px; margin-top: -86px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, #FFB347 16%, var(--surface)) 0 46%, color-mix(in srgb, #FF8A1F 28%, var(--surface)) 47% 100%);
  box-shadow: 0 0 0 8px var(--surface), 0 0 70px 14px rgba(255, 140, 40, .6); animation: ffBrinco .8s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes ffBrinco { from { transform: scale(.2) rotate(-20deg); } to { transform: none; } }
.ff-flama .fl { width: 80px; height: 80px; }
.ff-num { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.ff-num b { font: 900 3.4rem/1 var(--font-display); font-stretch: 120%; color: #EA580C; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ff-num span { font-weight: 700; color: var(--ink-2); }
.ff-caja h2 { font: 850 1.45rem/1.15 var(--font-display); font-stretch: 112%; }
.ff-caja p { color: var(--ink-2); max-width: 30ch; }
.ff-caja .btn { margin-top: 6px; min-width: 170px; }

.racha-hoja { display: grid; justify-items: center; gap: 12px; text-align: center; padding-top: 4px; }
.rh-flama { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.rh-flama.on { background: radial-gradient(circle, color-mix(in srgb, #FFB347 16%, var(--surface)) 0 50%, color-mix(in srgb, #FF8A1F 28%, var(--surface)) 51%); box-shadow: 0 0 40px 4px rgba(255, 140, 40, .45); }
.rh-flama .fl { width: 58px; height: 58px; }
.rh-msg { font-weight: 700; max-width: 32ch; }
.rh-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; max-width: 360px; }
.rd { display: grid; justify-items: center; gap: 4px; padding: 8px 0; border-radius: 12px; background: var(--surface-2); font-size: .75rem; font-weight: 800; color: var(--ink-2); }
.rd .fl { width: 22px; height: 22px; }
.rd.on { background: color-mix(in srgb, #FF8A1F 16%, var(--surface)); color: color-mix(in srgb, #C2410C 75%, var(--ink)); }
.rd.hoy { box-shadow: inset 0 0 0 2px var(--primary); }
.rh-datos { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rh-datos span { display: grid; padding: 10px 18px; border-radius: 14px; background: var(--surface-2); font-size: .8rem; color: var(--ink-2); }
.rh-datos b { font: 850 1.4rem var(--font-display); color: var(--ink); }
.rh-como { font-size: .9rem; max-width: 36ch; }
.racha-hoja .hoja-botones, .racha-hoja .btn.block { width: 100%; }

/* Calma: recomendada para ahora, videos y recomendaciones */
.ahora { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 16px 16px 18px; border: 0; border-radius: 22px; text-align: left; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #0b0f14)); box-shadow: 0 14px 30px -18px var(--c); font: inherit; transition: transform .15s; }
.ahora:active { transform: scale(.98); }
.ahora-txt { display: grid; gap: 2px; min-width: 0; }
.ahora-eti { font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; opacity: .85; }
.ahora b { font: 850 1.25rem/1.15 var(--font-display); font-stretch: 110%; }
.ahora small { opacity: .85; }
.ahora .ses-play { flex: none; width: 52px; height: 52px; background: rgba(255, 255, 255, .22); box-shadow: none; }
.cat-sec .capp-sub { margin: 16px 0 8px; }
.consejos { list-style: none; display: grid; gap: 8px; }
.consejos li { position: relative; padding: 10px 12px 10px 36px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; line-height: 1.45; }
.consejos li::before { content: "✓"; position: absolute; left: 13px; top: 9px; color: var(--c); font-weight: 900; }
.cp-op select[data-cp=voz] { max-width: 210px; }

/* Panel: voces naturales */
.voces { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.voz-op { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.voz-op input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--primary); }
.voz-op b { display: block; font-size: .92rem; }
.voz-op small { color: var(--ink-2); font-size: .78rem; }
.voz-op.sel { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.voz-barra { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.voz-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--tape)); transition: width .4s; }
#voz-prog p { margin-top: 6px; font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .flama .fl, .flama .fl-b, .ff-flama, .ff-flama .fl, .ff-flama .fl-b, .rh-flama .fl, .rh-flama .fl-b, .ff-caja { animation: none !important; } }


/* =====================================================================
   MIOFORZ 5 · Nutrición, composición corporal, en casa, tienda, inicio
   ===================================================================== */
/* Inicio: MIOFORZ × especialista (el especialista, más grande) */
.sa-marca { width: auto; min-width: 92px; height: auto; min-height: 92px; }
.splash-app.co { gap: 10px; }
.splash-app.co .sa-word { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); }
.splash-app.co .sa-marca { min-height: 64px; transform: scale(.82); }
.sa-co { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 92vw; }
.sa-x { font: 300 2rem/1 var(--font-display); color: var(--ink-2); animation: saLetra .5s cubic-bezier(.3,.7,.3,1.4) .75s both; }
.sa-esp { font-family: var(--font-display); font-stretch: 118%; font-weight: 900; font-size: clamp(2.2rem, 1.4rem + 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.02em; color: var(--ink);
  text-wrap: balance; animation: saEsp .8s cubic-bezier(.2,.9,.3,1.15) .9s both; }
.sa-esp-s { color: var(--ink-2); font-size: 1rem; animation: aparecer .5s ease 1.3s both; }
@keyframes saEsp { from { opacity: 0; transform: translateY(18px) scale(.92); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.logo-tam { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.logo-tam label { display: flex; justify-content: space-between; }
.logo-tam input[type=range], .td-tam input[type=range] { width: 100%; accent-color: var(--primary); min-height: 0; padding: 0; }
.logo-tam .row { justify-content: space-between; align-items: center; }

/* Panel · lista con grupos */
.pi-grupo { list-style: none; padding: 10px 4px 2px; font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
dialog:has(.dlg-ancho) { width: min(980px, calc(100vw - 24px)); }
.pick-it { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.pick-it:hover { border-color: var(--primary); }
.pick-it small { color: var(--ink-2); font-size: .82rem; }
.tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Dietas: editor */
.dt-ed { display: grid; gap: 12px; }
.dt-resumen { position: sticky; top: 0; z-index: 3; display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dt-kcal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dt-kcal b { font: 900 2rem/1 var(--font-display); font-stretch: 115%; font-variant-numeric: tabular-nums; }
.dt-kcal span { color: var(--ink-2); }
.dt-kcal em { margin-left: auto; font-style: normal; font-weight: 800; font-size: .82rem; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); }
.dt-kcal em.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.dt-kcal em.arriba { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); }
.dt-barra { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dt-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--tape)); transition: width .3s; }
.dt-macros { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--ink-2); }
.dt-macros b { color: var(--ink); }
.dt-macros span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--m); }
.m-p { --m: #3F8CFF; } .m-c { --m: #F2B84B; } .m-g { --m: #E05C8A; }
.dt-mbar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.dt-mbar i { display: block; height: 100%; background: var(--m); }
.dt-nota-chica { font-size: .76rem; }
.dt-comida { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.dt-c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-c-head h3 { font: 800 1.05rem var(--font-display); font-stretch: 108%; }
.dt-c-head h3 small { font-weight: 600; color: var(--ink-2); font-size: .8rem; margin-left: 6px; }
.dt-titulo { flex: 1 1 180px; min-width: 0; font: 800 1.02rem var(--font-display); border-color: transparent; background: var(--surface-2); }
.dt-hora { width: 84px; min-width: 0; text-align: center; border-color: transparent; background: var(--surface-2); }
.dt-c-k { font-weight: 800; color: var(--ink-2); font-size: .9rem; margin-left: auto; white-space: nowrap; }
.dt-c-mover { display: inline-flex; gap: 2px; }
.dt-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-op { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 99px; padding: 5px 12px; font: 700 .82rem var(--font-body); cursor: pointer; }
.dt-op small { font-weight: 600; opacity: .75; margin-left: 4px; }
.dt-op[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.dt-op.nueva { background: none; border-style: dashed; }
.dt-items { list-style: none; display: grid; gap: 6px; }
.dt-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.dt-item.es-receta { background: color-mix(in srgb, var(--tape) 8%, var(--surface-2)); }
.dt-it-n { min-width: 0; display: grid; }
.dt-it-n b, .dt-it-n .linklike { font-weight: 700; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.dt-it-n small { color: var(--ink-2); font-size: .78rem; }
.dt-cant { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 99px; border: 1px solid var(--line); }
.dt-cant button { width: 28px; height: 28px; border: 0; background: none; font-weight: 800; cursor: pointer; border-radius: 50%; color: var(--ink); }
.dt-cant b { min-width: 26px; text-align: center; font-size: .9rem; }
.dt-cant-ro { color: var(--ink-2); font-size: .85rem; }
.dt-it-k { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt-it-k small { font-weight: 600; color: var(--ink-2); }
.dt-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-c-nota { min-height: 38px; font-size: .9rem; resize: vertical; }
.dt-c-nota-ro { font-size: .88rem; color: var(--ink-2); }
.dt-vacia { font-size: .9rem; }
.dt-mas-comida { justify-self: start; border-style: dashed; }
.dt-pie { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dt-picker { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgba(8, 18, 16, .45); animation: aparecer .2s ease both; }
@media (min-width: 641px) { .dt-picker { place-items: center; } }
.dt-pk { width: min(560px, 100vw); max-height: min(86dvh, 720px); display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 10px; padding: 16px; background: var(--surface); border-radius: 20px 20px 0 0; overflow: hidden; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
@media (min-width: 641px) { .dt-pk { border-radius: 20px; } }
.dt-pk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dt-pk-head .x { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.dt-pk-tabs { display: flex; gap: 6px; }
.dt-pk-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.dt-pk-lista { list-style: none; display: grid; gap: 4px; overflow: auto; min-height: 120px; align-content: start; }
.dt-pk-it { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.dt-pk-it span:first-child { display: grid; min-width: 0; }
.dt-pk-it small { color: var(--ink-2); font-size: .78rem; }
.dt-pk-it.agregado { animation: agregado .6s ease; }
@keyframes agregado { 0% { background: color-mix(in srgb, var(--ok) 30%, var(--surface)); } 100% { background: var(--surface); } }
.dt-pk-tip { font-size: .78rem; }
.dt-pk .receta { overflow: auto; }
.receta { display: grid; gap: 10px; }
.receta-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.receta-meta span { padding: 4px 10px; border-radius: 99px; background: var(--surface-2); font-size: .8rem; font-weight: 700; }
.receta-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.receta h4 { font: 800 .95rem var(--font-display); margin-top: 4px; }
.receta h4 small { font-weight: 600; color: var(--ink-2); }
.receta-ing { list-style: none; display: grid; gap: 4px; }
.receta-ing li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; }
.receta-ing li span:last-child { color: var(--ink-2); text-align: right; }
.receta-pasos { padding-left: 20px; display: grid; gap: 6px; }
.dt-pac, .ib-pac { margin-top: 18px; display: grid; gap: 10px; }
.dt-pac .sec-head .row { gap: 6px; }
.dt-pac-card { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.dt-pac-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dt-pac-top span { color: var(--ink-2); font-weight: 700; }
.dt-pac-lista { list-style: none; display: grid; gap: 4px; font-size: .9rem; }
.dt-pac-lista li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; }
.dt-pac-lista li span { color: var(--ink-2); }
@media (max-width: 560px) { .dt-pac-lista li { grid-template-columns: 1fr; gap: 0; } .dt-item { grid-template-columns: minmax(0, 1fr) auto auto; } .dt-item .icon-mini { grid-column: 3; grid-row: 1; } .dt-item .dt-it-k { grid-column: 2; grid-row: 2; justify-self: end; } }

/* Composición corporal (InBody) */
.ib-card { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ib-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ib-de { color: var(--ink-2); font-size: .82rem; margin-top: 2px; }
.ib-num { display: grid; justify-items: end; line-height: 1; }
.ib-num b { font: 900 2.7rem/1 var(--font-display); font-stretch: 115%; color: var(--z); font-variant-numeric: tabular-nums; }
.ib-num span { font-weight: 800; font-size: .82rem; color: var(--z); margin-top: 4px; }
.ib-barra { position: relative; padding-top: 30px; }
.ib-linea { height: 14px; border-radius: 99px; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.ib-marca { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; animation: ibMarca 1s cubic-bezier(.2,.9,.3,1.2) both; }
.ib-marca b { display: grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--z); color: #fff; font: 900 .85rem var(--font-display); box-shadow: 0 4px 10px -4px var(--z); }
.ib-marca::after { content: ""; width: 4px; height: 22px; margin-top: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.ib-previo { position: absolute; top: 26px; width: 10px; height: 22px; transform: translateX(-50%); border-radius: 3px; border: 2px dashed var(--ink-2); opacity: .55; }
@keyframes ibMarca { from { left: 0; opacity: 0; } }
.ib-zonas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; font-size: .68rem; color: var(--ink-2); text-align: center; }
.ib-zonas span.act { color: var(--z); font-weight: 800; }
.ib-delta { font-weight: 800; font-size: .9rem; color: var(--ink-2); }
.ib-delta.bien { color: var(--ok); } .ib-delta.mal { color: var(--warn); }
.ib-frase { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-left: 4px solid var(--primary); font-weight: 700; font-style: italic; }
.ib-metricas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ib-metricas > div { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.ib-metricas span { font-size: .72rem; color: var(--ink-2); font-weight: 700; }
.ib-metricas b { font: 850 1.15rem var(--font-display); font-variant-numeric: tabular-nums; }
.ib-metricas b small { font-weight: 600; font-size: .7rem; color: var(--ink-2); }
.ib-d { font-size: .74rem; font-weight: 800; color: var(--ink-2); }
.ib-d.bien { color: var(--ok); } .ib-d.mal { color: var(--bad); }
.ib-nota { font-size: .76rem; }
.ib-hist { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ib-hist th, .ib-hist td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ib-hist th { font-size: .74rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.ib-chip { display: inline-block; min-width: 32px; text-align: center; padding: 2px 8px; border-radius: 8px; background: var(--z); color: #fff; font-weight: 800; }
.ib-todo summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.ib-grupo { font: 800 .9rem var(--font-display); margin: 12px 0 6px; }
.ib-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; font-size: .9rem; }
.ib-dl dt { color: var(--ink-2); } .ib-dl dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ib-form { gap: 12px; }
.ib-fs { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; display: grid; gap: 10px; }
.ib-fs legend, .ib-fs summary { font-weight: 800; padding: 0 6px; }
details.ib-fs summary { cursor: pointer; }
.ib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ib-grid .field label { font-size: .82rem; }
.ib-grid .field label small { color: var(--ink-2); font-weight: 600; }
.ib-cli { display: grid; gap: 10px; }
.sec-mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ib-vacio { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface)); border: 1px solid var(--line); }
.ib-vacio > div { display: grid; gap: 2px; }
.ib-vacio span { color: var(--ink-2); font-size: .88rem; }
.ib-hoja { display: grid; gap: 10px; }
@media (max-width: 420px) { .ib-metricas { grid-template-columns: repeat(2, 1fr); } .ib-zonas { font-size: .6rem; } }

/* Entrena en casa */
.casa-niveles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.casa-nivel { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px 12px; border-radius: 18px; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 60%, #0b0f14)); box-shadow: 0 12px 24px -16px var(--c); transition: transform .15s; }
.casa-nivel:active { transform: scale(.97); }
.casa-nivel b { font: 850 1rem var(--font-display); font-stretch: 108%; }
.casa-nivel small { font-size: .74rem; opacity: .9; }
.casa-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2); }
.casa-ico svg { width: 20px; height: 20px; }
.casa-hoja { display: grid; gap: 10px; }
.casa-lista { list-style: none; display: grid; gap: 8px; }
.casa-lista details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 12px; }
.casa-lista summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.casa-lista summary::-webkit-details-marker { display: none; }
.casa-n { display: grid; min-width: 0; } .casa-n small { color: var(--ink-2); font-size: .8rem; }
.casa-mat { flex: none; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.casa-lista details[open] { display: grid; gap: 8px; }
.casa-gif { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; background: #fff; }
.casa-pasos { padding-left: 20px; display: grid; gap: 4px; font-size: .92rem; }
.casa-prec { font-size: .86rem; padding: 8px 10px; border-radius: 10px; background: var(--tape-soft); }
@media (max-width: 420px) { .casa-niveles { grid-template-columns: 1fr; } .casa-nivel { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; } .casa-ico { grid-row: span 2; } }

/* Nutrición (app del cliente) */
.nut-seg { grid-template-columns: repeat(3, 1fr); }
.nut-card { display: grid; gap: 8px; padding: 18px; border-radius: 22px; background: linear-gradient(150deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.nut-nombre { font: 850 1.4rem/1.1 var(--font-display); font-stretch: 112%; }
.nut-kcal { display: flex; align-items: baseline; gap: 8px; }
.nut-kcal b { font: 900 2.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.nut-kcal span { color: var(--ink-2); }
.nut-ver { margin-top: 4px; }
.nut-comida { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.nut-comida header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nut-comida h3 { font: 800 1.05rem var(--font-display); font-stretch: 108%; }
.nut-comida header small { color: var(--ink-2); font-size: .8rem; }
.nut-c-k { font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.nut-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.nut-items { list-style: none; display: grid; gap: 4px; }
.nut-items li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.nut-items li > span:first-child, .nut-rec { display: grid; min-width: 0; text-align: left; }
.nut-items small { color: var(--ink-2); font-size: .78rem; }
.nut-rec { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.nut-rec small { color: var(--primary); font-weight: 700; }
.nut-k { font-weight: 800; font-variant-numeric: tabular-nums; }
.nut-nota { font-size: .86rem; color: var(--ink-2); }
.nut-comi { justify-self: start; }
.nut-comi.hecho { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); border-color: transparent; }
.nut-notas { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); display: grid; gap: 6px; font-size: .92rem; }
.nut-acc { gap: 8px; }
.nut-elige { display: grid; gap: 10px; }
.nut-dietas { display: grid; gap: 10px; }
.nut-dieta { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.nut-dieta h3 { font: 850 1.1rem var(--font-display); }
.nut-dieta p { font-size: .9rem; color: var(--ink-2); }
.nut-dieta-k b { color: var(--ink); font-size: 1.05rem; }
.nut-dieta .row { gap: 8px; }
.nut-buscar { width: 100%; }
.nut-cats, .nut-tags { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.nut-recetas { list-style: none; display: grid; gap: 8px; }
.nut-rc { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.nut-rc-k { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: color-mix(in srgb, var(--tape) 14%, var(--surface)); line-height: 1; }
.nut-rc-k b { font: 900 1.05rem var(--font-display); } .nut-rc-k small { font-size: .66rem; color: var(--ink-2); }
.nut-rc-t { display: grid; min-width: 0; } .nut-rc-t small { color: var(--ink-2); font-size: .8rem; }
.nut-hoja { display: grid; gap: 10px; }
.nut-prev { list-style: none; display: grid; gap: 8px; }
.nut-prev li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.nut-prev li span { color: var(--ink-2); font-size: .84rem; }

/* Tienda: panel */
.td-tiendas { flex-wrap: wrap; }
.td-prev { padding: 16px; border-radius: 16px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.td-head { display: flex; align-items: center; gap: 12px; }
.td-head > div:last-child { display: grid; min-width: 0; }
.td-logo-box { flex: none; display: grid; place-items: center; }
.td-logo-box img { height: calc(44px * var(--td-escala, 1)); max-width: calc(140px * var(--td-escala, 1)); object-fit: contain; }
.td-logo-box .monograma { width: calc(44px * var(--td-escala, 1)); height: calc(44px * var(--td-escala, 1)); background: var(--primary); color: var(--primary-ink); }
.td-nombre { font: 900 1.3rem/1.1 var(--font-display); font-stretch: 112%; color: var(--ink); }
.td-lema { color: var(--ink-2); font-size: .88rem; }
.td-logo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.td-tam { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-weight: 700; font-size: .9rem; }
.td-colores { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.td-preset i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }
.td-colores input[type=color] { width: 100%; height: 40px; padding: 2px; border-radius: 10px; }
.td-marca .form-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.td-prods-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-prods-head .row { gap: 6px; }
.td-lista { list-style: none; display: grid; gap: 6px; }
.td-lista li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.td-mini { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 10px; background: #fff; overflow: hidden; color: #b8c0bd; border: 1px solid var(--line); }
.td-mini img { width: 100%; height: 100%; object-fit: contain; }
.td-mini svg { width: 26px; height: 26px; }
.td-txt { display: grid; min-width: 0; } .td-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .td-txt small { color: var(--ink-2); font-size: .8rem; }
.td-precio { font-weight: 800; text-align: right; display: grid; } .td-precio s { font-weight: 600; color: var(--ink-2); font-size: .8rem; }
.td-agot { color: var(--bad); font-weight: 800; }
@media (max-width: 640px) { .td-lista li { grid-template-columns: 48px minmax(0, 1fr) auto; } .td-lista li .switch { grid-column: 2; justify-self: start; } .td-lista li .btn { grid-column: 3; } .td-mini { width: 48px; height: 48px; } }
.td-prod-form { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
@media (max-width: 720px) { .td-prod-form { grid-template-columns: 1fr; } }
.td-foto-col { display: grid; gap: 8px; }
.td-foto { aspect-ratio: 1; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: #b8c0bd; gap: 4px; align-content: center; }
.td-foto img { width: 100%; height: 100%; object-fit: contain; }
.td-foto svg { width: 46px; height: 46px; }
.td-foto span { font-size: .8rem; }
.td-foto-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.td-enlace { display: flex; gap: 6px; }
.td-enlace input { flex: 1; min-width: 0; }
.td-foto-nota { font-size: .78rem; }
.td-campos { display: grid; gap: 12px; }
.td-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.td-tabla th, .td-tabla td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.td-tabla tr.mal td { color: var(--bad); }

/* Tienda: app del cliente */
.tienda { display: grid; gap: 12px; margin: -6px -6px 0; padding: 16px 14px 90px; border-radius: 22px; background: var(--bg); color: var(--ink); }
.td-head.grande .td-nombre { font-size: 1.6rem; }
.td-head.grande .td-logo-box img { height: calc(56px * var(--td-escala, 1)); max-width: calc(170px * var(--td-escala, 1)); }
.td-head.grande .td-logo-box .monograma { width: calc(56px * var(--td-escala, 1)); height: calc(56px * var(--td-escala, 1)); font-size: 1.3rem; }
.td-msg { padding: 10px 14px; border-radius: 14px; background: var(--tape-soft); font-size: .9rem; font-weight: 700; }
.td-buscar { width: 100%; }
.td-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tp { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tp.agotado { opacity: .65; }
.tp-foto { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; cursor: pointer; color: #b8c0bd; }
.tp-foto img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.tp-foto:hover img { transform: scale(1.04); }
.tp-foto svg { width: 40px; height: 40px; }
.tp-desc { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font-weight: 900; font-size: .74rem; }
.tp-agot { position: absolute; inset: auto 8px 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: .74rem; font-weight: 800; text-align: center; }
.tp-info { display: grid; gap: 2px; align-content: start; padding: 0 2px; }
.tp-n { font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-info small { color: var(--ink-2); font-size: .76rem; }
.tp-precio { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tp-precio b { font: 900 1.1rem var(--font-display); color: var(--primary); }
.tp-precio s { color: var(--ink-2); font-size: .8rem; }
.tp-precio.grande b { font-size: 1.6rem; }
.tp-add { width: 100%; }
.tp-cant { display: flex; align-items: center; justify-content: space-between; gap: 4px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); padding: 2px; }
.tp-cant button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: inherit; font-weight: 900; font-size: 1.1rem; cursor: pointer; }
.tp-cant b { font-weight: 900; }
.td-carrito { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(108px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: min(520px, calc(100vw - 28px)); display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 0; border-radius: 18px;
  background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 16px 36px -14px var(--primary); animation: subirHoja .35s ease both; }
.td-carrito svg { width: 22px; height: 22px; }
.td-carrito span { flex: 1; text-align: left; }
.td-hoja { display: grid; gap: 12px; background: transparent; }
.td-items { list-style: none; display: grid; gap: 8px; }
.td-items li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.td-items .td-mini { width: 48px; height: 48px; }
.td-items .tp-cant { min-width: 112px; }
.td-total { display: flex; justify-content: space-between; font-size: 1.1rem; padding-top: 8px; border-top: 1px solid var(--line); }
.td-total b { font: 900 1.4rem var(--font-display); }
.td-nota { font-size: .84rem; }
.td-wa { background: #25D366; border-color: #25D366; color: #08361b; }
.td-ficha-foto { aspect-ratio: 1; max-height: 46dvh; border-radius: 18px; background: #fff; display: grid; place-items: center; overflow: hidden; color: #b8c0bd; }
.td-ficha-foto img { width: 100%; height: 100%; object-fit: contain; }
.td-desc { font-size: .95rem; line-height: 1.55; }
.td-seg { margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .sa-esp, .sa-x, .ib-marca, .td-carrito { animation: none !important; } }
/* La barra de pestañas se acomoda a 4 o 5 pestañas en una sola fila */
.ctabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ctab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* =====================================================================
   MIOFORZ 6 · series por ejercicio, Hoy completado, fondos vivos,
   ilustraciones, premium en Calma y compra en la tienda
   ===================================================================== */
/* Registro por serie (rutina) */
.log { align-items: stretch; }
.series { display: grid; gap: 6px; flex: 1 1 100%; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.serie { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.serie > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); font-variant-numeric: tabular-nums; }
.serie input { min-height: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.serie.cab { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.serie.cab span { text-align: center; }
.serie-x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 1.1rem; cursor: pointer; }
.serie-mas { justify-self: start; }
.serie-meta { color: var(--ink-2); font-size: .8rem; }
.volver-inicio { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Hoy: entrenamiento completado (una sola tarjeta fija) */
.hoy-hecho { justify-items: center; text-align: center; }
.hoy-hecho .hoy-top { width: 100%; }
.hoy-listo { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.18); box-shadow: 0 0 0 10px rgba(255,255,255,.08); animation: listoPop .5s cubic-bezier(.2,1.4,.4,1) both; }
.hoy-listo svg { width: 40px; height: 40px; }
@keyframes listoPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Fondo vivo */
#fondo-vivo { position: fixed; inset: 0; z-index: -1; display: block; pointer-events: none; }
body.con-fondo { background: transparent; }
html:has(body.con-fondo) { background: #0e1420; }
body.fondo-claro { --surface: rgba(255,255,255,.80); --surface-2: rgba(255,255,255,.55); --line: rgba(20,40,60,.12); --solido: #ffffff; }
body.fondo-oscuro { --surface: rgba(16,20,30,.66); --surface-2: rgba(255,255,255,.08); --line: rgba(255,255,255,.14); --ink: #F2F5F8; --ink-2: rgba(242,245,248,.74); --bg: #0e1420; --solido: #141a26; color-scheme: dark; color: var(--ink); }
body.con-fondo .capp-stat, body.con-fondo .capp-fila, body.con-fondo .ses, body.con-fondo .cat-sec, body.con-fondo .casa-lista details, body.con-fondo .tp, body.con-fondo .td-lista li { -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
body.con-fondo .hoja { background: var(--solido); }
body.con-fondo .capp-top, body.con-fondo .h-sec, body.con-fondo .capp-fecha, body.con-fondo .capp-sub { text-shadow: 0 1px 2px rgba(255,255,255,.75); }
body.fondo-oscuro .capp-top, body.fondo-oscuro .h-sec, body.fondo-oscuro .capp-fecha, body.fondo-oscuro .capp-sub { text-shadow: 0 1px 3px rgba(0,0,0,.55); }
body.fondo-oscuro input, body.fondo-oscuro select, body.fondo-oscuro textarea { background: rgba(255,255,255,.08); color: var(--ink); border-color: var(--line); }
.fondos-op { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fondo-op { display: grid; gap: 6px; padding: 6px; border-radius: 16px; border: 2px solid transparent; background: var(--surface); color: var(--ink); font: 700 .78rem var(--font-body); cursor: pointer; text-align: center; }
.fondo-op i { display: block; height: 64px; border-radius: 11px; border: 1px solid var(--line); }
.fondo-op[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 6px 16px -10px var(--primary); }

/* Ilustraciones en botones */
.ilus { position: absolute; right: -6px; top: -4px; width: 86px; height: 78px; pointer-events: none; transition: transform .3s; }
.cat { min-height: 92px; }
.cat:hover .ilus, .cat[aria-pressed="true"] .ilus { transform: scale(1.08) rotate(-3deg); }
.casa-nivel { position: relative; overflow: hidden; }
.casa-nivel .ilus { right: -10px; top: auto; bottom: -8px; width: 92px; height: 84px; opacity: .9; }
.casa-nivel > :not(.ilus) { position: relative; }

/* Premium en Calma */
.ses.cerrada { opacity: .78; }
.ses.cerrada .ses-play { background: color-mix(in srgb, var(--c) 45%, #6b7280); }
.tag-premium { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: linear-gradient(120deg, #F5C451, #E0912F); color: #3b2300; vertical-align: 1px; }
.premium-hoja { display: grid; gap: 10px; justify-items: center; text-align: center; }
.premium-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(120deg, #F5C451, #E0912F); color: #3b2300; }
.premium-ico svg { width: 30px; height: 30px; }

/* Tienda: compra */
.td-head > div:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.td-head .td-mis { margin-left: auto; flex: none; }
.co h2 { font: 850 1.3rem var(--font-display); font-stretch: 108%; }
.co-pasos { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: paso; }
.co-pasos li { counter-increment: paso; display: grid; gap: 4px; font-size: .74rem; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.co-pasos li::before { content: ""; height: 5px; border-radius: 99px; background: var(--line); }
.co-pasos li.ok::before, .co-pasos li.act::before { background: var(--primary); }
.co-pasos li.act { color: var(--ink); }
.co-resumen { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.co-resumen p { display: flex; justify-content: space-between; }
.co-resumen .co-total { padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.co-resumen .co-total b { font: 900 1.35rem var(--font-display); }
.co-metodos { display: grid; gap: 6px; }
.co-met { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.co-met input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--primary); }
.co-met:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.co-prueba { font-size: .85rem; padding: 10px 12px; border-radius: 12px; background: #FFF6D6; color: #5b4500; border-left: 4px solid #E0B12F; }
.co-tarj { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface)); border: 1px solid var(--line); }
.co-tarj .grid2 { grid-template-columns: 1fr 1fr; }
.co-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; vertical-align: -3px; animation: girar .7s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.co-listo { justify-items: center; text-align: center; }
.co-listo .co-pasos { width: 100%; }
.co-sello { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 12px color-mix(in srgb, var(--ok) 18%, transparent); animation: listoPop .55s cubic-bezier(.2,1.4,.4,1) both; }
.co-sello svg { width: 44px; height: 44px; }
.co-folio { font-size: 1.05rem; } .co-folio b { font: 900 1.4rem var(--font-display); letter-spacing: .04em; }
.co .hoja-botones { width: 100%; }
.td-ped-lista { list-style: none; display: grid; gap: 6px; }
.td-ped { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
button.td-ped { cursor: pointer; }
.td-ped > span:first-child { display: grid; min-width: 0; } .td-ped small { color: var(--ink-2); font-size: .8rem; }
.td-ped-der { display: grid; justify-items: end; gap: 3px; flex: none; }
.td-estado { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.td-estado.e-pagado, .td-estado.e-nuevo { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.td-estado.e-preparando, .td-estado.e-enviado { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: color-mix(in srgb, var(--warn) 80%, var(--ink)); }
.td-estado.e-cancelado { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.td-pedidos { display: grid; gap: 10px; margin-top: 14px; }
.td-muestra { font-weight: 800; color: var(--warn); }
.btn.danger { color: var(--bad); }
body:has(.hoja-fondo) .td-carrito { display: none; }
.td-items-ped li { grid-template-columns: minmax(0, 1fr) auto; }
.td-items-ped .td-txt b { white-space: normal; }
.hoy-hecho .hoy-btn { background: rgba(255,255,255,.16); color: var(--primary-ink); border: 1px solid rgba(255,255,255,.35); }
/* Con fondo vivo: cada sección va sobre un vidrio para que se lea bien */
body.con-fondo .capp-sec { padding: 14px; border-radius: 22px; -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
body.fondo-claro .capp-sec { background: rgba(255,255,255,.55); }
body.fondo-oscuro .capp-sec { background: rgba(8,12,20,.42); }
body.con-fondo .capp-sec .h-sec, body.con-fondo .capp-sec .capp-sub { text-shadow: none; }

/* =====================================================================
   MIOFORZ 7 · nutriólogos, candados por tipo de cliente e historia inicial
   ===================================================================== */
/* Historia inicial: pasos en la app */
.hq { display: grid; gap: 14px; }
.hq-top { display: grid; gap: 8px; position: sticky; top: -20px; margin: -20px -18px 0; padding: 16px 18px 10px; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--line); }
body.con-fondo .hq-top { background: var(--solido, var(--surface)); }
.hq-barra { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hq-barra i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .35s ease; }
.hq-intro { font-size: .92rem; }
.hq-sec { display: grid; gap: 10px; }
.hq-sec h3 { font: 850 1.35rem/1.15 var(--font-display); font-stretch: 108%; text-wrap: balance; }
.hq-n { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.hq-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.hq-campo { grid-column: 1 / -1; display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.hq-campo.medio { grid-column: auto; }
.hq-l { font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.3; padding: 0; }
.hq-req { color: var(--bad); }
.hq-campo textarea { resize: vertical; min-height: 64px; }
.hq-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.hq-op { position: relative; display: inline-flex; cursor: pointer; }
.hq-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hq-op span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--ink); transition: background .15s, border-color .15s; }
.hq-op input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.hq-op input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: 2px; }
.hq-campo.sino { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hq-campo.sino legend { float: left; width: 100%; }
.hq-campo.sino .hq-ops { flex-wrap: nowrap; }
.hq-campo.sino .hq-op span { min-width: 54px; justify-content: center; }
.hq-campo.fila .hq-ops { gap: 4px; }
.hq-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: .92rem; cursor: pointer; grid-column: 1 / -1; }
.hq-check input { width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.hq-aviso { font-size: .86rem; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 9%, var(--surface)); border-left: 4px solid var(--bad); color: var(--ink); }
.hq-listo { justify-items: center; }
@media (max-width: 420px) { .hq-campos { grid-template-columns: 1fr; } .hq-campo.medio { grid-column: 1 / -1; } }

/* Hoy: tarjeta para llenarla, indicaciones del especialista y aviso para abrir todo */
.hist-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow); }
.hist-card h2 { font: 850 1.2rem/1.2 var(--font-display); margin: 4px 0 6px; }
.hist-card p { color: var(--ink-2); font-size: .92rem; }
.hist-card small { color: var(--ink-2); font-size: .78rem; }
.hist-card .hq-barra { margin: 10px 0 4px; }
.hist-card .btn { justify-self: start; }
.capp-sec.indic { padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-left: 4px solid var(--primary); }
.capp-sec.indic p { white-space: normal; line-height: 1.5; }
.abre-todo b:first-child { display: block; margin-bottom: 2px; }
.pre-card.cerrada, .nut-dieta.cerrada { opacity: .82; }
.pre-card.cerrada h4, .nut-dieta.cerrada h3 { color: var(--ink-2); }
.casa-nivel.cerrada { filter: saturate(.55); }
.casa-nivel.cerrada .tag-premium { font-size: .62rem; }
.hq-cuenta ul { list-style: none; display: grid; gap: 6px; margin-top: 6px; }
.hq-cuenta li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.hq-cuenta li > span { display: grid; } .hq-cuenta small { color: var(--ink-2); font-size: .8rem; }

/* Panel: la historia en la ficha */
.hist-sec { display: grid; gap: 12px; margin: 18px 0; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.hist-sec .sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hist-sec .sec-head h3 { font-size: 1rem; }
.hist-sec .sec-head .btn { margin-left: auto; }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.hq-res { display: grid; gap: 8px; }
.hq-alertas { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-left: 4px solid var(--bad); display: grid; gap: 6px; }
.hq-alertas b { color: var(--bad); }
.hq-alertas ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: .9rem; }
.hq-alertas li.n2 { font-weight: 800; color: var(--bad); }
.hq-ok { font-size: .88rem; color: var(--ok); font-weight: 700; }
.hq-det { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.hq-det summary { cursor: pointer; padding: 10px 0; font-weight: 800; font-size: .9rem; }
.hq-det dl, .hq-plan { display: grid; gap: 0; margin: 0 0 10px; }
.hq-det dl > div, .hq-plan > div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.hq-det dt, .hq-plan dt { color: var(--ink-2); }
.hq-det dd, .hq-plan dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.hq-det dl > div.marca dd { color: var(--bad); }
.hq-plan > div.visible { background: color-mix(in srgb, var(--ok) 7%, var(--surface)); border-radius: 8px; padding: 8px; }
.hq-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; }
.hq-checks .si { color: var(--ok); font-weight: 700; } .hq-checks .no { color: var(--ink-2); }
.hq-plan-box { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.hq-otra summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--primary); padding: 6px 0; }
.hq-fecha { font-size: .8rem; }
.alerta.hist { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--primary); }
.alerta.hist::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#plform .hq-campos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .hq-det dl > div, .hq-plan > div { grid-template-columns: 1fr; gap: 2px; } #plform .hq-campos { grid-template-columns: 1fr; } }

/* El menú de abajo no cambia con el fondo: conserva los colores de la marca */
:root { --surface-fijo: var(--surface); --surface-2-fijo: var(--surface-2); --ink-fijo: var(--ink); --ink-2-fijo: var(--ink-2); --line-fijo: var(--line); }
body.con-fondo .ctabs { --surface: var(--surface-fijo); --surface-2: var(--surface-2-fijo); --ink: var(--ink-fijo); --ink-2: var(--ink-2-fijo); --line: var(--line-fijo);
  background: var(--surface-fijo); color: var(--ink-fijo); border-color: var(--line-fijo); -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); }
.foto-vacia { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-2); }
.foto-vacia svg { width: 40%; max-width: 64px; height: auto; }
