:root {
  --warm-50: #fdf8f3;
  --warm-100: #f5ebe0;
  --warm-200: #ead7c3;
  --warm-700: #7c4a1e;
  --warm-800: #5c3414;
  --accent: #b45309;
  --larder-700: #3f5a2f;
  --larder-800: #2f4523;
  --app-header-offset: 84px;
  --app-bottom-nav-offset: 88px;
}

body {
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

.app-header-inner {
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-bottom: 0.75rem;
}

.app-main {
  padding-top: calc(var(--app-header-offset) + 1rem);
  padding-bottom: calc(var(--app-bottom-nav-offset) + 1.25rem);
}

.brand-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 48px;
  justify-content: center;
}

.brand-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--larder-700);
  font-weight: 700;
}

.brand-title {
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--warm-800);
  font-weight: 800;
}

.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: var(--warm-800);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 1.1rem;
}

.icon-link:focus-visible,
.icon-link:hover {
  outline: none;
  border-color: #fdba74;
}

.icon-count,
.bottom-nav-count {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.menu-lines span {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 9999px;
  background: currentColor;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.6rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid #e7e5e4;
  background: rgba(253, 248, 243, 0.96);
  backdrop-filter: blur(16px);
}

.bottom-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.6rem 0.25rem;
  border-radius: 1rem;
  background: #fff;
  border: 2px solid #ece7df;
  color: #57534e;
  font-size: 0.78rem;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

.bottom-nav-link.active {
  background: linear-gradient(180deg, #fff7ed 0%, #f5ebe0 100%);
  border-color: var(--accent);
  color: var(--accent);
}

.bottom-nav-count {
  top: 0.4rem;
  right: 0.35rem;
}

.app-menu-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  color: #44403c;
  font-size: 0.95rem;
}

.app-menu-link:hover,
.app-menu-link:focus-visible {
  background: #f5f5f4;
  color: var(--warm-800);
  outline: none;
}

.hero-card {
  border-radius: 1.75rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.45), transparent 35%),
    linear-gradient(145deg, var(--larder-800) 0%, var(--larder-700) 50%, #6b4e2e 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 69, 35, 0.16);
}

.hero-title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1;
  font-weight: 800;
  max-width: 12ch;
}

.hero-copy {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 44rem;
  color: rgba(255, 255, 255, 0.9);
}

.page-intro {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eyebrow {
  color: var(--larder-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.page-title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.05;
  font-weight: 800;
  color: var(--warm-800);
}

.page-subtitle {
  color: #57534e;
  line-height: 1.7;
  font-size: 1rem;
  max-width: 42rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.recipe-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #efe7dc;
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(92, 52, 20, 0.05);
}

.quick-link-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-link-card:hover,
.quick-link-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(92, 52, 20, 0.09);
}

.quick-link-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.recipe-card-compact {
  padding: 0.95rem;
}

.card-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.card-action-row > * {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.recipe-card-link,
.recipe-title-link {
  display: block;
}

.recipe-title-link:hover h2,
.recipe-card-link:hover + .mt-4 h2 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.recipe-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #d6ccc2, #f5ebe0);
}

.recipe-image-media,
.recipe-image-fallback {
  position: absolute;
  inset: 0;
}

.recipe-image-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.recipe-image-small {
  min-height: 11rem;
}

.recipe-image-large {
  min-height: 18rem;
}

.recipe-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 28%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.18) 100%);
}

.recipe-image-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(180deg, #fffcf9 0%, #f5ebe0 100%);
  color: var(--larder-700);
  text-align: center;
  z-index: 0;
}

.recipe-image-fallback-copy {
  max-width: 12ch;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
}

.recipe-image.is-missing::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45), transparent 30%),
    linear-gradient(180deg, rgba(245, 235, 224, 0.05) 0%, rgba(234, 215, 195, 0.2) 100%);
}

.recipe-image.is-missing .recipe-image-fallback {
  display: flex;
}

.recipe-image.is-missing .recipe-image-overlay {
  color: var(--warm-800);
}

