/* ==========================================================================
   Kitchly — a warm, quiet kitchen palette. Paper and herbs, nothing shouty.
   Built phone-first; the wider layouts are progressive enhancements.
   ========================================================================== */

:root {
  --paper:      #f7f3ec;
  --paper-deep: #efe8dd;
  --card:       #fffdf9;
  --line:       #e6ddcf;
  --line-soft:  #f0e9de;

  --ink:        #37312a;
  --ink-soft:   #6b6055;
  --ink-faint:  #9a8e80;

  --herb:       #4c7a41;
  --herb-deep:  #3c6333;
  --herb-lite:  #eaf1e4;
  --herb-edge:  #cfe0c5;

  --clay:       #c1663c;
  --clay-lite:  #fbeee7;

  --danger:     #b1442f;
  --danger-lite:#fbeae6;

  --shadow-sm: 0 1px 2px rgba(74, 57, 36, .06), 0 2px 8px rgba(74, 57, 36, .05);
  --shadow-md: 0 2px 6px rgba(74, 57, 36, .08), 0 12px 28px rgba(74, 57, 36, .10);
  --shadow-lg: 0 8px 40px rgba(74, 57, 36, .18);

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;

  --on-herb:   #ffffff;
  --field-bg:  #ffffff;
  --bar-bg:    rgba(247, 243, 236, .92);
  --bar-bg-2:  rgba(255, 253, 249, .96);
  --scrim:     rgba(55, 49, 42, .38);
  --toast-bg:  #3b342c;
  --toast-ink: #fdf9f3;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b6055'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");

  --tap: 46px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


/* --------------------------------------------------------------------------
   Dark mode. A warm dark, not a cold one — the app should still feel like a
   kitchen at night rather than a dashboard. app.js stamps data-theme on the
   root before first paint, from the phone's setting or the user's choice.
   -------------------------------------------------------------------------- */

:root[data-theme="dark"] {
  --paper:      #17150f;
  --paper-deep: #221f18;
  --card:       #201d16;
  --line:       #353025;
  --line-soft:  #2a2620;

  --ink:        #efe8da;
  --ink-soft:   #b6ab98;
  --ink-faint:  #8b8172;

  --herb:       #6f9e60;
  --herb-deep:  #9ac98a;
  --herb-lite:  #232c1c;
  --herb-edge:  #3a4a30;

  --clay:       #dc9163;
  --clay-lite:  #2f2118;

  --danger:     #e58a72;
  --danger-lite:#331e19;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .22);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .34), 0 12px 28px rgba(0, 0, 0, .34);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);

  --on-herb:   #10180b;
  --field-bg:  #1b1812;
  --bar-bg:    rgba(23, 21, 15, .92);
  --bar-bg-2:  rgba(28, 25, 19, .96);
  --scrim:     rgba(0, 0, 0, .58);
  --toast-bg:  #efe8da;
  --toast-ink: #201d16;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b6ab98'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* Photographs are a shade bright against a dark page; taking the edge off
   makes a wall of recipe cards easier to look at without washing them out. */
:root[data-theme="dark"] .rcard-shot,
:root[data-theme="dark"] .hero-strip img,
:root[data-theme="dark"] .meal-shot,
:root[data-theme="dark"] .photo-thumb { filter: brightness(.88); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--herb-deep); }

/* Outline icons: one stroke weight everywhere, so nothing looks heavier
   than anything else next to it. */
.i {
  width: 22px; height: 22px;
  flex: none; display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i.flip { transform: scaleX(-1); }
.muted { color: var(--ink-soft); }
.grow { flex: 1; }
.bar-spacer { width: var(--tap); flex: none; }
[hidden] { display: none !important; }

/* --- The brand mark: a bowl, drawn in CSS so it costs nothing ------------ */
.brand-mark, .boot-mark, .empty-mark {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #6d9d5e, var(--herb) 55%, var(--herb-deep));
  box-shadow: inset 0 -6px 14px rgba(0,0,0,.16), var(--shadow-md);
  position: relative;
}
.brand-mark::after, .boot-mark::after, .empty-mark::after {
  content: "";
  position: absolute;
  left: 20%; right: 20%; top: 40%;
  height: 30%;
  border-radius: 0 0 60px 60px;
  background: linear-gradient(var(--card), var(--paper-deep));
  box-shadow: 0 -2px 0 rgba(255,255,255,.35);
}
.empty-mark { width: 60px; height: 60px; opacity: .55; }

/* ==========================================================================
   Boot cover
   ========================================================================== */

.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  background: var(--paper);
  transition: opacity .3s ease;
}
.boot.is-gone { opacity: 0; pointer-events: none; }
.boot-name { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.boot-mark { animation: rise .7s ease both; }
@keyframes rise { from { transform: translateY(8px) scale(.94); opacity: 0; } }

/* ==========================================================================
   Sign in
   ========================================================================== */

.screen-auth {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
}
.auth-wrap { width: 100%; max-width: 400px; }

.brand { text-align: center; display: grid; justify-items: center; gap: 10px; margin-bottom: 26px; }
.brand-name { font-size: 30px; }
.brand-tag { color: var(--ink-soft); font-size: 15px; max-width: 300px; }

.auth-card { margin-bottom: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card-title { font-size: 19px; margin-bottom: 4px; }
.card-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }

.code-input {
  font-size: 30px; font-weight: 650;
  letter-spacing: .3em; text-align: center;
  padding-left: .3em;
}
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.auth-foot { text-align: center; color: var(--ink-faint); font-size: 13px; margin-top: 18px; }
.auth-foot a { color: var(--ink-faint); }

/* ==========================================================================
   Fields and buttons
   ========================================================================== */

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field-label .opt { font-weight: 400; color: var(--ink-faint); }

input[type=text], input[type=email], input[type=search], input[type=number],
input[type=date], input[type=url], input[type=password], input[type=tel],
select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 11px 13px;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  outline: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  border-color: var(--herb);
  box-shadow: 0 0 0 3px var(--herb-lite);
}
input::placeholder, textarea::placeholder { color: #bcb0a0; }
select {
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  padding-right: 32px;
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

.stepper {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--field-bg); overflow: hidden;
}
.stepper input {
  border: 0; border-radius: 0; text-align: center; min-width: 0;
  font-weight: 600; box-shadow: none;
}
.stepper input:focus { box-shadow: none; }
.step {
  width: 46px; flex: none;
  border: 0; background: var(--paper-deep); color: var(--ink);
  font-size: 21px; line-height: 1; cursor: pointer;
}
.step:active { background: var(--line); }
.stepper.wide { max-width: 220px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform .08s, background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }

.btn-primary { background: var(--herb); color: var(--on-herb); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--herb-deep); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-deep); }
.btn-ghost.danger, .btn.danger { color: var(--danger); }
.btn-danger { background: var(--danger-lite); color: var(--danger); border-color: #f0cec5; }

.icon-btn {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--paper-deep); color: var(--ink); }
.icon-btn.solid { background: var(--herb); color: var(--on-herb); }
.icon-btn.solid:hover { background: var(--herb-deep); }

