/* Family Meal Planner — warm, recipe-box styling. Phone first (360–430px). */

:root {
  --bg: #fbf6ee;
  --bg-2: #f4ecdf;
  --card: #fffdf8;
  --card-2: #fbf4e8;
  --line: #e7dccb;
  --line-strong: #d6c6ad;
  --text: #4a3426;
  --text-2: #7a6250;
  --text-3: #a08a77;
  --primary: #c4623f;      /* terracotta */
  --primary-ink: #fff8f2;
  --primary-soft: #f6e0d5;
  --sage: #7f9a76;
  --sage-ink: #f5f9f2;
  --sage-soft: #e3ebdc;
  --warn: #b5452d;
  --warn-soft: #fbe3dc;
  --gold: #c99a3b;
  --gold-soft: #f6ead0;
  --shadow: 0 1px 2px rgba(74, 52, 38, 0.06), 0 4px 14px rgba(74, 52, 38, 0.07);
  --shadow-lg: 0 10px 40px rgba(74, 52, 38, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --tap: 44px;
  --font-head: 'Fraunces', 'Lora', Georgia, serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(64px + var(--safe-bottom));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1f1915; --bg-2: #2a221c; --card: #2b231d; --card-2: #332a22; --line: #43372d; --line-strong: #5a4a3c;
    --text: #f1e6d8; --text-2: #c8b6a3; --text-3: #9b8774; --primary: #e07a55; --primary-ink: #2a1610;
    --primary-soft: #4a2c20; --sage: #9db694; --sage-ink: #17200f; --sage-soft: #2f3a2a; --warn: #f08a6c;
    --warn-soft: #4a2620; --gold: #e0b55a; --gold-soft: #45391f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1f1915; --bg-2: #2a221c; --card: #2b231d; --card-2: #332a22; --line: #43372d; --line-strong: #5a4a3c;
  --text: #f1e6d8; --text-2: #c8b6a3; --text-3: #9b8774; --primary: #e07a55; --primary-ink: #2a1610;
  --primary-soft: #4a2c20; --sage: #9db694; --sage-ink: #17200f; --sage-soft: #2f3a2a; --warn: #f08a6c;
  --warn-soft: #4a2620; --gold: #e0b55a; --gold-soft: #45391f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  /* faint paper grain */
  background-image: radial-gradient(rgba(122, 98, 80, 0.035) 1px, transparent 1px);
  background-size: 6px 6px;
  color: var(--text);
  font: 16px/1.45 var(--font-body);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.spacer { height: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header h1 { font-size: 1.35rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header .logo { font-size: 1.3rem; }
main { padding: 14px 16px calc(var(--tabbar-h) + 24px); max-width: 680px; margin: 0 auto; }
body.no-tabs main { padding-bottom: 32px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: var(--tabbar-h); padding-bottom: var(--safe-bottom);
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(74, 52, 38, 0.06);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--text-3); font-size: 0.75rem; font-weight: 700; position: relative;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--primary); }
.tabbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.sage { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); flex: none;
}
.icon-btn:active { background: var(--bg-2); }
.icon-btn svg { width: 22px; height: 22px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; }
.section-title h2, .section-title h3 { flex: 1; }

/* ---------- Chips & badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); font-weight: 700; font-size: 0.9rem;
  cursor: pointer; color: var(--text-2);
}
.chip.on { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); }
.chip .x { margin-left: 2px; opacity: 0.7; }
.badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; background: var(--bg-2); color: var(--text-2); white-space: nowrap;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.sage { background: var(--sage-soft); color: var(--sage); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.dot { min-width: 18px; height: 18px; padding: 0 5px; justify-content: center; background: var(--primary); color: var(--primary-ink); }

/* ---------- Forms ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-2); margin: 0 2px 4px; }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--card); outline: none;
  font-size: 16px; /* avoids iOS zoom */
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search { position: relative; }
.search .input { padding-left: 40px; border-radius: 999px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--sage); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); }
.stepper button { width: 38px; height: 36px; border: none; background: none; font-size: 1.2rem; font-weight: 800; color: var(--primary); cursor: pointer; }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; font-size: 0.95rem; }
.stepper.lg button { width: 44px; height: 44px; }

