*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--size-h1);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}
h2 { font-size: var(--size-h3); line-height: var(--leading-h3); font-family: var(--font-body); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--size-h4); line-height: var(--leading-h4); margin: 0; font-weight: 600; }
p { margin: 0; max-width: 65ch; }

a { color: var(--color-primary-text); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: var(--space-s);
  top: -100px;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-surface);
  border-radius: var(--radius-10);
  z-index: 10;
}

.skip:focus { top: var(--space-s); }

.bar {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-xs) var(--space-m);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text);
  text-decoration: none;
}

.mark { width: 32px; height: 32px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.tabs { display: flex; gap: 4px; }

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-s);
  border-radius: var(--radius-full);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}

.tabs a:hover { background: var(--color-step); }

.tabs a[aria-current="page"] {
  color: var(--chapter-ink);
  background: var(--chapter);
}

:root[data-chapter="fridge"] { --chapter: var(--chapter-fridge); --chapter-ink: var(--chapter-fridge-ink); }
:root[data-chapter="market"] { --chapter: var(--chapter-market); --chapter-ink: var(--chapter-market-ink); }
:root[data-chapter="numbers"] { --chapter: var(--chapter-numbers); --chapter-ink: var(--chapter-numbers-ink); }
:root[data-chapter="chef"] { --chapter: var(--chapter-chef); --chapter-ink: var(--chapter-chef-ink); }
:root[data-chapter="settings"] { --chapter: var(--chapter-settings); --chapter-ink: var(--chapter-settings-ink); }

.session {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--color-text-weak);
  font-size: var(--size-small);
}

main {
  max-width: var(--bento-max-width);
  margin: 0 auto;
  padding: var(--space-l) var(--space-m) var(--space-xxl);
  display: grid;
  gap: var(--space-l);
}

main:focus { outline: none; }

.lead { color: var(--color-text-weak); margin-top: var(--space-xs); }

main > header:first-child {
  display: grid;
  gap: var(--space-s);
  align-content: end;
  min-height: clamp(180px, 26vh, 300px);
  margin-top: calc(var(--space-l) * -1);
  padding-block: var(--space-xl) var(--space-l);
  background: var(--chapter);
  color: var(--chapter-ink);
  box-shadow: 0 0 0 100vmax var(--chapter);
  clip-path: inset(0 -100vmax);
  transition: background-color var(--duration-slow) var(--ease-standard), color var(--duration-slow) var(--ease-standard), box-shadow var(--duration-slow) var(--ease-standard);
}

main > header:first-child h1 { font-size: var(--size-head); }
main > header:first-child .lead { color: inherit; font-size: var(--size-h4); line-height: var(--leading-h4); }
main > header:first-child .data { color: inherit; }
main > header:first-child a { color: inherit; }

.data {
  font-family: var(--data-font);
  font-variant-numeric: tabular-nums;
  color: var(--data-fg);
}

button, .button {
  font: inherit;
  font-weight: 600;
  min-height: var(--control-height);
  padding: 12px 24px;
  border-radius: var(--button-radius);
  border: 1px solid var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--button-secondary-fg);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

button:hover { background: var(--button-secondary-bg-hover); }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { cursor: progress; opacity: 0.6; }
button[aria-busy="true"] { position: relative; color: transparent; }
button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: var(--spin, var(--color-text)) transparent var(--spin, var(--color-text)) var(--spin, var(--color-text));
  animation: spin var(--duration-shutter) linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

button.primary, a.button.primary {
  --spin: var(--button-primary-fg);
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  border-color: transparent;
}

button.primary:hover, a.button.primary:hover { background: var(--button-primary-bg-hover); }
button.primary:active { background: var(--button-primary-bg-active); }

button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--button-ghost-fg);
}

button.ghost:hover { background: var(--color-surface); }

label { display: grid; gap: var(--space-xs); font-size: var(--size-body); font-weight: 600; }

input, select, textarea {
  font: inherit;
  font-size: var(--size-input);
  font-weight: 400;
  min-height: var(--control-height);
  padding: 0 var(--space-s);
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius);
  background: var(--input-bg);
  color: var(--input-fg);
}

input::placeholder { color: var(--input-placeholder); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--input-focus-ring); outline-offset: 1px; }
input:user-invalid { border-color: var(--color-attention); }
input.grams, input.money {
  font-family: var(--data-font);
  font-variant-numeric: tabular-nums;
  box-sizing: content-box;
  width: var(--number-width-grams);
}
input.money { width: var(--number-width-money); }

.row-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--control-gap) var(--space-s); }

.stack { display: grid; gap: var(--space-m); }

.stack > button { justify-self: start; }

.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--size-small);
  color: var(--color-text-weak);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--status-positive);
}

.status.attention { color: var(--color-attention-text); }
.status.attention::before { background: var(--status-attention); }
.status.quiet::before { background: var(--color-border-strong); }

.list { list-style: none; margin: 0; padding: 0; }

.list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-xs) var(--space-m);
  align-items: center;
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--color-border);
}

.list > li:last-child { border-bottom: 0; }

.item-name { font-weight: 600; }
.item-meta { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.item-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); justify-content: end; }

.use-first {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-m);
  align-items: end;
  padding: var(--space-l);
  border-radius: var(--radius-14);
  background: var(--color-surface);
  border-left: 6px solid var(--color-attention);
}

.use-first .when { font-size: var(--size-h4); font-weight: 600; color: var(--color-attention-text); }

.dishes { display: grid; gap: var(--space-s); }

.dish {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-m) 0;
  border-top: 1px solid var(--color-border);
}

.zone {
  display: grid;
  gap: 4px;
  padding: var(--space-xs);
  border-radius: var(--radius-10);
  border: 1px dashed var(--color-border-strong);
}

.shelf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  min-height: 48px;
  text-align: left;
  border: 0;
  border-bottom: 4px solid var(--color-border-strong);
  border-radius: var(--radius-6) var(--radius-6) 0 0;
  background: var(--color-bg);
}

.shelf[aria-pressed="true"] {
  border-bottom-color: var(--color-primary);
  background: var(--color-bg);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

.shelf .data { font-weight: 600; }

.twin { display: flex; gap: var(--space-s); align-items: baseline; }
.twin .data { font-size: var(--size-h4); font-weight: 600; }

.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-border-strong); }
.live[data-state="on"]::before { background: var(--status-positive); }

.feed time { color: var(--color-text-weak); }

.market-group { display: grid; gap: 0; }
.market-group h3 { color: var(--color-text-weak); font-size: var(--size-small); font-weight: 600; }
.market-group .list > li { padding: var(--space-xs) 0; }

.check { display: flex; align-items: center; gap: var(--space-s); min-height: 48px; font-size: var(--size-body); font-weight: 500; }
.check input { width: 28px; height: 28px; min-height: 0; accent-color: var(--color-positive); }
.bought .item-name { text-decoration: line-through; color: var(--color-text-weak); }

.empty {
  padding: var(--space-l);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-14);
  display: grid;
  gap: var(--space-s);
  justify-items: center;
  text-align: center;
}

.error { color: var(--color-attention-text); font-size: var(--size-small); }

.auth { max-width: 420px; justify-items: start; }
.auth > div, .auth form { justify-self: stretch; }
.auth form { display: grid; gap: var(--space-s); }

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-l);
  transform: translateX(-50%);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-10);
  background: var(--color-text);
  color: var(--color-bg);
  box-shadow: var(--shadow-raised);
  opacity: 0;
  translate: 0 var(--rise);
  pointer-events: none;
  transition: opacity var(--duration-withdraw) var(--ease-exit), translate var(--duration-withdraw) var(--ease-exit);
}

.toast.visible { opacity: 1; translate: 0 0; transition: opacity var(--duration-base) var(--ease-standard), translate var(--duration-spring) var(--ease-spring); }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; padding: var(--space-xs) var(--space-s); }
  main { padding: var(--space-m) var(--space-s) var(--space-xxl); }
  
  .use-first { grid-template-columns: 1fr; padding: var(--space-m); }
  .list > li { grid-template-columns: 1fr; }
  .item-actions { justify-content: start; }
}

/* Durations are zeroed in tokens.css; this also stops the few transitions written outside the tokens (landing and story sheets) */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.numbers-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-m); }

.segmented { display: inline-flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-10); overflow: hidden; }
.segmented button { border: 0; border-radius: 0; min-height: 44px; background: transparent; color: var(--color-text-weak); }
.segmented button + button { border-left: 1px solid var(--color-border-strong); }
.segmented button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 -3px 0 var(--color-primary); }

.saved { display: grid; gap: var(--space-l); }
.saved > div:first-child { display: grid; gap: var(--space-xs); }

.chart { margin: 0; display: grid; gap: var(--space-xs); }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .eaten { fill: var(--color-cilantro); }
.chart .rescued { fill: var(--color-papa); }
.chart .wasted { fill: var(--color-attention); }
.chart .axis { stroke: var(--color-text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-scale { display: flex; justify-content: space-between; color: var(--color-text-weak); font-family: var(--data-font); font-size: var(--size-small); }
.chart figcaption { display: flex; flex-wrap: wrap; gap: var(--space-m); color: var(--color-text-weak); font-size: var(--size-small); }
.key::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: baseline; }
.key.rescued::before { background: var(--color-papa); }
.key.eaten::before { background: var(--color-cilantro); }
.key.wasted::before { background: var(--color-attention); }

.notice {
  margin: 0;
  padding: var(--space-xs) var(--space-m);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-attention);
  color: var(--color-text);
  font-size: var(--size-small);
}

.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-s); }
.chat > li { display: grid; gap: var(--space-xs); padding: var(--space-s) var(--space-m); border-radius: var(--radius-10); }
.chat .said { background: var(--color-surface); justify-self: end; max-width: 80%; }
.chat .answer { border: 1px solid var(--color-border); max-width: 92%; }
.chat p { margin: 0; }
.chat .who { font-size: var(--size-small); color: var(--color-text-weak); }
.chat details { font-size: var(--size-small); color: var(--color-text-weak); }
.chat details ul { margin: var(--space-xs) 0 0; padding-left: var(--space-m); }
.ask { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-s); }
.ask .grow { flex: 1 1 16rem; display: grid; }
[data-mic][aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--color-primary); }
.step-text { font-size: var(--size-h4); margin: 0; }
.hint { color: var(--color-text-weak); font-size: var(--size-small); margin: 0; }
.voice-options { align-items: center; }

.bento {
  display: grid;
  grid-template-columns: repeat(var(--bento-columns), minmax(0, 1fr));
  gap: var(--bento-gap);
  align-items: stretch;
}

.bento > * { grid-column: span var(--bento-columns); min-width: 0; }
.bento > .w-12 { grid-column: span 12; }
.bento > .w-8 { grid-column: span 8; }
.bento > .w-7 { grid-column: span 7; }
.bento > .w-6 { grid-column: span 6; }
.bento > .w-5 { grid-column: span 5; }
.bento > .w-4 { grid-column: span 4; }
.bento > .w-3 { grid-column: span 3; }

.tile {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--tile-gap);
  padding: var(--tile-padding);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--tile-radius);
}

.tile > h2, .tile > header h2 { font-size: var(--size-h4); line-height: var(--leading-h4); }
.tile > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-xs) var(--space-s); }
.tile.plain { background: transparent; }
.tile.alert { border-color: var(--color-attention); box-shadow: inset 6px 0 0 var(--color-attention); }

.kpi { display: grid; gap: 4px; align-content: start; }
.kpi .value {
  font-family: var(--data-font);
  font-variant-numeric: tabular-nums;
  font-size: var(--size-kpi);
  line-height: 1.1;
  font-weight: 600;
}
.kpi .label { color: var(--color-text-weak); }
.kpi.attention .value { color: var(--color-attention-text); }
.kpi.positive .value { color: var(--color-positive-text); }

.number-field { display: grid; gap: var(--space-xs); font-weight: 600; }
.number-field .hint { font-weight: 400; }
.number-input { display: inline-flex; align-items: stretch; max-width: 100%; }
.number-input input {
  min-width: 0;
  border-radius: 0;
  border-left-width: 0;
  border-right-width: 0;
  text-align: center;
  font-size: var(--size-h4);
  min-height: var(--control-height-large);
}
.number-input .unit {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-s) 0 0;
  border: 1px solid var(--input-border);
  border-left: 0;
  border-right: 0;
  background: var(--input-bg);
  color: var(--color-text-weak);
  font-family: var(--data-font);
}
.number-input button {
  min-width: var(--stepper-button);
  min-height: var(--control-height-large);
  padding: 0;
  font-size: var(--size-h4);
  line-height: 1;
}
.number-input button:first-child { border-radius: var(--input-radius) 0 0 var(--input-radius); }
.number-input button:last-child { border-radius: 0 var(--input-radius) var(--input-radius) 0; }
.number-input:focus-within { outline: 2px solid var(--input-focus-ring); outline-offset: 2px; border-radius: var(--input-radius); }
.number-input input:focus-visible { outline: none; }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); border: 0; padding: 0; margin: 0; }
.chips legend { font-weight: 600; margin-bottom: var(--space-xs); padding: 0; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; min-height: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: var(--chip-height);
  padding: 0 var(--space-s);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-full);
  background: var(--chip-bg);
  font-weight: 500;
}
.chip input:checked + span { background: var(--chip-selected-bg); color: var(--chip-selected-fg); border-color: var(--chip-selected-bg); }
.chip input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.date-field { display: grid; gap: var(--space-xs); }
.date-field .row-form { align-items: center; }
.date-field input[type="date"]:disabled { opacity: 0.5; }

dialog.sheet {
  border: 0;
  padding: 0;
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  background: var(--sheet-bg);
  color: var(--color-text);
  border-radius: var(--sheet-radius);
  box-shadow: var(--sheet-shadow);
}
dialog.sheet::backdrop { background: var(--scrim); }
dialog.sheet > form, dialog.sheet > div { display: grid; gap: var(--space-m); padding: var(--space-m); }
dialog.sheet .sheet-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-s); }

@media (max-width: 760px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > *, .bento > [class*="w-"] { grid-column: 1 / -1; }
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

@container (max-width: 420px) {
  .tile .row-form { flex-direction: column; align-items: stretch; }
  .tile .row-form > button { width: 100%; }
}

.row-form > button { min-height: var(--control-height-large); }

.language { display: inline-flex; }
.language { position: relative; isolation: isolate; padding: 4px; gap: 0; border-radius: var(--radius-full); box-shadow: inset 0 0 0 2px currentColor; }
.language button { position: relative; z-index: 1; min-width: 44px; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-full); background: transparent; color: inherit; font: 700 14px/1 var(--font-body); letter-spacing: 0.06em; cursor: pointer; transition: color var(--duration-base) var(--ease-standard); }
.language button[aria-pressed="true"] { color: var(--color-bg); }
.language-blot { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--count, 2)); border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%; background: var(--color-text); translate: calc(100% * var(--chosen, 0)) 0; transition: translate var(--duration-spring) var(--ease-spring), border-radius var(--duration-spring) var(--ease-spring); }
.language:hover .language-blot { border-radius: 54% 46% 44% 56% / 42% 58% 46% 54%; }
.shell:has(.landing) .bar .language { display: inline-flex; }
.session + .language, .tabs + .language { margin-left: 0; }
.bar > .language:last-child { margin-left: var(--space-s); }

.fridge-bento { align-items: start; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--badge-border);
  color: var(--badge-fg);
  font-family: var(--data-font);
  font-size: var(--size-small);
}

.card-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.card-actions input.grams { width: 6ch; }
.move-to { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); flex-basis: 100%; color: var(--color-text-weak); }
.move-to select { min-height: 44px; max-width: 100%; }
.space-line { display: flex; align-items: center; gap: var(--space-xs); margin: 4px 0 0; color: var(--color-text-weak); font-size: 0.9em; }
.space-line meter { inline-size: 120px; block-size: 8px; }
.space-line.full { color: var(--color-attention-text); font-weight: 600; }

.add-food { display: grid; gap: var(--space-m); }
.add-food .step { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-s); }
.add-food .step legend { font-family: var(--font-display); font-size: var(--size-h4); font-weight: 700; padding: 0; margin-bottom: var(--space-xs); }
.food-groups { display: grid; gap: var(--space-s); max-height: 40vh; overflow-y: auto; padding-right: 4px; }
.food-group h3 { font-size: var(--size-small); color: var(--color-text-weak); margin-bottom: var(--space-xs); }
.expiry-preview { font-weight: 600; min-height: 1.5em; }
.chip[hidden] { display: none; }

