:root {
  --bg: #f1e7d8;
  --bg-2: #e9ddcc;
  --paper: #fff8f1;
  --ink: #2b1b12;
  --ink-soft: #6d5648;
  --ink-faint: #9a8474;
  --line: #e2d2c0;
  --terra: #b44122;
  --terra-deep: #8c2f16;
  --terra-soft: #f6d7c8;
  --olive: #55663b;
  --olive-soft: #e4ebd4;
  --gold: #c4921a;
  --poppy: #e05648;
  --good: #3f7a4a;
  --shadow: 0 8px 28px rgba(43, 27, 18, 0.08);
  --radius: 18px;
  --font-ui: "Figtree", "Helvetica Neue", sans-serif;
  --font-display: "Fraunces", "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
}
body { margin: 0; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

#phone {
  width: 100%;
  max-width: 480px;
  height: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.status-bar { display: none; }
#app { padding-top: env(safe-area-inset-top, 0px); }
#phone.dark { background: #241811; }
#phone.immersive #app { padding-top: 0; }
#phone.immersive .hero .overlay-bar { padding-top: env(safe-area-inset-top, 12px); }
#phone.immersive .cook-top { padding-top: env(safe-area-inset-top, 12px); }
.status-time { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.status-icons { display: flex; gap: 6px; align-items: center; }
#app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---- typography ---- */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
}

/* ---- chrome ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 16px 8px;
  gap: 10px;
  min-height: 44px;
}
.brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.icon-btn:active { background: var(--bg-2); }
.back-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}
.back-row .icon-btn { margin-left: 2px; }

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
}
.scroll.with-nav { padding-bottom: 88px; }
.scroll.with-nav.send { padding-bottom: 150px; }
.scroll.with-cta { padding-bottom: 96px; }

/* ---- bottom nav ---- */
.tab-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  background: linear-gradient(to bottom, rgba(241, 231, 216, 0) 0%, var(--bg) 36%);
  pointer-events: none;
  z-index: 28;
}
.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 62px;
  background: rgba(255, 248, 241, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: flex;
  box-shadow: var(--shadow);
  z-index: 30;
}
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
}
.tabbar button.active { color: var(--terra-deep); }
.tabbar svg { width: 22px; height: 22px; }

/* ---- week ---- */
.week-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 16px 8px;
}
.week-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 3px; border-radius: 999px; }
.week-tabs button {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.week-tabs button.on {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(43, 27, 18, 0.08);
}
.week-label { font-size: 12px; color: var(--ink-soft); font-weight: 500; padding-bottom: 6px; }

.day-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-card {
  flex: 0 0 96px;
  text-align: left;
  color: inherit;
}
.day-card .thumb {
  width: 96px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
  box-shadow: 0 2px 0 rgba(43, 27, 18, 0.04);
}
.day-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.day-card .day {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.day-card .name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1px;
}
.day-card.today .day { color: var(--terra); }
.day-card.today .thumb { outline: 2px solid var(--terra); outline-offset: 2px; }
.day-card .thumb { position: relative; }
.thumb .heart {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
}
.heart {
  position: absolute;
  top: 6px;
  right: 6px;
}

/* ---- search & chips ---- */
.search-wrap { padding: 14px 16px 8px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
}
.search input {
  border: 0;
  outline: 0;
  background: none;
  width: 100%;
  font-size: 15px;
}
.search input::placeholder { color: var(--ink-faint); }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip.poppy.on, .chip.poppy {
  /* default looks like others */
}
.chip.poppy.on {
  background: var(--poppy);
  border-color: var(--poppy);
  color: #fff;
}

/* ---- shelves & grid ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 16px 8px;
}
.section-head h2 { font-size: 20px; }
.section-head .sub { font-size: 12px; color: var(--ink-soft); }

.shelf {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 16px;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf-card {
  flex: 0 0 132px;
  text-align: left;
}
.shelf-card .thumb {
  width: 132px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.shelf-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf-card .name {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 10px;
  padding: 0 16px 8px;
}
.recipe-card { text-align: left; color: inherit; }
.recipe-card .thumb {
  height: 124px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.recipe-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card .meta { padding: 7px 2px 0; }
.recipe-card .cuisine {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.recipe-card .name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2px;
}

.ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background:
    radial-gradient(80% 80% at 20% 10%, rgba(255,255,255,.28), transparent 50%),
    linear-gradient(160deg, #c96a3c 0%, #8d3a1e 55%, #5c2a16 100%);
  color: #fff8f1;
}
.ph.alt { background: linear-gradient(160deg, #7a8a4e 0%, #44512c 100%); }
.ph.alt2 { background: linear-gradient(160deg, #c4923a 0%, #8a5a14 100%); }
.ph.alt3 { background: linear-gradient(160deg, #6a4a3a 0%, #3a241c 100%); }
.ph .ph-k { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: .85; }
.ph .ph-t { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.15; }

.heart {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 248, 241, 0.92);
  display: grid;
  place-items: center;
  color: var(--poppy);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.heart svg { width: 12px; height: 12px; }

/* ---- recipe page ---- */
.hero {
  height: 248px;
  position: relative;
  background: var(--bg-2);
}
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .overlay-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
}
.hero-back, .hero-ghost {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,248,241,.92);
  display: grid; place-items: center;
  margin-top: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.recipe-body { padding: 16px 18px 0; }
