/* Ancla — sobrio, legible, nativo en iPhone. */
:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --surface-2: #EFEDE7;
  --ink: #1B1B19;
  --ink-2: #3A3A36;
  --muted: #6E6C66;
  --line: #E2DFD7;
  --line-strong: #CFCBC1;
  --accent: #2E4A3B;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3EAE4;
  --warn: #9B3A2A;
  --warn-soft: #F4E4DF;
  --ok: #3D6B4F;
  --amber: #A06A1B;
  --radius: 14px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(27, 27, 25, .04), 0 4px 16px rgba(27, 27, 25, .04);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --surface: #1C1C1A; --surface-2: #242421; --ink: #ECEAE3; --ink-2: #CFCDC6; --muted: #9A978E;
    --line: #2C2C29; --line-strong: #3A3A36; --accent: #9DBBA6; --accent-ink: #12201A; --accent-soft: #22302A;
    --warn: #E09A88; --warn-soft: #3A2520; --ok: #9DBBA6; --amber: #D9A85C;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --surface: #1C1C1A; --surface-2: #242421; --ink: #ECEAE3; --ink-2: #CFCDC6; --muted: #9A978E;
  --line: #2C2C29; --line-strong: #3A3A36; --accent: #9DBBA6; --accent-ink: #12201A; --accent-soft: #22302A;
  --warn: #E09A88; --warn-soft: #3A2520; --ok: #9DBBA6; --amber: #D9A85C; --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.ico { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100dvh; }
.sidebar { display: none; }
.content { flex: 1; min-width: 0; }
main {
  max-width: 680px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px);
}
body.bare .tabbar, body.bare .sidebar { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 4px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ico { stroke-width: 2.1; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh;
    width: 232px; flex: none; padding: 28px 16px; border-right: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font: 600 20px/1 var(--serif); letter-spacing: -0.01em; }
  #sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
  #sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-size: 15px; }
  #sidebar-nav a:hover { background: var(--surface-2); }
  #sidebar-nav a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
  main { padding: 48px 40px 64px; }
}

