/* ============================================================
   Stilwater Meal Planner — visual identity
   Design tokens mirror the Stilwater website:
   cream #f4f1ea · moss #2f4842 · clay #c08457 · sage #8aa399
   Fonts: Fraunces (display) + Outfit (body)
   ============================================================ */
:root {
  --bg: #f4f1ea;
  --bg-2: #ece6da;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --ink: #1c2a2a;
  --ink-2: rgba(28, 42, 42, 0.66);
  --moss: #2f4842;
  --moss-hover: #24382f;
  --sage: #8aa399;
  --sage-soft: #e2ebe4;
  --clay: #c08457;
  --line: rgba(47, 72, 66, 0.14);
  --yt: #ff3b30;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(28, 42, 42, 0.04), 0 10px 30px rgba(28, 42, 42, 0.07);
  --shadow-lg: 0 20px 60px rgba(28, 42, 42, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
.display, h1, h2, h3 { overflow-wrap: break-word; }
/* The hidden attribute must always win over element display rules
   (.panel{display:block} / .modal-backdrop{display:grid} would otherwise
   override it, leaving every section + the modal permanently visible). */
[hidden] { display: none !important; }

body {
  background:
    radial-gradient(1200px 600px at 100% -10%, #eef0e7 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.display { font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: -0.015em; }

.app {
  max-width: 1760px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}
body.modal-open { overflow: hidden; }
.app.at-home .tabs { display: none; }
.app.at-home #backBtn { display: none; }

/* Header */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 44px;
  padding-top: max(18px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "Fraunces", serif; font-size: 21px; font-weight: 600; margin: 0; flex: 1; }
.lang-select {
  font-family: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; background: var(--surface); color: var(--ink); cursor: pointer;
}
.lang-row { display: flex; align-items: center; gap: 10px; margin: 0 2px 18px; color: var(--ink-2); font-size: 15px; }
.lang-icon { width: 20px; height: 20px; color: var(--ink-2); flex: none; }
.pill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  transition: var(--ease);
}
.pill.ghost:hover { background: var(--surface-2); }
.aria-badge { background: var(--sage-soft); border-color: transparent; color: var(--moss); cursor: default; }

/* Tabs */
.tabs { display: flex; align-items: center; gap: 30px; padding: 12px 44px; flex-wrap: wrap; }
.tab {
  border: none; background: transparent; border-radius: 0;
  padding: 8px 0; font-size: 15px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; font-family: inherit; transition: var(--ease);
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* Content */
.content { padding: 10px 44px 28px; flex: 1; }
.panel { display: block; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

/* ---------- Home landing ---------- */
.home-head { margin: 12px 2px 28px; }
.home-head .display.xl { font-size: clamp(30px, 7.5vw, 46px); margin: 10px 0 12px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.home-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
  cursor: pointer; font-family: inherit; color: var(--ink);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.home-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.home-card:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.hc-ico {
  width: 50px; height: 50px; border-radius: 15px; background: var(--moss);
  display: grid; place-items: center; margin-bottom: 6px;
}
.hc-ico svg { width: 24px; height: 24px; color: #f4f1ea; }
.home-card h3 { font-size: 22px; font-weight: 600; margin: 0; }
.home-card p { color: var(--ink-2); font-size: 14px; margin: 0; flex: 1; line-height: 1.55; }
.hc-cta { color: var(--clay); font-weight: 600; font-size: 13.5px; margin-top: 4px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin-bottom: 20px; background: var(--surface-2); }
.badge {
  display: inline-block; background: var(--sage-soft); color: var(--moss);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.display.xl { font-size: clamp(28px, 6.5vw, 44px); line-height: 1.05; margin: 4px 0 10px; }
.sub { color: var(--ink-2); max-width: 64%; margin: 0; }
.hero-art { position: absolute; top: 50%; right: 34px; transform: translateY(-50%); }
.bowl { width: 150px; height: 96px; background: var(--sage-soft); border-radius: 50%; position: relative; }
.bowl::before {
  content: ""; position: absolute; left: 50%; top: 52%;
  width: 78px; height: 40px; background: #ddd0b6; border-radius: 0 0 60px 60px; transform: translateX(-50%);
}
.bowl::after { content: "🌿"; position: absolute; left: 50%; top: 26%; transform: translateX(-50%); font-size: 26px; }

/* ---------- Meal plan header + controls ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.plan-head { margin: 8px 2px 22px; }
.plan-head .badge { margin-bottom: 18px; }
.plan-head .display.xl { font-size: clamp(30px, 7.5vw, 52px); margin: 0 0 10px; }
.plan-head .sub { font-size: 16px; }
.plan-controls {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 2px; margin-bottom: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.day-select label { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }
.plan-gen { text-align: right; }
.plan-gen-hint { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }
select {
  font-family: inherit; font-size: 15px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 18px; background: var(--surface); color: var(--ink); cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit; font-weight: 600; font-size: 14px; border-radius: 999px;
  padding: 11px 20px; border: 1px solid transparent; cursor: pointer; transition: var(--ease);
}
.btn.primary { background: var(--moss); color: #f4f1ea; }
.btn.primary:hover { background: var(--moss-hover); }
.btn.dark { background: var(--moss); color: #f4f1ea; }
.btn.dark:hover { background: var(--moss-hover); }
.btn.sm { padding: 9px 16px; }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- Meal list (clean rows) ---------- */
.meal-list { display: block; }
.meal-row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 24px;
  padding: 26px 2px; border-bottom: 1px solid var(--line); align-items: start;
}
.meal-row.interactive { cursor: pointer; }
.meal-row.interactive:hover .meal-dish { color: var(--moss); }
.meal-slot { color: var(--clay); font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.meal-time { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.meal-dish { font-family: "Fraunces", serif; font-size: 25px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; transition: var(--ease); }
.meal-dish.ritual { color: var(--clay); }
.meal-note { color: var(--ink-2); font-size: 15px; margin-top: 8px; line-height: 1.5; }
.meal-action {
  background: none; border: none; color: var(--clay); font-family: inherit; font-weight: 600;
  font-size: 15px; cursor: pointer; white-space: nowrap; padding: 4px 0;
}
.meal-action:hover { text-decoration: underline; }

/* ---------- Search bar ---------- */
.searchbar {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; margin-bottom: 20px;
}
.search-ico { color: var(--ink-2); }
.searchbar input { flex: 1; border: none; background: transparent; font-family: inherit; font-size: 15px; outline: none; color: var(--ink); }

/* ---------- Recipes: OR divider + ingredient upload ---------- */
.or-divider { display: flex; align-items: center; text-align: center; color: var(--ink-2); font-size: 14px; margin: 22px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or-divider span { padding: 0 18px; }
.upload-box {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px dashed rgba(47, 72, 66, 0.28); border-radius: var(--radius);
  padding: 22px 24px; font-family: inherit; transition: var(--ease); margin-bottom: 20px;
}
.upload-box:hover { border-color: var(--sage); background: var(--surface-2); }
.upload-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--sage-soft); color: var(--moss); display: grid; place-items: center; flex: none; }
.upload-ico svg { width: 26px; height: 26px; }
.upload-text { display: flex; flex-direction: column; gap: 4px; }
.upload-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.upload-sub { font-size: 14px; color: var(--ink-2); }
.ing-results:not(:empty) { margin: 2px 0 22px; }
.ing-detected { color: var(--ink-2); font-size: 14.5px; margin: 6px 0 4px; }
.ing-suggest { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ing-dish {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 10px 18px; font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: var(--ease);
}
.ing-dish:hover { border-color: var(--sage); color: var(--moss); transform: translateY(-1px); }

/* ---------- Chat ---------- */
/* Fill the viewport below the header/tabs instead of a short inner box. */
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 188px); height: calc(100dvh - 188px); min-height: 460px; padding: 0; overflow: hidden; }
.chat-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.chat-head .display { font-size: 30px; margin: 0 0 8px; }
.chat-head .sub { font-size: 14px; max-width: 100%; margin: 0; }
/* Journaling (its own dashboard panel) */
.journal-cats { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 0 22px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.jcat {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 11px 22px; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: var(--ease);
}
.jcat:hover { border-color: var(--sage); }
.jcat.active { background: var(--moss); color: #f4f1ea; border-color: var(--moss); }
.journal-log { min-height: 90px; padding: 30px 2px; display: flex; flex-direction: column; gap: 12px; }
.journal-empty { color: var(--ink-2); text-align: center; padding: 24px 10px; margin: 0; }
.journal-entry { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.je-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.je-cat { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--clay); }
.je-time { font-size: 12px; color: var(--ink-2); }
.je-text { font-size: 15px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.je-photo { display: block; margin-top: 10px; max-width: 220px; width: 100%; border-radius: var(--radius-sm); }

/* Journal composer card */
.journal-composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.jc-label { color: var(--clay); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px; }
.journal-composer textarea {
  width: 100%; border: none; outline: none; resize: vertical; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--ink); line-height: 1.5; min-height: 56px; padding: 0;
}
.jc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.jc-left { display: flex; gap: 10px; flex-wrap: wrap; }
.jc-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 10px 16px; font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: pointer; transition: var(--ease);
}
.jc-btn:hover { border-color: var(--sage); }
.jc-btn svg { width: 18px; height: 18px; color: var(--moss); }
.jc-btn.has-photo { border-color: var(--sage); color: var(--moss); }
.jc-btn.recording { border-color: var(--yt); color: var(--yt); }
.jc-btn.recording svg { color: var(--yt); }
.chat-log { flex: 1; overflow-y: auto; padding: 20px 26px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 84%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; white-space: pre-wrap; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--moss); color: #f4f1ea; border-bottom-right-radius: 5px; }
.bubble.aria { align-self: flex-start; background: var(--sage-soft); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble.typing { color: var(--ink-2); font-style: italic; }
/* Follow-up suggestions live inside the scrollable chat log. */
.chat-suggest { display: flex; flex-direction: column; margin-top: 4px; border-top: 1px solid var(--line); }
.suggest {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 10px 2px; font-family: inherit; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; transition: var(--ease);
}
.suggest:last-child { border-bottom: none; }
.suggest:hover { color: var(--moss); }

/* Inline recipe card in the chat (videos + open-full) */
.chat-recipe {
  align-self: flex-start; max-width: 92%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  border-bottom-left-radius: 5px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.cr-title { font-weight: 700; font-size: 14px; color: var(--moss); }
.cr-dish { display: flex; flex-direction: column; gap: 7px; }
.cr-dish-name {
  align-self: flex-start; background: transparent; border: none; padding: 0;
  font-family: inherit; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer;
}
.cr-dish-name:hover { color: var(--moss); }
.cr-arrow { color: var(--clay); }
.cr-open {
  align-self: flex-start; background: transparent; border: none; color: var(--clay);
  font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 2px 0;
}
.cr-open:hover { text-decoration: underline; }

/* Recipe chips when a reply names several dishes */
.chat-dishes { align-self: flex-start; max-width: 96%; display: flex; flex-wrap: wrap; gap: 8px; }
.cd-label { width: 100%; font-size: 12px; font-weight: 700; color: var(--moss); margin-bottom: 2px; }
.cd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 8px 14px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: var(--ease);
}
.cd-chip::before { content: "▶"; color: var(--yt); font-size: 10px; }
.cd-chip:hover { border-color: var(--sage); color: var(--moss); }

.chat-input { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; font-family: inherit; font-size: 15px; outline: none; }
.chat-input input:focus { border-color: var(--sage); }

/* ---------- Recipe area ---------- */
.recipe-area .empty, .empty { color: var(--ink-2); text-align: center; padding: 34px 0; }
.recipe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.recipe h3 { font-family: "Fraunces", serif; font-size: 30px; margin: 0 0 6px; font-weight: 600; }
.recipe .intro { color: var(--ink-2); margin: 0 0 14px; }
.recipe .meta { display: flex; gap: 16px; color: var(--moss); font-size: 13px; margin-bottom: 18px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--clay); margin: 18px 0 8px; }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.vid { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; color: var(--ink); background: var(--surface); transition: var(--ease); }
.vid:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.vid .thumb { aspect-ratio: 16/9; background: #ffe9e7 center/cover no-repeat; display: grid; place-items: center; color: var(--yt); font-size: 26px; }
.vid .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid .vtitle { font-size: 12.5px; padding: 8px 10px; line-height: 1.35; }
.vid .vtag { font-size: 10px; color: var(--ink-2); padding: 0 10px 8px; }
.howto {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  border: 1px dashed var(--sage); background: var(--sage-soft); border-radius: var(--radius-sm);
  padding: 15px 17px; cursor: pointer; width: 100%; font-family: inherit; font-size: 14px;
  font-weight: 600; color: var(--moss); text-align: left; transition: var(--ease);
}
.howto:hover { filter: brightness(0.98); }

/* ---------- Full-screen recipe + videos popup ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(28, 42, 42, 0.5); display: grid; place-items: center; padding: 2.5vh 2.5vw; z-index: 50; }
.modal {
  background: var(--surface); border-radius: var(--radius);
  width: 95vw; max-width: 1100px; height: 95vh; max-height: 95vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.modal-head .display { font-size: 26px; margin: 0; flex: 1; }
.modal-body { padding: 24px 26px; overflow-y: auto; flex: 1; }
.modal-body h4 { color: var(--clay); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 16px 0 6px; }
.modal-body ul, .modal-body ol { margin: 0; padding-left: 20px; }
.modal-body li { margin-bottom: 7px; line-height: 1.5; }
.modal-foot { padding: 16px 26px; border-top: 1px solid var(--line); }

.rc-loading { color: var(--ink-2); text-align: center; padding: 60px 20px; font-size: 16px; }
.rc-mini { color: var(--ink-2); font-size: 14px; font-style: italic; padding: 6px 0; }
.rc-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: start; }
.rc-intro { color: var(--ink-2); margin: 0 0 12px; font-size: 15px; }
.rc-meta { display: flex; gap: 16px; color: var(--moss); font-size: 13px; margin-bottom: 8px; }
.vid-list { display: flex; flex-direction: column; gap: 10px; }
.vid-link {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px;
  background: var(--surface); transition: var(--ease);
}
.vid-link:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(224,50,44,0.3); }
.vid-yt { width: 40px; height: 28px; flex: none; color: var(--yt); display: grid; place-items: center; }
.vid-yt svg { width: 100%; height: 100%; }
.vid-title { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.4; }
.vid-ext { color: var(--ink-2); font-size: 15px; flex: none; }

@media (max-width: 760px) {
  .rc-cols { grid-template-columns: 1fr; gap: 22px; }
  .modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .modal-backdrop { padding: 0; }
}

/* ---------- Book appointment ---------- */
.book-daybar { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 22px; }
.book-day {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 10px 18px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: var(--ease);
}
.book-day:hover { border-color: var(--sage); }
.book-day.active { background: var(--moss); color: #f4f1ea; border-color: var(--moss); }
.book-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.slot {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  padding: 15px 16px; font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: var(--ease);
}
.slot:hover:not(.taken) { border-color: var(--sage); transform: translateY(-2px); box-shadow: var(--shadow); }
.slot.sel { background: var(--moss); color: #f4f1ea; border-color: var(--moss); }
.slot.taken { color: var(--ink-2); background: var(--bg-2); cursor: not-allowed; font-weight: 500; text-decoration: line-through; }
.book-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.book-form input {
  flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 18px; font-family: inherit; font-size: 15px; outline: none; background: var(--surface); color: var(--ink);
}
.book-form input:focus { border-color: var(--sage); }
.book-hint { color: var(--ink-2); font-size: 13px; margin: 14px 0 0; }
.book-done {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 28px; text-align: center; max-width: 520px; margin: 8px auto;
}
.book-check { font-size: 44px; margin-bottom: 8px; }
.book-done h3 { font-size: 26px; margin: 0 0 10px; }
.book-done p { color: var(--ink-2); margin: 0 0 12px; line-height: 1.6; }
.book-done p b { color: var(--ink); }
.book-done .btn { margin-top: 10px; }

/* ---------- Reminder / generic form card ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; max-width: 620px; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 16px 0 7px; }
.field-label:first-child { margin-top: 0; }
.field-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 15px;
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface); outline: none;
}
.field-input:focus { border-color: var(--sage); }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-col { flex: 1; min-width: 180px; }
.form-submit { margin-top: 22px; }
.rem-hint { color: var(--ink-2); font-size: 13px; margin: 14px 0 0; }
.book-done .rem-hint { margin-top: 4px; }

/* ---------- Install banner ---------- */
.install-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--moss); color: #f4f1ea; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-lg);
}
.install-txt { font-size: 14px; line-height: 1.4; }
.install-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.install-btn { background: #f4f1ea; color: var(--moss); border: none; border-radius: 999px; padding: 9px 16px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.install-x { background: transparent; border: none; color: #f4f1ea; opacity: 0.85; font-size: 15px; cursor: pointer; padding: 6px; line-height: 1; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--moss); color: #f4f1ea; padding: 11px 20px; border-radius: 999px; font-size: 13px; z-index: 80; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .topbar, .tabs, .content { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 640px) {
  .sub { max-width: 100%; }
  .hero-art { display: none; }
  .videos { grid-template-columns: 1fr; }
  .home-cards { grid-template-columns: 1fr; }
  .meal-row { grid-template-columns: 1fr; gap: 4px; }
  .meal-dish { font-size: 21px; }
  .meal-action { padding-top: 6px; }
  .brand { font-size: 18px; }
  .rc-cols { grid-template-columns: 1fr; }
}
