:root {
  --bg: #f4ebe0;
  --bg-warm: #ebdfd0;
  --paper: #fbf6ee;
  --ink: #2c241d;
  --ink-soft: #5e5043;
  --muted: #8a7c6e;
  --line: #e2d3bf;
  --terracotta: #c2674a;
  --terracotta-deep: #a44e36;
  --sage: #6f8a6a;
  --sage-deep: #506a4d;
  --gold: #d4a24c;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 8px 24px rgba(60, 40, 20, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-variation-settings: "opsz" 32;
}
h1 { font-size: 2.4rem; line-height: 1.15; font-variation-settings: "opsz" 96; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

a { color: var(--terracotta-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}
.brand {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--terracotta-deep);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav .hello { color: var(--muted); font-size: 0.92rem; }
.inline { display: inline; margin: 0; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  width: 100%;
  flex: 1;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px;
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-warm); color: var(--ink); }
.btn-danger { background: transparent; color: var(--terracotta-deep); border-color: var(--line); }
.btn-danger:hover { background: #f7e3da; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* Forms */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.form-card.wide { max-width: 920px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=number],
.field input[type=url],
.field input[type=date],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 103, 74, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field .hint { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.error-banner {
  background: #f7e3da;
  border: 1px solid #e9b9a6;
  color: #7a3a26;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.92rem;
}

/* Auth */
.auth-shell {
  max-width: 440px;
  margin: 40px auto 0;
}
.auth-shell h1 { text-align: center; margin-bottom: 18px; }
.auth-shell .form-card { padding: 32px 28px; }
.auth-shell .alt {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Browse page */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hero h1 { margin: 0; }
.hero p { color: var(--muted); margin: 6px 0 0; }

.filters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.filters .field { margin: 0; }
.filters input, .filters select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
}
.filters input:focus, .filters select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 103, 74, 0.15);
}
.filters label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
@media (max-width: 880px) {
  .filters { grid-template-columns: 1fr 1fr; }
}

/* Recipe grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(60, 40, 20, 0.08), 0 14px 32px rgba(60, 40, 20, 0.12);
  text-decoration: none;
}
.card .thumb {
  background: linear-gradient(135deg, #ead8c2, #d8c2a3);
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  position: relative;
}
.card .thumb.empty {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  color: rgba(255,255,255,0.85);
}
.card .body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.card .meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.card .meta .stars { color: var(--gold); letter-spacing: 1px; }
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--bg-warm);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.chip.protein { background: #e6efe2; color: var(--sage-deep); border-color: #cddec4; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h2 { color: var(--ink-soft); }

/* Recipe detail */
.recipe-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
  align-items: start;
}
.recipe-hero .photo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #ead8c2, #d8c2a3);
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.recipe-hero .info h1 { margin-top: 0; }
.recipe-hero .info .stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}
.recipe-hero .info .stat-row .stat .label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.recipe-hero .info .stat-row .stat .val {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--ink);
}
.recipe-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 760px) {
  .recipe-hero { grid-template-columns: 1fr; }
}

.recipe-body {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 760px) {
  .recipe-body { grid-template-columns: 1fr; }
}
.section-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.section-card h2 { font-size: 1.25rem; margin-top: 0; margin-bottom: 14px; }
.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ingredient-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.97rem;
}
.ingredient-list li:last-child { border-bottom: none; }
.ingredient-list .qty {
  font-family: 'Fraunces', serif;
  color: var(--ink);
  min-width: 60px;
  font-weight: 500;
}
.ingredient-list .name { flex: 1; }
.ingredient-list .note { color: var(--muted); font-size: 0.86rem; }