/* ---------- Tipografía ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
h1 { font: 600 30px/1.15 var(--serif); letter-spacing: -0.02em; }
h2 { font-size: 15px; line-height: 1.3; }
h3 { font-size: 15px; }
p { margin: 0; }
p + p { margin-top: 8px; }
.eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 18px; line-height: 1.45; }
span.block { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.pre { white-space: pre-wrap; }
.link { color: var(--accent); font-weight: 500; }
.hint { display: flex; align-items: center; gap: 6px; margin-top: 28px; font-size: 12.5px; color: var(--muted); }
.center-text { text-align: center; }

.page-head { margin-bottom: 22px; }
.page-head p.muted { margin-top: 6px; max-width: 52ch; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 15px; margin-left: -4px; }

/* ---------- Utilidades ---------- */
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; }
.row.center { align-items: center; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.center-row { justify-content: center; }
.gap { gap: 10px; } .gap-s { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mt-xs { margin-top: 6px; }
.full { width: 100%; }
@media (max-width: 380px) { .hide-xs { display: none; } }

/* ---------- Secciones ---------- */
section.block { margin-top: 30px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.block-head h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.empty { color: var(--muted); font-size: 15px; padding: 4px 0; }
.empty-state { text-align: center; padding: 40px 16px; }
.empty-state p + p { margin-top: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 15px; font-weight: 550; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.danger-text { color: var(--warn) !important; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13.5px; border-radius: 8px; }
.btn.lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn.xl { min-height: 56px; font-size: 17px; border-radius: 14px; margin-top: 30px; }
.btn.icon-only { width: 44px; padding: 0; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.subtle { color: var(--muted); width: 32px; height: 32px; }
.icon-btn.star.on, .icon-btn.on { color: var(--amber); }
.icon-btn.star.on .ico, .icon-btn.on .ico { fill: currentColor; }

/* ---------- Formularios ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 16px; /* evita zoom en iOS */
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; line-height: 1.45; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236E6C66' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.inline-form { display: flex; gap: 8px; }
.inline-form.big input { min-height: 52px; font-size: 17px; }
.inline-form.big .btn { width: 52px; min-height: 52px; }
.search { margin-bottom: 14px; }
.title-input { border: 0 !important; padding: 4px 0 !important; min-height: 0 !important; font: 600 20px/1.3 var(--serif) !important; box-shadow: none !important; background: transparent !important; }

.toggles { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; font-size: 15px; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle input { appearance: none; -webkit-appearance: none; width: 42px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; flex: none; order: 2; margin-left: auto; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle small { font-weight: 400; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 550; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.count { font-weight: 500; opacity: .7; margin-left: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; color: var(--ink-2); text-align: left; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.range { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.range input { flex: 1; accent-color: var(--accent); }

.days { display: flex; gap: 6px; }
.day { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.copy-box { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.copy-box code { flex: 1; min-width: 0; font: 12.5px/1.4 var(--mono); word-break: break-all; color: var(--ink-2); }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* ---------- Pills / dots ---------- */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; flex: none; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--accent-soft); color: var(--ok); }
.pill.subtle { background: var(--surface-2); color: var(--muted); }
.tag { font-size: 11.5px; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.overdue, .dot.due { background: var(--warn); }
.dot.today { background: var(--amber); }
.dot.upcoming { background: var(--ok); }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 52px; }
a.list-row:hover { background: var(--surface-2); }
.list.compact .list-row { padding: 10px 14px; min-height: 0; font-size: 15px; }
.list.cards { border-radius: var(--radius); }
.client-row { align-items: flex-start; }
.client-row .dot { margin-top: 8px; }
.client-row > .ico { align-self: center; }
.menu .list-row { padding: 15px 14px; }

.tasks { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.task { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; min-height: 54px; }
.task + .task { border-top: 1px solid var(--line); }
.task-body { flex: 1; min-width: 0; padding: 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-size: 16px; line-height: 1.35; }
.task-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); align-items: center; }
.task-meta span { display: inline-flex; align-items: center; gap: 3px; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.check { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--line-strong); background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; padding: 0; transition: background .15s, border-color .15s; }
.check:hover { border-color: var(--accent); }
.task.done .check, .check.on, .steps li.done .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check.lg { width: 28px; height: 28px; }
.check.sm { width: 20px; height: 20px; }

.steps { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.steps li.done span { color: var(--muted); text-decoration: line-through; }

.pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 6px; }
.pick { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 15px; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pick input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pick:has(input:disabled) { opacity: .5; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; flex-direction: column; gap: 2px; position: relative; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: -19px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }

/* ---------- Hoy ---------- */
.ritual { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.ritual + .ritual { margin-top: 8px; }
.ritual-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.action { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); min-height: 124px; }
.action strong { display: block; font-size: 16px; margin-bottom: 2px; }
.action .small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.action.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.action.primary .small { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.action:active { transform: scale(.99); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 30px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }
.stats > div { background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.page-head + .stats { margin-top: 0; }
.stat-num { font: 600 22px/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.stat-label { font-size: 12.5px; color: var(--muted); }

/* ---------- Enfoque ---------- */
.focus-title { font-size: 24px; margin-top: 4px; }
.timer-wrap { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 12px auto 26px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.4; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.timer-num { font: 300 64px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.duration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.duration { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--muted); }
.duration-num { font: 600 22px/1.1 var(--serif); font-variant-numeric: lining-nums; color: var(--ink); }
.duration.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.timer-banner { position: sticky; top: 0; z-index: 15; background: var(--ink); color: var(--bg); padding-top: env(safe-area-inset-top); }
.timer-banner a { display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 0 auto; padding: 10px 16px; font-size: 14px; font-weight: 550; }
.timer-banner .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-banner:not([hidden]) + main { padding-top: 20px; }

/* ---------- Asistentes ---------- */
.wizard { padding: 22px 18px; }
.wizard .q { font: 600 22px/1.25 var(--serif); letter-spacing: -0.015em; margin-bottom: 6px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.wizard-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 4px; }
.wizard-steps li { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.wizard-steps li.done, .wizard-steps li.on { background: var(--accent); }
.wizard-steps li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dots { display: flex; gap: 6px; margin: -8px 0 14px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.dots span.on { background: var(--accent); }
.options { display: grid; gap: 8px; }
@media (min-width: 560px) { .options { grid-template-columns: 1fr 1fr; } }
.option { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.option strong { font-size: 15px; font-weight: 600; }
.option.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.strategy { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.strategy h3 { margin-bottom: 4px; }
.strategy p { font-size: 15px; color: var(--ink-2); }
.plan { margin: 18px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font: 500 18px/1.4 var(--serif); }

/* ---------- Guías ---------- */
.guide { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.guide li::marker { color: var(--muted); font-weight: 600; }
.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.install { border-color: var(--accent); }
.install h2 { font: 600 18px/1.3 var(--serif); margin-bottom: 12px; }
.install .ico { display: inline; vertical-align: -3px; }
.about h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }

/* ---------- Gráficas ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 12px 12px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bar-chart.tall { height: 180px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-stack { width: 100%; max-width: 28px; min-height: 2px; display: flex; flex-direction: column; border-radius: 4px 4px 1px 1px; overflow: hidden; }
.bar-a { background: var(--line-strong); }
.bar-b { background: var(--accent); }
.bar-label { font-size: 11px; color: var(--muted); padding-bottom: 8px; text-transform: capitalize; }
.bar-val { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.a { background: var(--line-strong); margin-left: 10px; }
.sw.b { background: var(--accent); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 11rem) 1fr 2rem; gap: 10px; align-items: center; font-size: 14px; }
.hbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ---------- Bienvenida ---------- */
.welcome { max-width: 460px; margin: 6vh auto 0; }
.welcome-logo { border-radius: 14px; margin-bottom: 18px; }
.welcome h1 { font-size: 38px; }
.welcome .lead { margin-top: 8px; color: var(--ink-2); }
.welcome-list { list-style: none; margin: 26px 0 30px; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--muted); }
.welcome-list li { padding-left: 16px; border-left: 2px solid var(--line-strong); }
.welcome-list strong { color: var(--ink); font-weight: 600; }
.welcome .btn.xl { margin-top: 6px; }

/* ---------- Hojas modales ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 14, .38); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; transform: translateY(24px); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .2s; padding-bottom: env(safe-area-inset-bottom); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; opacity: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px 18px; }
.sheet-head h2 { font: 600 19px/1.3 var(--serif); }
.sheet-body { padding: 8px 18px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 18px; }
}

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); transform: translate(-50%, 12px); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 11px; font-size: 14px; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

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