/* ---------- Week planner ---------- */
.week-nav { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.week-nav h2 { flex: 1; text-align: center; font-size: 1.15rem; }
.week-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.day-card { padding: 0; overflow: hidden; }
.day-card .day-head {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 8px; border-bottom: 1px dashed var(--line);
  background: var(--card-2);
}
.day-card .day-head h3 { font-size: 1.1rem; }
.day-card.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.day-card.today .day-head { background: var(--primary-soft); }
.day-card.past { opacity: 0.78; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; min-height: 56px; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot-label { width: 78px; flex: none; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-3); }
.slot-body { flex: 1; min-width: 0; }
.slot-title {
  display: block; width: 100%; text-align: left; border: none; background: none; padding: 4px 0; cursor: pointer;
  font-weight: 700; line-height: 1.25;
}
.slot-title .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.slot.cooked .slot-title .t { color: var(--text-2); }
.slot.skipped .slot-title .t { text-decoration: line-through; color: var(--text-3); }
.add-slot {
  width: 100%; min-height: 40px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: transparent;
  color: var(--text-3); font-weight: 700; cursor: pointer; text-align: left; padding: 0 12px;
}
.add-slot .theme { color: var(--primary); }
.cook-btn {
  flex: none; min-width: 44px; height: 40px; border-radius: 999px; border: 1.5px solid var(--sage); background: transparent;
  color: var(--sage); font-weight: 800; cursor: pointer; padding: 0 10px;
}
.cook-btn.done { background: var(--sage); color: var(--sage-ink); }

.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: var(--radius);
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); margin-bottom: 10px;
}
.banner .grow { padding-top: 2px; }
.banner.sage { background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage) 35%, transparent); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* ---------- Recipes ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.recipe-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; position: relative; text-decoration: none; color: inherit; }
.recipe-card + .recipe-card { margin-top: 0; }
.recipe-thumb { aspect-ratio: 4 / 3; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; overflow: hidden; }
.recipe-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.recipe-card h3 { font-size: 0.98rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.heart { position: absolute; top: 6px; right: 6px; background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 50%; color: var(--primary); }
.heart svg { width: 22px; height: 22px; }
.recipe-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
  min-height: 56px; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left;
}
.recipe-row .thumb { width: 46px; height: 46px; border-radius: 10px; background: var(--bg-2); flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; }
.recipe-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-hero { margin: -14px -16px 14px; aspect-ratio: 16 / 10; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 4rem; overflow: hidden; }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { padding: 9px 2px; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; }
.ing-list li .amt { font-weight: 800; min-width: 74px; color: var(--primary); }
.steps { padding-left: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 40px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}