.recipe-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 0.35rem;
  padding: 1rem;
  color: #fff;
  z-index: 2;
  /* Decorative text only — without this, its z-index sits above the
     absolutely-positioned heart button (which has no z-index of its own)
     and silently swallows taps meant for Save/Remove favourite. */
  pointer-events: none;
}

.recipe-image-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.recipe-image-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: 16ch;
}

.cook-attribution {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cook-avatar {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 9999px;
  background: linear-gradient(135deg, #d6ccc2, #f5ebe0);
}

.cook-avatar-small {
  width: 3.5rem;
  height: 3.5rem;
}

.cook-avatar-large {
  width: 5.5rem;
  height: 5.5rem;
}

.cook-step-image {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  min-height: 8rem;
  background: linear-gradient(135deg, #d6ccc2, #f5ebe0);
}

.cook-image-media,
.cook-image-fallback {
  position: absolute;
  inset: 0;
}

.cook-image-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cook-image-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: linear-gradient(180deg, #fffcf9 0%, #f5ebe0 100%);
  color: var(--warm-800);
  text-align: center;
}

.cook-avatar .cook-image-fallback-copy {
  font-size: 0.55rem;
  line-height: 1.05;
  font-weight: 700;
}

.cook-step-image .cook-image-fallback-copy {
  font-size: 0.8rem;
  line-height: 1.2;
  font-weight: 700;
}

[data-cook-image].is-missing .cook-image-media {
  display: none;
}

[data-cook-image].is-missing .cook-image-fallback {
  display: flex;
}

.guided-step-card {
  position: relative;
  /* Matches .swipe-card's existing pattern: let the browser handle vertical
     scrolling natively (so a mostly-vertical drag doesn't get hijacked as a
     horizontal stage swipe), and ease the snap-back when a drag doesn't
     cross the swipe threshold. */
  touch-action: pan-y;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.guided-step-number {
  display: inline-flex;
  align-items: center;
  background: var(--warm-100);
  color: var(--warm-800);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.5rem;
}

.guided-step-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .guided-step-images {
    grid-template-columns: 1fr 1fr;
  }
}

.guided-step-image-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warm-700);
  margin-top: 0.35rem;
}

.stage-step-list {
  margin-top: 0.75rem;
  padding-left: 1.4rem;
  color: #44403c;
  font-size: 1rem;
  line-height: 1.7;
  list-style: decimal;
}

.stage-step-list li + li {
  margin-top: 0.55rem;
}

.guided-step-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
}

.guided-complete-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  border: none;
  background: linear-gradient(180deg, #c56a13 0%, #b45309 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.guided-complete-button.is-done {
  background: #dcfce7;
  color: #166534;
}

.guided-step-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guided-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #57534e;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.guided-nav-button-primary {
  background: linear-gradient(180deg, #c56a13 0%, #b45309 100%);
  border-color: transparent;
  color: #fff;
}