.link {
  border: 0; background: none; padding: 0;
  color: var(--herb-deep); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.hint { font-size: 13px; color: var(--ink-faint); }

.form-msg { min-height: 20px; font-size: 14px; margin: 4px 0 10px; color: var(--danger); }
.form-msg.is-good { color: var(--herb-deep); }
.form-msg:empty { min-height: 0; margin: 0; }

/* ==========================================================================
   App frame
   ========================================================================== */

.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + var(--safe-top)) 8px 6px 18px;
  background: var(--bar-bg);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-title { font-size: 21px; flex: 1; }
.topbar-actions { display: flex; }

.main {
  flex: 1;
  padding: 14px 16px calc(var(--tabbar-h) + 28px + var(--safe-bottom));
  max-width: 900px; width: 100%; margin: 0 auto;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  padding-bottom: var(--safe-bottom);
  background: var(--bar-bg-2);
  backdrop-filter: saturate(1.6) blur(10px);
  border-top: 1px solid var(--line);
}
.tab-btn {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h);
  border: 0; background: none; color: var(--ink-faint);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
}
.tab-btn .i { width: 24px; height: 24px; }
.tab-btn.is-on { color: var(--herb); }
.pip {
  position: absolute; top: 9px; left: 50%; margin-left: 7px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--clay); color: #fff;
  font-size: 10px; font-style: normal; line-height: 17px; text-align: center;
}