/* Steps (display) */
.steps {
  list-style: decimal;
  padding-left: 1.4em;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.steps li {
  margin-bottom: 14px;
}
.steps .step-body { white-space: pre-wrap; }
.step-timer {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.82rem;
  color: var(--terracotta);
  background: rgba(194, 103, 74, 0.08);
  border-radius: 999px;
  font-family: inherit;
}

/* Ratings */
.rating-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.rating-block h2 { font-size: 1.25rem; margin-top: 0; }
.avg-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.avg-row .big { font-family: 'Fraunces', serif; font-size: 2rem; color: var(--ink); }
.avg-row .stars { color: var(--gold); letter-spacing: 2px; font-size: 1.2rem; }
.avg-row .count { color: var(--muted); font-size: 0.9rem; }
.star-input { display: inline-flex; gap: 4px; flex-direction: row-reverse; }
.star-input input { display: none; }
.star-input label {
  font-size: 1.5rem;
  color: #d6c9b6;
  cursor: pointer;
  transition: color 0.1s;
  margin: 0;
}
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--gold); }

.notes-list { list-style: none; padding: 0; margin: 0; }
.notes-list li {
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-size: 0.95rem;
}
.notes-list li:first-child { border-top: none; }
.notes-list .who { color: var(--muted); font-size: 0.85rem; }

/* Edit form ingredient rows */
.ing-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ing-row {
  display: grid;
  grid-template-columns: 100px 80px 1.6fr 1.4fr;
  gap: 8px;
  align-items: center;
}
.ing-row input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 0.94rem;
}
.ing-row input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 103, 74, 0.15);
}
@media (max-width: 720px) {
  .ing-row { grid-template-columns: 1fr 1fr; }
}

/* Edit form step rows */
.step-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.step-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 8px;
  align-items: stretch;
}
.step-row textarea,
.step-row input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 0.94rem;
}
.step-row textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}
.step-row textarea:focus,
.step-row input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 103, 74, 0.15);
}
@media (max-width: 720px) {
  .step-row { grid-template-columns: 1fr; }
}

