/* ReciPeats recipe UI — apothecary-kitchen / lab-notebook on dark bog.
   Design tokens; scoped to new surfaces only. */

:root {
  --rp-forest: #081612;
  --rp-bog: #002921;
  --rp-moss: #122a22;
  --rp-moss-raised: #1a382e;
  --rp-lichen: #7a9f8e;
  --rp-cream: #e8dcc8;
  --rp-butter: #e4b44d;
  --rp-carrot: #cf5c28;
  --rp-carrot-deep: #a84820;
  --rp-carrot-text: #e0824f;
  --rp-ink: #f2ead8;
  --rp-rule: rgba(122, 159, 142, 0.28);
  --rp-glow: rgba(228, 180, 77, 0.12);
  --rp-radius: 10px;
  --rp-radius-sm: 6px;
  --rp-font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rp-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  --cooking-bar-h: calc(3.5rem + env(safe-area-inset-top, 0px));
  --cooking-gap: 1rem;
  --cooking-pad: 1rem;
  --cooking-step-pad: 1rem;
  --app-nav-h: calc(3.9375rem + env(safe-area-inset-bottom, 0px));
  --app-action-bar-h: 3.25rem;
  --app-scaler-h: 3.3rem;
  --app-chrome-gap: 0.5rem;
  --app-recipe-pad: calc(var(--app-nav-h) + var(--app-action-bar-h) + var(--app-chrome-gap) + 0.5rem);
}

/* ---- Recipe page shell (centered recipe card + split layout) ---- */
article.recipe-sheet {
  font-family: var(--rp-font-ui);
  max-width: 880px;
  margin: 0 auto;
  /* Less empty pad under nutrition before tags */
  padding: 2.5rem 1.35rem 0.75rem;
}

.yt-facade {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--rp-forest);
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid var(--rp-cream);
}

.yt-facade-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent var(--rp-cream);
}

.recipe-hero {
  text-align: center;
  margin-bottom: 0.35rem;
}

.recipe-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e1c89c;
  font-weight: 600;
  margin: 0 0 0.45rem;
}

article.recipe-sheet h1 {
  font-family: Merriweather, serif;
  text-align: center;
  border: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: navajowhite;
}

.recipe-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--rp-lichen);
  margin: 0 0 1rem;
}

.recipe-info-item {
  display: flex;
  align-items: center;
}

.recipe-info-item:not(:last-child)::after {
  content: "·";
  color: #e1c89c;
  margin: 0 0.55rem;
}

.recipe-info-short {
  display: none;
}

.recipe-info-item b {
  color: navajowhite;
  font-weight: 600;
  margin-left: 0.25rem;
}

/* Servings scale lives in ingredients header — hide duplicate strip item */
article.recipe-sheet:has(.recipe-scaler-stepper) .recipe-info-item:has(#recipe-info-servings) {
  display: none;
}

.recipe-scaler-serves {
  flex: 0 0 100%;
  font-size: 0.72rem;
  color: var(--rp-lichen);
  white-space: nowrap;
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.recipe-scaler-serves:not([hidden]) {
  display: block;
}

.recipe-content .recipe-meta-source {
  display: none !important;
}

.recipe-intro {
  width: 100%;
  margin: 0 auto 1.1rem;
  max-width: 42rem;
  color: var(--rp-lichen);
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
}

.recipe-intro p {
  margin: 0 0 0.45rem;
}

.recipe-intro p:last-child {
  margin-bottom: 0;
}

.recipe-intro a {
  color: var(--rp-butter);
}

.recipe-rule {
  border: none;
  border-top: 2px dashed rgba(225, 200, 156, 0.28);
  margin: 0 auto 1.75rem;
  max-width: 300px;
}

article.recipe-sheet .recipe-controls-wrapper {
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: center;
  min-height: 2.75rem;
}

@media (max-width: 900px) {
  article.recipe-sheet .recipe-controls-wrapper {
    min-height: 6.5rem;
  }
}

article.recipe-sheet .recipe-toolbar.scaler-container {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0 auto 0.85rem;
  min-height: 0;
  width: 100%;
  max-width: min(100%, 20rem);
}

@media (min-width: 901px) {
  article.recipe-sheet .recipe-toolbar.scaler-container {
    max-width: min(100%, 40rem);
  }

  article.recipe-sheet .recipe-toolbar .button-group {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
}

article.recipe-sheet .recipe-toolbar .scaler-controls {
  display: none;
}

article.recipe-sheet .recipe-toolbar .button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

article.recipe-sheet .recipe-toolbar .scaler-button,
article.recipe-sheet .recipe-toolbar .favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: #123524;
  color: var(--rp-lichen);
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: none;
  box-sizing: border-box;
}

article.recipe-sheet .recipe-toolbar .scaler-button:hover,
article.recipe-sheet .recipe-toolbar .favorite-button:hover {
  border-color: #e1c89c;
  color: #e1c89c;
  background: #123524;
}

article.recipe-sheet .recipe-toolbar .scaler-button.cooking-mode-active,
article.recipe-sheet .recipe-toolbar .favorite-button.is-favorite {
  background: #4a7c6a;
  border-color: #4a7c6a;
  color: navajowhite;
}

/* Cook is app-only (FAB). Butter CTA only on app surfaces. */
html:not(.recipeats-app-root) .cooking-mode-btn,
html:not(.recipeats-app-root) .cook-first-cta,
html:not(.recipeats-app-root) .recipe-fab-cook {
  display: none !important;
}

.cook-first-cta,
body.recipeats-app.recipe-page .recipe-fab-cook {
  background: var(--rp-butter, #fead57);
  color: var(--rp-bog, #002921);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.cook-first-cta:hover,
body.recipeats-app.recipe-page .recipe-fab-cook:hover {
  filter: brightness(1.05);
}

.cook-first-cta.cooking-mode-active,
body.recipeats-app.recipe-page .recipe-fab-cook.cooking-mode-active {
  background: #4a7c6a;
  color: navajowhite;
  box-shadow: none;
  filter: none;
}

article.recipe-sheet .recipe-toolbar .copy-button,
article.recipe-sheet .recipe-toolbar .shopping-list-button {
  display: none !important;
}

/* ---- Cook-first toolbar (app + narrow mobile browser) ---- */
.recipe-toolbar.cook-first-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  max-width: min(100%, 20rem);
  margin: 0 auto 0.85rem;
}

.cook-first-cta {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: #fead57;
  color: #002921;
  font-family: var(--rp-font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.cook-first-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}

.cook-first-actions .favorite-button,
.cook-first-actions .share-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
}

.cook-first-actions .recipe-overflow-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  letter-spacing: 0.08em;
}

article.recipe-sheet .recipe-content {
  width: 100%;
}

.recipe-content-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 2.75rem;
  align-items: start;
  width: 100%;
}

.ingredients-card {
  background: #0f2e22;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: 6px;
  padding: 1.15rem;
  position: sticky;
  top: 1rem;
  /* visible so diet-flag hover tooltips are not clipped by the card */
  overflow: visible;
}

.ingredients-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.65rem;
  padding: 0;
  border: none;
}

