/* Tema siempre claro: fondo blanco y tarjetas gris muy claro, aunque el móvil esté en modo oscuro.
   Layout: una columna tipo app (máx. 46rem). Pestañas abajo en el móvil y en la cabecera en escritorio.
   Cada toma del día tiene su color (café, kiwi, tomate, mandarina, berenjena, arándano); la lista de la compra es un ticket. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F5F5;
  --card: #EEEEEE;
  --card-hover: #E4E4E4;
  --card-edge: #E6E6E6;
  --ink: #15201A;
  --muted: #56655A;
  --line: #DADADA;
  --accent: #46620F;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1EACB;
  --danger: #A8261C;
  --toast-bg: #15201A;
  --toast-ink: #F2F6EE;
  --toast-accent: #CFE39A;
  --c-desayuno: #B9820B;
  --c-mm: #5F8F1A;
  --c-comida: #C43F27;
  --c-merienda: #D9720E;
  --c-cena: #6B3F8F;
  --c-recena: #3B4C9B;
  --f-display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgb(21 32 26 / 6%), 0 10px 24px -14px rgb(21 32 26 / 22%);
  --nav-h: 62px;
  color-scheme: light;
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body.has-sheet { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.wrap { max-width: 46rem; margin: 0 auto; padding-inline: 16px; }
main { padding-block: 4px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 40px); }

/* ---------- Tipografía ---------- */
.h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 7.5vw, 2.7rem); line-height: 1; letter-spacing: -0.025em; margin: 0 0 8px; text-wrap: balance; }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.01em; margin: 36px 0 12px; text-wrap: balance; }
.h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; margin: 22px 0 8px; }
.eyebrow { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .82rem; margin-top: 28px; }
.help { margin: 10px 2px 0; }
.page-head { margin: 22px 0 16px; }
.page-head p { margin: 0; max-width: 40rem; }

/* ---------- Cabecera y pestañas ---------- */
.top {
  position: sticky; top: 0; z-index: 20; isolation: isolate;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
/* El desenfoque va en un pseudo-elemento: si lo lleva .top, la barra de pestañas fija del móvil queda atrapada dentro. */
.top::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.top-inner { max-width: 64rem; margin: 0 auto; padding-inline: 16px; display: flex; align-items: center; gap: 10px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; color: inherit; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.015em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .bm-plate { fill: var(--accent); stroke: none; }
.brand-mark .bm-rim { fill: var(--surface); stroke: none; }
.brand-mark .bm-hands { stroke: var(--c-comida); stroke-width: 2.6; }
.brand-mark .bm-pin { fill: var(--c-comida); stroke: none; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--nav-h); padding: 6px 2px;
  border: 0; background: none; color: var(--muted);
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.tab-btn svg { width: 24px; height: 24px; }
.tab-btn[aria-current="page"] { color: var(--ink); }
.tab-btn[aria-current="page"] svg { stroke: var(--accent); stroke-width: 2.2; }
.tab-icon { position: relative; display: inline-grid; }
.badge-count {
  position: absolute; top: -5px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--c-comida); color: #fff; font-size: .68rem; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.settings-btn { flex: none; }
@media (min-width: 900px) {
  .tabs { position: static; display: flex; gap: 2px; background: none; border: 0; padding: 0; margin-right: 8px; }
  .tab-btn { flex-direction: row; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: .92rem; }
  .tab-btn svg { width: 20px; height: 20px; }
  .tab-btn[aria-current="page"] { background: var(--accent-soft); }
  .tab-btn:hover { color: var(--ink); }
  main { padding-bottom: 64px; }
}

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .95rem; line-height: 1.1; text-align: center; text-decoration: none;
  transition: border-color .15s, background-color .15s, transform .1s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: color-mix(in oklab, var(--ink) 35%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.btn[aria-pressed="true"] svg { fill: currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { flex: none; width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: none; color: var(--muted); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink); }
.icon-sm { width: 34px; height: 34px; }
.icon-sm svg { width: 18px; height: 18px; }
.heart.on { color: var(--c-comida); }
.heart.on svg { fill: currentColor; }

.seg { display: flex; gap: 3px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: none;
  font-weight: 700; font-size: .9rem; color: var(--muted); white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 0 0 0 1px var(--line); }
.seg-sm button { min-height: 32px; padding: 0 11px; font-size: .84rem; }
.plan-toggle { flex: none; }
.plan-toggle button { font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: .88rem; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.select {
  appearance: none; -webkit-appearance: none;
  min-height: 34px; padding: 0 30px 0 12px;
  border: 1.5px solid var(--line); border-radius: 999px; background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
  font-size: .84rem; font-weight: 700;
}
.select-lg { min-height: 44px; width: 100%; font-size: .95rem; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: .95rem; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.field { display: grid; gap: 6px; margin: 8px 0 12px; font-weight: 700; font-size: .95rem; }
.search input, .add-form input {
  width: 100%; min-height: 48px; padding: 0 16px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 1rem;
}
.search { margin-bottom: 12px; }
.search input:focus, .add-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.pill { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); vertical-align: 2px; }
.badge { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; white-space: nowrap; }
.tag { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.rule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 18px 2px 12px; font-weight: 700; }
.rule > span:first-child { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.note { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-edge); font-size: .93rem; }
.note-leg { border-color: color-mix(in oklab, var(--c-merienda) 45%, var(--line)); background: color-mix(in oklab, var(--c-merienda) 9%, var(--surface)); }
.note-train { margin-top: 8px; border-color: color-mix(in oklab, var(--c-merienda) 45%, var(--line)); }
.note-warn { border-color: color-mix(in oklab, var(--c-comida) 50%, var(--line)); background: color-mix(in oklab, var(--c-comida) 8%, var(--surface)); }
.empty { padding: 18px; border: 1px solid var(--card-edge); border-radius: var(--r); background: var(--card); margin: 8px 0; }
.empty p { margin: 0 0 4px; }
.banner { margin-top: 16px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.banner p { margin: 0; }

/* ---------- Ahora ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: 16px; padding: 18px 18px 12px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--card-edge);
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 210px; height: 210px; right: -64px; top: -78px; border: 16px solid color-mix(in oklab, var(--slot) 30%, transparent); }
.hero::after { width: 120px; height: 120px; right: -19px; top: -33px; border: 2px solid color-mix(in oklab, var(--slot) 30%, transparent); }
.hero-row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.clock { position: relative; margin: 0; font-family: var(--f-mono); font-weight: 500; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.hero-title { position: relative; margin: 6px 0 4px; font-family: var(--f-display); font-weight: 800; font-size: clamp(2.6rem, 12vw, 4.2rem); line-height: .92; letter-spacing: -0.035em; text-wrap: balance; }
.hero-sub { position: relative; margin: 0; font-weight: 700; }
.timeline { position: relative; margin: 18px 4px 0; }
.tl-inner { position: relative; height: 52px; margin: 0 16px; }
.tl-track { position: absolute; left: -12px; right: -12px; top: 12px; height: 4px; border-radius: 4px; background: color-mix(in oklab, var(--ink) 13%, transparent); }
.tl-now { position: absolute; top: 3px; width: 3px; height: 22px; margin-left: -1.5px; border-radius: 3px; background: var(--ink); }
.tl-dot {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 34px; padding: 3px 2px; border: 0; background: none;
}
.tl-mark { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 18%, transparent); transition: transform .15s; }
.tl-dot.is-active .tl-mark { transform: scale(1.3); box-shadow: 0 0 0 2px var(--ink); }
.tl-label { font-size: .7rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tl-dot.is-active .tl-label { color: var(--ink); }
.train-row { margin: -2px 0 12px; }
.train-row .seg { display: inline-flex; max-width: 100%; }

.agenda ol, .rows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; }
.agenda li + li, .rows > li + li { border-top: 1px solid var(--line); }
.ag-row { width: 100%; display: grid; grid-template-columns: 3.2rem auto 1fr; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; text-align: left; }
.ag-row:hover { background: var(--card-hover); }
.ag-row.is-active { background: color-mix(in oklab, var(--c) 14%, var(--card)); }
.ag-time { font-family: var(--f-mono); font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-text { display: flex; flex-direction: column; min-width: 0; }
.ag-slot { font-weight: 700; }
.ag-what { color: var(--muted); font-size: .9rem; }

.feature { padding: 18px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); }
.feature-title { margin: 6px 0 2px; font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; line-height: 1.15; text-wrap: balance; }
.feature p { margin: 4px 0 0; }

/* ---------- Tarjeta de idea ---------- */
.idea { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; }
.idea-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 8px 10px 16px; }
.plate { flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--slot); box-shadow: inset 0 0 0 4px color-mix(in oklab, var(--slot) 55%, var(--card)); }
.idea-title { flex: 1; min-width: 0; margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; line-height: 1.18; letter-spacing: -0.01em; text-wrap: balance; }
.idea-lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: minmax(4.6rem, 6.4rem) minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 7px 6px 7px 16px; border-top: 1px solid var(--line); }
.line-label { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.line-body { display: flex; flex-direction: column; min-width: 0; margin: -4px -8px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left; }
button.line-body:hover { background: var(--card-hover); }
button.line-body::after { content: 'Cambiar'; align-self: flex-start; margin-top: 2px; font-size: .74rem; font-weight: 700; color: var(--accent); }
.line-name { font-weight: 700; line-height: 1.3; }
.line-detail { font-size: .87rem; line-height: 1.35; color: var(--muted); }
.line-extra { grid-column: 2 / 4; padding-bottom: 4px; }
.line.is-train { background: color-mix(in oklab, var(--c-merienda) 10%, var(--card)); }
.lock.on { color: var(--accent); background: var(--accent-soft); }
.idea-tip { margin: 0; padding: 12px 16px 14px; border-top: 1px dashed var(--line); font-size: .93rem; color: var(--muted); }
@media (max-width: 380px) {
  .line { grid-template-columns: minmax(0, 1fr) auto; }
  .line-label { grid-column: 1 / -1; margin-bottom: 2px; }
  .line-extra { grid-column: 1 / -1; }
}

/* ---------- Picoteos ---------- */
.slot-seg { margin-bottom: 4px; }
.slot-seg button { padding: 0 10px; gap: 6px; font-size: .86rem; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 12px; }
.mini { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); }
.mini-head { display: flex; align-items: flex-start; gap: 6px; }
.mini-head h3 { flex: 1; min-width: 0; margin: 2px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 1.06rem; line-height: 1.2; text-wrap: balance; }
.mini-head .icon-btn { margin: -8px -8px 0 0; }
.mini-parts { margin: 0; font-size: .88rem; color: var(--muted); }
.mini-foot { margin-top: auto; padding-top: 4px; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.tips li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-edge); }
.tips span { color: var(--muted); font-size: .93rem; }

/* ---------- Recetas ---------- */
.plan-filter { display: inline-flex; max-width: 100%; margin-bottom: 4px; }
.rec-group { margin-top: 22px; }
.group-title { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.group-title span { font-family: var(--f-mono); letter-spacing: 0; }
.rrow { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; text-align: left; }
.rrow:hover { background: var(--card-hover); }
.rmain { display: flex; flex-direction: column; min-width: 0; }
.rname { font-weight: 700; line-height: 1.3; }
.rmeta { font-size: .84rem; color: var(--muted); }
.rfav { color: var(--c-comida); display: inline-grid; }
.rfav svg { width: 18px; height: 18px; fill: currentColor; }
.empty-row { padding: 14px; color: var(--muted); }

.ing-list { margin: 0; padding-left: 1.2rem; }
.ing-list li { padding: 3px 0; }
.ing-list li::marker { color: var(--accent); }
.steps { margin: 0; padding-left: 1.4rem; counter-reset: none; }
.steps li { padding: 4px 0 6px 4px; }
.steps li::marker { font-family: var(--f-mono); font-weight: 500; color: var(--muted); }
.notes { margin-top: 8px; }

/* ---------- Semana ---------- */
.day { margin-top: 12px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); overflow: hidden; }
.day.is-today { border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent); }
.day-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; }
.day-head h3 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.day-head .select { margin-left: auto; }
.cells { list-style: none; margin: 0; padding: 0; }
.cells li { border-top: 1px solid var(--line); }
.cell-btn { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border: 0; background: none; text-align: left; }
.cell-btn:hover { background: var(--card-hover); }
.cell-text { display: flex; flex-direction: column; min-width: 0; }
.cell-slot { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
@media (min-width: 600px) {
  .cell-text { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: baseline; gap: 10px; }
}
.cell-what { font-weight: 700; line-height: 1.3; }
.cell-what.is-empty { font-weight: 400; color: var(--muted); }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px); margin-top: 18px; z-index: 5; }
.sticky-cta .btn { min-height: 52px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 35%); }
@media (min-width: 900px) { .sticky-cta { bottom: 16px; } }
.day-row { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 0; background: none; text-align: left; }
.day-row:hover { background: var(--card-hover); }
.day-name { font-weight: 700; }
.day-cur { font-size: .88rem; color: var(--muted); }

