/* AppFit — oscuro, tipo panel. Móvil primero (iPhone en pantalla completa). */
:root {
  --bg: #0a0e11;
  --bg2: #0f151a;
  --card: #141b21;
  --card2: #1a232b;
  --line: #243039;
  --text: #e9eff3;
  --muted: #8d9ca8;
  --accent: #c6f432;
  --accent-ink: #12200a;
  --good: #5be28a;
  --bad: #ff7a70;
  --warn: #f6c453;
  --blue: #62b4ff;
  --r: 18px;
  --gut: 16px;
  --tab-h: 62px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body.noscroll { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
button, a, [role="button"], .chip, .seg-b, label.drop { touch-action: manipulation; }
button, .btn, .chip, .seg-b, .tab, .icon-btn, .fab, .check { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--text); }
a { color: inherit; text-decoration: none; }
code { background: var(--card2); padding: .05rem .35rem; border-radius: 6px; font-size: .88em; }
.num, .unit { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { height: 100dvh; display: flex; flex-direction: column; }
.boot { flex: 1; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.screen {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) max(var(--gut), env(safe-area-inset-right, 0px)) 28px max(var(--gut), env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
.screen > * { flex-shrink: 0; }

/* ---------- Barra de pestañas ---------- */
.tabs {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  background: rgba(15, 21, 26, .94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 50px; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em;
  transition: color .15s, background .15s, transform .12s var(--ease);
}
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }
.tab:active { transform: scale(.94); background: var(--card); }

/* ---------- Cabecera ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 2px 2px; }
.top h1 { font-size: 32px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.date-nav { display: flex; gap: 6px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card h2 .inl { width: 18px; height: 18px; vertical-align: -3px; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.cap { color: var(--muted); font-size: 12.5px; }
.center { text-align: center; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.hero { flex-direction: row; align-items: center; justify-content: space-between; background: linear-gradient(160deg, #18222a, var(--card)); }
.hero-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.hero-side { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.hero-side small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hero-side .num { font-size: 24px; font-weight: 700; }
.big-weight { display: flex; align-items: baseline; gap: 6px; }
.num.xl { font-size: 58px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.num.big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.unit { color: var(--muted); font-size: 18px; font-weight: 600; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card2); color: var(--muted); width: fit-content; }
.tone-green { color: var(--good); background: rgba(91, 226, 138, .12); }
.tone-red { color: var(--bad); background: rgba(255, 122, 112, .12); }
.tone-blue { color: var(--blue); background: rgba(98, 180, 255, .12); }
.tone-yellow { color: var(--warn); background: rgba(246, 196, 83, .12); }
.tone-gray { color: var(--muted); }
.empty-card { text-align: center; color: var(--muted); padding: 34px 20px; border: 1px dashed var(--line); border-radius: var(--r); display: grid; gap: 10px; justify-items: center; }
.empty-card .ic { width: 34px; height: 34px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.notice-card { border-color: rgba(198, 244, 50, .35); }
.notice { background: rgba(246, 196, 83, .1); color: var(--warn); padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.offline { background: rgba(246, 196, 83, .12); color: var(--warn); padding: 8px 12px; border-radius: 12px; font-size: 13px; text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line);
  font-weight: 700; font-size: 15px; text-align: center; transition: transform .12s var(--ease), background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); background: #222d36; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:active { background: #b3e02a; }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 122, 112, .12); color: var(--bad); border-color: rgba(255, 122, 112, .3); }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn:disabled, .icon-btn:disabled { opacity: .4; pointer-events: none; }
.btn.loading { opacity: .6; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns > .btn { flex: 1 1 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); transition: transform .12s var(--ease); }
.icon-btn:active { transform: scale(.93); }
.icon-btn .ic { width: 20px; height: 20px; }
.fab-row { position: sticky; bottom: 4px; display: flex; justify-content: flex-end; pointer-events: none; margin-top: -4px; }
.fab { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transition: transform .12s var(--ease); }
.fab:active { transform: scale(.95); }
.fab .ic { width: 22px; height: 22px; }

/* ---------- Chips y segmentados ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -4px; padding: 2px 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.tiny { justify-content: center; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .12s var(--ease), background .15s, color .15s; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg-b { min-height: 52px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-weight: 700; text-align: center; padding: 6px; transition: transform .12s var(--ease), background .15s; }
.seg.two .seg-b { flex-direction: row; gap: 8px; min-height: 46px; font-size: 14px; }
.seg-b:active { transform: scale(.96); }
.seg-b .ic { width: 20px; height: 20px; }
.seg-b.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.seg-b.s-ok.on { background: var(--good); }
.seg-b.s-changes.on { background: var(--warn); }
.seg-b.s-off.on { background: var(--bad); }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, textarea, select {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); outline: none; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type=range] { padding: 0; min-height: 36px; accent-color: var(--accent); }
input[type=datetime-local], input[type=date] { min-height: 48px; }
input[readonly] { color: var(--muted); }
.copy-row { display: flex; gap: 8px; align-items: center; }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " ›"; color: var(--muted); }
details[open] summary::after { content: " ⌄"; }
details.more .grid2 { margin-top: 10px; }
.rules ol { margin: 10px 0 0 18px; display: grid; gap: 8px; color: var(--muted); }
.drop { border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px 14px; align-items: center; text-align: center; gap: 6px; cursor: pointer; color: var(--text); background: var(--bg2); }
.drop input { display: none; }
.drop .ic { width: 28px; height: 28px; color: var(--accent); }
.drop small { color: var(--muted); font-weight: 500; }
.drop.disabled { opacity: .45; pointer-events: none; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; }
.steps { margin: 0 0 0 18px; padding: 0; display: grid; gap: 6px; color: var(--muted); }
.steps b { color: var(--text); }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.group { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px 4px 2px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border-top: 1px solid var(--line); text-align: left; transition: background .12s; }
.card .row:first-of-type { border-top: 0; }
.list > .row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.row:active { background: var(--card2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); font-size: 13px; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.row-end .num { font-size: 18px; font-weight: 700; }
.row-end .num small { font-size: 12px; color: var(--muted); }
.tag { font-size: 11px; color: var(--muted); font-weight: 700; }
.act-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--card2); flex-shrink: 0; }
.act-ic .ic { width: 22px; height: 22px; }
.act-ic.k-run { color: var(--accent); background: rgba(198, 244, 50, .1); }
.act-ic.k-cf { color: var(--bad); background: rgba(255, 122, 112, .1); }
.act-ic.k-walk, .act-ic.k-bike { color: var(--blue); background: rgba(98, 180, 255, .1); }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; white-space: pre-line; }
.result { color: var(--accent); font-weight: 600; font-size: 14px; }
.wod .row-main b { white-space: normal; }
ul.plain { list-style: none; padding: 0; display: grid; gap: 10px; }
ul.plain li { display: flex; flex-direction: column; gap: 1px; }
ul.plain small { color: var(--muted); }
ul.parsed li { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
ul.parsed .bad { color: var(--bad); }
.chk { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 500; }
.chk input { width: 22px; min-height: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); margin-top: 2px; }
.kv { display: grid; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Dieta (Hoy) ---------- */
.meals { display: flex; flex-direction: column; }
.meal { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.meal:first-child { border-top: 0; padding-top: 2px; }
.check { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: background .18s var(--ease), border-color .18s, transform .12s var(--ease); }
.check:active { transform: scale(.9); }
.check .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.meal.done .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.meal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 2px 0; }
.meal-t { font-size: 12.5px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.meal-body b { font-size: 16px; }
.meal.done .meal-body b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(141, 156, 168, .5); }
.meal-body ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; display: none; gap: 3px; }
.meal.open .meal-body ul { display: grid; }
.ring-wrap { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.ring { width: 72px; height: 72px; }
.ring-bg { fill: none; stroke: var(--card2); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .4s var(--ease); }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.hero.tone-red { background: linear-gradient(160deg, #2a1c1c, var(--card)); }
.hero.tone-green { background: linear-gradient(160deg, #1b2a1a, var(--card)); }
.hero.tone-blue { background: linear-gradient(160deg, #172430, var(--card)); }
.hero.tone-yellow { background: linear-gradient(160deg, #2a2616, var(--card)); }
.meter { height: 10px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #8fd0ff); border-radius: 99px; transition: width .35s var(--ease); }
.close.alert { border-color: rgba(246, 196, 83, .5); }
.ai-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.ai-head { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 13px; }
.ai-head .ic { width: 16px; height: 16px; }
.ai-text { display: grid; gap: 8px; font-size: 15px; }
.ai-text ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Cuerpo ---------- */
.deltas { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; background: var(--card2); border-radius: 99px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.dchip small { color: var(--muted); font-weight: 600; font-size: 12px; }
.delta { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.delta.flat { color: var(--muted); }
.readout { display: flex; align-items: baseline; gap: 6px; }
.readout .muted { margin-left: auto; font-size: 14px; }
.chart-box { margin: 0 -6px; min-height: 120px; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ylab, .chart .xlab { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--card); stroke: var(--accent); stroke-width: 1.6; }
.chart .lastdot { fill: var(--accent); }
.chart .goal { stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 4 4; }
.chart .goallab { fill: var(--blue); font-size: 10.5px; font-weight: 700; }
.chart .curline { stroke: var(--text); stroke-opacity: .5; stroke-width: 1; }
.chart .curdot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.chart .bar { fill: var(--card2); }
.chart .bar.cur { fill: var(--accent); }
.chart .barval { fill: var(--muted); font-size: 10px; font-weight: 700; }
.bars-wrap .cap { text-align: center; margin-top: 4px; }
.stat2, .stat3 { display: grid; gap: 10px; }
.stat2 { grid-template-columns: 1fr 1fr; }
.stat3 { grid-template-columns: repeat(3, 1fr); }
.stat2 small, .stat3 small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.vs { font-style: normal; opacity: .8; }
.trend-note { font-size: 14.5px; color: var(--muted); }
.trend-note b { color: var(--text); }
.trend-note.good { color: var(--good); }
.tile { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.tile small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tile .num { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.tile em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.progress { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s var(--ease); }

/* ---------- Semana ---------- */
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dot-col { display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.dd { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1.5px solid var(--line); font-style: normal; font-weight: 800; font-size: 15px; }
.dd .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.dd.s-ok { background: var(--good); border-color: var(--good); color: #0b2415; }
.dd.s-changes { background: var(--warn); border-color: var(--warn); color: #2a2208; }
.dd.s-off { background: var(--bad); border-color: var(--bad); color: #2a0c09; }
.dd.future { opacity: .35; }
.tbl-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 6px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl thead th { color: var(--muted); font-size: 12px; font-weight: 700; }
.tbl tbody th { text-align: left; font-weight: 700; }
.tbl td small { display: block; font-size: 11px; }
pre.summary { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); background: var(--bg2); border-radius: 12px; padding: 12px; margin: 8px 0 0; user-select: text; -webkit-user-select: text; max-height: 320px; overflow: auto; }

/* ---------- Hojas, aviso, acceso ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-wrap.open { pointer-events: auto; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform .26s var(--ease); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 6px 18px; }
.sheet-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.confirm-msg { font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 18px); transform: translate(-50%, 20px); opacity: 0; background: #e9eff3; color: #0a0e11; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px; max-width: min(92vw, 460px); text-align: center; z-index: 80; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #2a0c09; }
.login { justify-content: center; }
.login-box { max-width: 380px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
#login { display: flex; flex-direction: column; gap: 14px; }
.login-box h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.logo { width: 60px; height: 60px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo .ic { width: 32px; height: 32px; }
.ic { width: 22px; height: 22px; flex-shrink: 0; }

/* Efectos hover solo con ratón (en táctil se quedarían "pegados") */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #202b34; }
  .btn.primary:hover { background: #d3fb4a; }
  .chip:hover:not(.on), .seg-b:hover:not(.on) { background: #202b34; }
  .row:hover { background: var(--card2); }
  .icon-btn:hover { background: var(--card2); }
  .tab:hover { color: var(--text); }
}

@media (min-width: 640px) {
  .screen { padding-left: calc(50% - 300px); padding-right: calc(50% - 300px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