.ingredients-head-row h2#ingredients {
  margin: 0;
  text-align: left;
  font-family: Merriweather, serif;
  font-size: 1.15rem;
  color: #e1c89c;
  border: none;
}

.recipe-scaler-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.4rem;
  flex-shrink: 0;
}

.recipe-scaler-label {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-lichen);
}

.ingredients-head-row .scaler-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: 999px;
  overflow: hidden;
  gap: 0;
  margin: 0;
}

.ingredients-head-row .scaler-controls .scaler-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: #123524;
  color: #e1c89c;
  font-size: 1rem;
  box-shadow: none;
}

.ingredients-head-row .scaler-controls .scaler-button:hover {
  background: #1a3d2e;
}

.ingredients-head-row .multiplier-display {
  min-width: 2.2rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
  color: navajowhite;
  border: none;
  background: transparent;
}

.ingredients-head-row .scale-presets {
  display: none;
}

.ingredients-card ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.ingredients-card > p,
.ingredients-card > h3,
.ingredients-card .recipe-ing-subhead {
  margin: 0.75rem 0 0.15rem;
  font-family: "IBM Plex Sans", "Open Sans", sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8aab99;
  border: none;
  padding: 0;
  line-height: 1.35;
}

.ingredients-card > h3:first-of-type,
.ingredients-card .recipe-ing-subhead:first-of-type {
  margin-top: 0;
}

.ingredients-card ul li {
  position: relative;
  display: block;
  padding: 0.4rem 0 0.4rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e1c89c;
  overflow-wrap: break-word;
}

/* Simple gold disc — no rotated “carrot seed” ovals */
.ingredients-card ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #e1c89c;
  opacity: 0.75;
  transform: none;
}

/* *cinnamon* in markdown → .ingredient-flag (weight + color only) */
.ingredients-card .ingredient-flag {
  color: var(--rp-carrot-text);
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

/* server-rendered link from ingredient text to its WikiPeatia article */
.ingredients-card .ingredient-wiki-link {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 0.15em;
  text-decoration-color: rgba(126, 200, 227, 0.55);
}

.ingredients-card .ingredient-wiki-link:hover,
.ingredients-card .ingredient-wiki-link:focus-visible {
  text-decoration-color: #7ec8e3;
}

.directions-section em {
  color: var(--rp-carrot-text);
  font-style: normal;
  font-weight: 700;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.recipe-contribution,
article.recipe-sheet .recipe-content > h2#contribution {
  margin: 2rem auto 0;
  max-width: 42rem;
  color: var(--rp-lichen);
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
}

.recipe-contribution h2,
article.recipe-sheet .recipe-content > h2#contribution {
  font-family: Merriweather, serif;
  font-size: 1.05rem;
  color: #e1c89c;
  margin: 0 0 0.65rem;
  border: none;
  text-align: center;
}

article.recipe-sheet .recipe-content > h2#contribution ~ p {
  text-align: center;
}

.recipe-contribution p {
  margin: 0 0 0.45rem;
}

.recipe-contribution p:last-child {
  margin-bottom: 0;
}

.ingredients-card ul li:last-child {
  border-bottom: none;
}

/* App checklist replaces the disc with a tap target */
.ingredients-card ul.ingredient-checklist li::before {
  display: none;
}

.recipe-ingredient-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-cta-primary {
  background: var(--rp-carrot);
  color: #fff9f2;
  border: none;
  border-radius: 5px;
  padding: 0.7rem 1rem;
  font-family: var(--rp-font-ui);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.recipe-cta-primary:hover {
  background: #db632e;
}

.recipe-cta-link {
  background: none;
  border: none;
  padding: 0;
  color: #6a9f88;
  font-family: var(--rp-font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.recipe-cta-link:hover {
  color: #8fc0ac;
}

.directions-section h2#directions {
  font-family: Merriweather, serif;
  font-size: 1.15rem;
  color: #e1c89c;
  margin: 0 0 1rem;
  text-align: left;
  border: none;
}

.directions-section h3,
.directions-section .recipe-dir-subhead {
  font-family: "IBM Plex Sans", "Open Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a8a78;
  margin: 1.65rem 0 0.6rem;
  padding: 0;
  border: none;
  line-height: 1.35;
}

.directions-section h3:first-of-type,
.directions-section .recipe-dir-subhead:first-of-type {
  margin-top: 0.35rem;
}

.directions-section ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: recipe-step;
}

.directions-section ol > li {
  counter-increment: recipe-step;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding-bottom: 1.35rem;
}

.directions-section ol > li .step-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.2rem;
}

.directions-section ol > li::before {
  content: counter(recipe-step);
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid #e1c89c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Merriweather, serif;
  font-size: 0.9rem;
  color: #e1c89c;
}

.directions-section ol > li.has-step-check::before {
  display: none;
}

.step-check-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid #e1c89c;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Merriweather, serif;
  font-size: 0.9rem;
  color: #e1c89c;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.step-check-btn.step-done {
  background: #4a7c6a;
  border-color: #4a7c6a;
  color: navajowhite;
}

.directions-section ol > li.step-checked {
  opacity: 0.55;
}

.directions-section ol > li.step-checked .step-text {
  text-decoration: line-through;
}

.recipe-cooking-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: auto;
  min-height: var(--cooking-bar-h);
  padding: max(0.55rem, env(safe-area-inset-top, 0px)) 0.85rem 0.55rem;
  background: #123524;
  border-bottom: 1px solid #e1c89c;
  color: navajowhite;
  font-size: 0.85rem;
  font-weight: 600;
  box-sizing: border-box;
}

.recipe-cooking-bar[hidden] {
  display: none !important;
}

