/* FamFood design system. Tokens first, then components, then layout. */

:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* colour */
  --bg: #f4efe4;
  --surface: #fffdf7;
  --surface-2: #f0eadb;
  --surface-3: #e5dece;
  --ink: #1d2620;
  --ink-2: #56604f;
  --ink-3: #847f6d;
  --line: #e2d9c5;
  --line-2: #cfc4aa;
  --brand: #a8402a;
  --brand-ink: #fffaf2;
  --brand-soft: #f5e1d6;
  --saffron: #c98f2b;
  --saffron-soft: #f8eccf;
  --herb: #2e6a4f;
  --herb-soft: #dcebe0;
  --gold: #9a6a12;
  --gold-soft: #f7ecd0;
  --danger: #a3302a;
  --danger-soft: #f7dfdb;
  --focus: #2f5fa8;
  --forest: #1b3a2d;
  --forest-2: #2e5c47;
  --scrim: rgba(18, 24, 20, .42);

  /* shape + depth */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(35, 25, 5, .06);
  --shadow-2: 0 2px 6px rgba(35, 25, 5, .06), 0 10px 24px rgba(35, 25, 5, .07);
  --shadow-3: 0 12px 40px rgba(35, 25, 5, .22);

  /* rhythm */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar: 236px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1411; --surface: #161e1a; --surface-2: #1d2722; --surface-3: #26312b;
    --ink: #ece8dc; --ink-2: #a9b3a5; --ink-3: #78856f; --line: #26322b; --line-2: #36443b;
    --brand: #e9825f; --brand-soft: #3a2119; --saffron: #e2b15a; --saffron-soft: #3a2f16;
    --herb: #7cc6a0; --herb-soft: #17362a; --gold: #e6b860; --gold-soft: #372f17;
    --danger: #f08a80; --danger-soft: #3b1f1c; --focus: #8fb4ff;
    --forest: #0a1a14; --forest-2: #1d4234; --scrim: rgba(0, 0, 0, .6);
    --shadow-1: none; --shadow-2: 0 2px 10px rgba(0, 0, 0, .35); --shadow-3: 0 16px 50px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1411; --surface: #161e1a; --surface-2: #1d2722; --surface-3: #26312b;
  --ink: #ece8dc; --ink-2: #a9b3a5; --ink-3: #78856f; --line: #26322b; --line-2: #36443b;
  --brand: #e9825f; --brand-soft: #3a2119; --saffron: #e2b15a; --saffron-soft: #3a2f16;
  --herb: #7cc6a0; --herb-soft: #17362a; --gold: #e6b860; --gold-soft: #372f17;
  --danger: #f08a80; --danger-soft: #3b1f1c; --focus: #8fb4ff;
  --forest: #0a1a14; --forest-2: #1d4234; --scrim: rgba(0, 0, 0, .6);
  --shadow-1: none; --shadow-2: 0 2px 10px rgba(0, 0, 0, .35); --shadow-3: 0 16px 50px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 720; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.num { font-variant-numeric: tabular-nums; }
.i { flex: 0 0 auto; vertical-align: middle; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: var(--s4); }
.grow { flex: 1 1 auto; min-width: 0; }
.hide-sm { display: initial; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: var(--s5) var(--s4);
  display: flex; flex-direction: column; gap: var(--s6); border-right: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; padding: var(--s1) var(--s2); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  background: linear-gradient(145deg, var(--forest-2), var(--forest)); color: var(--saffron); box-shadow: 0 6px 16px color-mix(in srgb, var(--forest) 40%, transparent); border: 1px solid color-mix(in srgb, var(--saffron) 35%, transparent);
}
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: var(--s3); padding: 9px var(--s3); border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink-2); font-weight: 600; transition: background .15s var(--ease), color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav .count { margin-left: auto; font-size: .75rem; background: var(--surface-3); padding: 1px 7px; border-radius: 99px; color: var(--ink-2); }
.nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 0 var(--s3); font-weight: 700; margin-top: var(--s2); }
.sidebar-foot { margin-top: auto; display: grid; gap: var(--s2); }
.search-trigger {
  display: flex; align-items: center; gap: var(--s2); width: 100%; padding: 9px var(--s3); border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); cursor: pointer; text-align: left;
}
.kbd { font: 600 .7rem var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--ink-2); background: var(--surface); }
.main { min-width: 0; padding: var(--s8) var(--s8) var(--s10); max-width: 1280px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.page-head p { color: var(--ink-2); margin-top: 6px; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.section { margin-top: var(--s10); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.section-head a { font-size: .9rem; font-weight: 600; color: var(--brand); text-decoration: none; }

.tabbar { display: none; }

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); padding: 9px 16px; min-height: 40px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 650; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-1);
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: .86rem; border-radius: 9px; }
.btn.lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; border-radius: 14px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.fav { color: var(--ink-3); }
.btn.fav[aria-pressed="true"] { color: var(--brand); }
.btn.fav[aria-pressed="true"] .i { fill: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650;
  background: hsl(var(--h, 20) 38% 90%); color: hsl(var(--h, 20) 42% 24%); white-space: nowrap; line-height: 1.5;
}
:root[data-theme="dark"] .chip, :root:not([data-theme="light"]) .chip { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip { background: hsl(var(--h, 20) 26% 20%); color: hsl(var(--h, 20) 55% 84%); } }
:root[data-theme="dark"] .chip { background: hsl(var(--h, 20) 26% 20%); color: hsl(var(--h, 20) 55% 84%); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.herb { background: var(--herb-soft); color: var(--herb); border-color: transparent; }
.tag.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }

.field { display: grid; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-weight: 500; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); }
.textarea { min-height: 110px; resize: vertical; }
.input.search { padding-left: 40px; background-position: 12px center; }
.search-box { position: relative; }
.search-box .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box .input { padding-left: 40px; }

/* segmented control (radio group styled as pills) */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 5px 9px; border-radius: 999px; font-size: .84rem; font-weight: 650; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.segmented input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.segmented input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); }

.switch { position: relative; display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; margin: 0; border: 0; }
.switch input::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked { background: var(--herb); }
.switch input:checked::after { transform: translateX(18px); }

.check { width: 22px; height: 22px; accent-color: var(--herb); cursor: pointer; flex: 0 0 auto; margin: 0; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: var(--s5);
}
.card.flat { box-shadow: none; }
.card.hover { transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }

.stat { display: grid; gap: 2px; padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat b { font-size: 1.6rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .85rem; }

.hero-banner {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--s8); color: #fff; min-height: 220px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(226, 177, 90, .30), transparent 55%), linear-gradient(130deg, var(--forest) 0%, var(--forest-2) 60%, #3d6b55 120%); display: grid; align-content: end; gap: var(--s3);
  box-shadow: var(--shadow-2);
}
.hero-banner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(226,177,90,.28), transparent); pointer-events: none;
}
.hero-banner h1 { color: #fffaf0; max-width: 18ch; }
.hero-banner p { color: rgba(255,250,240,.84); max-width: 52ch; }
.hero-banner .btn.primary { background: var(--saffron); color: var(--forest); border-color: var(--saffron); box-shadow: none; }
.hero-banner .btn.ghost { color: #fff; }

.empty {
  text-align: center; padding: var(--s10) var(--s6); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  display: grid; justify-items: center; gap: var(--s3); color: var(--ink-2); background: var(--surface);
}
.empty .orb {
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px;
}
.empty h3 { color: var(--ink); }

/* ---------- media ---------- */
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-3); }
.tile {
  width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; font-weight: 800; font-size: 2.4rem; letter-spacing: -.03em;
  color: hsl(var(--h, 20) 35% 30%);
  background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h, 20) 35% 91%), hsl(calc(var(--h, 20) + 25) 30% 80%));
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile { color: hsl(var(--h, 20) 80% 88%); background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h, 20) 24% 24%), hsl(calc(var(--h, 20) + 25) 24% 17%)); } }
:root[data-theme="dark"] .tile { color: hsl(var(--h, 20) 80% 88%); background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h, 20) 24% 24%), hsl(calc(var(--h, 20) + 25) 24% 17%)); }
figure { margin: 0; }
figcaption { font-size: .75rem; color: var(--ink-3); margin-top: 6px; padding: 0 12px; }
figcaption a { color: inherit; }

/* ---------- recipe cards ---------- */
.rcard { display: flex; flex-direction: column; overflow: hidden; padding: 0; position: relative; text-decoration: none; }
.rcard .media { position: relative; overflow: hidden; }
.rcard .media img, .rcard .media .tile { transition: transform .5s var(--ease); }
.rcard:hover .media img, .rcard:hover .media .tile { transform: scale(1.04); }
.rcard .fav-btn { position: absolute; top: 10px; right: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); }
.rcard .body { padding: var(--s4); display: grid; gap: var(--s2); }
.rcard .meta { display: flex; gap: var(--s3); color: var(--ink-2); font-size: .84rem; flex-wrap: wrap; }
.rcard .meta span { display: inline-flex; align-items: center; gap: 4px; }
.match-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.match-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--herb), var(--saffron)); border-radius: 99px; }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--herb), var(--saffron)); border-radius: 99px; transition: width .35s var(--ease); }
.ring { --p: 0; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--herb) calc(var(--p) * 1%), var(--surface-3) 0); flex: 0 0 auto; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* ---------- calendar ---------- */
.week { margin-bottom: var(--s8); }
.week-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s3); }
.week-head h2 { font-size: 1.05rem; }
.days { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.day {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-1); transition: transform .15s var(--ease), box-shadow .2s, border-color .2s; min-width: 0;
}
.day:hover { box-shadow: var(--shadow-2); }
.day.drag-over { outline: 2px dashed var(--brand); outline-offset: 3px; }
.day.dragging { opacity: .45; transform: scale(.98); }
.day .media img, .day .media .tile { aspect-ratio: 16 / 10; height: auto; }
.day .body { padding: var(--s3); display: grid; gap: 6px; flex: 1; align-content: start; }
.day .dnum { font-size: .7rem; font-weight: 800; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.day .dname { font-weight: 700; line-height: 1.25; font-size: .95rem; overflow-wrap: anywhere; }
.day .dname a { text-decoration: none; }
.day .dname a:hover { text-decoration: underline; text-underline-offset: 3px; }
.day .dfoot { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; align-items: center; flex-wrap: wrap; }
.day .grip { cursor: grab; color: var(--ink-3); }
.day .grip:active { cursor: grabbing; }
.day .time { font-size: .78rem; color: var(--ink-2); }

/* ---------- shopping ---------- */
.shop-layout { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.summary { position: sticky; top: var(--s6); display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.aisles { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.aisle { padding: 0; overflow: hidden; }
.aisle-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.aisle-head h3 { display: flex; align-items: center; gap: var(--s2); font-size: .95rem; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 11px var(--s4); border-top: 1px solid var(--line); transition: background .15s; }
.item:first-of-type { border-top: 0; }
.item:hover { background: var(--surface-2); }
.item .name { font-weight: 650; }
.item .amt { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.item .used { display: block; font-size: .78rem; color: var(--ink-3); margin-top: 2px; }
.item.done .name, .item.done .amt { text-decoration: line-through; color: var(--ink-3); }
.item.have { opacity: .55; }
.item .have-btn { font-size: .75rem; color: var(--ink-2); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; white-space: nowrap; }
.item .have-btn:hover { background: var(--surface-3); color: var(--ink); }
.item .have-btn[aria-pressed="true"] { color: var(--herb); }

/* ---------- command palette ---------- */
.palette-backdrop { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); display: none; z-index: 60; align-items: flex-start; justify-content: center; padding: 12vh var(--s4) var(--s4); }
.palette-backdrop.open { display: flex; animation: fade .15s var(--ease); }
.palette { width: min(640px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); border: 1px solid var(--line); overflow: hidden; animation: pop .2s var(--ease); }
.palette-input { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input input { flex: 1; border: 0; background: transparent; font-size: 1.05rem; color: var(--ink); outline: none; }
.palette-list { max-height: 60vh; overflow: auto; padding: var(--s2); }
.palette-item { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-sm); text-decoration: none; cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--brand-soft); }
.palette-item .thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; overflow: hidden; }
.palette-item .thumb .tile { font-size: 1rem; aspect-ratio: auto; height: 100%; }
.palette-group { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: var(--s3) var(--s3) var(--s1); }
.palette-foot { display: flex; gap: var(--s4); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8rem; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 24px; right: 24px; display: grid; gap: var(--s2); z-index: 80; }
.toast {
  display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-3); font-weight: 600; animation: rise .25s var(--ease); max-width: 360px;
}
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s; }

