/* Menú para Dos — app de celular. Columna única (máx. 560px), barra de pestañas abajo, recetas en una hoja que sube. */
:root {
  --bg: #eef1f5; --surface: #ffffff; --sunk: #e4e8ee; --ink: #172033; --muted: #5b6577; --line: #d6dce5;
  --cobalt: #2347c5; --cobalt-soft: #e1e7fb; --tomato: #d9452b; --tomato-soft: #fbe5e0;
  --olive: #56742a; --olive-soft: #e7eedb; --saffron: #c98a06; --saffron-soft: #faefd6;
  --ele: #2347c5; --ele-soft: #e1e7fb; --ela: #c7365d; --ela-soft: #f8e1e8;
  --t-eco: #56742a; --t-eco-soft: #e7eedb; --t-int: #c98a06; --t-int-soft: #faefd6; --t-pre: #2347c5; --t-pre-soft: #e1e7fb;
  --shadow: 0 1px 2px rgba(23, 32, 51, .06), 0 6px 20px rgba(23, 32, 51, .06);
  --f-display: "Unbounded", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-h: 64px; --on: #ffffff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1320; --surface: #171f30; --sunk: #111827; --ink: #e8ecf4; --muted: #95a1b8; --line: #263049;
  --cobalt: #7f9bff; --cobalt-soft: #1c2747; --tomato: #ff7b5f; --tomato-soft: #3a1f1a;
  --olive: #a6c46b; --olive-soft: #222c16; --saffron: #f2bf4a; --saffron-soft: #33280e;
  --ele: #7f9bff; --ele-soft: #1c2747; --ela: #ff7fa1; --ela-soft: #3a1b26;
  --t-eco: #a6c46b; --t-eco-soft: #222c16; --t-int: #f2bf4a; --t-int-soft: #33280e; --t-pre: #7f9bff; --t-pre-soft: #1c2747;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --on: #0e1320; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0e1320; --surface: #171f30; --sunk: #111827; --ink: #e8ecf4; --muted: #95a1b8; --line: #263049;
  --cobalt: #7f9bff; --cobalt-soft: #1c2747; --tomato: #ff7b5f; --tomato-soft: #3a1f1a;
  --olive: #a6c46b; --olive-soft: #222c16; --saffron: #f2bf4a; --saffron-soft: #33280e;
  --ele: #7f9bff; --ele-soft: #1c2747; --ela: #ff7fa1; --ela-soft: #3a1b26;
  --t-eco: #a6c46b; --t-eco-soft: #222c16; --t-int: #f2bf4a; --t-int-soft: #33280e; --t-pre: #7f9bff; --t-pre-soft: #1c2747;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --on: #0e1320; color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.15; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.disp { font-family: var(--f-display); letter-spacing: -0.01em; }
[hidden] { display: none !important; }

.shell { max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 10px; }
.topbar h1 { font-family: var(--f-display); font-size: 21px; font-weight: 600; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sync.on i { background: var(--olive); }
main { display: grid; gap: 18px; }
.view { display: grid; gap: 16px; }

/* Barra de pestañas */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.tabbar button { background: none; border: 0; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button[aria-selected="true"] { color: var(--cobalt); }
.tabbar button[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--cobalt); }
.badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--tomato); color: var(--on); font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }

/* Botones */
.btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: 44px; }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--on); }
.btn.tomato { background: var(--tomato); border-color: var(--tomato); color: var(--on); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .35; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn[disabled] { opacity: .3; }
.lnk { background: none; border: 0; padding: 6px 0; color: var(--cobalt); font-weight: 600; font-size: 14.5px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.seg { display: flex; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg.tiers button[aria-pressed="true"].t-economico { background: var(--t-eco); color: var(--on); }
.seg.tiers button[aria-pressed="true"].t-intermedio { background: var(--t-int); color: var(--on); }
.seg.tiers button[aria-pressed="true"].t-premium { background: var(--t-pre); color: var(--on); }

/* Cuenta regresiva con panot */
.hero { position: relative; overflow: hidden; border-radius: 22px; background: var(--cobalt); color: var(--on); padding: 22px 20px 20px; display: grid; gap: 16px; }
.hero .tile { position: absolute; inset: 0; opacity: .14; background-size: 72px 72px; }
.hero > *:not(.tile) { position: relative; }
.hero .n { font-family: var(--f-display); font-size: 64px; font-weight: 700; line-height: .9; }
.hero .n small { font-size: 20px; font-weight: 500; margin-left: 8px; }
.hero p { margin: 0; opacity: .9; }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.steps3 li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 12px; }
.steps3 li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--on); color: var(--cobalt); display: grid; place-items: center; font-weight: 700; font-family: var(--f-display); font-size: 14px; }
.steps3 li.past { opacity: .55; }
.steps3 b { display: block; } .steps3 span { font-size: 13.5px; opacity: .85; }
.steps3 button { background: var(--on); color: var(--cobalt); border: 0; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13.5px; }

