:root {
  color-scheme: light;
  --ink: #1e2a24;
  --muted: #66736d;
  --line: #dce5df;
  --paper: #fffdf8;
  --soft: #f4f8ef;
  --mint: #2f8f72;
  --mint-dark: #18624e;
  --coral: #d86f4a;
  --gold: #d8a43b;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(31, 52, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(13, 36, 30, 0.78), rgba(13, 36, 30, 0.26)),
    url("https://images.unsplash.com/photo-1547592180-85f173990554?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.hero__shade {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), var(--paper));
  pointer-events: none;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 56px);
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.topbar__link,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.topbar__link {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.12);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 36px));
  margin: 0 auto 12vh clamp(18px, 7vw, 92px);
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffd8bb;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero__copy {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  border: 0;
  padding: 0 18px;
  font-weight: 720;
}

.button--primary {
  color: var(--white);
  background: var(--mint);
}

.button--ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 54px 0 22px;
}

.toolbar h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: 0;
}

.controls {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.segment {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
}

.segment.is-active {
  color: var(--white);
  border-color: var(--mint-dark);
  background: var(--mint-dark);
}

.nutrition-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.nutrition-strip article {
  min-height: 104px;
  padding: 18px;
  background: var(--soft);
}

.nutrition-strip strong,
.nutrition-strip span {
  display: block;
}

.nutrition-strip strong {
  margin-bottom: 8px;
  font-size: 1.03rem;
}

.nutrition-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 58px;
}

.day-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(31, 52, 43, 0.07);
}

.day-card__image {
  position: relative;
  height: 190px;
  overflow: hidden;
}

.day-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.day-card__image--photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(18, 32, 27, 0.08), rgba(18, 32, 27, 0.68));
  pointer-events: none;
}

.day-cover-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.day-cover-caption strong,
.day-cover-caption small {
  display: block;
}

.day-cover-caption strong {
  margin-bottom: 4px;
  font-size: 1.28rem;
  font-weight: 860;
}

.day-cover-caption small {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.day-card__image--text {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, var(--mint-dark), #6d8c45);
}

.day-card__image--text strong {
  font-size: 1.55rem;
}

.day-card__image--text small {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.day-card:hover img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(24, 98, 78, 0.9);
  font-weight: 760;
}

.day-card__body {
  padding: 18px;
}

.day-card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
}

.day-card p {
  min-height: 76px;
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.day-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f7efe4;
  color: #8d593d;
  font-size: 0.83rem;
}

.day-card button {
  width: 100%;
  color: var(--white);
  background: var(--mint-dark);
}

.meal-dialog {
  width: min(1180px, calc(100% - 24px));
  max-height: min(94vh, 980px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.meal-dialog::backdrop {
  background: rgba(11, 29, 25, 0.72);
}

.dialog-shell {
  position: relative;
  overflow: auto;
  max-height: min(94vh, 980px);
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.icon-button {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 4;
  width: 42px;
  height: 42px;
  margin: 12px 12px 0 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

.dialog-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 22px 26px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.dialog-hero img {
  display: none;
}

.dialog-hero h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4vw, 3rem);
}

#dialogSummary {
  color: var(--muted);
  line-height: 1.7;
}

.meal-list {
  display: grid;
  gap: 14px;
  padding: 22px 26px 28px;
}

.meal-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.meal-time {
  color: var(--mint-dark);
  font-weight: 780;
}

.meal-time span,
.meal-time small {
  display: block;
}

.meal-time small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.meal-content {
  min-width: 0;
}

.meal-item h3 {
  margin: 0 0 8px;
}

.dish-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.dish-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fffdf8);
}

.dish-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.dish-card__head h4 {
  margin: 0;
  font-size: 1.08rem;
}

.dish-index,
.source-badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--mint-dark);
  background: #eaf4ed;
  font-size: 0.78rem;
  font-weight: 760;
}

.source-badge {
  color: #7a4b12;
  background: #fff3d8;
}

.source-badge--local {
  color: var(--muted);
  background: #f3efe5;
}

.meal-media {
  display: grid;
  grid-template-columns: minmax(180px, 1fr);
  gap: 14px;
  margin: 12px 0;
  align-items: start;
}

.meal-photo {
  position: relative;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
}

.meal-photo img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.meal-photo figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(24, 98, 78, 0.88);
  font-size: 0.82rem;
  font-weight: 740;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111714;
}

.video-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.video-card--vertical {
  width: min(100%, 260px);
  aspect-ratio: 9 / 16;
}

.video-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 14px;
}

.recipe-box {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.recipe-box strong {
  display: block;
  margin-bottom: 6px;
}

.recipe-box p,
.recipe-box ol {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.recipe-box ol {
  padding-left: 1.25em;
}

.recipe-video {
  display: block;
  width: min(100%, 420px);
  max-height: 520px;
  border-radius: 8px;
  background: #111714;
}

.recipe-video-link {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, #15251f, #2f6b59);
}

.recipe-video-link strong {
  font-size: 1rem;
}

.recipe-video-link a {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--mint-dark);
  background: var(--white);
  font-weight: 760;
  text-decoration: none;
}

.recipe-source {
  margin: 0;
  color: #8b6f50;
  font-size: 0.82rem;
  line-height: 1.5;
}

.video-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

footer {
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: #edf4ee;
}

footer p {
  margin: 0 auto;
  max-width: 820px;
  line-height: 1.65;
}

@media (max-width: 920px) {
  .toolbar,
  .dialog-hero {
    grid-template-columns: 1fr;
  }

  .toolbar {
    display: grid;
    align-items: stretch;
  }

  .controls,
  .segments {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .nutrition-strip,
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 86vh;
  }

  .topbar {
    padding: 16px;
  }

  .topbar__link {
    display: none;
  }

  .hero__content {
    width: calc(100% - 32px);
    margin: 0 16px 10vh;
  }

  .button {
    width: 100%;
  }

  .nutrition-strip,
  .menu-grid,
  .recipe-grid,
  .meal-item,
  .meal-media {
    grid-template-columns: 1fr;
  }

  .meal-photo,
  .meal-photo img {
    min-height: 230px;
  }

  .video-card--vertical {
    width: min(100%, 220px);
    min-height: 0;
  }

  .day-card__image {
    height: 176px;
  }

  .dialog-hero,
  .meal-list {
    padding-left: 16px;
    padding-right: 16px;
  }
}