.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { height: 16px; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* ──────────────── Browse layout (sidebar + main) ──────────────── */
.browse-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.browse-main { min-width: 0; }

.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sidebar-inner { padding: 18px 16px; }

.facet-group + .facet-group { margin-top: 18px; }
.facet-group h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  padding: 0 8px;
}
.facet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.facet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
  text-transform: capitalize;
  transition: background 0.12s, color 0.12s;
}
.facet:hover {
  background: var(--bg-warm);
  color: var(--ink);
  text-decoration: none;
}
.facet.active {
  background: var(--terracotta);
  color: #fff;
  font-weight: 500;
}
.facet.active:hover { background: var(--terracotta-deep); color: #fff; }
.facet .facet-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet .count {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  background: var(--bg-warm);
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
}
.facet.active .count { background: rgba(255,255,255,0.22); color: #fff; }
.facet .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.dot-chicken    { background: #d4a24c; }
.dot-beef       { background: #a44e36; }
.dot-pork       { background: #d68aa0; }
.dot-fish       { background: #6fa0c2; }
.dot-seafood    { background: #5a8aa8; }
.dot-vegetarian { background: #6f8a6a; }
.dot-vegan      { background: #506a4d; }
.dot-other      { background: #8a7c6e; }

/* Mobile drawer plumbing */
.sidebar-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.sidebar-backdrop { display: none; }
.hamburger { display: none; }

/* Active filter pills */
.active-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
  align-items: center;
}
.active-pills-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-right: 2px;
}
.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  border-radius: 999px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.active-pill:hover { background: #f7e3da; color: var(--terracotta-deep); text-decoration: none; }
.active-pill span[aria-hidden] { font-size: 1rem; line-height: 1; opacity: 0.6; }
.active-pill.clear-all { background: transparent; border-color: transparent; color: var(--muted); }
.active-pill.clear-all:hover { color: var(--terracotta-deep); }

/* Empty state polish */
.empty-state .empty-mark {
  font-size: 2.4rem;
  margin-bottom: 8px;
  opacity: 0.7;
}
.empty-state .btn { margin-top: 14px; }

/* Drawer + hamburger on small screens */
@media (max-width: 1024px) {
  .browse-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 9px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    cursor: pointer;
    margin-bottom: 12px;
  }
  .hamburger span {
    display: block;
    height: 2px;
    background: var(--ink-soft);
    border-radius: 2px;
  }
  .hamburger:hover { background: var(--bg-warm); }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 82vw);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border-right: 1px solid var(--line);
    border-top: none;
    border-bottom: none;
    border-left: none;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 30;
    box-shadow: 0 0 30px rgba(0,0,0,0.18);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar-toggle-input:checked ~ .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 20, 12, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 25;
  }
  .sidebar-toggle-input:checked ~ .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Meal plans */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-header h1 { margin: 0; }

.plan-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-card {
  display: block;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.05s;
}
.plan-card:hover { border-color: var(--terracotta); }
.plan-title { font-family: 'Fraunces', serif; font-size: 1.2rem; }
.plan-meta { font-size: 0.92rem; color: var(--ink-soft); margin-top: 2px; }
.plan-notes { color: var(--ink-soft); margin-top: 8px; }

.day-list { display: flex; flex-direction: column; gap: 14px; }
.day-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.day-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
}

.entry-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.entry:last-child { border-bottom: none; }
.slot-tag {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(111, 138, 106, 0.14);
  color: var(--sage-deep);
  flex-shrink: 0;
}
.entry-name { flex: 1; }
.entry-name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.entry-name a:hover { border-bottom-color: var(--terracotta); }
.entry-notes { font-size: 0.88rem; }
.btn-x {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.btn-x:hover { color: var(--terracotta-deep); }

.add-entry summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}
.add-entry summary::-webkit-details-marker { display: none; }
.add-entry-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
}
.add-entry-form .field { margin: 0; }
.add-entry-form label { font-size: 0.8rem; color: var(--muted); }
.add-entry-form input,
.add-entry-form select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
}
@media (max-width: 720px) {
  .add-entry-form { grid-template-columns: 1fr; }
}

/* Step row timer fields (edit form) */
.step-timer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.step-timer-fields input { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.94rem; background: #fff; }

/* Cooking mode — full-screen, distraction-free */
body.cook-mode {
  background: var(--bg-warm);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.cook-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.cook-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cook-progress { font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.cook-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--ink);
  font-size: 1.6rem;
  text-decoration: none;
  line-height: 1;
}
.cook-exit:hover { background: var(--line); }

.timer-tray {
  position: sticky;
  top: 65px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  background: rgba(194, 103, 74, 0.10);
  color: var(--terracotta-deep);
  border: 1px solid rgba(194, 103, 74, 0.25);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.timer-chip:hover { background: rgba(194, 103, 74, 0.18); }
.chip-step { font-weight: 600; }
.chip-time { font-variant-numeric: tabular-nums; }
.chip-x { padding: 0 4px; opacity: 0.7; }
.chip-x:hover { opacity: 1; }

.cook-stage {
  max-width: 740px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.cook-step { display: none; }
.cook-step.active { display: block; }
.cook-step-num {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.cook-step-body {
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 28px;
  white-space: pre-wrap;
}
.cook-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.cook-timer-display {
  font-family: 'Fraunces', serif;
  font-size: 3.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.cook-timer .btn-running {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
}
.cook-step.timer-running .cook-timer-display { color: var(--terracotta-deep); }
.cook-step.timer-fired .cook-timer-display {
  color: var(--terracotta-deep);
  animation: timer-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes timer-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.cook-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.cook-nav .btn { font-size: 1.05rem; padding: 12px 22px; }
.cook-nav .btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cook-ingredients {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.cook-ingredients h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.cook-ingredients ul { list-style: none; padding: 0; margin: 0; }
.cook-ingredients li { padding: 4px 0; border-bottom: 1px dashed var(--line); }

@media (max-width: 720px) {
  .cook-step-body { font-size: 1.4rem; }
  .cook-timer-display { font-size: 2.8rem; }
}