.recipe-cooking-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Merriweather, serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.recipe-cooking-timers {
  flex-shrink: 0;
  font-family: var(--rp-font-ui, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fead57;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(225, 200, 156, 0.28);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-cooking-timers[hidden] {
  display: none !important;
}

.recipe-cooking-bar button {
  flex-shrink: 0;
  background: #4a7c6a;
  border: none;
  color: navajowhite;
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.recipe-cooking-bar button.recipe-cooking-metric {
  background: transparent;
  border: 1px solid rgba(225, 200, 156, 0.45);
  min-width: 3.6rem;
}

.recipe-cooking-bar button.recipe-cooking-metric[aria-pressed="true"] {
  border-color: #fead57;
  color: #fead57;
}

body.recipe-cooking-mode {
  overflow: hidden;
}

html.recipeats-app-root body.recipe-cooking-mode {
  padding-bottom: 0 !important;
}

body.recipe-cooking-mode .main-nav,
body.recipe-cooking-mode footer,
body.recipe-cooking-mode .app-bottom-nav,
body.recipe-cooking-mode .wiki-peatia-footer,
body.recipe-cooking-mode .recipe-intro,
body.recipe-cooking-mode .content > h2,
body.recipe-cooking-mode .content > ul,
body.recipe-cooking-mode .recipe-hero,
body.recipe-cooking-mode .recipe-info,
body.recipe-cooking-mode .recipe-app-control-deck,
body.recipe-cooking-mode .recipe-controls-wrapper,
body.recipe-cooking-mode .recipe-rule,
body.recipe-cooking-mode .recipe-tags,
body.recipe-cooking-mode .nutrition-facts,
body.recipe-cooking-mode .recipe-content-grid,
body.recipe-cooking-mode .recipe-contribution,
body.recipe-cooking-mode #offline-banner,
body.recipe-cooking-mode .recipe-app-tab-bar,
body.recipe-cooking-mode .recipe-app-action-bar,
body.recipe-cooking-mode .recipe-fab-cook {
  display: none !important;
}

body.recipe-cooking-mode .content {
  padding: 0 !important;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.recipe-cooking-mode article.recipe-sheet {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: none;
  margin: 0;
  /* Match fixed cooking bar; JS also sets --cooking-bar-h to measured height */
  padding: var(--cooking-bar-h) 0 env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Timer strip sits under cooking bar while cooking */
body.recipe-cooking-mode.has-timer-strip .recipeats-timer-strip {
  top: var(--cooking-bar-h);
  z-index: 9210;
}

body.recipe-cooking-mode.has-timer-strip article.recipe-sheet {
  padding-top: calc(var(--cooking-bar-h) + 2.4rem);
}

body.recipe-cooking-mode .recipe-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.recipe-cook-shell { display: none; }

body.recipe-cooking-mode .recipe-cook-shell {
  display: flex !important;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.75rem;
  overflow: hidden;
  box-sizing: border-box;
}

/* Ingredients: size to content (no huge empty zone). Steps take the rest. */
body.recipe-cooking-mode .cook-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 0 1 auto;
  max-height: 40dvh;
  margin: 0;
  padding: 0.65rem 0.8rem;
  overflow: hidden;
  background: rgba(18, 42, 34, 0.65);
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: var(--rp-radius-sm);
  box-sizing: border-box;
}

body.recipe-cooking-mode .cook-pane-steps {
  flex: 1 1 0;
  max-height: none;
  background: rgba(18, 42, 34, 0.45);
}

body.recipe-cooking-mode .cook-pane h2 {
  flex-shrink: 0;
  margin: 0 0 0.4rem;
  font-family: Merriweather, serif;
  font-size: 1.05rem;
  color: #e1c89c;
}

body.recipe-cooking-mode .cook-ing-list {
  flex: 0 0 auto;
  margin: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  color: navajowhite;
  font-size: 0.95rem;
  line-height: 1.4;
  list-style: none;
  padding: 0;
  max-height: min(34dvh, 100%);
}

body.recipe-cooking-mode .cook-step-list {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  color: navajowhite;
  font-size: 0.95rem;
  line-height: 1.4;
  list-style: none;
  padding: 0;
}

body.recipe-cooking-mode .cook-ing-list li {
  margin: 0;
  padding: 0.3rem 0 0.3rem 0.9rem;
  overflow-wrap: anywhere;
  position: relative;
}

body.recipe-cooking-mode .cook-ing-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #e1c89c;
}

body.recipe-cooking-mode .cook-step-list > li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.35rem 0 0.7rem;
  overflow-wrap: anywhere;
  pointer-events: auto;
}

body.recipe-cooking-mode .cook-step-list .step-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  padding-top: 0.15rem;
}

body.recipe-cooking-mode .cook-step-list > li.step-checked {
  opacity: 0.55;
}

body.recipe-cooking-mode .cook-step-list > li.step-checked .step-text {
  text-decoration: line-through;
}

body.recipe-cooking-mode .cook-step-list .step-check-btn {
  pointer-events: auto;
}

body.recipe-cooking-mode .recipe-timer-btn {
  pointer-events: auto;
  display: inline-flex;
  margin: 0 0.15rem;
  vertical-align: baseline;
}

body.recipe-cooking-mode .recipe-notes {
  display: none !important;
}

@media (min-width: 901px) and (min-height: 781px) {
  body.recipe-cooking-mode .recipe-cook-shell {
    flex-direction: row;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    gap: 1rem;
  }
  body.recipe-cooking-mode .cook-pane {
    flex: 0 0 280px;
    max-height: none;
  }
  body.recipe-cooking-mode .cook-pane-steps {
    flex: 1 1 0;
  }
}
.recipe-tags .tag {
  border: 1px dashed rgba(225, 200, 156, 0.28);
  color: #e1c89c;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: transparent;
}

.recipe-tags h3 {
  display: none;
}

.recipe-tags .tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

@media (max-width: 900px) {
  article.recipe-sheet {
    padding: 1.25rem 0.85rem 1.5rem;
  }

  article.recipe-sheet h1 {
    font-size: clamp(1.45rem, 6.5vw, 1.9rem);
    line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  article.recipe-sheet .recipe-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.45rem;
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  article.recipe-sheet .recipe-info-long {
    display: none;
  }

  article.recipe-sheet .recipe-info-short {
    display: inline;
  }

  article.recipe-sheet .recipe-info-item {
    flex-shrink: 0;
    white-space: nowrap;
  }

  article.recipe-sheet .recipe-info-item:not(:last-child)::after {
    margin: 0 0.35rem;
  }

  article.recipe-sheet .recipe-info-item b {
    margin-left: 0.15rem;
  }

  .recipe-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ingredients-card {
    position: static;
    padding: 0.9rem 0.85rem;
    overflow: visible;
    box-sizing: border-box;
    max-width: 100%;
  }

  article.recipe-sheet .recipe-controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  /* Kill the old 600px “stack every tool full-width” rule on recipe pages */
  article.recipe-sheet .recipe-toolbar.scaler-container {
    flex-direction: row;
    align-items: center;
    padding: 0;
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 0.75rem;
  }

  article.recipe-sheet .recipe-toolbar .button-group,
  article.recipe-sheet .button-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100%;
    gap: 0.4rem !important;
    order: 0;
  }

  article.recipe-sheet .recipe-toolbar .scaler-button,
  article.recipe-sheet .recipe-toolbar .favorite-button,
  article.recipe-sheet .button-group .scaler-button,
  article.recipe-sheet .button-group .favorite-button {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 40px;
    margin: 0 !important;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .ingredients-head-row {
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
  }

  .ingredients-head-row h2#ingredients {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .recipe-scaler-stepper {
    flex: none;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin-left: 0;
  }

  .ingredients-head-row .scale-presets {
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin-left: 0;
  }

  .recipe-rule {
    margin: 0 auto 1.15rem;
  }
}

/* Phone browser: denser chrome, tools stay one compact row */
@media (max-width: 600px) {
  article.recipe-sheet {
    padding: 1rem 0.75rem 1.35rem;
  }

  article.recipe-sheet .recipe-controls-wrapper {
    min-height: 0;
  }

  article.recipe-sheet .recipe-toolbar .button-group {
    gap: 0.35rem !important;
  }

  .ingredients-card ul li {
    font-size: 0.88rem;
    padding: 0.35rem 0 0.35rem 1.05rem;
  }
}

/* ---- Recipe print ---- */
@media print {
  html, body {
    min-height: 0 !important;
    height: auto !important;
    background: #fff !important;
  }

  article.recipe-sheet {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    max-width: none !important;
    break-after: avoid-page;
  }

  article.recipe-sheet .recipe-content > h2,
  article.recipe-sheet .recipe-content > p,
  article.recipe-sheet .recipe-content > a,
  article.recipe-sheet .recipe-content > ul:not(.ingredients-card ul) {
    display: none !important;
  }

  article.recipe-sheet .recipe-eyebrow,
  article.recipe-sheet .recipe-controls-wrapper,
  article.recipe-sheet .recipe-toolbar,
  article.recipe-sheet .recipe-rule,
  article.recipe-sheet .recipe-ingredient-cta,
  article.recipe-sheet .recipe-scaler-stepper,
  article.recipe-sheet .recipe-scaler-label,
  article.recipe-sheet .ingredients-head-row .scaler-controls,
  article.recipe-sheet .scale-presets,
  article.recipe-sheet .ingredient-check,
  article.recipe-sheet .recipe-contribution,
  .recipe-cooking-bar,
  .recipe-fab-cook,
  .cook-first-cta {
    display: none !important;
  }

  .recipeats-app .recipe-app-control-deck,
  .recipeats-app .recipe-app-tab-bar,
  .recipeats-app .recipe-app-action-bar {
    display: none !important;
  }

  article.recipe-sheet .recipe-hero {
    background: #fff !important;
    color: #000 !important;
  }

  article.recipe-sheet .recipe-hero h1 {
    color: #000 !important;
    font-size: 18pt;
    text-align: center !important;
  }

  .diet-badge,
  .diet-badge::before {
    display: none !important;
    content: none !important;
  }

  .directions-section ol > li.step-checked,
  ul.ingredient-checklist li.ingredient-checked {
    opacity: 1 !important;
  }

  .directions-section ol > li.step-checked .step-text,
  ul.ingredient-checklist li.ingredient-checked .ingredient-text {
    text-decoration: none !important;
  }

  .ingredient-flag,
  .ingredient-warning-flag {
    color: #000 !important;
    border: none !important;
    background: none !important;
  }

  article.recipe-sheet .recipe-info {
    color: #333 !important;
    border-color: #ccc !important;
  }

  article.recipe-sheet .recipe-info b {
    color: #000 !important;
  }

  article.recipe-sheet .recipe-content-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.25rem !important;
  }

  article.recipe-sheet .ingredients-card {
    position: static !important;
    background: #fff !important;
    border: none !important;
    color: #000 !important;
    break-inside: avoid;
  }

  body.recipeats-app.recipe-page .directions-section,
  body.recipeats-app.recipe-page .nutrition-facts[data-tab-panel="nutrition"] {
    background: #fff !important;
    border: none !important;
    color: #000 !important;
  }

  article.recipe-sheet .ingredients-head-row h2#ingredients,
  article.recipe-sheet .directions-section h2#directions,
  article.recipe-sheet .directions-section h3 {
    color: #000 !important;
  }

  article.recipe-sheet .ingredients-card ul li {
    color: #000 !important;
    border-bottom: none !important;
  }

  article.recipe-sheet .ingredients-card ul li::before {
    background: #000 !important;
  }

  article.recipe-sheet .directions-section ol {
    list-style: decimal !important;
    padding-left: 1.35rem !important;
    counter-reset: none !important;
  }

  article.recipe-sheet .directions-section ol > li {
    color: #000 !important;
    break-inside: avoid;
    display: list-item !important;
    list-style: decimal !important;
  }

  article.recipe-sheet .directions-section ol > li .step-text {
    color: #000 !important;
  }

  article.recipe-sheet .directions-section ol > li::before,
  article.recipe-sheet .directions-section ol > li.has-step-check::before {
    display: none !important;
    content: none !important;
  }

  .step-check-btn {
    display: none !important;
  }

  .recipe-timer-btn,
  .recipe-timer-print-plain {
    display: inline !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    color: inherit !important;
    font: inherit !important;
    animation: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  /* App context: print the whole recipe like desktop — drop tabs, panels, and app chrome */
  .recipe-overflow-sheet,
  .recipeats-app .recipe-app-tab-bar,
  .recipeats-app .recipe-app-action-bar,
  .recipeats-app .app-bottom-nav,
  .recipeats-app .app-bottom-nav-wrap,
  .app-bottom-nav-handle {
    display: none !important;
  }

  /* .recipe-hero is a <header>, so it inherits the site's dark header background
     and prints as a dark band with the (black) title invisible on it. Reset it. */
  article.recipe-sheet .recipe-hero {
    background: #fff !important;
  }

  .recipeats-app .recipe-content-grid {
    display: grid !important;
  }

  .recipeats-app [data-tab-panel]:not([data-tab-panel="nutrition"]) {
    display: block !important;
  }

  .recipeats-app article.recipe-sheet .recipe-content {
    padding-bottom: 0 !important;
  }

  body.recipe-cooking-mode,
  body.recipe-cooking-mode .content,
  body.recipe-cooking-mode article.recipe-sheet,
  body.recipe-cooking-mode .recipe-cook-shell,
  body.recipe-cooking-mode .cook-pane {
    background: #fff !important;
    color: #000 !important;
    border-color: #ccc !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  body.recipe-cooking-mode .cook-pane h2,
  body.recipe-cooking-mode .cook-ing-list li,
  body.recipe-cooking-mode .cook-step-list > li {
    color: #000 !important;
  }

  body.recipe-cooking-mode .recipe-cook-shell {
    display: block !important;
  }

  body.recipe-cooking-mode .cook-pane {
    max-height: none !important;
    overflow: visible !important;
  }

  body.recipe-cooking-mode .cook-ing-list,
  body.recipe-cooking-mode .cook-step-list {
    overflow: visible !important;
  }
}

/* ---- Search page ---- */
.content:has(.search-page),
.content:has(.meal-plans-page) {
  max-width: 960px;
}

article.search-page,
article.meal-plans-page,
article.shopping-list-page,
article.favorites-page,
article.pantry-page {
  font-family: var(--rp-font-ui);
  max-width: none;
  width: 100%;
  padding: 1.75rem 0 2rem;
  box-sizing: border-box;
}

.search-page-head {
  margin-bottom: 1.35rem;
}

.search-page h1,
.meal-plans-page h1 {
  text-align: left;
  border: none;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  margin: 0 0 0.35rem;
  color: navajowhite;
}

.search-page .search-lead,
.meal-plans-page .meal-plans-lead {
  text-align: left;
  color: var(--rp-lichen);
  font-family: var(--rp-font-ui);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  max-width: 42rem;
}

.search-page .search-lead p {
  text-align: left;
  margin: 0;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
  width: 100%;
}

.search-filters {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #0f2e22;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: 6px;
  padding: 1.15rem;
  position: sticky;
  top: 0.75rem;
  box-shadow: var(--rp-shadow);
}

.search-filters-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e1c89c;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.search-filters label {
  display: block;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--rp-lichen);
}

.search-filters input,
.search-filters select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: var(--rp-radius-sm);
  border: 1px solid rgba(225, 200, 156, 0.22);
  background: var(--rp-forest);
  color: var(--rp-cream);
  font-family: var(--rp-font-ui);
  font-size: 0.85rem;
}