/* ---------- Compra: el ticket ---------- */
.progress-text { margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 8px; background: color-mix(in oklab, var(--ink) 10%, transparent); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s; }
.add-form { display: flex; gap: 8px; margin-bottom: 8px; }
.add-form .btn { width: 48px; min-height: 48px; padding: 0; flex: none; }
.add-form .btn svg { width: 22px; height: 22px; }
.ticket {
  position: relative; margin: 26px 0 22px; padding: 16px 18px 20px;
  background: var(--card);
}
.ticket::before, .ticket::after { content: ''; position: absolute; left: 0; right: 0; height: 9px; background-repeat: repeat-x; background-size: 18px 9px; }
.ticket::before { top: -9px; background-image: linear-gradient(45deg, var(--card) 33%, transparent 33.5%), linear-gradient(-45deg, var(--card) 33%, transparent 33.5%); background-position: 0 100%; }
.ticket::after { bottom: -9px; background-image: linear-gradient(135deg, var(--card) 33%, transparent 33.5%), linear-gradient(-135deg, var(--card) 33%, transparent 33.5%); background-position: 0 0; }
.ticket-head { margin: 0 0 4px; text-align: center; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
.shop-sec h2 { margin: 18px 0 2px; padding-bottom: 6px; border-bottom: 1.5px dashed var(--line); font-family: var(--f-mono); font-weight: 500; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.shop-sec ul, .basics ul { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 12px; min-height: 48px; border-bottom: 1px dotted var(--line); }
.item:last-child { border-bottom: 0; }
.item input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.iname { padding: 10px 0; font-weight: 700; line-height: 1.3; cursor: pointer; }
.iqty { font-family: var(--f-mono); font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.item.is-done .iname { font-weight: 400; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.item.is-done .iqty { opacity: .55; }
.basics { margin-top: 18px; padding-top: 10px; border-top: 1.5px dashed var(--line); }
.basics summary { cursor: pointer; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); min-height: 36px; display: flex; align-items: center; }
.basics li { padding: 4px 0; }
.shop-actions { margin-top: 0; }

/* ---------- Hoja inferior ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(6 10 8 / 48%); animation: fade .18s ease-out; }
.sheet {
  position: relative; width: 100%; max-width: 40rem; max-height: min(90vh, 60rem);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 0 18px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet:focus { outline: none; }
.sheet-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; height: 44px; margin: 0 -18px; background: var(--surface); }
.sheet-grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line); }
.sheet-close { position: absolute; right: 8px; top: 4px; background: var(--card); border-radius: 50%; width: 36px; height: 36px; }
.sheet-title { margin: 4px 0 6px; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.5rem, 6vw, 1.9rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
@media (min-width: 700px) {
  .sheet-root { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; max-height: 88vh; padding-bottom: 24px; }
}
.opt-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--card); border-radius: 14px; background: var(--card); text-align: left; }
.opt:hover { border-color: color-mix(in oklab, var(--ink) 30%, var(--line)); }
.opt.is-sel { border-color: var(--accent); background: var(--accent-soft); }
.opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-name { font-weight: 700; }
.opt-detail { font-size: .88rem; color: var(--muted); }
.opt-check { font-weight: 700; color: var(--accent); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 8px; }
.time-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; font-size: .92rem; }
.time-field > span { display: inline-flex; align-items: center; gap: 8px; }
.time-field input { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 0 6px; font-family: var(--f-mono); }
.copy-area { width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-family: var(--f-mono); font-size: .85rem; }
.form { margin-top: 10px; }
.form .btn-block { margin-top: 14px; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100% - 32px);
  padding: 11px 12px 11px 16px; border-radius: 14px;
  background: var(--toast-bg); color: var(--toast-ink);
  font-weight: 700; font-size: .92rem;
  box-shadow: 0 12px 30px rgb(0 0 0 / 22%);
  animation: rise .2s ease-out;
}
.toast button { border: 0; background: none; padding: 4px 6px; color: var(--toast-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.toast { animation-name: toast-in; }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* Móvil estrecho: la cabecera no cabe entera */
@media (max-width: 420px) {
  .brand span { font-size: 1.08rem; }
  .plan-toggle button { padding: 0 9px; }
}

/* ---------- Instalar como app ---------- */
.install { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 8px 12px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-edge); }
.install p { flex: 1; min-width: 0; margin: 0; font-size: .93rem; }
.install .btn { flex: none; }
.inline-icon { display: inline-grid; vertical-align: -4px; }
.inline-icon svg { width: 18px; height: 18px; }

/* ---------- Buscador de recetas ---------- */
.understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 2px 0; }
.understood > span:first-child { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.understood .tag { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.examples { margin-top: 14px; }
.examples p { margin: 0 2px 6px; }
.chip-soft { background: var(--card); border-color: var(--card); font-weight: 700; }

/* ---------- Compartir ---------- */
.btn-wa { background: #128C4A; border-color: #128C4A; color: #FFFFFF; }
.btn-wa:hover { background: #0E7A40; border-color: #0E7A40; }
.btn:disabled { opacity: .5; cursor: default; }
.share-preview { max-height: 22rem; overflow: auto; border-radius: 14px; background: var(--card); padding: 10px; }
.share-preview img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgb(0 0 0 / 10%); }
.share-preview p { margin: 8px; }

/* ---------- Buscador en «Ahora» ---------- */
.home-search { display: flex; gap: 8px; margin: 16px 0 0; }
.home-search input { flex: 1; min-width: 0; }
.home-search .btn { width: 48px; min-height: 48px; padding: 0; flex: none; }
.home-search .btn svg { width: 22px; height: 22px; }

/* ---------- Útiles ---------- */
.tool { margin-top: 18px; padding: 18px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-edge); }
.tool-title { margin: 0 0 4px; font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; }
.tool > p { margin: 0 0 12px; }
.eq { display: grid; gap: 4px; }
.eq .field { margin: 0; }
.eq .field > label { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.eq-row { display: flex; align-items: center; gap: 8px; }
.eq-row .select { flex: 1; min-width: 0; }
.num { width: 5.5rem; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font: 700 1.05rem var(--f-mono); font-variant-numeric: tabular-nums; }
.num:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.unit { font-weight: 700; color: var(--muted); }
.select-lg { background-color: var(--surface); }
.eq-swap { justify-self: center; transform: rotate(90deg); background: var(--surface); border: 1px solid var(--line); }
.eq-result { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--surface); }
.eq-big { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.eq-big span { color: var(--muted); }
.eq-big strong { font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.eq-src { margin: 10px 0 8px; font-size: .9rem; }
.eq-src .badge { margin: 0 6px 0 0; }
.badge-warn { background: color-mix(in oklab, var(--c-merienda) 18%, var(--surface)); color: #8A4A07; }
.eq-more { margin: 8px 0; }
.eq-more summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 36px; display: flex; align-items: center; }
.eq-more ul { list-style: none; margin: 4px 0 0; padding: 0; }
.eq-more li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: .93rem; }
.eq-more li strong { font-family: var(--f-mono); font-weight: 500; white-space: nowrap; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.eq-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.eq-table th, .eq-table td { padding: 7px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.eq-table th:first-child, .eq-table thead th { text-align: left; }
.eq-table thead th { font-size: .78rem; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.eq-table tbody th { font-weight: 700; text-align: left; }
.cook { display: grid; gap: 10px; }
.cook .seg { display: inline-flex; max-width: 100%; }
.water .glasses { display: flex; flex-wrap: wrap; gap: 8px; }
.glass { width: 26px; height: 34px; border: 2px solid var(--c-recena); border-top-width: 0; border-radius: 0 0 8px 8px; background: linear-gradient(to top, color-mix(in oklab, var(--c-recena) 35%, var(--surface)) 0 0, transparent 0); }
.glass.is-full { background: color-mix(in oklab, var(--c-recena) 35%, var(--surface)); }
.water-count { margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.measures { margin: 0; display: grid; }
.measures > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--line); }
.measures dt { font-size: .95rem; }
.measures dd { margin: 0; font-family: var(--f-mono); font-weight: 500; white-space: nowrap; }
.tab-btn span:last-child { white-space: nowrap; }
@media (max-width: 380px) { .tab-btn { font-size: .66rem; } }

/* ---------- Compra por tiendas ---------- */
.store-chips { margin-bottom: 12px; }
.chip-count { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-count { background: color-mix(in oklab, var(--bg) 25%, transparent); color: var(--bg); }
.chip svg { width: 16px; height: 16px; vertical-align: -3px; }
.item { grid-template-columns: auto minmax(0, 1fr) auto; }
.istore { display: block; font-family: var(--f-body); font-size: .74rem; font-weight: 700; color: var(--muted); }
button.iqty { border: 1px dashed transparent; background: none; border-radius: 8px; padding: 6px 8px; margin-right: -8px; min-height: 36px; cursor: pointer; }
button.iqty:hover { border-color: var(--line); }
button.iqty.is-edited { color: var(--ink); font-weight: 500; border-color: var(--line); }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper .btn { width: 44px; padding: 0; font-size: 1.3rem; }
.text-in { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1rem; }
.text-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field > span, .field > label { font-weight: 700; font-size: .92rem; }
.store-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; inset: 0; }
.radio-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: .9rem; cursor: pointer; }
.radio-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.radio-chip input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.store-list, .rules-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.store-list li { display: flex; gap: 6px; align-items: center; }
.rules-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .92rem; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.sec-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 12px; }
.servings { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.servings .icon-btn { font-size: 1.2rem; color: var(--ink); }
.istore.is-none { font-weight: 400; font-style: italic; }

/* ---------- Producto concreto ---------- */
.iprod { display: block; font-family: var(--f-body); font-size: .8rem; font-weight: 400; color: var(--ink); }
.item.is-done .iprod { color: var(--muted); }
.pick-search { display: flex; gap: 8px; }
.pick-search input { flex: 1; min-width: 0; }
.opt.prod { align-items: center; }
.opt.prod img, .prod-noimg, .chosen img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface); flex: none; }
.prod-price { font-family: var(--f-mono); font-weight: 500; white-space: nowrap; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--card); font-size: .93rem; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 0; padding-top: 10px; border-top: 1.5px dashed var(--line); font-family: var(--f-mono); }
.ticket-total span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ticket-total strong { font-size: 1.3rem; font-weight: 500; }
.ticket-note { margin: 2px 0 0; text-align: right; }
.own-product { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.own-product summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.own-form { margin-top: 6px; }
.own-row { display: flex; flex-wrap: wrap; gap: 10px; }
.own-row .field { margin: 0; flex: 1 1 7rem; }
.own-row .num { width: 100%; }

/* ---------- Cuenta ---------- */
.account { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--card); }
.account img { width: 44px; height: 44px; border-radius: 50%; }
.account div { display: flex; flex-direction: column; min-width: 0; }

/* ---------- Pantalla de entrada ---------- */
.gate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.gate-card { width: 100%; max-width: 24rem; text-align: center; display: grid; justify-items: center; gap: 10px; }
.gate-mark { width: 84px; height: 84px; }
.gate-mark .bm-plate { fill: var(--accent); stroke: none; }
.gate-mark .bm-rim { fill: var(--surface); stroke: none; }
.gate-mark .bm-hands { stroke: var(--c-comida); stroke-width: 2.6; }
.gate-mark .bm-pin { fill: var(--c-comida); stroke: none; }
.gate-title { margin: 6px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; }
.gate-sub { margin: 0 0 10px; color: var(--muted); text-wrap: balance; }
.gate-actions { justify-content: center; }
.btn-google { min-height: 52px; padding: 0 22px; font-size: 1.02rem; }
.btn-google svg { width: 20px; height: 20px; background: #fff; border-radius: 50%; padding: 2px; }
body.gated { overflow: hidden; }

/* ---------- Recetas propias ---------- */
.rec-new { margin: 0 0 12px; }
.rthumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.rname .badge { margin-left: 6px; }
.text-area { min-height: 6rem; padding: 10px 12px; font: 400 .98rem/1.45 var(--f-body); resize: vertical; }
.ed-preview ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.ed-preview li { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--card); }
.ed-line { font-size: .9rem; }
.ed-preview .select { width: 100%; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 4px -18px 10px; padding: 0 18px; scroll-snap-type: x mandatory; }
.gallery figure { position: relative; margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { display: block; height: 220px; width: auto; max-width: 85vw; border-radius: 14px; object-fit: cover; background: var(--card); }
.photo-del { position: absolute; top: 6px; right: 6px; background: rgb(255 255 255 / 85%); }
.photo-add { cursor: pointer; }
code { font-family: var(--f-mono); font-size: .85em; }

/* ---------- Amigos: feed, publicaciones, kudos y comentarios ---------- */
.avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--card); }
.avatar-txt { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: var(--f-display); }
.feed { display: grid; gap: 14px; margin-top: 8px; }
.post { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); padding: 14px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-who { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.post-photo { display: block; width: calc(100% + 28px); max-width: none; height: auto; max-height: 70vh; object-fit: cover; margin: 12px -14px 0; background: var(--card-hover); }
.post-title { font-family: var(--f-display); font-size: 1.15rem; margin: 12px 0 4px; }
.post-title .link { font: inherit; color: var(--ink); text-align: left; }
.post-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.post-stats svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; }
.post-stars { color: #C98A06; letter-spacing: 1px; }
.post-stars .dim { color: var(--line); }
.tag-plan { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; }
.tag-plan.off { background: var(--surface-2); color: var(--muted); }
.post-notes { margin: 8px 0 0; white-space: pre-line; }
.post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.post-foot .btn svg, .kudos-mine svg, .kudos-names svg { width: 18px; height: 18px; vertical-align: -4px; }
.post-foot .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kudos-mine { font-weight: 700; color: var(--accent); }
.kudos-names { flex-basis: 100%; }
.friend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.friend-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border-radius: var(--r-sm); }
.friend-list li span:not(.avatar) { flex: 1; font-weight: 700; }
.post-photo-pick { margin-bottom: 4px; }
.post-photo-preview { position: relative; margin: 0; }
.post-photo-preview img { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; }
.post-photo-preview .icon-btn { position: absolute; top: 8px; right: 8px; background: var(--surface); }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars label { cursor: pointer; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars span[aria-hidden] { display: inline-block; font-size: 2rem; line-height: 1; padding: 2px 3px; color: var(--line); }
.stars label:has(input:checked) span[aria-hidden], .stars label:has(input:checked) ~ label span[aria-hidden] { color: #C98A06; }
.stars label:has(input:focus-visible) span[aria-hidden] { outline: 2px solid var(--accent); border-radius: 6px; }
.comments { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 12px; }
.comments li { display: flex; align-items: flex-start; gap: 10px; }
.comments li > div { flex: 1; min-width: 0; }
.comments p { margin: 2px 0 0; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; position: sticky; bottom: 0; padding: 8px 0; background: var(--surface); }
.comment-form .text-in { flex: 1; min-width: 0; }
.invite-link code { display: block; padding: 10px 12px; background: var(--card); border-radius: var(--r-sm); font-size: .85rem; overflow-wrap: anywhere; }


/* ---------- Fase 4: registro del día, despensa, peso, recordatorios ---------- */
.ag-li { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.ag-li .ag-row { flex: 1; min-width: 0; }
.log-btn {
  flex: none; display: grid; justify-items: center; align-content: center; gap: 1px; width: 64px; min-height: 44px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted);
  font-size: .72rem; font-weight: 700;
}
.log-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.log-btn[data-log="done"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.log-btn[data-log="off"] { border-color: var(--c-merienda); color: #9A4F06; background: #FBEBDA; }
.log-btn[data-log="skip"] { background: var(--surface-2); }
.ld-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 6px; }
.ld { display: grid; justify-items: center; gap: 4px; padding: 8px 0; background: var(--card); border-radius: var(--r-sm); }
.ld-dots { display: grid; gap: 4px; }
.ld-day { font-size: .76rem; font-weight: 700; color: var(--muted); }
.ld-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); vertical-align: -1px; }
.ld-dot[data-log="done"] { background: var(--accent); border-color: var(--accent); }
.ld-dot[data-log="off"] { background: var(--c-merienda); border-color: var(--c-merienda); }
.ld-dot[data-log="skip"] { background: var(--line); border-color: var(--line); }
.ld-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ld-legend .ld-dot { margin-left: 6px; }
.home-list { list-style: none; padding: 0; }
.home-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.w-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 10px 0 4px; }
.w-now strong { font-family: var(--f-display); font-size: 1.6rem; }
.w-delta { font-size: .88rem; font-weight: 700; color: var(--muted); }
.w-chart { display: block; width: 100%; height: auto; margin: 6px 0; }
.w-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.w-last { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.w-dots circle { fill: var(--muted); stroke: none; opacity: .45; }
/* aquí los botones llevan texto, no un icono */
#weight-tool .add-form .btn { width: auto; padding: 0 16px; }
.w-now-kg { white-space: nowrap; }
.w-trend { font-size: .95rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.tool > .w-rate, .tool > .w-proj, .tool > .w-fast { margin: 0 0 6px; }
.w-rate strong { font-size: 1.05rem; }
.w-fast { color: var(--danger); }
.w-fast svg { width: 15px; height: 15px; vertical-align: -3px; }
.w-tdee { margin: 10px 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); }
.w-tdee p { margin: 0 0 4px; }
.w-tdee p:last-child { margin-bottom: 0; }
.w-tdee .btn { margin-top: 6px; }
.w-goal { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.w-label { fill: var(--muted); stroke: none; font-size: 10px; font-family: var(--f-body); }
.w-more summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
/* Medidas corporales (dentro de «Tu peso») */
.meas { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.meas .h3 { margin: 0 0 4px; }
.meas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin: 8px 0 10px; }
.meas-grid .field { margin: 0; min-width: 0; }
.meas-grid .num { width: 100%; }
.meas-grid .num::placeholder { color: var(--muted); opacity: .55; font-weight: 400; }
.meas-form .btn { width: 100%; }
.m-list { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 2px; }
.m-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding: 5px 0; border-bottom: 1px dotted var(--line); }
.m-name { min-width: 4.2rem; font-weight: 700; font-size: .92rem; }
.m-val { font-family: var(--f-display); font-size: 1.1rem; white-space: nowrap; }
.m-d { font-size: .84rem; font-weight: 700; color: var(--muted); }
.m-line { margin: 8px 0; }
.m-line .muted, .m-line .small { display: block; margin-top: 2px; }
.m-line .m-d { margin-left: 4px; }
.m-tabs { margin: 10px 0 2px; flex-wrap: wrap; border-radius: 20px; }
.m-tabs button { flex: 1 0 auto; }
.m-cap { margin: 0 0 6px; }
.m-hist li > span:first-child { min-width: 0; }
.m-acts { display: flex; gap: 12px; flex: none; }

/* ---------- Modo cocina ---------- */
body.has-cook { overflow: hidden; }
.cookmode {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  background: var(--bg); color: var(--ink);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.cook-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cook-name { flex: 1; min-width: 0; margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-progress { display: flex; gap: 4px; padding: 8px 14px 0; }
.cook-progress span { flex: 1; height: 5px; border-radius: 999px; background: var(--card); transition: background .2s; }
.cook-progress span.on { background: var(--accent); }
.cook-timers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.cook-timers:not(:empty) { padding-top: 10px; }
.cook-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.cook-chip svg { width: 18px; height: 18px; }
.cook-chip.is-done { background: var(--c-comida); color: #fff; animation: cook-pulse 1s ease-in-out infinite; }
@keyframes cook-pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .cook-chip.is-done { animation: none; } .cook-progress span { transition: none; } }
.cook-track { display: flex; min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; outline: none; }
.cook-track::-webkit-scrollbar { display: none; }
.cook-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; display: flex; }
.cook-in { width: 100%; max-width: 760px; margin: auto; padding: 24px 22px 32px; }
.cook-h { font-family: var(--f-display); font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.1; margin: 4px 0 8px; }
.cook-step { font-family: var(--f-display); font-size: clamp(1.45rem, 5.4vw, 2.3rem); line-height: 1.35; font-weight: 600; margin: 8px 0 18px; text-wrap: pretty; }
.cook-ings { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.cook-ings label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border-radius: var(--r-sm); background: var(--card); font-size: 1.1rem; }
.cook-ings input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.cook-ings input:checked + span { text-decoration: line-through; color: var(--muted); }
.cook-uses { padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); margin-bottom: 14px; }
.cook-uses ul { margin: 4px 0 0; padding-left: 18px; font-size: 1.05rem; }
.cook-timer-btn svg { width: 20px; height: 20px; }
.cook-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.cook-nav .btn { min-height: 56px; font-size: 1.05rem; }
.cook-pos { margin: 0; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cook-panel { position: absolute; inset: 0; z-index: 2; background: rgb(21 32 26 / 40%); display: flex; align-items: flex-end; }
.cook-panel-in { width: 100%; max-height: 80%; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0px)); }
.cook-panel-in ul { padding-left: 20px; font-size: 1.1rem; line-height: 1.6; }
.cook-end .note { font-size: 1.05rem; }
.cook-chip .icon-btn { color: inherit; background: transparent; border-color: transparent; }
.cook-nav .btn { white-space: nowrap; padding: 0 14px; }
.train-today { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); }
.train-today-label { margin: 0; flex-basis: 100%; }
.post-kind { margin-bottom: 12px; }
.post-kind-ico svg { width: 22px; height: 22px; vertical-align: -4px; margin-right: 6px; stroke: var(--accent); }
.kudos-mine { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); }
.btn-kudos { border-color: var(--accent); color: var(--accent); }
.day-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.day-pick .radio-chip span { min-width: 2.6em; text-align: center; }
.day-pick-field { margin: 4px 0 10px; }
.subnav { display: flex; margin: 0 0 14px; }
.subnav button { flex: 1; }