.image-kitchen { background: linear-gradient(135deg, #7c4a1e 0%, #b45309 45%, #f59e0b 100%); }
.image-stockpot { background: linear-gradient(135deg, #3f5a2f 0%, #6d8b49 55%, #c2a76c 100%); }
.image-staples { background: linear-gradient(135deg, #8b5e34 0%, #d0a85c 60%, #f4d6a0 100%); }
.image-meat { background: linear-gradient(135deg, #6b3f2b 0%, #a15c38 55%, #ddb892 100%); }
.image-regional { background: linear-gradient(135deg, #314e52 0%, #52796f 55%, #cad2c5 100%); }
.image-sunday { background: linear-gradient(135deg, #5f0f40 0%, #9a031e 50%, #fb8b24 100%); }
.image-packed { background: linear-gradient(135deg, #1d3557 0%, #457b9d 55%, #a8dadc 100%); }
.image-retro { background: linear-gradient(135deg, #4a4e69 0%, #9a8c98 55%, #c9ada7 100%); }
.image-pub { background: linear-gradient(135deg, #4e342e 0%, #795548 55%, #d7ccc8 100%); }
.image-pudding { background: linear-gradient(135deg, #7b2cbf 0%, #c77dff 55%, #ffd6ff 100%); }
.image-planner { background: linear-gradient(135deg, #386641 0%, #6a994e 55%, #f2e8cf 100%); }

.heart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.92);
  color: var(--warm-800);
  font-size: 1.2rem;
  font-weight: 700;
}

.heart-button.is-saved {
  color: #b91c1c;
  border-color: rgba(254, 202, 202, 0.85);
  background: #fff1f2;
}

.card-heart-button,
.detail-heart-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  /* The image's internal ::before shading (z-index: 1) and overlay text
     (z-index: 2) have no enclosing stacking context to contain them, so
     without its own higher z-index this button — despite being a later
     DOM sibling — can end up underneath them and silently eat no taps. */
  z-index: 5;
}

.recipe-search-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  color: #292524;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.quick-chip-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.quick-chip-row::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #57534e;
  font-size: 0.92rem;
  font-weight: 700;
}

.quick-chip.is-active {
  background: var(--warm-100);
  color: var(--warm-800);
  border-color: #fdba74;
}

.filter-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.planner-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.planner-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
}

.planner-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 1.75rem 1.75rem 0 0;
  background: var(--warm-50);
  padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.14);
}

.planner-sheet-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.planner-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.planner-choice-group {
  display: grid;
  gap: 0.75rem;
}

.planner-choice-card {
  display: flex;
  align-items: start;
  gap: 0.85rem;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 1rem;
  color: #44403c;
}

.planner-choice-card input {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--larder-700);
}

.planner-choice-card strong,
.planner-choice-card small {
  display: block;
}

.planner-choice-card small {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: #57534e;
}

.planner-sheet-actions {
  display: grid;
  gap: 0.75rem;
}

.filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
}

.filter-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 1.75rem 1.75rem 0 0;
  background: var(--warm-50);
  padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.14);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--warm-800);
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  color: #44403c;
}

.toggle-chip input {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  accent-color: var(--larder-700);
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  background: var(--warm-100);
  color: var(--warm-800);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.4rem 0.7rem;
}

.fact-pill,
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: #57534e;
  font-weight: 600;
}

.recipe-type-badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.recipe-type-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  padding: 0.3rem 0.6rem;
}

/* Components (stock, sauce, gravy, pickle, preserve...) get a muted badge
   so they read as "supporting item" rather than a main meal, plus the
   secondary "Component" badge alongside their specific type. */
.recipe-type-badge-secondary {
  background: var(--warm-100);
  color: var(--warm-800);
}

.recipe-detail-card {
  padding: 1rem;
}

.action-grid,
.swipe-action-grid {
  display: grid;
  gap: 0.75rem;
}

.subtle-panel {
  border-radius: 1.25rem;
  border: 1px solid #eee4d7;
  background: #fffcf9;
  padding: 1rem;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--warm-800);
}

.panel-copy {
  margin-top: 0.65rem;
  color: #57534e;
  line-height: 1.7;
}

.servings-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.servings-panel-copy {
  flex: 1 1 14rem;
}

.servings-select-label {
  min-width: 11rem;
}

.servings-select {
  min-width: 100%;
}

.empty-state-card {
  padding: 1.5rem;
}

.planner-card {
  padding: 1rem 1.1rem;
}

.planner-week-board {
  display: grid;
  gap: 1rem;
}

.planner-day-card,
.shopping-group-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #efe7dc;
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(92, 52, 20, 0.05);
}

.planner-day-header,
.shopping-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.planner-day-title,
.shopping-group-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--warm-800);
}

.planner-day-count,
.planner-slot-count,
.shopping-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.6rem;
  border-radius: 9999px;
  background: var(--warm-100);
  color: var(--warm-800);
  font-size: 0.82rem;
  font-weight: 700;
}

.planner-day-slots,
.shopping-group-list {
  display: grid;
  gap: 0.85rem;
}

.planner-slot-card {
  border-radius: 1.25rem;
  border: 1px solid #eee4d7;
  background: #fffcf9;
  padding: 0.95rem;
}

.planner-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.planner-slot-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--warm-800);
}

.planner-slot-list {
  display: grid;
  gap: 0.75rem;
}

.planner-entry-card {
  display: grid;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #eadfce;
  background: #fff;
  padding: 0.85rem;
}

.planner-entry-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--warm-800);
}