.search-filters input::placeholder {
  color: rgba(122, 159, 142, 0.65);
}

.search-filters input:focus,
.search-filters select:focus {
  outline: none;
  border-color: var(--rp-butter);
  box-shadow: 0 0 0 2px var(--rp-glow);
}

.search-field-hint {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.search-field-hint a {
  color: var(--rp-lichen);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.search-field-hint a:hover {
  color: var(--rp-cream);
}

.search-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 0;
}

.search-active-filters:empty {
  display: none;
}

.search-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(228, 180, 77, 0.4);
  background: var(--rp-glow);
  color: var(--rp-butter);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
}

.search-clear-btn {
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: #4a7c6a;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.search-clear-btn:hover {
  color: #6a9f88;
}

.search-results {
  min-width: 0;
  text-align: left;
}

.search-count,
.search-empty,
.search-status {
  font-family: var(--rp-font-ui);
  color: var(--rp-lichen);
  text-align: left;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}

/* Search result cards */
.search-page .rp-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.search-page .rp-search-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 220px;
  background: var(--rp-moss);
  border: 1px solid var(--rp-rule);
  border-radius: var(--rp-radius);
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .search-page .rp-search-card:hover {
    border-color: rgba(228, 180, 77, 0.45);
    box-shadow: var(--rp-shadow);
  }
}