/* Hoy */
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.strip button { border: 0; background: var(--surface); border-radius: 14px; padding: 7px 0 6px; display: grid; justify-items: center; gap: 1px; box-shadow: var(--shadow); }
.strip .w { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.strip .d { font-family: var(--f-display); font-size: 17px; font-weight: 600; }
.strip .dots { display: flex; gap: 2px; height: 5px; }
.strip .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.strip .dots i.on { background: var(--olive); }
.strip button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.strip button[aria-pressed="true"] .w { color: var(--bg); opacity: .75; }
.strip button.hoy:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px var(--cobalt); }
.dayhead { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.dayhead h2 { font-family: var(--f-display); font-size: 30px; font-weight: 600; }
.dayhead .sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.wkchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.wkchip.t-economico { background: var(--t-eco-soft); color: var(--t-eco); }
.wkchip.t-intermedio { background: var(--t-int-soft); color: var(--t-int); }
.wkchip.t-premium { background: var(--t-pre-soft); color: var(--t-pre); }

.alerts { display: grid; gap: 8px; }
.alert { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; }
.alert .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.alert .ic svg { width: 20px; height: 20px; }
.alert.compras { background: var(--tomato-soft); } .alert.compras .ic { background: var(--tomato); color: var(--on); }
.alert.cocina { background: var(--olive-soft); } .alert.cocina .ic { background: var(--olive); color: var(--on); }
.alert.freezer, .alert.prep { background: var(--cobalt-soft); } .alert.freezer .ic, .alert.prep .ic { background: var(--cobalt); color: var(--on); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.person { border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; }
.person.ele { background: var(--ele-soft); } .person.ela { background: var(--ela-soft); }
.person .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.person.ele .top { color: var(--ele); } .person.ela .top { color: var(--ela); }
.person .kcal { font-family: var(--f-display); font-size: 20px; font-weight: 600; }
.person .kcal small { font-family: var(--f-body); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.meter { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; }
.person.ele .meter i { background: var(--ele); } .person.ela .meter i { background: var(--ela); }
.person .sm { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }

.timeline { display: grid; gap: 10px; position: relative; }
.meal { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.meal .when { text-align: right; padding-top: 16px; }
.meal .when b { display: block; font-weight: 700; font-size: 15px; }
.meal .when span { font-size: 12px; color: var(--muted); }
.meal .body { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 14px 12px; display: grid; gap: 10px; border: 2px solid transparent; }
.meal.now .body { border-color: var(--cobalt); }
.meal.now .when b { color: var(--cobalt); }
.meal.comido .body { opacity: .6; }
.meal .open { all: unset; cursor: pointer; display: grid; gap: 4px; }
.meal .open:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 4px; border-radius: 8px; }
.meal h3 { font-size: 17.5px; font-weight: 650; }
.meal .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); align-items: center; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag.batch { background: var(--olive-soft); color: var(--olive); }
.tag.frz { background: var(--cobalt-soft); color: var(--cobalt); }
.tag.swp { background: var(--saffron-soft); color: var(--saffron); }
.tag.now { background: var(--cobalt); color: var(--on); }
.eat { display: flex; gap: 8px; align-items: center; }
.eatbtn { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px 6px 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); min-height: 38px; }
.eatbtn i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; }
.eatbtn.ele.on { background: var(--ele); border-color: var(--ele); color: var(--on); }
.eatbtn.ela.on { background: var(--ela); border-color: var(--ela); color: var(--on); }
.eatbtn.on i { background: var(--on); border-color: var(--on); }
.eatbtn.ele.on i { color: var(--ele); } .eatbtn.ela.on i { color: var(--ela); }
.eat .lnk { margin-left: auto; }