/* ---------- Editor ---------- */
.ing-edit { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: var(--card-2); }
.ing-edit + .ing-edit { margin-top: 8px; }
.ing-edit.review { border-color: var(--gold); background: var(--gold-soft); }
.ing-edit .orig { font-size: 0.82rem; color: var(--text-2); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.ing-edit .fields { display: grid; grid-template-columns: 64px 76px 1fr; gap: 6px; }
.ing-edit .fields .input, .ing-edit select.input { min-height: 40px; padding: 8px; }
.ing-edit .row2 { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-top: 6px; align-items: center; }
.rem-edit { display: grid; grid-template-columns: 1fr 76px auto; gap: 6px; align-items: center; }
.rem-edit + .rem-edit { margin-top: 6px; }

/* ---------- Grocery list ---------- */
.aisle { margin-top: 18px; }
.aisle h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-family: var(--font-body); font-weight: 800; margin: 0 4px 6px; }
.aisle .card { padding: 0; }
.item { display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 4px 4px 4px 2px; }
.item + .item { border-top: 1px solid var(--line); }
.item .check {
  width: 56px; height: 56px; flex: none; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.item .check span {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.item.checked .check span { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); }
.item .main { flex: 1; min-width: 0; padding: 6px 0; cursor: pointer; }
.item .name { font-weight: 700; }
.item .qty { color: var(--primary); font-weight: 800; margin-left: 4px; }
.item .for { font-size: 0.78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .for.open { white-space: normal; }
.item.checked .name, .item.checked .qty { text-decoration: line-through; color: var(--text-3); }
.item.maybe { opacity: 0.6; }
.item .store-tag { flex: none; margin-right: 6px; }
.quick-add { display: flex; gap: 8px; }
.quick-add .input { border-radius: 999px; }
.suggest-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 4px; box-shadow: var(--shadow); overflow: hidden; }
.suggest-list button { display: flex; width: 100%; text-align: left; min-height: 44px; padding: 0 14px; align-items: center; justify-content: space-between; border: none; background: none; border-bottom: 1px solid var(--line); cursor: pointer; }

/* ---------- Pantry ---------- */
.p-item { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 10px 4px 14px; }
.p-item + .p-item { border-top: 1px solid var(--line); }
.p-item .main { flex: 1; min-width: 0; cursor: pointer; padding: 6px 0; }
.status-pill {
  min-width: 64px; height: 36px; border-radius: 999px; border: none; font-weight: 800; font-size: 0.85rem; cursor: pointer; padding: 0 12px;
}
.status-pill.have { background: var(--sage-soft); color: var(--sage); }
.status-pill.low { background: var(--gold-soft); color: var(--gold); }
.status-pill.out { background: var(--warn-soft); color: var(--warn); }

.qc-card { text-align: center; padding: 30px 18px; }
.qc-card h2 { font-size: 1.6rem; margin: 6px 0 4px; }

/* ---------- Sheets, toasts, overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(40, 25, 15, 0.42); z-index: 50; opacity: 0; transition: opacity 0.2s; }
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px 16px calc(20px + var(--safe-bottom)); transform: translateY(100%); transition: transform 0.24s cubic-bezier(.2,.8,.2,1);
  max-width: 680px; margin: 0 auto;
}
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head h2 { flex: 1; font-size: 1.2rem; }
.sheet .menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 6px; border: none; border-bottom: 1px solid var(--line);
  background: none; text-align: left; font-weight: 700; cursor: pointer;
}
.sheet .menu button:last-child { border-bottom: none; }
.sheet .menu button.danger { color: var(--warn); }
.sheet .menu svg { width: 22px; height: 22px; color: var(--text-2); }
.seg { display: flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1 0 auto; min-height: 38px; border: none; border-radius: 999px; background: none; font-weight: 800; font-size: 0.88rem; color: var(--text-2); cursor: pointer; padding: 0 12px; }
.seg button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }

.toast-wrap { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 520px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px;
  background: var(--text); color: var(--bg); border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 700;
  animation: toast-in 0.2s ease;
}
.toast .grow { min-width: 0; }
.toast button { background: none; border: none; color: var(--primary-soft); font-weight: 800; min-height: 36px; cursor: pointer; padding: 0 8px; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.empty { text-align: center; padding: 36px 20px; color: var(--text-2); }
.empty .art { font-size: 3rem; margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--bg-2), var(--card-2), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-line { height: 14px; margin: 10px 0; }
.sk-card { height: 120px; margin-bottom: 12px; border-radius: var(--radius); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--gold); color: #2a1b0b; text-align: center; font-size: 0.8rem; font-weight: 800; padding: calc(env(safe-area-inset-top, 0px) + 2px) 8px 2px; }

/* ---------- Cooking mode ---------- */
.cook {
  position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(16px + var(--safe-bottom));
}
.cook-top { display: flex; align-items: center; gap: 8px; }
.cook-top .grow { font-family: var(--font-head); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-progress { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.cook-progress > div { height: 100%; background: var(--primary); transition: width 0.25s; }
.cook-step { flex: 1; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; padding: 16px 4px; touch-action: pan-y; }
.cook-step .n { color: var(--primary); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem; }
.cook-step p { font-size: clamp(1.45rem, 6.2vw, 2.1rem); line-height: 1.35; margin: 10px 0 18px; font-family: var(--font-head); font-weight: 500; }
.timer-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--sage); background: var(--sage-soft); color: var(--sage); font-weight: 800; font-size: 1.05rem; cursor: pointer; margin: 0 8px 8px 0; }
.timers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.timer-run { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--sage); color: var(--sage-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-run.done { background: var(--warn); color: #fff; animation: pulse 0.8s infinite alternate; }
.timer-run button { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.25); color: inherit; font-weight: 900; cursor: pointer; }
@keyframes pulse { to { transform: scale(1.05); } }
.cook-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.cook-nav .btn { min-height: 60px; font-size: 1.1rem; }
.drawer-btn { margin: 6px 0 10px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.login .logo { font-size: 3.4rem; text-align: center; }
.login h1 { text-align: center; font-size: 2rem; margin: 8px 0 4px; }

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