.search-page .rp-search-card-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  text-decoration: none;
  color: inherit;
}

.search-page .rp-search-card-thumb {
  flex: 0 0 96px;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(122, 159, 142, 0.15) 0%, transparent 70%),
    linear-gradient(145deg, var(--rp-moss-raised) 0%, var(--rp-forest) 100%);
  border-bottom: 1px solid var(--rp-rule);
}

.search-page .rp-search-card-name {
  flex: 0 0 84px;
  height: 84px;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.6rem 0.65rem;
  font-family: 'Merriweather', serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: navajowhite;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.search-page .rp-search-card-actions {
  display: flex;
  flex: 0 0 2.5rem;
  border-top: 1px solid var(--rp-rule);
}

.search-page .rp-search-card-actions button {
  flex: 1;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: var(--rp-font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--rp-lichen);
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.search-page .rp-search-card-actions button + button {
  border-left: 1px solid var(--rp-rule);
}

.search-page .rp-search-card-actions button:hover {
  color: var(--rp-butter);
  background: rgba(0, 0, 0, 0.15);
}

.search-page .rp-search-card-actions button.is-saved {
  color: var(--rp-butter);
}

.meal-plans-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.meal-slots {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.meal-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meal-plan-add-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---- Meal plans ---- */
.meal-plans-page-head {
  margin-bottom: 1.35rem;
}

.meal-plans-page .meal-plans-lead p {
  text-align: left;
  margin: 0;
}

.meal-plan-card {
  background: #0f2e22;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: 6px;
  padding: 1.15rem;
  box-shadow: var(--rp-shadow);
}

.meal-plan-card-head {
  margin-bottom: 0.85rem;
}

.meal-plan-card h2 {
  text-align: left;
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
  color: navajowhite;
  border: none;
}

.meal-plan-summary {
  font-family: var(--rp-font-ui);
  color: var(--rp-lichen);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
  margin: 0;
}

.meal-plan-note {
  font-family: var(--rp-font-ui);
  color: var(--rp-lichen);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: left;
  margin: 0.35rem 0 0;
  opacity: 0.92;
}

.meal-plan-note a {
  color: var(--rp-butter);
}

.meal-plans-set-title {
  font-family: var(--rp-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rp-cream);
  margin: 1.5rem 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(225, 200, 156, 0.22);
}

.meal-plans-set-title:first-of-type {
  margin-top: 0.35rem;
}

.meal-plan-total-kcal {
  font-family: var(--rp-font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e1c89c;
  margin: 0.5rem 0 0;
  text-align: left;
}

.meal-plan-kcal-meta {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--rp-lichen);
  opacity: 0.9;
}

.meal-slot-kcal-missing {
  font-weight: 400;
  opacity: 0.75;
  font-style: italic;
}

.meal-staple-row {
  margin-bottom: 0.55rem;
}

.meal-slot-staple {
  border-color: rgba(254, 173, 87, 0.35);
  background: rgba(18, 42, 34, 0.85);
}

.meal-slot-staple .meal-slot-label {
  color: #fead57;
}

.meal-slot-custom-wrap {
  align-items: start;
}

.meal-slot-custom {
  color: var(--rp-cream);
  line-height: 1.4;
  font-size: 0.82rem;
}

.meal-slot-kcal {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--rp-lichen);
  white-space: nowrap;
  justify-self: end;
}

.meal-slot {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.45rem 0.55rem;
  padding: 0.5rem 0.65rem;
  background: var(--rp-forest);
  border: 1px solid rgba(225, 200, 156, 0.18);
  border-radius: var(--rp-radius-sm);
  font-family: var(--rp-font-ui);
  font-size: 0.84rem;
}

.meal-slot-label {
  grid-column: 1;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-lichen);
  line-height: 1.35;
}

.meal-slot > a,
.meal-slot > .meal-slot-custom,
.meal-slot > .meal-slot-empty,
.meal-slot > .meal-slot-missing,
.meal-slot > .my-plan-slot-fields {
  grid-column: 2;
  min-width: 0;
}

.meal-slot > .meal-slot-kcal {
  grid-column: 3;
  grid-row: 1;
}

.meal-slot a {
  color: var(--rp-butter);
  font-weight: 500;
  text-decoration: none;
  line-height: 1.3;
}

.meal-slot a:hover {
  text-decoration: underline;
}

.meal-slot-missing {
  color: rgba(200, 90, 70, 0.9);
  font-style: italic;
}

.meal-plan-add-btn,
.meal-plan-copy-btn,
.shop-toolbar-btn {
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.meal-plan-add-btn {
  background: linear-gradient(180deg, var(--rp-carrot) 0%, var(--rp-carrot-deep) 100%);
  border: 1px solid transparent;
  color: #fff9f2;
}

.meal-plan-add-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.meal-plan-copy-btn,
.shop-toolbar-btn {
  background: #123524;
  border: 1px solid rgba(225, 200, 156, 0.28);
  color: var(--rp-lichen);
}

.meal-plan-copy-btn:hover:not(:disabled),
.shop-toolbar-btn:hover:not(:disabled) {
  border-color: #e1c89c;
  color: #e1c89c;
}

.shop-toolbar-btn--danger {
  border-color: rgba(200, 90, 70, 0.45);
  color: #e8a090;
}

.shop-toolbar-btn--danger:hover:not(:disabled) {
  border-color: #d08070;
  color: #f0b0a0;
  background: rgba(80, 30, 25, 0.35);
}

.shopping-list-page .shopping-list-toolbar {
  gap: 0.45rem;
}

/* ---- WikiPeatia footer (template: layouts/partials/wiki-peatia.html) ---- */
.wiki-peatia-footer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rp-rule);
  border-radius: var(--rp-radius);
  background: rgba(0, 77, 64, 0.22);
  box-shadow: var(--rp-shadow);
  text-align: left;
}

