:root {
  --paper: #FBF7F0;
  --card: #FFFFFF;
  --ink: #17120D;
  --ink-soft: #5B5147;
  --ink-faint: #8A7F73;
  --line: #E4DACA;
  --accent: #B4472A;
  --accent-soft: #FBEDE7;
  --green: #2C6049;
  /* The voice button's own colour. It had been the house red, which is
     also the colour of the switch beside it saying NO, so two unrelated
     things on one screen read as one thing. Teal belongs to nothing else
     in the app. */
  --voice: #1B6670;
  --green-soft: #E8F1EC;
  --amber: #8A5A00;
  --amber-soft: #FDF2DC;
  --radius: 16px;
  --tap: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
}

body { padding-bottom: 96px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 18px 40px; }

h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 23px; margin-bottom: 4px; }
h3 { font-size: 19px; }

p { margin: 0 0 12px; }

.sub { color: var(--ink-soft); font-size: 16px; }
.faint { color: var(--ink-faint); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; }

/* ---------- header ---------- */
header {
  padding: 18px 18px 10px;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 21px; font-weight: 600; font-family: inherit; color: var(--ink);
  background: none; border: none; padding: 6px 2px; cursor: pointer; min-height: 44px;
}
.brand:active { opacity: 0.6; }
.brand span { color: var(--accent); }
/* The mark rides on the wordmark's baseline rather than in a flex row, so the
 * date on the other side of the header keeps its baseline alignment. Served
 * from img/ as the artifact's own file: a hotlinked mark renders nothing (§5). */
.brand-mark { height: 30px; width: auto; vertical-align: -8px; margin-right: 9px; }
/* The wordmark is the drawn one from the logo artwork rather than type set in
 * the page's own serif, so the app and the identity are the same thing. Both
 * are served from img/ as the artifact's own files (§5). */
.brand-word { height: 24px; width: auto; vertical-align: -3px; }
.tagline { font-size: 14px; color: var(--ink-faint); }