/* Hoja (receta / cambio) */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 24, .45); animation: fade .18s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; background: var(--surface); border-radius: 22px 22px 0 0; display: grid; grid-template-rows: auto 1fr; animation: up .24s cubic-bezier(.2, .9, .3, 1); max-width: 560px; margin: 0 auto; }
.sheet .grip { display: grid; justify-items: center; padding: 10px 0 2px; }
.sheet .grip i { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet .scroll { overflow-y: auto; padding: 4px max(18px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; align-content: start; }
.sheet .hd { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sheet h2 { font-size: 22px; font-weight: 700; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim { animation: none; } }
.ingt { width: 100%; border-collapse: collapse; font-size: 15px; }
.ingt th, .ingt td { padding: 8px 0; text-align: right; border-bottom: 1px solid var(--line); }
.ingt th:first-child, .ingt td:first-child { text-align: left; }
.ingt th { font-size: 13px; font-weight: 600; color: var(--muted); }
.ingt th.e { color: var(--ele); } .ingt th.a { color: var(--ela); }
.ingt td small { display: block; color: var(--muted); font-size: 12.5px; }
.ingt td.q { padding-left: 12px; white-space: nowrap; }
ol.how { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
ol.how li::marker { font-weight: 700; color: var(--cobalt); }
.tip { background: var(--saffron-soft); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.macros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.macros div { border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.macros .e { background: var(--ele-soft); } .macros .a { background: var(--ela-soft); }
.macros b { display: block; font-size: 16px; }
.alts { display: grid; gap: 8px; }
.alt { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.alt b { font-size: 15.5px; }
.alt .d { font-size: 13px; color: var(--muted); }
.cheaper { color: var(--olive); font-weight: 600; } .pricier { color: var(--tomato); font-weight: 600; }

/* Plan */
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.month { display: grid; gap: 8px; }
.month h3 { font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.g7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.g7 .dh { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cd { border: 0; background: transparent; border-radius: 10px; aspect-ratio: 1 / 1.05; max-width: 100%; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 4px 0 5px; font-size: 14px; font-weight: 600; position: relative; }
.cd.out { opacity: .35; }
.cd.t-economico { background: var(--t-eco-soft); } .cd.t-intermedio { background: var(--t-int-soft); } .cd.t-premium { background: var(--t-pre-soft); }
.cd.hoy { box-shadow: inset 0 0 0 2px var(--ink); }
.cd .mk { display: flex; gap: 3px; height: 7px; }
.cd .mk i { width: 7px; height: 7px; border-radius: 50%; }
.cd .mk i.c { background: var(--tomato); } .cd .mk i.k { background: var(--olive); }
.key { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.key i { width: 10px; height: 10px; border-radius: 3px; }
.weeks { display: grid; gap: 10px; }
.week { display: grid; gap: 10px; }
.week .h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.week .h b { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.week .h .price { font-weight: 700; font-size: 17px; }
.week .sub { font-size: 13px; color: var(--muted); }
.shopday { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); }
.shopday .seg { flex: 1; } .shopday .seg button { min-height: 34px; padding: 5px 8px; font-size: 13px; }

/* Compras */
.wkbar { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; text-align: center; }
.wkbar b { font-family: var(--f-display); font-size: 18px; font-weight: 600; display: block; }
.wkbar span { font-size: 13px; color: var(--muted); }
.total { display: grid; gap: 10px; }
.total .big { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.total .big b { font-family: var(--f-display); font-size: 34px; font-weight: 700; line-height: 1; }
.total .meter i { background: var(--tomato); }
.total .sub { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.aisle { display: grid; gap: 0; }
.aisle h3 { font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; padding: 6px 4px; color: var(--muted); }
.list { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.it { display: grid; grid-template-columns: 1fr auto auto; align-items: center; border-bottom: 1px solid var(--line); }
.it:last-child { border-bottom: 0; }
.it > label { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 6px 12px 14px; cursor: pointer; min-height: 60px; }
.it > label input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); margin: 0; display: grid; place-items: center; background: var(--surface); }
.it > label input:checked { background: var(--olive); border-color: var(--olive); }
.it > label input:checked::after { content: ""; width: 7px; height: 12px; border: solid var(--on); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.it .nm { min-width: 0; }
.it .nm b { font-weight: 600; display: block; font-size: 15px; }
.it .nm small { display: block; color: var(--muted); font-size: 12.5px; }
.it .pr { text-align: right; font-weight: 700; font-size: 15px; white-space: nowrap; }
.it .pr small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.it.done .nm b { text-decoration: line-through; color: var(--muted); }
.it.done .pr { color: var(--muted); }
.it .home { border: 0; background: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.it .home svg { width: 20px; height: 20px; }
.it .home.on { color: var(--cobalt); }
.it .sup { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 6px; background: var(--cobalt-soft); color: var(--cobalt); font-weight: 700; font-size: 11.5px; }
.form.otroed { grid-column: 1 / -1; margin: 0 14px 14px; padding: 12px; border-radius: 14px; background: var(--sunk); grid-template-columns: 1fr; }
.otroed .muted { margin: 0; }
.sups { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.sups label { position: relative; display: block; cursor: pointer; }
.sups input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sups span { display: inline-block; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); }
.sups input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: var(--on); }
.sups input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.otroed .row .btn { flex: 1; }
details.more { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details.more ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--sunk); font-size: 13px; }
.chip button { border: 0; background: var(--surface); border-radius: 999px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; color: var(--cobalt); }
.copybox { width: 100%; min-height: 160px; font: 13px/1.45 var(--f-body); background: var(--sunk); color: var(--ink); border: 0; border-radius: 12px; padding: 12px; }

.market { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: grid; grid-template-rows: auto 1fr; padding-top: env(safe-area-inset-top, 0px); }
.market .mh { display: grid; gap: 10px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.market .mh .row { justify-content: space-between; flex-wrap: nowrap; }
.market .mh b { font-family: var(--f-display); font-size: 22px; font-weight: 700; }
.market .mh .meter i { background: var(--olive); }
.market .ml { overflow-y: auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 8px; align-content: start; }
.market h3 { font-size: 15px; color: var(--muted); margin-top: 12px; }
.mrow { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; min-height: 72px; padding: 12px 16px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; }
.mrow input { appearance: none; -webkit-appearance: none; width: 36px; height: 36px; border-radius: 10px; border: 2.5px solid var(--line); margin: 0; display: grid; place-items: center; }
.mrow input:checked { background: var(--olive); border-color: var(--olive); }
.mrow input:checked::after { content: ""; width: 9px; height: 16px; border: solid var(--on); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -2px); }
.mrow b { font-size: 19px; display: block; line-height: 1.2; } .mrow small { color: var(--muted); font-size: 14px; }
.mrow.done { box-shadow: none; background: transparent; } .mrow.done b { text-decoration: line-through; color: var(--muted); }
.qty { font-family: var(--f-display); color: var(--tomato); margin-right: 6px; }

/* Cocina */
.dish { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.dish:first-of-type { border-top: 0; padding-top: 0; }
.dish h3 { font-size: 17px; }
.dish ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14.5px; }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rule { background: var(--surface); border-radius: 14px; padding: 12px; font-size: 13.5px; box-shadow: var(--shadow); }
.rule b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.recrow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; width: 100%; }
.recrow:last-child { border-bottom: 0; }
.recrow:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: -3px; }
.recrow b { font-weight: 600; font-size: 15px; } .recrow span { font-size: 13px; color: var(--muted); }
.recrow .p { font-weight: 700; text-align: right; }
.grouph { font-size: 15px; font-weight: 700; color: var(--muted); padding: 4px; }

/* Progreso */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.form label.full { grid-column: 1 / -1; }
.form input { font: inherit; font-size: 17px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); width: 100%; min-height: 46px; }
.form .btn { grid-column: 1 / -1; }
.wcard { display: grid; gap: 8px; }
.wcard .h { display: flex; justify-content: space-between; align-items: baseline; }
.wcard .h b { font-weight: 700; } .wcard.ele .h b { color: var(--ele); } .wcard.ela .h b { color: var(--ela); }
.wcard .kg { font-family: var(--f-display); font-size: 26px; font-weight: 700; }
.wcard .kg small { font-family: var(--f-body); font-size: 13px; font-weight: 600; margin-left: 6px; }
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); } .chart .ax { fill: var(--muted); font-size: 10.5px; font-family: var(--f-body); }
.bars { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; align-items: end; height: 110px; }
.bars div { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; text-align: center; }
.bars i { align-self: end; background: var(--olive); border-radius: 5px 5px 2px 2px; display: block; min-height: 3px; }
.bars i.empty { background: var(--line); }
.bars small { font-size: 10.5px; color: var(--muted); }
.slider { display: grid; gap: 6px; font-size: 14.5px; font-weight: 600; }
.slider input { width: 100%; }
.slider.ele input { accent-color: var(--ele); } .slider.ela input { accent-color: var(--ela); }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv span:first-child { color: var(--muted); }
ul.tips { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); }
.login { min-height: 70vh; display: grid; place-content: center; gap: 16px; text-align: center; max-width: 340px; margin: 0 auto; }
.login .logo { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto; overflow: hidden; }
.login h1 { font-family: var(--f-display); font-size: 28px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