.wiki-peatia-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
  padding: 4px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.wiki-peatia-body {
  flex: 1;
  min-width: 0;
}

.wiki-peatia-source-kicker {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--rp-font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rp-lichen);
}

.wiki-peatia-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.wiki-peatia-link {
  border: 1px dashed rgba(126, 200, 227, 0.45);
  color: #7ec8e3;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-family: var(--rp-font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.wiki-peatia-link:hover {
  color: var(--rp-butter);
  border-color: rgba(228, 180, 77, 0.55);
}

.meal-plans-page-head .wiki-peatia-footer {
  margin-top: 1rem;
}

.recipeats-app:not(.recipe-page) .wiki-peatia-footer,
.recipeats-app:not(.recipe-page) .contributor-section,
.recipeats-app:not(.recipe-page) .recipe-tags,
.recipeats-app:not(.recipe-page) .recipe-notes {
  margin-bottom: calc(
    var(--app-nav-h, calc(3.9375rem + env(safe-area-inset-bottom, 0px)))
    + var(--app-action-bar-h, 3.25rem)
    + var(--app-chrome-gap, 0.5rem)
  );
}

body.recipeats-app.recipe-page .recipe-tags {
  margin-top: 0.35rem;
  margin-bottom: 0;
  padding: 0.25rem 1rem 0;
}

body.recipeats-app.recipe-page .wiki-peatia-footer {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

body.recipeats-app.recipe-page main.content {
  padding-bottom: var(--app-recipe-pad);
}

body.recipeats-app.recipe-page .recipe-notes {
  margin: 0.85rem 0 0;
  max-width: none;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(225, 200, 156, 0.14);
}

body.recipeats-app.recipe-page .ingredients-card .recipe-notes textarea {
  min-height: 2.75rem;
}

.start-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

.collection-page .collection-meta {
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  color: var(--rp-lichen, #7a9f8e);
}

.collection-page .collection-list {
  margin-bottom: 1.5rem;
}

.collection-page .collection-more {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.start-page h1 {
  margin-bottom: 1rem;
}

.start-paths {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.start-path-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rp-rule);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease;
}

.start-path-card:hover {
  border-color: rgba(126, 200, 227, 0.55);
}

.start-path-label {
  display: block;
  font-family: var(--rp-font-ui);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.start-path-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--rp-muted, #9ab);
  line-height: 1.45;
}

.start-hint {
  text-align: center;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.start-hint a {
  color: #7ec8e3;
}

.app-gate-upsell {
  max-width: 36rem;
  margin: 2rem auto;
  padding: 1.5rem 1rem;
  text-align: left;
}

.app-gate-upsell h1 {
  margin-bottom: 0.75rem;
}

.app-gate-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.app-gate-btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  background: #1e6c93;
  color: #fff;
  text-decoration: none;
  font-family: var(--rp-font-ui);
  font-size: 0.9rem;
}

.app-gate-link {
  color: #7ec8e3;
}

.meal-plan-card-mine {
  border-color: rgba(126, 200, 227, 0.45);
}

.meal-slot-empty {
  color: var(--rp-lichen);
  font-size: 0.82rem;
  font-style: italic;
}

.my-plan-slot-edit {
  align-items: start;
}

.my-plan-slot-fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.my-plan-select,
.my-plan-text {
  width: 100%;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(225, 200, 156, 0.25);
  background: var(--rp-forest);
  color: var(--rp-cream);
}

.meal-plan-edit-btn,
.meal-plan-clear-btn {
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(225, 200, 156, 0.3);
  background: transparent;
  color: var(--rp-cream);
  cursor: pointer;
}

.meal-plan-clear-btn {
  border-color: rgba(220, 100, 100, 0.4);
  color: #e8a0a0;
}

.my-plan-day-bar {
  margin: 0 0 0.85rem;
}

.my-plan-day-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
  margin-bottom: 0.4rem;
}

.my-plan-day-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.my-plan-day-tab,
.my-plan-day-add {
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: transparent;
  color: var(--rp-cream);
  cursor: pointer;
}

.my-plan-day-tab.is-active {
  background: rgba(225, 200, 156, 0.15);
  border-color: var(--rp-butter);
  color: var(--rp-butter);
}

.my-plan-day-add {
  border-style: dashed;
  color: var(--rp-lichen);
}

.my-plan-day-delete,
.my-plan-day-actions .my-plan-day-delete {
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 100, 100, 0.45);
  background: transparent;
  color: #e8a0a0;
  cursor: pointer;
}

.my-plan-day-rename label {
  display: block;
  font-size: 0.78rem;
  color: var(--rp-lichen);
  margin-bottom: 0.75rem;
}

.my-plan-name-input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(225, 200, 156, 0.25);
  background: var(--rp-forest);
  color: var(--rp-cream);
}

.my-plan-pick-btn {
  width: 100%;
  text-align: left;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: var(--rp-forest);
  color: var(--rp-cream);
  cursor: pointer;
}

.meal-plan-search-sheet {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.meal-plan-search-sheet[hidden] {
  display: none !important;
}

.meal-plan-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.meal-plan-search-panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(78dvh, calc(100dvh - var(--app-nav-h, 3rem) - 1.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f2e22;
  border-top: 1px solid rgba(225, 200, 156, 0.25);
  border-radius: 12px 12px 0 0;
  padding: 0.75rem 0.85rem calc(0.85rem + var(--app-nav-h, 3rem));
}

.meal-plan-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.meal-plan-search-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--rp-cream);
}

.meal-plan-search-close {
  border: none;
  background: transparent;
  color: var(--rp-lichen);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.meal-plan-search-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--rp-font-ui);
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: var(--rp-forest);
  color: var(--rp-cream);
}

.meal-plan-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}

.meal-plan-search-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.35rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--rp-cream);
  font-family: var(--rp-font-ui);
  font-size: 0.85rem;
  cursor: pointer;
}

.meal-plan-search-empty {
  padding: 0.75rem 0.35rem;
  color: var(--rp-lichen);
  font-size: 0.82rem;
}

/* Nav chrome: style.css — avoid duplicate .app-bottom-nav rules here */

/* ---- App recipe tabs (Phase 3) ---- */

/* Hide contribution + duplicate CTA in app — action bar replaces them */
.recipeats-app .recipe-contribution,
.recipeats-app .recipe-ingredient-cta {
  display: none;
}

/* Tab/action bars already hidden with other cooking chrome */

/* Meal plans: fix input overflow + rounder buttons in app */
.recipeats-app .my-plan-text {
  box-sizing: border-box;
}

.recipeats-app .meal-plan-edit-btn,
.recipeats-app .meal-plan-clear-btn {
  border-radius: 20px;
}

/* App recipe: compact title + single sticky control deck (1rem side rhythm) */
body.recipeats-app.recipe-page article.recipe-sheet {
  padding: 0.75rem 1rem 0;
}

body.recipeats-app.recipe-page .recipe-hero {
  text-align: center;
  margin: 0 0 0.35rem;
  padding-top: 0.15rem;
}

