/* Ratones Sanos · estilo iOS */
:root {
  color-scheme: light dark;
  --bg: #f4f4f2; --card: #ffffff; --fill: #f0f0ee; --fill-2: #e2e2df; --sep: rgba(0,0,0,.08);
  --ink: #1c1c1c; --ink-2: #6e6e6b; --ink-3: #b0b0ac;
  --blue: #5b7a9a; --green: #6f9a7c; --orange: #c69a5c; --red: #b8675d; --pink: #b07084; --purple: #8b7fae; --teal: #6f9aa6; --yellow: #c2ac5a; --indigo: #7b7fae; --mint: #6f9aa6; --brown: #a08a72;
  --accent: var(--blue);
  --sandra: #b07084; --antonio: #5b7a9a;
  --c-sexo: #b07084; --c-sintoma: #c69a5c; --c-regla: #b8675d; --c-azucar: #c2ac5a; --c-alcohol: #8b7fae; --c-prob: #6f9a7c; --c-dia: #5b7a9a;
  --shadow: 0 1px 2px rgba(0,0,0,.03), 0 2px 10px rgba(0,0,0,.03);
  --r: 18px; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --tab-bg: rgba(246,246,244,.88);
}
:root[data-theme="dark"] {
  --bg: #111113; --card: #1c1c1f; --fill: #27272b; --fill-2: #34343a; --sep: rgba(255,255,255,.08);
  --ink: #ececec; --ink-2: #9a9aa0; --ink-3: #5c5c62;
  --blue: #8fa9c6; --green: #8dbb9a; --orange: #d6b078; --red: #d08a80; --pink: #c98ca0; --purple: #a89dcb; --teal: #8fb8c3; --yellow: #d6c27a; --indigo: #9d9fcb; --mint: #8fb8c3; --brown: #b8a48c;
  --sandra: #c98ca0; --antonio: #8fa9c6;
  --c-sexo: #c98ca0; --c-sintoma: #d6b078; --c-regla: #d08a80; --c-azucar: #d6c27a; --c-alcohol: #a89dcb; --c-prob: #8dbb9a; --c-dia: #8fa9c6;
  --shadow: none; --tab-bg: rgba(20,20,22,.88);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113; --card: #1c1c1f; --fill: #27272b; --fill-2: #34343a; --sep: rgba(255,255,255,.08);
    --ink: #ececec; --ink-2: #9a9aa0; --ink-3: #5c5c62;
    --blue: #8fa9c6; --green: #8dbb9a; --orange: #d6b078; --red: #d08a80; --pink: #c98ca0; --purple: #a89dcb; --teal: #8fb8c3; --yellow: #d6c27a; --indigo: #9d9fcb; --mint: #8fb8c3; --brown: #b8a48c;
    --sandra: #c98ca0; --antonio: #8fa9c6;
    --c-sexo: #c98ca0; --c-sintoma: #d6b078; --c-regla: #d08a80; --c-azucar: #d6c27a; --c-alcohol: #a89dcb; --c-prob: #8dbb9a; --c-dia: #8fa9c6;
    --shadow: none; --tab-bg: rgba(20,20,22,.88);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; margin: 0; }
button:active { opacity: .7; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 8px; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--ink-2); } .small { font-size: 13px; } .tabular { font-variant-numeric: tabular-nums; }

/* layout */
#app { padding: calc(var(--sat) + 6px) 16px calc(var(--sab) + 96px); max-width: 620px; margin: 0 auto; }
.nav { display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 0 14px; }
.nav .eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.nav h1 { font-size: 30px; font-weight: 700; letter-spacing: -.4px; }
.nav .tools { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--ink-2); box-shadow: var(--shadow); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatars { display: flex; gap: 8px; padding-bottom: 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; opacity: .35; transition: .2s; position: relative; }
.avatar.on { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px currentColor; }
.avatar.sandra { background: var(--sandra); color: var(--sandra); } .avatar.antonio { background: var(--antonio); color: var(--antonio); }
.avatar span { color: #fff; }
.avatar .sync { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); background: var(--ink-3); }
.avatar .sync.ok { background: var(--green); } .avatar .sync.pending { background: var(--orange); } .avatar .sync.off { background: var(--red); }