.fab {
  position: fixed; right: 18px;
  bottom: calc(var(--tabbar-h) + 18px + var(--safe-bottom));
  z-index: 25;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: var(--herb); color: var(--on-herb);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .12s;
}
.fab:active { transform: scale(.94); }
.fab .i { width: 26px; height: 26px; }

/* ==========================================================================
   Toolbar, chips
   ========================================================================== */

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

.search { position: relative; flex: 1; display: flex; align-items: center; }
.search .i { position: absolute; left: 12px; color: var(--ink-faint); pointer-events: none; }
.search input { padding-left: 40px; border-radius: 999px; }
.search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search.plain { margin-bottom: 16px; }

.mini-select { width: auto; min-height: var(--tap); border-radius: 999px; }
.mini-select.grow { flex: 1; }

.chips {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 14px; padding: 2px 16px 4px;
}
.chips::-webkit-scrollbar { display: none; }
.chips:empty { display: none; }
.chip {
  flex: none;
  min-height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-soft);
  font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.chip.is-on { background: var(--herb); border-color: var(--herb); color: var(--on-herb); }
.chip em { font-style: normal; opacity: .65; font-weight: 500; }

/* ==========================================================================
   Recipe cards
   ========================================================================== */

.cards { display: grid; gap: 12px; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }

.rcard {
  display: flex; gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  padding: 0;
  transition: transform .1s, box-shadow .15s;
}
.rcard:active { transform: scale(.99); }
.rcard:hover { box-shadow: var(--shadow-md); }

.rcard-shot {
  width: 104px; flex: none;
  background: var(--herb-lite) center/cover no-repeat;
  position: relative;
}
.rcard-shot.is-blank { display: flex; align-items: center; justify-content: center; color: var(--herb-edge); }
.rcard-shot.is-blank .i { width: 30px; height: 30px; }

.rcard-body { padding: 13px 14px; min-width: 0; flex: 1; display: grid; gap: 6px; align-content: start; }
.rcard-title { font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.rcard-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--ink-faint); }
.rcard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.rcard-meta .i { width: 14px; height: 14px; }
.rcard-credit { font-size: 12.5px; color: var(--ink-soft); }
.rcard-credit strong { font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650;
  background: var(--herb-lite); color: var(--herb-deep);
}
.badge .i { width: 13px; height: 13px; }
.badge.clay { background: var(--clay-lite); color: var(--clay); }
.badge.plain { background: var(--paper-deep); color: var(--ink-soft); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================================
   Empty states
   ========================================================================== */

.empty {
  display: grid; justify-items: center; gap: 10px;
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-soft);
}
.empty h2 { font-size: 18px; color: var(--ink); }
.empty p { font-size: 14.5px; max-width: 320px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }

.foot-note { text-align: center; color: var(--ink-faint); font-size: 12.5px; padding: 26px 0 4px; }
.foot-note a { color: var(--ink-faint); }

/* ==========================================================================
   Sheets and modals
   ========================================================================== */

.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--paper);
  animation: sheet-up .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheet-up { from { transform: translateY(18px); opacity: 0; } }

