:root {
  --bg: #F7F6F2;
  --surface: #EBE9E1;
  --ink: #1C2022;
  --ink-soft: #5B645F;
  --primary: #3B6255;
  --accent: #E0A938;
  --accent-soft: #F3E4BE;
  --line: #DEDCCF;
  --danger: #96432E;
  --radius: 10px;
  --shadow: 2px 2px 0px rgba(0, 0, 0, 0.06);
  --font-display: "Suez One", "Rubik", serif;
  --font-body: "Rubik", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Locks the background page's own scroll while any overlay (recipe view,
   editor, cooking mode, user picker) is open, so it can't scroll or bleed
   through independently of the fixed overlay sitting on top of it. */
body.modal-open {
  overflow: hidden;
  height: 100%;
}

#app { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }

.sticky-top-group {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px calc(14px + env(safe-area-inset-top)) 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--primary);
  color: var(--accent-soft);
  z-index: 20;
}

.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0;
  color: #F7F6F2;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo {
  height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.icon-btn {
  border: none;
  background: rgba(247, 246, 242, 0.12);
  color: #F7F6F2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:active { background: rgba(247, 246, 242, 0.24); }

/* ---------- Search & filters ---------- */
.search-row { padding: 10px 16px 14px; }
#searchInput {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  box-shadow: var(--shadow);
}
#searchInput:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* On mobile, the search bar is pinned to the bottom of the screen (easier
   thumb reach) instead of sitting at the top with the rest of the page. */
@media (max-width: 899.98px) {
  .search-row {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    background: var(--bg);
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 14px rgba(28, 32, 34, 0.12);
  }
  #app { padding-bottom: 92px; }
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(28, 32, 34, 0.08);
}

.recipe-list {
  display: grid;
  gap: 14px;
  padding: 22px 16px 16px;
  position: relative;
  z-index: 0;
}

.tag-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--chip-color, var(--line));
  color: var(--chip-color, var(--ink-soft));
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}
.tag-chip.active {
  background: var(--chip-color, var(--primary));
  color: #FBFAF5;
  border-color: var(--chip-color, var(--primary));
}

/* ---------- Recipe cards (index-card signature) ---------- */
.recipe-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px 14px;
  cursor: pointer;
}

.recipe-card-tab {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--card-color, var(--accent));
  color: #FBFAF5;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 12px 5px;
  border-radius: 6px 6px 2px 2px;
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
}

.recipe-card-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: var(--primary);
}

.recipe-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mini-color, var(--accent-soft));
  color: var(--primary);
  font-weight: 500;
}

.detail-tags { margin: 8px 0 4px; }

.servings-badge {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-inline-start: auto;
}

.empty-state { text-align: center; padding: 60px 30px; color: var(--ink-soft); }
.empty-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); margin-bottom: 6px; }
.plus-ref { display: inline-block; width: 22px; height: 22px; line-height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.9rem; }

/* ---------- Overlays (recipe view / editor) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 30;
}

/* The header+content pair share one card. The header is a plain flex item
   that never scrolls; only the content area below it scrolls internally.
   This avoids position:sticky entirely, which was fragile here. */
.modal-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.modal-card .topbar {
  flex-shrink: 0;
  position: static;
  max-width: none;
  width: 100%;
  margin: 0;
}
.modal-card > .recipe-content,
.modal-card > .editor-content,
.modal-card > .user-picker-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: none;
  width: 100%;
  margin: 0;
}

.recipe-content, .editor-content, .user-picker-content {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 18px 60px;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--primary);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
.section-heading:first-child { margin-top: 4px; }

.servings-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  width: fit-content;
}
.servings-control button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: none; color: var(--primary);
  font-size: 1rem; cursor: pointer;
}
.servings-control span { font-weight: 700; min-width: 60px; text-align: center; }

/* ---------- Checklist rows (the "stamp" signature) ---------- */
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: none; }

.stamp-box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--primary);
  position: relative;
  cursor: pointer;
  background: var(--surface);
  transition: transform 0.15s ease;
}
.stamp-box svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s ease;
}
.check-row.checked .stamp-box {
  background: var(--primary);
  border-color: var(--primary);
}
.check-row.checked .stamp-box svg { opacity: 1; transform: scale(1); }

/* the "kitchen strike-through" signature, simplified: plain strikethrough + grey */
.row-text {
  flex: 1;
  line-height: 1.5;
}
.check-row.checked .row-text {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--ink-soft);
}