/* ---------- cook mode ---------- */
.cook-overlay { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: none; overflow: auto; }
.cook-overlay.open { display: block; animation: fade .2s var(--ease); }
.cook-inner { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; max-width: 880px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s8); gap: var(--s6); }
.cook-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.cook-step { display: grid; align-content: center; gap: var(--s6); }
.cook-step .num { font-size: .9rem; font-weight: 800; color: var(--brand); letter-spacing: .08em; text-transform: uppercase; }
.cook-step p { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); line-height: 1.35; letter-spacing: -.02em; font-weight: 600; }
.cook-timer { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.cook-timer .clock { font: 800 2.4rem var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cook-timer.done .clock { color: var(--herb); }
.cook-nav { display: flex; justify-content: space-between; gap: var(--s3); }
.cook-nav .btn { min-height: 56px; font-size: 1.05rem; padding: 0 24px; flex: 1; }
.cook-dots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.cook-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.cook-dots i.on { background: var(--brand); }
.cook-dots i.past { background: var(--herb); }

/* ---------- recipe page ---------- */
.recipe-hero { display: grid; gap: var(--s8); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
.recipe-hero .hero-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.recipe-hero .hero-img .photo, .recipe-hero .hero-img .tile { aspect-ratio: 4 / 3; }
.facts { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); margin: var(--s5) 0; }
.fact { padding: var(--s3); border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font-size: 1.15rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fact span { font-size: .78rem; color: var(--ink-2); }
.scaler { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.scaler a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; text-decoration: none; color: var(--ink-2); font-weight: 700; }
.scaler a:hover { background: var(--surface); color: var(--ink); }
.scaler b { min-width: 74px; text-align: center; font-size: .92rem; }
.recipe-body { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); margin-top: var(--s10); align-items: start; }
.ing-list, .method { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); padding: 11px 0; border-top: 1px solid var(--line); align-items: start; }
.ing-list li:first-child { border-top: 0; }
.ing-list li.done span { color: var(--ink-3); text-decoration: line-through; }
.method { counter-reset: step; }
.method li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: var(--s3); padding: var(--s4) 0; border-top: 1px solid var(--line); }
.method li:first-child { border-top: 0; padding-top: 0; }
.method li::before {
  content: counter(step); width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-weight: 800;
  background: var(--brand-soft); color: var(--brand); font-variant-numeric: tabular-nums;
}
.method li.done { opacity: .5; }
.method li.done p { text-decoration: line-through; }
.method p { line-height: 1.6; }
.time-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 8px; border-radius: 8px; font-size: .78rem; font-weight: 650; background: var(--gold-soft); color: var(--gold); border: 0; cursor: pointer; }
.time-chip:hover { filter: brightness(.97); }
.notes textarea { min-height: 90px; }