.sheet-bar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + var(--safe-top)) 10px 6px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.sheet-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(28px + var(--safe-bottom));
  max-width: 720px; width: 100%; margin: 0 auto;
}
.sheet-half {
  top: auto;
  height: min(88dvh, 760px);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.sheet-half .sheet-bar { border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* A half sheet leaves the app showing above it, so the app gets dimmed to
   make clear which of the two you are working in. */
body.has-scrim::after {
  content: "";
  position: fixed; inset: 0; z-index: 55;
  background: var(--scrim);
  animation: fade .18s ease;
}

.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--scrim);
  backdrop-filter: blur(3px);
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: grid; gap: 12px;
}
.modal-card.wide { max-width: 520px; }
.modal-card h3 { font-size: 18px; }
.modal-card p { font-size: 14.5px; color: var(--ink-soft); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ==========================================================================
   Recipe view
   ========================================================================== */

.hero {
  margin: -18px -16px 16px;
  aspect-ratio: 16 / 10;
  background: var(--herb-lite) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.hero.is-blank { aspect-ratio: auto; height: 96px; color: var(--herb-edge); }
.hero-strip { display: flex; gap: 8px; overflow-x: auto; margin: -18px -16px 16px; padding: 0; scrollbar-width: none; }
.hero-strip::-webkit-scrollbar { display: none; }
.hero-strip img { height: 210px; flex: none; object-fit: cover; }
.hero-strip img:only-child { width: 100%; }

.view-head { display: grid; gap: 10px; margin-bottom: 18px; }
.view-title { font-size: 25px; }
.view-credit {
  font-size: 13.5px; color: var(--ink-soft);
  background: var(--paper-deep); border-radius: var(--r);
  padding: 9px 12px;
}
.view-credit strong { color: var(--ink); }

.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; color: var(--ink-soft);
}
.fact strong { color: var(--ink); font-weight: 650; }
.fact .i { width: 15px; height: 15px; color: var(--ink-faint); }

.scaler {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--herb-lite);
  border: 1px solid var(--herb-edge);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 18px;
}
.scaler-label { font-size: 13.5px; font-weight: 600; color: var(--herb-deep); flex: 1; }
.scaler .stepper { max-width: 150px; }

.section { margin-bottom: 24px; }
.section > h3 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-faint); margin-bottom: 10px;
}

.ing-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ing-list li { display: flex; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line-soft); }
.ing-list li:first-child { border-top: 0; }
.ing-qty { font-weight: 650; color: var(--herb-deep); flex: none; min-width: 74px; }
.ing-name { flex: 1; }
.ing-note { color: var(--ink-faint); font-size: 13.5px; display: block; }

.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.step-list li {
  display: flex; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px;
  line-height: 1.55;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--herb-lite); color: var(--herb-deep);
  font-size: 13px; font-weight: 700;
}
.step-list.prep li::before { background: var(--clay-lite); color: var(--clay); }

.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; white-space: pre-wrap; line-height: 1.6; }

.view-actions { display: grid; gap: 10px; margin: 22px 0 8px; }
@media (min-width: 520px) { .view-actions { grid-template-columns: 1fr 1fr; } }

/* --- Comments ----------------------------------------------------------- */