.recipe-body h1 { font-size: 28px; margin: 0 0 8px; }
.recipe-facts {
  display: flex;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
}
.recipe-facts span { display: flex; align-items: center; gap: 5px; }

.servings {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px;
  margin-bottom: 14px;
}
.serv-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.serv-btn:disabled { opacity: .35; }
.serv-copy { flex: 1; }
.serv-copy strong { display: block; font-size: 15px; }
.serv-copy small { color: var(--ink-soft); font-size: 12px; }

.leftover {
  background: var(--olive-soft);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #2d371c;
}
.leftover .kicker { color: var(--olive); margin-bottom: 3px; }
.leftover p { font-size: 14px; line-height: 1.4; font-weight: 500; }

.block { margin-bottom: 20px; }
.block h2 { font-size: 20px; margin-bottom: 8px; }
.ing-group { margin: 0 0 12px; }
.ing-group h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin: 8px 0 6px;
}
.ing-list { list-style: none; }
.ing-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.method-list { list-style: none; counter-reset: step; }
.method-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
}
.method-list li::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--terra-soft);
  color: var(--terra-deep);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.source {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.source a { color: var(--terra-deep); }

.sticky-cta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
}
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 999px;
  background: var(--terra);
  color: #fff8f1;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(180, 65, 34, 0.28);
}
.btn-primary:active { background: var(--terra-deep); }
.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 700;
  background: var(--paper);
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn-secondary, .btn-row .btn-primary { flex: 1; }
.btn-yes { background: var(--olive); box-shadow: 0 8px 20px rgba(63,122,74,.22); }
.btn-no { border-color: var(--line); color: var(--ink-soft); }

/* ---- cook mode ---- */
.cook {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #241811;
  color: #f6eadb;
}
.cook .status-spacer { height: 0; }
.cook-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
}
.cook-top .icon-btn { color: #f6eadb; }
.cook-progress { font-size: 13px; font-weight: 600; color: #d8c4b0; }
.cook-dots { display: flex; gap: 4px; justify-content: center; padding: 0 24px 8px; }
.cook-dots i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(246, 234, 219, 0.18);
}
.cook-dots i.on { background: #f0b089; }
.cook-step {
  flex: 1;
  min-height: 0;
  padding: 12px 22px 16px;
  display: flex;
  flex-direction: column;
}
.cook-step .step-kicker { color: #f0b089; margin-bottom: 10px; }
.cook-step p {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.28;
}
.timers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: rgba(246, 234, 219, 0.1);
  border: 1px solid rgba(246, 234, 219, 0.22);
  color: #f6eadb;
  font-weight: 600;
  font-size: 14px;
}
.timer.running {
  background: var(--terra);
  border-color: var(--terra);
}
.timer.done {
  background: var(--olive);
  border-color: var(--olive);
}
.cook-nav {
  display: flex;
  gap: 10px;
  padding: 8px 16px 18px;
}
.cook-nav button {
  flex: 1;
  height: 52px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
}
.cook-nav .prev {
  background: rgba(246, 234, 219, 0.1);
  color: #f6eadb;
}
.cook-nav .next {
  background: #f6eadb;
  color: #241811;
}
.cook-nav button:disabled { opacity: 0.35; }

/* ---- shopping ---- */
.shop-head { padding: 0 16px 10px; }
.shop-head h1 { font-size: 26px; margin: 2px 0 8px; }
.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--olive-soft);
  color: #2d371c;
  border-radius: 999px;
  padding: 5px 10px 5px 6px;
  font-size: 12.5px;
  font-weight: 600;
}
.avatars { display: flex; }
.avatars b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--olive);
  border: 1.5px solid var(--olive-soft);
  margin-right: -5px;
}
.avatars b.k { background: #3f5c8a; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(63,122,74,.15);
  margin-left: 3px;
}

