/* POLLETEFIT IA · Estilos */
:root {
  --bg: #F3F4F7; --card: #FFFFFF; --card2: #F6F7FA; --text: #0E1116; --muted: #6B7280;
  --line: rgba(15, 20, 30, .08); --track: rgba(15, 20, 30, .07);
  --accent: #FF5A36; --accent2: #FFB23F; --ok: #19B37A; --down: #19B37A; --up: #E5484D;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --r: 22px; --nav: 78px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0C0F; --card: #15181D; --card2: #1C2026; --text: #F2F4F7; --muted: #8B93A1;
  --line: rgba(255, 255, 255, .07); --track: rgba(255, 255, 255, .08);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--accent); cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 22px; } h3 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.ic { flex: none; }
#app { max-width: 560px; margin: 0 auto; }

/* ---------- Cabecera ---------- */
.top { position: sticky; top: 0; z-index: 20; padding: calc(env(safe-area-inset-top) + 14px) 18px 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); }
.top-row { display: flex; justify-content: space-between; align-items: flex-start; }
.hello { font-size: 25px; letter-spacing: -.03em; font-weight: 500; }
.hello b { font-weight: 750; }
.today { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pill { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--card); color: var(--muted); box-shadow: var(--shadow); }
.pill.ok { color: var(--ok); }
.profiles { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.profiles::-webkit-scrollbar { display: none; }
.prof { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 15px; transition: .25s; white-space: nowrap; }
.prof.on { background: var(--pc); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--pc) 45%, transparent); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 14px; color: #fff; background: var(--pc, var(--accent)); flex: none; }
.prof.on .avatar { background: rgba(255, 255, 255, .25); }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.xl { width: 64px; height: 64px; font-size: 28px; }