body.recipeats-app.recipe-page .recipe-hero h1 {
  text-align: center;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  margin: 0 0 0.2rem;
  line-height: 1.15;
}

body.recipeats-app.recipe-page .recipe-intro {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 auto 0.5rem;
  padding: 0 0.1rem;
  max-width: 42rem;
  color: #8ab89a;
  text-align: center;
}

body.recipeats-app.recipe-page .content > h2,
body.recipeats-app.recipe-page .content > h2 + ul {
  display: none !important;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-cta {
  display: none !important;
}

body.recipeats-app.recipe-page .recipe-fab-cook {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--app-nav-h) + 0.65rem);
  z-index: 8999;
  width: auto;
  min-width: 5.25rem;
  min-height: 48px;
  margin: 0;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: var(--rp-butter, #fead57);
  color: var(--rp-bog, #002921);
  font-family: var(--rp-font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

body.recipeats-app.recipe-page .recipe-fab-cook.cooking-mode-active {
  background: #4a7c6a;
  color: navajowhite;
}

body.recipe-cooking-mode .recipe-fab-cook {
  display: none !important;
}

.recipeats-app .recipe-overflow-panel {
  margin-bottom: calc(var(--app-nav-h) + 0.35rem);
}

/* App recipe: desktop tool row stays in overflow sheet, not the control deck */
body.recipeats-app.recipe-page .recipe-app-control-deck .button-group {
  display: none !important;
}

body.recipeats-app.recipe-page [data-tab-panel="ingredients"] .ingredients-head-row h2#ingredients,
body.recipeats-app.recipe-page [data-tab-panel="steps"] .directions-section h2#directions {
  display: none;
}

body.recipeats-app.recipe-page [data-tab-panel="ingredients"] .ingredients-head-row {
  display: none;
}

.ingredients-card li p,
.ingredients-card > p {
  text-align: left;
  margin: 0;
}

.recipeats-app .recipe-app-control-deck {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 0 0.5rem;
  background: #0f2e22;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: var(--rp-radius);
  overflow: hidden;
}

.recipeats-app .recipe-app-control-deck .recipe-info {
  margin: 0;
  padding: 0.5rem 1rem 0.35rem;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  gap: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.recipeats-app .recipe-app-control-deck .recipe-controls-wrapper {
  position: static;
  min-height: 0;
  background: transparent;
  border: none;
  margin: 0;
  padding: 0.35rem 1rem 0.3rem;
}

/* Both rows full width of the deck (override style.css 20rem cook-first cap). */
body.recipeats-app.recipe-page .recipe-app-control-deck .recipe-toolbar.cook-first-layout,
body.recipeats-app.recipe-page .recipe-app-control-deck .scaler-container.cook-first-layout {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  margin: 0 !important;
  gap: 0.4rem;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
  padding: 0;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .recipe-toolbar .scaler-controls,
body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions {
  display: flex !important;
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  gap: 0.4rem;
  margin: 0;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: 10px;
  padding: 0.3rem 0.55rem;
  background: #123524;
  min-height: 2.5rem;
}

/* Real flex item height so "Servings" lines up with - 1 + */
.recipeats-app .recipe-app-control-deck .scaler-controls::before {
  content: 'Servings';
  display: flex;
  align-items: center;
  height: 1.85rem;
  margin: 0;
  margin-right: auto;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: #8ab89a;
  flex: 0 0 auto;
  align-self: center;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .scaler-controls .scaler-button {
  width: 1.85rem;
  height: 1.85rem;
  min-height: 1.85rem;
  border-radius: 8px;
  border: 1px solid rgba(225, 200, 156, 0.22);
  background: #0f2e22;
  padding: 0;
  flex: 0 0 auto;
  align-self: center;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .scaler-controls .multiplier-display {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.85rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0 0.15rem;
  line-height: 1;
  align-self: center;
  flex: 0 0 auto;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .scale-presets {
  display: none !important;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions {
  align-items: stretch;
  justify-content: stretch;
  gap: 0.4rem;
}

/* Explicit row: Save | Share | ···  (ignore global .favorite-button order) */
body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .favorite-button {
  order: 1 !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .share-button {
  order: 2 !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .recipe-overflow-btn {
  order: 3 !important;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .favorite-button,
body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .share-button,
body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .recipe-overflow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(225, 200, 156, 0.22);
  background: #0f2e22;
  color: var(--rp-lichen);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.65rem;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .cook-first-actions .recipe-overflow-btn {
  padding: 0;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .scaler-controls .scaler-button {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
}

body.recipeats-app.recipe-page .recipe-app-control-deck .scaler-controls .multiplier-display {
  height: 2.5rem;
  min-height: 2.5rem;
  min-width: 2rem;
  font-size: 1rem;
}

.recipeats-app .recipe-app-control-deck .scaler-controls::before {
  height: 2.5rem;
}

.recipeats-app .recipe-controls-wrapper {
  min-height: 0;
}

/* Hide the hr between controls and content in app — tab bar provides the visual break */
.recipeats-app hr.recipe-rule {
  display: none;
}

/* Flat layout inside the tabs — override two-column desktop grid */
.recipeats-app .recipe-content-grid {
  display: block;
}

/* Hide non-active tab panels */
.recipeats-app [data-tab-panel] {
  display: none;
}
.recipeats-app [data-tab-panel].is-active-panel {
  display: block;
}

/* Recipe page: main.content handles bottom clearance (tags/wiki sit below article) */
body.recipeats-app.recipe-page article.recipe-sheet .recipe-content {
  padding-bottom: 0;
}

.recipeats-app:not(.recipe-page) article.recipe-sheet .recipe-content {
  padding: 0 0 var(--app-recipe-pad);
}

body.recipeats-app.recipe-page .ingredients-card {
  margin-top: 0;
  padding: 0.85rem 1rem 1rem;
  overflow: visible;
}

body.recipeats-app.recipe-page .directions-section,
body.recipeats-app.recipe-page .nutrition-facts[data-tab-panel="nutrition"] {
  margin: 0 0 0.25rem;
  padding: 0.85rem 1rem 0.85rem;
  background: #0f2e22;
  border: 1px solid rgba(225, 200, 156, 0.22);
  border-radius: var(--rp-radius);
  box-sizing: border-box;
}

body.recipeats-app.recipe-page .nutrition-facts[data-tab-panel="nutrition"] {
  margin-left: auto;
  margin-right: auto;
}

html.recipeats-app-root .recipe-app-tab-bar.app-only-chrome {
  display: flex;
}

html.recipeats-app-root .recipe-app-action-bar.app-only-chrome {
  display: none !important;
}

/* Tab bar — scoped to app so desktop never sees it */
.recipeats-app .recipe-app-tab-bar {
  display: flex;
  min-height: 44px;
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a241c;
  position: static;
  z-index: 49;
}

.recipeats-app .recipe-app-control-deck .recipe-app-tab-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.recipe-app-tab {
  flex: 1;
  min-height: 44px;
  padding: 12px 4px 10px;
  background: none;
  border: none;
  border-bottom: 2.4px solid transparent;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: #5a8570;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.recipe-app-tab.is-active {
  color: navajowhite;
  font-weight: 700;
  border-bottom-color: #e1c89c;
}

/* Fixed action bar above bottom nav — scoped to app so it stays hidden on the live site */
.recipeats-app .recipe-app-action-bar {
  position: fixed;
  bottom: var(--app-nav-h);
  left: 0;
  right: 0;
  z-index: 8998;
  display: flex;
  gap: 8px;
  min-height: var(--app-action-bar-h);
  align-items: stretch;
  padding: 8px 16px;
  box-sizing: border-box;
  background: #001a15;
  border-top: 1px solid #004d40;
  transition: bottom 0.2s ease;
}

.recipe-app-action {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  border-radius: 8px;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

/* Passive meta times → timer buttons in app */
.recipeats-app .recipe-info-passive .recipe-timer-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  margin-left: 0.2rem;
}

.pantry-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--rp-font-ui);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  margin: 0.75rem 0 1.25rem;
  min-height: 5rem;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: var(--rp-forest);
  color: var(--rp-cream);
}

.pantry-empty {
  color: var(--rp-lichen);
  font-family: var(--rp-font-ui);
}

.pantry-tier-title {
  font-family: var(--rp-font-ui);
  font-size: 1.05rem;
  color: navajowhite;
  margin: 1.25rem 0 0.5rem;
}

.pantry-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pantry-result {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(225, 200, 156, 0.16);
  font-family: var(--rp-font-ui);
}

.pantry-result a {
  color: navajowhite;
  font-weight: 600;
  text-decoration: none;
}

.pantry-missing {
  display: block;
  color: var(--rp-lichen);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.pantry-copy-missing,
.pantry-add-missing {
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  margin-top: 0.35rem;
  margin-right: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: transparent;
  color: var(--rp-lichen);
  cursor: pointer;
}

/* Meal plan picker from recipe action bar */
.recipe-plan-picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 9650;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.recipe-plan-picker-sheet[hidden] {
  display: none !important;
}

.recipe-plan-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.recipe-plan-picker-panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(70dvh, calc(100dvh - var(--app-nav-h, 3rem) - 1rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f2e22;
  border-top: 1px solid rgba(225, 200, 156, 0.25);
  border-radius: 12px 12px 0 0;
  padding: 0.75rem 0.85rem calc(0.85rem + var(--app-nav-h, 3rem));
}

.recipe-plan-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.recipe-plan-picker-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--rp-cream);
}

.recipe-plan-picker-close {
  border: none;
  background: transparent;
  color: var(--rp-lichen);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.recipe-plan-picker-days {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.65rem;
  padding-bottom: 0.15rem;
}

.recipe-plan-picker-day {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: #123524;
  color: var(--rp-lichen);
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  cursor: pointer;
}

.recipe-plan-picker-day.is-active {
  background: #4a7c6a;
  border-color: #4a7c6a;
  color: navajowhite;
}

.recipe-plan-picker-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.recipe-plan-picker-slot {
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(225, 200, 156, 0.28);
  background: #123524;
  color: var(--rp-cream);
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.recipe-app-action-secondary {
  border: 1.5px solid #e1c89c !important;
  background: transparent;
  color: #e1c89c;
}

.recipe-app-action-primary {
  background: #e1c89c;
  color: #002921;
  font-weight: 700;
}

@media (max-width: 720px) {
  .search-layout {
    grid-template-columns: 1fr;
  }

  .search-filters {
    position: static;
  }
}

/* ---- Submit page: markdown preview + actions ---- */
.recipe-submit-output {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(225, 200, 156, 0.28);
}

.recipe-submit-output-title {
  margin: 0 0 0.65rem;
  font-family: var(--rp-font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rp-lichen);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.recipe-submit-preview {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--rp-rule);
  border-radius: var(--rp-radius-sm);
  background: var(--rp-forest);
  color: var(--rp-cream);
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.recipe-submit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.submit-action-btn {
  background: #123524;
  color: var(--rp-lichen);
  padding: 0.55rem 1rem;
  border: 1px solid rgba(225, 200, 156, 0.28);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--rp-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.submit-action-btn:hover {
  color: var(--rp-butter);
  border-color: rgba(228, 180, 77, 0.55);
}

/* ========== Recipe polish: mobile browser + desktop density ========== */

/* Desktop: roomier split, clearer steps */
@media (min-width: 901px) {
  article.recipe-sheet {
    padding: 2.25rem 1.5rem 2.5rem;
  }

  .recipe-content-grid {
    gap: 2.25rem 2.5rem;
  }

  .ingredients-card {
    padding: 1.25rem 1.2rem 1.3rem;
  }

  .directions-section ol > li {
    gap: 1rem;
    padding-bottom: 1.15rem;
  }

  .directions-section ol > li .step-text {
    font-size: 0.98rem;
    line-height: 1.55;
    color: #e8dcc8;
  }

  article.recipe-sheet .recipe-toolbar .scaler-button,
  article.recipe-sheet .recipe-toolbar .favorite-button {
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }
}

/* Phone / small tablet browser recipe */
@media (max-width: 900px) {
  .recipe-hero {
    margin-bottom: 0.5rem;
  }

  .recipe-eyebrow {
    font-size: 0.68rem;
    margin-bottom: 0.35rem;
  }

  .recipe-intro {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
  }

  .directions-section h2#directions {
    text-align: center;
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
  }

  .directions-section ol > li {
    gap: 0.75rem;
    padding-bottom: 0.95rem;
  }

  .directions-section ol > li::before {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.8rem;
    margin-top: 0.1rem;
  }

  .directions-section ol > li .step-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e8dcc8;
    padding-top: 0.1rem;
  }

  .step-check-btn {
    width: 1.65rem;
    height: 1.65rem;
  }

  .recipe-tags {
    margin-top: 0.4rem;
    padding: 0 0.25rem 0.75rem;
  }

  .recipe-tags .tag-list {
    gap: 0.35rem;
    justify-content: center;
  }

  .recipe-tags .tag {
    font-size: 0.78rem;
    padding: 0.28rem 0.55rem;
  }

  /* Meta: two-line friendly, not one crushed line */
  article.recipe-sheet .recipe-info {
    row-gap: 0.35rem;
    column-gap: 0.15rem;
  }
}

@media (max-width: 600px) {
  .directions-section {
    margin-top: 0.25rem;
  }

  .ingredients-card ul li {
    border-bottom-color: rgba(255, 255, 255, 0.07);
  }

  .ingredients-card ul li::before {
    top: 0.68rem;
    opacity: 0.85;
  }

  /* Timer chips in directions stay compact */
  .recipe-timer-btn {
    margin: 0.1rem 0.1rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.8rem;
  }
}

.recipe-submit-status {
  margin: 0.75rem 0 0;
  font-family: var(--rp-font-ui);
  font-size: 0.78rem;
  color: var(--rp-lichen);
  text-align: center;
  min-height: 1.2em;
}

.recipe-submit-noscript {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rp-rule);
  border-radius: var(--rp-radius-sm);
  background: rgba(0, 77, 64, 0.22);
  color: var(--rp-cream);
  font-size: 0.9rem;
}