.planner-entry-meta {
  margin-top: 0.25rem;
  color: #57534e;
  font-size: 0.92rem;
}

.planner-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.planner-link-button,
.planner-remove-button,
.shopping-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e7e5e4;
  font-size: 0.92rem;
  font-weight: 700;
}

.planner-link-button {
  background: #fff7ed;
  border-color: #fdba74;
  color: var(--warm-800);
}

.planner-link-button.is-disabled {
  color: #78716c;
  background: #fafaf9;
  border-color: #e7e5e4;
}

.planner-cook-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.planner-remove-button,
.shopping-remove-button {
  background: #fff;
  color: #57534e;
}

.planner-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 0.55rem;
  border-radius: 9999px;
  background: #e7f2e2;
  color: var(--larder-800);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
}

.planner-empty-slot {
  color: #78716c;
  font-size: 0.94rem;
  line-height: 1.6;
}

.shopping-groups {
  display: grid;
  gap: 1rem;
}

.shopping-item {
  display: grid;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #eadfce;
  background: #fff;
  padding: 0.85rem;
}

.shopping-item.is-checked {
  background: #fafaf9;
}

.shopping-check-row {
  display: flex;
  align-items: start;
  gap: 0.85rem;
  min-height: 48px;
}

.shopping-checkbox {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--larder-700);
}

.shopping-item-copy {
  display: grid;
  gap: 0.25rem;
}

.shopping-item-line {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--warm-800);
}

.shopping-item.is-checked .shopping-item-line {
  color: #78716c;
  text-decoration: line-through;
}

.shopping-item-source {
  color: #57534e;
  font-size: 0.88rem;
  line-height: 1.5;
}

.swipe-card {
  padding: 1rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  touch-action: pan-y;
}

.swipe-gesture-surface {
  touch-action: pan-y;
}

.swipe-instruction {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
  color: #57534e;
  font-weight: 700;
}

.swipe-instruction span {
  color: var(--accent);
}

.chef-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.loading-skeleton {
  background: linear-gradient(90deg, #f5ebe0 25%, #fdf8f3 37%, #f5ebe0 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.error-state {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 1rem;
  padding: 1rem;
}

.btn-primary {
  background: linear-gradient(180deg, #c56a13 0%, #b45309 100%);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(180deg, #9a4d10 0%, #7c4a1e 100%);
}

.toast-host {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(var(--app-bottom-nav-offset) + 1rem);
  z-index: 80;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast-host.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1.2rem;
  background: rgba(28, 25, 23, 0.94);
  color: #fff;
  padding: 0.95rem 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
}

.toast-title {
  font-weight: 700;
}

.toast-detail {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.toast-action {
  flex-shrink: 0;
  color: #fdba74;
  font-weight: 700;
}

@media (min-width: 640px) {
  .app-main {
    padding-top: calc(var(--app-header-offset) + 1.5rem);
    padding-bottom: calc(var(--app-bottom-nav-offset) + 1.5rem);
  }

  .action-grid,
  .swipe-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-sheet {
    left: auto;
    right: 1rem;
    top: calc(var(--app-header-offset) + 1rem);
    bottom: auto;
    width: min(34rem, calc(100vw - 2rem));
    max-height: calc(100vh - var(--app-header-offset) - 2rem);
    border-radius: 1.5rem;
    padding: 1.25rem;
  }

  .planner-sheet {
    left: auto;
    right: 1rem;
    top: calc(var(--app-header-offset) + 1rem);
    bottom: auto;
    width: min(34rem, calc(100vw - 2rem));
    max-height: calc(100vh - var(--app-header-offset) - 2rem);
    border-radius: 1.5rem;
    padding: 1.25rem;
  }

  .planner-sheet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-week-board,
  .shopping-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .recipe-image-small {
    min-height: 12rem;
  }

  .recipe-detail-card {
    padding: 1.25rem;
  }

  .planner-entry-card,
  .shopping-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 1100px) {
  .planner-week-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shopping-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