/* ---------- forms in pages ---------- */
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.cuisine-picker { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cuisine-opt {
  position: relative; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--line); background: var(--surface);
  display: grid; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.cuisine-opt:hover { transform: translateY(-1px); }
.cuisine-opt .media { aspect-ratio: 16 / 9; overflow: hidden; }
.cuisine-opt .media img, .cuisine-opt .media .tile { aspect-ratio: 16 / 9; }
.cuisine-opt .info { padding: var(--s3); display: grid; gap: var(--s2); }
.cuisine-opt .info b { font-size: .98rem; }
.cuisine-opt .info small { color: var(--ink-3); }
.cuisine-opt:has(input:checked:not([value="0"])) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cuisine-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.cuisine-opt .info .segmented { justify-self: start; }

.pantry-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pantry-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.pantry-chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--surface-3); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.pantry-chip button:hover { background: var(--danger-soft); color: var(--danger); }
.suggest { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- tables and lists ---------- */
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4); border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .sub { color: var(--ink-2); font-size: .86rem; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s3); color: var(--ink-2); font-size: .82rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- animations ---------- */
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98) } to { opacity: 1; transform: none } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.reveal { animation: rise .45s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .05s; } .reveal:nth-child(3) { animation-delay: .1s; } .reveal:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shop-layout { grid-template-columns: 1fr; }
  .summary { position: static; grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app > div { min-width: 0; }
  .sidebar { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .brand-mark { width: 32px; height: 32px; font-size: 1rem; }
  .topbar .search-trigger { flex: 1; }
  .main { padding: var(--s5) var(--s4) 110px; }
  .recipe-hero, .recipe-body { grid-template-columns: 1fr; }
  .hero-banner { padding: var(--s6); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: .7rem; font-weight: 650; color: var(--ink-3); text-decoration: none; border-radius: 12px; }
  .tabbar a[aria-current="page"] { color: var(--brand); }
  .tabbar a[aria-current="page"] .i { transform: translateY(-1px); }
  .form-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .days { grid-template-columns: 1fr; }
  .days .day { flex-direction: row; }
  .days .day .media { width: 118px; flex: 0 0 118px; }
  .days .day .media img, .days .day .media .tile { aspect-ratio: 1; height: 100%; }
  .days .day .body { padding: var(--s3); }
  .grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .grid.wide, .aisles { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .page-head .btn { flex: 1; }
}

/* ---------- additions used by the page views ---------- */
.tabs-nav { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-nav a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 650; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-nav a.on, .tabs-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.fav-btn { position: absolute; top: 10px; right: 10px; z-index: 2; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow-1); }
.fav-btn[aria-pressed="true"] { color: var(--brand); }
.fav-btn[aria-pressed="true"] .i { fill: currentColor; }
.scaler a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.search-box .input[type="search"] { padding-left: 40px; }
.method li { grid-template-columns: 34px minmax(0, 1fr) auto; }
.method li > div { min-width: 0; }
.method li > input { justify-self: end; }
.method li.done > div p { text-decoration: line-through; color: var(--ink-3); }
.pantry-grid form { margin: 0; }
.day .dfoot form { margin: 0; }
.legend .i { color: var(--ink-3); }

.cuisine-opt .info .segmented { flex-wrap: nowrap; max-width: 100%; }
.cuisine-opt .info .segmented label { padding: 4px 8px; font-size: .8rem; }

/* ---------- logo ---------- */
.logo-mark {
  display: inline-block; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px;
  background: #000 url(/static/logo.jpg) no-repeat; background-size: 166px 111px; background-position: -62px -16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(226, 177, 90, .25);
}
.topbar .logo-mark { width: 36px; height: 36px; background-size: 136px 91px; background-position: -51px -13px; border-radius: 11px; }
.logo-wordmark {
  width: 230px; height: 145px; margin-bottom: var(--s2); background: url(/static/logo.jpg) no-repeat;
  background-size: 361px 241px; background-position: -76px -38px; mix-blend-mode: screen;
}
.brand-name { font-family: var(--font); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

/* ---------- pantry photo ---------- */
.photo-card { background: linear-gradient(135deg, var(--surface) 60%, var(--herb-soft)); }
.orb-lg { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--forest); color: var(--saffron); }
.photo-list { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.photo-item { display: flex; align-items: center; gap: var(--s3); padding: 11px var(--s4); border-top: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.photo-item:nth-child(-n+3) { border-top: 0; }

/* ---------- three meals a day ---------- */
[data-calendar].days { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); align-items: start; }
.day-card { padding: 0; overflow: hidden; }
.day-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.day-head .dnum { font-weight: 800; font-size: .9rem; letter-spacing: -.01em; color: var(--ink); text-transform: none; }
.meal { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px var(--s4); border-top: 1px solid var(--line); background: var(--surface); transition: background .15s; }
.day-head + .meal { border-top: 0; }
.meal:hover { background: var(--surface-2); }
.meal.dragging { opacity: .45; }
.meal.drag-over { outline: 2px dashed var(--brand); outline-offset: -4px; }
.meal[draggable="true"] { cursor: grab; }
.meal-thumb { display: block; width: 64px; height: 56px; border-radius: 12px; overflow: hidden; }
.meal-thumb .photo, .meal-thumb .tile { width: 64px; height: 56px; aspect-ratio: auto; font-size: 1.1rem; }
.meal-body { min-width: 0; display: grid; gap: 2px; }
.meal-slot { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--herb); }
.meal-name { font-weight: 700; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.meal-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.meal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); }
.meal-meta .chip { font-size: .7rem; padding: 1px 8px; }
.meal-actions { display: flex; gap: 2px; align-items: center; }
.meal-actions form { margin: 0; }
.breakdown { margin-top: 8px; font-size: .8rem; }
.breakdown summary { cursor: pointer; color: var(--herb); font-weight: 650; list-style: none; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::before { content: "＋ "; }
.breakdown[open] summary::before { content: "－ "; }
.breakdown ul { list-style: none; margin: 8px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line); display: grid; gap: 5px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.breakdown li b { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { [data-calendar].days { grid-template-columns: 1fr; } }
.meal-thumb { text-decoration: none; }

/* =========================================================
   Palette taken from the FamFood logo:
   logo black #0b0907, amber #f0a030, deep amber #e07010, cream #f0e0c0
   ========================================================= */
:root {
  --bg: #f7eedb;
  --surface: #fffaf0;
  --surface-2: #f2e6cc;
  --surface-3: #e7d6b0;
  --ink: #15100a;
  --ink-2: #5a4b36;
  --ink-3: #8a7a5e;
  --line: #e6d5b0;
  --line-2: #cdb88c;
  --brand: #b8560a;          /* deep amber: links, eyebrows, active states */
  --brand-ink: #15100a;      /* text on amber buttons */
  --brand-soft: #fbe5c2;
  --saffron: #f0a030;        /* the logo's bright amber: primary buttons, highlights */
  --saffron-soft: #fcebc8;
  --herb: #4d7a3a;           /* olive green for ticks and progress */
  --herb-soft: #e2eed4;
  --gold: #a46500;
  --gold-soft: #fbeccb;
  --danger: #b3261e;
  --danger-soft: #f9dcd6;
  --focus: #e07010;
  --forest: #0b0907;         /* the logo's black */
  --forest-2: #2b1a07;       /* brown-black */
  --scrim: rgba(11, 9, 7, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0907; --surface: #16110b; --surface-2: #1e170e; --surface-3: #2b2215;
    --ink: #f3e6cc; --ink-2: #cbb995; --ink-3: #927f62; --line: #2f2616; --line-2: #4a3c25;
    --brand: #f0a030; --brand-ink: #140d05; --brand-soft: #34240b;
    --saffron: #f0a030; --saffron-soft: #3a2a0c;
    --herb: #9fc885; --herb-soft: #1d2a14; --gold: #f5b64a; --gold-soft: #3a2a0c;
    --danger: #f08a7a; --danger-soft: #3b1d17; --focus: #f0a030;
    --forest: #0b0907; --forest-2: #2b1a07; --scrim: rgba(0, 0, 0, .65);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0907; --surface: #16110b; --surface-2: #1e170e; --surface-3: #2b2215;
  --ink: #f3e6cc; --ink-2: #cbb995; --ink-3: #927f62; --line: #2f2616; --line-2: #4a3c25;
  --brand: #f0a030; --brand-ink: #140d05; --brand-soft: #34240b;
  --saffron: #f0a030; --saffron-soft: #3a2a0c;
  --herb: #9fc885; --herb-soft: #1d2a14; --gold: #f5b64a; --gold-soft: #3a2a0c;
  --danger: #f08a7a; --danger-soft: #3b1d17; --focus: #f0a030;
  --forest: #0b0907; --forest-2: #2b1a07; --scrim: rgba(0, 0, 0, .65);
}
/* primary buttons use the logo's bright amber with near-black text */
.btn.primary { background: var(--saffron); border-color: var(--saffron); color: var(--brand-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--saffron) 35%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--saffron) 88%, #fff); }
.eyebrow { color: var(--brand); }
/* the hero is the logo: black, with an amber glow */
.hero-banner {
  background: radial-gradient(120% 140% at 100% 0%, rgba(240, 160, 48, .26), transparent 50%),
              radial-gradient(90% 90% at 0% 100%, rgba(224, 112, 16, .14), transparent 60%),
              linear-gradient(130deg, #0b0907 0%, #100b06 60%, #1d1207 120%);
  color: #f3e6cc;
}
.hero-banner h1 { color: #fff4df; }
.hero-banner p { color: rgba(243, 230, 204, .84); }
.hero-banner .eyebrow { color: rgba(240, 160, 48, .95) !important; }
.hero-banner .btn.primary { background: var(--saffron); color: #140d05; border-color: var(--saffron); }
.hero-banner .btn.ghost { color: #f3e6cc; }
.hero-banner::after { background: radial-gradient(closest-side, rgba(240, 160, 48, .30), transparent); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--saffron) 18%, transparent); color: var(--brand); }
.tabs-nav a.on, .tabs-nav a[aria-current="page"] { border-bottom-color: var(--saffron); }
.progress i, .match-bar i { background: linear-gradient(90deg, var(--saffron), #f7c56a); }
.ring { background: conic-gradient(var(--saffron) calc(var(--p) * 1%), var(--surface-3) 0); }
.toast { background: #15100a; color: #f3e6cc; }
:root[data-theme="dark"] .toast { background: #f3e6cc; color: #15100a; }

/* ---------- calmer home and recipe pages ---------- */
.card { box-shadow: none; }
.hero-banner { min-height: 0; padding: var(--s8) var(--s8) var(--s8); gap: var(--s3); }
.hero-banner h1 { font-size: clamp(1.8rem, 1.1rem + 2.2vw, 2.7rem); }
.hero-banner .logo-wordmark { margin-bottom: var(--s4); }
.meal-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s4); }
.meal-tile { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .18s var(--ease), border-color .18s; }
.meal-tile:hover { transform: translateY(-2px); border-color: var(--line-2); }
.meal-tile .media { aspect-ratio: 4 / 3; overflow: hidden; }
.meal-tile .media .photo, .meal-tile .media .tile { aspect-ratio: 4 / 3; height: 100%; }
.meal-tile-body { padding: var(--s3) var(--s4) var(--s4); display: grid; gap: 4px; }
.meal-tile-body b { font-size: 1rem; line-height: 1.3; }
.facts-line { color: var(--ink-2); font-size: .95rem; margin: var(--s3) 0 var(--s5); }
.section-head p { margin: 0; }
.list-row { text-decoration: none; }

/* ---------- AI updates ---------- */
.new-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--saffron); color: #140d05; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; }

/* ---------- accounts ---------- */
.account { display: grid; gap: 2px; padding: 0 var(--s2); }
.account-name { font-size: .85rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth { display: grid; gap: var(--s5); justify-items: center; }
.auth-logo { width: 240px; height: 150px; margin: 0 auto; mix-blend-mode: normal; background-blend-mode: normal;
  background-color: #0b0907; border-radius: var(--r); }
.auth-card { width: 100%; padding: var(--s6); display: grid; gap: var(--s3); }
.auth-card h1 { font-size: 1.6rem; }
.auth-providers { display: grid; gap: var(--s2); }
.auth-provider { width: 100%; justify-content: center; }
.auth-divider { display: flex; align-items: center; gap: var(--s3); color: var(--ink-3); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-error { border-radius: var(--r-sm); padding: 10px 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .92rem; }

/* =========================================================
   v3: organised, low-noise layer. Later rules win.
   ========================================================= */
.kicker { display: block; font-size: .75rem; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); margin-bottom: 4px; }
.eyebrow { font-size: .7rem; color: var(--ink-3); }
.card { border-color: var(--line); }
.card.flat { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }
.section { margin-top: var(--s8); }
.section-head { margin-bottom: var(--s3); }
.quiet-link { font-size: .86rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.quiet-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Today */
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s8); }
.today-head h1 { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.8rem); margin: 0; letter-spacing: -.03em; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.block-head h2, .block-head h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.block-head h2 { font-size: 1.35rem; }
.today-block, .week-block { margin-bottom: var(--s8); }
.today-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.today-card { display: grid; gap: var(--s3); text-decoration: none; color: inherit; }
.today-photo { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; }
.today-photo .photo, .today-photo .tile { aspect-ratio: 4 / 3; height: 100%; }
.today-text { display: grid; gap: 2px; }
.today-text b { font-size: 1.02rem; line-height: 1.3; letter-spacing: -.01em; }
.today-card:hover b { text-decoration: underline; text-underline-offset: 3px; }
.slot-name { font-size: .72rem; font-weight: 700; color: var(--herb); text-transform: uppercase; letter-spacing: .07em; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day { display: grid; gap: 4px; padding: 10px 10px 12px; border-radius: 14px; text-decoration: none; color: inherit; background: var(--surface-2); min-width: 0; }
.week-day .wd-num { font-size: .75rem; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.week-day .wd-name { font-size: .8rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.week-day.is-today { background: var(--saffron-soft); box-shadow: inset 0 0 0 1.5px var(--saffron); }
.week-day:hover { filter: brightness(.98); }
.shop-line { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s4); text-decoration: none; color: var(--ink-2); font-size: .9rem; }
.shop-line:hover { color: var(--ink); }
.shop-bar { flex: 0 0 120px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.shop-bar i { display: block; height: 100%; background: var(--herb); border-radius: 99px; }
.shop-line > span:last-of-type { flex: 1; }
.empty-today { padding: var(--s8) 0; display: grid; gap: var(--s3); justify-items: start; max-width: 520px; }
.empty-today h2 { margin: 0; font-size: 1.5rem; }
.empty-today p { margin: 0; color: var(--ink-2); }
.quiet-section { margin-bottom: var(--s8); }
.feed { display: grid; }
.feed-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.feed-row:first-child { border-top: 0; }
.feed-thumb { width: 64px; height: 52px; border-radius: 12px; overflow: hidden; display: block; }
.feed-thumb .photo, .feed-thumb .tile { aspect-ratio: auto; height: 100%; font-size: 1rem; }
.feed-text { display: grid; gap: 2px; min-width: 0; }
.new-tag { font-size: .7rem; font-weight: 700; color: var(--saffron); text-transform: uppercase; letter-spacing: .06em; }
.fav-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.fav-tile { display: grid; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.fav-photo { border-radius: 14px; overflow: hidden; display: block; aspect-ratio: 1; }
.fav-photo .photo, .fav-photo .tile { aspect-ratio: 1; height: 100%; font-size: 1.6rem; }
.fav-tile b { font-weight: 650; line-height: 1.3; }

/* Plan: week table */
.hint { margin: 0 0 var(--s4); font-size: .85rem; color: var(--ink-3); }
.week-table { display: grid; gap: 0; border-top: 1px solid var(--line); }
.wt-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.wt-day { display: grid; justify-items: start; align-content: start; gap: 0; color: var(--ink-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.wt-day b { font-size: 1.6rem; line-height: 1; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wt-meals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.wt-empty { border: 1px dashed var(--line-2); border-radius: 14px; display: grid; place-items: center; color: var(--ink-3); font-size: .85rem; min-height: 72px; }
.week-table .meal { background: transparent; border: 0; padding: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.week-table .meal:hover { background: transparent; }
.week-table .meal-thumb { width: 56px; height: 56px; border-radius: 12px; }
.week-table .meal-thumb .photo, .week-table .meal-thumb .tile { width: 56px; height: 56px; aspect-ratio: auto; font-size: 1rem; }
.week-table .meal-body { gap: 1px; min-width: 0; }
.week-table .meal-slot { font-size: .66rem; }
.week-table .meal-name { font-weight: 650; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.week-table .meal-meta { font-size: .76rem; color: var(--ink-3); }
.week-table .meal-actions { opacity: .35; transition: opacity .15s; }
.week-table .meal:hover .meal-actions, .week-table .meal:focus-within .meal-actions { opacity: 1; }
.week-table .meal.dragging { opacity: .4; }
.week-table .meal.drag-over { outline: 2px dashed var(--saffron); outline-offset: 4px; border-radius: 12px; }

/* Calmer chrome */
nav.nav a { font-weight: 600; }
nav.nav a[aria-current="page"] { background: transparent; color: var(--ink); box-shadow: inset 2px 0 0 var(--saffron); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.nav .count { display: none; }
.nav-label { display: none; }
.sidebar { background: var(--bg); border-right-color: var(--line); }
.hero-banner { display: none; }
.new-badge { font-size: .66rem; }

@media (max-width: 900px) {
  .today-cards { grid-template-columns: 1fr; }
  .today-cards .today-card { grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
  .today-cards .today-photo { aspect-ratio: 1; }
  .week-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wt-row { grid-template-columns: 1fr; gap: var(--s3); }
  .wt-meals { grid-template-columns: 1fr; gap: var(--s3); }
  .wt-day { display: flex; gap: 8px; align-items: baseline; }
  .wt-day b { font-size: 1.1rem; }
  .fav-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-bar { flex-basis: 80px; }
}
@media (max-width: 560px) {
  .week-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-head { margin-bottom: var(--s5); }
}

/* =========================================================
   v4: sophisticated finish. Ink for primary actions, saffron for accents.
   ========================================================= */
:root { --radius-card: 18px; }
body { font-feature-settings: "ss01", "cv11"; letter-spacing: -.005em; }
h1 { letter-spacing: -.035em; font-weight: 750; }
h2 { letter-spacing: -.02em; font-weight: 700; }
.btn { border-radius: 12px; font-weight: 600; transition: background .2s var(--ease), color .2s, border-color .2s, transform .12s; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 20px -10px rgba(21,16,10,.55); }
.btn.primary:hover { background: #2b2216; border-color: #2b2216; }
.btn.primary:active { transform: translateY(1px); }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.hero-banner .btn.primary { background: var(--saffron); color: #140d05; border-color: var(--saffron); }
.card, .panel { border-radius: var(--radius-card); border-color: color-mix(in srgb, var(--line) 85%, transparent); }
.card.hover:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(21,16,10,.45); }
.section-head h2, .block-head h2 { font-size: 1.2rem; }
.block-head h3 { font-size: .95rem; text-transform: none; color: var(--ink-2); font-weight: 650; }
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); }
.today-head h1 { font-size: clamp(2.2rem, 1.5rem + 1.8vw, 3.2rem); }
.today-photo, .fav-photo, .feed-thumb, .meal-thumb, .rcard .media { border-radius: 16px; }
.today-card { padding: 0; }
.week-day { background: transparent; border: 1px solid var(--line); }
.week-day.is-today { background: color-mix(in srgb, var(--saffron) 12%, transparent); border-color: color-mix(in srgb, var(--saffron) 60%, transparent); box-shadow: none; }
.week-table .meal-name { font-weight: 650; }
.nav a { border-radius: 12px; }
nav.nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--saffron); }
.auth-card { border-radius: 24px; padding: var(--s8); box-shadow: 0 30px 60px -40px rgba(21,16,10,.5); }
.auth-provider { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; gap: 10px; }
:root[data-theme="dark"] .auth-provider, :root:not([data-theme="light"]) .auth-provider { background: #1f1d19; color: #f2eee6; border-color: #3a362f; }
.auth-provider:hover { background: #f8f9fa; }
:root[data-theme="dark"] .auth-provider:hover, :root:not([data-theme="light"]) .auth-provider:hover { background: #26231e; }
.auth-provider .provider-logo { flex: 0 0 auto; width: 20px; height: 20px; display: block; }
.auth-provider { min-height: 46px; font-size: .98rem; box-shadow: 0 1px 2px rgba(60,64,67,.18); }
.auth-provider span { line-height: 1; }
.store-handoff { border-top: 1px solid var(--line); padding-top: var(--s4); display: grid; gap: var(--s3); justify-items: start; text-align: left; width: 100%; }
.store-btn { width: 100%; }
.store-search { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; background: var(--surface); }
.store-search summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.store-search ul { margin: 8px 0 2px; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.store-search a { color: var(--brand); }
.account-name { font-weight: 650; }
.page-head h1 { letter-spacing: -.035em; }
.chip { font-weight: 650; }
.tabs-nav a { font-weight: 600; }
.feed-row { padding: 12px 0; }
.pantry-group{display:grid;gap:10px;margin-bottom:var(--s5)}.pantry-group-title{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-2)}.pantry-chip span{font-size:.72rem;margin-left:4px}

.chip-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); min-height: 44px; }
.chip-token { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--surface-2); font-size: .86rem; font-weight: 600; }
.chip-token button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--surface-3); cursor: pointer; color: var(--ink-2); line-height: 1; }
.chip-input-field { flex: 1; min-width: 140px; border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); padding: 4px; }
.recipe-groups { display: grid; gap: var(--s4); margin-top: var(--s4); }
.recipe-group { padding: var(--s4); }
.recipe-ingredients { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 6px; }
.recipe-ingredients li { padding: 6px 0; border-top: 1px dashed var(--line); }
.sample-week{display:grid;gap:var(--s3);max-width:520px;width:100%}.sample-days{display:grid;gap:var(--s3)}.sample-day{display:grid;grid-template-columns:64px repeat(3,minmax(0,1fr));gap:8px;align-items:start}.sample-day .kicker{align-self:center}.sample-meal{display:grid;gap:6px;font-size:.78rem;font-weight:600;line-height:1.25}.sample-meal .photo,.sample-meal .tile{aspect-ratio:1;border-radius:12px;height:auto;font-size:1rem}
.diet-grid{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.diet-option{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface);cursor:pointer}.diet-option input{margin-top:3px;accent-color:var(--herb)}.diet-option b{display:block;font-weight:650;font-size:.92rem}.diet-option small{color:var(--ink-3);font-size:.78rem;line-height:1.3}.diet-option:has(input:checked){border-color:var(--herb);background:var(--herb-soft)}
.delete-plan{margin-top:var(--s2)}.delete-plan .btn{padding-left:4px}
.item[hidden]{display:none}
.by-line{display:block;font-size:.74rem;color:var(--herb);font-weight:600;margin-top:2px}
.diet-picker{display:grid;gap:var(--s4)}
.pick-group{display:grid;gap:8px}
.pick-label{font-size:.78rem;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3)}
.pill-row{display:flex;flex-wrap:wrap;gap:8px}
.pill{position:relative;display:inline-flex;align-items:center;border:1px solid var(--line-2);border-radius:99px;padding:7px 14px;background:var(--surface);font-size:.9rem;font-weight:550;cursor:pointer;user-select:none}
.pill input{position:absolute;opacity:0;pointer-events:none}
.pill:has(input:checked){border-color:var(--herb);background:var(--herb-soft);color:var(--herb);font-weight:650}
.pill:focus-within{outline:2px solid var(--herb);outline-offset:2px}
.diet-summary{margin:0}
a.pill{text-decoration:none;color:var(--ink);font-size:.82rem}
.pill.on{border-color:var(--herb);background:var(--herb-soft);color:var(--herb);font-weight:650}
.cooking-log{display:grid;gap:var(--s4)}
.rate-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.stars{display:flex;gap:4px}
.star{border:0;background:none;font-size:1.5rem;line-height:1;color:var(--line-2);cursor:pointer;padding:2px 4px;border-radius:8px}
.star.on{color:var(--gold)}
.star:hover{transform:scale(1.12)}
.option-grid{display:grid;gap:var(--s4);grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.option-card{display:grid;gap:0;padding:0;overflow:hidden;margin:0}
.option-photo{aspect-ratio:4/3;overflow:hidden}
.option-photo .photo,.option-photo img{width:100%;height:100%;object-fit:cover;display:block}
.option-body{display:grid;gap:6px;padding:var(--s3) var(--s4) var(--s4);justify-items:start}
.photo-strip{display:flex;gap:12px;overflow-x:auto;padding-bottom:6px}
.pantry-thumb{display:grid;gap:6px;width:160px;flex:none;text-decoration:none;color:inherit}
.pantry-thumb img{width:160px;height:120px;object-fit:cover;border-radius:12px;background:var(--surface-3)}
.photo-detail{display:grid;gap:var(--s5);grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
.pantry-photo{width:100%;max-height:70vh;object-fit:contain;border-radius:16px;background:var(--surface-3)}
@media (max-width:760px){.photo-detail{grid-template-columns:1fr}}
.profile-head{display:flex;align-items:center;gap:var(--s4)}
.avatar{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:1.6rem;font-weight:650;background:var(--herb-soft);color:var(--herb);flex:none}
.facts-grid{display:grid;gap:var(--s3);grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
a.account-name{text-decoration:none;color:inherit}
a.account-name:hover{text-decoration:underline}
.seg{display:inline-flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.seg a{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;color:var(--ink-3);text-decoration:none;font-weight:600;font-size:.92rem}
.seg a[aria-current="page"]{background:var(--surface-3);color:var(--ink)}
.pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:var(--s6) 0;flex-wrap:wrap}
details.quick-add>summary,details.manage-recipe>summary{cursor:pointer;font-weight:650;color:var(--ink-3);list-style:none;padding:6px 0}
details.quick-add>summary::-webkit-details-marker,details.manage-recipe>summary::-webkit-details-marker{display:none}
/* Shopping rows stay calm: row actions appear on hover or focus, and always show once an item is marked. */
@media (hover: hover) {
  .item .find-link, .item .have-btn { opacity: .7; transition: opacity .15s ease; }
  .item:hover .find-link, .item:hover .have-btn, .item:focus-within .find-link, .item:focus-within .have-btn { opacity: 1; }
  .item.have .have-btn, .item.have .find-link { opacity: 1; }
}

/* =====================================================================
   Design v5: a warmer, editorial look. Serif display headings, a calm
   Inter interface, softer depth, image-led recipe cards, and a frosted
   mobile bar. Everything here overrides earlier tokens and components.
   ===================================================================== */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow-1: 0 1px 2px rgba(40, 28, 8, .05);
  --shadow-2: 0 1px 2px rgba(40, 28, 8, .04), 0 8px 24px -6px rgba(40, 28, 8, .12);
  --shadow-3: 0 24px 60px -12px rgba(40, 28, 8, .30);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -8px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -8px rgba(0, 0, 0, .55);
}

body {
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
  background:
    radial-gradient(1100px 520px at 100% -12%, color-mix(in srgb, var(--brand-soft) 70%, transparent), transparent 62%),
    radial-gradient(800px 420px at -10% 110%, color-mix(in srgb, var(--herb-soft) 55%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Type: serif for headings and numbers, sans for everything you read at speed. */
h1, h2, .brand-name, .fact b, .ring b, .recipe-hero h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; }
h2 { font-size: clamp(1.35rem, 1.1rem + .7vw, 1.6rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
h3 { font-size: 1.04rem; font-weight: 650; letter-spacing: -.01em; }
p { line-height: 1.6; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  background: var(--brand-soft); color: var(--brand);
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: var(--s3);
}
.page-head { margin-bottom: var(--s8); align-items: flex-end; }
.page-head p { color: var(--ink-2); font-size: 1rem; max-width: 60ch; }

/* Sidebar: a quiet rail with a clear active state. */
.sidebar {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-right: 1px solid var(--line);
  padding: var(--s5) var(--s4);
  gap: var(--s4);
}
.brand { padding: 6px 8px 10px; }
.brand-name { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.nav { gap: 4px; }
.nav a {
  min-height: 44px; padding: 10px 12px; border-radius: 14px;
  font-weight: 560; font-size: .95rem; color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] {
  background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-2);
}
.nav a[aria-current="page"] .i { color: var(--surface); }
.nav .count {
  background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand);
  font-weight: 700; min-width: 22px; text-align: center;
}
.nav a[aria-current="page"] .count { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }
.search-trigger {
  border-radius: 14px; min-height: 42px; background: var(--surface-2); border-color: transparent;
  color: var(--ink-3);
}
.account { border-top: 1px solid var(--line); padding-top: var(--s3); }

/* Main column breathes more. */
.main { padding: var(--s10) clamp(20px, 4vw, var(--s10)) var(--s10); }

/* Buttons: pill-like, consistent height, a confident primary. */
.btn {
  min-height: 42px; padding: 9px 18px; border-radius: 999px;
  font-weight: 620; font-size: .93rem; letter-spacing: -.005em;
  border-color: var(--line-2);
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { box-shadow: var(--shadow-1); }
.btn.primary {
  background: var(--ink); border-color: var(--ink); color: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 8px 20px -8px color-mix(in srgb, var(--ink) 55%, transparent);
}
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--brand)); }
.btn.sm { min-height: 34px; padding: 6px 14px; font-size: .86rem; border-radius: 999px; }
.btn.lg { min-height: 52px; padding: 13px 26px; font-size: 1rem; border-radius: 999px; }
.btn.icon { border-radius: 999px; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }

/* Inputs: taller, softer, with a calm focus ring. */
.input, .select, .textarea {
  min-height: 46px; border-radius: 14px; border-color: var(--line-2); background: var(--surface);
  font-size: .97rem;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--herb);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--herb) 16%, transparent);
}
.segmented { border-radius: 999px; background: var(--surface-2); padding: 4px; border-color: transparent; }
.segmented label { padding: 7px 14px; font-size: .88rem; }
.segmented input:checked + label { background: var(--ink); color: var(--surface); box-shadow: none; }

/* Chips and tags as quiet pills. */
.chip { border-radius: 999px; background: var(--surface-2); border-color: transparent; font-weight: 560; }
.tag { border-radius: 999px; font-weight: 650; letter-spacing: .01em; }

/* Cards: calmer edges, lighter borders, depth on hover only. */
.card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow-1); }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
.rcard { border-radius: var(--r-lg); }
.rcard .body { padding: var(--s4) var(--s5) var(--s5); }
.rcard h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.rcard .media img, .rcard .media .tile { aspect-ratio: 4 / 3; }

/* Progress: slimmer and warmer. */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); }
.progress i { background: linear-gradient(90deg, var(--herb), color-mix(in srgb, var(--herb) 70%, var(--saffron))); border-radius: 99px; }

/* Empty states feel like an invitation, not an error. */
.empty { border-radius: var(--r-lg); border-color: var(--line-2); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.empty .orb { background: var(--herb-soft); color: var(--herb); }

/* Numbers in the serif, so the profile and summaries feel designed. */
.fact b { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; }
.fact { border-radius: var(--r); border-color: var(--line); }

/* Shopping rows: airier, with clear ticks. */
.aisle { border-radius: var(--r-lg); }
.aisle-head h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.item { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.check { accent-color: var(--herb); width: 20px; height: 20px; }
.summary { border-radius: var(--r-lg); }

/* Calendar meal cards. */
.meal { border-radius: var(--r); border-color: var(--line); box-shadow: var(--shadow-1); }

/* Mobile: a frosted bar that floats above content. */
@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .main { padding: var(--s6) var(--s4) 120px; }
  .tabbar {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px -18px rgba(40, 28, 8, .3);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { border-radius: 14px; font-weight: 600; font-size: .72rem; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] .i, .tabbar a[aria-current="page"] svg { color: var(--herb); }
}

/* Fine detail: smoother selection and focus everywhere. */
::selection { background: color-mix(in srgb, var(--herb) 26%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--herb) 60%, transparent); outline-offset: 2px; }

/* Final v5 precedence: the active sidebar item and primary buttons are the same ink everywhere. */
html body nav.nav a[aria-current="page"] {
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); border-radius: 14px;
}
html body nav.nav a[aria-current="page"] .i { color: var(--bg); }
html body nav.nav a[aria-current="page"] .count { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
html body a.btn.primary, html body button.btn.primary {
  background: var(--ink); border-color: var(--ink); color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 8px 20px -8px color-mix(in srgb, var(--ink) 55%, transparent);
}
html body a.btn.primary:hover, html body button.btn.primary:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--brand)); border-color: transparent;
}
html body .hero-banner .btn.primary { background: var(--herb); border-color: var(--herb); color: var(--brand-ink); }
form.card.flat.row { padding-left: 0 !important; padding-right: 0 !important; }
.verify{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:space-between;padding:12px 16px;border-radius:var(--r);border:1px solid var(--line);margin-bottom:var(--s5);font-size:.93rem}
.verify.ok{background:var(--herb-soft);color:var(--herb);border-color:transparent}
.verify.warn{background:var(--gold-soft);color:var(--ink-2);border-color:transparent}
.verify .btn{white-space:nowrap}
.aisle[hidden], .got-list[hidden] { display: none; }
.got-list { margin-top: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px var(--s5) var(--s4); background: var(--surface); }
.got-list > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 650; color: var(--ink-2); }
.got-list > summary::-webkit-details-marker { display: none; }
.got-list > summary::after { content: '▾'; margin-left: auto; color: var(--ink-3); }
.got-list[open] > summary::after { transform: rotate(180deg); }
.got-list .item { opacity: .72; }
.aisle .aisle-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 10px 14px 8px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.members-line { display: block; margin-top: 2px; }

/* ---- prep times on Home, and leftovers on the plan calendar ---- */
.prep-card { margin-top: var(--s4); padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: var(--s3); }
.prep-head { display: grid; gap: 2px; }
.prep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.prep-row { padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.prep-row.due { background: var(--herb-soft); border: 1px solid var(--herb); }
.prep-banner { margin-top: var(--s3); padding: 12px 14px; border-radius: var(--r); background: var(--herb-soft); color: var(--ink); border: 1px solid var(--herb); }
.leftover-plan summary { cursor: pointer; }
details.aisle > summary.aisle-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.aisle > summary.aisle-head::-webkit-details-marker { display: none; }
details.aisle > summary.aisle-head::after { content: '▾'; margin-left: auto; color: var(--ink-3); transition: transform .2s var(--ease); }
details.aisle:not([open]) > summary.aisle-head::after { transform: rotate(-90deg); }
details.aisle:not([open]) > summary.aisle-head { border-bottom-color: transparent; }
.item .used { font-size: .76rem; }
.item details.breakdown > summary { font-size: .78rem; }

/* ---- recipe box, explore, planner calendar, shopping lists, notifications ---- */
.box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); margin-top: var(--s5); }
.box-tile { display: grid; gap: 4px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: inherit; text-decoration: none; }
.box-tile.on { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
.box-tile b { font-size: 1rem; }
.box-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); margin-bottom: 6px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.explore-tile { display: grid; gap: 8px; padding: var(--s4); border-radius: var(--r-lg); text-decoration: none; color: inherit;
  border: 1px solid var(--line); background: linear-gradient(160deg, hsl(var(--h) 45% 92%), var(--surface)); }
.explore-tile .box-icon { background: hsl(var(--h) 40% 86%); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-head { background: var(--surface-3); padding: 8px; text-align: center; font-weight: 600; font-size: .8rem; color: var(--ink-2); }
.cal-cell { background: var(--surface); min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.muted { background: var(--surface-2, var(--surface)); opacity: .55; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--herb); }
.cal-num { font-weight: 650; font-size: .85rem; }
.cal-ev { display: flex; gap: 4px; align-items: baseline; font-size: .74rem; line-height: 1.25; padding: 2px 4px; border-radius: 6px;
  background: hsl(var(--h) 45% 92%); color: var(--ink); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-slot { font-weight: 700; color: hsl(var(--h) 45% 35%); }
.plan-row { display: flex; justify-content: space-between; gap: var(--s3); align-items: center; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r-md, 12px); background: var(--surface); color: inherit; text-decoration: none; }
.wt-empty { text-decoration: none; color: var(--ink-2); }
.wt-day span { display: block; }
.shop-lists-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s5); margin-top: var(--s5); align-items: start; }
.shop-lists { padding: var(--s4); display: grid; gap: 4px; }
.shop-list-link { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.shop-list-link.on { background: var(--surface-3); }
.shop-main { min-width: 0; }
.organise { margin-top: var(--s5); padding: var(--s4); }
.notices { padding: var(--s2); margin-top: var(--s5); }
.notice-row { display: grid; grid-template-columns: 12px 1fr; gap: var(--s3); padding: var(--s3); border-radius: 10px; text-decoration: none; color: inherit; }
.notice-row.unread { background: var(--gold-soft); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: transparent; }
.notice-row.unread .notice-dot { background: var(--herb); }
.notice-row span > span { display: block; }
.bell { position: relative; }
.bell .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--herb); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
@media (max-width: 760px) {
  .shop-lists-layout { grid-template-columns: 1fr; }
  .cal-cell { min-height: 72px; padding: 4px; }
  .cal-ev { font-size: .66rem; }
  .cal-head { font-size: .7rem; padding: 6px 2px; }
}

/* ---- Navy and gold: the FamFood brand, taken from the logo (navy ground, gold line art and lettering) ---- */
:root {
  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #f0eee8; --surface-3: #e3e0d6;
  --ink: #14213a; --ink-2: #3c4860; --ink-3: #6b7490;
  --line: #dcd8ca; --line-2: #c3bda9;
  --brand: #14213a; --brand-ink: #f7f1e1; --brand-soft: #e4e9f3;
  --saffron: #c9a24e; --saffron-soft: #f5ecd6;
  --herb: #2f6b52; --herb-soft: #dcece4;
  --gold: #8f6d26; --gold-soft: #f5ecd6;
  --danger: #b3261e; --danger-soft: #f9dcd6; --focus: #2b5fb3;
  --forest: #14213a; --forest-2: #22355a; --scrim: rgba(13, 23, 41, .5);
  --shadow-1: 0 1px 2px rgba(13, 23, 41, .06);
  --shadow-2: 0 2px 6px rgba(13, 23, 41, .06), 0 10px 24px rgba(13, 23, 41, .08);
  --shadow-3: 0 12px 40px rgba(13, 23, 41, .22);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1729; --surface: #14213a; --surface-2: #1a2a47; --surface-3: #223556;
    --ink: #f7f1e1; --ink-2: #c3cbdc; --ink-3: #8b95ad; --line: #243659; --line-2: #34497a;
    --brand: #d9b56a; --brand-ink: #0d1729; --brand-soft: #2b2a22;
    --saffron: #d9b56a; --saffron-soft: #2b2615; --herb: #8cc7a6; --herb-soft: #173a2d;
    --gold: #e0bd6f; --gold-soft: #2b2615; --danger: #f08a80; --danger-soft: #3b1f1c; --focus: #9dbcf2;
    --forest: #0d1729; --forest-2: #223556; --scrim: rgba(0, 0, 0, .6);
    --shadow-1: none; --shadow-2: 0 2px 10px rgba(0, 0, 0, .35); --shadow-3: 0 16px 50px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0d1729; --surface: #14213a; --surface-2: #1a2a47; --surface-3: #223556;
  --ink: #f7f1e1; --ink-2: #c3cbdc; --ink-3: #8b95ad; --line: #243659; --line-2: #34497a;
  --brand: #d9b56a; --brand-ink: #0d1729; --brand-soft: #2b2a22;
  --saffron: #d9b56a; --saffron-soft: #2b2615; --herb: #8cc7a6; --herb-soft: #173a2d;
  --gold: #e0bd6f; --gold-soft: #2b2615; --danger: #f08a80; --danger-soft: #3b1f1c; --focus: #9dbcf2;
  --forest: #0d1729; --forest-2: #223556; --scrim: rgba(0, 0, 0, .6);
  --shadow-1: none; --shadow-2: 0 2px 10px rgba(0, 0, 0, .35); --shadow-3: 0 16px 50px rgba(0, 0, 0, .6);
}
body { font-family: var(--font); }
h1, h2, h3, .brand-name, .fact b, .ring b, .recipe-hero h1 { font-family: var(--font-display); letter-spacing: -.01em; }
.logo-mark, .topbar .logo-mark {
  width: 40px; height: 40px; border-radius: 10px; background: #14213a url(/static/brand-mark.png) center / contain no-repeat;
}
.logo-wordmark {
  width: 230px; height: 230px; border-radius: 26px; background: #14213a url(/static/brand-card.jpg) center / cover no-repeat;
  box-shadow: var(--shadow-2);
}

/* ---- camera: dish or kitchen ---- */
.cam-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); margin-top: var(--s5); }
.cam-card { gap: var(--s3); padding: var(--s5); }
.cam-card .box-icon { width: 44px; height: 44px; }
.cam-card p { margin: 0; }

/* ---- Your FamFood: each figure opens its screen ---- */
a.fact-link { display: grid; gap: 2px; position: relative; color: inherit; text-decoration: none; transition: transform .15s var(--ease), border-color .15s; }
a.fact-link:hover, a.fact-link:focus-visible { border-color: var(--ink-2); transform: translateY(-2px); }
a.fact-link .fact-go { position: absolute; right: 12px; top: 10px; color: var(--ink-3); font-size: 1.2rem; }
a.plain-link { color: inherit; text-decoration: none; }
a.plain-link:hover { text-decoration: underline; }

/* ---- add to home screen banner ---- */
.install-banner { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 80; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-3); }
.install-banner .install-text { flex: 1; display: grid; gap: 2px; min-width: 0; font-size: .9rem; }
.install-banner .install-text span { color: var(--ink-2); font-size: .82rem; }
@media (min-width: 900px) { .install-banner { left: auto; right: 24px; bottom: 24px; width: 420px; } }
.install-sheet { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim); padding: 12px; }
.install-card { width: min(520px, 100%); background: var(--surface); color: var(--ink); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-3); display: grid; gap: 14px; }
.install-card h3 { margin: 0; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
@media (min-width: 900px) { .install-sheet { align-items: center; } }

/* ---- community feed ---- */
.composer { padding: var(--s4); max-width: 720px; margin-top: var(--s5); }
.composer .textarea { min-height: 64px; }
.post { padding: var(--s4); display: grid; gap: var(--s3); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-photo { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--r); background: var(--surface-3); }
.post-body { white-space: pre-line; margin: 0; font-size: 1rem; line-height: 1.5; }
.post-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--s2); }
.like-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 10px; border-radius: 99px; font: inherit; cursor: pointer; text-decoration: none; }
.like-btn:hover { background: var(--surface-2); }
.like-btn.on { color: var(--danger); }
.like-btn.on svg { fill: currentColor; }
.avatar-dot { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.avatar-dot.small-dot { width: 26px; height: 26px; font-size: .8rem; }
.post-comments summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.comment p { margin: 2px 0 6px; }

/* ---- interaction: everything answers a touch, a click or a key ---- */
.btn { transition: transform .12s var(--ease), background-color .15s, box-shadow .15s, border-color .15s, color .15s; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:not(:disabled):active { transform: translateY(0) scale(.97); box-shadow: var(--shadow-1); }
.btn[disabled], .btn[aria-busy="true"] { cursor: progress; opacity: .7; }
.btn.icon:not(:disabled):hover { transform: scale(1.08); }
.card.hover { transition: transform .18s var(--ease), box-shadow .18s; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.nav a, .tabbar a, .shop-list-link, .box-tile, .explore-tile, .plan-row, .notice-row, .pill, .chip-token {
  transition: background-color .15s, color .15s, transform .12s var(--ease), border-color .15s; }
.nav a:hover, .shop-list-link:hover, .plan-row:hover, .notice-row:hover { background: var(--surface-2); }
.nav a:active, .tabbar a:active { transform: scale(.97); }
.box-tile:hover, .explore-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.box-tile:active, .explore-tile:active { transform: scale(.98); }
.item { transition: background-color .15s, opacity .2s; }
.item:hover { background: var(--surface-2); }
.check { transition: transform .12s var(--ease); }
.check:active { transform: scale(.85); }
.check:checked { animation: tick .25s var(--ease); }
@keyframes tick { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.input:focus, .textarea:focus, .select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); outline: none; }
.like-btn { transition: transform .12s var(--ease), color .15s, background-color .15s; }
.like-btn:active { transform: scale(.9); }
.like-btn.on svg { animation: pop .3s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.toast { animation: rise .3s var(--ease) both; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 60%, transparent); outline-offset: 2px; }
.busy-label::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- keyboard shortcuts sheet ---- */
.shortcut-sheet { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--scrim); }
.shortcut-sheet .sheet-card { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: var(--s6);
  width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-3); animation: rise .2s var(--ease) both; }