/* ---------- big home buttons ---------- */
.tiles { display: grid; gap: 14px; }
.tile {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: var(--tap);
}
.tile:active { background: #F6F1E8; }
.tile .t-title { font-size: 22px; font-weight: 600; display: block; }
.tile .t-sub { font-size: 16px; color: var(--ink-soft); display: block; margin-top: 3px; }
.tile.primary { background: var(--accent-soft); border-color: #EBCFC3; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 12px;
  /* THE FILLED BUTTON IS GREEN, NOT BLACK.
     The owner, 23 November: "remove black bg buttons, keep pastel shades and
     with black fonts." That was carried out on the chips below and nowhere
     else, so every primary button stayed black on cream — the case fixed,
     the kind missed. Settled 2 December: green, the colour already filling
     "Add a phone" and "Tick my staples", so the app has ONE filled colour
     rather than two with no rule behind which.
     Black was not wrong on contrast — it is the strongest thing on a cream
     page, which matters for a 79-year-old. Green on white is 7.4:1, well
     past the 4.5:1 floor, so the softer colour costs nothing that is owed. */
  border: 1.5px solid var(--green);
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
}
.btn:active { opacity: 0.85; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet { background: transparent; color: var(--ink-soft); border-color: transparent; min-height: 44px; padding: 8px 10px; font-size: 16px; font-weight: 500; text-decoration: underline; }
.btn.full { width: 100%; }
.btn.mic { background: var(--accent); border-color: var(--accent); }
.btn.mic.on { background: var(--green); border-color: var(--green); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

/* ---------- review rows ---------- */
.row {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.row.low { border-color: #E6C9A8; background: #FFFCF6; }
.row-top { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.row-label { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.row-name {
  font-size: 20px; font-weight: 600; font-family: inherit; color: var(--ink);
  width: 100%; padding: 10px 10px; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.row-name::placeholder { color: #BBAE9E; font-weight: 400; }
.row-name:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.fields { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select {
  font: inherit; font-size: 18px; padding: 10px 10px; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field input::placeholder { color: #BBAE9E; }
.field.unknown input { background: #FFFDF8; border-style: dashed; }
.del { background: transparent; border: none; color: var(--ink-faint); font-size: 26px; line-height: 1; padding: 6px 10px; cursor: pointer; min-height: 44px; }

.badge {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap;
}
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.low { background: var(--amber-soft); color: var(--amber); }
.badge.gone { background: #F3EDE4; color: var(--ink-faint); }
.badge.check { background: var(--accent-soft); color: var(--accent); }

/* ---------- larder list ---------- */
.lard { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.lard:last-child { border-bottom: none; }
.lard-l { display: flex; flex-direction: column; }
.lard-name { font-size: 19px; font-weight: 600; }
.lard-meta { font-size: 15px; color: var(--ink-faint); }
.lard-r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lard-qty { font-size: 18px; }
.lard-acts { display: flex; gap: 6px; margin-top: 4px; }
.mini {
  font: inherit; font-size: 15px; padding: 8px 12px; min-height: 40px;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink-soft); cursor: pointer;
}
.mini:active { background: #F6F1E8; }
.mini.danger { color: var(--accent); border-color: #EBCFC3; }
.lard { padding: 15px 0; }

.group-head { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 20px 0 2px; }

/* ---------- suggestions ---------- */
.sugg { border-left: 4px solid var(--green); padding: 12px 0 12px 14px; margin-bottom: 14px; }
.sugg.maybe { border-left-color: var(--amber); }
.sugg.short { border-left-color: var(--ink-faint); }
.sugg-name { font-size: 21px; font-weight: 600; }
.sugg-line { font-size: 17px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- misc ---------- */
.notice { font-size: 16px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); margin-bottom: 14px; }
.notice.good { background: var(--green-soft); color: var(--green); }
textarea {
  width: 100%; min-height: 120px; font: inherit; font-size: 19px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.hint { font-size: 15px; color: var(--ink-faint); margin-top: 8px; }
.back { background: none; border: none; font: inherit; font-size: 17px; color: var(--ink-soft); padding: 8px 0; cursor: pointer; min-height: 44px; }
.hidden { display: none !important; }
.listening { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--green); font-weight: 600; margin-top: 10px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.82); } }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ask { background: var(--accent-soft); border: 1.5px solid #EBCFC3; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  font: inherit; font-size: 16px; padding: 10px 18px; min-height: 48px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-soft); cursor: pointer; -webkit-appearance: none; appearance: none;
}
.chip:active { background: #F6F1E8; }
/* The chosen one, 23 November: "remove black bg buttons, keep pastel shades
   and with black fonts."

   The rule it has to keep obeying is the one from the red pen before it:
   a pale tint of the page's own colour is NOT a selected state — from arm's
   length two chips looked the same. So the tint alone cannot carry this.

   Three signals now say "chosen", and no single one of them is doing the
   work: a green tint that is clearly not the cream page, a full-strength
   green rule around it at twice the weight, and bold black text. It reads
   at a glance and in poor light, and it survives being photographed,
   printed, or seen by someone who cannot separate the two hues at all —
   the unchosen chip is white with a hairline, the chosen one is tinted
   with a heavy edge. */
.chip.sel {
  background: var(--green-soft);
  border: 3px solid var(--green);
  color: var(--ink);
  font-weight: 700;
  /* The border grew by 1.5px, so take it off the padding or the chip jumps
     when it is chosen. */
  padding: 8.5px 16.5px;
}
.chip.sel:active { background: #DCE9E1; }
.outcome { margin-top: 8px; color: var(--ink-soft); }
button { color: inherit; -webkit-appearance: none; appearance: none; }
.foot { text-align: center; font-size: 14px; color: var(--ink-faint); padding: 26px 0 10px; }

/* ---------- bottom action bar: the primary controls stay under the thumb ---------- */
.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--paper);
  border-top: 1.5px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(23, 18, 13, 0.07);
}
.bottombar .bar-btns { display: flex; gap: 10px; max-width: 524px; margin: 0 auto; }
.bottombar .bar-btns .btn { flex: 1; min-height: 62px; font-size: 20px; }
.bottombar .bar-state { max-width: 524px; margin: 0 auto; }
.bottombar .bar-state .listening { margin: 0 0 10px; justify-content: center; }
.bottombar .bar-state .waiting { margin: 0 0 10px; text-align: center; font-size: 15px; color: var(--ink-faint); }
.btn.mic[disabled] { opacity: 0.45; }

/* room for the bar */
#view-add, #view-welcome, #view-cookset { padding-bottom: 120px; }

/* ---------- save confirmation, rendered in place ---------- */
.saved-card { text-align: center; padding: 26px 20px; border-color: #BBD6C6; background: var(--green-soft); }
.saved-tick {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 30px; line-height: 54px;
}
.saved-card h2 { color: var(--green); }
.saved-card .btn-row { justify-content: center; }
.saved-card .btn { flex: 1; }

.sugg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sugg-mins { font-size: 14px; color: var(--ink-faint); white-space: nowrap; }

a.btn { text-decoration: none; }

.tick { display: flex; align-items: center; gap: 12px; padding: 13px 2px; font-size: 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tick:last-child { border-bottom: none; }
.tick input { width: 24px; height: 24px; accent-color: var(--green); flex: none; }
#view-staples { padding-bottom: 120px; }

/* ---- kitchen & household (§7, §9.2c) ---- */
.equip-row, .equip-ask {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.equip-row:last-child, .equip-ask:last-child { border-bottom: none; }
.equip-q { font-size: 17px; font-weight: 600; }
.equip-ask .chips, .equip-row .chips { margin-top: 0; }
.cap-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--ink-soft); padding: 6px 0;
}
.cap-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.cap-dot.yes { background: var(--green); }
.cap-dot.no { background: var(--accent); }
.cap-dot.unknown { background: var(--line); border: 1.5px solid var(--ink-faint); }

/* ---- §9.1 the one way in ---- */
.wish {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 18px;
}
.wish-label { display: block; font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.wish textarea { min-height: 56px; }
.wish .bar-btns { display: flex; gap: 10px; margin-top: 12px; }
.wish .bar-btns .btn { flex: 1; }
.wish .bar-state { font-size: 15px; color: var(--ink-faint); margin-top: 8px; min-height: 0; }

/* ---- §9.2 a recipe on screen ---- */
.badge.good { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.ing-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.ing-row:last-child { border-bottom: none; }
.ing-name { font-size: 17px; }
.ing-tag { font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
.ing-tag.yes { color: var(--green); }
.ing-tag.no { color: var(--accent); }
.ing-tag.unknown { color: var(--ink-faint); }
.step-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: none; }
.step-n {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1; font-size: 17px; line-height: 1.45; }
.caution {
  margin-top: 8px; padding: 9px 11px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 15px; font-weight: 600;
}

/* ---- microphone glyph ---- */
.btn.mic { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.mic-glyph {
  width: 21px; height: 21px; flex: 0 0 21px;
  fill: currentColor; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* ---- the Go button ---- */
/* `.go` was the green exception back when the default was black. It is now
   the same as a plain filled button; kept so existing markup still reads. */
.btn.go { background: var(--green); border-color: var(--green); color: #fff; }
.btn.go:active { background: var(--green-deep, var(--green)); }

/* ---- §9.4 guided cooking, sized for someone at the stove ---- */
#view-cooking h1 { font-size: 24px; color: var(--ink-soft); margin-bottom: 6px; }
.cook-prog { margin-bottom: 14px; }
.cook-prog-n { font-size: 16px; color: var(--ink-faint); }
.cook-bar { height: 7px; border-radius: 4px; background: var(--line); margin-top: 7px; overflow: hidden; }
.cook-bar-fill { height: 100%; background: var(--green); transition: width .25s ease; }
.step-card { padding: 24px 20px; }
.step-text { font-size: 27px; line-height: 1.42; margin: 0; }
.caution-card { border-color: var(--amber); }
.caution-card .caution { font-size: 18px; margin-top: 0; margin-bottom: 14px; }
.cook-pad { margin-top: 20px; }
.btn.big {
  display: block; width: 100%; font-size: 23px; padding: 22px 20px;
  margin-bottom: 12px; min-height: 68px;
}
.btn.go.held { opacity: .45; }
.cook-pad .btn-row { display: flex; gap: 10px; }
.cook-pad .btn-row .btn { flex: 1; }
.timer-card { text-align: center; }
.timer-time {
  font-size: 46px; font-variant-numeric: tabular-nums;
  letter-spacing: 1px; margin-bottom: 12px;
}

/* ---- photographs: only of this household's own cooking ---- */
.photo-slot { margin-top: 16px; }
.dish-photo {
  display: block; width: 100%; height: auto; max-height: 320px;
  object-fit: cover; border-radius: 12px; margin-bottom: 12px;
  background: var(--line);
}

/* ---- what the larder is actually contributing ---- */
.using-card { border-color: var(--green); }
.ing-using { font-size: 15px; color: var(--green); padding: 0 0 9px; margin-top: -4px; }

/* ---- reading speed, at the stove ---- */
.speed-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.speed-label { font-size: 16px; color: var(--ink-faint); }
.speed-row .chips { margin-top: 0; }

/* the ask: still first, but no longer half the screen */
.wish { padding: 14px 14px 12px; margin-bottom: 20px; }
.wish-label { font-size: 18px; margin-bottom: 8px; }
.wish textarea {
  min-height: 52px; font-size: 18px; padding: 12px 13px;
}
.wish textarea::placeholder { color: #C3B7A7; }
.wish-btns { display: flex; gap: 10px; margin-top: 10px; }
.wish-btns .btn { min-height: 54px; font-size: 18px; padding: 12px 16px; }
.wish-btns .btn.mic { flex: 0 0 auto; }
.wish-btns .btn.go { flex: 1; }
.wish .bar-state:empty { display: none; }
.wish .bar-state { font-size: 15px; color: var(--ink-faint); margin-top: 8px; }

/* the microphone is a way in, not the main event */
.btn.mic.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.mic.ghost .mic-glyph { opacity: 0.75; }
.btn.mic.listening,
.btn.mic.ghost.listening {
  background: var(--green); border-color: var(--green); color: #fff;
}
.btn.mic.listening .mic-glyph { opacity: 1; }

/* daily things: two tiles, side by side where there is room */
.tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 16px 15px; border-radius: 14px; min-height: 104px; }
.tile .t-title { font-size: 19px; line-height: 1.25; }
.tile .t-sub { font-size: 14px; margin-top: 5px; line-height: 1.35; }
.tile.primary { background: var(--card); border-color: var(--line); }

/* everything else: quiet rows, full tap target, no box each */
.group-head { margin: 26px 0 8px; }
.links {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.link-row {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px; min-height: 64px;
  font: inherit; color: inherit; cursor: pointer;
}
.link-row:last-child { border-bottom: none; }
.link-row:active { background: #F6F1E8; }
.l-title { display: block; font-size: 18px; font-weight: 600; }
.l-sub { display: block; font-size: 14px; color: var(--ink-faint); margin-top: 2px; }

/* the bottom bar only exists on two screens; everywhere else that padding
   was dead space at the end of a scroll */
body { padding-bottom: 0; }
/* Every screen that carries a fixed bottom bar needs room under its own
 * content, or the last control sits beneath the bar and cannot be reached —
 * which is what happened to "+ Add someone" with two people in the house. */
#view-add, #view-staples, #view-welcome, #view-cookset { padding-bottom: 130px; }

header { padding: 16px 18px 6px; }
.wrap { padding: 14px 18px 36px; }
.foot { padding: 22px 0 8px; }

/* narrow phones: stack the two daily tiles rather than cramping them */
@media (max-width: 380px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
}

/* the ask box is one line that grows; a drag-handle in the corner is clutter */
.wish textarea { resize: none; }

/* ---- the stove: one button to reach for, the rest within reach ---- */
.cook-pad .btn.big.ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line); font-size: 20px;
  min-height: 60px; padding: 16px 18px;
}
.cook-pad .btn.mic.big.ghost.listening {
  background: var(--green); border-color: var(--green); color: #fff;
}
.cook-pad .btn-row { margin-top: 0; margin-bottom: 12px; }
.cook-pad .btn-row .btn { min-height: 56px; font-size: 17px; padding: 12px 14px; }
.btn.quiet.wide { display: block; width: 100%; text-align: center; }
.cook-pad .hint { margin-top: -4px; margin-bottom: 4px; }

/* the acknowledgement belongs to the warning it is under */
.caution-card .btn.ack {
  display: block; width: 100%;
  background: var(--amber); border-color: var(--amber); color: #fff;
}
.caution-card .hint { margin-top: 10px; }

/* an action that belongs to a card fills it */
.card > .btn:not(.quiet):not(.mini) { display: block; width: 100%; }
.card > .btn-row { display: flex; gap: 10px; }
.card > .btn-row > .btn { flex: 1; }
#request-body > .btn-row { display: flex; gap: 10px; margin-bottom: 14px; }
#request-body > .btn-row > .btn { flex: 1; }


/* ==========================================================================
   THE FRONT PAGE

   A grid of six identical tiles is a slide, not a design: everything the same
   size says everything matters the same, which is the same as saying nothing
   matters. So this page is set like a front page instead.

     one lede      the question the household actually asks, set as a headline
     two hands     the things you do with your own hands: ask, or cook
     one shelf     everything about stock, small, in a row
     a rule        and the setup nobody opens twice

   Colour is rationed. The lede owns turmeric; the two hands own plum and
   green; the shelf is ink on cream and gets no colour at all, because it is
   not where anybody is going. Small caps and a hairline rule do the work
   that six colours were doing badly.
   ========================================================================== */

/* ---- masthead ---- */
header {
  padding: 20px 20px 12px; display: flex; align-items: baseline;
  justify-content: space-between; gap: 12px; max-width: 560px; margin: 0 auto;
}
.brand { font-size: 25px; font-weight: 700; letter-spacing: -0.015em; }
.brand-mark { height: 34px; vertical-align: -9px; margin-right: 10px; }
.brand-word { height: 27px; vertical-align: -3px; }
.masthead-date {
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap; text-align: right;
}
.masthead-day { display: block; }
.masthead-time {
  display: block; font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: none; color: var(--ink); margin-top: 1px;
}
.wrap { padding: 4px 20px 40px; }

/* ---- the lede ---- */
.lede {
  position: relative; overflow: hidden;
  display: block; width: 100%; text-align: left;
  background: #9A6508; color: #FDF6E7;
  border: none; border-radius: 4px 22px 4px 22px;   /* not a rounded rectangle */
  padding: 22px 22px 20px; margin-bottom: 20px;
  font: inherit; cursor: pointer;
  box-shadow: 0 10px 28px -16px rgba(60, 38, 0, 0.75);
}
.lede:active { transform: translateY(1px); }

/* a faint seed pattern, so the block is a surface and not a swatch */
.lede-grain {
  position: absolute; inset: 0; opacity: 0.09; pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 1.4px, transparent 1.5px),
    radial-gradient(circle at 62% 42%, #fff 1.1px, transparent 1.2px),
    radial-gradient(circle at 34% 78%, #fff 1.3px, transparent 1.4px),
    radial-gradient(circle at 86% 88%, #fff 1px, transparent 1.1px);
  background-size: 54px 48px, 38px 44px, 64px 58px, 44px 40px;
}
.lede > *:not(.lede-grain) { position: relative; }

.lede-kicker {
  display: block; font-size: 13px; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.72; margin-bottom: 8px;
}
.lede-q {
  display: block; font-size: 37px; line-height: 1.04;
  font-weight: 700; letter-spacing: -0.025em; margin-bottom: 14px;
}
.lede-body { display: block; }
.lede-line {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 0; border-top: 1px solid rgba(253, 246, 231, 0.22);
}
.lede-line:first-child { border-top: none; }
.lede-slot {
  flex: 0 0 86px; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.66;
}
.lede-dish { flex: 1; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lede-none { display: block; font-size: 18px; opacity: 0.8; font-style: italic; }
.lede-go {
  display: inline-block; margin-top: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  border-bottom: 1.5px solid rgba(253, 246, 231, 0.55); padding-bottom: 2px;
}
.lede-cook { display: block; font-size: 13px; margin-top: 12px; opacity: 0.85; }
.lede-cook.warn { opacity: 1; font-weight: 600; }

/* ---- the two hands ---- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.act {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; width: 100%; min-height: 168px;
  padding: 18px 16px 16px; border: none; border-radius: 22px 4px 22px 4px;
  font: inherit; cursor: pointer; color: #FDF6E7;
}
.act:active { transform: translateY(1px); }
.act-ask  { background: #6E4157; }
.act-cook { background: #2C6049; }
.act-ico { display: block; margin-bottom: auto; }
.act-ico svg {
  width: 42px; height: 42px; fill: currentColor; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.act-t {
  display: block; font-size: 20px; font-weight: 700;
  line-height: 1.12; letter-spacing: -0.015em; margin-top: 14px;
}
.act-s { display: block; font-size: 13.5px; opacity: 0.78; margin-top: 5px; line-height: 1.35; }

/* ---- what is being made today ----
   Settled already, so it is information rather than an invitation: no button,
   no colour, nothing to tap. It sits above the lede because at breakfast it is
   the question the household has, and reads as a note pinned to the kitchen
   door rather than a second headline competing with the one below it. */
.today {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 17px 16px; margin-bottom: 14px;
}
.today-kicker {
  display: block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}
.today-date {
  display: block; font-size: 15.5px; font-weight: 700; color: var(--ink);
  margin: 3px 0 10px;
}
.today-line {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.today-l { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.today-r { display: flex; gap: 8px; align-items: center; flex: none; }
.today-slot-name {
  flex: none; width: 100px; font-size: 13px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.today-dish { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* The meal that is happening right now is the one the kitchen is standing in
   front of, so it is the only line that carries colour. */
.today-line.is-now { background: var(--amber-wash, rgba(176, 120, 32, 0.08)); }
.today-line.is-now .today-dish { color: var(--amber); }
.today-line.is-done .today-dish { color: var(--ink-faint); }
.today-tag {
  font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.today-tag.now { background: var(--amber); color: #fff; }
.today-tag.done { background: var(--line); color: var(--ink-faint); }
.today-none { font-size: 15px; color: var(--ink-faint); margin: 2px 0 8px; }
.today-go {
  display: inline-flex; align-items: center; min-height: 44px;
  background: none; border: 0; padding: 4px 0;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--amber);
  border-bottom: 2px solid var(--amber); cursor: pointer;
}

/* Yesterday. Set apart and quieter: it is a loose end to tie off, not the
   business of the day. */
.today-back {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.today-back-k {
  display: block; font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.today-back-d {
  display: block; font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 3px 0 9px; line-height: 1.35;
}
.today-back-acts { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 380px) {
  .today-line { flex-direction: column; align-items: flex-start; gap: 4px; }
  .today-l { flex-direction: column; gap: 1px; }
  .today-slot-name { width: auto; }
}

/* ---- the shelf ---- */
.shelf {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 22px;
}
.chip-nav {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 14px 6px 12px; background: transparent;
  border: 1px solid var(--line); border-radius: 14px;
  font: inherit; color: inherit; cursor: pointer; min-height: 104px;
}
.chip-nav:active { background: #F4EEE4; }
.chip-ico svg {
  width: 25px; height: 25px; stroke: var(--ink-soft);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none;
}
.chip-t { font-size: 16px; font-weight: 700; line-height: 1.2; margin-top: 10px; }
.chip-s { font-size: 13px; color: var(--ink-faint); margin-top: 3px; line-height: 1.3; }

/* The shelf was deliberately colourless (§4.13: colour is rationed, and the
 * shelf is not where anybody is going). The owner asked for colour and weight
 * here on 21 November. The compromise that keeps the hierarchy: the icons
 * carry the colour, the tiles stay cream. The lede still owns the screen,
 * because a tinted 25px icon cannot outshout a turmeric headline. */
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(1) .chip-ico svg { stroke: var(--green); }
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(2) .chip-ico svg { stroke: var(--accent); }
.shelf:not(.shelf-quiet) > .chip-nav:nth-child(3) .chip-ico svg { stroke: var(--amber); }
.shelf:not(.shelf-quiet) > .chip-nav .chip-ico svg { width: 30px; height: 30px; stroke-width: 2.1; }

/* ---- a hairline, then the things nobody opens twice ---- */
.rule { height: 1px; background: var(--line); margin: 4px 0 18px; }
.links { background: transparent; border: none; border-radius: 0; }
.link-row {
  display: block; width: 100%; text-align: left; background: transparent;
  border: none; border-bottom: 1px solid var(--line);
  padding: 13px 2px; min-height: 56px; font: inherit; color: inherit; cursor: pointer;
}
.link-row:last-child { border-bottom: none; }
.link-row:active { opacity: 0.6; }
.l-title { display: block; font-size: 16px; font-weight: 600; }
.l-sub { display: block; font-size: 13.5px; color: var(--ink-faint); margin-top: 2px; }

body { padding-bottom: 0; }
/* Every screen that carries a fixed bottom bar needs room under its own
 * content, or the last control sits beneath the bar and cannot be reached —
 * which is what happened to "+ Add someone" with two people in the house. */
#view-add, #view-staples, #view-welcome, #view-cookset { padding-bottom: 130px; }

@media (max-width: 360px) {
  .lede-q { font-size: 31px; }
  .act { min-height: 146px; }
  .act-t { font-size: 17px; }
  .chip-t { font-size: 14.5px; }
}

/* both hands carry the same parts, so they sit on the same lines */
.act-t { margin-top: 14px; }
.act-s { min-height: 2.6em; }

/* the one question the app asks back, in the same language as the rest */
.ask {
  background: transparent;
  border: 1px solid var(--line); border-left: 3px solid var(--add);
  border-radius: 4px 14px 14px 4px;
  padding: 16px 16px 14px; margin-bottom: 18px;
}
.ask h3 { font-size: 17px; margin-bottom: 4px; }
.ask .sub { font-size: 14px; }
.ask textarea { min-height: 76px; font-size: 17px; }
.ask .btn { min-height: 50px; font-size: 17px; }

/* ==========================================================================
   PHOTOGRAPHY

   Three photographs, published as the artifact's OWN files under img/. The
   viewer's content security policy serves only the artifact's own files, so
   a hotlink to any CDN — Unsplash included — is blocked by the browser and
   renders nothing. They were fetched once, cropped, compressed to about
   40KB each and shipped with the page.

   They are ambience and nothing more. A recipe's photograph is still only
   ever one somebody in this house took: stock food under "I made this"
   would be a lie, and this app does not tell those.

   They are DECORATION and never stand in for this household's own cooking.
   A recipe's photograph is still only ever one somebody here took — stock
   food under "I made this" would be a lie, and the app does not tell those.

   Every photograph sits on top of a solid colour, so if the host is blocked
   or slow the page looks exactly as it did before and nothing breaks.
   ========================================================================== */
.lede { padding: 0; background: #9A6508; }
.lede-photo {
  display: block; position: relative; overflow: hidden;
  height: 132px; width: 100%; background: #6F4A06;
  border-radius: 4px 22px 0 0;
}
.lede-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
  display: block;
}
/* Three dishes a day, fading one into the next. Two layers rather than one,
   because swapping the source of a single image shows the background through
   it for a frame and the banner blinks. The top layer carries the next
   picture and is faded in over the one below. */
.lede-photo .lede-next {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 700ms ease;
}
.lede-photo .lede-next.in { opacity: 1; }
/* A phone that has asked for less movement gets the first dish and no more. */
@media (prefers-reduced-motion: reduce) {
  .lede-photo .lede-next { transition: none; }
}
/* the photograph fades into the colour block below it, so there is no seam */
.lede-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(154,101,8,0) 0%, rgba(154,101,8,0.18) 52%,
    rgba(154,101,8,0.82) 88%, #9A6508 100%);
}
/* and if it never arrives, the band goes with it rather than leaving a hole */
.lede.no-photo .lede-photo { display: none; }
.lede.no-photo .lede-panel { padding-top: 20px; }

.lede-panel { display: block; position: relative; padding: 2px 22px 20px; }
.lede-q { margin-bottom: 4px; }
.lede-kicker {
  display: block; font-size: 13px; letter-spacing: 0.09em;
  text-transform: uppercase; opacity: 0.7; margin: 0 0 14px;
}
.lede-body:empty { display: none; }

.act { position: relative; overflow: hidden; }
.act-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-size: cover; background-position: center;
}
.act > *:not(.act-bg) { position: relative; }
/* The washed photographs these carried were replaced by the objects that now
 * stand on the colour; the element stays as the hook, with nothing in it. */

/* ---- the setup row: adults fill these in, so they are the quietest thing ---- */
.shelf-quiet .chip-nav { border-color: transparent; min-height: 84px; padding: 8px 4px; }
.shelf-quiet .chip-ico svg { width: 26px; height: 26px; stroke: var(--ink-faint); stroke-width: 2; }
.shelf-quiet .chip-t { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.shelf-quiet .chip-s { font-size: 13px; }
/* the setup row carries colour too, a shade quieter than the shelf above it */
.shelf-quiet > .chip-nav:nth-child(1) .chip-ico svg { stroke: #6E4157; }
.shelf-quiet > .chip-nav:nth-child(2) .chip-ico svg { stroke: var(--green); }
.shelf-quiet > .chip-nav:nth-child(3) .chip-ico svg { stroke: var(--amber); }
.rule { margin: 6px 0 6px; }

.credit {
  font-size: 13px; color: #9C8C78; text-align: center;
  padding: 18px 0 6px; letter-spacing: 0.02em;
}

/* the host app floats its own controls over the top of the page */
header { padding-top: calc(26px + env(safe-area-inset-top, 0px)); }

/* ---- the lede with nothing settled yet ----
   A headline and a text link left 300px of turmeric doing nothing. With no
   menu to show, the block closes up and the one thing worth doing becomes a
   button you could not miss. */
.lede.no-menu .lede-panel { padding-bottom: 22px; }
.lede.no-menu .lede-kicker { margin-bottom: 20px; }
/* Green, like every other filled button. It was pale cream, which left the
   single most important action on the front page looking the least like a
   button of anything on it. Settled 2 December with the rest of them. */
.lede.no-menu .lede-go {
  display: block; width: 100%; text-align: center;
  background: var(--green); color: #fff;
  border: none; border-radius: 12px;
  padding: 15px 18px; font-size: 18px; font-weight: 700; margin-top: 0;
}

/* ==========================================================================
   THE FOOD CARRIES THE COLOUR
   The two hands used to be a photograph under an 80–94% colour wash, which
   is a flat rectangle that happens to cost 36KB. The objects now sit ON the
   colour instead of under it, and the lede's photograph runs at full strength
   with the type on paper beneath it. Nothing here is a brand colour standing
   in for food.
   ========================================================================== */

/* ---- the lede: photograph first, type on paper ---- */
.lede {
  background: var(--card); color: var(--ink);
  box-shadow: 0 14px 34px -20px rgba(60, 38, 0, 0.55);
}
/* the hero is a wide banner, so it runs as a band rather than a crop of
 * itself: a taller original would let this grow. */
.lede-photo { height: 176px; }
/* only enough shade at the very top for the masthead to breathe */
.lede-photo::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 40%);
}
.lede-grain { display: none; }
.lede-panel { padding: 16px 20px 18px; }
.lede-kicker { color: var(--amber); opacity: 1; font-weight: 700; }
.lede-q { color: var(--ink); }
.lede-line { border-top: 1px solid var(--line); }
.lede-slot { color: var(--ink-faint); opacity: 1; }
.lede-dish { color: var(--ink); }
.lede-cook { color: var(--ink-soft); opacity: 1; }
.lede-cook.warn { color: var(--accent); font-weight: 700; }
.lede-go { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- the two hands: flat colour, with the food standing on it ---- */
.act { position: relative; overflow: hidden; min-height: 200px; }
.act-ask  { background: #A8452A; }
.act-cook { background: #1F5B41; }
.act .act-bg { display: none; }          /* the washed photograph it replaces */
/* The object sits on a white disc rather than straight on the colour. The
 * artwork carries its own soft shadow, and a shadow cut out of white and
 * dropped onto terracotta reads as a smudge; on white it reads as a shadow.
 * It also gives the food a plate to stand on. */
/* `.act > *:not(.act-bg)` forces position:relative on every child, so this
 * selector has to match its weight to win. */
.act > .act-obj {
  position: absolute; right: 12px; top: 12px;
  width: 98px; height: 98px; object-fit: contain;
  background: #FFFFFF; border-radius: 50%; padding: 7px;
  box-sizing: border-box; pointer-events: none;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.45);
}
.act-t, .act-s { position: relative; }
.act-s { max-width: 92%; }

/* ---- the shelf and the setup row ---- */
.chip-obj {
  width: 54px; height: 54px; object-fit: contain; display: block;
}
.shelf-quiet .chip-obj { width: 46px; height: 46px; }

/* How long a meal takes, beside the dishes it is made of. Quiet: it answers a
 * question somebody has while reading, and is not the reason they looked. */
.meal-time {
  flex: none; margin-left: auto; padding-left: 12px;
  font-size: 13px; color: var(--ink-faint); white-space: nowrap;
}
.lede-line .meal-time { color: var(--ink-faint); }

/* A browser that refuses to store anything. Said once, at the top of the home
 * screen, because the alternative is a larder that fills up and then vanishes
 * without a word. */
.warn {
  background: #FBEDE7; border: 1px solid #E8C3B4; border-radius: 12px;
  padding: 12px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.45;
  color: #8C3A1F;
}

/* The masthead holds the mark, the wordmark and the date on one line. On a
 * 360px phone the date was pushing the wordmark onto a second line, which
 * left the mark floating above it. The brand stays whole; the date is the
 * part that gives way. */
.brand { white-space: nowrap; flex: none; }
.masthead-date { min-width: 0; text-align: right; }
@media (max-width: 380px) {
  .brand-mark { height: 27px; margin-right: 7px; vertical-align: -7px; }
  .brand-word { height: 21px; }
  header { gap: 8px; }
}

/* §9.4 — every control on the cooking screen is a primary button, because the
 * hands using it are wet and the eyes reading it are 79. Two had drifted
 * below that: "Start from the beginning" at 56px and "Stop for now" at 44. */
#view-cooking .btn { min-height: 62px; }
#view-cooking .btn.go.big { min-height: 76px; }
#view-cooking .btn.quiet.wide { min-height: 62px; font-size: 16px; }

/* The two actions on a suggestion sit side by side: this is a list of equal
 * choices, not a screen with one thing to do, so they must not each take a
 * full-width line. Still a finger's worth of height. */
.sugg-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sugg-acts .btn.small {
  min-height: 46px; padding: 11px 16px; font-size: 15px;
  width: auto; flex: 0 1 auto;
}

/* The household code. Read aloud down a phone as often as it is copied, so
   it is set wide and plain rather than small and clever. */
.house-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 19px; letter-spacing: 0.08em; font-weight: 600;
  color: var(--ink); background: var(--paper-2, #F4EEE4);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 10px 0 8px; text-align: center;
  word-break: break-all;
}


/* ---- a plan the household can bend ---- */
.group-head.gone { color: var(--ink-faint); }
.group-tag {
  margin-left: 9px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: none; color: var(--ink-faint);
}
.group-tag.now { color: var(--amber); }
.card.gone { opacity: 0.74; }
.lard-short { font-size: 13px; color: var(--amber); font-weight: 600; margin-top: 3px; }
.lard.add-row { justify-content: flex-start; padding-top: 10px; }

.dish-edit {
  background: var(--card); border: 2px solid var(--amber); border-radius: 14px;
  padding: 15px 16px 16px; margin: 10px 0 14px;
}
.dish-edit-k {
  display: block; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); font-weight: 700; margin-bottom: 9px;
}
.dish-edit input[type="text"] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; font-weight: 600;
  padding: 11px 12px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.dish-edit-sv { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.dish-edit-lab { font-size: 15px; color: var(--ink); font-weight: 600; }
.dish-edit input[type="number"] {
  width: 84px; font: inherit; font-size: 17px; font-weight: 700; text-align: center;
  padding: 10px 6px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.dish-edit-hint { font-size: 13px; color: var(--ink-faint); margin: 7px 0 0; }
.dish-edit-short { font-size: 14px; color: var(--amber); font-weight: 600; margin: 8px 0 0; min-height: 1px; }
.dish-edit-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }

.cook-day {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 16px; color: var(--ink); margin: 0 0 24px;
}
.cook-day-q { font-weight: 700; }
.cook-day-note { color: var(--ink-soft); font-size: 15px; flex-basis: 100%; margin-top: -4px; }

/* Two answers, one lit. The lit one is the state of the day; the other is
 * the change. Colour is not doing the work on its own — the words Yes and No
 * are there, and the lit one is the filled one. */
/* One switch. The knob carries the word, so the state is the thing the eye
   lands on, and the track behind it says the same thing again in colour.
   Drag it or tap it. It is wide enough that the knob plainly has somewhere
   to go, which is what tells you it is a switch and not a label. */
.cook-switch {
  position: relative; width: 132px; height: 54px; flex: 0 0 auto;
  border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--accent); transition: background 160ms ease;
  -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.cook-switch.on { background: var(--green); }
.cook-switch-knob {
  position: absolute; top: 5px; left: 5px;
  width: 74px; height: 44px; border-radius: 999px;
  background: #fff; color: var(--accent);
  font-size: 16px; font-weight: 800; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(23, 18, 13, 0.22);
  transition: transform 160ms ease, color 160ms ease;
}
.cook-switch.on .cook-switch-knob { transform: translateX(53px); color: var(--green); }
.cook-switch.dragging .cook-switch-knob { transition: color 160ms ease; }
.cook-day.off .cook-day-q { color: var(--ink); }
.today-tag.free { background: var(--line); color: var(--ink-faint); }
.today-line.is-free .today-dish { color: var(--ink-faint); font-style: italic; }
.cover-opt {
  display: block; width: 100%; box-sizing: border-box; text-align: left;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; min-height: 48px; margin-bottom: 8px; cursor: pointer;
}
.cover-opt:hover { border-color: var(--amber); }

.dish-edit-mic { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mic-mini {
  min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 700;
  border-color: var(--amber); color: var(--amber);
}
.mic-mini.listening { background: var(--amber); color: #fff; border-color: var(--amber); }
.mic-glyph { font-size: 15px; }
.lard-r .mini.danger { color: var(--danger, #9b2c1f); border-color: var(--line); }

/* The planner's own microphone: a round button the size of a thumb, with the
   words beside it. It used to be a full-width bar, which turned the top of
   the page into one brown slab and still did not read as a microphone. A
   circle reads as a button before anything is read at all. */
.plan-mic { margin: 18px 0 22px; }
.plan-mic-head { display: flex; align-items: center; gap: 14px; }
.mic-round {
  flex: 0 0 auto;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--voice); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(27, 102, 112, 0.34);
  -webkit-appearance: none; appearance: none;
}
.mic-round .mic-glyph {
  width: 34px; height: 34px;
  stroke: #fff; stroke-width: 2; fill: #fff;
}
.mic-round .mic-glyph path { stroke: #fff; fill: none; }
.mic-round:active { transform: scale(0.96); }
.mic-round.listening {
  background: var(--amber);
  box-shadow: 0 0 0 7px rgba(138, 90, 0, 0.17);
}
.mic-cap { font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; }

.plan-heard {
  font-size: 15px; line-height: 1.45; color: var(--ink); margin: 9px 0 0;
  min-height: 1px;
}
.plan-heard:empty { display: none; }

/* ==========================================================================
   THE PAGE MUST NEVER SCROLL SIDEWAYS
   --------------------------------------------------------------------------
   Reported from a phone, 22 November: "the copy is not fitting the screen,
   so I need to move the page to left."

   The cause was not the dish names. It was `1fr`, which is shorthand for
   minmax(AUTO, 1fr) — and `auto` means "never shrink below the content's own
   minimum". A tile holding a 54px picture therefore refused to go under
   about 66px, three of them plus the gaps and the page padding put a hard
   floor at roughly 325px, and anything narrower pushed the whole page out.

   390px is not narrow, so the audit never saw it. But a phone whose owner
   has turned the text size up — which is most people over sixty, and Amma is
   the design constraint — renders the page at a far smaller effective width,
   and lands under that floor. That is why it appeared on a real phone and
   not in 1,389 browser checks.

   Fixed as a kind, not as a case:
     1. every grid track may shrink      minmax(0, 1fr)
     2. every flex text item may shrink  min-width: 0
     3. a long word breaks rather than pushing the page
     4. a picture never wider than the box it is in

   The audit now fails if any screen at any width scrolls sideways, so this
   cannot come back quietly.
   ========================================================================== */

.tiles,
.duo,
.shelf { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.shelf { --cols: 3; }
@media (max-width: 380px) { .tiles { --cols: 1; } }

/* A GRID OR FLEX ITEM has the same default minimum as a track: its own
   content. Loosening the tracks alone changed nothing, because each tile
   still refused to go under the width of the picture inside it. The item
   has to be allowed to shrink as well as the column it sits in — this is
   the half that actually fixed it. */
.shelf > .chip-nav,
.tiles > .tile,
.tiles > .act,
.duo > * { min-width: 0; }

/* A flex item's default minimum is its content, so a long dish name pushes
   its row wider than the screen instead of wrapping inside it. */
.today-l,
.today-dish,
.today-line,
.row-main,
.sugg,
.card,
.link-row { min-width: 0; }

/* A name with no spaces in it — a URL, a household code, a long compound —
   cannot be broken by wrapping alone. */
.today-dish,
.sugg-name,
.sugg-line,
.chip-t,
.chip-s,
.act-t,
.act-s,
.tile,
.row-label,
.house-code { overflow-wrap: anywhere; }

/* The masthead date was the one that actually pushed the page out, and it
   is a reminder that an element can overflow WITHOUT being wide: its box
   measured 72px while its text ran to 177px, so every check that looks at
   element widths walks straight past it. §9's note already said "the date
   is the part that gives way" and gave it min-width: 0 — but nowrap meant
   it had no way to give. Now it wraps instead of shoving. */
.masthead-date { white-space: normal; }
.masthead-day,
.masthead-time { overflow-wrap: anywhere; }

/* Artwork scales with its tile rather than holding it open. */
.chip-obj,
.act-obj,
img { max-width: 100%; }

/* Last line of defence. Everything above fixes the causes; this makes sure
   that a cause nobody has thought of yet degrades into a slightly cramped
   screen rather than a page the household has to drag sideways to read. */
html, body { overflow-x: hidden; }

/* The steps that go with a household code. A code with no instructions is
   sixteen characters and a shrug; reported 22 November. */
.how { margin-top: 12px; }
.how-t {
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 6px; font-weight: 600;
}
.how-steps {
  margin: 0; padding-left: 22px; font-size: 16px; color: var(--ink);
  line-height: 1.45;
}
.how-steps li { margin-bottom: 3px; overflow-wrap: anywhere; }

/* The box you type a household code into.
   Reported 23 November: "can't type — it's too small. Keep same size as the
   JOIN button for a 70 yr old to enter." It was never styled at all: the
   markup put the .field CONTAINER class on the input itself, so it rendered
   at the browser default. It is now the same width and height as the button
   under it, in the same monospaced face the code is shown in. */
.code-in {
  display: block; width: 100%; box-sizing: border-box;
  min-height: var(--tap); padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px; font-weight: 600; letter-spacing: 0.08em; text-align: center;
  text-transform: uppercase;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink);
}
.code-in::placeholder {
  color: #BBAE9E; font-weight: 400; letter-spacing: 0.06em; text-transform: none;
}
.code-in:focus { outline: 3px solid var(--accent); border-color: var(--accent); }

/* ---------- adding a phone: a link, a square, six digits ----------
   The sixteen-character code used to sit at the top of the sharing card,
   which made it the obvious thing to send — and it is the key to the
   larder, good for ever. What the house hands out now is a pairing that
   dies in fifteen minutes, and in order of how little anybody has to do:
   tap a link, point a camera, or type six digits. */
.pair { margin-top: 14px; }
.pair-t {
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 8px; font-weight: 600;
}
.pair-scan { margin-top: 18px; text-align: center; }
.pair-qr {
  width: 200px; height: 200px; display: block; margin: 0 auto;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 6px; box-sizing: border-box;
}
.pair-pin-wrap { margin-top: 18px; }
.pair-pin {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 34px; font-weight: 700; letter-spacing: 0.14em;
  text-align: center; margin: 0 0 6px; color: var(--ink);
  background: #F3EDE4; border-radius: 12px; padding: 10px 6px;
}
.pair-left { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); text-align: center; }
.pair-left.gone { color: var(--accent); font-weight: 600; }

/* ---------- household, broken into rooms ----------
   One screen five printed pages long became a hub of four. Each section
   is a tinted card that says what is inside it before you open it. The
   tints are only a second signal: the heading and the summary carry the
   meaning, so nothing is lost to a phone in sunlight or to anyone who
   cannot separate the hues. */
.sect {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; margin-top: 12px; border-radius: var(--radius);
  min-height: var(--tap); box-sizing: border-box;
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
}
.sect-txt { flex-grow: 1; min-width: 0; }
.sect-t { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; }
.sect-s { display: block; font-size: 15px; color: var(--ink-soft); margin-top: 3px; overflow-wrap: anywhere; }
.sect-go { flex-shrink: 0; font-size: 26px; line-height: 1; color: var(--ink-soft); }
.sect.people { background: #F6EBE2; border-color: #CBB9A8; }
.sect.kit    { background: #E8F1EC; border-color: #A9C3B4; }
.sect.cook   { background: #E4EEF0; border-color: #A9BFC4; }
.sect.phones { background: #F7EFDC; border-color: #CFBD9A; }

/* a person in the list */
.person-row {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 15px; margin-top: 10px; border-radius: var(--radius);
  min-height: var(--tap); box-sizing: border-box;
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
}
.person-dot {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 999px;
  background: #F6EBE2; border: 1.5px solid #CBB9A8;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #8E3620;
}
.person-txt { flex-grow: 1; min-width: 0; }
.person-n { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; }
.person-s { display: block; font-size: 15px; color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }
.person-r { display: block; font-size: 15px; color: #8E3620; font-weight: 600; margin-top: 3px; overflow-wrap: anywhere; }

.btn.dashed {
  border: 1.5px dashed #CBB9A8; background: transparent; color: #8E3620;
  font-weight: 600;
}
.card.tinted { background: #F6EBE2; border-color: #CBB9A8; }
.card.tinted-green { background: var(--green-soft); border-color: #A9C3B4; }
.card.warm { background: var(--amber-soft); border-color: #CFBD9A; }
.rule-line {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid #F0E8DA; font-size: 16px;
}
.rule-line:last-child { border-bottom: none; }
.rule-line span { flex-grow: 1; min-width: 0; overflow-wrap: anywhere; }
.btn.quiet.danger { color: var(--accent); }

/* Three boxes across — name, age, weight — must wrap rather than squeeze
   themselves off the side of a phone whose text is turned up. */
.fields { flex-wrap: wrap; }
.fields > .field { min-width: 96px; }

/* ---- the welcome screen: colour and food, not a form ----------------------
   The owner, 2 December: "The 1st page needs Colour, Excitement Food shots".
   A stranger met a cream page and a list of questions. The photograph is the
   day's first dish, so the app looks like what it is about before it asks
   anybody anything. */
.welcome-photo {
  display: block; overflow: hidden; border-radius: 18px;
  height: 150px; margin: 4px 0 16px; background: #6F4A06;
}
.welcome-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 50%;
  display: block;
}
.welcome-list { margin: 10px 0 0; padding-left: 20px; }
.welcome-list li {
  font-size: 17px; line-height: 1.5; margin-bottom: 7px;
}
.welcome-list li::marker { color: var(--green); }

/* ---------- what a day comes to ---------- */
.nutbox {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.nut-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px;
}
.nut-cell {
  flex: 1 1 60px; min-width: 60px; text-align: center;
  padding: 8px 4px; border-radius: 12px; background: var(--wash, #FAF6EF);
}
.nut-num { font-size: 19px; font-weight: 700; }
.nut-cap { font-size: 13px; opacity: .75; }
.nut-who { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.nut-chip {
  font: inherit; font-size: 15px; padding: 8px 16px; min-height: 44px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-soft); cursor: pointer; -webkit-appearance: none; appearance: none;
}
.nut-chip.sel {
  background: var(--green-soft); border: 3px solid var(--green);
  color: var(--ink); font-weight: 700; padding: 6px 14px;
}
.nut-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 15px; margin-top: 10px;
}
.nut-lab { font-weight: 600; }
.nut-pc { opacity: .75; font-size: 14px; }
.nut-bar {
  height: 9px; border-radius: 6px; margin-top: 4px;
  background: var(--line); overflow: hidden;
}
.nut-fill { height: 100%; background: var(--green); border-radius: 6px; }