.grow { flex: 1 1 14rem; display: grid; }
.list > li.market-row { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 64px; padding: var(--space-xs) 0; }
.market-row .check { min-height: 56px; font-size: var(--size-h4); }
.market-amount { display: grid; justify-items: end; gap: 2px; }
.market-amount .data { font-size: var(--size-h4); font-weight: 600; }
.market-group + .market-group { margin-top: var(--space-s); }

.budget-figures { display: grid; gap: var(--space-xs); margin: 0; }
.budget-figures div { display: flex; justify-content: space-between; gap: var(--space-s); }
.budget-figures dt { color: var(--color-text-weak); display: inline-flex; align-items: center; gap: var(--space-xs); }
.budget-figures dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget-figures .key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.budget-figures .key.spent { background: var(--color-text-weak); }
.budget-figures .key.planned { background: var(--color-primary); }
.budget-tile details summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--color-primary-text); }
.cheaper-list > li { grid-template-columns: 1fr; }

.tile > button { justify-self: start; }

.settings-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.settings-list > li { border-bottom: 1px solid var(--color-border); padding: var(--space-s) 0; }
.settings-list > li:last-child { border-bottom: 0; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-s); align-items: end; }
.setting-text { display: grid; gap: 4px; align-self: center; }
.setting-value { font-size: var(--size-h4); font-weight: 600; }
@media (max-width: 760px) {
  .setting-row { grid-template-columns: 1fr; align-items: start; }
}

.chef-tile .chat { max-height: 55vh; overflow-y: auto; }
.chat .said, .chat .answer { font-size: var(--size-body); }
.cooking .step-text { font-size: var(--size-h3); line-height: var(--leading-h3); }
.cooking .row-form > button { flex: 1 1 auto; }

.session > * { white-space: nowrap; }
/* A side column keeps its cards at their own height; the bento rows never stretch a card over empty paper. */
.bento > .stack { display: grid; align-content: start; gap: var(--bento-gap); }
.bar .session { gap: var(--space-xs) var(--space-s); }

.inbox-list { display: grid; gap: var(--space-s); margin: 0; padding: 0; list-style: none; }
.inbox-item { display: grid; gap: var(--space-xs); padding: var(--space-s); border: 1px solid var(--color-border); border-radius: var(--radius-10); background: var(--color-surface); }
.inbox-item.inbox-unread { border-color: var(--color-primary); }
.inbox-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-s); }
.inbox-when { color: var(--color-text-weak); font-size: var(--size-small); white-space: nowrap; }
.inbox-item p { margin: 0; white-space: pre-line; }
.inbox-item button { justify-self: start; }
.inbox-empty { margin: 0; color: var(--color-text-weak); }

.skeleton-screen { display: contents; }
.skel-tile { min-height: var(--h, 160px); }
.skel-tile.chef-sees { align-content: start; }
.skel-card { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-s) 0; border-top: 1px solid var(--color-border); min-height: 72px; }
.skel-card.chat-row { border: 0; padding: var(--space-s) var(--space-m); border-radius: 22px; background: var(--color-surface); width: min(78%, 420px); }
.skel-card.chat-row ~ .chat-row { justify-self: end; }
.skel-chip { flex: none; display: block; width: 150px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface); }
.skel-chip:nth-child(3n) { width: 190px; }
.skel-chip:nth-child(3n + 2) { width: 120px; }
.skel-ring { display: block; width: min(140px, 100%); aspect-ratio: 1; border-radius: 50%; border: 12px solid var(--skeleton); }
.skel-tile .skel-line.big, .skel-card .skel-line.big { height: 28px; }
.loading-note { display: flex; align-items: center; gap: var(--space-s); margin: 0; }
.loading-note .art { flex: none; width: 48px; height: 48px; stroke-width: 2.4; }
main > header:first-child .loading-note { font-size: var(--size-h4); line-height: var(--leading-h4); color: inherit; }
.fridge-hero .loading-note, .market-hero .loading-note { grid-column: 1; }
main > header:first-child .skel-line { background: color-mix(in oklab, currentColor 22%, transparent); animation: none; }
.skel-line.figure { width: 220px; height: clamp(48px, 6vw, 96px); border-radius: var(--radius-10); }
.skel-pills { display: flex; gap: var(--space-xs); }
.skel-pills i { width: 120px; height: 36px; border-radius: var(--radius-full); background: color-mix(in oklab, currentColor 22%, transparent); }
.fridge-hero .skel-line.figure { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.market-hero .skel-line.figure { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.skel-pills { grid-column: 1; }
@media (max-width: 760px) {
  .fridge-hero .skel-line.figure, .market-hero .skel-line.figure { grid-column: 1; grid-row: auto; justify-self: start; }
}
.loader.gone { display: none; }
.skel {
  background: var(--skeleton);
  border-radius: var(--tile-radius);
  animation: none;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}
.skel-line { display: block; height: 14px; border-radius: var(--radius-full); background: var(--color-meson-strong); }
.skel-line.big { height: clamp(40px, 5vw, 72px); width: 45%; border-radius: var(--radius-10); }
.skel-line.mid { width: 70%; }
.skel-line.short { width: 35%; }
.skel { display: grid; align-content: start; gap: var(--space-s); padding: var(--tile-padding); }
@keyframes skel-pulse { 50% { opacity: 0.55; } }

main[data-enter] > *,
main[data-enter] .bento > * {
  animation: rise var(--duration-slow) var(--ease-emphasized) both;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}
@keyframes rise { from { opacity: 0; transform: translate(var(--enter-x, 0px), var(--rise)); } }
main[data-enter="next"] > header:first-child { --band-l: 100%; animation: band-in var(--duration-spring) var(--ease-emphasized) both; }
main[data-enter="previous"] > header:first-child { --band-r: 100%; animation: band-in var(--duration-spring) var(--ease-emphasized) both; }
/* The sweep ends at the band edge the page can show (its side padding), then the band keeps its full sideways bleed */
@keyframes band-in { from { clip-path: inset(0 var(--band-r, -24px) 0 var(--band-l, -24px)); } to { clip-path: inset(0 -24px); } }
@media (max-width: 1023px) { .shell:has(.tabs:not([hidden])) main { touch-action: pan-y pinch-zoom; } }

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-content: end;
  padding: 0 max(16px, env(safe-area-inset-left, 0px)) max(3vw, env(safe-area-inset-bottom, 0px));
  background: var(--color-bg);
  overflow: hidden;
  transition: transform var(--duration-shutter) var(--ease-emphasized);
}
.loader-word {
  position: relative;
  font-family: var(--font-display);
  font-size: min(13vw, 30vh);
  line-height: 0.9;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-meson-strong);
}
.loader-fill {
  position: absolute;
  inset: 0;
  color: var(--color-text);
  clip-path: inset(calc((1 - var(--p, 0)) * 100%) 0 0 0);
  transition: clip-path var(--duration-slow) var(--ease-emphasized);
}
.loader-shutter {
  position: absolute;
  inset: 0;
  background: var(--chapter);
  transform: translateY(100%);
  transition: transform var(--duration-shutter) var(--ease-emphasized);
}
.loader.done .loader-shutter { transform: translateY(0); }
.loader.done { transform: translateY(-100%); }
html:has(.loader:not(.done)) { overflow: hidden; }
.loader.done { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .skel, main[data-enter] > *, main[data-enter] .bento > * { animation: none; }
  .loader { transition: opacity 1ms; }
  .loader.done { transform: none; opacity: 0; }
}

/* Shell: the fridge stage on the left, the chapter column on the right */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.column { min-width: 0; overflow-x: clip; }
.stage {
  --tint: color-mix(in oklab, var(--chapter) 22%, var(--color-arroz));
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-s);
  padding: var(--space-s);
  background: var(--tint);
  transition: background-color var(--duration-slow) var(--ease-standard);
}
.stage-fridge { position: relative; display: grid; place-items: center; min-height: 0; height: 320px; perspective: 1400px; }

@media (min-width: 1024px) {
  .shell { grid-template-columns: minmax(380px, 40vw) minmax(0, 1fr); }
  .stage { height: 100vh; padding: var(--space-l); }
  .stage-fridge { height: auto; }
  .column main { max-width: 920px; }
}

@media (max-width: 1023px) {
  .shell { display: flex; flex-direction: column; }
  .column { display: contents; }
  .bar { order: 1; position: static; }
  .stage { order: 2; }
  .notice { order: 3; }
  .shell main { order: 4; width: 100%; }
  .stage-fridge { height: 360px; }
  .bar .live, .bar > .language { display: none; }
  .shell:has(.auth) .bar > .language { display: inline-flex; }
  .bar { flex-wrap: nowrap; gap: var(--space-xs); }
  .bar .wordmark { font-size: 22px; }
  .bar .session { font-size: 13px; }
  .bar .session { gap: 4px; }
  .stage { transition: background-color var(--duration-slow) var(--ease-standard), translate var(--duration-base) var(--ease-emphasized); }
  .stage-fridge { transition: opacity var(--duration-base) var(--ease-standard); }
  .stage.compact { translate: 0 calc(-1 * var(--fold, 0px)); }
  .stage.compact .stage-fridge { opacity: 0; pointer-events: none; }
}

/* The fridge: flat by default, 3D on desktop. Drawn at 250 x 480 and scaled to fit. */
.fridge {
  position: relative;
  width: 250px;
  height: 480px;
  scale: var(--fit, 1);
  margin-right: 92px;
}
.fridge .face { display: none; }
.fridge .part { position: absolute; display: block; color: var(--color-text); text-decoration: none; cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard), transform var(--duration-slow) var(--ease-emphasized); }
.fridge .part:focus-visible { outline: 3px solid var(--color-tinta); outline-offset: 3px; }

.fridge .freezer {
  left: 0; top: 0; width: 250px; height: 132px;
  background: var(--color-white); border: 4px solid var(--color-tinta); border-radius: 20px 20px 4px 4px;
}
.fridge .freezer .handle, .fridge .door-outer .handle { position: absolute; width: 6px; border-radius: 3px; background: var(--color-tinta); }
.fridge .freezer .handle { right: 14px; bottom: 14px; height: 40px; }
.fridge .freezer .shelf-grams { position: absolute; left: 16px; bottom: 14px; }
.fridge .shelf.icebox { border: 3px solid var(--color-tinta); border-radius: 8px; background: var(--color-white); }
@keyframes ring-draw { from { stroke-dashoffset: var(--len); } }

.fridge .cabin {
  position: absolute; left: 0; top: 136px; width: 250px; height: 344px;
  display: grid; grid-template-rows: repeat(3, 1fr) 62px 44px; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px;
  background: #f3f7f8; border: 4px solid var(--color-tinta); border-radius: 4px 4px 20px 20px; overflow: hidden;
}
.fridge .shelf {
  position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 6px; min-width: 0; overflow: hidden;
  border-bottom: 5px solid var(--color-meson-strong); border-radius: 3px;
}
.fridge .shelf.drawer { border: 3px solid var(--color-meson-strong); border-radius: 8px; background: color-mix(in oklab, var(--color-cilantro) 8%, var(--color-white)); }
.shelf-grams { order: -1; margin-right: auto; white-space: nowrap; font: 700 13px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--color-text-weak); }
.fridge .shelf:hover, .fridge [data-part="fridge"][aria-current="page"] { background: color-mix(in oklab, var(--color-cilantro) 16%, var(--color-white)); border-bottom-color: var(--color-cilantro); }
.fridge .knob { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; font: 700 15px/1 var(--font-body); font-variant-numeric: tabular-nums; border-radius: var(--radius-full); }
.fridge .knob i { width: 26px; height: 26px; border-radius: 50%; background: var(--color-tinta); position: relative; transition: transform var(--duration-slow) var(--ease-emphasized); }
.fridge .knob i::after { content: ""; position: absolute; left: 11px; top: 4px; width: 4px; height: 9px; background: var(--color-arroz); border-radius: 2px; }
.fridge .knob:hover, .fridge .knob[aria-current="page"] { background: var(--color-meson); }
.fridge .knob[aria-current="page"] i { transform: rotate(120deg); }
.fridge .light { display: none; }

.fridge .door {
  left: 254px; top: 136px; width: 88px; height: 344px;
  transform-origin: left center;
}
.fridge .door-outer { display: none; }
.fridge .door-inner {
  position: absolute; inset: 0; display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px; padding: 10px 8px;
  background: var(--color-white); border: 4px solid var(--color-tinta); border-left-width: 2px; border-radius: 0 18px 18px 0;
  transition: background-color var(--duration-base) var(--ease-standard);
}
.fridge .rack { display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 5px solid var(--color-meson-strong); }
.fridge .door:hover .door-inner, .fridge .door[aria-current="page"] .door-inner { background: color-mix(in oklab, var(--color-papa) 30%, var(--color-white)); }
.fridge .door[aria-current="page"] { transform: scaleX(1.1); }
.fridge.door-alarm .door-inner { background: color-mix(in oklab, var(--color-tomate) 25%, var(--color-white)); }

.fridge .freezer:hover, .fridge .freezer[aria-current="page"] { background: color-mix(in oklab, var(--color-cilantro) 16%, var(--color-white)); }