.shortcut-sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: var(--s4) 0 0; align-items: center; }
.shortcut-sheet dt .kbd { margin-right: 4px; }
.shortcut-sheet dd { margin: 0; color: var(--ink-2); }

/* ---- how many to buy, for items bought by the piece ---- */
.buy-count { color: var(--brand); font-weight: 700; }

/* ---- community feed, styled like a social feed ---- */
.groups-strip { display: flex; gap: 6px; overflow-x: auto; padding: var(--s3) 0; margin: var(--s4) 0 0; scrollbar-width: none; }
.groups-strip::-webkit-scrollbar { display: none; }
.groups-strip .btn { flex: 0 0 auto; }
.feed-tabs { display: flex; gap: 4px; margin: var(--s4) 0 0; border-bottom: 1px solid var(--line); }
.feed-tab { padding: 10px 16px; color: var(--ink-2); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.feed-tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.post-stats { padding: 0 2px; }
.post-recipe { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); text-decoration: none; }
.post-recipe:hover { border-color: var(--line-2); }
.post-recipe-photo { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; flex: 0 0 auto; }
.post-recipe-text { display: grid; gap: 2px; min-width: 0; }
.post-recipe-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .post { gap: var(--s3); }
@media (min-width: 900px) { .feed { max-width: 720px; } }