.comments { display: grid; gap: 10px; }
.comment {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px;
}
.comment.tip { background: var(--clay-lite); border-color: #f0dccf; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 13px; }
.comment-who { font-weight: 650; }
.comment-when { color: var(--ink-faint); }
.comment-body { white-space: pre-wrap; line-height: 1.55; }
.comment-del { margin-left: auto; }

.comment-form { display: grid; gap: 10px; margin-top: 12px; }
.comment-kinds { display: flex; gap: 8px; }

/* ==========================================================================
   Recipe editor
   ========================================================================== */

.editor-block { margin: 22px 0; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.block-head h3 { font-size: 15px; flex: 1; }

.fold { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 16px; }
.fold summary {
  padding: 13px 15px; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "＋"; float: right; color: var(--ink-faint); }
.fold[open] summary::after { content: "－"; }
.fold-body { padding: 0 15px 6px; border-top: 1px solid var(--line-soft); padding-top: 14px; }

.ing-rows, .step-rows { display: grid; gap: 8px; margin-bottom: 10px; }

.ing-row {
  display: grid;
  grid-template-columns: 62px 66px 1fr var(--tap);
  gap: 6px; align-items: start;
}
.ing-row input { min-height: 42px; padding: 8px 10px; }
.ing-row .combo { grid-column: 3; min-width: 0; }
.ing-row .ing-note-input { grid-column: 1 / 4; }
.ing-row .drop { grid-column: 4; grid-row: 1; }

.step-row { display: grid; grid-template-columns: 1fr var(--tap); gap: 6px; align-items: start; }
.step-row textarea { min-height: 62px; }
.step-kind {
  grid-column: 1 / 3;
  display: flex; gap: 6px; align-items: center;
  font-size: 12.5px; color: var(--ink-faint);
}
.kind-toggle {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 3px 10px;
  font-size: 12px; font-weight: 650; cursor: pointer; color: var(--ink-soft);
}
.kind-toggle.prep { background: var(--clay-lite); color: var(--clay); border-color: #f0dccf; }
.kind-toggle.cook { background: var(--herb-lite); color: var(--herb-deep); border-color: var(--herb-edge); }

.two-up { display: flex; gap: 10px; }
.two-up .btn { flex: 1; }

.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.photo-strip:empty { display: none; }
.photo-thumb {
  position: relative; width: 92px; height: 92px;
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep) center/cover no-repeat;
}
.photo-thumb button {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(35, 30, 25, .68); color: #fff;
  cursor: pointer;
}
.photo-thumb button .i { width: 15px; height: 15px; }

/* ==========================================================================
   Planner
   ========================================================================== */

.weekbar {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
}
.weekbar-label { flex: 1; text-align: center; display: grid; gap: 1px; }
.weekbar-label strong { font-size: 15.5px; }

.days { display: grid; gap: 10px; }

.day {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.day.is-today { border-color: var(--herb); box-shadow: 0 0 0 2px var(--herb-lite); }
.day.is-past { opacity: .68; }

.day-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.day-name { font-weight: 650; font-size: 15px; flex: 1; }
.day-name em { font-style: normal; color: var(--ink-faint); font-weight: 500; margin-left: 6px; font-size: 13px; }
.day.is-today .day-name { color: var(--herb-deep); }
.day-add { width: 34px; height: 34px; }
.day-add .i { width: 19px; height: 19px; }

.day-meals { list-style: none; margin: 0; padding: 0; }
.day-meals:empty { display: none; }
.day-meal {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 10px 14px;
  border-top: 1px solid var(--line-soft);
}
.day-meals .day-meal:first-child { border-top: 0; }
.meal-shot {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  background: var(--herb-lite) center/cover no-repeat;
}
.meal-body { flex: 1; min-width: 0; cursor: pointer; }
.meal-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.meal-sub { font-size: 12.5px; color: var(--ink-faint); }
.day-empty { padding: 12px 14px; color: var(--ink-faint); font-size: 13.5px; }

.planner-foot { margin-top: 18px; }

.pick-list { display: grid; gap: 8px; }
.pick-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; text-align: left; width: 100%;
}
.pick-row:hover { background: var(--herb-lite); border-color: var(--herb-edge); }
.pick-row .meal-shot { width: 36px; height: 36px; }
.pick-body { flex: 1; min-width: 0; }

/* ==========================================================================
   Shopping list
   ========================================================================== */

.list-head { margin-bottom: 12px; }
.progress { height: 7px; border-radius: 4px; background: var(--paper-deep); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--herb); border-radius: 4px; transition: width .25s ease; }
.list-meta { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }

.shop-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }

.shop-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 4px 4px 6px;
  min-height: 56px;
  touch-action: pan-y;
}
.shop-item.is-done { background: var(--paper-deep); border-color: var(--line-soft); }
.shop-item.is-done .item-name { text-decoration: line-through; color: var(--ink-faint); }
.shop-item.is-done .item-qty { color: var(--ink-faint); }
.shop-item.dragging {
  box-shadow: var(--shadow-md);
  border-color: var(--herb);
  opacity: .97;
  position: relative; z-index: 3;
}
.shop-item.drag-over { border-color: var(--herb); }

.grip {
  width: 34px; align-self: stretch;
  display: grid; place-items: center;
  color: #c8bcab;
  cursor: grab; touch-action: none;
  flex: none;
}
.grip .i { width: 18px; height: 18px; }
.grip:active { cursor: grabbing; }

.tickbox {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 9px;
  background: var(--field-bg); color: transparent;
  cursor: pointer;
}
.tickbox .i { width: 19px; height: 19px; }
.shop-item.is-done .tickbox { background: var(--herb); border-color: var(--herb); color: var(--on-herb); }