/* ---------- Vista ---------- */
.view { padding: 6px 16px calc(var(--nav) + env(safe-area-inset-bottom) + 24px); display: flex; flex-direction: column; gap: 14px; }
.fade-in { animation: fade .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-t { font-size: 24px; margin: 6px 2px 0; }
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card[data-act]:not([data-act=""]) { cursor: pointer; transition: transform .15s; }
.card[data-act]:not([data-act=""]):active { transform: scale(.985); }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.muted { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.small { font-size: 14px; } .tiny { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.center { text-align: center; }
.big-n { font-size: 38px; font-weight: 780; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.big-n small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sub { color: var(--muted); font-size: 13px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.down { color: var(--down); font-weight: 650; } .up { color: var(--up); font-weight: 650; }
.notice { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent2) 16%, var(--card)); line-height: 1.4; }

/* ---------- Anillos y barras ---------- */
.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring-val { transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring-inner { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 99px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }

/* ---------- Héroe ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 260px; height: 260px; left: -90px; top: -90px; background: radial-gradient(circle, rgba(255, 106, 54, .18), transparent 65%); pointer-events: none; }
.hero .tiny { grid-column: 1 / -1; margin: 0; }
.hero .big-n { font-size: 36px; }
.macros { display: flex; flex-direction: column; gap: 11px; }
.macro-h { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--muted); }
.macro-h b { color: var(--text); font-variant-numeric: tabular-nums; }
.macro-h small { color: var(--muted); font-weight: 500; }
@media (max-width: 370px) { .hero { grid-template-columns: 1fr; justify-items: center; } .macros { width: 100%; } }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tile .ring-inner { color: var(--muted); }
.tile-t { display: flex; flex-direction: column; gap: 2px; }
.tile-t b { font-size: 20px; letter-spacing: -.02em; }
.tile-t span { font-size: 12.5px; color: var(--muted); }
.tile-t em { font-style: normal; font-size: 12px; font-weight: 650; color: var(--accent); margin-top: 4px; }

.meals-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.meal-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px; background: var(--card2); font-size: 12.5px; font-weight: 600; color: var(--muted); position: relative; transition: .2s; }
.meal-chip span { font-size: 22px; filter: grayscale(.6); opacity: .8; }
.meal-chip.done { background: color-mix(in srgb, var(--ok) 14%, var(--card)); color: var(--text); }
.meal-chip.done span { filter: none; opacity: 1; }
.meal-chip .ic { position: absolute; top: 6px; right: 6px; color: var(--ok); }

.weight-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pred { margin-top: 14px; padding: 11px 13px; border-radius: 14px; background: var(--card2); font-size: 13.5px; line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.pred .ic { color: var(--accent); margin-top: 2px; }

.habits { display: flex; flex-direction: column; gap: 12px; }
.habit { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.habit-n { font-size: 13.5px; }
.habit-days { display: flex; gap: 4px; }
.habit-days i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--card2); }
.habit-days i.on { background: linear-gradient(135deg, #FF5A36, #FFB23F); color: #fff; }
.fam-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.grow { flex: 1; min-width: 0; }
.soon { display: flex; flex-direction: column; gap: 14px; background: var(--card2); box-shadow: none; border: 1px dashed var(--line); }
.soon-row { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.soon-row div { display: flex; flex-direction: column; gap: 2px; }
.soon-row b { color: var(--text); font-size: 14.5px; }
.soon-row span { font-size: 13px; line-height: 1.4; }

/* ---------- Erik ---------- */
.kid-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #FF9F1C, #FF5C8A 60%, #A66CFF); color: #fff; }
.kid-hero p { margin: 4px 0 0; opacity: .92; font-size: 14px; }
.kid-emoji { font-size: 48px; }
.glasses, .stars { display: flex; flex-wrap: wrap; gap: 2px; font-size: 20px; }
.glasses span, .stars span { opacity: .22; filter: grayscale(1); transition: .3s; }
.glasses span.on, .stars span.on { opacity: 1; filter: none; }
.idea { display: flex; gap: 14px; align-items: center; }
.idea-e { font-size: 44px; width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; background: var(--card2); flex: none; }
.idea p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.groups { display: flex; flex-wrap: wrap; gap: 8px; }
.grp { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: var(--card2); font-size: 13px; color: var(--muted); }
.grp.on { background: color-mix(in srgb, var(--gc) 20%, var(--card)); color: var(--text); font-weight: 600; }
.grp span { font-size: 16px; }

/* ---------- Diario ---------- */
.seg { display: flex; padding: 4px; border-radius: 14px; background: var(--card2); gap: 2px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--muted); transition: .2s; display: flex; align-items: center; justify-content: center; gap: 5px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.seg.small { margin-bottom: 12px; } .seg.small button { padding: 7px 4px; font-size: 13px; }
.seg.big button { padding: 12px; font-size: 15px; }
.seg.icons button { font-size: 12.5px; padding: 9px 2px; }
.view > .seg { background: var(--card); box-shadow: var(--shadow); }
.datenav { display: flex; align-items: center; justify-content: space-between; }
.datenav-t { font-weight: 650; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); }
.icon-btn.sm { width: 32px; height: 32px; box-shadow: none; background: transparent; color: var(--muted); }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekstrip button { padding: 8px 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--card); box-shadow: var(--shadow); }
.weekstrip span { font-size: 11px; color: var(--muted); font-weight: 650; }
.weekstrip b { font-size: 16px; }
.weekstrip .on { background: linear-gradient(135deg, #FF5A36, #FFB23F); color: #fff; }
.weekstrip .on span { color: rgba(255, 255, 255, .85); }
.totals { display: flex; flex-direction: column; gap: 16px; }
.tot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.tot-grid div { display: flex; flex-direction: column; gap: 2px; }
.tot-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tot-grid span { font-size: 11px; color: var(--muted); }
.meal .btn.ghost { margin-top: 8px; }
.food-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.food-row:last-of-type { border-bottom: 0; }
.food-row .grow { display: flex; flex-direction: column; gap: 2px; }
.food-row .grow b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-row .grow span { font-size: 12px; color: var(--muted); }
.kc { font-variant-numeric: tabular-nums; }
.g-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kv b { text-align: right; font-weight: 600; }
.kv small { margin-left: 4px; }
.code { letter-spacing: .18em; font-family: ui-monospace, Menlo, monospace; color: var(--accent); }
.ok-t { color: var(--ok); }
.insights { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }

/* ---------- Gráficos ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .goal { stroke: var(--ok); stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart .goal-t { fill: var(--ok); font-weight: 650; }
.chart .dot { fill: var(--muted); opacity: .45; }
.chart .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.empty-chart { height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 14px; background: var(--card2); border-radius: 16px; text-align: center; padding: 20px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
.lg-line { width: 16px; height: 3px; border-radius: 3px; }
.vbars { position: relative; display: flex; gap: 3px; align-items: flex-end; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.vbar-track { width: 100%; max-width: 30px; display: flex; align-items: flex-end; }
.vbar-fill { width: 100%; height: 0; border-radius: 6px 6px 3px 3px; transition: height 1s cubic-bezier(.2, .8, .2, 1); min-height: 2px; }
.vbar span { font-size: 10px; color: var(--muted); height: 14px; font-weight: 650; }
.vbar.on span { color: var(--accent); }
.vbars-meta { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ok); opacity: .8; }
.spark { flex: none; }

/* ---------- Progreso ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; }
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 20px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat em { font-style: normal; font-size: 11px; color: var(--muted); }
.pred-card p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.pred-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pred-big b { font-size: 42px; letter-spacing: -.04em; background: linear-gradient(135deg, #FF5A36, #FFB23F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pred-big span { color: var(--muted); }
.warn { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent2) 18%, var(--card)); font-size: 13.5px !important; }
.measures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.measures div { background: var(--card2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.measures span { font-size: 11.5px; color: var(--muted); }
.measures b { font-size: 16px; }
.measures small { font-size: 11px; }
.locked { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; color: var(--muted); }
.locked h3 { color: var(--text); justify-content: center; }
.locked p { margin: 0; font-size: 14px; }

/* ---------- Perfil ---------- */
.profile-card { display: flex; align-items: center; gap: 16px; }
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row .btn { flex: 1; }
.switch { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 14px !important; color: var(--text) !important; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- Formularios y botones ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
input:not([type=checkbox]):not([type=radio]), select { width: 100%; padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--card2); font-size: 16px; outline: none; transition: border .2s; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus { border-color: var(--accent); }
input[type=date] { min-height: 48px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.name-in { font-size: 18px !important; font-weight: 700; padding: 6px 10px !important; background: transparent !important; border-color: transparent !important; }
.dot-c { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.card-h:has(.name-in) { justify-content: flex-start; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.45; font-weight: 400; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 18px; border-radius: 15px; font-weight: 650; font-size: 15px; background: var(--card2); transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #FF5A36, #FF8A3D); color: #fff; box-shadow: 0 8px 20px rgba(255, 90, 54, .3); }
.btn.big { padding: 17px; font-size: 16px; }
.btn.ghost { background: var(--card2); width: 100%; }
.btn.danger { color: var(--up); margin-top: 8px; }

/* ---------- Barra inferior ---------- */
.tabbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 650; color: var(--muted); padding: 4px 0; transition: color .2s; }
.tab.on { color: var(--accent); }
.fab { justify-self: center; width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FF5A36, #FFB23F); box-shadow: 0 10px 24px rgba(255, 90, 54, .4); transform: translateY(-12px); transition: transform .15s; }
.fab:active { transform: translateY(-12px) scale(.94); }

/* ---------- Hojas ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .28s; }
.sheet { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--card); border-radius: 28px 28px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px); transform: translate(-50%, 100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; gap: 14px; }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--track); margin: 0 auto 4px; flex: none; }
.sheet-t { font-size: 19px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-b { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px; border-radius: 18px; background: var(--card2); font-size: 13px; font-weight: 650; }
.quick-b span { font-size: 28px; }
.quick-b small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); }
.search span { color: var(--muted); display: flex; }
.search input { border: 0 !important; background: transparent !important; padding-left: 0 !important; }
.results { display: flex; flex-direction: column; max-height: 42dvh; overflow-y: auto; }
.res { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); }
.res .grow { display: flex; flex-direction: column; gap: 2px; }
.res b { font-weight: 600; font-size: 14.5px; }
.res span { font-size: 12px; color: var(--muted); }
.res img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #fff; }
.res-e { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); font-size: 22px; flex: none; }
.res-e.big { width: 56px; height: 56px; font-size: 30px; }
.det-h { display: flex; align-items: center; gap: 14px; }
.det-h img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.back { display: flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; font-size: 15px; align-self: flex-start; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; }
.chip { flex: none; padding: 8px 12px; border-radius: 99px; background: var(--card2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip-r input { display: none; }
.chip-r span { display: block; padding: 9px 14px; border-radius: 99px; background: var(--card2); font-size: 13.5px; font-weight: 600; color: var(--text); }
.chip-r input:checked + span { background: var(--accent); color: #fff; }
.soon-big { text-align: center; padding: 20px 10px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soon-big h3 { color: var(--text); }
.soon-big p { margin: 0; font-size: 14px; line-height: 1.5; }
.loader { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Acceso ---------- */
.auth { padding: calc(env(safe-area-inset-top) + 40px) 18px 40px; display: flex; flex-direction: column; gap: 14px; }
.brand { text-align: center; margin-bottom: 10px; }
.brand-logo img { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 14px 34px rgba(255, 90, 54, .35); }
.brand h1 { font-size: 30px; margin-top: 14px; letter-spacing: -.04em; font-weight: 800; }
.brand h1 span { background: linear-gradient(135deg, #FF5A36, #FFB23F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Avisos ---------- */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 100px); transform: translate(-50%, 20px); opacity: 0; background: #111418; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 99; transition: .3s; max-width: 90vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
[data-theme="dark"] .toast { background: #F2F4F7; color: #111; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--up); color: #fff; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .chart .draw { stroke-dashoffset: 0; } }

/* ---------- Fase 2: foto IA y escáner ---------- */
.photo-pick { display: flex; flex-direction: column; gap: 10px; }
.photo-pick .btn { width: 100%; }
.note-l { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.photo-prev { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #000; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, #FFB23F, #FF5A36, transparent); box-shadow: 0 0 18px #FF8A3D; animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: 6%; } to { top: 94%; } }
.thumb-l { width: 64px !important; height: 64px !important; border-radius: 16px !important; object-fit: cover; }
.ai-list { display: flex; flex-direction: column; }
.ai-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ai-row .grow { display: flex; flex-direction: column; gap: 3px; }
.ai-row .grow span { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-name { padding: 4px 6px !important; margin-left: -6px; font-weight: 600; font-size: 15px !important; background: transparent !important; border-color: transparent !important; }
.ai-name:focus { border-color: var(--accent) !important; }
.ai-g { display: flex; align-items: center; gap: 3px; }
.ai-g input { width: 70px !important; padding: 8px !important; text-align: right; font-weight: 650; }
.ai-g small { color: var(--muted); font-size: 12px; }
.conf { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: var(--card2); }
.conf.alta { color: var(--ok); } .conf.media { color: #E3A008; } .conf.baja { color: var(--up); }
.scanner { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.soon-row[data-act]:not([data-act=""]) { cursor: pointer; }

/* ---------- Fase 3: entrenamiento ---------- */
.top-act { display: flex; align-items: center; gap: 8px; }
.top-act .icon-btn { width: 36px; height: 36px; border-radius: 50%; }
.no-scroll { overflow: hidden; }
.chip.on { background: var(--accent); color: #fff; }
.card-s { background: var(--card); box-shadow: var(--shadow); border: 0; }
.fld { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.link { color: var(--accent); font-weight: 650; font-size: 14px; padding: 6px 0; align-self: flex-start; }
.link.danger { color: var(--up); }
.ok-box { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 14%, var(--card)); font-size: 13.5px; margin: 0; }
.cta { background: linear-gradient(135deg, color-mix(in srgb, #FF5A36 16%, var(--card)), var(--card)); display: flex; flex-direction: column; gap: 14px; }
.cta-h { display: flex; gap: 12px; align-items: flex-start; }
.cta-h .ic { color: var(--accent); }
.cta-h p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.wk-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wk-d { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; background: var(--card2); }
.wk-d span { font-size: 11px; color: var(--muted); font-weight: 700; }
.wk-d b { font-size: 15px; height: 20px; display: grid; place-items: center; }
.wk-d em { font-style: normal; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wk-d.plan { background: color-mix(in srgb, var(--pc) 16%, var(--card)); }
.wk-d.plan em { color: var(--text); font-weight: 650; }
.wk-d.hoy { outline: 2px solid var(--pc); }
.wk-d.done { background: var(--pc); color: #fff; }
.wk-d.done span, .wk-d.done em { color: rgba(255, 255, 255, .9); }
.today-card { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.today-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--pc) 30%, transparent), transparent 70%); pointer-events: none; }
.today-card h2 { font-size: 24px; }
.today-card p { margin: 0 0 6px; }
.today-card .btn { margin-top: 8px; }
.today-done { display: flex; gap: 12px; align-items: center; color: var(--ok); }
.today-done p { margin: 2px 0 0; color: var(--muted); }
.mini-ej { display: flex; gap: 6px; margin: 6px 0; }
.ej-img { position: relative; background: var(--card2) center / contain no-repeat; display: grid; place-items: center; border-radius: 14px; flex: none; }
[data-theme="dark"] .ej-img.has-img { background-color: #F4F4F2; }
.ej-img.has-img { background-color: #fff; }
.ej-img.has-img span { display: none; }
.ej-img span { font-size: 26px; opacity: .8; }
.ej-img.sm { width: 46px; height: 46px; border-radius: 12px; } .ej-img.sm span { font-size: 20px; }
.ej-img.xs { width: 40px; height: 40px; border-radius: 10px; } .ej-img.xs span { font-size: 18px; }
.ej-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ej-card { background: var(--card); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--text); }
.ej-card .ej-img { width: 100%; aspect-ratio: 4 / 3; }
.ej-card b { font-size: 13.5px; line-height: 1.25; }
.ej-card span { font-size: 11.5px; color: var(--muted); }
.ej-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ej-hero .ej-img.big { width: 100%; aspect-ratio: 1; border-radius: 18px; }
.ej-hero .ej-img.big:only-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.ej-hero .ej-img.big span { font-size: 54px; }
.pauta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pauta div { background: var(--card2); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.pauta b { font-size: 17px; } .pauta span { font-size: 11px; color: var(--muted); }
.ej-sec h4 { margin: 0 0 6px; font-size: 14px; }
.ej-sec p, .ej-sec li { font-size: 14px; line-height: 1.5; margin: 0; }
.ej-sec ol, .ej-sec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.warn-sec { background: color-mix(in srgb, var(--up) 9%, var(--card)); padding: 12px 14px; border-radius: 14px; }
.rut-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); }
.rut-row:last-of-type { border-bottom: 0; }
.rut-row .grow { display: flex; flex-direction: column; gap: 2px; }
.rut-row b { font-size: 15px; } .rut-row span { font-size: 12.5px; color: var(--muted); }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow button { aspect-ratio: 1; border-radius: 12px; background: var(--card2); font-weight: 700; color: var(--muted); }
.dow button.on { background: var(--accent); color: #fff; }
.plt-list { display: flex; flex-direction: column; gap: 8px; }
.plt { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--card2); border: 2px solid transparent; color: var(--text); }
.plt.on { border-color: var(--accent); }
.plt b { font-size: 14.5px; } .plt span { font-size: 13px; color: var(--muted); line-height: 1.4; } .plt em { font-style: normal; font-size: 11.5px; color: var(--accent); font-weight: 650; }
.name-in.big { font-size: 22px !important; font-weight: 750; margin-left: -10px; }
.ajustes { background: var(--card2); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; }
.ajustes p { margin: 4px 0; }
.dia-b { background: var(--card2); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.dia-h { display: flex; justify-content: space-between; gap: 8px; }
.dia-h span { font-size: 12px; color: var(--accent); font-weight: 650; }
.dia-b p { margin: 0 0 4px; }
.ej-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; text-align: left; color: var(--text); }
.ej-line .grow { display: flex; flex-direction: column; gap: 1px; }
.ej-line b { font-size: 14px; font-weight: 600; } .ej-line span { font-size: 12px; color: var(--muted); }
.next-row { display: flex; align-items: center; gap: 12px; }
.next-row .grow { display: flex; flex-direction: column; gap: 2px; }
.next-row b { font-size: 17px; }
.copy-row { display: flex; align-items: center; gap: 10px; background: var(--card2); padding: 10px 12px; border-radius: 14px; }
.copy-row .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.copy-row span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* Modo entreno a pantalla completa */
.wk { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; animation: fade .3s; }
.wk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
.wk-t { display: flex; flex-direction: column; align-items: center; }
.wk-t b { font-size: 15px; } .wk-t span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-prog { height: 4px; background: var(--track); margin: 0 16px; border-radius: 4px; overflow: hidden; }
.wk-prog i { display: block; height: 100%; background: linear-gradient(90deg, #FF5A36, #FFB23F); transition: width .4s; }
.wk-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.wk-body.center { align-items: stretch; text-align: center; }
.wk-body h2 { font-size: 26px; }
.wk-body > p { margin: 0; }
.wk-img { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wk-img .ej-img { width: 100%; aspect-ratio: 1; border-radius: 22px; }
.wk-img .ej-img:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.wk-img .ej-img span { font-size: 60px; }
.wk-nota { background: var(--card2); padding: 8px 12px; border-radius: 12px; font-size: 13.5px; }
.wk-tec { background: var(--card); border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.wk-tec ol { margin: 0 0 8px; padding-left: 20px; } .wk-tec p { margin: 4px 0; }
.wk-p { background: var(--card); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); border-top: 4px solid var(--pc); display: flex; flex-direction: column; gap: 8px; }
.wk-ph { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.wk-ph .avatar { background: var(--pc); }
.sug { font-size: 13px; line-height: 1.45; padding: 9px 11px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.sug.dolor { background: color-mix(in srgb, var(--up) 12%, var(--card)); }
.sug .chip { margin-top: 6px; background: var(--ok); color: #fff; }
.sets { display: flex; flex-direction: column; gap: 6px; }
.set-h, .set { display: grid; grid-template-columns: 40px 1fr 1fr 52px; gap: 8px; align-items: center; }
.set-h span { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; }
.set-n { width: 32px; height: 32px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-weight: 700; font-size: 14px; justify-self: center; }
.set input { text-align: center; font-weight: 700; font-size: 18px !important; padding: 10px 6px !important; }
.set-ok { width: 48px; height: 44px; border-radius: 13px; background: var(--card2); display: grid; place-items: center; color: var(--muted); }
.set.ok .set-ok { background: var(--ok); color: #fff; }
.set.ok input { background: color-mix(in srgb, var(--ok) 10%, var(--card2)); }
.wk-nav { display: flex; gap: 10px; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px); border-top: 1px solid var(--line); background: var(--card); }
.wk-nav .grow { flex: 1; }
.rest { position: absolute; inset: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; text-align: center; }
.rest .big-n { font-size: 48px; }
.rest p { max-width: 420px; line-height: 1.5; margin: 0; }
.rest .btn { min-width: 200px; }
.fin-emoji { font-size: 64px; }
.fin-p { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--card); border-left: 4px solid var(--pc); text-align: left; }
.fin-p span { color: var(--muted); }
.sens { display: flex; justify-content: center; gap: 8px; }
.sens button { font-size: 30px; width: 54px; height: 54px; border-radius: 16px; background: var(--card2); filter: grayscale(.7); }
.sens button.on { filter: none; background: color-mix(in srgb, var(--accent) 20%, var(--card)); transform: scale(1.08); }
.sets.nocarga .set-h, .sets.nocarga .set { grid-template-columns: 40px 1fr 52px; }
.wk-img .ej-img:not(.has-img) { aspect-ratio: 3 / 1 !important; } .wk-img .ej-img:not(.has-img) span { font-size: 40px; }
.wk[hidden] { display: none; } .wk-body.center .link { align-self: center; }
.sheet > * { flex-shrink: 0; }

/* ---------- Fase 4: navegación y cocina ---------- */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.fab { position: fixed; z-index: 31; right: max(16px, calc(50% - 280px + 16px)); bottom: calc(env(safe-area-inset-bottom) + 84px); transform: none; width: 58px; height: 58px; border-radius: 20px; }
.fab:active { transform: scale(.94); }
.view { padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 90px); }
.chef-hero { display: flex; flex-direction: column; gap: 14px; background: linear-gradient(135deg, color-mix(in srgb, #FFB23F 22%, var(--card)), color-mix(in srgb, #FF5A36 14%, var(--card))); }
.chef-hero h2 { font-size: 26px; margin-top: 2px; }
.chef-hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qg { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 650; text-align: center; }
.qg span { font-size: 26px; }
#ckPide .chip { flex: none; }
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; background: var(--card2); text-align: left; color: var(--text); }
.rec-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-card b { font-size: 15px; } .rec-card span { font-size: 12px; color: var(--accent); font-weight: 650; }
.rec-card em { font-style: normal; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-emoji { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; flex: none; background: linear-gradient(135deg, #FFE1C2, #FFC7B4); }
[data-theme="dark"] .rec-emoji { background: linear-gradient(135deg, #3A2A1E, #3B2420); }
.rec-hero { height: 150px; border-radius: 22px; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #FFE7C7, #FFB89E 70%); }
[data-theme="dark"] .rec-hero { background: radial-gradient(circle at 30% 30%, #4A3324, #2C1B17 75%); }
.rec-hero span { font-size: 84px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.25)); }
.rac-row { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--card2); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 36px; border-radius: 11px; font-size: 20px; font-weight: 700; background: var(--card); }
.stepper b { min-width: 34px; text-align: center; font-size: 17px; }
.ing { list-style: none; padding: 0 !important; gap: 0 !important; }
.ing li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ing li:last-child { border-bottom: 0; }
.ing b { font-weight: 650; white-space: nowrap; }
.pasos li { padding-left: 2px; }
.adulto { font-style: normal; font-size: 11px; font-weight: 700; color: #B7791F; background: color-mix(in srgb, #FFB23F 22%, var(--card)); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.chef-tip { background: color-mix(in srgb, #FFB23F 12%, var(--card)); padding: 12px 14px; border-radius: 14px; }
.idea-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.idea-row:last-child { border-bottom: 0; }
.idea-row > span { font-size: 28px; }
.idea-row p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
textarea { width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--card2); font: inherit; font-size: 16px; color: var(--text); resize: vertical; }
.datenav-t { display: flex; flex-direction: column; align-items: center; }
.datenav-t small { font-size: 12px; color: var(--muted); font-weight: 500; }
.domingo { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, color-mix(in srgb, #5B8CFF 16%, var(--card)), var(--card) 60%); }
.domingo h2 { font-size: 23px; } .domingo p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.domingo-mini { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, #5B8CFF 18%, var(--card)), var(--card)); }
.domingo-mini > span { font-size: 30px; }
.domingo-mini .grow { display: flex; flex-direction: column; gap: 2px; }
.domingo-mini .grow span { font-size: 13px; color: var(--muted); }
.menu-dia.hoy { outline: 2px solid var(--accent); }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; width: 100%; text-align: left; color: var(--text); border-bottom: 1px solid var(--line); }
.menu-row:last-child { border-bottom: 0; }
.menu-e { width: 38px; height: 38px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; font-size: 20px; flex: none; }
.menu-row .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.menu-m { font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu-row b { font-size: 14.5px; font-weight: 600; }
.menu-row em { font-style: normal; font-size: 12px; color: var(--muted); }
.add-row { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 18px; }
.add-row input { border: 0 !important; background: transparent !important; }
.add-row .cant { width: 90px !important; flex: none; border-left: 1px solid var(--line) !important; border-radius: 0 !important; }
.icon-btn.add { background: var(--accent); color: #fff; flex: none; }
.cat-card { padding: 14px 16px; }
.cp-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cp-row:last-child { border-bottom: 0; }
.cp-row .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cp-row b { font-weight: 600; font-size: 15px; } .cp-row span { font-size: 12.5px; color: var(--muted); }
.cp-chk { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: #fff; transition: .15s; }
.cp-row.ok .cp-chk { background: var(--ok); border-color: var(--ok); }
.cp-row.ok b { text-decoration: line-through; color: var(--muted); }

/* ---------- Fase 5: álbum e informes ---------- */
.consent { display: flex; flex-direction: column; gap: 12px; }
.consent-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, var(--card)); color: var(--accent); }
.consent p { margin: 0; color: var(--muted); }
.consent ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; }
.consent li { display: flex; gap: 8px; align-items: flex-start; }
.consent li .ic { color: var(--ok); margin-top: 3px; }
.album-top { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.album-top h3 { margin: 2px 0; }
.album-top p { margin: 0; }
.ph-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--card2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph span { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 7px; }
.ph.empty { display: grid; place-items: center; border: 1.5px dashed var(--line); }
.ph.empty span { position: static; background: none; color: var(--muted); }
.cmp { display: flex; flex-direction: column; gap: 10px; }
.slider-box { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: #000; touch-action: pan-y; }
.slider-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slider-box img.antes { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.sb-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.4); pointer-events: none; }
.sb-line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.sb-l, .sb-r { position: absolute; top: 10px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 8px; pointer-events: none; }
.sb-l { left: 10px; } .sb-r { right: 10px; }
.slider-box input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side figure { margin: 0; }
.side img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; display: block; }
.side figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.ses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ses-v { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.ses-img { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; background: var(--card2); border: 1.5px dashed var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; }
.ses-img img { width: 100%; height: 100%; object-fit: cover; }
.ses-btns { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.ses-btns .chip { text-align: center; justify-content: center; display: flex; gap: 4px; align-items: center; font-size: 12px; }
.ph-full img { width: 100%; border-radius: 18px; display: block; }
.obs { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; line-height: 1.45; }
.inf-hero { border-top: 4px solid var(--pc); }
.cam { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; }
.cam[hidden] { display: none; }
.cam-top { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; }
.cam-top .icon-btn { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }
.cam-view { position: relative; flex: 1; overflow: hidden; }
.cam-view video, .cam-view .ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-view video.mirror { transform: scaleX(-1); }
.cam-view .ghost { opacity: .35; pointer-events: none; }
.cam-view .ghost[hidden] { display: none; }
.cam-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) 66.66%, transparent calc(66.66% + .5px)),
  linear-gradient(0deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) 66.66%, transparent calc(66.66% + .5px)); }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; text-shadow: 0 6px 30px rgba(0,0,0,.6); pointer-events: none; }
.cam-err { padding: 30px; text-align: center; line-height: 1.5; }
.cam-ctrl { display: flex; align-items: center; justify-content: space-around; padding: 16px 12px calc(env(safe-area-inset-bottom) + 18px); }
.cam-ctrl .chip { background: rgba(255,255,255,.14); color: #fff; }
.cam-ctrl .chip.on { background: var(--accent); }
.shutter { width: 74px; height: 74px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.4); background-clip: padding-box; }
.shutter:active { transform: scale(.92); }

/* ---------- Asistente, recordatorios y registro rápido ---------- */
.ai-btn { color: var(--accent); }
.warn-pill { color: #B7791F; }
.ask-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, #A66CFF 16%, var(--card)), var(--card)); }
.ask-card .grow { display: flex; flex-direction: column; gap: 2px; }
.ask-card .grow span { font-size: 12.5px; color: var(--muted); }
.chat-av { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #A66CFF, #FF5A36); flex: none; }
.chat-av.sm { width: 40px; height: 40px; border-radius: 13px; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-hola { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px; }
.chat-hola p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 360px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; word-wrap: break-word; }
.msg.yo { align-self: flex-end; background: linear-gradient(135deg, #FF5A36, #FF8A3D); color: #fff; border-bottom-right-radius: 6px; }
.msg.ia { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.msg ul { margin: 6px 0; padding-left: 18px; }
.msg.typing { display: flex; gap: 4px; padding: 14px 16px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; } .msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-sugs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 16px; scrollbar-width: none; }
.chat-sugs .chip { white-space: nowrap; background: var(--card); box-shadow: var(--shadow); }
.chat-in { display: flex; gap: 8px; align-items: center; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px); background: var(--card); border-top: 1px solid var(--line); }
.chat-in input { flex: 1; }
.rec-opt { flex-direction: row !important; align-items: center; gap: 10px !important; padding: 10px 12px; border-radius: 14px; background: var(--card2); color: var(--text) !important; }
.rec-opt input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.rec-opt .grow { display: flex; flex-direction: column; gap: 2px; }
.rec-opt .grow span { font-size: 12px; color: var(--muted); font-weight: 500; }
.rec-opt input[type=time] { width: 96px !important; padding: 8px !important; min-height: 0 !important; flex: none; }
.rec-h { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 4px 4px; }
.btn-row.tight { margin-top: 8px; }
.btn-row.tight .btn { margin: 0; }
.pill[hidden] { display: none; }
.mode-pill { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
.hello { font-size: clamp(21px, 6vw, 25px); }