@media (min-width: 1024px) {
  .fridge {
    margin-right: 0;
    translate: 110px 0;
    transform-style: preserve-3d;
    transform: rotateX(calc(-6deg - var(--tilt-y, 0) * 10deg)) rotateY(calc(-16deg + var(--tilt-x, 0) * 24deg));
    transition: transform var(--duration-spring) var(--ease-emphasized);
  }
  .fridge .face { display: block; position: absolute; }
  .fridge .back { left: 0; top: 0; width: 250px; height: 480px; background: #e6ecee; transform: translateZ(-90px); border-radius: 20px; }
  .fridge .side { left: 35px; top: 0; width: 180px; height: 480px; background: #dce2e4; transform: rotateY(90deg) translateZ(125px); border-radius: 0 20px 20px 0; }
  .fridge .side.l { background: #eef1f2; transform: rotateY(-90deg) translateZ(125px); }
  .fridge .lid { left: 0; top: -90px; width: 250px; height: 180px; background: #f3f5f6; transform: rotateX(90deg); }
  .fridge .freezer { transform: translateZ(90px); }
  .fridge .cabin { transform: translateZ(-86px); width: 250px; border-radius: 4px; background: #f1f6f7; }
  .fridge .light { display: block; position: absolute; inset: 0; background: #fff3c4; opacity: 0.35; mix-blend-mode: multiply; pointer-events: none; }
  .fridge .door {
    left: 0; top: 136px; width: 250px; height: 344px;
    transform-style: preserve-3d;
    transform: translateZ(90px) rotateY(-108deg);
    transition: transform var(--duration-spring) var(--ease-emphasized);
  }
  .fridge .door[aria-current="page"] { transform: translateZ(90px) rotateY(-122deg); }
  .fridge .door-outer, .fridge .door-inner { backface-visibility: hidden; }
  .fridge .door-outer { display: block; position: absolute; inset: 0; background: var(--color-white); border: 4px solid var(--color-tinta); border-radius: 4px 4px 20px 20px; }
  .fridge .door-outer .handle { left: 16px; top: 24px; height: 80px; }
  .fridge .door-inner { transform: rotateY(180deg); border-left-width: 4px; border-radius: 4px 4px 20px 20px; grid-template-rows: repeat(3, 1fr); padding: 14px; }
  .fridge .rack { gap: 6px; }
}

/* Foods, drawn flat in their real colours */
.food { display: inline-block; flex: none; position: relative; }
.f-tomate { width: 26px; height: 26px; border-radius: 50%; background: var(--color-tomate); }
.f-tomate::after { content: ""; position: absolute; width: 10px; height: 6px; background: var(--color-cilantro); border-radius: 50%; top: -2px; left: 8px; }
.f-papa { width: 30px; height: 22px; border-radius: 48% 52% 45% 55%; background: #d9a441; }
.f-huevo { width: 18px; height: 24px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: var(--color-white); box-shadow: inset 0 0 0 2px var(--color-meson-strong); }
.f-leche, .f-jugo { width: 22px; height: 50px; border-radius: 4px 4px 3px 3px; background: var(--color-white); box-shadow: inset 0 0 0 2px var(--color-meson-strong), inset 0 12px 0 var(--color-mora); }
.f-jugo { box-shadow: inset 0 0 0 2px var(--color-meson-strong), inset 0 12px 0 #e8892b; background: #f6c27a; }
.f-pollo { width: 46px; height: 26px; border-radius: 40% 60% 50% 50%; background: #f2c3a3; }
.f-carne { width: 42px; height: 24px; border-radius: 30% 50% 40% 50%; background: #a34a3c; }
.f-yogur { width: 24px; height: 30px; border-radius: 4px 4px 8px 8px; background: var(--color-papa); }
.f-queso { width: 34px; height: 22px; background: #f5dd8c; clip-path: polygon(0 100%, 100% 100%, 100% 30%, 0 0); }
.f-mantequilla { width: 30px; height: 16px; border-radius: 3px; background: #f7e3a1; }
.f-arepa { width: 34px; height: 12px; border-radius: 50%; background: #efe2b8; box-shadow: inset 0 -3px 0 #d8c58e; }
.f-aguacate { width: 22px; height: 30px; border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%; background: #3f6b2a; }
.f-banano, .f-platano { width: 44px; height: 14px; border-radius: 0 0 40px 40px; background: var(--color-papa); }
.f-platano { background: #b9b13a; }
.f-zanahoria { width: 42px; height: 16px; clip-path: polygon(0 0, 24% 22%, 30% 12%, 100% 50%, 30% 88%, 24% 78%, 0 100%); background: linear-gradient(90deg, #3d8a4f 24%, #e8892b 24%); }
.f-cebolla { width: 24px; height: 24px; border-radius: 50% 50% 46% 46%; background: #e7cfc0; }
.f-pan { width: 40px; height: 22px; border-radius: 12px 12px 4px 4px; background: #c98b4a; }
.f-caja { width: 22px; height: 34px; border-radius: 2px; background: var(--color-cobre); }
.f-bolsa { width: 26px; height: 32px; border-radius: 6px 6px 4px 4px; background: var(--color-white); box-shadow: inset 0 0 0 2px var(--color-meson-strong); }
.f-frasco { width: 22px; height: 28px; border-radius: 4px; background: #a0703c; box-shadow: inset 0 6px 0 var(--color-tinta); }
.f-frasco.f-oscuro { background: #2b2420; }
.f-olla { width: 36px; height: 24px; border-radius: 3px 3px 12px 12px; background: var(--color-piedra); }
.f-botella { width: 16px; height: 44px; border-radius: 7px 7px 3px 3px; background: var(--color-cilantro); }
.f-botella.f-oscuro { background: #2b2420; }
.f-lata { width: 24px; height: 18px; border-radius: 3px; background: #8c969c; }
.f-criolla { width: 20px; height: 20px; border-radius: 50%; background: #e4bb45; }
.f-cebolla-larga { width: 44px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #f1ece0 45%, #b9cf8a 45% 55%, #4f8a3a 55%); }
.f-cilantro { width: 28px; height: 22px; border-radius: 50% 50% 40% 40%; background: #3f7f3a; }
.f-limon { width: 22px; height: 19px; border-radius: 50%; background: #5f9a2e; }
.f-naranja { width: 26px; height: 26px; border-radius: 50%; background: #ee9a2e; }
.f-doble { clip-path: none; border-radius: 4px; background: linear-gradient(90deg, #f2dc8c 35%, #3f6f8f 35% 60%, #f2dc8c 60%); }
.f-mora { width: 24px; height: 22px; border-radius: 45%; background: radial-gradient(circle at 32% 30%, #4a1838 3px, transparent 4px), radial-gradient(circle at 68% 62%, #4a1838 3px, transparent 4px), #1d0d1a; }
.f-mango { width: 30px; height: 22px; border-radius: 60% 40% 50% 50%; background: linear-gradient(170deg, #c8502e 45%, #c9b03c 45%); }
.f-arveja { width: 40px; height: 12px; border-radius: 50%; background: radial-gradient(circle, #9ccc5a 3px, transparent 4px) 4px 0 / 8px 12px repeat-x, #6aa04a; }
.f-tomate-arbol { width: 20px; height: 28px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: #c8432a; }
.f-oca { width: 30px; height: 14px; border-radius: 50%; background: repeating-linear-gradient(90deg, #c9677d 0 5px, #b2586c 5px 6px); }
.f-lulo { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 50% 8%, #6a7a3a 4px, transparent 5px), #e8a13a; }
.f-arracacha { width: 36px; height: 14px; border-radius: 40% 60% 60% 40% / 50%; background: #e6d28a; }
.f-ulluco { width: 24px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 70% 60%, #e07a8a 6px, transparent 7px), #e8c74a; }
.f-yuca { width: 44px; height: 14px; border-radius: 3px 50% 50% 3px; background: linear-gradient(90deg, #f4efe2 4px, #7a4e2c 4px); }
.f-ajo { width: 22px; height: 24px; border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%; background: #f1ebe0; box-shadow: inset 0 0 0 1px #d9cfb4; }
.f-pimenton { width: 26px; height: 28px; border-radius: 40% 40% 45% 45%; background: #c8322a; }
.f-ahuyama { width: 28px; height: 24px; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #3f5a2e 5px, #e88a2a 5px); }
.f-papaya { width: 40px; height: 20px; border-radius: 50%; background: radial-gradient(ellipse 30% 25%, #1c1712 60%, transparent 70%), #ef7a3a; }
.f-granadilla { width: 24px; height: 26px; border-radius: 50%; background: #e8a33a; }
.f-kumis { width: 16px; height: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--color-tomate) 6px, #f6f3ea 6px 18px, var(--color-cilantro) 18px 26px, #f6f3ea 26px); }
.f-chorizo { width: 44px; height: 12px; border-radius: 6px; background: repeating-linear-gradient(90deg, #9a3a2a 0 13px, #d8c9a0 13px 15px); }
.f-trucha { width: 44px; height: 16px; border-radius: 50% 30% 30% 50%; clip-path: polygon(0 50%, 15% 0, 80% 15%, 100% 0, 100% 100%, 80% 85%, 15% 100%); background: linear-gradient(180deg, #7f8c6a 45%, #d98a8a 45% 60%, #7f8c6a 60%); }
.f-panela { width: 30px; height: 22px; border-radius: 6px / 4px; background: linear-gradient(90deg, #9a5a26 50%, #b9a46a 50%); }
.f-frasco.f-frijol { background: #7a2e24; }
.f-mote { width: 24px; height: 28px; border-radius: 40% 40% 6px 6px; background: linear-gradient(180deg, #f3eddc 70%, #e0b84a 70%); box-shadow: inset 0 0 0 1px #d9cfb4; }
.f-avena { width: 22px; height: 30px; border-radius: 4px; background: linear-gradient(180deg, var(--color-papa) 5px, #ece0c4 5px 11px, var(--color-cobre) 11px 21px, #ece0c4 21px); }
.f-aceite { width: 16px; height: 36px; border-radius: 6px 6px 4px 4px; background: linear-gradient(180deg, #2f7a4a 5px, #e9c24a 5px 15px, var(--color-cilantro) 15px 24px, #e9c24a 24px); }
.f-cafe { width: 22px; height: 30px; border-radius: 4px; background: radial-gradient(circle at 50% 20%, #1c1712 2px, transparent 3px), linear-gradient(180deg, #3a2618 12px, #d8b47a 12px 22px, #3a2618 22px); }
.f-aji { width: 18px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #2b2a22 5px, #b8432a 5px 10px, #4f8a3a 10px 15px, #b8432a 15px); }
.f-repollo { width: 28px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #c9dc9a 7px, #8fb56a 8px); }
.f-lechuga { width: 32px; height: 22px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 50% 70%, #a6d26a 6px, #6aa04a 7px); }
.f-manzana { width: 26px; height: 24px; border-radius: 45% 45% 50% 50%; background: #b8302a; }
.f-pina { width: 22px; height: 34px; border-radius: 3px 3px 50% 50% / 3px 3px 40% 40%; background: linear-gradient(180deg, #4f7a3a 11px, #c9902e 11px); }
.f-chuleta { width: 40px; height: 24px; border-radius: 50% 60% 50% 40%; background: radial-gradient(ellipse 30% 50% at 30% 50%, #efe6d6 70%, transparent 75%), #e8a8a0; box-shadow: inset 0 0 0 3px #f4ead8; }
.f-cuy { width: 42px; height: 18px; border-radius: 50%; background: radial-gradient(ellipse 35% 45% at 45% 50%, #a8572a 90%, transparent 95%), #f6f2e8; }
.f-sobras { width: 36px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #3f6f8f 6px, transparent 6px), linear-gradient(90deg, #f3efe4 50%, #8a4a2a 50%); }
.f-mazorca { width: 42px; height: 16px; border-radius: 4px 50% 50% 4px; background: repeating-linear-gradient(90deg, #f0c84a 0 4px, #d9ac2e 4px 5px); }
.f-otro { width: 22px; height: 22px; border-radius: 6px; background: var(--color-meson-strong); }

@media (prefers-reduced-motion: reduce) {
  .fridge, .fridge .part, .fridge .door { transition: none; }
}

/* Now: the question, its answer as dish posters, then what to use today */
.now-hero h1 { font-size: clamp(56px, 8.4vw, 152px); line-height: 0.88; }
.now-hero .lead { max-width: 40ch; }
.dish-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); }
.dish-card { display: grid; gap: var(--space-s); align-content: start; min-width: 0; animation: rise var(--duration-slow) var(--ease-emphasized) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.dish-photo { margin: 0; display: grid; gap: 6px; }
.dish-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-20); background: var(--color-meson); display: block; transition: transform var(--duration-slow) var(--ease-emphasized); }
.dish-card:hover .dish-photo img { transform: scale(1.02); }
.dish-photo figcaption { font-size: 12px; color: var(--color-text-weak); }

.dish-body { display: grid; gap: var(--space-xs); justify-items: start; }
.dish-body h2 { font: 400 clamp(26px, 2.4vw, 36px)/0.95 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); }
.dish-meta { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; color: var(--color-text-weak); margin: 0; }
.dish-meta .data { color: var(--color-text); font-weight: 700; }
.dish-rescue { margin: 0; font-weight: 600; color: var(--color-positive-text); }
.dish-foods { margin: 0; color: var(--color-text-weak); }
.dish-foods .missing { color: var(--color-attention-text); font-weight: 600; }
.dish-body .primary { margin-top: var(--space-xs); }
.dish-card.skel { padding: 0; background: none; }
.skel-photo { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-20); background: var(--skeleton); }

.adjust summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.adjust form { margin-top: var(--space-s); }

.today { display: grid; gap: var(--space-m); }
.today h2, .summary-row h2 { font: 400 clamp(32px, 3.4vw, 48px)/1 var(--font-display); text-transform: uppercase; }
.today-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-s); }
.today-list > * { flex: 1 1 240px; }
.today-card { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-m); border-radius: var(--radius-20); background: var(--color-surface); }
.today-grams { font: 700 var(--size-figure)/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.today-card .item-name { font-size: var(--size-h4); }
.today-use { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); }
.today-use > button[type="submit"] { flex: 1 1 100%; }
.today-use input.grams { width: 6ch; }

.summary-row { display: grid; gap: var(--space-m); }
.summary-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-s); }
.summary-figures .kpi { padding: var(--space-m); border-radius: var(--radius-20); background: var(--color-surface); }
.summary-figures .kpi .value { font-weight: 700; letter-spacing: -0.03em; }

@media (max-width: 760px) {
  .dish-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-xs); scrollbar-width: none; }
  .dish-card { scroll-snap-align: start; }
  .summary-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .dish-card, .dish-card.skel { animation: none; }
  .dish-card:hover .dish-photo img { transform: none; }
}

/* Fridge: the stage is the map, the column lists what is on the chosen shelf */
.fridge-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--space-l); }
.fridge-hero h1, .fridge-hero .lead, .fridge-hero .twin { grid-column: 1; }
.fridge-hero .hero-figure { grid-column: 2; grid-row: 1 / span 3; margin: 0; font: 700 clamp(56px, 7vw, 120px)/0.85 var(--font-body); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.fridge-hero .twin { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.fridge-hero .status { padding: 6px 12px; border-radius: var(--radius-full); background: color-mix(in oklab, var(--color-white) 18%, transparent); color: inherit; }
.fridge-hero .status::before { background: currentColor; }
.shelf-chips { display: flex; gap: var(--space-xs); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.shelf-chips a { flex: none; display: inline-flex; align-items: baseline; gap: var(--space-xs); min-height: 48px; padding: 12px 18px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); text-decoration: none; font-weight: 600; transition: background-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard); }
.shelf-chips a .data { color: var(--color-text-weak); font-weight: 700; }
.shelf-chips a:hover { background: var(--color-step); }
.shelf-chips a[aria-current="true"] { background: var(--chapter); color: var(--chapter-ink); }
.shelf-chips a[aria-current="true"] .data { color: inherit; }
.shelf-tile { background: transparent; padding: var(--space-m); }
.shelf-tile > header h2 { font: 400 clamp(32px, 3.4vw, 48px)/1 var(--font-display); text-transform: uppercase; }

@media (max-width: 760px) {
  .fridge-hero, .market-hero { grid-template-columns: minmax(0, 1fr); }
  .market-hero .hero-figure { grid-column: 1; grid-row: auto; justify-items: start; }
  .market-hero .hero-figure .data { font-size: 56px; }
  .fridge-hero .hero-figure { grid-column: 1; grid-row: auto; }
}

/* Market: the list is a paper notepad, the budget is a ring */
.market-hero, .numbers-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--space-l); }
.market-hero h1, .market-hero .lead { grid-column: 1; }
.market-hero .hero-figure { grid-column: 2; grid-row: 1 / span 2; margin: 0; display: grid; justify-items: end; gap: 4px; }
.market-hero .hero-figure .data { font: 700 clamp(40px, 5.4vw, 88px)/0.9 var(--font-body); letter-spacing: -0.04em; color: inherit; }
.market-hero .hero-figure span:last-child { font-weight: 600; }
.notepad { background: var(--color-white); position: relative; box-shadow: var(--sheet-shadow), inset 0 3px 0 var(--color-tomate); }
.notepad::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--color-tomate); }
.notepad > h2 { font: 400 clamp(28px, 3vw, 40px)/1 var(--font-display); text-transform: uppercase; }

.notepad .market-group h3 { font: 700 var(--size-small)/1.3 var(--font-body); color: var(--color-attention-text); text-transform: none; margin-top: var(--space-s); }
.notepad .list > li { border-bottom: 2px solid var(--color-meson); }
.notepad .market-row .item-name { font-size: var(--size-h4); }
.check input { accent-color: var(--color-tomate); }
.budget-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m); }
.budget-ring { width: 112px; height: 112px; flex: none; transform: rotate(-90deg); }
.budget-ring circle { fill: none; stroke-width: 14; }
.budget-ring .ring-bg { stroke: var(--color-meson); }
.budget-ring .ring { stroke-dasharray: var(--len); stroke-dashoffset: var(--to); transform-origin: 64px 64px; animation: ring-draw var(--duration-spring) var(--ease-emphasized) both; }
.budget-ring .spent { stroke: var(--color-piedra); }
.budget-ring .planned { stroke: var(--color-cobre); }
.budget-figures .key.spent { background: var(--color-piedra); }
.budget-figures .key.planned { background: var(--color-cobre); }
@media (max-width: 760px) {
  .market-hero { grid-template-columns: minmax(0, 1fr); }
  .market-hero .hero-figure { grid-column: 1; grid-row: auto; justify-items: start; }
  .notepad { padding: var(--space-m); }
}
@media (prefers-reduced-motion: reduce) {
  .budget-ring .ring { animation: none; }
}
@container (max-width: 420px) {
  .tile .row-form > .grow { flex-basis: auto; }
}
.budget-tile .kpi .value { font-size: clamp(24px, 11cqi, 44px); }
.budget-head .kpi { min-width: 0; }

/* Chef: a real conversation, a round composer, and the guided step as a poster */
.chef-tile { display: grid; gap: var(--space-m); }
.chat { gap: var(--space-s); }
.chat > li { max-width: min(78%, 620px); padding: var(--space-s) var(--space-m); border-radius: 22px; }
.chat .said { justify-self: end; background: var(--color-tinta); color: var(--color-arroz); border-bottom-right-radius: 6px; }
.chat .said .who { color: color-mix(in oklab, var(--color-arroz) 70%, transparent); }
.chat .answer { justify-self: start; border: 0; background: var(--color-surface); border-bottom-left-radius: 6px; }
.chat .answer .who { font-weight: 700; color: var(--color-primary-text); }

.chat .typing { display: inline-flex; align-items: center; gap: var(--space-s); padding: var(--space-s) var(--space-m); }
.chat .typing .thinking-art .art { width: 36px; height: 36px; color: var(--color-text-weak); }
.chat .typing .thinking-text { color: var(--color-text-weak); font-size: var(--size-small); }
.chat .typing .dots { display: inline-flex; gap: 6px; }
.chat .typing .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-piedra); animation: typing calc(var(--duration-slow) * 2.4) var(--ease-standard) infinite; }
.chat .typing .dots span:nth-child(2) { animation-delay: calc(var(--stagger) * 4); }
.chat .typing .dots span:nth-child(3) { animation-delay: calc(var(--stagger) * 8); }
@keyframes typing { 50% { transform: translateY(-5px); opacity: 0.5; } }
.ask { position: sticky; bottom: var(--space-s); display: flex; align-items: center; gap: var(--space-xs); padding: 8px; border-radius: var(--radius-full); background: var(--color-white); box-shadow: var(--shadow-raised); }
.ask .grow { flex: 1 1 auto; }
.ask input { border: 0; min-height: 48px; background: transparent; font-size: var(--size-h4); }
.ask input:focus-visible { outline: none; }
.ask:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
button.round { min-height: 48px; padding: 0 20px; }
.chef-side { display: grid; gap: var(--space-s); }
.cooking { background: var(--color-tinta); color: var(--color-arroz); }
.cooking .cooking-step { font: 400 clamp(36px, 4vw, 64px)/0.9 var(--font-display); text-transform: uppercase; color: var(--color-papa); margin: 0; }
.cooking .item-name { font-size: var(--size-h4); }
.cooking .step-text { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.25; }
.cooking .hint, .cooking .status { color: color-mix(in oklab, var(--color-arroz) 75%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .chat .typing .dots span { animation: none; }
}
.prompts { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip-button { min-height: 48px; border-radius: var(--radius-full); background: var(--color-surface); font-weight: 600; }
.chip-button:hover { background: var(--color-step); }

/* Sign in and first household: the question as a poster beside the form */
.shell:has(.stage[hidden]) { grid-template-columns: minmax(0, 1fr); }
.column main:has(.auth-split) { max-width: none; padding: 0; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); min-height: calc(100vh - 68px); }
.auth-poster { position: relative; display: grid; align-content: space-between; gap: var(--space-l); padding: var(--space-xl); background: var(--color-papa); color: var(--color-tinta); overflow: hidden; }
.auth-question { margin: 0; font: 400 clamp(64px, 9vw, 168px)/0.86 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); max-width: 10ch; animation: rise var(--duration-slow) var(--ease-emphasized) both; }
.auth-photo { margin: 0; display: grid; gap: 6px; }
.auth-photo img { width: 100%; max-height: 42vh; object-fit: cover; border-radius: var(--radius-20); display: block; clip-path: inset(0 0 0 0 round var(--radius-20)); animation: shutter var(--duration-shutter) var(--ease-emphasized) both calc(var(--stagger) * 5); }
.auth-photo figcaption { font-size: 12px; }
@keyframes shutter { from { clip-path: inset(100% 0 0 0 round var(--radius-20)); scale: 1.08; } }
.auth-split .auth { max-width: 460px; width: 100%; justify-self: center; align-self: center; padding: var(--space-xl) var(--space-m); }
.auth-split .auth h1 { font-size: clamp(40px, 4.4vw, 72px); }
@media (max-width: 860px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-poster { padding: var(--space-l) var(--space-m); }
  .auth-photo img { max-height: 28vh; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-question, .auth-photo img { animation: none; }
}

/* Landing: full-bleed produce chapters */
.column main:has(.landing) { max-width: none; padding: 0; gap: 0; }
a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: var(--control-height-large); }
a.button:active { transform: scale(0.97); }
.landing { display: grid; }
.chapter { min-height: 88svh; display: grid; align-content: center; gap: var(--space-m); padding: clamp(56px, 8vw, 128px) max(20px, 5vw); }
.chapter h2 { margin: 0; font: 400 clamp(48px, 7vw, 120px)/0.9 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); max-width: 14ch; }
.land-text { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.45; max-width: 46ch; margin: 0; }
.chapter-papa { background: var(--color-papa); color: var(--color-tinta); }
.chapter-cilantro { background: var(--color-cilantro); color: var(--color-arroz); }
.chapter-arroz { background: var(--color-arroz); color: var(--color-tinta); }
.chapter-mora { background: var(--color-mora); color: var(--color-arroz); }
.chapter-tomate { background: var(--color-tomate); color: var(--color-arroz); }
.chapter-tinta { background: var(--color-tinta); color: var(--color-arroz); }
.land-actions { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.chapter-tinta a.button:not(.primary), .chapter-papa a.button:not(.primary) { background: color-mix(in oklab, var(--color-white) 70%, transparent); color: var(--color-tinta); }

.land-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; column-gap: var(--space-xl); min-height: calc(100svh - 68px); }
.land-hero h1 { font-size: clamp(72px, 10.5vw, 196px); line-height: 0.84; max-width: 9ch; }
.land-lead { font-size: clamp(20px, 1.8vw, 28px); line-height: 1.4; max-width: 34ch; margin: var(--space-m) 0; }

.land-label { position: absolute; padding: 10px 16px; border-radius: var(--radius-full); background: var(--color-white); color: var(--color-tinta); font: 700 18px/1 var(--font-body); font-variant-numeric: tabular-nums; box-shadow: var(--shadow-raised); }
@keyframes pop { from { opacity: 0; scale: 0.6; } }

.kit { list-style: none; margin: var(--space-l) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-l); }
.kit-part { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-s); align-content: start; }
.kit-text { display: grid; gap: 6px; }
.kit-text b { font: 400 clamp(21px, 2.3vw, 36px)/1 var(--font-display); text-transform: uppercase; hyphens: auto; overflow-wrap: break-word; }
.kit-text span { font-size: 17px; line-height: 1.45; }

.how-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: var(--space-xl); }
.how-clause { font: 400 clamp(32px, 3.6vw, 60px)/1 var(--font-display); text-transform: uppercase; max-width: 16ch; margin: var(--space-m) 0 0; }
.how-right { display: grid; place-items: center; min-height: 340px; border-radius: var(--radius-20); background: var(--color-papa); }
.how-fragment { display: grid; gap: var(--space-xs); justify-items: start; min-width: min(320px, 80%); padding: var(--space-l); background: var(--color-white); border-radius: var(--radius-20); box-shadow: var(--shadow-raised); }
.ui-label { font-weight: 700; color: var(--color-text-weak); }
.ui-figure { font: 700 clamp(48px, 5vw, 80px)/1 var(--font-body); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.how-slider { grid-column: 1 / -1; display: grid; gap: var(--space-s); margin-top: var(--space-l); }
.how-slider input[type="range"] { width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; accent-color: var(--color-cobre); }
.how-names { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); font-weight: 700; color: var(--color-text-weak); }
.how-names li[aria-current="step"] { color: var(--color-tinta); }
.how-names li:nth-child(2) { text-align: center; translate: -16% 0; }
.how-names li:nth-child(3) { text-align: center; translate: 16% 0; }
.how-names li:last-child { text-align: right; }

/* The question, the ruler and the answer each get their own breath, and all three fit one screen under the bar. */
.calc-stage { display: grid; gap: clamp(32px, 5svh, 64px); align-content: space-between; }
.land-calc h2 { font-size: clamp(40px, min(5.5vw, 8svh), 96px); max-width: 18ch; }
.calc-figure { margin: 0; display: grid; gap: var(--space-s); }
.calc-figure .data { font: 700 clamp(64px, min(10vw, 17svh), 196px)/0.85 var(--font-body); letter-spacing: -0.05em; color: var(--color-papa); }
.calc-figure > span:last-child { font-size: clamp(20px, 2vw, 28px); font-weight: 600; }
.calc-how { margin: 0; max-width: 60ch; font-size: 16px; color: color-mix(in oklab, var(--color-arroz) 82%, transparent); }

.land-pasto { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; column-gap: var(--space-xl); }
.pasto-photo { margin: 0; display: grid; gap: 6px; }
.pasto-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-20); display: block; }
.pasto-photo figcaption { font-size: 12px; }
.land-cta { justify-items: start; }
.land-float { position: fixed; z-index: 40; right: var(--space-l); bottom: var(--space-l); display: flex; gap: var(--space-xs); padding: var(--space-xs); border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); background: var(--color-surface); box-shadow: var(--shadow-raised); opacity: 0; translate: 0 var(--space-m); pointer-events: none; transition: opacity var(--duration-base) var(--ease-emphasized), translate var(--duration-base) var(--ease-emphasized); }
.land-float.shown { opacity: 1; translate: 0 0; pointer-events: auto; }
@media (max-width: 640px) {
  .land-float { left: var(--space-m); right: var(--space-m); bottom: calc(var(--space-m) + env(safe-area-inset-bottom)); }
  .land-float .button { flex: 1; justify-content: center; white-space: nowrap; padding-inline: var(--space-s); }
}
@media (prefers-reduced-motion: reduce) {
  .land-float { translate: none; transition: opacity var(--duration-fast) linear; }
}
.land-footer { min-height: 70svh; align-content: space-between; padding-bottom: max(16px, 2vw); }
.land-credits { margin: 0; max-width: 60ch; font-size: 15px; }
.land-wordmark { margin: 0; font: 400 17vw/0.8 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); white-space: nowrap; overflow: hidden; }

@media (max-width: 900px) {
  .land-hero, .how-stage, .land-pasto { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-l); }
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .kit { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .land-hero h1, .land-lead, .land-hero .land-actions { animation: none; }
}
.pasto-photo img { max-height: 70vh; }
.password-field { display: flex; align-items: stretch; gap: var(--space-xs); }
.password-field input { flex: 1 1 auto; min-width: 0; }
.password-field button { min-height: var(--control-height); white-space: nowrap; }

/* 3D stage on desktop: the canvas replaces the drawn fridge, the drawn one stays as the fallback */
.stage-canvas { display: none; }
@media (min-width: 1024px) {
  .stage.has-three { grid-template-rows: minmax(0, 1fr) auto; }
  .stage.has-three .stage-fridge { display: none; }
  .stage.has-three .stage-canvas { display: block; width: 100%; height: 100%; min-height: 0; outline: none; }
}

/* Food palette under the 3D fridge: drag a food onto a shelf */
.stage-palette { display: none; }
@media (min-width: 1024px) {
  .stage.has-three { grid-template-rows: minmax(0, 1fr) auto auto; }
  .stage.has-three[data-route="fridge"] .stage-palette { display: grid; gap: var(--space-xs); }
}
@media (min-width: 1024px) {
  /* On Nevera the toast sits over the panel, so the food chips stay free for the next drop. */
  .shell:has(.stage.has-three[data-route="fridge"]) ~ .toast { left: auto; right: var(--space-l); transform: none; max-width: min(480px, calc(100vw - 32px)); }
}
.palette-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.palette-head .hint { margin: 0; }
.palette-freezer[aria-pressed="true"] { background: var(--color-tinta); color: var(--color-arroz); }
.palette-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.palette-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); font-weight: 600; cursor: grab; touch-action: none; }
.palette-chip .food { scale: 0.8; }
.palette-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: var(--shadow-raised); cursor: grabbing; }
.palette-other input { min-height: 44px; border-radius: var(--radius-full); width: 15ch; }
.learn { justify-self: start; }
.did-you-mean { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.row-form > .did-you-mean { flex: 0 0 auto; width: 100%; }
.did-you-mean > span { color: var(--color-text-weak); font-weight: 600; }
.did-you-mean .chip-button { min-height: 44px; padding: 0 var(--space-s); }

/* Grams and days floating over each food while the 3D door is open */
.stage-tags { position: absolute; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity var(--duration-base) var(--ease-standard); }
.stage-tag { position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: var(--radius-full); background: color-mix(in oklab, var(--color-white) 92%, transparent); color: var(--color-tinta); font: 600 12px/1.5 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-tinta) 14%, transparent); }
.stage-tag.soon { background: var(--color-tomate); color: var(--color-white); box-shadow: none; animation: tag-pulse calc(var(--duration-spring) * 2) var(--ease-standard) 2; }
@keyframes tag-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in oklab, var(--color-tomate) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .stage-tag.soon { animation: none; } }
@media (max-width: 1023px) { .stage-tags { display: none; } }

/* Paper grain over the illustrated 3D fridge */
.stage.has-three::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (max-width: 1023px) { .stage.has-three::after { display: none; } }

/* Chef: what the chef sees in the fridge, questions built from it, dishes inside answers */
.chef-sees { display: grid; gap: var(--space-s); padding: var(--tile-padding); border-radius: var(--tile-radius); background: var(--color-white); border: 1px solid var(--tile-border); box-shadow: var(--sheet-shadow); }
.chef-sees h2 { font-size: var(--size-small); font-weight: 700; color: var(--color-primary-text); }
.chef-sees .lead { margin: 0; font-size: var(--size-h4); color: var(--color-text); }
.sees-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sees-list li { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 8px; border-radius: var(--radius-full); background: var(--color-surface); }
.sees-list .food { scale: 0.7; }
.sees-list .data { font-weight: 700; }
.sees-when { font-size: var(--size-small); color: var(--color-text-weak); }
.sees-list .soon { background: color-mix(in oklab, var(--color-tomate) 12%, var(--color-white)); }
.sees-list .soon .sees-when { color: var(--color-attention-text); font-weight: 700; }
.chat .answer b { font-weight: 700; }
.chef-tile .chat:empty { display: none; }
.chef-dishes { display: grid; gap: var(--space-s); margin-top: var(--space-xs); }
.quick-replies { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-s); }
.chat > li, .chat .quick-replies { scroll-margin-bottom: var(--ask-space, 96px); }
.quick-replies .chip-button { min-height: 44px; padding: 0 var(--space-s); border: 1px solid var(--color-border-strong); }
.quick-replies .chip-button.primary { border-color: transparent; background: var(--color-primary); color: var(--color-primary-fg); }
.quick-replies .chip-button.primary:hover { background: var(--color-primary-hover); }
.chat .answer:has(.quick-replies) .dish-card [data-cook] { display: none; }
.chef-dishes .dish-card { grid-template-columns: 104px minmax(0, 1fr); align-items: center; padding: var(--space-s); border-radius: var(--radius-20); background: var(--color-white); }
.chef-dishes .dish-photo img { aspect-ratio: 1; }
.chef-dishes .dish-photo figcaption { display: none; }
.chef-dishes .dish-body { display: grid; gap: 4px; justify-items: start; }
.chef-dishes .dish-card h2 { font-size: var(--size-h4); }
.chef-dishes .dish-foods { margin: 0; font-size: var(--size-small); }
.chat .evidence summary { cursor: pointer; }
.voice-options summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.voice-options .row-form { align-items: center; }

.ring-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.ring-tag.ring-0::before { background: var(--color-cilantro); }
.ring-tag.ring-1::before { background: var(--color-papa); }
.ring-tag.ring-2::before { background: var(--color-tomate); }
/* Numbers: money first, three named rings, two facts, more tucked away */
.numbers-head .segmented { border-color: color-mix(in oklab, currentColor 45%, transparent); }
.numbers-head .segmented button { color: inherit; opacity: 0.85; font-weight: 600; }
.numbers-head .segmented button + button { border-left-color: color-mix(in oklab, currentColor 45%, transparent); }
.numbers-head .segmented button[aria-pressed="true"] { opacity: 1; background: var(--color-white); color: var(--color-tinta); box-shadow: none; }
.numbers-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); justify-items: start; }
@media (min-width: 900px) { .numbers-hero { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--space-l); } .numbers-hero .button { grid-column: 1 / -1; } }
.numbers-money { margin: 0; font-family: var(--font-display); font-size: clamp(56px, 9vw, 112px); line-height: 0.95; text-transform: uppercase; color: var(--color-positive-text); font-variant-numeric: tabular-nums; }
.numbers-line { margin: 0; max-width: 34ch; font-size: var(--size-h4); }
.numbers-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bento-gap); }
.ring { margin: 0; display: grid; gap: var(--space-s); justify-items: center; align-content: start; text-align: center; padding: var(--tile-padding); border-radius: var(--tile-radius); background: var(--color-white); border: 1px solid var(--tile-border); box-shadow: var(--sheet-shadow); }
.ring svg { width: min(140px, 100%); transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring-track { stroke: var(--color-surface); }
.ring-eaten .ring-fill { stroke: var(--color-cilantro); }
.ring-rescued .ring-fill { stroke: var(--color-papa); }
.ring-wasted .ring-fill { stroke: var(--color-tomate); }
.ring-fill { animation: ring-fill var(--duration-spring) var(--ease-emphasized) both; }
@keyframes ring-fill { from { stroke-dasharray: 0 264; } }
.ring figcaption { display: grid; gap: 2px; }
.ring-name { font-weight: 700; }
.ring-grams { font-size: var(--size-h3); font-weight: 800; }
.ring-hint { font-size: var(--size-small); color: var(--color-text-weak); }
.fact { align-content: start; }
.tile.fact > h2 { font-size: var(--size-small); font-weight: 700; color: var(--color-text-weak); }
.fact-value { margin: 0; font-size: var(--size-h3); font-weight: 700; }
.numbers-more { padding: var(--tile-padding); border-radius: var(--tile-radius); background: var(--color-white); border: 1px solid var(--tile-border); box-shadow: var(--sheet-shadow); }
.numbers-more summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.numbers-more section { display: grid; gap: var(--space-s); margin-top: var(--space-s); }
@media (max-width: 640px) {
  .numbers-rings { grid-template-columns: none; }
  .ring { grid-template-columns: 96px 1fr; justify-items: start; text-align: start; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .ring-fill { animation: none; } }

/* Drag and drop with fewer steps: undo in the toast, one-tap amounts, the 3D preview replaces the chip */
.toast { z-index: 100; max-width: calc(100vw - 32px); }
.toast.has-action { display: flex; align-items: center; gap: var(--space-s); pointer-events: auto; }
.toast.has-action:not(.visible) { pointer-events: none; }
.toast button { min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-full); background: var(--color-papa); color: var(--color-tinta); font-weight: 700; cursor: pointer; }
.use-shares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-s); }
.use-share { display: grid; gap: 4px; justify-items: center; min-height: 96px; padding: var(--space-s); border-radius: 22px; background: var(--color-surface); border: 2px solid transparent; font-weight: 600; }
.use-share:hover, .use-share:focus-visible { border-color: var(--color-cobre); }
.use-share .data { font-size: var(--size-h3); font-weight: 800; }
.palette-ghost.landing { opacity: 0.25; }

/* Use and throw-away drop zones over the 3D fridge while a food is dragged */
.stage-zones { display: none; }
@media (min-width: 1024px) {
  .stage.has-three .stage-zones { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); position: absolute; left: var(--space-l); right: var(--space-l); bottom: calc(var(--space-l) + 64px); pointer-events: none; opacity: 0; translate: 0 12px; transition: opacity var(--duration-base) var(--ease-standard), translate var(--duration-base) var(--ease-emphasized); }
  .stage.has-three .stage-zones.open { opacity: 1; translate: 0 0; }
}
.stage-zones span { display: grid; place-items: center; min-height: 72px; border-radius: 22px; border: 2px dashed currentColor; background: color-mix(in oklab, var(--color-white) 88%, transparent); font-weight: 800; font-size: var(--size-h4); }
.stage-zones [data-zone="use"] { color: var(--color-positive-text); }
.stage-zones [data-zone="discard"] { color: var(--color-attention-text); }
.stage-zones .over { border-style: solid; background: currentColor; }
.stage-zones .over { color: var(--color-white); }
.stage-zones [data-zone="use"].over { background: var(--color-cilantro); }
.stage-zones [data-zone="discard"].over { background: var(--color-tomate); }

@keyframes picked { 0% { box-shadow: 0 0 0 0 var(--color-papa); } 25% { box-shadow: 0 0 0 6px var(--color-papa); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Fridge-first: on desktop with the 3D fridge, the fridge is the interface and the column is the panel of the part you opened */
@media (min-width: 1024px) {
  .shell:has(.stage.has-three:not([hidden])) { grid-template-columns: minmax(0, 1fr) clamp(400px, 36vw, 540px); transition: grid-template-columns var(--duration-spring) var(--ease-spring); }
  .shell[data-layout="aside"]:has(.stage.has-three:not([hidden])) { grid-template-columns: minmax(0, 1fr) clamp(560px, 62vw, 1040px); }
  .shell[data-layout="aside"]:has(.stage.has-three:not([hidden])) .column main { max-width: 960px; margin-inline: auto; }
  .shell:has(.stage.has-three:not([hidden])) .column { position: relative; z-index: 7; background: var(--color-bg); box-shadow: -1px 0 0 color-mix(in oklab, var(--color-tinta) 12%, transparent), -24px 0 48px -32px color-mix(in oklab, var(--color-tinta) 30%, transparent); }
  .shell:has(.stage.has-three:not([hidden])) .column main { container: panel / inline-size; max-width: none; padding-inline: var(--space-m); }
  .shell:has(.stage.has-three:not([hidden])) .bar { flex-wrap: nowrap; gap: var(--space-s); padding-inline: var(--space-m); }
  .shell:has(.stage.has-three:not([hidden])) .bar .wordmark { font-size: 19px; }
  .shell:has(.stage.has-three:not([hidden])) .bar .session { gap: var(--space-s); margin-left: auto; }
  .shell:has(.stage.has-three:not([hidden])) main > header:first-child { min-height: 0; padding-block: var(--space-l) var(--space-m); }
  .shell:has(.stage.has-three:not([hidden])) main > header:first-child h1,
  .shell:has(.stage.has-three:not([hidden])) .now-hero h1 { font-size: clamp(40px, 3.4vw, 60px); line-height: 0.92; }
}

/* Inside the panel, layouts answer to the panel width, not the window: bentos stack at one width everywhere */
@container panel (max-width: 720px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > *, .bento > [class*="w-"] { grid-column: 1 / -1; }
}
@container panel (max-width: 620px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > *, .bento > [class*="w-"] { grid-column: 1 / -1; }
  .dish-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-s); }
  .dish-row .dish-card { grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .dish-row .dish-photo img { aspect-ratio: 1; }
  /* A CC BY-SA photo keeps its credit in the row too, small under the picture. */
  .dish-row .dish-photo figcaption { font-size: 11px; line-height: 1.25; }
  .dish-row .dish-card h2 { font-size: var(--size-h3); }
  .summary-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-list { grid-template-columns: minmax(0, 1fr); }
  .fridge-hero, .market-hero { grid-template-columns: minmax(0, 1fr); }
  .market-hero .hero-figure { grid-column: 1; grid-row: auto; justify-items: start; }
  .market-hero .hero-figure .data { font-size: 56px; }
  .fridge-hero .hero-figure { grid-column: 1; grid-row: auto; font-size: 56px; }
  .fridge-hero .lead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .shelf-chips { flex-wrap: wrap; }
  .shelf-chips a { min-height: 40px; padding: 8px 14px; font-size: var(--size-small); }
  .shelf-tile header { flex-wrap: wrap; gap: var(--space-s); }
  
  .numbers-head { display: grid; }
  .numbers-hero { grid-template-columns: minmax(0, 1fr); }
  .numbers-money { font-size: 64px; }
  .numbers-rings { gap: var(--space-xs); }
  .ring { padding: var(--space-s) 6px; }
  .ring-hint { display: none; }
  .chat > li { max-width: 92%; }
}

/* The leader: a line from the part of the fridge you opened to its panel */
.stage-leader { display: none; }
@media (min-width: 1024px) {
  .stage.has-three .stage-leader { display: block; position: absolute; top: var(--anchor-y, 50%); left: var(--anchor-x, 50%); right: 0; height: 0; border-top: 2px dashed color-mix(in oklab, var(--chapter-ink, var(--color-tinta)) 55%, var(--chapter)); pointer-events: none; transform-origin: right center; transition: opacity var(--duration-base) var(--ease-standard); }
  .stage.has-three .stage-leader::before { content: ""; position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: var(--chapter); box-shadow: 0 0 0 3px var(--color-white); }
  .stage.has-three .stage-leader::after { content: ""; position: absolute; right: -1px; top: -11px; border: 10px solid transparent; border-right: 12px solid var(--color-bg); border-left: 0; }
  .stage.has-three .stage-leader.hidden { opacity: 0; }
  .stage.has-three .stage-leader.draw { animation: leader-draw var(--duration-slow) var(--ease-emphasized) both; }
}
@keyframes leader-draw { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .stage.has-three .stage-leader.draw { animation: none; }
}

/* Empty market list: the tree tomato of Narino instead of a bare sentence */
.market-empty { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-s); align-items: center; }
.market-empty img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-20); }
.market-empty figcaption { display: grid; gap: 4px; }
.market-empty small { font-size: 12px; color: var(--color-text-weak); }

/* Fraunces as the engraved-poster display: heavy, soft, slightly wonky, set tight */
h1, h2.display, .now-hero h1 { font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; font-weight: 900; letter-spacing: -0.02em; }
/* The footer name always fits its line: sized from the footer's own width (the widest optical size measures 7.7 em). */
.land-footer { container-type: inline-size; }
.land-wordmark { font-size: calc(100cqi / 7.9); overflow: visible; }
:where(.dish-body h2, .today h2, .summary-row h2, .shelf-tile > header h2, .notepad > h2, .cooking .cooking-step, .auth-question, .chapter h2, .kit-text b, .how-clause, .land-wordmark, .numbers-money, .wordmark) { font-weight: 900; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }

/* Ink transitions: the panel is revealed and withdrawn behind a ragged ink-brush edge that starts at the fridge */
@property --ink { syntax: "<percentage>"; inherits: false; initial-value: 112%; }
@media (min-width: 1024px) {
  .shell:has(.stage.has-three:not([hidden])) .column {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L93.9 0.0 L91.5 2.1 L96.5 4.2 L91.7 6.2 L95.4 8.3 L93.7 10.4 L91.5 12.5 L95.1 14.6 L90.4 16.7 L94.9 18.8 L90.7 20.8 L90.9 22.9 L94.8 25.0 L98.3 27.1 L91.2 29.2 L93.0 31.2 L96.3 33.3 L99.5 35.4 L96.2 37.5 L94.0 39.6 L99.8 41.7 L91.4 43.8 L98.6 45.8 L92.9 47.9 L92.3 50.0 L91.2 52.1 L93.1 54.2 L98.3 56.2 L91.8 58.3 L95.8 60.4 L96.8 62.5 L93.7 64.6 L95.5 66.7 L91.6 68.8 L90.6 70.8 L92.1 72.9 L97.1 75.0 L94.3 77.1 L93.1 79.2 L96.3 81.2 L94.5 83.3 L93.0 85.4 L98.1 87.5 L97.0 89.6 L92.4 91.7 L96.2 93.8 L95.3 95.8 L98.8 97.9 L97.6 100.0 L0 100Z'/%3E%3C/svg%3E") left top / var(--ink) 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L93.9 0.0 L91.5 2.1 L96.5 4.2 L91.7 6.2 L95.4 8.3 L93.7 10.4 L91.5 12.5 L95.1 14.6 L90.4 16.7 L94.9 18.8 L90.7 20.8 L90.9 22.9 L94.8 25.0 L98.3 27.1 L91.2 29.2 L93.0 31.2 L96.3 33.3 L99.5 35.4 L96.2 37.5 L94.0 39.6 L99.8 41.7 L91.4 43.8 L98.6 45.8 L92.9 47.9 L92.3 50.0 L91.2 52.1 L93.1 54.2 L98.3 56.2 L91.8 58.3 L95.8 60.4 L96.8 62.5 L93.7 64.6 L95.5 66.7 L91.6 68.8 L90.6 70.8 L92.1 72.9 L97.1 75.0 L94.3 77.1 L93.1 79.2 L96.3 81.2 L94.5 83.3 L93.0 85.4 L98.1 87.5 L97.0 89.6 L92.4 91.7 L96.2 93.8 L95.3 95.8 L98.8 97.9 L97.6 100.0 L0 100Z'/%3E%3C/svg%3E") left top / var(--ink) 100% no-repeat;
  }
}

/* Press and hold: the button fills like ink while held and acts only when full */
[data-hold] { position: relative; overflow: hidden; isolation: isolate; }
@property --hold { syntax: "<number>"; inherits: true; initial-value: 0; }
[data-hold]::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0.2; transform: scaleX(var(--hold)); transform-origin: left center; }

.landing { --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L0 7.1 L0.0 7.1 L1.7 5.0 L3.3 8.3 L5.0 4.2 L6.7 7.6 L8.3 5.3 L10.0 1.7 L11.7 4.6 L13.3 8.7 L15.0 7.1 L16.7 0.8 L18.3 2.7 L20.0 3.8 L21.7 7.3 L23.3 6.2 L25.0 0.4 L26.7 11.8 L28.3 8.7 L30.0 5.9 L31.7 5.5 L33.3 4.4 L35.0 0.1 L36.7 4.8 L38.3 0.5 L40.0 4.7 L41.7 2.2 L43.3 0.3 L45.0 4.2 L46.7 7.0 L48.3 7.6 L50.0 4.7 L51.7 5.8 L53.3 7.5 L55.0 6.0 L56.7 4.1 L58.3 2.5 L60.0 12.0 L61.7 9.0 L63.3 7.6 L65.0 6.4 L66.7 5.8 L68.3 2.1 L70.0 2.6 L71.7 0.6 L73.3 9.9 L75.0 3.6 L76.7 7.6 L78.3 3.5 L80.0 11.6 L81.7 7.6 L83.3 0.0 L85.0 1.9 L86.7 11.2 L88.3 4.2 L90.0 8.8 L91.7 3.6 L93.3 3.7 L95.0 5.7 L96.7 7.0 L98.3 2.4 L100.0 3.8 L100 100Z'/%3E%3C/svg%3E"); background: var(--paper); }
.landing .chapter { position: relative; margin-top: -28px; padding-top: calc(clamp(56px, 8vw, 128px) + 28px); -webkit-mask: var(--edge) top / 100% 28px no-repeat, linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat; mask: var(--edge) top / 100% 28px no-repeat, linear-gradient(#000, #000) 0 28px / 100% calc(100% - 28px) no-repeat; }
.landing .chapter-papa, .landing .chapter-arroz, .landing .chapter-tomate { background: var(--paper); color: var(--ink-color); }
.landing .chapter-cilantro, .landing .chapter-tinta { background: var(--ink-color); color: var(--paper); }
.landing .chapter-mora { background: #a8361f; color: var(--paper); }
.landing .land-hero { min-height: 100svh; }
.landing .land-text, .landing .land-lead, .landing .calc-how { justify-self: start; max-width: 46ch; color: inherit; font-weight: 500; }
.landing .pasto-photo img { filter: grayscale(1) contrast(1.35) brightness(1.05); mix-blend-mode: multiply; }
.landing .chapter-cilantro .kit-text span, .landing .chapter-tinta .land-text { color: color-mix(in oklab, var(--paper) 86%, transparent); }

/* After the story: light on dark, dark on light, and engraved illustrations instead of drawn shapes */
.landing .chapter-mora .calc-figure .data { color: var(--paper); }
.landing .chapter-mora .calc-how, .landing .chapter-mora .calc-control { color: var(--paper); }
.landing .chapter-cilantro a.button:not(.primary), .landing .chapter-tinta a.button:not(.primary), .landing .chapter-mora a.button:not(.primary) { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }
.landing .chapter-papa a.button:not(.primary), .landing .chapter-arroz a.button:not(.primary), .landing .chapter-tomate a.button:not(.primary) { background: transparent; color: var(--ink-color); box-shadow: inset 0 0 0 2px var(--ink-color); }
.landing a.button.primary { background: var(--color-cobre); color: var(--paper); }
.land-vignette { position: relative; margin: 0; justify-self: center; width: min(100%, 520px); }
.land-vignette img, .how-scene { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.land-vignette img { aspect-ratio: 4 / 5; }
.land-vignette .land-label.l1 { left: 4%; top: 46%; }
.land-vignette .land-label.l2 { right: 2%; left: auto; top: 30%; }
.land-vignette .land-label.l3 { right: 8%; bottom: 16%; }
.land-vignette .land-label { box-shadow: 3px 3px 0 var(--ink-color); border: 2px solid var(--ink-color); }
.land-vignette .land-label.l2 { border-color: var(--ink-color); }
.kit-medallion { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink-color), 0 0 0 7px var(--paper); }
.kit-medallion img { display: block; width: 100%; height: 100%; object-fit: cover; }
.landing .kit { gap: var(--space-xl) var(--space-l); }
.landing .kit-text span { font-size: 17px; }
/* The scene, the words and the timeline share one screen under the bar: the square scene is as wide as the height left for it. */
.landing .how-right { position: relative; min-height: 0; background: transparent; border-radius: 0; display: block; width: min(100%, calc(100svh - var(--bar-height) - 230px)); justify-self: end; container-type: inline-size; }
/* On a short screen the scene is small, so the data card shrinks with it instead of covering it. */
.landing .how-right .how-fragment { font-size: clamp(13px, 5.5cqi, 17px); padding: clamp(12px, 6cqi, 24px); }
.landing .how-right .ui-figure { font-size: clamp(28px, 15cqi, 56px); }
.landing .how-fragment .land-row { width: auto; min-width: min(300px, 62cqi); min-height: 0; padding: 0; color: inherit; cursor: default; }
.landing .how-fragment .land-row .value { font-size: clamp(22px, 9cqi, 36px); letter-spacing: -0.02em; }
.landing .how-fragment .land-row .item-name { font-size: clamp(15px, 6cqi, 20px); }
.land-how h2 { font-size: clamp(40px, min(6.5vw, 11svh), 120px); }
.how-clause { font-size: clamp(22px, min(3.6vw, 6svh), 60px); }
.landing .how-right .how-scene { border: 3px solid var(--ink-color); }
.landing .how-fragment { position: absolute; left: -24px; bottom: -24px; min-width: 0; padding: var(--space-m); border-radius: 0; background: var(--paper); color: var(--ink-color); border: 3px solid var(--ink-color); box-shadow: 6px 6px 0 var(--ink-color); }
.landing .how-names { color: var(--color-text-weak); }
.landing .how-names li[aria-current="step"] { color: var(--ink-color); }
.landing .land-footer { gap: var(--space-m); min-height: 0; align-content: end; overflow: clip; padding-top: calc(clamp(32px, 4vw, 56px) + 28px); }
.landing .land-cta { min-height: 0; }
.landing .land-wordmark { color: var(--ink-color); }
@media (max-width: 900px) {
  .landing .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) var(--space-s); }
  .landing .kit-text b { font-size: 20px; }
  .landing .kit-text span { font-size: 15px; }
  .landing .how-fragment { left: 12px; bottom: -16px; max-width: 72%; padding: var(--space-s); }
  .landing .how-fragment .land-row { min-width: 0; column-gap: var(--space-xs); }
  .landing .how-fragment .land-row .value { font-size: 22px; }
  .landing .how-fragment .land-row .item-name { font-size: 15px; }
}

/* Inside the app: the engraving language of the landing. Cream paper, cards edged in ink with a hard offset shadow, controls outlined in ink, chapter bands with a ragged ink bottom */
.shell:has(.stage:not([hidden])) .column, .shell:has(.stage:not([hidden])) .bar { background: var(--sheet); }
.shell:has(.stage:not([hidden])) main > header:first-child { position: relative; padding-bottom: calc(var(--space-l) + 14px); }
.shell:has(.stage:not([hidden])) main > header:first-child::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: -1px; height: 18px; background: var(--sheet); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L0 7.1 L0.0 7.1 L1.7 5.0 L3.3 8.3 L5.0 4.2 L6.7 7.6 L8.3 5.3 L10.0 1.7 L11.7 4.6 L13.3 8.7 L15.0 7.1 L16.7 0.8 L18.3 2.7 L20.0 3.8 L21.7 7.3 L23.3 6.2 L25.0 0.4 L26.7 11.8 L28.3 8.7 L30.0 5.9 L31.7 5.5 L33.3 4.4 L35.0 0.1 L36.7 4.8 L38.3 0.5 L40.0 4.7 L41.7 2.2 L43.3 0.3 L45.0 4.2 L46.7 7.0 L48.3 7.6 L50.0 4.7 L51.7 5.8 L53.3 7.5 L55.0 6.0 L56.7 4.1 L58.3 2.5 L60.0 12.0 L61.7 9.0 L63.3 7.6 L65.0 6.4 L66.7 5.8 L68.3 2.1 L70.0 2.6 L71.7 0.6 L73.3 9.9 L75.0 3.6 L76.7 7.6 L78.3 3.5 L80.0 11.6 L81.7 7.6 L83.3 0.0 L85.0 1.9 L86.7 11.2 L88.3 4.2 L90.0 8.8 L91.7 3.6 L93.3 3.7 L95.0 5.7 L96.7 7.0 L98.3 2.4 L100.0 3.8 L100 100Z'/%3E%3C/svg%3E") 0 0 / 120px 100% repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L0 7.1 L0.0 7.1 L1.7 5.0 L3.3 8.3 L5.0 4.2 L6.7 7.6 L8.3 5.3 L10.0 1.7 L11.7 4.6 L13.3 8.7 L15.0 7.1 L16.7 0.8 L18.3 2.7 L20.0 3.8 L21.7 7.3 L23.3 6.2 L25.0 0.4 L26.7 11.8 L28.3 8.7 L30.0 5.9 L31.7 5.5 L33.3 4.4 L35.0 0.1 L36.7 4.8 L38.3 0.5 L40.0 4.7 L41.7 2.2 L43.3 0.3 L45.0 4.2 L46.7 7.0 L48.3 7.6 L50.0 4.7 L51.7 5.8 L53.3 7.5 L55.0 6.0 L56.7 4.1 L58.3 2.5 L60.0 12.0 L61.7 9.0 L63.3 7.6 L65.0 6.4 L66.7 5.8 L68.3 2.1 L70.0 2.6 L71.7 0.6 L73.3 9.9 L75.0 3.6 L76.7 7.6 L78.3 3.5 L80.0 11.6 L81.7 7.6 L83.3 0.0 L85.0 1.9 L86.7 11.2 L88.3 4.2 L90.0 8.8 L91.7 3.6 L93.3 3.7 L95.0 5.7 L96.7 7.0 L98.3 2.4 L100.0 3.8 L100 100Z'/%3E%3C/svg%3E") 0 0 / 120px 100% repeat-x; pointer-events: none; }

.shell:has(.stage:not([hidden])) :is(.tile, .ring, .fact, .chef-sees, .numbers-more, .today-card, .summary-figures .kpi, .notepad, .use-share, .chef-dishes .dish-card) { background: var(--card); color: var(--line); border: 2px solid var(--line); border-radius: 6px; box-shadow: 4px 4px 0 var(--line); }
.shell:has(.stage:not([hidden])) .dish-row .dish-card { padding: var(--space-s); background: var(--card); border: 2px solid var(--line); border-radius: 6px; box-shadow: 4px 4px 0 var(--line); }
.shell:has(.stage:not([hidden])) .chat .answer { background: var(--card); border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); }
.shell:has(.stage:not([hidden])) .chat .said { background: var(--line); color: var(--sheet); }
.shell:has(.stage:not([hidden])) .chat .said .who { color: inherit; }
.shell:has(.stage:not([hidden])) .quick-replies .chip-button.primary { background: var(--button-primary-bg); color: var(--button-primary-fg); box-shadow: none; }
.shell:has(.stage:not([hidden])) .quick-replies .chip-button.primary:hover { background: var(--button-primary-bg-hover); }
.shell:has(.stage:not([hidden])) :is(.chip-button, .shelf-chips a, .chip span) { border: 0; background: var(--card); color: var(--line); box-shadow: inset 0 0 0 1.5px var(--line); }
.shell:has(.stage:not([hidden])) :is(.shelf-chips a[aria-current="true"], .chip input:checked + span) { background: var(--line); color: var(--sheet); }
.shell:has(.stage:not([hidden])) main :is(input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea):not(.number-input *, .ask *) { background: var(--card); border: 2px solid var(--line); border-radius: 4px; }
.shell:has(.stage:not([hidden])) main > :not(header) :is(button:not(.primary, .round, .food-row-head, [class*="use-share"], .number-input *, .ask *), a.button:not(.primary)) { background: transparent; color: var(--line); box-shadow: inset 0 0 0 2px var(--line); }
.shell:has(.stage:not([hidden])) .dish-photo:not(.dish-engraved) img { filter: grayscale(1) contrast(1.3) brightness(1.04); mix-blend-mode: multiply; }
.shell:has(.stage:not([hidden])) .dish-engraved img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-20); opacity: 0; transition: opacity var(--duration-slow) var(--ease-standard); }
.shell:has(.stage:not([hidden])) .dish-engraved img[src] { opacity: 1; }
.shell:has(.stage:not([hidden])) .stage-palette .palette-chip, .shell:has(.stage:not([hidden])) .stage .tabs a { box-shadow: inset 0 0 0 1.5px var(--line); }
.fridge .freezer, .fridge .cabin, .fridge .door-outer { background: repeating-linear-gradient(135deg, rgba(28, 23, 18, 0.5) 0 1px, transparent 1px 5px) right / 16% 100% no-repeat, var(--card); border-color: var(--line); }
.shell:has(.stage:not([hidden])) .numbers-head .segmented { border: 2px solid currentColor; border-radius: 4px; }
.shell:has(.stage:not([hidden])) .numbers-head .segmented button { color: inherit; }
.shell:has(.stage:not([hidden])) .numbers-head .segmented button[aria-pressed="true"] { background: transparent; color: inherit; opacity: 1; box-shadow: inset 0 -4px 0 currentColor; }
.shell:has(.stage:not([hidden])) .number-input { justify-self: start; width: max-content; border: 2px solid var(--line); border-radius: 4px; background: var(--card); overflow: hidden; }
.shell:has(.stage:not([hidden])) .number-input :is(input, button, span) { border: 0; box-shadow: none; background: transparent; }
.shell:has(.stage:not([hidden])) .number-input button + * , .shell:has(.stage:not([hidden])) .number-input * + button { border-left: 2px solid var(--line); }

/* Sheets and the inbox: the same paper, ink edge and hard shadow as the cards, unread alerts marked in tomato */
dialog.sheet { background: var(--sheet); color: var(--line); border: 2px solid var(--line); border-radius: 6px; box-shadow: 6px 6px 0 var(--line); }
dialog.sheet .sheet-head h2 { font: 900 clamp(26px, 3vw, 34px)/1 var(--font-display); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; text-transform: uppercase; }
dialog.sheet :is(button, a.button):not(.primary) { background: transparent; color: var(--line); box-shadow: inset 0 0 0 2px var(--line); }
.inbox-item { background: var(--card); border: 2px solid var(--line); border-radius: 6px; box-shadow: 3px 3px 0 var(--line); }
.inbox-item.inbox-unread { border-color: var(--line); box-shadow: 3px 3px 0 var(--color-tomate); border-left: 8px solid var(--color-tomate); }
.inbox-when { color: color-mix(in oklab, var(--line) 70%, transparent); }

.bar .session[hidden] + .sound-toggle { margin-left: auto; }
.bar .session:not([hidden]) ~ .sound-toggle { display: none; }
:is(.sound-toggle, .sound-setting)[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--color-primary); }

@property --blot { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.landing .how-right .how-next { position: absolute; inset: 0; opacity: 1; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M88.2 50.0 L90.1 53.5 L93.8 57.7 L90.2 60.8 L98.8 67.8 L83.1 65.5 L80.6 67.6 L74.5 67.1 L73.0 69.3 L69.6 69.6 L68.3 71.8 L67.9 75.6 L67.0 79.5 L66.7 85.8 L60.8 79.8 L58.1 80.3 L54.8 77.3 L52.2 75.7 L50.0 79.1 L47.7 76.5 L44.1 83.6 L40.9 84.1 L34.1 93.8 L32.6 87.2 L28.0 88.2 L27.2 82.6 L24.5 80.4 L23.3 76.7 L23.4 72.3 L21.3 70.1 L21.4 66.5 L11.0 68.2 L14.5 62.9 L15.0 59.4 L16.4 55.9 L17.4 52.8 L21.3 50.0 L25.1 47.8 L24.7 45.5 L25.6 43.5 L16.5 37.8 L23.4 37.6 L20.0 32.7 L19.7 28.8 L22.0 26.5 L21.4 21.4 L27.2 22.8 L29.4 20.6 L31.6 18.1 L31.2 9.7 L38.2 17.5 L39.7 11.7 L42.7 8.6 L46.3 8.1 L50.0 6.9 L53.3 12.0 L56.4 13.9 L58.3 18.9 L63.3 13.5 L61.7 24.9 L63.9 26.0 L65.2 28.3 L69.0 27.4 L70.3 29.7 L75.8 28.4 L77.8 30.5 L80.5 32.4 L88.8 31.9 L78.7 39.5 L81.2 41.7 L80.1 44.7 L85.4 46.9Z'/%3E%3Ccircle cx='86.3' cy='74.8' r='3.2'/%3E%3Ccircle cx='24.1' cy='85.6' r='2.4'/%3E%3Ccircle cx='18.1' cy='19.7' r='3.6'/%3E%3Ccircle cx='74.4' cy='13.4' r='2.2'/%3E%3C/svg%3E") center / var(--blot) var(--blot) no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M88.2 50.0 L90.1 53.5 L93.8 57.7 L90.2 60.8 L98.8 67.8 L83.1 65.5 L80.6 67.6 L74.5 67.1 L73.0 69.3 L69.6 69.6 L68.3 71.8 L67.9 75.6 L67.0 79.5 L66.7 85.8 L60.8 79.8 L58.1 80.3 L54.8 77.3 L52.2 75.7 L50.0 79.1 L47.7 76.5 L44.1 83.6 L40.9 84.1 L34.1 93.8 L32.6 87.2 L28.0 88.2 L27.2 82.6 L24.5 80.4 L23.3 76.7 L23.4 72.3 L21.3 70.1 L21.4 66.5 L11.0 68.2 L14.5 62.9 L15.0 59.4 L16.4 55.9 L17.4 52.8 L21.3 50.0 L25.1 47.8 L24.7 45.5 L25.6 43.5 L16.5 37.8 L23.4 37.6 L20.0 32.7 L19.7 28.8 L22.0 26.5 L21.4 21.4 L27.2 22.8 L29.4 20.6 L31.6 18.1 L31.2 9.7 L38.2 17.5 L39.7 11.7 L42.7 8.6 L46.3 8.1 L50.0 6.9 L53.3 12.0 L56.4 13.9 L58.3 18.9 L63.3 13.5 L61.7 24.9 L63.9 26.0 L65.2 28.3 L69.0 27.4 L70.3 29.7 L75.8 28.4 L77.8 30.5 L80.5 32.4 L88.8 31.9 L78.7 39.5 L81.2 41.7 L80.1 44.7 L85.4 46.9Z'/%3E%3Ccircle cx='86.3' cy='74.8' r='3.2'/%3E%3Ccircle cx='24.1' cy='85.6' r='2.4'/%3E%3Ccircle cx='18.1' cy='19.7' r='3.6'/%3E%3Ccircle cx='74.4' cy='13.4' r='2.2'/%3E%3C/svg%3E") center / var(--blot) var(--blot) no-repeat; }
.ticker { display: inline-flex; font-variant-numeric: tabular-nums; }
.tick-digit { display: inline-block; height: 1em; overflow: hidden; }
.tick-digit > span { display: block; line-height: 1; transition: translate var(--duration-slow) var(--ease-emphasized); }
.calc-figure .data { line-height: 1; }

/* Landing reveals: each block plays once when it first comes into view, after the loader; reduced motion shows the final state */
@media (prefers-reduced-motion: no-preference) {
  .land-hero[data-reveal] :is(h2, .land-lead, .land-actions) { clip-path: inset(0 0 100% 0); translate: 0 var(--rise); transition: clip-path var(--duration-slow) var(--ease-emphasized), translate var(--duration-slow) var(--ease-emphasized); }
  .land-hero[data-reveal] .land-lead { transition-delay: calc(var(--stagger) * 2); }
  .land-hero[data-reveal] .land-actions { transition-delay: calc(var(--stagger) * 4); clip-path: inset(-8px -8px 100% -8px); }
  :root[data-ready] .land-hero.shown :is(h2, .land-lead) { clip-path: inset(-0.4em -0.2em -0.3em -0.2em); translate: 0 0; }
  :root[data-ready] .land-hero.shown .land-actions { clip-path: inset(-8px); translate: 0 0; }
  .land-vignette[data-reveal] img, .how-right[data-reveal] .how-scene:not(.how-next) { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M88.2 50.0 L90.1 53.5 L93.8 57.7 L90.2 60.8 L98.8 67.8 L83.1 65.5 L80.6 67.6 L74.5 67.1 L73.0 69.3 L69.6 69.6 L68.3 71.8 L67.9 75.6 L67.0 79.5 L66.7 85.8 L60.8 79.8 L58.1 80.3 L54.8 77.3 L52.2 75.7 L50.0 79.1 L47.7 76.5 L44.1 83.6 L40.9 84.1 L34.1 93.8 L32.6 87.2 L28.0 88.2 L27.2 82.6 L24.5 80.4 L23.3 76.7 L23.4 72.3 L21.3 70.1 L21.4 66.5 L11.0 68.2 L14.5 62.9 L15.0 59.4 L16.4 55.9 L17.4 52.8 L21.3 50.0 L25.1 47.8 L24.7 45.5 L25.6 43.5 L16.5 37.8 L23.4 37.6 L20.0 32.7 L19.7 28.8 L22.0 26.5 L21.4 21.4 L27.2 22.8 L29.4 20.6 L31.6 18.1 L31.2 9.7 L38.2 17.5 L39.7 11.7 L42.7 8.6 L46.3 8.1 L50.0 6.9 L53.3 12.0 L56.4 13.9 L58.3 18.9 L63.3 13.5 L61.7 24.9 L63.9 26.0 L65.2 28.3 L69.0 27.4 L70.3 29.7 L75.8 28.4 L77.8 30.5 L80.5 32.4 L88.8 31.9 L78.7 39.5 L81.2 41.7 L80.1 44.7 L85.4 46.9Z'/%3E%3Ccircle cx='86.3' cy='74.8' r='3.2'/%3E%3Ccircle cx='24.1' cy='85.6' r='2.4'/%3E%3Ccircle cx='18.1' cy='19.7' r='3.6'/%3E%3Ccircle cx='74.4' cy='13.4' r='2.2'/%3E%3C/svg%3E") center / var(--blot) var(--blot) no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M88.2 50.0 L90.1 53.5 L93.8 57.7 L90.2 60.8 L98.8 67.8 L83.1 65.5 L80.6 67.6 L74.5 67.1 L73.0 69.3 L69.6 69.6 L68.3 71.8 L67.9 75.6 L67.0 79.5 L66.7 85.8 L60.8 79.8 L58.1 80.3 L54.8 77.3 L52.2 75.7 L50.0 79.1 L47.7 76.5 L44.1 83.6 L40.9 84.1 L34.1 93.8 L32.6 87.2 L28.0 88.2 L27.2 82.6 L24.5 80.4 L23.3 76.7 L23.4 72.3 L21.3 70.1 L21.4 66.5 L11.0 68.2 L14.5 62.9 L15.0 59.4 L16.4 55.9 L17.4 52.8 L21.3 50.0 L25.1 47.8 L24.7 45.5 L25.6 43.5 L16.5 37.8 L23.4 37.6 L20.0 32.7 L19.7 28.8 L22.0 26.5 L21.4 21.4 L27.2 22.8 L29.4 20.6 L31.6 18.1 L31.2 9.7 L38.2 17.5 L39.7 11.7 L42.7 8.6 L46.3 8.1 L50.0 6.9 L53.3 12.0 L56.4 13.9 L58.3 18.9 L63.3 13.5 L61.7 24.9 L63.9 26.0 L65.2 28.3 L69.0 27.4 L70.3 29.7 L75.8 28.4 L77.8 30.5 L80.5 32.4 L88.8 31.9 L78.7 39.5 L81.2 41.7 L80.1 44.7 L85.4 46.9Z'/%3E%3Ccircle cx='86.3' cy='74.8' r='3.2'/%3E%3Ccircle cx='24.1' cy='85.6' r='2.4'/%3E%3Ccircle cx='18.1' cy='19.7' r='3.6'/%3E%3Ccircle cx='74.4' cy='13.4' r='2.2'/%3E%3C/svg%3E") center / var(--blot) var(--blot) no-repeat; transition: --blot calc(var(--duration-slow) * 2.4) cubic-bezier(.45, 0, .25, 1); }
  :root[data-ready] :is(.land-vignette, .how-right).shown img:not(.how-next) { --blot: 340%; }
  .land-vignette[data-reveal] .land-label { opacity: 0; scale: 0.6; transition: opacity var(--duration-fast) var(--ease-standard), scale var(--duration-base) var(--ease-spring); }
  :root[data-ready] .land-vignette.shown .land-label { opacity: 1; scale: 1; transition-delay: calc(var(--duration-slow) * 1.6); }
  :root[data-ready] .land-vignette.shown .land-label.l2 { transition-delay: calc(var(--duration-slow) * 1.6 + var(--stagger) * 3); }
  :root[data-ready] .land-vignette.shown .land-label.l3 { transition-delay: calc(var(--duration-slow) * 1.6 + var(--stagger) * 6); }
  .kit[data-reveal] .kit-medallion { opacity: 0; scale: 1.35; rotate: -8deg; transition: opacity var(--duration-fast) var(--ease-standard), scale var(--duration-base) var(--ease-spring), rotate var(--duration-base) var(--ease-spring); }
  :root[data-ready] .kit.shown .kit-medallion { opacity: 1; scale: 1; rotate: 0deg; transition-delay: calc(var(--i) * var(--stagger) * 3); }
  .pasto-photo[data-reveal] img { clip-path: inset(50% 0 50% 0); transition: clip-path var(--duration-shutter) var(--ease-emphasized); }
  :root[data-ready] .pasto-photo.shown img { clip-path: inset(0); }
  .land-wordmark[data-reveal] span { display: inline-block; translate: 0 0.9em; transition: translate var(--duration-slow) var(--ease-emphasized); }
  :root[data-ready] .land-wordmark.shown span { translate: 0 0; transition-delay: calc(var(--i) * var(--stagger)); }
}

/* The ragged header edge bleeds sideways; on phones the column has no box to clip it, so the shell does and the page never widens */
.shell { overflow-x: clip; }
@media (max-width: 480px) {
  .bar .wordmark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::after { animation: none; border-color: var(--spin, var(--color-text)); opacity: 0.6; }
}

/* Landing title letter by letter, and a wordmark that ripples under the pointer */
.title-word { display: inline-block; white-space: nowrap; }
.title-letters span span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .land-hero[data-reveal] .title-letters span span { opacity: 0; translate: 0 0.5em; rotate: 6deg; transition: opacity var(--duration-base) var(--ease-standard), translate var(--duration-slow) var(--ease-spring), rotate var(--duration-slow) var(--ease-spring); transition-delay: calc(var(--i) * 28ms); }
  :root[data-ready] .land-hero.shown .title-letters span span { opacity: 1; translate: 0 0; rotate: 0deg; }
  .land-wordmark span { transition: translate var(--duration-base) var(--ease-spring), color var(--duration-base) var(--ease-standard); }
  .land-wordmark:hover span { translate: 0 -0.08em; }
  .land-wordmark span:hover { translate: 0 -0.22em; color: var(--color-tomate-hondo); }
  .kit-medallion { transition: scale var(--duration-base) var(--ease-spring), box-shadow var(--duration-base) var(--ease-standard); }
  .kit-part:hover .kit-medallion { scale: 1.06; box-shadow: 0 0 0 3px var(--paper), 0 0 0 7px var(--ink-color), 0 0 0 9px var(--paper); }
}
.landing .land-vignette img { mix-blend-mode: darken; }

/* Ink reveal canvases laid over their pictures; the picture keeps its place and its text underneath */
.ink-reveal { position: absolute; z-index: 0; display: block; pointer-events: none; }
img.inked { opacity: 0; }
.kit-medallion { position: relative; }
.land-vignette .land-label { z-index: 1; }
.landing .how-right .ink-reveal { box-shadow: 0 0 0 3px var(--ink-color); }

/* How it works: an ink line runs through the four steps and each step is stamped as it is reached */
.how-track { position: relative; height: 44px; border-radius: var(--radius-full); }
.how-line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: color-mix(in srgb, var(--ink-color) 16%, transparent); overflow: hidden; }
.how-line > span { display: block; height: 100%; background: var(--ink-color); transform: scaleX(var(--fill, 0)); transform-origin: left center; }
.how-node { position: absolute; top: 50%; left: calc(var(--at) * 100%); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2.5px var(--ink-color); transition: background-color var(--duration-fast) var(--ease-standard), scale var(--duration-slow) var(--ease-spring); }
.how-node.reached { background: var(--ink-color); scale: 1.3; }
.how-track input[type="range"], .calc-ruler input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab; }
.how-track:focus-within, .calc-ruler:focus-within { outline: 3px solid currentColor; outline-offset: 6px; }
.landing .how-names { position: relative; display: block; height: 1.5em; }
.landing .how-names li { position: absolute; left: calc(var(--at) * 100%); translate: -50% 0; text-align: center; white-space: nowrap; transition: color var(--duration-base) var(--ease-standard); }
.landing .how-names li:first-child { translate: 0 0; }
.landing .how-names li:last-child { translate: -100% 0; }

/* The savings ruler: kilo and half-kilo marks, paper filling it as the kilos grow, and a tab that rides on top */
.calc-control { display: grid; gap: calc(var(--space-xl) + 8px); max-width: 720px; font-size: 18px; font-weight: 600; }
.calc-ruler { position: relative; height: 64px; margin-top: 52px; border-radius: 6px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--paper) 70%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 80%, transparent) 2px, transparent 2px) 0 100% / calc(100% / 9.5) 55% repeat-x,
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 55%, transparent) 1.5px, transparent 1.5px) 0 100% / calc(100% / 19) 28% repeat-x; }
.calc-fill { position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--fill, 0) * 100%); border-radius: 6px 0 0 6px; background: var(--paper); mix-blend-mode: normal; box-shadow: 4px 0 0 var(--line); }
.calc-tab { position: absolute; bottom: calc(100% + 12px); left: calc(var(--fill, 0) * 100%); translate: -50% 0; padding: 6px 14px; border-radius: var(--radius-full); background: var(--paper); color: var(--color-tomate-hondo); font: 700 20px/1 var(--font-body); white-space: nowrap; pointer-events: none; box-shadow: 3px 3px 0 var(--line); }
.calc-tab::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {
  .land-how[data-scrolly] { min-height: 330vh; display: block; align-content: start; }
  .land-calc[data-scrolly] { min-height: 260vh; display: block; align-content: start; }
  [data-scrolly] > .scrolly-stage { position: sticky; top: var(--bar-height); min-height: calc(100svh - var(--bar-height)); align-content: center; padding-block: clamp(16px, 4svh, 48px); box-sizing: border-box; }
}

/* Shell v3: one top bar over the stage and the panel. Brand, the five sections with an ink blot under the current one, and the bell, settings
   and account on the right; on phones the sections become a bar fixed to the bottom, in reach of the thumb */
:root { --bar-height: 64px; --tabbar-height: 68px; }
.bar { grid-column: 1 / -1; min-height: var(--bar-height); gap: var(--space-s); background: var(--sheet); border-bottom: 2px solid var(--line); }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon .hatch { stroke-width: 1; opacity: 0.55; }
.tabs { position: relative; isolation: isolate; margin-inline: auto; padding: 4px; gap: 2px; border-radius: var(--radius-full); background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.tabs a { position: relative; z-index: 1; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; background: transparent; transition: color var(--duration-base) var(--ease-standard); }
.tabs a:hover { background: transparent; }
.tabs a:hover .icon { translate: 0 -1px; }
.tabs a .icon { transition: translate var(--duration-fast) var(--ease-standard); }
.tabs a[aria-current="page"] { background: transparent; color: var(--chapter-ink); }
.tabs a:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
.tabs-blot { position: absolute; z-index: 0; left: 0; top: 0; width: var(--blot-w, 0); height: var(--blot-h, 0); translate: var(--blot-x, 0) var(--blot-y, 0); border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%; background: var(--chapter); opacity: var(--blot-on, 0); pointer-events: none; }
.tabs-blot.moving { transition: translate var(--duration-spring) var(--ease-spring), width var(--duration-spring) var(--ease-spring), background-color var(--duration-slow) var(--ease-standard), opacity var(--duration-base) var(--ease-standard); }
.session { margin-left: 0; gap: 4px; color: var(--color-text); }
.live { display: inline-flex; align-items: center; gap: 6px; margin-right: var(--space-xs); color: var(--color-text-weak); font-size: 13px; }
.live[data-state="on"]::before { background: var(--color-cilantro); }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--line); box-shadow: none; text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard); }
.icon-button:hover { background: var(--card); }
.icon-button:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
.icon-button[aria-current="page"], .icon-button[aria-expanded="true"] { background: var(--line); color: var(--sheet); }
.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); background: var(--color-tomate); color: var(--color-arroz); box-shadow: 0 0 0 2px var(--sheet); font: 700 11px/18px var(--font-body); font-variant-numeric: tabular-nums; text-align: center; }
/* Account menu: the household on top, then one row per preference (label left, control right), and sign out on its own below a hairline.
   The height is pinned to the content so a tall popover box never stretches the rows. */
.account-menu { position: fixed; inset: auto; margin: 0; display: none; width: min(300px, calc(100vw - 16px)); height: max-content; max-height: calc(100dvh - var(--bar-height) - 16px); overflow: auto; padding: 0; background: var(--sheet); color: var(--line); border: 2px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-raised); }
.account-menu:popover-open { display: flex; flex-direction: column; }
.account-menu .household { display: block; margin: 0; padding: var(--space-m) var(--space-m) var(--space-s); font: 900 var(--size-h4)/1.15 var(--font-display); overflow-wrap: anywhere; }
.account-menu .menu-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); min-height: 60px; padding: 0 var(--space-m); border-top: 1px solid var(--color-border); font: 600 var(--size-body)/1.2 var(--font-body); }
.account-menu .language { display: inline-flex; flex: none; }
.account-menu :is(.sound-toggle, [data-signout]) { position: relative; isolation: isolate; display: flex !important; align-items: center; width: 100%; min-height: 60px; margin: 0; padding: 0 var(--space-m); border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; color: inherit; font: 600 var(--size-body)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.account-menu :is(.sound-toggle, [data-signout]):hover { background: var(--color-step); }
.account-menu .sound-toggle::after { content: ""; position: absolute; right: var(--space-m); top: 50%; width: 44px; height: 26px; margin-top: -13px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 2px currentColor; transition: background-color var(--duration-base) var(--ease-standard); }
.account-menu .sound-toggle::before { content: ""; position: absolute; z-index: 1; right: calc(var(--space-m) + 22px); top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: currentColor; transition: translate var(--duration-base) var(--ease-spring), background-color var(--duration-base) var(--ease-standard); }
.account-menu .sound-toggle[aria-pressed="true"]::after { background: currentColor; }
.account-menu .sound-toggle[aria-pressed="true"]::before { translate: 18px 0; background: var(--sheet); }
.account-menu [data-signout] { margin-top: var(--space-xs); }
@media (prefers-reduced-motion: no-preference) {
  .account-menu:popover-open { animation: menu-in var(--duration-base) var(--ease-spring); }
}
@keyframes menu-in { from { opacity: 0; translate: 0 -6px; scale: 0.98; } }
@media (min-width: 1024px) {
  .shell { grid-template-rows: auto minmax(0, 1fr); }
  .bar { position: sticky; top: 0; z-index: 8; padding-inline: var(--space-m); }
  .shell .stage { top: var(--bar-height); height: calc(100vh - var(--bar-height)); }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .bar .live { font-size: 0; margin-right: 0; }
  .bar .tabs a { padding-inline: 12px; }
}
@media (max-width: 1023px) {
  .bar .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; background: var(--sheet); box-shadow: inset 0 2px 0 var(--line); }
  .bar .tabs[hidden] { display: none; }
  .bar .tabs a { flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 0 2px; font-size: 13px; }
  .bar .session { margin-left: auto; }
  .shell:has(.tabs:not([hidden])) main { padding-bottom: calc(var(--space-xxl) + var(--tabbar-height) + env(safe-area-inset-bottom)); }
  .shell:has(.tabs:not([hidden])) ~ .toast { bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + var(--space-s)); }
}

/* Contextual fridge: on routes that don't use it, it steps aside (desktop) or folds away (phones) */
@media (min-width: 1024px) {
  .shell:has(.stage:not(.has-three):not([hidden])) { transition: grid-template-columns var(--duration-spring) var(--ease-spring); }
  .shell[data-layout="aside"]:has(.stage:not(.has-three):not([hidden])) { grid-template-columns: minmax(300px, 28vw) minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .shell[data-layout="aside"] .stage { display: none; }
}

/* Shelf rows: the food's glyph, name and grams, with one line about when it goes off; choosing a row unfolds its actions */
.food-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.food-row { border-top: 1px solid var(--color-border); scroll-margin: var(--space-xl); }
.food-row:first-child { border-top: 0; }
.food-row-head { width: 100%; min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "glyph name grams" "glyph when pill"; align-items: center; column-gap: var(--space-s); row-gap: 2px; padding: var(--space-xs) 4px; border: 0; border-radius: 4px; background: transparent; color: var(--line); text-align: left; cursor: pointer; }
.food-row-head:disabled { cursor: default; opacity: 1; }
.food-row-head:hover { background: transparent; }
.food-row-head:hover .item-name { text-decoration: underline 2px; text-underline-offset: 3px; }
.food-row-head:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
.food-row-head > i { grid-area: glyph; justify-self: center; }
.food-row-head .item-name { grid-area: name; font-size: var(--size-h4); font-weight: 600; }
.food-row-head .value { grid-area: grams; font: 700 22px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.food-row-head .row-expiry { grid-area: when; font-size: var(--size-small); color: var(--color-text-weak); }
.row-expiry.attention { color: var(--color-attention-text); font-weight: 700; }
.food-row-head .status { grid-area: pill; justify-self: end; }
.row-actions { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-slow) var(--ease-spring); }
.row-actions > div { min-height: 0; overflow: hidden; }
.food-row[data-open] .row-actions { grid-template-rows: 1fr; }
.row-actions .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); padding: 4px 4px var(--space-s) 56px; }
.card-actions .grams { width: 7ch; }
.portions { display: inline-flex; gap: 4px; }
.portions .chip-button { min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-full); font-weight: 700; }
.portions .chip-button[aria-pressed="true"] { background: var(--line); color: var(--sheet); }
button.danger[data-hold]::after { background: var(--color-tomate); opacity: 0.9; }
.food-row.picked { animation: picked calc(var(--duration-slow) * 3) var(--ease-emphasized); }
@media (prefers-reduced-motion: reduce) { .food-row.picked { animation: none; box-shadow: 0 0 0 4px var(--color-papa); } }
@media (max-width: 760px) { .row-actions .card-actions { padding-left: 4px; } }

/* Add-food sheet as a stepper: a progress rule, one step at a time entering from its side, back and next at the bottom */
.stepper-head { display: grid; gap: 6px; font-size: var(--size-small); font-weight: 700; }
.stepper-bar { height: 6px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.stepper-bar > span { display: block; height: 100%; width: calc(var(--progress, 0) * 100%); background: var(--line); transition: width var(--duration-slow) var(--ease-spring); }
.add-food .step[data-enter="next"] { animation: step-in var(--duration-slow) var(--ease-spring) both; --step-from: 24px; }
.add-food .step[data-enter="previous"] { animation: step-in var(--duration-slow) var(--ease-spring) both; --step-from: -24px; }
@keyframes step-in { from { opacity: 0; translate: var(--step-from) 0; } }
.stepper-nav { display: flex; gap: var(--space-xs); justify-content: space-between; position: sticky; bottom: 0; padding-top: var(--space-s); background: var(--sheet); }
.stepper-nav [data-step-back][hidden] + * { margin-left: auto; }
.stepper-nav > :is([data-step-next], [type=submit]) { margin-left: auto; }

/* Market notebook: the list first; a ticked food gets an ink check and a hand-ruled strike before it moves to the cart */
.market-row .check { position: relative; }
.market-row .check input { appearance: none; flex: none; width: 28px; height: 28px; margin: 0; border: 2px solid var(--line); border-radius: 4px; background: var(--card); cursor: pointer; }
.market-row .check input:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
.market-row .tick { position: absolute; left: 2px; top: 50%; translate: 0 -50%; width: 24px; height: 24px; fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; pointer-events: none; transition: stroke-dashoffset var(--duration-slow) var(--ease-emphasized); }
.market-row .check input:checked + .tick { stroke-dashoffset: 0; }
.market-row .item-name { text-decoration: none; background: linear-gradient(var(--line), var(--line)) 0 58% / 0% 2px no-repeat; transition: background-size var(--duration-slow) var(--ease-emphasized) 90ms; }
.market-row:has(input:checked) .item-name { background-size: 100% 2px; }
.market-row.bought { color: var(--color-text-weak); }
.market-row .item-actions { display: flex; align-items: center; gap: var(--space-xs); }
.notepad-add { margin-top: var(--space-m); font: 700 var(--size-small)/1.3 var(--font-body); }
.market-add { align-items: end; }

/* Numbers: the household line, and daily bars that grow from the axis (the eaten ones up, the wasted ones down) */
.together { font-size: var(--size-h4); line-height: var(--leading-h4); }
.together b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.yours { color: var(--color-text-weak); }
@media (prefers-reduced-motion: no-preference) {
  .chart rect { transform-box: fill-box; animation: bar-grow var(--duration-slow) var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 12ms); }
  .chart rect:is(.eaten, .rescued) { transform-origin: 50% 100%; }
  .chart rect.wasted { transform-origin: 50% 0; }
}
@keyframes bar-grow { from { scale: 1 0; } }

/* Chef: what it sees as plain rows, a paper composer above the phone tab bar, the cooking card kept in ink and in view while cooking,
   answers written in from the top, and answered confirmations left as quiet lines */
.sees-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 var(--space-m); }
.sees-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "glyph name grams" "glyph when when"; align-items: center; column-gap: 8px; min-height: 52px; padding: 6px 0; border-radius: 0; background: transparent; border-bottom: 1px solid var(--color-border); }
.sees-list li .food { grid-area: glyph; }
.sees-list li .item-name { grid-area: name; font-weight: 600; }
.sees-list li .data { grid-area: grams; }
.sees-list li .sees-when { grid-area: when; }
.sees-list .soon { background: transparent; }
.ask { background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
@media (max-width: 1023px) { .ask { bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + var(--space-xs)); z-index: 3; } }
.shell:has(.stage:not([hidden])) .cooking { background: var(--line); color: var(--sheet); box-shadow: 4px 4px 0 var(--color-papa); }
.cooking { position: sticky; top: var(--space-xs); z-index: 2; }
@media (min-width: 1024px) { .cooking { top: calc(var(--bar-height) + var(--space-xs)); } }
.chat .answer.fresh > p { -webkit-mask: linear-gradient(#000 45%, transparent 55%) 0 100% / 100% 240% no-repeat; mask: linear-gradient(#000 45%, transparent 55%) 0 100% / 100% 240% no-repeat; animation: write-in var(--duration-spring) var(--ease-emphasized) forwards; }
@keyframes write-in { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.resolved-line { display: grid; gap: 2px; margin: 0; color: var(--color-text-weak); }
.resolved.done .resolved-line > :last-child::before { content: "\2713  "; color: var(--color-positive-text); font-weight: 700; }

/* Ajustes: an index of the groups, and a stamp that confirms each save beside its button */
.list > li.member-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-xs); }
.member-row small { color: var(--color-text-weak); }
.chips-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.row-form .grow { flex: 1 1 220px; min-width: 0; }
.invite-link { margin-block: var(--space-xs); }
.review-note { border-color: var(--color-tomate); }
.cooking-timer { font-size: var(--size-h3); font-variant-numeric: tabular-nums; margin: 0; }
.settings-index { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.settings-index .chip-button { min-height: 44px; padding: 0 var(--space-s); }
.saved-stamp { justify-self: start; align-self: center; display: inline-block; padding: 4px 10px; border: 2px solid currentColor; border-radius: 4px; color: var(--color-positive-text); font-weight: 700; font-size: var(--size-small); rotate: -3deg; }
@media (prefers-reduced-motion: no-preference) { .saved-stamp { animation: stamp-in var(--duration-base) var(--ease-spring); } }
@keyframes stamp-in { from { opacity: 0; scale: 1.4; rotate: -10deg; } }
@media (max-width: 1023px) { .settings-index { display: none; } }

/* Bandeja: under the bell on desktop, a sheet on phones; each alert is a sentence with its glyph and one action */
@media (min-width: 761px) {
  dialog.sheet.inbox-sheet { margin: calc(var(--bar-height) + 8px) var(--space-m) auto auto; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - var(--bar-height) - 32px); }
}
.inbox-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-s); align-items: start; touch-action: pan-y; transition: translate var(--duration-base) var(--ease-spring); }
.inbox-glyph { display: grid; place-items: center; width: 32px; height: 32px; }
.inbox-text { display: grid; gap: 4px; }
.inbox-line { display: block; margin: 0; }
.inbox-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: 4px; }
.inbox-item.inbox-unread { border-left: 2px solid var(--line); box-shadow: 3px 3px 0 var(--color-tomate); }
.inbox-unread .inbox-glyph { color: var(--color-attention-text); }

/* Microinteractions: a chosen chip is inked in with a small stamp, the current section's icon hops, the bell swings from its top */
@media (prefers-reduced-motion: no-preference) {
  .chip input:checked + span { animation: chip-ink var(--duration-base) var(--ease-spring); }
  .tabs a[aria-current="page"] .icon { animation: tab-hop var(--duration-slow) var(--ease-spring); }
}
@keyframes chip-ink { from { scale: 0.86; border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%; } }
@keyframes tab-hop { 40% { translate: 0 -4px; rotate: -8deg; } }
[data-inbox] .icon { transform-origin: 50% 2px; }

/* Empty and failed states carry an engraved drawing; loading placeholders are hatched like an engraving and the hatching drifts */
.art { display: block; width: 112px; height: 112px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .hatch { stroke-width: 1; opacity: 0.5; }
.empty .art, .inbox-empty .art, .chef-sees .art { margin: 0 auto var(--space-s); color: var(--color-text-weak); }
.empty.quiet { display: grid; justify-items: center; text-align: center; padding: var(--space-m) 0; }
.inbox-empty { display: grid; justify-items: center; text-align: center; gap: var(--space-xs); padding: var(--space-m) 0; }
:is(.skel-line, .skel-photo) { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--line) 16%, transparent) 0 1.5px, transparent 1.5px 7px) 0 0 / 28px 28px, var(--skeleton); }
@media (prefers-reduced-motion: no-preference) {
  :is(.skel-line, .skel-photo) { animation: hatch-drift calc(var(--duration-spring) * 2) linear infinite; }
}
@keyframes hatch-drift { to { background-position: 28px 0, 0 0; } }

/* Night paper: the stage keeps the section tint over the dark sheet, the fridge stays a white object drawn in daylight ink, and engraved photos are lit instead of multiplied */
:root[data-app][data-theme="dark"] .stage { --tint: color-mix(in oklab, var(--chapter) 22%, var(--color-bg)); }
:root[data-app][data-theme="dark"] .fridge { --color-bg: var(--color-papel); --line: var(--color-tinta); --card: var(--color-carta); --color-text: var(--color-tinta); --color-text-weak: var(--color-piedra); color: var(--color-tinta); }
:root[data-app][data-theme="dark"] .shell:has(.stage:not([hidden])) .dish-photo:not(.dish-engraved) img { filter: grayscale(1) contrast(1.2) brightness(0.9); mix-blend-mode: normal; }

/* Theme toggle: the sun shows on night paper (to go back to day) and the moon on day paper; the new paper spreads from the button through a
   view transition, so the old one stays still underneath instead of cross-fading. */
.theme-toggle .icon { grid-area: 1 / 1; transition: rotate var(--duration-spring) var(--ease-spring), scale var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard); }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { opacity: 0; scale: 0.5; rotate: -90deg; }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 1; scale: 1; rotate: 0deg; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* The server is slow or asleep: a running line along the top of the window, then a note; when it gives up, the note and a retry. */
.net { position: fixed; z-index: 60; inset: 0 0 auto; pointer-events: none; }
.net-line { display: block; height: 3px; background: linear-gradient(90deg, transparent, var(--color-primary) 30%, var(--color-primary) 70%, transparent) 0 0 / 40% 100% no-repeat; opacity: 0; transition: opacity var(--duration-base) var(--ease-standard); }
.net:not([data-state="idle"]):not([data-state="failed"]) .net-line { opacity: 1; animation: net-run 1.2s var(--ease-standard) infinite; }
@keyframes net-run { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.net-note:empty { display: none; }
.net-note { justify-self: center; width: fit-content; max-width: calc(100% - 32px); margin: var(--space-s) auto 0; padding: 10px 18px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); box-shadow: inset 0 0 0 2px var(--color-text), 4px 4px 0 var(--color-text); font-weight: 600; text-align: center; }
.net-retry { display: none; pointer-events: auto; margin: var(--space-xs) auto 0; }
.net[data-state="failed"] .net-retry { display: block; }
.net[data-state="failed"] .net-note { pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .net:not([data-state="idle"]):not([data-state="failed"]) .net-line { animation: none; background-size: 100% 100%; opacity: 0.6; }
}

/* The first layout of a visit, and the switch to the 3D fridge once it is ready, take their columns at once. */
.shell[data-settling] { transition: none !important; }

/* The fridge sheet: a front view drawn in ink that follows every change, then the parts as steppers. */
.shape-drawing { display: block; width: 100%; max-width: 260px; height: auto; margin-inline: auto; }
.shape-drawing .body, .shape-drawing .door { fill: var(--color-surface); stroke: var(--color-text); stroke-width: 2; }
.shape-drawing .freezer { fill: color-mix(in oklab, var(--color-text) 14%, var(--color-surface)); stroke: var(--color-text); stroke-width: 1.5; }
.shape-drawing .drawer { fill: none; stroke: var(--color-text); stroke-width: 1.5; }
.shape-drawing .shelf { stroke: var(--color-text); stroke-width: 2; stroke-linecap: round; }
.shape-form { display: grid; gap: var(--space-m); }
.shape-counts, .shape-size { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-s); }
.shape-size { border: 0; padding: 0; margin: 0; }
.shape-counts .number-input, .shape-size .number-input { display: flex; width: 100%; }
.shape-counts .number-input input, .shape-size .number-input input { flex: 1 1 0; width: 0; }
.shape-size legend { font-weight: 600; margin-bottom: var(--space-xs); padding: 0; }
.shape-summary { display: flex; align-items: center; gap: var(--space-m); }
.shape-summary .shape-drawing { width: 120px; margin: 0; }

/* The drawn fridge in other shapes: no freezer door on a minibar or a single door, the freezer at the bottom, or beside it. */
.fridge .drawers { display: grid; gap: 4px; }
.fridge:is([data-type="MINIBAR"], [data-type="SINGLE_DOOR"]) .cabin { top: 0; height: 480px; border-radius: 20px; }
.fridge:is([data-type="MINIBAR"], [data-type="SINGLE_DOOR"]) .door { top: 0; height: 480px; }
.fridge[data-type="BOTTOM_FREEZER"] .cabin { top: 0; border-radius: 20px 20px 4px 4px; }
.fridge[data-type="BOTTOM_FREEZER"] .freezer { top: 348px; border-radius: 4px 4px 20px 20px; }
.fridge[data-type="BOTTOM_FREEZER"] .door { top: 0; }
.fridge[data-type="SIDE_BY_SIDE"] .freezer { width: 100px; height: 480px; border-radius: 20px 4px 4px 20px; }
.fridge[data-type="SIDE_BY_SIDE"] .cabin { left: 104px; width: 146px; top: 0; height: 480px; border-radius: 4px 20px 20px 4px; }
.fridge[data-type="SIDE_BY_SIDE"] .door { top: 0; height: 480px; }
@media (min-width: 1024px) {
  .fridge:is([data-type="MINIBAR"], [data-type="SINGLE_DOOR"], [data-type="BOTTOM_FREEZER"], [data-type="SIDE_BY_SIDE"]) .door { top: 0; }
  .fridge:is([data-type="MINIBAR"], [data-type="SINGLE_DOOR"], [data-type="SIDE_BY_SIDE"]) .door { height: 480px; }
  .fridge[data-type="SIDE_BY_SIDE"] .cabin { width: 146px; }
}
.fridge-hero [data-fridge-shape] { grid-column: 1; justify-self: start; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
