:root {
  --green-900: #153f32;
  --green-700: #276b4f;
  --green-500: #54a66f;
  --green-100: #e8f4e9;
  --cream: #f8f4e8;
  --orange: #f39b63;
  --ink: #24312b;
  --muted: #68756e;
  --white: #fffefa;
  --border: #dfe7df;
  --shadow: 0 18px 50px rgba(31, 70, 53, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  background: var(--cream);
}

input, textarea, button, select { font: inherit; }
button { cursor: pointer; }

.page-shell { overflow: hidden; }
.topbar, main > section, footer { padding-left: max(24px, calc((100vw - 1120px) / 2)); padding-right: max(24px, calc((100vw - 1120px) / 2)); }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 254, 250, 0.92);
  border-bottom: 1px solid rgba(39, 107, 79, 0.1);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--green-900); text-decoration: none; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--green-900); font-size: 20px; }
.today-pill { padding: 9px 15px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: 13px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.admin-link { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--green-700); background: white; text-decoration: none; font-size: 12px; font-weight: 700; }
.admin-link:hover { border-color: var(--green-500); background: var(--green-100); }

.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 70px;
  align-items: center;
  position: relative;
  background:
    radial-gradient(circle at 88% 12%, rgba(243, 155, 99, 0.2), transparent 24%),
    linear-gradient(125deg, #f8f4e8 0%, #eef5e9 100%);
}

.hero::before { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(39,107,79,.12); border-radius: 50%; left: -100px; bottom: -80px; }
.eyebrow, .step-label { color: var(--green-700); font-weight: 800; font-size: 12px; letter-spacing: 1.7px; }
.hero h1 { margin: 18px 0; color: var(--green-900); font-size: clamp(48px, 6vw, 78px); line-height: 1.02; letter-spacing: -4px; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-copy > p { max-width: 570px; color: var(--muted); line-height: 1.8; font-size: 16px; }

.primary-button, .recommend-button {
  border: 0;
  color: white;
  background: var(--green-900);
  border-radius: 14px;
  padding: 15px 22px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(21, 63, 50, 0.2);
  transition: transform .2s, box-shadow .2s;
}
.primary-button { margin-top: 14px; }
.primary-button span { margin-left: 14px; }
.primary-button:hover, .recommend-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(21,63,50,.28); }