/* ---- design polish: one layer for the whole app ---- */
/* Explore: each tile is a richly coloured card with a gold glow, not a pale wash. */
.explore-tile {
  position: relative; overflow: hidden; min-height: 116px; align-content: space-between;
  border: 0; color: #fffaf2;
  background: linear-gradient(150deg, hsl(var(--h) 42% 30%), hsl(calc(var(--h) + 18) 38% 15%));
  box-shadow: 0 14px 28px -18px hsl(var(--h) 60% 12% / .85), inset 0 1px 0 rgba(255, 250, 242, .08);
}
.explore-tile::after {
  content: ""; position: absolute; right: -40px; bottom: -48px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233, 190, 95, .28), transparent); pointer-events: none;
}
.explore-tile .box-icon { background: rgba(255, 250, 242, .12); color: #e9c46a; }
.explore-tile b { font-family: var(--font-display); font-size: 1rem; font-weight: 650; letter-spacing: .005em; }
.explore-tile:hover { box-shadow: 0 20px 34px -18px hsl(var(--h) 60% 12% / .9), inset 0 1px 0 rgba(255, 250, 242, .1); }

/* Community posts: the action row stays on one line, and Delete is quieter than the post. */
.post-actions { flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.post-actions::-webkit-scrollbar { display: none; }
.post-actions .like-btn { padding: 8px 10px; white-space: nowrap; }
.post-head .btn.sm.ghost.danger { opacity: .7; }

/* ---- polish layer 2: motion, press feedback, and a steadier rhythm ---- */
/* Buttons and cards answer a touch: a small press, and a soft lift where a mouse can hover. */
.btn, .like-btn, .explore-tile, .box-tile, .card.hover, .plan-row, .pill, .notice-row {
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:active, .like-btn:active, .pill:active { transform: scale(.97); }
@media (hover: hover) {
  .card.hover:hover, .plan-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
}
/* One clear focus ring for keyboard users, on every control. */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

/* Bottom bar (phones): the current section is marked by a filled pill, not only a colour change. */
.tabbar a[aria-current="page"] { position: relative; }
.tabbar a[aria-current="page"]::before {
  content: ""; position: absolute; inset: 2px 14% auto; height: 32px; z-index: -1; border-radius: 99px;
  background: color-mix(in srgb, var(--brand, #a8402a) 14%, transparent);
}
.tabbar a { position: relative; }

/* Headings: tighter on phones, roomier on desktop, with comfortable reading lines. */
.page-head h1 { line-height: 1.08; letter-spacing: -0.02em; }
.page-head p { line-height: 1.55; max-width: 62ch; }
@media (min-width: 900px) { .page-head h1 { font-size: clamp(2.2rem, 2.2vw + 1rem, 2.9rem); } }

/* Empty states read as invitations, centred and calm. */
.empty { text-align: center; }
.empty h3 { margin: 0 0 6px; }

/* Cards share one edge: a hairline border and a soft shadow that deepens a little on desktop hover. */
.card { border-color: color-mix(in srgb, var(--line) 85%, transparent); }

/* Two tiles side by side on a phone, each as tall as its text needs. */
@media (max-width: 560px) {
  .grid.tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .explore-tile { min-height: 104px; padding: var(--s3); }
}

/* The top bar's search stays on one line on a phone. */
.topbar .search-trigger { min-width: 0; }
.topbar .search-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Planner on a phone: one row per day, with its meals, instead of seven cramped columns. */
@media (max-width: 760px) {
  .cal { grid-template-columns: minmax(0, 1fr); background: transparent; gap: 8px; }
  .cal-head { display: none; }
  .cal-cell { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
  .cal-cell.muted { display: none; }
  .cal-num { min-width: 28px; font-family: var(--font-display); font-size: 1.05rem; }
  .cal-ev { min-width: 0; max-width: 100%; }
}

/* Floating messages sit above the phone's bottom menu bar, not on top of its tabs. Any tap on a tab must reach the tab. */
.timers { position: fixed; left: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 75; }
@media (max-width: 900px) {
  .timers, .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .install-banner { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* Stories: a row of bubbles above the Community feed. Mentions and hashtags look like links inside a post. */
.stories { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s2) 0 var(--s3); scrollbar-width: none; align-items: flex-start; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { display: grid; justify-items: center; gap: 4px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.story-bubble .avatar-dot { box-shadow: 0 0 0 3px var(--saffron, #e0a040); }
.story-add { flex: 0 0 auto; }
.story-add summary { list-style: none; cursor: pointer; }
.story-add form { min-width: 220px; }
.mention, .tag-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.mention:hover, .tag-link:hover { text-decoration: underline; }
.thread .msg { max-width: 78%; padding: var(--s3); border-radius: var(--r-lg); background: var(--surface-2); }
.thread .msg.mine { margin-left: auto; background: var(--brand-soft); }
.thread .msg p { margin: 0 0 4px; }

/* Stories, Snapchat style: rings show what is unseen, and the viewer is full screen with progress bars. */
.stories .ring { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; padding: 3px; box-sizing: border-box; background: var(--line-2); }
.stories .ring.unseen { background: conic-gradient(#f9a03f, #e2456b, #a13ce0, #f9a03f); }
.stories .ring.own { background: var(--surface-2); border: 2px dashed var(--line-2); color: var(--ink-2); }
.stories .ring > .avatar-dot { width: 100%; height: 100%; box-sizing: border-box; border: 3px solid var(--surface); }
.story-add > summary { list-style: none; cursor: pointer; }
.story-add > summary::-webkit-details-marker { display: none; }
.story-compose { display: grid; gap: 8px; margin-top: 8px; min-width: 240px; }
.story-photo-pick { cursor: pointer; justify-content: center; }
.story-viewer { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; touch-action: manipulation; user-select: none; }
.story-progress { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; z-index: 4; }
.story-bar { flex: 1; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 2px; overflow: hidden; }
.story-bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.story-head { position: absolute; top: 20px; left: 10px; right: 10px; display: flex; align-items: center; gap: 10px; z-index: 4; }
.story-head .small, .story-head b { color: #fff; }
.story-head .avatar-dot { width: 36px; height: 36px; }
.story-close { color: #fff; display: grid; place-items: center; padding: 4px; }
.story-delete { color: #fff; border-color: rgba(255, 255, 255, .5); }
.story-slides { position: absolute; inset: 0; }
.story-slide { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.story-slide.on { display: flex; }
.story-slide img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-slide-text { padding: 14vh 28px; text-align: center; }
.story-slide-text p { margin: 0; font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 700; line-height: 1.25; color: #fff; }
.story-slide-text .mention, .story-slide-text .tag-link { color: #fff; text-decoration: underline; }
.story-zones { position: absolute; inset: 0; display: flex; z-index: 2; }
.story-zones span { flex: 3 0 0; }
.story-zones .zone-next { flex: 7 0 0; }
.story-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; z-index: 4; }
.story-reply { display: flex; gap: 8px; }
.story-reply input { flex: 1; }

/* Profile photos and the stories player (Instagram and Snapchat style) */
.avatar-photo, img.avatar-dot { object-fit: cover; }
.avatar-dot.avatar-xl { width: 64px; height: 64px; font-size: 1.6rem; }
.story-caption { position: absolute; left: 0; right: 0; bottom: 112px; margin: 0; padding: 0 20px; text-align: center;
  color: #fff; font-size: 1.1rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); z-index: 3; }
.story-bgs { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.story-bgs legend { padding: 0; margin-bottom: 4px; }
.story-bg { position: relative; cursor: pointer; }
.story-bg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.story-bg span { display: block; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); }
.story-bg input:checked + span { outline: 3px solid var(--ink, #222); outline-offset: 2px; }
.story-foot { display: grid; gap: 10px; }
.story-react { display: flex; gap: 6px; justify-content: center; }
.react-btn { width: 46px; height: 46px; border: 0; border-radius: 999px; font-size: 1.45rem; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; line-height: 1; }
.react-btn.on { background: rgba(255, 255, 255, .5); }
.story-viewers { position: relative; }
.story-viewers summary { cursor: pointer; color: #fff; font-size: .85rem; list-style: none; }
.story-viewers ul { position: absolute; right: 0; top: 100%; min-width: 200px; max-height: 50vh; overflow: auto; margin: 6px 0 0;
  padding: 10px 14px; list-style: none; background: #15151b; border-radius: 12px; z-index: 6; }
.story-viewers li { padding: 4px 0; color: #fff; font-size: .9rem; }
.story-react-mark { margin-left: 4px; }

/* Instagram-style profiles, people lists and posts */
.profile-top { display: grid; gap: var(--s3); }
.profile-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.profile-row .grow { min-width: 0; }
.profile-name { margin: 0; font-size: 1.5rem; }
.profile-stats { display: flex; gap: var(--s4); flex-wrap: wrap; color: var(--ink-2); }
.profile-stats a { color: inherit; text-decoration: none; }
.profile-stats b { color: var(--ink); }
.bio { margin: 0; white-space: pre-line; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.grid-tile { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--surface-3); }
.grid-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.grid-tile:hover img { transform: scale(1.04); }
.person-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.person-row { display: flex; align-items: center; gap: 12px; }
.post-edit { margin-top: var(--s2); }
.post-edit summary { cursor: pointer; color: var(--ink-2); }
.post-photo { transition: transform .15s; }
.post-photo.liked-pop { animation: liked-pop .5s ease; }
@keyframes liked-pop { 0% { transform: scale(.96); } 40% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* ---- Community, redesigned: a calmer, more polished social feed (Instagram and Snapchat in spirit) ---- */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 14px; margin: 0 -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { width: 74px; gap: 6px; }
.stories .ring { width: 70px; height: 70px; padding: 3px; }
.stories .ring.unseen { background: conic-gradient(from 200deg, #f9a03f, #e2456b, #a13ce0, #f9a03f); }
.stories .ring.seen { background: var(--line-2); }
.stories .ring > .avatar-dot { border-width: 3px; font-size: 1.1rem; }
.story-bubble .small { font-size: 12px; font-weight: 600; color: var(--ink-2); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.feed-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin: var(--s2) 0 var(--s3); max-width: 100%; overflow-x: auto; }
.feed-tab { padding: 7px 16px; border-radius: 999px; color: var(--ink-2); font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.feed-tab:hover { color: var(--ink); }
.feed-tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 15, 5, .14); }

.composer { border-radius: 24px; padding: var(--s4); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(20, 15, 5, .06); border: 1px solid var(--line); }
.composer .textarea { min-height: 88px; border: 0; background: var(--surface-2); border-radius: 18px; padding: 12px 14px; font-size: 16px; line-height: 1.5; resize: vertical; }
.composer .textarea:focus, .composer .input:focus, .composer .select:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 0; }
.composer .row { gap: 8px; }
.composer .avatar-dot { width: 42px; height: 42px; font-size: 1rem; }

.feed { display: grid; gap: 16px; max-width: 680px; }
.post { border-radius: 24px; padding: 16px; overflow: hidden; gap: 12px; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(20, 15, 5, .05); }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-head .avatar-dot { width: 44px; height: 44px; font-size: 1.05rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--saffron) 55%, transparent); }
.post-head .grow { min-width: 0; }
.post-head .person b { font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
.post-head .small { line-height: 1.35; margin-top: 2px; }
.post-head .btn.sm { border-radius: 999px; padding: 6px 14px; }
.post-body { font-size: 16px; line-height: 1.55; margin: 0; white-space: pre-line; }
.post-photo { display: block; width: calc(100% + 32px); max-width: none; margin: 2px -16px 0; max-height: 560px; object-fit: cover; border-radius: 0; }
.post-photo.liked-pop { animation: liked-pop .5s ease; }
.post-stats { font-size: 13px; color: var(--ink-2); padding: 0 2px; }
.post-recipe { border-radius: 16px; border: 1px solid var(--line); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; margin: 0 -6px; }
.post-actions form { display: inline-flex; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, transform .12s; }
.like-btn:hover { background: var(--surface-2); color: var(--ink); }
.like-btn:active { transform: scale(.94); }
.like-btn.on { color: var(--brand); }
.like-btn.on svg { fill: currentColor; }
.post-comments { border-top: 1px solid var(--line); padding-top: 10px; }
.post-comments summary { font-weight: 600; font-size: 14px; }
.comment p { margin: 2px 0 0; line-height: 1.45; }
.post-edit summary { font-size: 13px; }

.profile-top { padding: 0; overflow: hidden; border-radius: 26px; border: 1px solid var(--line); gap: 12px; }
.profile-top::before { content: ""; display: block; height: 124px; background: linear-gradient(120deg, var(--brand) 0%, var(--saffron) 55%, var(--herb) 100%); }
.profile-top > * { padding-left: 20px; padding-right: 20px; }
.profile-top > :last-child { padding-bottom: 20px; }
.profile-row { margin-top: -58px; align-items: flex-end; gap: 16px; }
.profile-top .avatar-xl { width: 108px; height: 108px; font-size: 2.3rem; border: 5px solid var(--surface); box-shadow: var(--shadow-2); }
.profile-name { font-size: 1.65rem; letter-spacing: -.02em; }
.profile-stats { gap: 22px; font-size: 14px; color: var(--ink-2); }
.profile-stats b { font-size: 1.1rem; color: var(--ink); font-weight: 750; }
.profile-top .row .btn { border-radius: 999px; padding: 9px 18px; }
.bio { font-size: 15px; line-height: 1.5; }
.post-grid { gap: 3px; }
.grid-tile { border-radius: 12px; }

.person-list { gap: 0; }
.person-row { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-row .avatar-dot { width: 48px; height: 48px; font-size: 1.1rem; }
.person-row .person b { font-size: 15px; }
.person-row .btn { margin-left: auto; border-radius: 999px; }

.story-progress { top: 10px; gap: 4px; }
.story-bar { height: 2.5px; }
.story-head { top: 24px; }
.story-head .avatar-dot { width: 40px; height: 40px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.story-foot { padding: 28px 14px 22px; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); display: grid; gap: 10px; }
.story-react { justify-content: center; width: max-content; margin: 0 auto; padding: 6px; border-radius: 999px; background: rgba(0, 0, 0, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.react-btn { width: 46px; height: 46px; background: transparent; transition: transform .12s; }
.react-btn:hover, .react-btn:active { transform: scale(1.18); }
.react-btn.on { background: rgba(255, 255, 255, .28); }
.story-reply { gap: 8px; }
.story-reply input { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 999px; padding: 11px 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.story-reply input::placeholder { color: rgba(255, 255, 255, .78); }
.story-reply .btn { border-radius: 999px; }
.story-caption { font-size: 1.15rem; bottom: 130px; }

.post-actions > form:last-child { margin-left: auto; }
.post-actions .btn.sm { font-size: 12px; padding: 6px 10px; border-color: transparent; }

.post-head .person { text-decoration: none; }
.post-head .person:hover b { text-decoration: underline; }

.story-reply .btn.primary { background: #fff; color: #111; border-color: #fff; font-weight: 700; }

/* Highlights, sends and comment likes */
.highlights { display: flex; gap: 16px; overflow-x: auto; padding: 4px 20px 4px; scrollbar-width: none; }
.highlights::-webkit-scrollbar { display: none; }
.highlight { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--ink); flex: 0 0 auto; width: 76px; }
.highlight-ring { width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: var(--line-2); display: grid; place-items: center; }
.highlight-ring img, .highlight-blank { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-sizing: border-box; }
.highlight-blank { display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.highlight span.small { font-size: 12px; font-weight: 600; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-grid .grid-tile { aspect-ratio: 4 / 5; }
.post-send summary { list-style: none; cursor: pointer; }
.post-send summary::-webkit-details-marker { display: none; }
.post-send form .select { min-width: 0; }
.like-btn.small-like { padding: 4px 8px; font-size: 12px; }

/* Phones: icon-only post actions, as on Instagram. The labels stay for screen readers. */
@media (max-width: 600px) {
  .post-actions .like-btn { padding: 8px 10px; }
  .post-actions .like-btn > span:not(.sr) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .post-actions .like-btn { position: relative; }
}

/* Wide screens: a centred feed with a right-hand column, and a profile header like Instagram's web version */
.community-side { display: none; }
@media (min-width: 1024px) {
  .community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .community-main { min-width: 0; max-width: 620px; }
  .community-main .feed { max-width: 620px; }
  .community-side { display: block; position: sticky; top: 28px; padding-top: 12px; }
  .side-me { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-bottom: 18px; }
  .side-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 650; color: var(--ink-2); font-size: 14px; margin: 0 0 6px; }
  .community-side .person-row .btn { font-size: 12px; padding: 5px 12px; }
}
@media (min-width: 900px) {
  .profile-top::before { height: 170px; }
  .profile-row { margin-top: -96px; gap: 28px; padding-left: 36px; padding-right: 36px; }
  .profile-top > * { padding-left: 36px; padding-right: 36px; }
  .profile-top .avatar-xl { width: 160px; height: 160px; font-size: 3.2rem; }
  .profile-name { font-size: 1.9rem; }
  .profile-top .row, .profile-stats, .bio { padding-left: 36px; padding-right: 36px; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 22px; }
  .grid-tile { border-radius: 4px; }
  .grid-tile img { transition: filter .2s; }
  .grid-tile:hover img { filter: brightness(.82); transform: none; }
}

@media (min-width: 900px) {
  .profile-top .bio, .profile-top .profile-stats, .profile-top > .row { margin-left: calc(160px + 28px); }
}

/* Wide screens: keep the profile and its photo grid to a readable width, so tiles do not stretch */
@media (min-width: 900px) {
  .profile-top { max-width: 960px; }
  .profile-top + .section, .section:has(> .post-grid) { max-width: 960px; }
  .post-grid { max-width: 960px; grid-template-columns: repeat(3, minmax(0, 300px)); }
  .grid-tile { aspect-ratio: 4 / 5; }
}

/* Community on wide screens: the feed and the right-hand column sit together in the middle of the window */
@media (min-width: 1024px) {
  .community-layout { grid-template-columns: 620px 300px; gap: 56px; justify-content: center; }
  .community-main { max-width: none; }
  .community-side .person-row .person, .community-side .person-row .person b { text-decoration: none; }
  .community-side .person-row .person:hover b { text-decoration: underline; }
  .choose-photo { cursor: pointer; }
}

/* ==========================================================================
   Design system v2: a calmer, more modern and more sophisticated FamFood.
   Warm neutrals, one accent colour, generous space, clear hierarchy, and
   forms and buttons that are easy to see and easy to hit on a phone.
   ========================================================================== */

:root {
  --bg: #f5f2ea;
  --surface: #fffdf8;
  --surface-2: #f1ede3;
  --surface-3: #e7e1d3;
  --ink: #1a1f1c;
  --ink-2: #4d564f;
  --ink-3: #7d8179;
  --line: #e6dfcf;
  --line-2: #cdc4ad;
  --brand: #b0442b;
  --brand-ink: #fffaf2;
  --brand-soft: #f6e4da;
  --saffron: #c28a2c;
  --saffron-soft: #f7ebcd;
  --focus: #2f5fa8;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --shadow-1: 0 1px 2px rgba(40, 30, 10, .05);
  --shadow-2: 0 1px 2px rgba(40, 30, 10, .04), 0 12px 32px -12px rgba(40, 30, 10, .14);
  --shadow-3: 0 24px 60px -20px rgba(40, 30, 10, .30);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c110e; --surface: #131a16; --surface-2: #1a221e; --surface-3: #232d27;
    --ink: #eeeadf; --ink-2: #b3bcb0; --ink-3: #7f8a7e; --line: #25302a; --line-2: #37453c;
    --brand: #ec8a66; --brand-soft: #3a2219; --saffron: #e6b862; --saffron-soft: #372c15; --focus: #9bbcff;
    --shadow-1: none; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .6);
    --shadow-3: 0 30px 70px -20px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  --bg: #0c110e; --surface: #131a16; --surface-2: #1a221e; --surface-3: #232d27;
  --ink: #eeeadf; --ink-2: #b3bcb0; --ink-3: #7f8a7e; --line: #25302a; --line-2: #37453c;
  --brand: #ec8a66; --brand-soft: #3a2219; --saffron: #e6b862; --saffron-soft: #372c15; --focus: #9bbcff;
  --shadow-1: none; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .6);
  --shadow-3: 0 30px 70px -20px rgba(0, 0, 0, .75);
}

/* Background: a faint warm glow at the top, instead of a flat colour */
body {
  background:
    radial-gradient(900px 480px at 85% -8%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
    radial-gradient(700px 420px at -5% 0%, color-mix(in srgb, var(--saffron) 8%, transparent), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type: tighter headings, quieter eyebrows, comfortable body text */
h1, .page-head h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 720; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; font-weight: 680; }
h3 { font-size: 1.02rem; letter-spacing: -.01em; font-weight: 660; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--ink-3);
  background: none; padding: 0; border-radius: 0; }
.page-head p { color: var(--ink-2); font-size: 1rem; line-height: 1.55; max-width: 62ch; }

/* Focus is always visible and never clipped */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent); outline-offset: 2px; border-radius: 6px; }

/* Buttons: pill shapes, one clear primary, soft ghosts, a gentle lift on hover */
.btn {
  min-height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 620; font-size: .94rem; letter-spacing: -.005em;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 78%, var(--saffron)) 100%);
  border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand) 80%, transparent);
}
.btn.primary:hover { box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--brand) 85%, transparent); }
.btn.ghost { background: transparent; border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); transform: none; box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 13px; font-size: .86rem; }
.btn.lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn:disabled { opacity: .5; transform: none; box-shadow: none; }

/* Fields: taller, rounder, with a soft focus ring in the accent colour */
.input, .textarea, .select {
  min-height: 46px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 16px; /* 16px stops iOS zooming in */
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 96px; line-height: 1.5; }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--ink-3) 60%, var(--line-2)); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.field { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.field > span { font-weight: 600; }

/* Cards: quieter borders, soft depth, and a subtle lift when they are links */
.card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.card.hover { transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }

/* Top bar: frosted glass, so the page shows softly beneath it */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

/* Sidebar: quiet, with one soft pill for the current page */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); }
.nav a { border-radius: 12px; font-weight: 580; transition: background .2s, color .2s; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

/* Phone bottom bar: frosted, with the current page marked */
.tabbar {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

/* Settings: one card per job, the same shape every time */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s4); }
.setting {
  display: grid; gap: var(--s4); align-content: start; padding: 22px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1);
}
.setting-head h3 { margin: 0 0 4px; }
.setting-head p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.setting-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.setting-foot .btn { margin-left: auto; }
.setting-photo { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.setting-photo-actions { display: grid; gap: 10px; justify-items: start; }
.setting-photo-actions .small { margin: 0; }
.file-pick { cursor: pointer; position: relative; }
.setting textarea.textarea { min-height: 84px; }

/* Profile header: the photo, name and sign-out on one calm band */
.profile-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-1); margin-bottom: var(--s5);
}
.profile-hero-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-hero-text { min-width: 0; }
.profile-hero-text h1 { margin: 2px 0 4px; font-size: clamp(1.5rem, 3vw, 2rem); }
.profile-hero-text p { margin: 0; }
.avatar-xl { width: 88px; height: 88px; font-size: 2rem; }
.avatar.avatar-photo { object-fit: cover; }

/* Small status messages */
.flash { padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: var(--s4); font-weight: 580; }
.flash-ok { background: var(--herb-soft, #dcebe0); border-color: color-mix(in srgb, var(--herb, #2e6a4f) 40%, transparent); color: var(--herb, #2e6a4f); }
.flash-error { background: var(--danger-soft, #f7dfdb); border-color: color-mix(in srgb, var(--danger, #a3302a) 40%, transparent); color: var(--danger, #a3302a); }

/* Stats: tiles that read like a dashboard, not a list of links */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.stat-tile {
  display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .25s, border-color .2s;
}
.stat-tile b { font-size: 1.7rem; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--ink-2); font-size: .86rem; }
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }

/* Page sections read as a rhythm, not a stack of boxes */
.section { margin-top: var(--s8); }
.section-head { margin-bottom: var(--s4); }
.section-head h2 { margin: 0; }

/* Phones: a little more air and bigger touch targets */
@media (max-width: 600px) {
  .btn { min-height: 46px; }
  .card { border-radius: 20px; }
  .setting { padding: 18px; border-radius: 20px; }
  .profile-hero { padding: 18px; }
  .avatar-xl { width: 76px; height: 76px; font-size: 1.7rem; }
  .stat-tile b { font-size: 1.45rem; }
}

/* Long filter lists sit on one line that scrolls sideways, with soft edges, instead of wrapping into a wall */
.chip-scroller {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-padding: 16px;
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
}
.chip-scroller::-webkit-scrollbar { display: none; }
.chip-scroller .btn { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 900px) { .chip-scroller { flex-wrap: wrap; overflow: visible; margin: 0; padding: 4px 0 8px; mask-image: none; -webkit-mask-image: none; } }

/* Search fields fill their box, on every screen size */
.search-box .input { width: 100%; min-width: 0; }

/* Segmented controls that sit side by side keep a clear gap between them */
.seg + .seg { margin-left: var(--s3); }

/* ==========================================================================
   FamFood makeover (v3): one look for desktop and phone.
   Editorial serif headings (Fraunces) over a clean sans body (Inter), warm
   paper neutrals, a single terracotta accent, soft layered depth, and calm
   motion. Dark mode is a deep green-charcoal, not a flat invert.
   ========================================================================== */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --bg: #f6f3ec;
  --surface: #fffefb;
  --surface-2: #f3efe6;
  --surface-3: #e9e3d5;
  --ink: #171c19;
  --ink-2: #4f5850;
  --ink-3: #80857c;
  --line: #e8e1d2;
  --line-2: #d3c9b1;
  --brand: #a83f27;
  --brand-ink: #fffaf3;
  --brand-soft: #f7e6dd;
  --saffron: #b98127;
  --saffron-soft: #f8eed2;
  --herb: #2c6b4f;
  --herb-soft: #e0eee5;
  --focus: #2d5ca6;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow-1: 0 1px 1px rgba(45, 35, 15, .04), 0 1px 2px rgba(45, 35, 15, .03);
  --shadow-2: 0 1px 1px rgba(45, 35, 15, .04), 0 8px 20px -10px rgba(45, 35, 15, .16), 0 22px 40px -28px rgba(45, 35, 15, .18);
  --shadow-3: 0 30px 70px -30px rgba(45, 35, 15, .35);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b100d; --surface: #121914; --surface-2: #18211b; --surface-3: #212c24;
    --ink: #efebe1; --ink-2: #b4bdb1; --ink-3: #7d887c; --line: #222e26; --line-2: #34433a;
    --brand: #f08a68; --brand-ink: #1a0f0a; --brand-soft: #35201a; --saffron: #e9b865; --saffron-soft: #33290f;
    --herb: #86cba5; --herb-soft: #163125; --focus: #a3c3ff;
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -18px rgba(0, 0, 0, .7);
    --shadow-3: 0 34px 80px -28px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #0b100d; --surface: #121914; --surface-2: #18211b; --surface-3: #212c24;
  --ink: #efebe1; --ink-2: #b4bdb1; --ink-3: #7d887c; --line: #222e26; --line-2: #34433a;
  --brand: #f08a68; --brand-ink: #1a0f0a; --brand-soft: #35201a; --saffron: #e9b865; --saffron-soft: #33290f;
  --herb: #86cba5; --herb-soft: #163125; --focus: #a3c3ff;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-3: 0 34px 80px -28px rgba(0, 0, 0, .8);
}

/* ---- Base: a readable sans body with editorial headings ---- */
html { font-feature-settings: "cv11", "ss01"; }
body { font-family: var(--font); font-size: 15.5px; line-height: 1.6; color: var(--ink); }
h1, h2, h3, .brand-name, .fact b, .ring b, .recipe-hero h1, .page-head h1, .profile-hero-text h1, .profile-name {
  font-family: var(--font-display); font-weight: 560; letter-spacing: -.02em; font-variation-settings: "opsz" 72;
}
h1, .page-head h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.02; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); line-height: 1.15; }
h3 { font-size: 1.12rem; line-height: 1.25; font-weight: 600; font-family: var(--font); letter-spacing: -.012em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); background: none; padding: 0; border-radius: 0;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.page-head { margin-bottom: var(--s6); }
.page-head p, .page-head .small { color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; max-width: 60ch; }
.small, .muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* ---- Desktop shell ---- */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
}
.brand { padding: 6px 10px 18px; }
.brand-name { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.search-trigger {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; min-height: 42px;
  color: var(--ink-3); transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-trigger:hover { border-color: var(--line-2); background: var(--surface); box-shadow: var(--shadow-1); }
.nav { gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 14px;
  font-weight: 540; color: var(--ink-2); font-size: .95rem; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav a svg { color: var(--ink-3); transition: color .2s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); transform: translateX(2px); }
.nav a:hover svg { color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .55); }
.nav a[aria-current="page"] svg { color: var(--bg); }
:root[data-theme="dark"] .nav a[aria-current="page"], :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
:root[data-theme="dark"] .nav a[aria-current="page"] svg { color: var(--brand-ink); }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.account { font-size: .92rem; }

.topbar {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  min-height: 62px;
}
.main { padding: 40px 48px 96px; }
.main > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.main > .community-layout, .main > .profile-hero, .main > .settings { max-width: 1240px; }

/* ---- Components ---- */
.card {
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1);
}
.card.hover:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-3px); }
.btn {
  min-height: 42px; padding: 0 18px; border-radius: 14px; font-weight: 600; font-size: .93rem; letter-spacing: -.01em;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-1);
}
.btn:hover { box-shadow: var(--shadow-2); }
.btn.primary {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 12px 24px -14px rgba(20, 16, 8, .6);
}
.btn.primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 18px 30px -14px rgba(20, 16, 8, .65); }
:root:not([data-theme="light"]) .btn.primary, :root[data-theme="dark"] .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }

.input, .textarea, .select {
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15.5px;
}
.input:focus, .textarea:focus, .select:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); border-color: var(--focus); }

.chip, .pill, .seg a, .seg label { border-radius: 999px; }
.seg { background: var(--surface-2); border: 1px solid var(--line); padding: 4px; border-radius: 999px; }
.seg a[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); }

/* Stat tiles read like an editorial figure, not a link list */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s4); }
.stat-tile { padding: 22px 22px 20px; border-radius: 22px; }
.stat-tile b { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.stat-tile span { font-size: .88rem; color: var(--ink-2); margin-top: 8px; }

/* Profile: a wide editorial header band */
.profile-hero { padding: 28px 30px; border-radius: 28px; }
.profile-hero-text h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.avatar-xl { width: 104px; height: 104px; font-size: 2.4rem; }
@media (min-width: 900px) { .avatar-xl { width: 116px; height: 116px; } }

/* Settings: a two-column grid on desktop, one column on phones */
.settings { gap: var(--s5); }
.setting { border-radius: 24px; padding: 26px; }
.setting-head h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 560; letter-spacing: -.015em; }
.setting-head p { font-size: .94rem; }

/* Feed and posts: a single calm column with generous space, like a modern social app */
.feed { gap: 20px; }
.post { border-radius: 26px; padding: 20px; }
.post-body { font-size: 16.5px; line-height: 1.62; }

/* Recipe and lists */
.rcard { border-radius: 24px; }
.rcard .body { padding: 18px 20px 20px; }
.rcard h3 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 560; letter-spacing: -.02em; line-height: 1.22; }
.rcard .media img, .rcard .media .tile { aspect-ratio: 4 / 3.2; }

/* Top bar on phones and tab bar: the same material as the desktop bar */
.tabbar {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(20px); backdrop-filter: saturate(170%) blur(20px);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.tabbar a[aria-current="page"] { color: var(--brand); }

/* ---- Phones ---- */
@media (max-width: 899px) {
  .main { padding: 24px 16px 110px; }
  h1, .page-head h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .page-head { margin-bottom: var(--s5); }
  .card, .setting { border-radius: 22px; }
  .post { border-radius: 22px; }
}

@media (min-width: 1100px) {
  .main { padding: 48px 56px 96px; }
}

/* Grid and flex children may shrink to the screen width, so a long chip row scrolls inside its box instead of pushing the page wider */
.chip-scroller { min-width: 0; width: 100%; max-width: 100%; }
form.card > *, .card > * { min-width: 0; }
.main { overflow-x: clip; }

/* Option groups keep each option on one line; on a phone the group scrolls sideways rather than wrapping inside its pill */
.segmented { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > * { white-space: nowrap; flex: 0 0 auto; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }

/* Sidebar footer: one account card (photo, name, email, sign out) and a quiet appearance row */
.sidebar-foot { gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.account-card {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.account-link { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; text-decoration: none; color: inherit; border-radius: 12px; padding: 2px; }
.account-link:hover .account-text b { text-decoration: underline; text-underline-offset: 3px; }
.account-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  box-shadow: 0 0 0 2px var(--surface);
}
.account-text { display: grid; min-width: 0; line-height: 1.25; }
.account-text b { font-size: .92rem; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { font-size: .76rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.icon-btn {
  width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; border: 1px solid transparent;
  background: transparent; color: var(--ink-3); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.theme-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 14px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 550;
  cursor: pointer; transition: background .2s, color .2s;
}
.theme-row:hover { background: var(--surface-2); color: var(--ink); }
.theme-row span:nth-child(2) { flex: 1; text-align: left; }
.theme-mode { font-size: .8rem; color: var(--ink-3); font-weight: 600; }

:root { --sidebar: 256px; }

/* Cuisine filter: the most common cuisines as quick chips, and every cuisine in one dropdown */
.cuisine-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cuisine-bar .chip-scroller { flex: 1 1 360px; min-width: 0; }
.cuisine-select { flex: 0 0 auto; }
.cuisine-select .select { min-height: 40px; min-width: 200px; border-radius: 999px; padding: 6px 16px; font-size: 14.5px; }

/* The account name may take two lines in the sidebar, so the whole name stays readable */
.account-text b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
