/* ── OuryFit v5 ─────────────────────────────────────────────────────── */
:root {
  --bg: #0a0a0f; --surface: #13131c; --card: #1a1a26; --card-hi: #22222f;
  --line: #2a2a38; --text: #f4f4f7; --dim: #8a8a9a; --faint: #5f5f74;
  --lime: #c4f542; --lime-dark: #9bd119; --violet: #8b5cf6; --cyan: #22d3ee; --amber: #fbbf24; --rose: #fb7185;
  --r: 20px; --r-sm: 13px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
::-webkit-scrollbar { width: 0; height: 0; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
h1 { font-size: 23px; font-weight: 750; letter-spacing: -.5px; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
b { font-weight: 750; }
.icon { flex-shrink: 0; vertical-align: middle; }

.small { font-size: 12.5px; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.lime { color: var(--lime); }
.row { display: flex; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.label, .eyebrow { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; }
.eyebrow { color: var(--lime); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.fade { animation: fadeIn .35s ease both; }
.press { transition: transform .1s ease; }
.press:active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Layout */
.shell { max-width: 480px; margin: 0 auto; padding-bottom: calc(96px + var(--safe-b)); }
.shell.with-rest { padding-bottom: calc(170px + var(--safe-b)); }
.page { padding: 1.6rem 16px 1rem; }
.narrow { max-width: 440px; margin: 0 auto; }
.center-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 16px; text-align: center; }

/* Inputs */
input, select {
  width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 13px; font-size: 16px; outline: none; transition: border-color .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:focus, select:focus { border-color: var(--lime); }
input::placeholder { color: var(--faint); }
input.big { font-size: 20px; font-weight: 600; padding: 15px; }
.kv select { width: auto; max-width: 60%; padding: 8px 30px 8px 12px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.field > span { font-size: 11.5px; color: var(--dim); font-weight: 600; }
.field.sm input { padding: 9px 10px; font-size: 15px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--dim); margin: 2px 0 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--lime); }

/* Buttons */
.btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 750; border: 1px solid var(--line); background: var(--card); }
.btn.primary { background: linear-gradient(135deg, var(--lime), var(--lime-dark)); color: var(--bg); border: none; box-shadow: 0 8px 24px #c4f54233; }
.btn.primary:disabled { background: var(--card); color: var(--faint); box-shadow: none; border: 1px solid var(--line); opacity: 1; }
.btn.ghost { background: var(--surface); }
.btn.small { width: auto; padding: 9px 13px; font-size: 13px; }
.btn.tiny { width: auto; padding: 8px 12px; font-size: 12.5px; border-radius: 11px; gap: 5px; }
.btn.cyan { background: var(--cyan); color: var(--bg); border: none; }
.danger-text { color: var(--rose); }
.icon-btn { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 13px; flex-shrink: 0; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.xs { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.danger { color: var(--rose); border-color: #fb718533; }
.icon-btn.filled-cyan { background: var(--cyan); color: var(--bg); border: none; }
.icon-btn.sel { background: var(--c); color: var(--bg); border-color: var(--c); }
.link { color: var(--lime); font-weight: 650; font-size: 13px; padding: 2px 0; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv > span:first-child { color: var(--dim); min-width: 0; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; font-size: 13px; color: var(--dim); margin-bottom: 14px; }
.note .icon { color: var(--lime); margin-top: 1px; }
.alert { background: #2a0f14; border: 1px solid #fb718555; color: var(--rose); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px; max-width: 340px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--faint); padding: 22px 10px; text-align: center; font-size: 13px; }
.tag { font-size: 10px; font-weight: 700; color: var(--violet); background: #8b5cf622; padding: 2px 6px; border-radius: 6px; vertical-align: 1px; }
.badge { font-size: 10px; font-weight: 800; color: var(--bg); padding: 4px 8px; border-radius: 7px; letter-spacing: .5px; }
.pr { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--amber); background: var(--surface); border: 1px solid #fbbf2433; padding: 4px 9px; border-radius: 9px; white-space: nowrap; }
.sq-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; font-size: 13px; color: var(--dim); list-style: none; padding: 4px 0; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.topbar-txt { flex: 1; min-width: 0; }
.topbar-txt h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; gap: 8px; }

/* Login / setup */
.logo { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, var(--lime), var(--lime-dark)); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 40px #c4f54255; margin-bottom: 18px; }
.brand { font-size: 30px; font-weight: 850; letter-spacing: -1px; margin-bottom: 4px; }
.gbtn { display: flex; justify-content: center; align-items: center; min-height: 44px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 20px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.steps { display: flex; gap: 6px; margin-bottom: 32px; }
.steps div { flex: 1; height: 5px; border-radius: 99px; background: var(--line); transition: background .3s; }
.steps div.on { background: var(--lime); box-shadow: 0 0 10px #c4f54266; }
.option { display: flex; justify-content: space-between; align-items: center; text-align: left; width: 100%; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.option.on { border-color: var(--lime); color: var(--text); }
.option.on .icon { color: var(--lime); }
.seg { display: flex; gap: 5px; background: var(--card); padding: 5px; border-radius: 14px; border: 1px solid var(--line); }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 6px; font-size: 13.5px; font-weight: 700; color: var(--dim); border-radius: 10px; transition: background .2s, color .2s; }
.seg button.on { background: var(--lime); color: var(--bg); }
.seg.sm button { padding: 8px 4px; font-size: 12px; }

/* Hoy */
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hello-name { font-size: 26px; font-weight: 850; letter-spacing: -.8px; margin-top: 2px; }
.chip-stat { display: flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 13px; text-align: left; flex-shrink: 0; }
.chip-stat b { display: block; font-size: 17px; line-height: 1; }
.chip-stat span { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; }
.quote { font-size: 13px; color: var(--dim); font-style: italic; margin: 10px 0 18px; }
.hero { position: relative; overflow: hidden; background: linear-gradient(145deg, var(--card), var(--surface)); border-color: color-mix(in srgb, var(--c) 30%, var(--line)); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 12%, transparent); padding: 22px; border-radius: 24px; cursor: pointer; }
.hero-glow { position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; border-radius: 50%; background: var(--c); opacity: .12; filter: blur(30px); pointer-events: none; }
.hero-title { font-size: 23px; font-weight: 850; letter-spacing: -.5px; }
.hero-play { width: 52px; height: 52px; border-radius: 16px; background: var(--c); color: var(--bg); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 24px color-mix(in srgb, var(--c) 40%, transparent); flex-shrink: 0; }
.done-card, .rest-card { display: flex; align-items: center; gap: 14px; }
.done-card { border-color: #c4f54255; }
.done-ic, .rest-ic { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.done-ic { background: var(--lime); color: var(--bg); }
.rest-ic { background: var(--card-hi); color: var(--cyan); }
.ring { position: relative; flex-shrink: 0; }
.ring-arc { transition: stroke-dashoffset .9s cubic-bezier(.16, 1, .3, 1); }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 27px; font-weight: 850; letter-spacing: -1px; line-height: 1.1; }
.ring-sub { font-size: 10px; color: var(--faint); letter-spacing: .4px; }
.bar { background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; transition: width .6s ease; }
.tile { padding: 16px; margin-bottom: 0; }
.tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tile-num { font-size: 26px; font-weight: 850; letter-spacing: -.5px; margin-bottom: 8px; }
.tile-num small { font-size: 14px; color: var(--dim); font-weight: 600; margin-left: 2px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.week-l { font-size: 11px; color: var(--faint); font-weight: 700; }
.week-day.today .week-l { color: var(--lime); }
.week-dot { width: 38px; height: 38px; max-width: 100%; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--c); background: var(--surface); }
.week-day.today .week-dot { border-color: var(--lime); box-shadow: 0 0 0 2px #c4f54233; }
.week-dot.done { background: var(--c); color: var(--bg); border-color: var(--c); }
.week-dot.miss { opacity: .45; }
.week-n { font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Gym */
.routine { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.routine.on { border-color: var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 14%, transparent); }
.routine-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--surface); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.routine-head { display: flex; align-items: center; gap: 13px; width: 100%; }
.ex { transition: border-color .3s; }
.ex.complete { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.tip { font-size: 12.5px; color: var(--dim); background: var(--surface); border: 1px solid var(--line); padding: 9px 12px; border-radius: 11px; margin-top: 10px; }
.goal { display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; color: var(--dim); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; }
.goal .icon { color: var(--c, var(--lime)); margin-top: 1px; }
.goal b { color: var(--text); }
.feel { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.feel button { padding: 7px 11px; font-size: 12.5px; font-weight: 700; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--dim); }
.feel button.on.facil { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.feel button.on.justo { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.feel button.on.nopude { background: var(--rose); color: var(--bg); border-color: var(--rose); }
.prev { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.sets { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.set-row { display: grid; grid-template-columns: 28px 1fr 1fr 48px; gap: 8px; align-items: center; }
.set-row.head { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; text-align: center; }
.set-row input { text-align: center; padding: 11px 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-n { text-align: center; font-weight: 800; color: var(--faint); font-size: 14px; }
.set-check { height: 46px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--faint); display: flex; align-items: center; justify-content: center; }
.set-row.done .set-check { background: var(--c); border-color: var(--c); color: var(--bg); }
.set-row.done input { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); color: var(--dim); }
.set-row.done .set-n { color: var(--c); }
.stat { text-align: center; padding: 14px 6px; margin-bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat b { font-size: 25px; letter-spacing: -1px; }
.stat span { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; font-weight: 650; }
.center-block { padding-top: 2rem; }
.swatch { width: 30px; height: 30px; border-radius: 10px; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); }
.ex-edit { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.ex-edit input { background: var(--card); }

/* Rest timer */
.rest { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(86px + var(--safe-b)); width: calc(100% - 32px); max-width: 448px; z-index: 40;
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 18px; overflow: hidden;
  background: rgba(26, 26, 38, .96); border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, .55); backdrop-filter: blur(14px); animation: fadeIn .25s ease; }
.rest-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--lime); transition: width .25s linear; }
.rest-txt { flex: 1; display: flex; flex-direction: column; }
.rest-txt b { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; line-height: 1.1; }
.rest-txt .small { color: var(--dim); }
.rest.near .rest-txt b { color: var(--rose); }
.rest.near .rest-bar { background: var(--rose); }
.rest.ready { border-color: var(--lime); box-shadow: 0 0 30px #c4f54244; }
.rest.ready .rest-txt b { color: var(--lime); }

/* Comer */
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.daynav-l { flex: 1; text-align: center; font-weight: 750; font-size: 15px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.card.mini { padding: 11px 6px; margin-bottom: 0; text-align: center; display: flex; flex-direction: column; gap: 5px; border-radius: 15px; }
.card.mini b { font-size: 17px; }
.card.mini .label { font-size: 9.5px; letter-spacing: 1px; }
.search { position: relative; margin-bottom: 12px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 42px; }
.food, .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; margin-bottom: 8px; }
.food { cursor: pointer; }
.card .item { background: var(--surface); }
.item-n { font-size: 14px; font-weight: 700; }
.add-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--lime); color: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper-val { flex: 1; text-align: center; font-size: 17px; font-weight: 750; }

/* Progreso */
.heat { display: flex; gap: 4px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; margin-right: 2px; }
.heat-days span { font-size: 9px; color: var(--faint); display: flex; align-items: center; font-weight: 700; }
.heat-col { flex: 1; display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.heat-cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.heat-cell.on { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 6px #c4f54255; }
.heat-cell.fut { opacity: .25; }
.heat-cell.today { outline: 1.5px solid var(--text); outline-offset: 1px; }
.chart-val { font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.chart-val b { color: var(--text); font-size: 18px; }
.chart svg { display: block; touch-action: pan-y; }
.chart-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.chips button { flex-shrink: 0; padding: 8px 12px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--dim); border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.chips button.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.hist { border-bottom: 1px solid var(--line); }
.hist:last-child { border-bottom: none; }
.hist-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 0; font-size: 14px; }
.hist-body { padding: 0 0 12px; }
.hist-body .kv { padding: 7px 0; }

/* Sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease; }
.sheet { width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line); border-bottom: none; border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); animation: up .25s cubic-bezier(.16, 1, .3, 1); max-height: 85vh; overflow-y: auto; }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }

/* Nav, toast, sync */
.nav { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(12px + var(--safe-b)); width: calc(100% - 24px); max-width: 456px; z-index: 50;
  display: flex; gap: 2px; padding: 6px; border-radius: 22px; background: rgba(26, 26, 38, .93); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); backdrop-filter: blur(16px); }
.nav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; border-radius: 16px; color: var(--faint); transition: background .2s, color .2s; }
.nav button span { font-size: 10px; font-weight: 700; }
.nav button.on { background: var(--lime); color: var(--bg); }
.nav .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.toast { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; margin: 0 auto; width: max-content; z-index: 70; display: flex; align-items: center; gap: 8px;
  background: var(--lime); color: var(--bg); font-weight: 750; font-size: 13.5px; padding: 11px 16px; border-radius: 14px; box-shadow: 0 8px 30px #c4f54255; animation: fadeIn .25s ease; max-width: calc(100% - 32px); }
.sync-pill { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 65; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650;
  background: #2a0f14; color: var(--rose); border: 1px solid #fb718555; padding: 6px 11px; border-radius: 10px; }
.spinner { border: 3px solid var(--line); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }

@media (max-width: 360px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .ring { transform: scale(.88); margin: -8px; }
  .nav button span { font-size: 9px; }
}

/* Entrenador */
.coach-cta { display: flex; align-items: center; gap: 14px; border-color: #c4f54255; background: linear-gradient(145deg, var(--card), var(--surface)); cursor: pointer; }
.coach-ic { width: 48px; height: 48px; border-radius: 15px; background: var(--lime); color: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.coach-rev { border-color: #c4f54255; cursor: pointer; }
.coach-plan p { line-height: 1.5; color: var(--dim); font-size: 14px; }
.plan-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.plan-days div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.plan-days span { font-size: 10px; color: var(--faint); font-weight: 700; }
.plan-days b { font-size: 10px; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-days .on { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.plan-days .on b { color: var(--c); }
.change { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.chat-page .chat { min-height: 40vh; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; animation: fadeIn .25s ease; }
.msg.coach { align-self: flex-start; background: var(--card-hi); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.usuario { align-self: flex-end; background: var(--lime); color: var(--bg); font-weight: 600; border-bottom-right-radius: 5px; }
.msg.dolor { border-color: var(--rose); background: #2a0f14; }
.msg.typing { display: flex; gap: 4px; padding: 14px; }
.msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .2s; } .msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.quick button { padding: 9px 12px; font-size: 13px; font-weight: 650; border-radius: 12px; background: var(--surface); border: 1px solid #c4f54255; color: var(--lime); text-align: left; }
.chat-box { display: flex; gap: 8px; align-items: flex-end; }
.chat-box textarea { flex: 1; min-width: 0; resize: none; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 11px 13px; font-size: 16px; font-family: inherit; outline: none; max-height: 120px; }
.chat-box textarea:focus { border-color: var(--lime); }
.icon-btn.filled { background: var(--lime); color: var(--bg); border: none; }
.mem { margin: 10px 0 0 18px; font-size: 13px; color: var(--dim); }
.mem li { margin-bottom: 4px; }
.mem .icon-btn { display: inline-flex; vertical-align: middle; width: 22px; height: 22px; margin-left: 4px; }
.logo.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 30px #c4f54244; } 50% { transform: scale(1.06); box-shadow: 0 0 50px #c4f54288; } }
.libreta { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--dim); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.foto-prev { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.foto-prev img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.set-row.corporal { grid-template-columns: 28px 1fr 48px; }
.set-row.iso { grid-template-columns: 28px 1fr 46px 48px; }
.set-row.cardio { grid-template-columns: 1fr 48px; }
.unit-input { position: relative; display: block; }
.unit-input input { padding-right: 48px; }
.unit-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; font-weight: 700; pointer-events: none; }
.crono { height: 46px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--dim); display: flex; align-items: center; justify-content: center; }
.crono.on { background: var(--amber); border-color: var(--amber); color: var(--bg); animation: brillo 1.2s ease-in-out infinite; }
@keyframes brillo { 0%, 100% { box-shadow: 0 0 0 0 #fbbf2400; } 50% { box-shadow: 0 0 16px 2px #fbbf2499; } }