.item-body { flex: 1; min-width: 0; padding: 6px 2px; cursor: pointer; }
.item-name { font-weight: 600; line-height: 1.3; }
.item-qty { color: var(--herb-deep); font-weight: 650; font-size: 14px; }
.item-sub { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
.item-drop { margin-right: 2px; }

.add-item { display: flex; gap: 8px; margin-bottom: 16px; }
.add-item input { border-radius: 999px; }

.list-actions { display: grid; gap: 8px; }
@media (min-width: 520px) { .list-actions { grid-template-columns: repeat(3, 1fr); } }

/* --- Build sheet --------------------------------------------------------- */

.build-meals { display: grid; gap: 6px; margin-bottom: 8px; }
.build-day { font-size: 12.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .07em; margin-top: 10px; }
.build-meal {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 12px; cursor: pointer;
  text-align: left;
}
.build-meal.is-on { border-color: var(--herb); background: var(--herb-lite); }
.build-meal .tickbox { width: 26px; height: 26px; border-radius: 8px; }
.build-meal.is-on .tickbox { background: var(--herb); border-color: var(--herb); color: var(--on-herb); }

/* --- Import -------------------------------------------------------------- */

.lede { color: var(--ink-soft); margin-bottom: 16px; }
.note-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px; margin-bottom: 16px;
}
.note-card h3 { font-size: 15px; margin-bottom: 8px; }
.note-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.tight { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
code {
  background: var(--paper-deep); border-radius: 5px; padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
}
.import-rows { display: grid; gap: 6px; margin-bottom: 6px; }
.import-row {
  display: flex; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 12px; font-size: 14px;
}
.import-row.is-bad { background: var(--danger-lite); border-color: #f0cec5; color: var(--danger); }
.import-row .grow { min-width: 0; }
.import-row strong { display: block; font-weight: 650; }

/* ==========================================================================
   Settings
   ========================================================================== */

.settings-rows { margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px; color: var(--ink-soft);
}
.settings-row:first-child { border-top: 0; }
.settings-row strong { margin-left: auto; color: var(--ink); font-weight: 600; text-align: right; word-break: break-word; }
.sheet-body > .btn-block { margin-bottom: 10px; }

/* ==========================================================================
   Toasts
   ========================================================================== */

.toaster {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 16px + var(--safe-bottom));
  z-index: 95;
  display: grid; gap: 8px; justify-items: center;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  background: var(--toast-bg); color: var(--toast-ink);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toast-in .22s ease;
  max-width: 100%;
}
.toast.is-good { background: var(--herb-deep); color: var(--on-herb); }
.toast.is-bad { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ==========================================================================
   Wider screens: the app stays a single readable column, just roomier.
   ========================================================================== */

@media (min-width: 760px) {
  .main { padding-top: 20px; }
  .rcard-shot { width: 132px; }
  .hero-strip img { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   Segmented control — used for the shopping order and the theme
   ========================================================================== */

.segmented {
  display: flex; gap: 2px;
  padding: 3px;
  background: var(--paper-deep);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.segmented button {
  flex: 1;
  min-height: 34px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: none; color: var(--ink-soft);
  font-size: 13.5px; font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.segmented button.is-on {
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.sort-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sort-bar .segmented { flex: none; }
.sort-note { font-size: 12.5px; color: var(--ink-faint); flex: 1; }

/* ==========================================================================
   Ingredient picker inside the recipe editor
   ========================================================================== */

.combo { position: relative; }

.combo-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 12;
  max-height: 232px; overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
}
.combo-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: 0; border-top: 1px solid var(--line-soft);
  background: none; color: inherit;
  text-align: left; cursor: pointer;
}
.combo-item:first-child { border-top: 0; }
.combo-item.is-active, .combo-item:hover { background: var(--herb-lite); }
.combo-body { flex: 1; min-width: 0; }
.combo-name { font-weight: 600; font-size: 14.5px; }
.combo-meta { font-size: 12px; color: var(--ink-faint); }
.combo-item.is-new .combo-name { color: var(--herb-deep); font-weight: 650; }

/* ==========================================================================
   The ingredient list
   ========================================================================== */

.pantry-rows { display: grid; gap: 7px; }

.pantry-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left; cursor: pointer;
}
.pantry-row:hover { border-color: var(--herb-edge); }
.pantry-body { flex: 1; min-width: 0; }
.pantry-name { font-weight: 600; }
.pantry-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; }
.pantry-price { color: var(--herb-deep); font-weight: 650; }

.pantry-head {
  background: var(--herb-lite);
  border: 1px solid var(--herb-edge);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13.5px; color: var(--ink-soft);
}
.pantry-head strong { color: var(--ink); }

.price-row { display: flex; align-items: flex-end; gap: 8px; }
.price-row .field { margin-bottom: 0; }
.price-row .for { padding-bottom: 13px; color: var(--ink-faint); font-size: 13.5px; }

/* ==========================================================================
   Extra bits on a shopping item
   ========================================================================== */

.item-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.item-cost { color: var(--ink-soft); font-weight: 600; }
.item-shop {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 999px;
  /* Outlined rather than filled: a ticked-off row is already tinted, and a
     filled pill would disappear into it. */
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11.5px; font-weight: 600;
}
.list-total { font-weight: 650; color: var(--ink); }

/* ==========================================================================
   Help and support
   ========================================================================== */

.help-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
}
.help-block h3 { font-size: 15.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.help-block h3 .i { width: 19px; height: 19px; color: var(--herb); }
.help-block p { color: var(--ink-soft); font-size: 14.5px; }
.help-block p + p { margin-top: 8px; }
.help-block ol, .help-block ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; }
.help-block li + li { margin-top: 4px; }
.help-block strong { color: var(--ink); }

.help-fold { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 10px; }
.help-fold summary {
  padding: 14px 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 650;
  display: flex; align-items: center; gap: 10px;
}
.help-fold summary::-webkit-details-marker { display: none; }
.help-fold summary::after { content: "＋"; margin-left: auto; color: var(--ink-faint); font-weight: 400; }
.help-fold[open] summary::after { content: "－"; }
.help-fold summary .i { width: 19px; height: 19px; color: var(--herb); }
.help-fold .fold-body { padding: 0 16px 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.help-fold .fold-body p { color: var(--ink-soft); font-size: 14.5px; }
.help-fold .fold-body p + p { margin-top: 8px; }
.help-fold .fold-body ol, .help-fold .fold-body ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; }

.promo {
  background: linear-gradient(160deg, var(--herb-lite), var(--card));
  border: 1px solid var(--herb-edge);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  margin-top: 18px;
}
.promo h3 { font-size: 16px; margin-bottom: 6px; }
.promo p { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }

.theme-row { margin: 18px 0; }
.theme-row .field-label { margin-bottom: 8px; }

/* ==========================================================================
   Importing from a link
   ========================================================================== */

.url-row { display: flex; gap: 8px; align-items: center; }
.url-row .search { flex: 1; }
.url-row .btn { flex: none; }

.or-line {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px;
  color: var(--ink-faint); font-size: 12.5px;
}
.or-line::before, .or-line::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.import-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--herb-lite);
  border: 1px solid var(--herb-edge);
  border-radius: var(--r);
  padding: 11px 13px;
  margin-bottom: 16px;
  font-size: 13.5px; color: var(--ink-soft);
}
.import-banner .i { color: var(--herb); flex: none; }
.import-banner strong { color: var(--ink); }