/* Ficha de receta: pocas acciones arriba y el resto en «Más» */
.rec-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 6px; }
.rec-bar .icon-btn[aria-pressed="true"] svg { fill: var(--c-comida); stroke: var(--c-comida); }
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; }
.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 220px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.more-menu > button, .more-menu > label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); }
.more-menu > button:hover, .more-menu > label:hover { background: var(--card); }
.more-menu svg { width: 20px; height: 20px; flex: none; }
.ing-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 22px 0 8px; }
.ing-head .h3 { margin: 0; flex: 1; }
.plan-slot { margin-bottom: 10px; }
.day-check { cursor: pointer; }
.day-check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.day-check { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.day-check input { grid-row: span 2; }
.rec-icons { display: flex; gap: 4px; margin-left: auto; }
.cook-serv { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--card); font-weight: 700; }
.cook-serv strong { min-width: 1.5em; text-align: center; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Entreno de hoy */

/* Mi info */
.me-btn { flex: none; }
.me-btn[aria-current="page"] { background: var(--accent-soft); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: grid; gap: 2px; padding: 14px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); }
.tile strong { font-family: var(--f-display); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile > span:nth-child(2) { font-weight: 700; }
.stat-card { padding: 14px 16px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r); }
.stat-card > .h3:first-child { margin-top: 0; }
.pie { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pie-fig { position: relative; flex: none; width: 170px; height: 178px; }
.pie svg { width: 170px; height: 178px; display: block; }
/* el centro: texto normal de la app, nítido (top: el centro del aro, que está un poco por encima por la sombra) */
.pie-c { position: absolute; left: 50%; top: 84px; transform: translate(-50%, -50%); z-index: 1; display: grid; justify-items: center; line-height: 1.05; text-align: center; pointer-events: none; }
.pie-seg { transform-box: view-box; transform-origin: 60px 60px; animation: pie-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--k) * .09s); }
@keyframes pie-pop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pie-seg { animation: none; } }
.pie-n { font-family: var(--f-body); font-size: 1.2rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pie-l { font-family: var(--f-body); font-size: .68rem; font-weight: 600; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 180px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; font-size: .92rem; }
.sw { width: 14px; height: 14px; border-radius: 5px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.lg-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.hbars, .slot-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars li, .slot-stats li { display: grid; grid-template-columns: minmax(0, 8.5rem) 1fr 3.2rem; align-items: center; gap: 10px; font-size: .92rem; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.hb-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.stack { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface); }
.st { display: block; height: 100%; }
.st-done { background: var(--accent); }
.st-off { background: var(--c-merienda); }
.st-skip { background: var(--line); }
.st-none { background: var(--surface); }
@media (max-width: 430px) { .brand > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-basis: 100%; }
.rec-head .train-today-label { flex-basis: auto; }
.rec-list, .rec-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex-basis: 100%; }
.rec-list li { display: flex; align-items: center; gap: 6px; }
.rec-row, .rec-opt { flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-align: left; }
.rec-opt { padding: 14px; }
.rec-row:hover, .rec-opt:hover { background: var(--card-hover); }
.rec-ico svg { width: 24px; height: 24px; stroke: var(--accent); }
.rec-main { display: grid; gap: 2px; min-width: 0; }
.num-lg { font-size: 1.6rem; width: 8rem; }
.rules-list li span svg { width: 18px; height: 18px; vertical-align: -3px; stroke: var(--accent); }
.hbars li { grid-template-columns: minmax(0, 8.5rem) 1fr auto; }
.agenda .rec-list li, .agenda .rec-opts li { border-top: 0; }
.rec-static { cursor: default; }
.rec-static:hover { background: var(--surface); }
.stat-card p svg { width: 18px; height: 18px; vertical-align: -3px; stroke: var(--accent); }

/* Modo cocina: opciones de cantidades, alarma y animaciones */
.cook-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.cook-opts .cook-serv { margin-top: 0; }
.cook-uses-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.cook-chip.is-paused { background: var(--surface-2); color: var(--muted); }
.cook-alarm { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 24px; background: rgb(196 63 39 / 92%); color: #fff; animation: alarm-bg 1s ease-in-out infinite alternate; }
.cook-alarm-in { display: grid; justify-items: center; gap: 16px; text-align: center; max-width: 420px; }
.cook-alarm-in h2 { font-family: var(--f-display); font-size: clamp(1.6rem, 7vw, 2.4rem); margin: 0; }
.cook-alarm-ico svg { width: 72px; height: 72px; stroke: #fff; stroke-width: 1.8; animation: ring .5s ease-in-out infinite; transform-origin: 50% 20%; }
.cook-alarm-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cook-alarm-btns .btn { min-height: 56px; min-width: 96px; font-size: 1.1rem; }
.cook-alarm-btns .btn:not(.btn-primary) { background: #fff; color: var(--ink); border-color: #fff; }
.cook-alarm-btns .btn-primary { background: var(--ink); border-color: var(--ink); }
@keyframes alarm-bg { from { background: rgb(196 63 39 / 92%); } to { background: rgb(150 40 22 / 96%); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@keyframes cook-enter { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } }
@keyframes tick { 50% { transform: scale(1.25); } }
.cookmode { animation: cook-enter .32s cubic-bezier(.2, .8, .2, 1) both; }
.cook-slide[aria-hidden="false"] .cook-in > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.cook-slide[aria-hidden="false"] .cook-in > :nth-child(2) { animation-delay: .06s; }
.cook-slide[aria-hidden="false"] .cook-in > :nth-child(3) { animation-delay: .12s; }
.cook-slide[aria-hidden="false"] .cook-in > :nth-child(4) { animation-delay: .18s; }
.cook-slide[aria-hidden="false"] .cook-in > :nth-child(n+5) { animation-delay: .24s; }
.cook-chip { animation: pop .3s ease-out both; }
.cook-ings label { transition: background .2s, transform .15s; }
.cook-ings label:active { transform: scale(.98); }
.cook-ings input:checked { animation: tick .25s ease-out; }
.cook-ings label:has(input:checked) { background: var(--accent-soft); }
.cook-progress span { transition: background .35s ease, transform .35s ease; }
.cook-progress span.on { transform: scaleY(1.2); }
@media (prefers-reduced-motion: reduce) {
  .cookmode, .cook-slide .cook-in > *, .cook-chip, .cook-ings input:checked, .cook-alarm, .cook-alarm-ico svg { animation: none !important; }
  .cook-ings label, .cook-progress span { transition: none; }
}

/* Despensa por lotes */
.lots { list-style: none; margin: 0; padding: 0; }
.lot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.lot:first-child { border-top: 0; }
.lot-row { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 4px; border: 0; background: none; text-align: left; }
.lot-name { font-weight: 700; }
.lot-step { display: flex; gap: 4px; }
.lot-badge { justify-self: start; display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.lot-badge.is-warn { background: #FBEBDA; color: #9A4F06; }
.lot-badge.is-bad { background: #F9DCD6; color: #A8261C; }
.soon { margin: 14px 0; padding: 14px 16px; border-radius: var(--r); background: #FBEBDA; border: 1px solid #F1CFA8; }
.soon .h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.soon .h3 svg { width: 20px; height: 20px; stroke: #9A4F06; }
.soon ul { margin: 0 0 6px; padding-left: 18px; display: grid; gap: 4px; }
.save-bought { margin: 12px 0; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); display: grid; gap: 10px; }
.save-bought p { margin: 0; }
.bought-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.bought-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.lot-actions .btn svg { width: 18px; height: 18px; }
.lot-thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; background: var(--card); }
.lot-kind svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; stroke: var(--accent); }
.lot-photo { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 10px; }
.loc-tabs { display: flex; margin: 10px 0 0; }
.loc-tabs button { flex: 1; }
.pantry-list { margin-top: 10px; }
.lot-group { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; font-family: var(--f-mono); }
.lot-group:first-child { margin-top: 0; }
.loc-tabs button { padding: 0 6px; white-space: nowrap; font-size: .92rem; }
.loc-tabs .chip-count { margin-left: 2px; }
.pantry-sug { margin: 14px 0; }
.pantry-sug .h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.pantry-sug .h3 svg { width: 20px; height: 20px; stroke: var(--accent); }
.sug-row .rmain { display: grid; gap: 2px; }
.sug-uses .lot-badge { margin: 0 0 0 2px; font-size: .72rem; }
.rec-days { display: flex; align-items: center; gap: 8px; flex-basis: 100%; font-weight: 700; }
.rec-days > span { display: inline-block; }
.rec-days > span::first-letter { text-transform: uppercase; }
.rec-days .link { text-transform: none; margin-left: auto; }
.rec-date { max-width: 12rem; }
.ar-name { flex: 1; min-width: 0; font-weight: 700; }
.ar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ar-inc { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.ar-head .ar-name { flex: 1; min-width: 0; width: auto; height: auto; }
.ai-shots { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ai-shots li { position: relative; }
.ai-shots img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--card); }
.ai-shots .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.finish-btn { margin-top: 12px; min-height: 52px; font-size: 1.05rem; }
.cost-box { margin: 0 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.cost-box legend { padding: 0 6px; font-weight: 700; }
.more-up { top: auto; bottom: calc(100% + 6px); }
.more-menu > button.danger { color: var(--danger); }
.shop-actions { align-items: center; }
.shop-actions .more { margin-left: auto; }
.fc-mode { margin: 4px 0 10px; }
.fc-mode svg { width: 16px; height: 16px; vertical-align: -3px; }
.fc-ticket { margin-bottom: 10px; }
.rec-search { position: sticky; top: calc(59px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 6px 0 4px; margin: 0 -16px 6px; padding-inline: 16px; border-bottom: 1px solid var(--line); }
.rec-search .search { margin-bottom: 8px; }
.rec-search .chips { margin-bottom: 6px; }
.rec-search .plan-filter { margin-bottom: 2px; }
.badge-home { display: inline-flex; align-items: center; gap: 4px; justify-self: start; margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .76rem; font-weight: 700; }
.badge-home svg { width: 13px; height: 13px; }
.sug-more { margin-top: 8px; }
.badge-home { width: fit-content; }

/* Novedades */
.changelog { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.changelog > li { padding: 12px 14px; background: var(--card); border-radius: var(--r-sm); }
.cl-head { margin: 0 0 4px; }
.changelog ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: .92rem; }
.ihome { display: block; font-size: .78rem; font-weight: 700; color: var(--accent); }
.ihome svg { width: 13px; height: 13px; vertical-align: -2px; }

/* Escáner de códigos de barras */
.scanner { position: fixed; inset: 0; z-index: 110; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 10%; right: 10%; top: 35%; height: 22%; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 9999px rgb(0 0 0 / 45%); }
.scan-top, .scan-bottom { position: relative; z-index: 1; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
.scan-top { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.scan-top .icon-btn { background: rgb(255 255 255 / 85%); color: var(--ink); }
.scan-bottom { grid-row: 3; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgb(0 0 0 / 70%)); }
.scan-status { margin: 0 0 10px; }
.scan-bottom input { background: #fff; }
.scan-img img { max-height: 180px; object-fit: contain; background: #fff; }

/* Semana con IA */
.aiweek { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.aiweek > li { padding: 10px 12px; background: var(--card); border-radius: var(--r-sm); }
.aiweek ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.aiweek-why { display: block; }
.aiweek ul > li { display: grid; gap: 1px; }
.aiweek .link { text-align: left; justify-self: start; padding: 0; font-weight: 600; }

/* Mi perfil */
.settings-btn.has-avatar { padding: 0; overflow: hidden; }
.settings-btn.has-avatar .avatar { width: 32px; height: 32px; }
.profile-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 8px; padding: 10px 12px; border: 1px solid var(--card-edge); border-radius: 14px; background: var(--card); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.profile-row > span:not(.profile-go) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.profile-go { font-size: 1.6rem; color: var(--muted, #888); line-height: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; }
.chip-check span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .88rem; cursor: pointer; }
.chip-check input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-check input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
#pf-sweet { width: 100%; accent-color: var(--accent); }

/* ---------- Logros: racha, nivel, medallas, retos ---------- */
.streak-btn { flex: none; display: inline-flex; align-items: center; gap: 2px; width: auto; padding: 0 10px 0 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.streak-btn svg { fill: currentColor; stroke: none; }
.streak-btn.is-lit { color: #eb6834; }
.streak-btn.is-cold { color: var(--muted, #8a8a80); }
.streak-btn:not(.is-lit):not(.is-cold) { color: #c98a5a; }
.streak-btn.is-lit svg { animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.streak-btn[aria-current="page"] { background: var(--accent-soft); }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08, .96) rotate(-3deg); } 60% { transform: scale(.96, 1.06) rotate(2deg); } }
.streak-hero { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; margin: 4px 0 14px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #fff1e6, #ffe2cc); border: 1px solid #f6c9a6; color: #3a2414; }
.streak-hero.is-cold { background: var(--card); border-color: var(--card-edge); color: inherit; }
.streak-flame { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 4px 10px rgba(235, 104, 52, .35)); }
.streak-hero.is-lit .streak-flame { animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.streak-hero.is-cold .streak-flame { filter: grayscale(1); opacity: .5; }
.streak-main { display: flex; flex-direction: column; }
.streak-big { font-size: 2.6rem; line-height: 1; font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.streak-main p { margin: 4px 0 0; }
.streak-week { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 4px; margin: 10px 0 2px; padding: 0; list-style: none; }
.streak-week li { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .78rem; font-weight: 700; }
.sw-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .12); background: rgba(255, 255, 255, .6); font-size: .85rem; color: #fff; }
.sw-ok .sw-dot { background: #eb6834; border-color: #eb6834; }
.sw-frozen .sw-dot { background: #6db7e8; border-color: #6db7e8; }
.sw-miss .sw-dot { background: rgba(0, 0, 0, .08); }
.sw-today .sw-dot { border: 2px dashed #eb6834; animation: pulse 1.6s ease-in-out infinite; }
.sw-future .sw-dot { opacity: .45; }
@keyframes pulse { 50% { transform: scale(1.1); } }
.streak-foot, .streak-help { grid-column: 1 / -1; margin: 4px 0 0; }
.level-head { display: flex; align-items: center; gap: 12px; }
.level-head > div { flex: 1; min-width: 0; }
.level-head h2 { margin: 0; }
.level-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, #4a3aa7, #2a78d6); color: #fff; font-weight: 800; font-size: 1.3rem; box-shadow: 0 4px 12px rgba(74, 58, 167, .3); }
.level-week { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.level-week strong { font-size: 1.3rem; }
.level-bar, .ch-bar, .medal-bar { display: block; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 4px; }
.level-bar span, .ch-bar span, .medal-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2a78d6, #4a3aa7); transition: width .6s ease; }
.dots-row { display: flex; gap: 6px; margin: 4px 0 8px; }
.dot-t { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.dot-t.is-on { background: #1baf7a; border-color: #1baf7a; }
.field-inline { display: flex; align-items: center; gap: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-head .h3 { margin: 0; }
.ch-card { margin: 12px 0 0; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--card-edge); }
.ch-card header { display: flex; gap: 10px; align-items: flex-start; }
.ch-card header > div { flex: 1; min-width: 0; }
.ch-card h3 { margin: 0; font-size: 1rem; }
.ch-card header p { margin: 2px 0 0; }
.ch-ico { font-size: 1.6rem; line-height: 1; }
.ch-badge { flex: none; padding: 3px 8px; border-radius: 99px; background: var(--card); font-size: .75rem; font-weight: 800; }
.ch-badge.is-won { background: #fff3c4; color: #7a5600; }
.ch-badge.is-lost { background: var(--card); color: var(--muted, #888); }
.ch-won { border-color: #eda100; box-shadow: 0 0 0 2px rgba(237, 161, 0, .15); }
.ch-board { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ch-board li { display: flex; align-items: center; gap: 8px; }
.ch-board li.is-me .ch-name { font-weight: 800; }
.ch-pos { width: 16px; text-align: center; font-weight: 800; color: var(--muted, #888); font-size: .85rem; }
.ch-bar-wrap { flex: 1; min-width: 0; }
.ch-name { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-bar { height: 8px; margin: 3px 0 0; }
.ch-bar span { background: linear-gradient(90deg, #1baf7a, #2a78d6); }
.ch-count { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; }
.kudo-btn { flex: none; min-height: 32px; min-width: 44px; padding: 0 8px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.kudo-btn.is-on { border-color: #eda100; background: #fff3c4; }
.kudo-btn:not(:disabled):active { transform: scale(1.15); }
.ch-more { margin-top: 8px; }
.ch-invite { margin: 10px 0 0; padding: 12px; border-radius: 14px; background: #fff3c4; border: 1px solid #f1d27a; }
.ch-invite p { margin: 0 0 6px; }
.ch-strip { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #f1d27a; background: #fff8dc; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ch-strip > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ch-strip > span:first-child { font-size: 1.5rem; }
.ch-presets { margin-bottom: 8px; }
.chip-btn { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: .85rem; font-weight: 600; text-align: left; cursor: pointer; }
.chip-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.league { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.league li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.league li.is-me { background: var(--accent-soft); }
.lg-pos { width: 26px; text-align: center; font-weight: 800; }
.lg-name { flex: 1; display: flex; flex-direction: column; font-weight: 700; min-width: 0; }
.lg-xp { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.medals { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.medal button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; border: 1px solid var(--card-edge); background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: center; }
.medal-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; background: var(--card); border: 3px solid var(--line); }
.medal.tier-0 .medal-ico { filter: grayscale(1); opacity: .45; }
.medal.tier-1 .medal-ico, .medal-dot.tier-1, .celeb-badge.tier-1 { border-color: #c4834a; background: #fbeee2; }
.medal.tier-2 .medal-ico, .medal-dot.tier-2, .celeb-badge.tier-2 { border-color: #9aa3ad; background: #eef1f4; }
.medal.tier-3 .medal-ico, .medal-dot.tier-3, .celeb-badge.tier-3 { border-color: #e0a800; background: #fff6d6; }
.medal.tier-4 .medal-ico, .medal-dot.tier-4, .celeb-badge.tier-4 { border-color: #3fb6d9; background: #e4f7fc; box-shadow: 0 0 12px rgba(63, 182, 217, .45); }
.medal-name { font-size: .8rem; font-weight: 700; line-height: 1.15; }
.medal-tier { font-size: .72rem; color: var(--muted, #888); }
.medal-bar { width: 80%; height: 5px; margin: 4px 0 0; }
.medal-bar span { background: #e0a800; }
.medal-steps { list-style: none; padding: 0; display: grid; gap: 8px; }
.medal-steps li { display: flex; align-items: center; gap: 10px; opacity: .55; }
.medal-steps li.is-on { opacity: 1; }
.medal-dot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid; flex: none; }
/* Celebración */
.celebrate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(20, 20, 30, .55); animation: fadein .2s ease; }
.celeb-card { position: relative; width: min(360px, 100%); padding: 26px 20px 20px; border-radius: 24px; background: var(--surface, #fff); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: popin .45s cubic-bezier(.2, 1.6, .4, 1); }
.celeb-card h2 { margin: 4px 0 6px; font-family: var(--f-display); font-size: 1.5rem; }
.celeb-card .actions { justify-content: center; margin-top: 14px; }
.celeb-badge { display: grid; place-items: center; width: 96px; height: 96px; margin: -70px auto 8px; border-radius: 50%; font-size: 3rem; background: #fff3c4; border: 5px solid #eda100; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); animation: spinin .8s cubic-bezier(.2, 1.4, .4, 1); }
.celeb-xp { display: inline-block; margin: 6px 0 0; padding: 4px 12px; border-radius: 99px; background: linear-gradient(90deg, #2a78d6, #4a3aa7); color: #fff; font-weight: 800; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: fall 2.6s var(--d) cubic-bezier(.3, .6, .6, 1) forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(var(--r)); } }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
@keyframes spinin { from { transform: scale(0) rotate(-200deg); } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .streak-btn.is-lit svg, .streak-hero.is-lit .streak-flame, .sw-today .sw-dot, .celeb-card, .celeb-badge, .celebrate { animation: none; }
  .confetti { display: none; }
}
.cell-dish svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--c-comida); }
.eyebrow svg, .h3 > svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: 2px; }

/* Semana: navegación, resumen, bloqueos */
.week-nav { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.week-nav .icon-btn { flex: none; font-size: 1.6rem; line-height: 1; }
.week-title { flex: 1; min-width: 0; text-align: center; }
.week-title .h1 { margin: 0; }
.week-title p { margin: 2px 0 0; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; justify-content: center; }
.wchip { padding: 6px 10px; border-radius: 99px; background: var(--card); font-size: .85rem; }
.wchip.is-warn { background: #fff3c4; }
.week-actions { align-items: center; }
.week-actions details.more { position: relative; }
.week-actions details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.week-actions details.more > summary::-webkit-details-marker { display: none; }
.day-num { font-weight: 400; color: var(--muted, #888); }
.day.is-locked { opacity: .78; }
.cell-btn { position: relative; }
.cell-btn.is-locked { background: transparent; }
.cell-btn.is-locked .cell-what { color: var(--muted, #777); }
.cell-log, .cell-lock { margin-left: auto; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; font-weight: 800; }
.cell-log.is-done { background: #1baf7a; color: #fff; }
.cell-log.is-off { background: #eda100; color: #fff; }
.cell-log.is-skip { background: #c9c9c2; color: #fff; }
.cell-lock svg { width: 14px; height: 14px; opacity: .5; }
.past-days { margin: 8px 0 12px; border-radius: 16px; background: var(--card); }
.past-days > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 700; }
.past-days > .days { padding: 0 8px 8px; }
.week-empty .actions { justify-content: center; }
.day-check.is-locked { opacity: .5; }
.past-days > summary > span:first-child { white-space: nowrap; }
.past-days > summary > span:last-child { text-align: right; }
/* filas compactas: la marca de hecho/fuera/saltado a la derecha */
.cell-btn { grid-template-columns: auto minmax(0, 1fr) auto; }
.ag-li.is-active { background: color-mix(in oklab, var(--c) 14%, var(--card)); }
.ag-li.is-active .ag-row.is-active { background: transparent; }
/* últimos 7 días en una sola fila */
.ld-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ld { padding: 6px 0; }
.ld-dot { width: 10px; height: 10px; }
.ld-legend .ld-dot { width: 12px; height: 12px; }
:root { --c-train: #4a3aa7; }
.cell-train .cell-what svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; color: var(--c-train); }
.cell-log.is-planned { background: transparent; color: var(--c-train); }
.cell-log.is-planned svg { width: 16px; height: 16px; }
.day-train-add { margin-left: auto; min-height: 32px; padding: 0 10px; gap: 2px; }
.day-train-add svg { width: 16px; height: 16px; }
.tl-train .tl-mark { display: grid; place-items: center; }
.tl-train .tl-mark svg { width: 12px; height: 12px; stroke: #fff; }
.wk-card .seg { margin-top: 4px; }
.tl-near .tl-label { display: none; }
/* entreno a la misma hora que una comida: va en un carril encima de la línea para que se puedan tocar los dos */
.tl-dot.tl-near { top: -27px; z-index: 1; }
.tl-dot.tl-near::after { content: ''; position: absolute; left: 50%; top: 26px; width: 2px; height: 9px; margin-left: -1px; border-radius: 2px; background: var(--c-train); opacity: .6; }
.timeline:has(.tl-near) { margin-top: 32px; }
/* Receta en segundo plano */
.cook-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 46vw; min-height: 34px; padding: 0 10px; border-radius: 99px; border: 1.5px solid var(--c-comida); background: color-mix(in oklab, var(--c-comida) 12%, var(--surface)); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; animation: chip-glow 2s ease-in-out infinite; }
@keyframes chip-glow { 50% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--c-comida) 25%, transparent); } }
.cook-chip-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-chip-t { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .cook-chip-l { display: none; } }
.cook-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cook-ask { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgba(20, 20, 30, .5); }
.cook-ask-in { width: min(380px, 100%); padding: 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.cook-end-main { display: grid; gap: 8px; margin: 12px 0; }
@media (prefers-reduced-motion: reduce) { .cook-chip { animation: none; } }

/* Mascotas (mascots.js) */
.qm { display: block; width: 100%; height: auto; }
.mascot-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.mascot-opt { position: relative; }
.mascot-opt input { position: absolute; opacity: 0; inset: 0; }
.mascot-opt > span { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: .78rem; font-weight: 700; cursor: pointer; }
.mascot-opt .qm { max-width: 56px; }
.mascot-auto { display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.6rem; }
.mascot-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.mascot-opt input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.cook-mascot { width: 128px; margin: -8px auto 4px; }
.cook-step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cook-mascot-sm { flex: none; width: 72px; }
.wk-card { position: relative; }
.wk-mascot { float: right; width: 112px; margin: -8px -6px 4px 8px; }
.celeb-mascot { width: 140px; margin: -96px auto 0; }
.post-sticker { display: grid; place-items: center; padding: 8px; border-radius: 18px; margin: 8px 0; }
.post-sticker .qm { width: min(220px, 70%); }
.cmt-sticker-img { display: grid; place-items: center; width: 96px; padding: 4px; border-radius: 14px; margin-top: 4px; }
.cmt-stk-btn { flex: none; width: 44px; height: 44px; padding: 2px; }
.cmt-stickers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
.cmt-stk { padding: 2px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.stk-preview { position: relative; display: grid; place-items: center; padding: 10px; border-radius: 22px; margin-bottom: 8px; }
.stk-preview .qm { width: min(240px, 72%); }
.stk-cap { margin: -6px 0 6px; font-weight: 800; font-size: 1.2rem; color: #fff; text-shadow: 0 0 3px #191433, 0 0 3px #191433, 0 2px 0 #191433; text-align: center; }
.stk-whos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stk-who { padding: 2px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.stk-who[aria-pressed="true"], .cmt-stk:hover { border-color: var(--accent); background: var(--accent-soft); }
.stk-bgs { display: flex; gap: 8px; }
.stk-bg { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.stk-bg[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stk-gif { margin: 8px 0 0; display: grid; justify-items: center; gap: 4px; }
.stk-gif img { width: 200px; border-radius: 16px; }
/* Stickers: colores, fondo transparente y equipación */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.swatch-btn, .swatch > span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: var(--muted); background: var(--surface); }
.swatch-btn[aria-pressed="true"], .swatch input:checked + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch-btn:disabled { opacity: .3; cursor: default; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sw-orig { color: #fff; text-shadow: 0 0 2px #000; }
.stk-kit { margin: 4px 0 8px; padding: 10px 12px; border-radius: 16px; background: var(--card); }
.stk-kit > summary { cursor: pointer; font-weight: 700; }
.stk-kit[open] > summary { margin-bottom: 8px; }
.stk-preview { overflow: hidden; padding: 0; }
.stk-preview .qm { width: min(280px, 82%); }
.stk-preview.is-clear, .post-sticker.is-clear, .stk-gif.is-clear img { background: repeating-conic-gradient(#eceef5 0% 25%, #ffffff 0% 50%) 50% / 20px 20px; }
.post-sticker { padding: 0; overflow: hidden; }
.post-sticker .qm { width: min(260px, 80%); }
.post-sticker:not(.is-clear) .qm { width: 100%; max-width: 360px; }
.cmt-sticker-img.is-clear { background: none; }
/* Espera de la IA con la mascota */
.ai-wait { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: color-mix(in oklab, var(--surface) 92%, transparent); border-radius: inherit; animation: fadein .2s ease; }
.ai-wait-in { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 320px; }
.ai-wait .qm { width: 200px; max-width: 70vw; }
.ai-wait-label { font-weight: 800; font-size: 1.05rem; }
.ai-wait-tip { min-height: 1.4em; }
/* Toma puntual: quitar o añadir ingredientes */
.line-btns { display: inline-flex; align-items: center; gap: 2px; }
.line-off svg { width: 14px; height: 14px; }
.line.is-off .line-name { text-decoration: line-through; color: var(--muted); }
.line.is-off { opacity: .75; }
.line.is-add .line-label { color: var(--accent); }
.idea-add { display: flex; gap: 6px; padding: 8px 12px 10px 16px; border-top: 1px solid var(--line); }
.idea-add .text-in { flex: 1; min-width: 0; min-height: 38px; }
/* Otra comida */
.xm-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: #fbebda; color: #9a4f06; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.xm-thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.ag-li .xm-thumb { margin-right: 4px; }
.xm-ico { border-style: dashed; }
.xm-kcal { font-variant-numeric: tabular-nums; white-space: nowrap; }
.xm-nutri { margin: 4px 0 8px; padding-top: 2px; border-top: 1px solid var(--line); }
.xm-nutri .h3 { margin-top: 14px; }
.xm-items { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.xm-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.6rem 34px; align-items: center; gap: 6px; padding: 6px 4px 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.xm-it-name { display: grid; min-width: 0; font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.xm-it-name .small { font-weight: 500; font-size: .76rem; }
.xm-it-g { display: flex; align-items: center; gap: 4px; font-size: .85rem; }
.xm-it-g .num { width: 4.1rem; min-height: 38px; padding: 0 8px; font-size: .95rem; }
.xm-it-k { text-align: right; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xm-total { margin: 4px 0 6px; font-size: .95rem; }
.xm-ways { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.xm-ways svg { width: 16px; height: 16px; }
.xm-ways .btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.xm-panel { margin: 4px 0 8px; padding: 12px; border-radius: 14px; background: var(--card); }
.xm-panel .search { margin-bottom: 4px; }
.xm-panel .fine { margin-top: 10px; }
.xm-pick-name { margin: 0 0 2px; }
.xm-man-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.xm-man-row .field { margin: 0 0 8px; font-size: .82rem; }
.xm-man-row .field > span { font-size: .8rem; white-space: nowrap; }
.xm-man-row .num { width: 100%; padding: 0 8px; }
.nutri-from { margin-top: -4px; }
.mysnacks { display: grid; gap: 10px; }
.mysnacks .h3 { margin: 4px 0; }
/* Bienvenida */
.onboard { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; margin: 10px 0; padding: 14px; border-radius: var(--r, 18px); background: var(--accent-soft); border: 1.5px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.onboard-t { display: grid; gap: 6px; }
.onboard-sheet-m { width: 140px; margin: -10px auto 0; }
.tpl-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 8px; }
.tpl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); }
.tpl > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 380px) { .onboard { grid-template-columns: minmax(0, 1fr); } .onboard-m { width: 110px; } }
/* ---------- Auditoría UX ---------- */
/* Recetas: barra superior compacta */
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 4px; }
.rec-top p { margin: 0; }
.rec-top details.more { position: relative; flex: none; }
.rec-top details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.rec-top details.more > summary::-webkit-details-marker { display: none; }
.rec-top .more-menu { right: 0; left: auto; min-width: 250px; }
/* Semana: barra de días */
.day-strip { position: sticky; top: calc(var(--header-h, 60px) + env(safe-area-inset-top, 0px)); z-index: 4; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px -4px 8px; padding: 6px 4px; background: var(--bg); }
.ds { display: grid; justify-items: center; gap: 1px; padding: 5px 0 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.ds span { font-size: .7rem; font-weight: 700; color: var(--muted); }
.ds strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.ds.is-today { border-color: var(--accent); background: var(--accent-soft); }
.ds.is-past strong { color: var(--muted); }
.ds-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ds-dot.is-ok { background: var(--accent); }
.ds-dot.is-some { background: var(--c-merienda); }
.ds-dot.is-none { background: transparent; }
.day { scroll-margin-top: 150px; }
/* Amigos */
.friends-bar { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.friends-bar .btn-primary { flex: 1; justify-content: center; }
.qa { display: grid; justify-items: center; gap: 2px; min-width: 62px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: 700 .72rem var(--f-body, inherit); color: inherit; cursor: pointer; }
.qa svg { width: 20px; height: 20px; }
.empty-mascot { display: grid; justify-items: center; text-align: center; gap: 4px; }
.empty-m { width: 140px; }
.gate-mascot { width: 150px; margin: 0 auto -6px; }
.gate-mark.is-hidden { display: none; }
/* ---------- Compra y despensa (auditoría) ---------- */
.shop-head { margin-top: 6px; }
.shop-head .progress-text { margin: 0 0 4px; }
.iqty-edit svg { width: 15px; height: 15px; opacity: .45; }
.finish-bar .btn { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.pantry-sum { margin: 8px 0 6px; }
.add-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.add-tiles .qa { min-width: 0; padding: 8px 2px; font-size: .7rem; text-align: center; }
.add-tiles .qa span { line-height: 1.15; }
.add-tiles .qa-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.add-tiles .qa-main svg { stroke: #fff; }
.lot-step .icon-btn { width: 36px; height: 36px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.lot-step .icon-btn:active { background: var(--accent-soft); }
.lot-q { margin-top: 10px; }
.lot-edit { margin: 14px 0 4px; padding: 10px 12px; border-radius: 14px; background: var(--card); }
.lot-edit > summary { cursor: pointer; font-weight: 700; }
.lot-edit[open] > summary { margin-bottom: 10px; }

.week-actions .more-menu { left: 0; right: auto; }
.more-menu { max-width: calc(100vw - 32px); }
.plan-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-now .btn { margin-left: auto; }
.tpl.is-cur { outline: 2px solid var(--accent); }
/* Hogar: interruptores y vista de la pareja */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.who-seg { margin: 6px 0 10px; }
.pv-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pv-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pv-row > span:last-child { display: flex; flex-direction: column; }
.pv-row .cell-what svg { width: 14px; height: 14px; vertical-align: -2px; }
.pv-empty { padding: 10px 14px; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }
.rplan { font-size: .72rem; letter-spacing: .02em; color: var(--muted); }
.sug-all { margin: -2px 0 6px; font-size: .88rem; }
.avatar-m { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--accent-soft); flex: none; }
.avatar-m .qm { width: 100%; height: 100%; }
.avatar-m .qm * { animation: none !important; }
/* Plan de entreno */
.tp-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tp-sum span { padding: 5px 10px; border-radius: 99px; background: var(--card); font-size: .86rem; }
.tp-week, .tp-routine { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-btn { width: 100%; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tp-btn:disabled { cursor: default; opacity: .7; }
.tp-dow { font-weight: 800; }
.tp-what svg { width: 14px; height: 14px; vertical-align: -2px; }
.tp-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; color: var(--c-train); border: 2px solid var(--c-train); }
.tp-mark:empty { border-color: transparent; }
.tp-day.is-done .tp-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.tp-day.is-skip .tp-mark { background: var(--line); border-color: var(--line); color: var(--muted); }
.tp-day.is-today .tp-btn { border-color: var(--accent); background: var(--accent-soft); }
.tp-routine li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--card); }
.tp-routine li > span { flex: 1; min-width: 0; }
.tp-form { margin-top: 8px; }

/* ---------- Nutrición: barras con objetivo, recomendaciones y asistente ---------- */
.nbars { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.nbars li { display: grid; grid-template-columns: minmax(0, 5.6rem) 1fr auto; align-items: center; gap: 10px; font-size: .92rem; }
.nbars-days li { grid-template-columns: minmax(0, 4.2rem) 1fr 3.4rem; }
.nb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-track { position: relative; height: 10px; border-radius: 999px; background: var(--surface); }
.nb-fill { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.nb-goal { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.nb-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-val strong { color: var(--ink); font-weight: 800; }
.nbars .is-ok .nb-fill { background: var(--accent); }
.nbars .is-low .nb-fill { background: #d99a0e; }
.nbars .is-high .nb-fill { background: var(--danger); }
.nbars .is-none .nb-name { color: var(--muted); }
.nadv { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 10px; }
.nadv > li { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); }
.nadv p { margin: 0; }
.nadv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px !important; }
.ning { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-size: .82rem; }
.ning-btn { border: 0; font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.nadv-ok { display: flex; align-items: center; gap: 6px; margin: 6px 0 12px; font-weight: 700; color: var(--accent); }
.nadv-ok svg { width: 18px; height: 18px; }
.nadv-miss { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nadv-miss svg { width: 16px; height: 16px; color: #b9820b; }
.nadv-cal, .nadv-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); }
.nadv-cal p, .nadv-cta p { margin: 0; flex: 1 1 14rem; }
.nadv-cta p:empty { display: none; }
.nutri-week > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.nutri-week > summary::-webkit-details-marker { display: none; }
.nutri-week > summary::after { content: '▾'; color: var(--muted); }
.nutri-week[open] > summary::after { content: '▴'; }
.nw-sum { display: grid; gap: 2px; flex: 1; min-width: 0; }
.nutri-week { margin: 14px 0; }
.nw-dots { display: flex; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.nw-dots li { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.nw-dots .is-done, .nw-dots .is-on { background: var(--accent); }
.nw-choices { display: grid; gap: 8px; }
.nw-choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; text-align: left; color: inherit; cursor: pointer; }
.nw-choice > span { display: grid; gap: 2px; }
.nw-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.nw-choice input { accent-color: var(--accent); }
.nw-big:hover { border-color: var(--accent); }
.nw-result { display: grid; justify-items: center; margin: 6px 0 4px; }
.nw-result strong { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; }
.nw-why { margin: 8px 0; padding-left: 1.1rem; display: grid; gap: 4px; }
.nw-now { padding: 4px 12px; border-radius: var(--r-sm); background: var(--surface); margin-bottom: 12px; }
.nw-nav { justify-content: space-between; }

/* ---------- Social: historias, solicitudes, buscar gente y etiquetas ---------- */
.stories-bar { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-b { flex: none; display: grid; justify-items: center; gap: 4px; width: 70px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.story-ring { position: relative; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, #f5b301, #e8592c, #c13584, #6b3f8f, #f5b301); }
.story-ring > .avatar, .story-ring > img { border: 3px solid var(--bg); border-radius: 50%; box-sizing: content-box; }
.story-ring.is-seen { background: var(--line); }
.story-ring.is-add { background: none; padding: 0; }
.story-plus { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg); background: var(--accent); color: var(--accent-ink); font-weight: 800; line-height: 1; }
.story-n { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
body.story-open { overflow: hidden; }
.story-view { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: #0d0f0e; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.sv-bars { display: flex; gap: 4px; padding: calc(env(safe-area-inset-top) + 10px) 10px 0; position: relative; z-index: 3; }
.sv-bar { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 35%); overflow: hidden; }
.sv-fill { display: block; height: 100%; background: #fff; }
.sv-head { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.sv-who { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.sv-who span { font-size: .8rem; opacity: .8; }
.sv-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; cursor: pointer; }
.sv-btn svg { width: 20px; height: 20px; }
.sv-body { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-photo { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-stk { width: min(92vw, 520px); }
.sv-stk .story-stk, .story-prev .story-stk { border-radius: 20px; overflow: hidden; }
.sv-txt { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px 28px; }
.sv-txt p { margin: 0; font-family: var(--f-display); font-size: clamp(1.6rem, 7vw, 2.6rem); font-weight: 800; line-height: 1.15; text-align: center; text-wrap: balance; }
.sv-cap { position: absolute; left: 16px; right: 16px; bottom: 120px; margin: 0; padding: 8px 12px; border-radius: 12px; background: rgb(0 0 0 / 45%); font-weight: 700; text-align: center; }
.sv-tap { position: absolute; top: 70px; bottom: 110px; z-index: 2; width: 34%; border: 0; background: transparent; cursor: pointer; }
.sv-prev { left: 0; }
.sv-next { right: 0; width: 66%; }
.sv-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: 8px; padding: 12px 12px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(transparent, rgb(0 0 0 / 55%)); }
.sv-foot .post-tags { color: #fff; margin: 0; }
.sv-foot .link { color: #fff; }
.sv-react { display: flex; justify-content: space-between; gap: 6px; }
.sv-react button { flex: 1; height: 46px; border: 0; border-radius: 99px; background: rgb(255 255 255 / 14%); font-size: 1.35rem; cursor: pointer; }
.sv-react button[aria-pressed="true"] { background: rgb(255 255 255 / 38%); }
.sv-views { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 99px; background: rgb(255 255 255 / 14%); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sv-views svg { width: 18px; height: 18px; }
.sv-sheet { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgb(0 0 0 / 45%); }
.sv-sheet-in { width: 100%; max-height: 70vh; overflow: auto; padding: 18px 16px calc(env(safe-area-inset-bottom) + 16px); border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); }
.sv-r { font-size: 1.3rem; }
.story-prev { position: relative; display: grid; place-items: center; margin: 10px 0; border-radius: var(--r); overflow: hidden; background: var(--surface-2); min-height: 200px; }
.story-prev img { max-width: 100%; max-height: 52vh; object-fit: contain; }
.story-prev .icon-btn { position: absolute; top: 8px; right: 8px; }
.story-prev-stk { background: none; }
.story-prev-txt { min-height: 240px; padding: 24px; color: #fff; }
.story-prev-txt p { margin: 0; font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; text-align: center; }
.req-strip { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); }
.req-row, .person { display: flex; align-items: center; gap: 10px; }
.req-txt { flex: 1; min-width: 0; }
.person-txt { flex: 1; min-width: 0; display: grid; }
.person-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-btns { display: flex; gap: 6px; flex: none; }
.people { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 10px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); cursor: pointer; font-size: .9rem; }
.tag-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tag-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.tag-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 8px; color: var(--muted); }
.post-tags svg { width: 16px; height: 16px; }
.feed-more, .feed-end { text-align: center; padding: 16px 0 4px; }
button.ld { border: 0; font: inherit; color: inherit; cursor: pointer; }
button.ld:hover { background: var(--card-hover); }
button.ld:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.log-week-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

/* ---------- Mi perfil: cabecera y apartados plegables ---------- */
.pf-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.pf-head .sheet-title { margin: 0; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.pf-chip { padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); font-size: .8rem; font-weight: 700; }
.pf-form { gap: 10px; }
.pf-sec { border: 1px solid var(--card-edge); border-radius: var(--r); background: var(--card); }
.pf-sec > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.pf-sec > summary::-webkit-details-marker { display: none; }
.pf-sec > summary::after { content: '›'; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.pf-sec[open] > summary::after { transform: rotate(90deg); }
.pf-sec-t { display: grid; gap: 2px; min-width: 0; }
.pf-sec-t .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sec-b { display: grid; gap: 14px; padding: 2px 16px 16px; }
.pf-sec .mascot-pick { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scroll-snap-type: x proximity; }
.pf-sec .mascot-opt { flex: none; width: 82px; scroll-snap-align: start; }
.pf-save { position: sticky; bottom: 0; padding: 10px 0 calc(env(safe-area-inset-bottom) + 4px); background: linear-gradient(transparent, var(--surface) 30%); }
.tpl-btns { display: flex; align-items: center; gap: 6px; flex: none; }

/* ---------- Tutorial ---------- */
.tour { position: fixed; inset: 0; z-index: 140; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgb(13 18 15 / 64%); transition: left .25s, top .25s, width .25s, height .25s; pointer-events: none; }
.tour.is-center .tour-hole { box-shadow: 0 0 0 9999px rgb(13 18 15 / 72%); }
.tour-card { position: fixed; left: 12px; right: 12px; max-width: 420px; margin: 0 auto; padding: 16px 16px 14px; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 40px rgb(0 0 0 / 28%); transition: top .25s; }
.tour.is-center .tour-card { top: 50% !important; transform: translateY(-50%); text-align: center; }
.tour-m { width: 140px; margin: -4px auto 0; }
.tour-t { margin: 2px 0 4px; font-family: var(--f-display); font-size: 1.3rem; }
.tour-x { margin: 0 0 10px; }
.tour-dots { display: flex; justify-content: center; gap: 4px; margin-bottom: 10px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots .is-on { width: 16px; border-radius: 3px; background: var(--accent); }
.tour-btns { display: flex; align-items: center; gap: 8px; }
.tour-btns > span { flex: 1; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }

/* ---------- Hoy: estado de las tomas en las burbujas (tocar la activa cambia su estado) y junto al título ---------- */
.hero-title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
.hero::before { opacity: .7; }
.chip-back { margin-left: 6px; padding: 3px 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--surface); font: inherit; font-size: .82rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.tl-mark { display: grid; place-items: center; color: #fff; font-size: .68rem; font-weight: 900; line-height: 1; }
.tl-dot.is-done .tl-mark, .tl-dot.is-off .tl-mark, .tl-dot.is-skip .tl-mark { width: 22px; height: 22px; margin-top: -2px; }
.tl-dot.is-off .tl-mark { box-shadow: 0 0 0 2px #d99a0e; }
.tl-dot.is-skip .tl-mark { background: color-mix(in oklab, var(--c) 35%, #bdbdbd); }
.tl-dot.is-active.is-done .tl-mark, .tl-dot.is-active.is-off .tl-mark, .tl-dot.is-active.is-skip .tl-mark { box-shadow: 0 0 0 2px var(--ink); }
/* Tarjeta de la toma en el móvil: la etiqueta encima del alimento, para ganar ancho */
@media (max-width: 480px) {
  .idea .line { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding-top: 9px; }
  .idea .line-label { grid-column: 1 / -1; }
  .idea .line-extra { grid-column: 1 / -1; }
  .idea .line-btns .icon-btn { width: 34px; height: 34px; }
}

.feature-head { display: flex; align-items: flex-start; gap: 8px; }
.feature-head .feature-title { flex: 1; min-width: 0; }
.sides { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 6px; }
.side { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--card-edge); }
.side-l { grid-column: 1 / -1; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.side-n { font-size: .98rem; }
.side-c { grid-row: 2 / span 2; grid-column: 2; align-self: center; }
.side-d { grid-column: 1; }
.idea-head .log-btn, .feature-head .log-btn { flex: none; margin-top: 2px; }
.tl-dot.is-active .tl-mark { cursor: pointer; }
.idea-head .log-btn, .feature-head .log-btn { width: 50px; min-height: 42px; padding: 2px 0; font-size: .64rem; border-radius: 12px; }
.idea-head .log-btn svg, .feature-head .log-btn svg { width: 19px; height: 19px; }
.idea-head { padding-right: 10px; gap: 6px; }
.idea-head .heart { margin-top: 2px; }

/* ---------- Entrenos: deportes, kcal y burbujas ---------- */
.hero + .feature, .hero + .wk-card { margin-top: 14px; }
.sport-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.sport-chip { position: relative; }
.sport-chip input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.sport-chip > span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px 6px 8px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .88rem; font-weight: 700; cursor: pointer; }
.sport-chip input:checked + span { border-color: var(--c-train); background: color-mix(in oklab, var(--c-train) 14%, var(--surface)); }
.sport-chip input:focus-visible + span { outline: 2px solid var(--c-train); outline-offset: 2px; }
.sport-ico { font-size: 1.05rem; line-height: 1; }
.sport-more { margin-top: 8px; }
.sport-more > summary { cursor: pointer; margin-bottom: 8px; }
.wk-kcal { margin: -4px 0 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in oklab, var(--c-train) 9%, var(--surface)); }
.tl-train .tl-label { font-size: .85rem; }
.tl-train.is-done .tl-mark svg, .tl-train.is-skip .tl-mark svg { display: none; }
.wk-card .feature-head { position: relative; z-index: 1; }

/* ---------- Avisos: tu mascota se asoma por detrás del card, por encima ---------- */
.note svg { width: 18px; height: 18px; vertical-align: -3px; }
.note-m { position: relative; margin: 34px 0 0; }
.note-m .note-box { position: relative; z-index: 1; margin: 0; }
.note-peek { position: absolute; z-index: 0; top: -34px; right: 18px; width: 64px; height: 64px; animation: note-peek .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.note-peek .qm { width: 100%; height: 100%; }
.note-peek .qm * { animation: none !important; }
@keyframes note-peek { from { transform: translateY(26px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .note-peek { animation: none; } }
.note-m-warn .note-box { padding-right: 16px; }
.wk-card .note-m { margin-top: 30px; }
/* ---------- Mi perfil ---------- */
.pf-form { display: flex; flex-direction: column; gap: 12px; }
.pf-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note-m { margin-top: 42px; }
.note-peek { top: -42px; }

/* ---------- Progreso de la IA ---------- */
.ai-wait { overflow: auto; align-items: start; }
.ai-wait-in { width: min(340px, 100%); padding-top: 8px; }
.ai-wait .qm { width: 150px; }
.ai-bar { width: 100%; height: 10px; margin: 6px 0 2px; border-radius: 99px; background: var(--card); overflow: hidden; }
.ai-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .4s ease; }
.ai-steps { list-style: none; width: 100%; margin: 8px 0 2px; padding: 0; display: grid; gap: 6px; text-align: left; }
.ai-steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.ai-steps li::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.ai-steps li.is-on { color: var(--ink); font-weight: 700; }
.ai-steps li.is-on::before { border-color: var(--accent); border-top-color: transparent; animation: ai-spin .9s linear infinite; }
.ai-steps li.is-done { color: var(--ink); }
.ai-steps li.is-done::before { content: '✓'; display: grid; place-items: center; border: 0; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 900; }
.ai-step-n { font-weight: 400; color: var(--muted); }
.ai-time { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.ai-note { margin: 0; min-height: 1.2em; color: #9A4F06; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-steps li.is-on::before { animation: none; } .ai-bar > span { transition: none; } }
.ai-wait { background: color-mix(in oklab, var(--surface) 98%, transparent); }

/* ---------- Profesionales ---------- */
.pro-btn svg { width: 22px; height: 22px; }
.pro-client { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 4px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.pro-client:hover { background: var(--card-hover); }
.pro-block { margin: 10px 0; }
.pro-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; height: 46px; align-items: end; }
.pro-day { display: flex; flex-direction: column-reverse; height: 100%; border-radius: 4px; background: var(--surface); overflow: hidden; }
.pro-day i { display: block; height: var(--h); }
.pd-done { background: var(--accent); }
.pd-off { background: #d99a0e; }
.pd-skip { background: var(--muted); }
.pro-ok { color: var(--accent); font-weight: 700; }
.pro-mine { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px dotted var(--line); }
.pro-mine p { margin: 0; }
.pro-terms { align-items: flex-start; font-size: .88rem; }

/* ---------- Tabla nutricional (como la etiqueta de un producto) ---------- */
.nl { margin: 22px 0 8px; padding: 10px 12px 12px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-family: var(--f-body); }
.nl-t { margin: 0; font-family: var(--f-display); font-size: 1.55rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
.nl-size { margin: 2px 0 6px; padding-bottom: 6px; border-bottom: 8px solid var(--ink); font-size: .92rem; }
.nl-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.nl-table thead th { padding: 2px 4px 4px; border-bottom: 1px solid var(--ink); font-size: .74rem; font-weight: 800; text-align: right; }
.nl-table thead th:first-child { text-align: left; }
.nl-table tbody th { padding: 5px 4px 5px 0; font-weight: 800; text-align: left; }
.nl-table td { padding: 5px 4px; text-align: right; white-space: nowrap; }
.nl-table tbody tr { border-bottom: 1px solid var(--ink); }
.nl-table td:last-child { font-weight: 800; }
.nl-kcal { border-bottom: 4px solid var(--ink) !important; }
.nl-kcal th { font-size: 1rem; }
.nl-sub th { padding-left: 14px !important; font-weight: 400 !important; }
.nl-table tbody tr:last-child { border-bottom: 8px solid var(--ink); }
.nl-foot { margin: 6px 0 0; font-size: .74rem; line-height: 1.35; }
.nutri-today { margin-top: 18px; }
.nl-ai { margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--card-edge); }
.nl-ai-t { margin: 0 0 6px; }
.nl-ai ul { margin: 4px 0 6px; padding-left: 18px; }
.pr-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-variant-numeric: tabular-nums; font-size: .92rem; }
.pr-table th, .pr-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.pr-table th:first-child { text-align: left; }
.pr-table thead th { font-size: .74rem; color: var(--muted); }
.pr-total th, .pr-total td { font-weight: 800; border-top: 2px solid var(--ink); }
.pr-need th, .pr-need td { color: var(--muted); }

/* ---------- Semana → Entrenos ---------- */
.week-view { margin-top: 12px; }
.tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tr-favs { margin: 6px 0 10px; }
.sport-chip-b { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px 6px 8px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font: inherit; font-size: .88rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.sport-fav { color: #d99a0e; }
.tr-more { width: auto; min-height: 36px; }
.tr-plan .ai-bar { margin: 6px 0 2px; }
/* Entrenos rápidos: tarjetas de colores en fila, como en las apps de entreno */
.qw { margin: 4px 0 12px; }
.qw-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; scrollbar-width: none; }
.qw-chips::-webkit-scrollbar, .qw-row::-webkit-scrollbar { display: none; }
.qw-chip { flex: none; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.qw-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.qw-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.qw-card { flex: none; width: 152px; scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; font: inherit; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--qw) 78%, #fff) 0%, var(--qw) 55%, color-mix(in srgb, var(--qw) 70%, #000) 100%); box-shadow: 0 6px 16px -8px var(--qw); }
.qw-card .qw-m { display: block; height: 112px; background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.35), transparent 65%); }
.qw-m svg { width: 100%; height: 100%; display: block; }
.qw-t { display: grid; gap: 1px; padding: 6px 12px 12px; font-size: .78rem; opacity: .95; }
.qw-t strong { font-size: .98rem; line-height: 1.15; margin-bottom: 3px; }
.qw-card:active { transform: scale(.98); }
.qw-hero { display: flex; align-items: center; gap: 10px; margin: -4px -4px 10px; padding: 8px 14px 8px 4px; border-radius: 18px; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--qw) 78%, #fff), var(--qw)); }
.qw-hero .qw-m { flex: none; width: 104px; height: 104px; }
.qw-hero .eyebrow, .qw-hero .sheet-title { color: #fff; margin: 0; }
.qw-steps { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.qw-steps li { display: grid; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-edge); }
.qw-ph { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tr-days { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.tr-day { padding: 10px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-edge); }
.tr-day.is-today { border-color: var(--c-train); box-shadow: inset 4px 0 0 var(--c-train); }
.tr-day-h { display: flex; align-items: center; gap: 6px; }
.tr-day-h .icon-btn { margin-left: auto; }
.tr-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tr-w { display: flex; align-items: center; gap: 6px; }
.tr-w-b { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.tr-w-t { display: grid; min-width: 0; }
.tr-w.is-done .tr-w-t strong { text-decoration: line-through; text-decoration-color: var(--accent); }
.tr-rest { margin: 4px 0 0; }
.tr-list-plain { margin: 6px 0; padding-left: 1.1rem; display: grid; gap: 6px; }
/* Historial de entrenos */
.th-range, .th-sport { margin: 2px 0; }
.th-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.th-sum > div { display: grid; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-edge); }
.th-sum strong { font-size: 1.15rem; }
.th-sum span { font-size: .78rem; color: var(--muted); }
.th-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding: 0 2px 18px; margin: 6px 0 10px; }
.th-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.th-bar > span { display: block; width: 100%; min-height: 2px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--c-train) 55%, var(--card)); }
.th-bar.is-now > span { background: var(--c-train); }
.th-bar > em { position: absolute; left: 0; right: 0; bottom: -17px; text-align: center; font-style: normal; font-size: .68rem; color: var(--muted); }
.th-sports, .th-recs { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 8px; }
.th-sports li { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; align-items: center; gap: 8px; }
.th-sports .ai-bar { margin: 0; }
.th-recs li { display: grid; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-edge); }
.th-list .tr-w.is-done .tr-w-t strong { text-decoration: none; }
.th-list .tr-w.is-skip { opacity: .6; }
.th-empty { margin: 14px 0; }
.tr-week summary { cursor: pointer; }
.wk-steps { margin: 6px 0; padding-left: 1.2rem; display: grid; gap: 4px; font-size: .9rem; }
.wk-session { margin-top: 8px; }

/* ---------- Modo entreno ---------- */
.tm { position: fixed; inset: 0; z-index: 125; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.tm-top { padding: calc(env(safe-area-inset-top) + 10px) 14px 0; }
.tm-bar { height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; }
.tm-bar > span { display: block; height: 100%; background: var(--c-train); transition: width .3s; }
.tm-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.tm-phase { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tm-x { background: var(--card); color: var(--ink); }
.tm-body { flex: 1; overflow: auto; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 6px 16px; text-align: center; }
.tm-body.is-rest { background: color-mix(in oklab, var(--c-train) 7%, var(--bg)); }
.tm-m { width: min(62vw, 250px); position: relative; }
/* Bocadillo de la mascota cuando habla (voz o jerga) */
.tm-say { position: absolute; left: 50%; bottom: 92%; transform: translateX(-50%); width: max-content; max-width: min(78vw, 300px); margin: 0; padding: 8px 12px; border-radius: 16px; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 700; line-height: 1.3; text-align: center; box-shadow: 0 6px 18px -8px rgba(20, 20, 60, .35); z-index: 2; }
.tm-say::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; }
.tm-say.is-on { animation: tm-say-in .25s ease-out; }
@keyframes tm-say-in { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
.tm-snd { display: inline-flex; gap: 4px; margin-left: auto; margin-right: 6px; }
.snd-btn { font-size: 1.05rem; background: var(--card); }
.snd-btn[aria-pressed="false"] { opacity: .65; }
.tm-pace { margin: 6px 0 0; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, var(--c-train) 14%, #fff); font-size: 1.05rem; }
.tm-pace strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tm-gps-btn { margin-top: 10px; }
.tm-gps { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 4px 14px; margin-top: 10px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--card-edge); min-width: min(84vw, 320px); }
.tm-gps > div { display: grid; }
.tm-gps-v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tm-gps-msg { grid-column: 1 / -1; margin: 0; font-weight: 700; min-height: 1.2em; }
.tm-gps.is-ok { border-color: #3d9b5a; } .tm-gps.is-ok .tm-gps-msg { color: #2f7d47; }
.tm-gps.is-fast, .tm-gps.is-slow { border-color: #e07a2e; } .tm-gps.is-fast .tm-gps-msg, .tm-gps.is-slow .tm-gps-msg { color: #b3561a; }
.rp-zones { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 4px; }
.rp-zones li { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 10px; background: var(--card); font-variant-numeric: tabular-nums; }
.rp-line { margin: 8px 0; }
.chrono-w { display: flex; align-items: center; gap: 8px; }
/* cronómetro digital: pantalla oscura con dígitos grandes y verdes */
.chrono { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 14px; border: 2px solid #11131c; background: linear-gradient(180deg, #1f2433, #141824); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 2px 0 #0b0d14; cursor: pointer; }
.chrono-d { font-family: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace; font-size: 1.7rem; font-weight: 700; letter-spacing: .06em; color: #7dffb2; text-shadow: 0 0 8px rgba(125, 255, 178, .55); font-variant-numeric: tabular-nums; }
.chrono-u { font-size: .8rem; font-weight: 700; color: #8fa3c4; }
.chrono:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chrono.is-pop .chrono-d { animation: chrono-pop .35s ease-out; }
@keyframes chrono-pop { 50% { transform: scale(1.08); } }
.chrono-pick { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 12, 20, .45); }
.chrono-pick-in { width: min(100%, 420px); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--surface); }
.chrono-pick-t { margin: 0 0 6px; font-weight: 800; text-align: center; }
.chrono-pick-d { margin: 0 auto 10px; width: max-content; padding: 6px 16px; border-radius: 12px; background: #141824; font-family: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace; font-size: 2rem; font-weight: 700; color: #7dffb2; text-shadow: 0 0 8px rgba(125, 255, 178, .55); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.wheels { position: relative; display: flex; justify-content: center; align-items: center; gap: 4px; height: 220px; }
.wheel-c { position: relative; display: flex; align-items: center; gap: 4px; }
.wheel { height: 220px; width: 64px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 88px 0; box-sizing: border-box; -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus { outline: none; }
.wheel-i { height: 44px; line-height: 44px; scroll-snap-align: center; text-align: center; font-family: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace; font-size: 1.5rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.wheel-i.is-on { color: var(--ink); font-size: 1.75rem; }
.wheel-u { font-size: .8rem; font-weight: 800; color: var(--muted); }
.wheel-sep { font-size: 1.6rem; font-weight: 800; color: var(--muted); margin-top: -4px; }
.wheel-band { position: absolute; left: 0; right: 0; top: 88px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); pointer-events: none; }
.dur-b { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font: inherit; font-size: 1.2rem; font-weight: 800; color: var(--ink); cursor: pointer; }
.rp-zones li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
.rp-zones li .muted { grid-column: 1; }
.rp-zones li > span:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 800; }
.rp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.rp-card { display: grid; gap: 1px; text-align: left; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.rp-k { font-weight: 800; }
.load-ok { background: color-mix(in srgb, #3d9b5a 18%, var(--card)); }
.load-low { background: color-mix(in srgb, #4c9ad9 18%, var(--card)); }
.load-high { background: color-mix(in srgb, #e0a82e 25%, var(--card)); }
.load-danger { background: color-mix(in srgb, #e05a2e 25%, var(--card)); }
.tm-metro { margin-top: 8px; }
.tm-metro.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tm-metro-hint { margin: 8px 0 0; }
.tm-set { margin: 0; font-weight: 800; color: var(--c-train); min-height: 1.2em; }
.tm-name { margin: 0; font-family: var(--f-display); font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1.1; text-wrap: balance; }
.tm-reps { margin: 4px 0 0; font-family: var(--f-display); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.tm-reps span { font-size: 1rem; font-weight: 700; color: var(--muted); }
.tm-target { margin: 2px 0 0; font-weight: 700; color: var(--muted); }
.tm-timer { position: relative; width: 150px; height: 150px; margin: 6px 0; }
.tm-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tm-ring-bg { fill: none; stroke: var(--card); stroke-width: 10; }
.tm-ring-fg { fill: none; stroke: var(--c-train); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.tm-clock { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-size: 2.2rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.tm-cue { margin: 6px 0 0; max-width: 34ch; font-size: .95rem; }
.tm-next { margin: 4px 0 0; font-size: .88rem; }
.tm-ctrls { display: flex; gap: 8px; padding: 10px 14px calc(env(safe-area-inset-bottom) + 14px); }
.tm-ctrls .btn { flex: 1; justify-content: center; min-height: 52px; }
.tm-ctrls .btn-primary { flex: 1.6; }
.tm .seg { margin-top: 8px; }
/* Registro de series: kilos × reps en cada serie, la última vez y los récords */
.tm-log { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.tm-in { display: inline-flex; align-items: center; gap: 6px; }
.tm-in .num { width: 5.2rem; min-height: 52px; text-align: center; font-size: 1.4rem; }
.tm-in span { font-weight: 700; color: var(--muted); font-size: .9rem; }
.tm-times { font-weight: 800; color: var(--muted); }
.tm-last { margin: 6px 0 0; }
.tm-last strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.tm-pr { margin: 6px 0 0; padding: 4px 12px; border-radius: 99px; background: color-mix(in oklab, var(--c-merienda) 18%, var(--bg)); color: var(--ink); font-weight: 800; font-size: .9rem; }
.tm-pr.is-flash { margin: 4px 0 2px; animation: tm-pr-in .3s ease-out; }
@keyframes tm-pr-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.tm-vol { margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.tm-prs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tm-prs li { padding: 6px 12px; border-radius: 12px; background: var(--card); }
.sl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sl-list li { display: grid; gap: 4px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.sl-sets { display: flex; flex-wrap: wrap; gap: 4px; }
.sl-set { padding: 2px 9px; border-radius: 99px; background: var(--card); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sl-vol { margin: 6px 0 0; }
.sl-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.sl-name .small { flex: none; color: var(--accent); font-weight: 700; }
.sl-edit { justify-self: start; display: inline-flex; align-items: center; gap: 4px; }
.sl-edit svg, .sl-ed .link svg { width: 15px; height: 15px; }
.sl-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-weight: 400; }
/* Apuntar series a mano: un bloque por ejercicio, una fila por serie (kg × reps) */
.sl-exs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sl-ex { display: grid; gap: 6px; padding: 8px 8px 10px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.sl-ex-h { display: flex; align-items: center; gap: 4px; }
.sl-ex-h .text-in { min-width: 0; flex: 1; font-weight: 700; }
.sl-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sl-rows li { display: flex; align-items: center; gap: 6px; }
.sl-rows .num { width: 4.6rem; min-height: 40px; padding: 0 8px; text-align: center; }
.sl-n { width: 1.4rem; text-align: center; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sl-x { color: var(--muted); }
.sl-ex > .link { justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.sl-add-ex { justify-self: start; }
.sl-ed > .muted { margin: 0; font-weight: 400; }
/* Progreso por ejercicio */
.ex-list, .ex-hist { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 8px; }
.ex-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--card-edge); background: var(--card); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ex-row-t { display: grid; gap: 2px; min-width: 0; }
.ex-row-t strong { overflow-wrap: anywhere; }
.ex-row-b { flex: none; display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums; }
.ex-sum strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ex-sum.has-1rm { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .8fr); }
.ex-metric { margin: 10px 0 0; }
.ex-chart { margin: 4px 0 0; }
.ex-axis { stroke: var(--line); stroke-width: 1; }
.ex-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.ex-chart text { stroke: none; }
.ex-val { fill: var(--ink); font-weight: 700; }
.ex-cap { margin: 0 0 6px; }
.ex-hist li { display: grid; gap: 6px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-edge); }
.ex-hist-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ex-hist .sl-set { background: var(--surface-2); }
.sl-set.is-best { background: color-mix(in oklab, var(--c-merienda) 22%, var(--bg)); }

/* Buscador por ingredientes */
.rec-finder { margin: 4px 0 12px; }
.fd-chips { margin: 8px 0; }
.fd-chip { display: inline-flex; align-items: center; gap: 4px; }
.fd-cats { margin-top: 10px; }
.fd-target { margin: 8px 0 4px; }
.fd-fit { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: .74rem; font-weight: 700; vertical-align: 1px; }
.fd-fit svg { width: 12px; height: 12px; }
.fd-fit.is-ok { background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--ink); }
.fd-fit.is-meh { background: var(--card); color: var(--muted); }
.fd-tips { list-style: none; margin: -2px 0 10px; padding: 0 0 0 26px; display: grid; gap: 4px; }
.fd-tips li { display: flex; gap: 6px; align-items: flex-start; color: var(--ink); }
.fd-tips svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--accent, currentColor); }
.fd-ai { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Resumen semanal */
.ws-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
.ws-arrow { min-width: 44px; font-size: 1.3rem; line-height: 1; }
.ws-arrow:disabled { opacity: .35; cursor: default; }
.ws-range { flex: 1; text-align: center; font-weight: 700; }
.ws-today { margin: 0 0 12px; text-align: center; }
.ws-card { margin: 0 0 12px; padding: 14px; border-radius: var(--r); background: var(--accent-soft); }
.ws-hl { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-weight: 700; }
.ws-hl li { display: flex; gap: 8px; align-items: baseline; }
.ws-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ws-tile { display: grid; align-content: start; gap: 1px; min-width: 0; padding: 10px; border-radius: 14px; background: var(--surface); }
.ws-tile strong { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ws-tile strong small { font-size: .8rem; color: var(--muted); font-weight: 700; }
.ws-tile > span { font-size: .78rem; color: var(--muted); line-height: 1.25; }
.ws-d { justify-self: start; margin-top: 3px; padding: 0 6px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--card); color: var(--muted); }
.ws-d.is-up { background: color-mix(in oklab, var(--accent) 18%, var(--surface)); color: var(--accent); }
.ws-d.is-down { background: #FBEBDA; color: #9A4F06; }
.ws-note { margin: 8px 0 0; }
.ws-share { margin: 0 0 14px; }
.ws-sec .h3 { display: flex; align-items: center; gap: 6px; }
.ws-sec .h3 svg { width: 20px; height: 20px; }
.ws-h4 { margin: 14px 0 4px; font-size: .95rem; }
.ws-basis { margin-top: -4px; }
.ws-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.ws-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); }
.ws-list li > span:last-child { text-align: right; margin-left: auto; }
.ws-recs svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--c-merienda); }
.ws-sec p svg { width: 15px; height: 15px; vertical-align: -2px; }
.ws-empty { margin: 8px 0 16px; padding: 18px 16px; border-radius: var(--r); background: var(--card); text-align: center; }
.ws-empty p { margin: 0 0 4px; }
.ws-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--card-edge); border-radius: var(--r); background: var(--accent-soft); color: var(--ink); text-align: left; font: inherit; }
.ws-entry:hover { background: color-mix(in oklab, var(--accent-soft) 85%, var(--ink)); }
.ws-entry-ico svg { width: 26px; height: 26px; color: var(--accent); }
.ws-entry-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ws-entry-go { font-size: 1.5rem; color: var(--accent); font-weight: 700; }
.ws-prompt { background: var(--accent-soft); }

/* ---------- Ayuno intermitente (opcional): temporizador en Útiles y franja en «Hoy» ---------- */
.af-switch { border-bottom: 0; padding-top: 4px; }
.af-note { margin: 4px 0 12px; font-size: .88rem; }
.af-note-more p { margin: 4px 0 8px; }
.af-proto { width: fit-content; max-width: 100%; }
.af-custom .num { width: 6rem; }
.af-eat-f .text-in { width: 8.5rem; }
.af-window { margin: -4px 0 4px; }
.af-sug { margin: 0 0 4px; }
.af-ring { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--sz); height: var(--sz); }
.af-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.af-track { stroke: var(--line); stroke-width: 9; }
.af-arc { stroke: var(--accent); stroke-width: 9; transition: stroke-dasharray .4s; }
.af-ring.is-done .af-arc { stroke: var(--c-mm); }
.af-ring-in { position: relative; display: grid; justify-items: center; line-height: 1.1; text-align: center; }
.af-ring-in strong { font-family: var(--f-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.af-ring-in span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.af-live { display: flex; align-items: center; gap: 14px; margin: 4px 0 10px; padding: 14px; border-radius: var(--r); background: var(--surface); }
.af-live-t { min-width: 0; }
.af-live-t p { margin: 0 0 4px; }
.af-state { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.af-state.is-done { color: var(--accent); }
.af-state svg { width: 20px; height: 20px; vertical-align: -3px; }
.af-left strong { font-variant-numeric: tabular-nums; }
.af-eat { font-weight: 700; }
.af-start { display: grid; gap: 6px; margin: 4px 0 4px; }
.af-start > .btn { justify-self: start; }
.af-earlier summary { list-style: none; cursor: pointer; width: fit-content; }
.af-earlier summary::-webkit-details-marker { display: none; }
.af-earlier .field { margin-bottom: 4px; }
.af-earlier .text-in, .af-when .text-in { max-width: 15rem; }
.af-when { margin-top: 10px; }
.af-when .af-when-ok { width: auto; padding: 0 16px; }
.af-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: end; }
.af-sum { display: grid; gap: 8px; }
.af-sum p { margin: 0; display: grid; line-height: 1.2; }
.af-sum strong { font-family: var(--f-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.af-sum span { color: var(--muted); font-size: .82rem; }
.af-bars { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; height: 104px; }
.af-bars li { display: grid; grid-template-rows: 1fr auto; gap: 3px; min-width: 0; }
.af-bar { position: relative; display: block; border-radius: 6px; background: var(--surface); overflow: hidden; }
.af-bar span { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: color-mix(in oklab, var(--accent) 40%, var(--surface)); }
.af-bars .is-ok .af-bar span { background: var(--accent); }
.af-bar-d { text-align: center; line-height: 16px; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.af-goal { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed color-mix(in oklab, var(--ink) 45%, transparent); pointer-events: none; display: block; }
.af-hist { margin-top: 10px; }
.af-list li > span:first-child { display: grid; min-width: 0; }
.af-h-st { font-size: .8rem; color: var(--muted); }
.af-h-st.is-ok { color: var(--accent); font-weight: 700; }
.af-h-btns { display: flex; gap: 10px; flex: none; }
.af-strip { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--card-edge); border-radius: var(--r); background: var(--card); color: var(--ink); text-align: left; font: inherit; }
.af-strip:hover { background: var(--card-hover); }
.af-strip .af-track, .af-strip .af-arc { stroke-width: 12; }
.af-strip-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.af-strip .profile-go { font-size: 1.4rem; color: var(--muted); }
.af-hint { color: var(--muted); font-weight: 400; font-size: .9rem; white-space: nowrap; }
.ag-fast { color: var(--muted); font-size: .78rem; }
@media (prefers-reduced-motion: reduce) { .af-arc { transition: none; } }