.aisle { padding: 6px 16px 4px; }
.aisle h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 0 4px;
}
.shop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 1.5px solid #c4b09c;
  display: grid;
  place-items: center;
  background: var(--paper);
}
.shop-item.ticked { color: var(--ink-faint); }
.shop-item.ticked .box {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
}
.shop-item.ticked span { text-decoration: line-through; }

/* ---- rate ---- */
.rate { padding: 8px 20px 20px; }
.rate .eyebrow { color: var(--ink-soft); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.rate h1 { font-size: 26px; margin-bottom: 16px; }
.stars {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.stars button {
  width: 44px;
  height: 44px;
  color: var(--line);
}
.stars button.on { color: var(--gold); }
.note-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
textarea.note {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  padding: 12px 14px;
  resize: none;
  outline: none;
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 22px;
}
.prompt {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.prompt h2 { font-size: 18px; margin-bottom: 6px; }
.prompt p { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }

/* ---- ideas / tonight ---- */
.ideas-hero { padding: 4px 18px 10px; }
.ideas-hero h1 { font-size: 28px; margin: 4px 0 6px; }
.ideas-hero p { color: var(--ink-soft); font-size: 14.5px; }
.ing-entry {
  display: flex;
  gap: 8px;
  padding: 12px 16px 8px;
}
.ing-entry input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}
.ing-entry .add {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}
.picked {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.picked .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terra-soft);
  color: var(--terra-deep);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-weight: 600;
  font-size: 14px;
}
.picked .tag button {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(140, 47, 22, 0.12);
  font-size: 13px;
  line-height: 1;
}
.match-count { padding: 4px 16px 8px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 40;
}

#phone.immersive:not(.dark) .status-bar { color: #fff8f1; }
#phone.immersive:not(.dark) .status-bar svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
#phone.immersive:not(.dark) .status-time { text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(20,10,6,.42), transparent);
  pointer-events: none;
}
.hero .overlay-bar { z-index: 3; }


/* ---- store cupboard ---- */
.cup-note {
  margin: 0 16px 12px;
  background: var(--olive-soft);
  border-radius: 16px;
  padding: 12px 14px;
  color: #2d371c;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}
.skip-note {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--olive);
}
.skip-note button,
.skip-note a {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 2px;
  font: inherit;
  font-weight: 600;
}
.cup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.cup-item .name { font-size: 15.5px; }
.cup-item .state {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 8px;
}
.cup-item.on .state { color: var(--olive); }
.toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5c4b2;
  position: relative;
  transition: background .15s ease;
}
.toggle.on { background: var(--olive); }
.toggle i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff8f1;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .15s ease;
}
.toggle.on i { transform: translateX(18px); }
.cup-item-right { display: flex; align-items: center; }

/* ---- v1 additions: gate, sent, toast, share ---- */
.gate {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
.gate .brand { font-size: 40px; margin-bottom: 6px; }
.gate p { color: var(--ink-soft); margin: 0 0 22px; }
.gate input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 18px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.gate .err { color: var(--terra); font-weight: 600; min-height: 1.2em; margin: 0 0 10px; font-size: 14px; }
.sent-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--olive-soft);
  color: var(--olive);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  margin: 10px 0 4px;
}
.shop-week-switch { margin-bottom: 8px; }
.toast {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  color: #fff8f1;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: center;
  font-weight: 600;
  z-index: 40;
  box-shadow: var(--shadow);
}
.poppy-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
  color: var(--poppy);
  font-weight: 650;
}
.poppy-toggle.off { color: var(--ink-soft); }
.link-only-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
  background: var(--terra-soft);
  border-radius: 999px;
  padding: 3px 8px;
  margin-left: 6px;
}