/* ==========================================================================
   Switches, for the yes/no settings
   ========================================================================== */

.switch { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .switch-body { flex: 1; }
.switch-title { display: block; font-weight: 600; }
.switch-sub { display: block; font-size: 13px; color: var(--ink-faint); margin-top: 1px; }

.switch::before {
  content: "";
  flex: none; order: 2;
  width: 48px; height: 29px;
  border-radius: 999px;
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .18s;
}
.switch::after {
  content: "";
  position: absolute;
  width: 23px; height: 23px; margin: 3px 0 0 -45px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s;
  order: 3;
}
.switch { position: relative; }
.switch:has(input:checked)::before { background: var(--herb); }
.switch:has(input:checked)::after { transform: translateX(19px); }

.settings-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-bottom: 12px;
}
.settings-note h3 { font-size: 15px; margin-bottom: 6px; }
.settings-note p { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 12px; }

/* ==========================================================================
   Cook mode — read at arm's length, with wet hands
   ========================================================================== */

.sheet.cook { background: var(--paper); }

.cook-bar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + var(--safe-top)) 10px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.cook-body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 22px;
  overflow-y: auto;
  text-align: center;
  cursor: pointer;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.cook-count {
  font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--herb); margin-bottom: 14px;
}
.cook-text {
  font-size: clamp(21px, 5.2vw, 30px);
  line-height: 1.42;
  letter-spacing: -.01em;
}
.cook-text.is-prep::before {
  content: "Prep";
  display: inline-block;
  margin-right: 10px; padding: 2px 10px;
  border-radius: 999px;
  background: var(--clay-lite); color: var(--clay);
  font-size: 13px; font-weight: 700; vertical-align: middle;
}

