.ffg-meals {
  --meals-accent: var(--accent, #ccff00);
  --meals-focus: #416000;
  --meals-max: 1280px;
  --meals-pad: clamp(18px, 4vw, 56px);
  --meals-ease: 160ms ease;
  color: var(--ink, #161616);
  background: #fff;
}

.ffg-meals *,
.ffg-meals *::before,
.ffg-meals *::after {
  box-sizing: border-box;
}

.ffg-meals [hidden] {
  display: none !important;
}

.ffg-meals p,
.ffg-meals h1,
.ffg-meals h2,
.ffg-meals h3,
.ffg-meals dl,
.ffg-meals dd {
  margin: 0;
}

.ffg-meals :is(h1, h2, h3) {
  color: inherit;
  text-wrap: balance;
}

.ffg-meals :is(button, select, input) {
  font: inherit;
}

.ffg-meals :is(a, button, input, select):focus-visible {
  outline: 2px solid var(--meals-focus);
  outline-offset: 4px;
}

.meals-hero {
  overflow: hidden;
  background: #151515;
  color: white;
}

.meals-hero-inner {
  width: min(100%, 1440px);
  min-height: clamp(405px, 44vw, 610px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.meals-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(48px, 7vw, 106px) var(--meals-pad);
}

.ffg-meals .meals-kicker {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.meals-kicker span {
  width: 1.1em;
  height: 0.22em;
  background: var(--meals-accent);
}

.ffg-meals .meals-hero h1 {
  margin-block: 18px 20px;
  font-size: clamp(2.35rem, 5.05vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -0.022em;
  line-height: 0.98;
}

.meals-hero-copy > p:not(.meals-kicker) {
  max-width: 38ch;
  color: #ddd;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.55;
}

.meals-hero-copy a:focus-visible {
  outline-color: var(--meals-accent);
}

.meals-hero-copy .meals-button {
  margin-top: 30px;
}

.meals-hero-image {
  position: relative;
  min-height: 100%;
}

.meals-hero-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #151515 0%, transparent 18%);
  content: "";
  pointer-events: none;
}

.meals-hero-image img {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.meals-hero-image span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 5px 8px;
  color: #fff;
  background: #171717d9;
  font-size: 0.68rem;
  line-height: 1.3;
}

.ffg-meals .meals-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #151515;
  background: var(--meals-accent);
  font-size: 0.87rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--meals-ease), color var(--meals-ease), border-color var(--meals-ease);
}

.ffg-meals .meals-button:not(:disabled):hover {
  background: #b5e300;
}

.ffg-meals .meals-button:disabled {
  color: #4b4848;
  background: #e5e1e0;
  cursor: default;
}

.ffg-meals .meals-button-secondary {
  color: var(--ink, #161616);
  background: #fff;
  border-color: var(--line, #e2e2df);
}

.ffg-meals .meals-button-secondary:not(:disabled):hover {
  background: var(--surface, #f5f4f1);
}

.meals-layout {
  width: min(100%, var(--meals-max));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 0.35fr);
  align-items: start;
  gap: clamp(20px, 3vw, 42px);
  padding: clamp(35px, 6vw, 78px) var(--meals-pad);
  margin-inline: auto;
  scroll-margin-top: 100px;
}

.meals-section-heading {
  margin-bottom: 22px;
}

.ffg-meals .meals-section-heading h2 {
  font-size: clamp(1.95rem, 3.3vw, 3.1rem);
  font-weight: 850;
  letter-spacing: -0.018em;
  line-height: 1.12;
}

.ffg-meals .meals-section-heading p,
.ffg-meals .meal-order-empty,
.ffg-meals .meal-order-fulfillment p,
.ffg-meals .meal-card-body > p:not(.meal-type),
.ffg-meals .meals-nutrition p {
  color: var(--muted, #555);
  line-height: 1.55;
}

.meals-section-heading p {
  margin-top: 7px;
}

.meals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 20px);
}

.meal-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 6px;
  background: #fff;
}

.meal-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: var(--surface, #f5f4f1);
}

.meal-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(12px, 1.4vw, 18px);
}

.ffg-meals .meal-card-body .meal-type {
  color: #425900;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ffg-meals .meal-card h3 {
  margin-block: 6px;
  font-size: clamp(1rem, 1.55vw, 1.31rem);
  letter-spacing: -0.012em;
  line-height: 1.16;
}

.ffg-meals .meal-card-body > p:not(.meal-type) {
  font-size: 0.86rem;
}

.meal-card-controls {
  padding-top: 16px;
  margin-top: auto;
}

.ffg-meals .meal-add,
.ffg-meals .meal-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 4px;
  color: var(--ink, #161616);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  transition: background var(--meals-ease), color var(--meals-ease), border-color var(--meals-ease);
}

.ffg-meals .meal-add:hover,
.ffg-meals .meal-stepper button:hover:not(:disabled) {
  border-color: #141414;
  color: #fff;
  background: #141414;
}

.meal-add {
  gap: 10px;
  padding-inline: 14px;
}

.meal-add span {
  font-size: 1.12rem;
}

.meal-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meal-stepper span {
  min-width: 1.5ch;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ffg-meals .meal-stepper button {
  font-size: 1.15rem;
}

.ffg-meals .meal-stepper button:disabled {
  opacity: 0.45;
  cursor: default;
}

.meals-nutrition {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 20px;
  margin-top: 20px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 6px;
  background: var(--surface, #f5f4f1);
}

.ffg-meals .meals-nutrition h3 {
  font-size: 1rem;
}

.ffg-meals .meals-nutrition p {
  margin-top: 3px;
  font-size: 0.84rem;
}

.meals-nutrition dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.77rem;
}

.meals-nutrition dt {
  font-weight: 800;
}

.meals-nutrition dd {
  color: var(--muted, #555);
}

.meal-order {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 6px;
  background: var(--surface, #f5f4f1);
}

.meal-order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ffg-meals .meal-order h2 {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  letter-spacing: -0.012em;
  line-height: 1.15;
}

.meal-count {
  flex: none;
  color: var(--muted, #555);
  font-size: 0.76rem;
}

.meal-order-empty,
.meal-order-fulfillment p {
  font-size: 0.86rem;
}

.meal-order-fulfillment {
  padding-top: 12px;
  border-top: 1px solid var(--line, #e2e2df);
}

.meal-order-fulfillment strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.ffg-meals .meal-preview-note {
  color: var(--muted, #555);
  font-size: 0.76rem;
  line-height: 1.5;
}

.ffg-meals .meal-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meal-order-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding-block: 7px;
  color: var(--ink, #161616);
  font-size: 0.87rem;
  line-height: 1.35;
}

.meal-order-list li + li {
  border-top: 1px solid var(--line, #e2e2df);
}

.meal-order-list li strong {
  color: var(--muted, #555);
  font-weight: 700;
}

.ffg-meals .meal-dock {
  display: none;
}

.meal-dialog {
  width: min(600px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 9px;
  color: var(--ink, #161616);
  background: #fff;
  overscroll-behavior: contain;
}

.meal-dialog::backdrop {
  background: #101010bf;
}

.meal-dialog-inner {
  padding: clamp(15px, 4vw, 28px);
}

.meal-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.ffg-meals .meal-dialog-heading h2 {
  margin-top: 6px;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 850;
  letter-spacing: -0.018em;
  line-height: 1.15;
}

.ffg-meals .meal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 4px;
  color: inherit;
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.ffg-meals .meal-close:hover {
  background: var(--surface, #f5f4f1);
}

.meal-dialog fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0 0 17px;
}

.meal-dialog legend {
  padding: 0;
  margin-bottom: 7px;
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.3;
}

.meal-mode > div,
.meal-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.meal-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 4px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.meal-mode label:has(:checked) {
  border-color: #789600;
  background: #f6ffd9;
}

.meal-mode input {
  margin: 0;
  accent-color: #567300;
}

.meal-fields label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
  color: var(--ink, #161616);
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1.3;
}

.meal-fields p {
  margin-bottom: 7px;
  color: var(--muted, #555);
  font-size: 0.78rem;
  line-height: 1.5;
}

.meal-fields input,
.meal-fields select {
  width: 100%;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #8a8786;
  border-radius: 4px;
  color: var(--ink, #161616);
  background: #fff;
  font-size: 1rem;
  font-weight: 400;
}

.meal-dialog :is(form, [data-step]) > .meals-button,
.meal-dialog-actions {
  margin-top: 12px;
}

.meal-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meal-review-note {
  color: var(--muted, #555);
  font-size: 0.91rem;
  line-height: 1.5;
}

.meal-review-box {
  display: grid;
  gap: 12px;
  padding: 12px 15px;
  margin-block: 12px;
  border: 1px solid var(--line, #e2e2df);
  border-radius: 4px;
  background: var(--surface, #f5f4f1);
}

.meal-review-details {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #e2e2df);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meal-review-details dt {
  font-weight: 800;
}

.meal-review-details dd {
  white-space: pre-line;
}

.meals-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .meals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .meals-hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .meals-hero-copy {
    padding-block: 42px 28px;
  }

  .meals-hero-image {
    height: clamp(205px, 52vw, 360px);
  }

  .meals-hero-image::after {
    background: linear-gradient(180deg, #151515 0%, transparent 18%);
  }

  .meals-hero-image img {
    object-position: center 55%;
  }

  .meals-layout {
    grid-template-columns: 1fr;
    scroll-margin-top: 80px;
  }

  .meal-order {
    position: static;
    scroll-margin-top: 90px;
  }

  .ffg-meals .meal-dock {
    position: fixed;
    inset: auto 14px calc(14px + env(safe-area-inset-bottom)) 14px;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    max-width: 480px;
    margin-inline: auto;
    border-color: #788f08;
    box-shadow: 0 4px 22px #16161633;
  }
}

@media (max-width: 410px) {
  .meals-grid {
    grid-template-columns: 1fr;
  }

  .meal-card > img {
    aspect-ratio: 4 / 3;
  }

  .meal-form-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ffg-meals *,
  .ffg-meals *::before,
  .ffg-meals *::after {
    transition: none !important;
  }
}