/* ---- responsive: keep the phone layout below 768px ---- */
@media (min-width: 768px) {
  html, body {
    background: #e4d5c3;
  }
  #phone {
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    margin: 0 auto;
  }

  /* Top nav instead of the phone bottom bar */
  .tab-dock { display: none; }
  .tabbar {
    top: 10px;
    right: 16px;
    bottom: auto;
    left: auto;
    height: 48px;
    width: auto;
    min-width: 0;
    padding: 0 6px;
    border-radius: 16px;
  }
  .tabbar button {
    flex-direction: row;
    gap: 6px;
    padding: 0 14px;
    font-size: 13px;
    flex: 0 0 auto;
  }
  .tabbar svg { width: 18px; height: 18px; }
  .topbar {
    min-height: 56px;
    padding: 8px 16px 8px;
    padding-right: 360px;
  }
  .scroll.with-nav { padding-bottom: 36px; }
  .scroll.with-nav.send,
  .scroll.with-cta { padding-bottom: 120px; }
  .sticky-cta {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 22px;
    background: linear-gradient(to top, var(--bg) 64%, rgba(241, 231, 216, 0));
  }
  .sticky-cta .btn-primary {
    width: auto;
    min-width: 240px;
    padding: 0 28px;
  }
  .sticky-cta p { margin: 0 !important; }
  .toast { bottom: 24px; }

  .week-head,
  .search-wrap,
  .section-head { padding-left: 24px; padding-right: 24px; }
  .chips { padding-left: 24px; padding-right: 24px; flex-wrap: wrap; overflow: visible; }
  .day-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 0 24px 8px;
  }
  .day-card { flex: none; width: auto; }
  .day-card .thumb { width: 100%; height: 132px; }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 16px;
    padding: 0 24px 16px;
  }
  .recipe-card .thumb { height: 160px; }
  .shelf { padding-left: 24px; padding-right: 24px; }

  /* Shopping list and cupboard in columns */
  .scroll:has(.aisle) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    align-content: start;
  }
  .scroll:has(.aisle) > .shop-head,
  .scroll:has(.aisle) > .cup-note,
  .scroll:has(.aisle) > .ing-entry,
  .scroll:has(.aisle) > .sticky-cta {
    grid-column: 1 / -1;
  }
  .aisle { padding-left: 24px; padding-right: 24px; }
  .shop-head { padding-left: 24px; padding-right: 24px; }
  .cup-note { margin-left: 24px; margin-right: 24px; }

  .hero { height: 320px; }
  .recipe-body { padding: 20px 24px 0; }
  .gate { max-width: 420px; margin: 0 auto; }
}

@media (min-width: 1024px) {
  #phone {
    max-width: 1240px;
    box-shadow: 0 0 0 1px rgba(43, 27, 18, 0.05), 0 20px 60px rgba(43, 27, 18, 0.08);
  }

  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 18px;
    padding: 0 28px 20px;
  }
  .recipe-card .thumb { height: 170px; }
  .day-strip,
  .week-head,
  .search-wrap,
  .section-head,
  .chips,
  .shelf { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; }

  .scroll:has(.aisle) {
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 24px;
  }
  .aisle,
  .shop-head { padding-left: 28px; padding-right: 28px; }
  .cup-note { margin-left: 28px; margin-right: 28px; }

  /* Recipe: ingredients and method side by side */
  .recipe-cols {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    gap: 12px 48px;
    align-items: start;
  }
  .hero { height: 360px; }
  .recipe-body { padding: 24px 28px 0; }
  .recipe-body h1 { font-size: 36px; }
  .cook { max-width: 720px; margin: 0 auto; width: 100%; }
}

@media (min-width: 1280px) {
  #phone { max-width: 1280px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .recipe-card .thumb { height: 164px; }
}