.card { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { flex: 1; font-size: 17px; font-weight: 600; }
.card-head .aside { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; color: #fff; opacity: .95; }
.ico.pink { background: var(--pink); } .ico.blue { background: var(--blue); } .ico.green { background: var(--green); } .ico.orange { background: var(--orange); } .ico.red { background: var(--red); } .ico.purple { background: var(--purple); } .ico.teal { background: var(--teal); } .ico.yellow { background: var(--yellow); } .ico.indigo { background: var(--indigo); } .ico.mint { background: var(--mint); } .ico.brown { background: var(--brown); }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 18px 0 10px; }
.section-title:first-child { margin-top: 4px; }
.row { display: flex; align-items: center; gap: 10px; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack > * + * { margin-top: 10px; }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 10px; line-height: 1.35; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border-radius: 14px; background: var(--fill); color: var(--accent); font-weight: 600; font-size: 17px; min-height: 50px; transition: transform .1s; }
.btn:active { transform: scale(.98); opacity: .85; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.tint { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.btn.green { background: var(--green); color: #fff; } .btn.green.tint { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.btn.orange.tint { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.btn.danger { color: var(--red); } .btn.danger.tint { background: color-mix(in srgb, var(--red) 12%, transparent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 8px 14px; min-height: 36px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }
.link { color: var(--accent); font-weight: 500; font-size: 15px; }

/* hero action */
.hero { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border-radius: var(--r); color: #fff; text-align: left; margin-bottom: 12px; box-shadow: 0 8px 24px rgba(255,45,85,.25); background: linear-gradient(135deg, #ff5e7e, #ff2d55 55%, #d61e45); }
.hero .em { font-size: 34px; }
.hero b { display: block; font-size: 19px; letter-spacing: -.2px; }
.hero small { font-size: 14px; opacity: .85; }
.hero .chev { margin-left: auto; opacity: .7; font-size: 22px; }

/* rings */
.rings { display: flex; justify-content: space-around; gap: 6px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .track { stroke: var(--fill); }
.ring .val { transition: stroke-dashoffset .5s ease; }
.ring .lbl { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ring .num { position: absolute; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring .wrap { position: relative; display: flex; align-items: center; justify-content: center; }

/* inline pickers */
.faces { display: flex; justify-content: space-between; gap: 6px; }
.faces button { flex: 1; aspect-ratio: 1; max-height: 60px; border-radius: 16px; font-size: 30px; display: flex; align-items: center; justify-content: center; background: transparent; transition: .15s; filter: grayscale(.6); opacity: .55; }
.faces button.on { background: var(--fill); filter: none; opacity: 1; transform: scale(1.06); }
.faces.num button { font-size: 20px; font-weight: 700; color: var(--ink-2); filter: none; opacity: 1; }
.faces.num button.on { color: #fff; background: var(--accent); }
.seg { display: flex; background: var(--fill); border-radius: 12px; padding: 2px; gap: 2px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; transition: .15s; }
.seg button.on { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
:root[data-theme="dark"] .seg button.on { background: var(--fill-2); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: var(--fill-2); box-shadow: none; } }
.glasses { display: flex; gap: 6px; justify-content: space-between; }
.glasses button { flex: 1; height: 44px; border-radius: 10px; background: var(--fill); display: flex; align-items: center; justify-content: center; transition: .15s; }
.glasses button svg { width: 18px; height: 26px; }
.glasses button.on { background: color-mix(in srgb, var(--blue) 18%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 500; color: var(--ink); transition: .15s; }
.chip.on { background: var(--accent); color: #fff; }
.chip.good { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.chip.warn { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.chip.bad { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.chip small { opacity: .8; font-size: 12px; }

/* food tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px; border-radius: 16px; background: var(--fill); transition: .15s; position: relative; }
.tile .em { font-size: 28px; line-height: 1; }
.tile .lb { font-size: 11px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.15; }
.tile.on.good { background: color-mix(in srgb, var(--green) 20%, transparent); } .tile.on.good .lb { color: var(--green); }
.tile.on.bad { background: color-mix(in srgb, var(--red) 18%, transparent); } .tile.on.bad .lb { color: var(--red); }
.tile.on.neutral { background: color-mix(in srgb, var(--orange) 20%, transparent); } .tile.on.neutral .lb { color: var(--orange); }
.tile .x2 { position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 6px; background: var(--red); color: #fff; }
.tile.on.good .x2 { background: var(--green); }
.food-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 8px; }
.food-head b { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.score { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--fill); margin-top: 12px; }
.score .big { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.score .big small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.score .txt { font-size: 14px; color: var(--ink-2); line-height: 1.3; }

/* lists */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--sep); width: 100%; text-align: left; }
.item:first-child { border-top: 0; padding-top: 2px; } .item:last-child { padding-bottom: 2px; }
.item .em { font-size: 24px; width: 34px; text-align: center; flex: none; }
.item .body { flex: 1; min-width: 0; }
.item .body b { display: block; font-size: 16px; font-weight: 600; }
.item .body > span { display: block; color: var(--ink-2); font-size: 14px; }
.item .time { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.item .chev { color: var(--ink-3); font-size: 20px; }
.check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink-3); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex: none; transition: .15s; }
.check.on { background: var(--green); border-color: var(--green); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--ink-2); vertical-align: middle; }
.pill-p { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.pill-p.sandra { background: var(--sandra); } .pill-p.antonio { background: var(--antonio); } .pill-p.ambos { background: linear-gradient(90deg, var(--antonio), var(--sandra)); }
.dots-btn { color: var(--ink-3); font-size: 22px; padding: 4px 6px; }

/* cycle ring */
.cycle { display: flex; align-items: center; gap: 16px; }
.cycle svg { width: 120px; height: 120px; flex: none; }
.cycle .c { fill: none; stroke-linecap: round; }
.cycle .info b { font-size: 20px; display: block; }
.cycle .info .ph { font-size: 15px; font-weight: 600; }
.cycle .info p { font-size: 13px; color: var(--ink-2); margin: 4px 0 0; line-height: 1.3; }

/* forms in sheets */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
input[type=text], input[type=number], input[type=time], input[type=date], input[type=password], select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--fill); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; font-size: 17px; }
textarea { min-height: 70px; resize: vertical; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 16px; background: var(--fill); text-align: left; transition: .15s; }
.toggle .em { font-size: 26px; }
.toggle b { font-size: 15px; } .toggle small { font-size: 12px; color: var(--ink-2); }
.toggle.on { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.toggle.on small { color: var(--accent); }
.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); flex: none; transition: .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: .2s; }
.switch.on { background: var(--green); } .switch.on::after { left: 22px; }
.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: 12px; }
.stepper button { width: 44px; height: 44px; font-size: 22px; font-weight: 600; color: var(--accent); }
.stepper span { min-width: 64px; text-align: center; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

/* sheet */
#sheet-root:empty { display: none; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 16px 16px 0 0; padding: 8px 16px calc(var(--sab) + 16px); animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .handle { width: 36px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; font-weight: 700; }
.sheet-foot { display: flex; gap: 10px; margin-top: 12px; position: sticky; bottom: 0; background: var(--bg); padding-top: 8px; }
.sheet-foot .btn { flex: 1; }
@keyframes up { from { transform: translateY(60px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 6px 4px calc(var(--sab) + 4px); background: var(--tab-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--sep); z-index: 30; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 8px; font-size: 10px; font-weight: 500; color: var(--ink-2); min-width: 58px; }
.tabbar button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--accent); }
.tabbar button.on svg { stroke-width: 2.2; }

/* login */
.login { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.login .logo { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.login h1 { font-size: 30px; text-align: center; }
.profile-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-pick button { padding: 18px 10px; border-radius: 18px; background: var(--card); font-weight: 700; font-size: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: inset 0 0 0 2px transparent; transition: .15s; }
.profile-pick .avatar { opacity: 1; width: 48px; height: 48px; font-size: 20px; }
.profile-pick button.on[data-p="sandra"] { box-shadow: inset 0 0 0 2.5px var(--sandra); }
.profile-pick button.on[data-p="antonio"] { box-shadow: inset 0 0 0 2.5px var(--antonio); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { font-size: 20px; font-weight: 700; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--ink-2); font-weight: 600; padding-bottom: 4px; }
.cal .day { aspect-ratio: 1; max-height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; transition: .15s; }
.cal .day.out { opacity: .3; }
.cal .day.today { color: var(--accent); font-weight: 700; }
.cal .day.sel { background: var(--accent); color: #fff; }
.cal .day.regla:not(.sel) { background: color-mix(in srgb, var(--red) 16%, transparent); }
.cal .day.hasdata:not(.sel) { background: var(--fill); }
.cal .dots { display: flex; gap: 2px; height: 5px; }
.cal .dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.cal .day.sel .dots i { background: #fff !important; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: var(--ink-2); margin-top: 12px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* día */
.dayhead { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 10px; }
.dayhead h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.dayhead .link { font-size: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* analytics */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.stat .top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.stat .top .ico { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.stat .l { font-size: 12px; color: var(--ink-2); line-height: 1.25; }
.strip { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.strip svg { display: block; } .strip text { font-family: inherit; }
.bar-row { padding: 8px 0; border-top: 1px solid var(--sep); }
.bar-row:first-of-type { border-top: 0; }
.bar-row .lbl { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 5px; }
.bar-row .lbl b { font-variant-numeric: tabular-nums; }
.bar-row .track { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 4px; background: var(--blue); }
.bar-row.warn .fill { background: var(--orange); }
.bar-row .n { color: var(--ink-2); font-size: 13px; }
.factor { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 2px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 7px 4px; text-align: right; border-top: 1px solid var(--sep); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl thead th { border-top: 0; color: var(--ink-2); font-weight: 600; font-size: 12px; }
.md h2 { font-size: 15px; margin: 14px 0 6px; color: var(--accent); font-weight: 700; }
.md h2:first-child { margin-top: 0; }
.md ul { margin: 4px 0 8px; padding-left: 18px; } .md li { margin: 3px 0; } .md p { margin: 0 0 8px; font-size: 15px; }
.callout { padding: 12px 14px; background: color-mix(in srgb, var(--orange) 14%, transparent); border-radius: 14px; margin: 8px 0; font-size: 14px; color: var(--ink); }

/* guía */
details { border-top: 1px solid var(--sep); }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '›'; color: var(--ink-3); font-size: 22px; transform: rotate(90deg); transition: .2s; }
details[open] summary::after { transform: rotate(-90deg); }
details .body { padding: 0 0 14px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
details .body ul { padding-left: 18px; margin: 6px 0; } details .body li { margin: 5px 0; }
details .body b { color: var(--ink); }

/* settings grouped list */
.group { background: var(--card); border-radius: var(--r); padding: 0 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.grow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sep); width: 100%; text-align: left; min-height: 52px; }
.grow:first-child { border-top: 0; }
.grow .body { flex: 1; min-width: 0; }
.grow .body b { display: block; font-weight: 500; font-size: 17px; }
.grow .body span { display: block; color: var(--ink-2); font-size: 13px; }
.grow .chev { color: var(--ink-3); font-size: 22px; }
.grow .val { color: var(--ink-2); font-size: 15px; }
.grow .body b .tag { margin-left: 4px; }
.grow.sub { min-height: 0; padding: 6px 0 12px; border-top: 0; }
.grow.link b { color: var(--accent); } .grow.danger b { color: var(--red); }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 100px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; max-width: 88vw; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { text-align: center; color: var(--ink-2); padding: 18px 10px; font-size: 15px; }
.pulse { animation: pulse 1.2s infinite; } @keyframes pulse { 50% { opacity: .5; } }
.pop { animation: pop .25s; } @keyframes pop { 50% { transform: scale(1.12); } }

/* print */
#print { display: none; }
@media print {
  #app, #sheet-root, #toast, .tabbar { display: none !important; }
  #print { display: block; color: #000; background: #fff; font: 12px/1.4 system-ui, sans-serif; }
  #print h1 { font-size: 20px; margin: 0 0 4px; } #print h2 { font-size: 14px; margin: 16px 0 6px; border-bottom: 1px solid #999; padding-bottom: 2px; }
  #print table { width: 100%; border-collapse: collapse; font-size: 11px; } #print th, #print td { border: 1px solid #ccc; padding: 3px 5px; text-align: left; vertical-align: top; } #print th { background: #eee; }
  #print .md h2 { border: 0; font-size: 13px; margin: 10px 0 2px; }
  @page { margin: 14mm; }
}