.plain-step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
}
.plain-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #F7F6F2;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.plain-step-text { flex: 1; line-height: 1.5; }
.row-amount { font-weight: 700; color: var(--primary); margin-inline-start: 6px; }

.reset-link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.notes-box {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--primary);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.source-link { display: inline-block; margin-top: 10px; color: var(--ink-soft); font-size: 0.85rem; }

.start-cooking-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 22px 0 4px;
  padding: 15px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #F7F6F2;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.ask-gemini-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 10px 0 4px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--primary);
  background: none;
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ---------- Cooking mode ---------- */
.cooking-overlay {
  background: var(--primary);
  display: flex;
  flex-direction: column;
  padding: 0;
}
.cooking-close-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  background: rgba(247, 246, 242, 0.15);
  color: #F7F6F2;
  z-index: 5;
}
.cooking-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 28px 40px;
  overflow-y: auto;
  min-height: 0;
}
.cooking-step-inner {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  width: 100%;
}
.cooking-step-inner > * { flex-shrink: 0; }
.cooking-counter {
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
  margin: 0;
  letter-spacing: 0.02em;
}
.cooking-step-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.4;
  color: #F7F6F2;
  margin: 0;
  max-width: 480px;
}
.cooking-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(247, 246, 242, 0.1);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.cooking-timer-display {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: #F7F6F2;
}
.cooking-timer.timer-done { animation: timer-pulse 1s ease-in-out infinite; }
.cooking-timer.timer-done .cooking-timer-display { color: var(--accent); }
@keyframes timer-pulse {
  0%, 100% { background: rgba(247, 246, 242, 0.1); }
  50% { background: rgba(224, 169, 56, 0.35); }
}
.cooking-timer-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}
.cooking-timer-btn:disabled { opacity: 0.7; cursor: default; }

.cooking-advance-btn {
  margin-top: 12px;
  border: none;
  border-radius: 999px;
  padding: 18px 40px;
  background: var(--accent);
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.cooking-voice-btn {
  margin-top: 14px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid rgba(247, 246, 242, 0.4);
  background: rgba(247, 246, 242, 0.1);
  color: #F7F6F2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cooking-voice-btn.active {
  background: var(--danger);
  border-color: var(--danger);
  color: #F7F6F2;
  animation: voice-pulse 1.4s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(150, 67, 46, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(150, 67, 46, 0); }
}
.cooking-voice-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  color: rgba(247, 246, 242, 0.75);
  text-align: center;
  max-width: 280px;
}

.cooking-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: cooking-pop 0.5s cubic-bezier(.34, 1.56, .64, 1);
}
.cooking-complete-emoji { font-size: 4.5rem; }
.cooking-complete p {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: #F7F6F2;
  margin: 0;
}
@keyframes cooking-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- Editor ---------- */
.field-label {
  display: block;
  font-weight: 700;
  color: var(--primary);
  margin: 18px 0 6px;
  font-size: 0.9rem;
}
.text-input, .notes-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.text-input:focus, .notes-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.servings-input { width: 100px; }
.notes-input { resize: vertical; }

.timer-input { flex: 0 0 84px; text-align: center; }

.tag-editor { display: flex; flex-wrap: wrap; gap: 8px; }

.editor-list { display: flex; flex-direction: column; gap: 8px; }
.editor-row { display: flex; gap: 6px; align-items: center; }
.editor-row .text-input { flex: 1; min-width: 0; }
.editor-row .amount-input { flex: 0 0 70px; }
.editor-row .unit-select { flex: 0 0 84px; padding: 11px 6px; font-size: 0.85rem; }
.editor-row .step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.row-remove-btn {
  flex-shrink: 0; border: none; background: none; color: var(--danger);
  font-size: 1.3rem; cursor: pointer; width: 24px;
}

.drag-handle {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: var(--ink-soft);
  fill: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  border-radius: 6px;
}
.drag-handle:hover { background: var(--accent-soft); color: var(--primary); }
.editor-row.dragging {
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 8px;
  opacity: 0.95;
}
.editor-row.dragging .drag-handle { cursor: grabbing; color: var(--primary); }
.header-row {
  background: var(--accent-soft);
  padding: 6px 8px;
  border-radius: 8px;
}
.header-row .header-title {
  font-weight: 700;
  color: var(--primary);
  background: transparent;
  border-color: transparent;
}

.ingredient-group-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--primary);
  margin: 16px 0 4px;
  font-size: 0.95rem;
}
.ingredient-group-title:first-child { margin-top: 0; }