.cook-timer { margin-top: 26px; display: flex; justify-content: center; }
.cook-timer:empty { display: none; }
.timer-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: var(--tap); padding: 0 20px;
  border: 1px solid var(--herb-edge); border-radius: 999px;
  background: var(--herb-lite); color: var(--herb-deep);
  font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.timer-btn.is-running { background: var(--herb); border-color: var(--herb); color: var(--on-herb); }
.timer-btn.is-done { background: var(--clay-lite); border-color: var(--clay); color: var(--clay); }

.cook-nav {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line-soft);
}
.cook-nav .btn { min-width: 108px; }
.cook-dots { flex: 1; display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.cook-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.cook-dot.is-on { background: var(--herb); transform: scale(1.3); }
.cook-dot.is-done { background: var(--herb-edge); }

.cook-panel {
  position: absolute; inset: auto 0 0 0;
  max-height: 72%;
  display: flex; flex-direction: column;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-up .2s ease;
  z-index: 3;
}
.cook-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.cook-panel-head h3 { flex: 1; font-size: 16px; }
.cook-ings {
  list-style: none; margin: 0; padding: 6px 12px calc(18px + var(--safe-bottom));
  overflow-y: auto;
}
.cook-ings li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 6px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
}
.cook-ings li:first-child { border-top: 0; }
.cook-ings li.is-got { opacity: .45; text-decoration: line-through; }
.cook-ings .ing-qty { min-width: 84px; }

/* ==========================================================================
   Stars
   ========================================================================== */

.icon-btn[aria-pressed="true"] { color: var(--clay); }
.icon-btn.starred .i { fill: currentColor; }

.card-star {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .28); color: #fff;
  cursor: pointer;
}
.card-star .i { width: 17px; height: 17px; fill: currentColor; }

/* ==========================================================================
   Printing a recipe
   ========================================================================== */

@media print {
  .app, .topbar, .tabbar, .fab, .toaster, .sheet-bar, .view-actions,
  .scaler, #comment-area, .cook-nav, .modal { display: none !important; }

  body, .sheet, .sheet-body { background: #fff !important; color: #000 !important; }
  .sheet { position: static !important; }
  .sheet-body { overflow: visible !important; max-width: none; padding: 0; }

  .hero-strip { max-height: 220px; overflow: hidden; }
  .hero-strip img { height: 200px; }

  .ing-list, .step-list li, .prose {
    border: 1px solid #ddd !important;
    background: #fff !important;
    break-inside: avoid;
  }
  .view-title { font-size: 24pt; }
  a[href]::after { content: ""; }
}

/* ==========================================================================
   The suggestion — "what shall we have?"
   ========================================================================== */

.suggest {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 0 8px 0 0;
  margin-bottom: 14px;
  background: linear-gradient(120deg, var(--herb-lite), var(--card) 70%);
  border: 1px solid var(--herb-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  text-align: left; cursor: pointer;
  overflow: hidden;
}
.suggest:hover { box-shadow: var(--shadow-md); }
.suggest-shot {
  width: 92px; align-self: stretch; flex: none;
  background: var(--herb-lite) center/cover no-repeat;
}
.suggest-body { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 13px 0; }
.suggest-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--herb-deep);
}
.suggest-title { font-size: 16.5px; font-weight: 650; line-height: 1.25; }
.suggest-meta { font-size: 12.5px; color: var(--ink-faint); }

/* A second chips row for the filters sits tighter to the one below it. */
#recipe-filters { margin-bottom: 8px; }
.chip.divider { pointer-events: none; padding: 0; border: 0; background: none; width: 1px; }
.chip .i { width: 15px; height: 15px; }

.rcard-times { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--ink-faint); }
.rcard-times b { font-weight: 650; color: var(--ink-soft); }
.rcard-cooked { color: var(--herb-deep); font-weight: 600; }

/* The sort dropdown must not squeeze the search box out of existence when a
   long option like "Cooked recently" is chosen. */
#recipe-sort { max-width: 42%; }