.hero-visual { min-height: 410px; position: relative; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 340px; height: 340px; background: var(--orange); opacity: .12; border-radius: 45% 55% 65% 35%; transform: rotate(18deg); }
.plate { width: 330px; height: 330px; padding: 42px; border-radius: 50%; background: #fff; box-shadow: 0 30px 70px rgba(28,76,55,.2), inset 0 0 0 18px #f4f0e5; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; transform: rotate(-5deg); z-index: 1; }
.food { display: grid; place-items: center; font-size: 66px; overflow: hidden; }
.rice { background: #fff9e7; border-radius: 100% 20% 20% 30%; }
.protein { background: #ffe1c8; border-radius: 20% 100% 30% 20%; }
.greens { background: #dcedd6; border-radius: 30% 20% 20% 100%; }
.sides { background: #fff0d1; border-radius: 20% 30% 100% 20%; }
.floating-label { position: absolute; z-index: 2; padding: 11px 16px; border-radius: 12px; background: white; color: var(--green-900); font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.label-one { left: 0; top: 85px; }
.label-two { right: -5px; bottom: 70px; }

.picker-section, .menu-section, .result-section { padding-top: 86px; padding-bottom: 86px; background: var(--white); }
.section-heading, .result-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 34px; }
.section-heading h2, .result-heading h2, .tips-section h2 { margin: 8px 0 0; color: var(--green-900); font-size: clamp(28px, 4vw, 40px); letter-spacing: -1.5px; }
.section-heading > p { margin: 0; color: var(--muted); }
.preference-panel { padding: 34px; border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 15px 40px rgba(45,80,62,.07); }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 14px; font-size: 14px; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice-card { position: relative; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1.5px solid var(--border); border-radius: 15px; cursor: pointer; transition: .2s; }
.choice-card:has(input:checked) { border-color: var(--green-500); background: #f2f9f3; box-shadow: inset 0 0 0 1px var(--green-500); }
.choice-card input { position: absolute; opacity: 0; }
.choice-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--green-100); }
.choice-icon.orange { background: #fff0e6; }
.choice-icon.purple { background: #f1ebfa; }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { color: var(--green-900); margin-bottom: 3px; }
.choice-card small { color: var(--muted); font-size: 11px; }
.filter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 25px; }
.select-field { display: grid; gap: 8px; color: var(--green-900); font-size: 13px; font-weight: 700; }
.select-field select { width: 100%; padding: 13px; border: 1px solid var(--border); border-radius: 11px; color: var(--ink); background: #fff; outline: none; }
.select-field select:focus { border-color: var(--green-500); }
.recommend-button { display: block; margin: 30px auto 0; min-width: 280px; }
.recommend-button span { margin-right: 8px; }
.quick-filter-wrap { margin-top: 22px; display: grid; gap: 10px; }.quick-filter-wrap > strong { color: var(--green-900); font-size: 13px; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 9px; }.quick-filters button { padding: 9px 13px; border: 1px solid #cbd9cd; border-radius: 999px; color: var(--green-700); background: #fff; font-size: 12px; font-weight: 700; }.quick-filters button:hover,.quick-filters button.active { color: #fff; border-color: var(--green-700); background: var(--green-700); }

.menu-section { background: #eff5ec; }
.section-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.menu-pagination { margin-top: 28px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.menu-pagination[hidden] { display: none; }
.menu-pagination button { min-width: 42px; height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 11px; color: var(--green-700); background: white; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.menu-pagination button:hover:not(:disabled), .menu-pagination button.active { color: white; border-color: var(--green-700); background: var(--green-700); }
.menu-pagination button:disabled { color: #a7b2ac; background: #f2f4f1; cursor: not-allowed; }
.menu-item { position: relative; display: block; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 19px; color: inherit; background: white; text-align: left; box-shadow: 0 10px 30px rgba(36,75,56,.08); transition: transform .2s, border-color .2s, box-shadow .2s; }
.menu-item-link { display: block; color: inherit; text-decoration: none; }
.menu-item:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(36,75,56,.15); }
.menu-item.selected { border-color: var(--green-500); box-shadow: 0 12px 34px rgba(39,107,79,.2); }
.menu-item-picture { aspect-ratio: 4 / 3; min-height: 145px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(145deg, #f9d6a8, #f3a875); }
.menu-item-picture.has-image::after, .meal-picture.has-image::after { display: none; }
.menu-item-photo, .meal-photo { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.menu-item-picture::after { content: ""; width: 105px; height: 105px; position: absolute; border-radius: 50%; background: rgba(255,255,255,.26); }
.menu-item-emoji { position: relative; z-index: 1; font-size: 68px; filter: drop-shadow(0 9px 8px rgba(100,40,10,.13)); }
.menu-item-time { position: absolute; z-index: 2; top: 10px; right: 10px; padding: 5px 8px; border-radius: 999px; color: var(--green-900); background: rgba(255,255,255,.9); font-size: 9px; font-weight: 800; }
.meal-badges { position: absolute; z-index: 3; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 5px; }.meal-badges span { padding: 5px 8px; border-radius: 999px; color: var(--green-900); background: rgba(255,255,255,.92); font-size: 9px; font-weight: 800; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.menu-item-body { padding: 15px; }
.menu-item-body h3 { min-height: 45px; margin: 0 0 8px; color: var(--green-900); font-size: 15px; line-height: 1.45; }
.menu-item-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-item-info strong { color: var(--orange); font-size: 14px; }
.menu-item-info span { color: var(--muted); font-size: 10px; }
.menu-item-stats { display: grid; justify-items: end; gap: 3px; }
.menu-item-stats span:last-child { color: var(--green-700); font-weight: 600; }
.menu-item-stats .card-rating { color: #a56a00; font-weight: 700; }
.favorite-button { position: absolute; z-index: 4; top: 10px; left: 10px; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; color: #c83e55; background: rgba(255,255,255,.92); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 5px 15px rgba(45,60,50,.14); }
.popular-section { padding-top: 45px; }
.popular-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.popular-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 17px; background: white; box-shadow: 0 8px 24px rgba(36,75,56,.07); }
.popular-rank { color: var(--orange); font-weight: 800; }.popular-emoji { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: #fff1dd; font-size: 30px; }
.popular-emoji img { width: 100%; height: 100%; object-fit: cover; }.popular-card div { display: grid; gap: 5px; }.popular-card a { padding-right: 28px; color: var(--green-900); font-weight: 800; text-decoration: none; }.popular-card small { color: var(--muted); }.popular-favorite { top: 10px; right: 10px; left: auto; width: 30px; height: 30px; font-size: 18px; }
.recent-section { padding-top: 45px; }
.recent-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.recent-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 16px; color: var(--green-900); background: rgba(255,255,255,.88); text-decoration: none; box-shadow: 0 7px 20px rgba(36,75,56,.06); }
.recent-card:hover { transform: translateY(-2px); border-color: #8ab899; }
.recent-image { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: #fff1dd; font-size: 27px; }
.recent-image img { width: 100%; height: 100%; object-fit: cover; }.recent-card > span:last-child { min-width: 0; display: grid; gap: 4px; }.recent-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.recent-card small { color: var(--muted); font-size: 10px; }
.empty-menu { grid-column: 1 / -1; padding: 35px; border: 1px dashed #b9cbbb; border-radius: 18px; text-align: center; color: var(--muted); background: rgba(255,255,255,.6); }
.result-section { background: var(--white); }
.detail-heading { margin-bottom: 25px; }
.result-section.hidden { display: none; }
.shuffle-button { padding: 10px 16px; border: 1px solid #b9cbbb; border-radius: 999px; color: var(--green-700); background: transparent; font-weight: 700; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ai-pick-button { padding: 11px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--green-700); font-weight: 800; box-shadow: 0 8px 22px rgba(21,63,50,.18); cursor: pointer; }
.ai-pick-button:hover { transform: translateY(-1px); background: var(--green-900); }
.ai-choice-note { margin: -8px 0 22px; padding: 14px 18px; border: 1px solid #c9dfcc; border-radius: 14px; color: var(--green-900); background: #eef8ef; line-height: 1.55; }
.meal-card { display: grid; grid-template-columns: 360px 1fr; min-height: 370px; overflow: hidden; border-radius: 25px; background: white; box-shadow: var(--shadow); }
.meal-picture { min-height: 370px; display: grid; place-items: center; position: relative; background: linear-gradient(145deg, #f6c48f, #e58a55); }
.meal-picture::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.25); }
.meal-emoji { position: relative; z-index: 1; font-size: 125px; filter: drop-shadow(0 18px 12px rgba(100,40,10,.15)); }
.meal-match { position: absolute; z-index: 2; left: 20px; top: 20px; padding: 8px 12px; border-radius: 999px; color: #fff; background: rgba(21,63,50,.88); font-size: 11px; font-weight: 800; }
.meal-content { padding: 38px 42px; }
.meal-title-row { display: flex; justify-content: space-between; gap: 20px; }
.meal-content h3 { margin: 0; color: var(--green-900); font-size: 29px; }
.price { white-space: nowrap; color: var(--orange); font-size: 19px; font-weight: 800; }
.meal-description { color: var(--muted); line-height: 1.7; }
.nutrition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0; }
.nutrition-item { padding: 12px 8px; border-radius: 10px; background: #f3f7f1; text-align: center; }
.nutrition-item strong, .nutrition-item small { display: block; }
.nutrition-item strong { color: var(--green-900); }
.nutrition-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.meal-meta { display: flex; flex-wrap: wrap; gap: 9px; }
.meal-meta span { padding: 7px 11px; border-radius: 999px; color: var(--green-700); background: var(--green-100); font-size: 11px; font-weight: 600; }
.why-box { margin-top: 20px; padding: 13px 16px; border-left: 3px solid var(--orange); border-radius: 0 10px 10px 0; color: #526159; background: #fff8ee; font-size: 12px; line-height: 1.6; }
.meal-detail-link { display: inline-block; margin-top: 18px; color: var(--green-700); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.tips-section { padding-top: 74px; padding-bottom: 74px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: center; color: white; background: var(--green-900); }
.step-label.light { color: #a8d0b4; }
.tips-section h2 { color: white; }
.tips-intro p { color: #bed0c7; line-height: 1.7; }
.plate-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guide-item { min-height: 140px; padding: 24px 16px; border-radius: 18px; background: rgba(255,255,255,.09); }
.guide-item strong { display: block; color: #f1a46f; font-size: 36px; }
.guide-item span { font-weight: 700; }
.guide-item small { color: #b8cfc4; font-weight: 400; }
.water-note { grid-column: 1 / -1; padding: 12px; text-align: center; border-radius: 12px; color: #c9ded3; background: rgba(255,255,255,.06); font-size: 12px; }

footer { padding-top: 35px; padding-bottom: 35px; display: flex; justify-content: space-between; gap: 20px; align-items: center; background: #0e2e24; color: #a9c0b6; font-size: 11px; }
footer p { text-align: center; }
footer small { text-align: right; }
.footer-brand { color: white; }
.marketing-links { display: flex; justify-content: center; gap: 10px; }
.marketing-links a { color: #c7dbd1; text-decoration: none; font-size: 10px; font-weight: 700; }
.marketing-links a:hover { color: white; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 15px; padding-top: 70px; padding-bottom: 60px; text-align: center; }
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero h1 { letter-spacing: -2px; }
  .hero-visual { min-height: 350px; }
  .plate { width: 280px; height: 280px; padding: 35px; }
  .food { font-size: 52px; }
  .label-one { left: 6%; }
  .label-two { right: 5%; }
  .choice-grid, .filter-row { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meal-card { grid-template-columns: 1fr; }
  .meal-picture { min-height: 250px; }
  .tips-section { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 540px) {
  .topbar { height: 66px; }
  .today-pill { display: none; }
  .hero h1 { font-size: 45px; }
  .hero-visual { transform: scale(.9); }
  .section-heading, .result-heading { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; justify-content: flex-start; }
  .popular-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .preference-panel { padding: 22px 16px; }
  .recommend-button { width: 100%; min-width: 0; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .menu-item-picture { min-height: 110px; }
  .menu-item-emoji { font-size: 52px; }
  .menu-item-body { padding: 12px; }
  .menu-item-body h3 { min-height: 42px; font-size: 13px; }
  .meal-content { padding: 26px 20px; }
  .meal-title-row { flex-direction: column; gap: 6px; }
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
  .plate-guide { grid-template-columns: 1fr; }
  .water-note { grid-column: auto; }
  footer { flex-direction: column; gap: 15px; text-align: center; }
  footer p, footer small { text-align: center; }
  .footer-brand { justify-content: center; }
}