.add-row-group { display: flex; gap: 8px; margin-top: 8px; }
.add-row-group .add-row-btn { margin-top: 0; }

.add-row-btn {
  margin-top: 8px;
  border: 1.5px dashed var(--line);
  background: none;
  color: var(--ink-soft);
  padding: 9px;
  border-radius: 10px;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-body);
}
.icon-btn-spacer { display: inline-block; width: 40px; height: 40px; flex-shrink: 0; }

.user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.user-list-empty { color: var(--ink-soft); font-size: 0.9rem; }
.user-chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}
.user-chip.active { background: var(--primary); color: #F7F6F2; }
.user-add-row { display: flex; gap: 8px; }
.user-add-row .text-input { flex: 1; }
.user-add-row .add-row-btn { width: auto; margin-top: 0; white-space: nowrap; padding: 11px 18px; }
.add-header-btn { color: var(--primary); border-color: var(--accent); }

/* ---------- Gemini chat ---------- */
.modal-card > .gemini-chat-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--surface);
}
.gemini-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
.gemini-msg {
  max-width: 80%;
  padding: 11px 16px;
  border-radius: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.gemini-msg.user {
  align-self: flex-end;
  background: var(--primary);
  color: #F7F6F2;
  border-bottom-left-radius: 4px;
}
.gemini-msg.model {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.gemini-msg.error {
  align-self: center;
  background: var(--accent-soft);
  color: var(--danger);
  font-size: 0.9rem;
  text-align: center;
}
.gemini-msg.context {
  align-self: center;
  max-width: 92%;
  background: var(--accent-soft);
  color: var(--primary);
  border: 1px dashed var(--accent);
  font-size: 0.85rem;
}
.gemini-msg.thinking { color: var(--ink-soft); font-style: italic; }

.gemini-empty-hint {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 20px;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

.gemini-extract-btn {
  position: sticky;
  bottom: 8px;
  margin: 16px auto 0;
  max-width: 320px;
}

.gemini-input-row {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  width: 100%;
}
.gemini-input {
  flex: 1;
  resize: none;
  max-height: 120px;
  font-family: var(--font-body);
}
.gemini-send-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #F7F6F2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gemini-send-btn svg { transform: scaleX(-1); }
.gemini-send-btn:disabled { opacity: 0.5; cursor: default; }

.gemini-image-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gemini-image-btn:active { background: var(--accent-soft); }
.gemini-image-btn:disabled { opacity: 0.5; cursor: default; }

.gemini-attach-wrap { position: relative; flex-shrink: 0; }
.gemini-attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(28, 32, 34, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 200px;
  z-index: 5;
}
.gemini-attach-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  text-align: right;
  white-space: nowrap;
}
.gemini-attach-menu button:not(:last-child) { border-bottom: 1px solid var(--line); }
.gemini-attach-menu button:active { background: var(--accent-soft); }
.gemini-attach-menu button:disabled { opacity: 0.5; cursor: default; }
.gemini-attach-menu.attach-menu-below {
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: auto;
}

.gemini-msg.image-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  display: block;
}

.delete-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--danger);
  background: none;
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
}

.save-btn-bottom {
  display: block;
  width: 100%;
  margin-top: 34px;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #F7F6F2;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-body);
}

@media (min-width: 480px) {
  .recipe-list { grid-template-columns: 1fr 1fr; }
}

/* ---------- Desktop layout ---------- */
@media (min-width: 900px) {
  #app { max-width: 1100px; }

  .topbar {
    border-radius: 0 0 var(--radius) var(--radius);
    max-width: 1100px;
    margin: 0 auto;
  }

  .search-row, .tag-filters { max-width: 1100px; margin: 0 auto; }

  .recipe-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .recipe-card {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }
  .recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(42, 46, 39, 0.14);
  }

  /* Overlays read as centered modal cards instead of edge-to-edge mobile pages.
     Cooking mode is excluded - it's an immersive full-screen layer, not a modal
     over the page, so it keeps its own solid background. */
  .overlay:not(.cooking-overlay) {
    background: rgba(28, 32, 34, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
  }
  .modal-card {
    max-width: 720px;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 80px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(42, 46, 39, 0.3);
  }
  .modal-card .topbar {
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .recipe-content, .editor-content, .user-picker-content {
    background: var(--surface);
    max-width: none;
    padding: 28px 36px 40px;
  }
}
