:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --surface: #fffefa;
  --ink: #222b24;
  --muted: #58625a;
  --green: #234c38;
  --leaf: #e6eee4;
  --line: #e2e4db;
  --radius: 22px;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.6; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #8c5431; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .45; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.045em; line-height: 1.28; word-break: keep-all; }
.page-panel h1, h2 { font-size: clamp(23px, 3.5vw, 29px); }
h3 { font-size: 19px; }
p + p { margin-top: 8px; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.wrap { width: min(100% - 64px, 1176px); margin-inline: auto; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; padding: 3px; color: var(--ink);
  background: none; border: 0; font-size: 18px; font-weight: 800; letter-spacing: -.055em;
  white-space: nowrap;
}
.brand img { border-radius: 10px; }
.explore { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.explore button, .workspace-nav button {
  min-height: 42px; border: 0; border-radius: 10px; padding: 8px 13px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.explore .active, .workspace-nav .active { background: var(--leaf); color: var(--green); }

main.wrap { padding-block: 29px 40px; }
.hero {
  display: grid; grid-template-columns: 1fr 1.16fr; overflow: hidden; min-height: 340px;
  background: #203d2f; color: #fffdf4; border-radius: 28px;
}
.hero-copy { align-self: center; padding: 34px clamp(28px, 4vw, 55px); }
.hero-date { margin-bottom: 10px; color: #d1e0d0; font-size: 14px; font-weight: 700; }
.hero h1 { font-size: clamp(37px, 5vw, 66px); font-weight: 800; letter-spacing: -.075em; }
.hero-description { margin-top: 13px; color: #dbe7d9; font-size: clamp(13px, 1.6vw, 16px); word-break: keep-all; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 21px 0 0; padding: 0; list-style: none; }
.hero-facts li { padding: 4px 10px; border: 1px solid #769181; border-radius: 999px; color: #fffcf1; font-size: 12px; white-space: nowrap; }
.hero-image { position: relative; margin: 0; min-width: 0; min-height: 100%; background: #6b5035; }
.hero-image img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 53%; }
.hero-image figcaption {
  position: absolute; right: 12px; bottom: 12px; padding: 2px 8px; border-radius: 5px;
  background: #262019dd; color: white; font-size: 11px;
}

.workspace-nav {
  display: flex; gap: 4px; margin-block: 22px 18px; padding: 5px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--surface);
}
.workspace-nav button { flex: 1; padding-inline: 6px; }
main:has(.hero[hidden]) .workspace-nav { margin-top: 0; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.dashboard-side { display: grid; gap: 16px; min-width: 0; }
.panel { min-width: 0; padding: clamp(17px, 2.45vw, 29px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel > h1, .panel > h2 { margin-bottom: 12px; }
.page-panel { max-width: 870px; margin-inline: auto; }
.section-lead { margin-top: -5px; margin-bottom: 15px; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.menu-panel .dish:last-child, .page-panel .dish:last-child { border-bottom: 0; }
.pantry-panel { background: #eff2e9; }
.pantry-panel label, .field-label { display: block; margin-top: 14px; font-size: 13px; font-weight: 700; }
.summary-panel h2 { font-size: 21px; }
.summary-panel .muted { margin-top: 11px; }
.app-footer { margin-top: 23px; color: var(--muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.install { margin-top: 16px; }

.button, .panel button, dialog button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  padding: 8px 13px; border: 1px solid transparent; border-radius: 10px;
  background: var(--green); color: white; font-size: 14px; font-weight: 700;
  line-height: 1.35; text-align: center; text-decoration: none; white-space: nowrap;
}
.button.secondary, .panel button.secondary, dialog button.secondary { background: var(--leaf); color: var(--green); }
.mobile-recommend { display: none; }
.panel button.quiet { background: transparent; color: var(--green); border-color: var(--line); }
.panel button.active { background: var(--green); color: white; }
.wide { width: 100%; margin-top: 12px; }
@media (hover: hover) {
  .button:hover, .panel button:hover, dialog button:hover { filter: brightness(.94); }
  .explore button:hover, .workspace-nav button:hover { background: var(--leaf); color: var(--green); }
}

input[type='text'], select {
  width: 100%; min-height: 44px; margin-top: 6px; padding: 9px 12px; border: 1px solid #bbc5b9;
  border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px;
}
input::placeholder { color: #646e65; }
.input-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 13px; }
.results { margin-block: 12px 6px; }
.dish {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.dish-name { min-width: 0; }
.dish-name b { display: block; color: var(--ink); font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; word-break: keep-all; }
.dish-name small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.dish-actions { display: flex; gap: 5px; justify-content: end; }
.dish-actions button { min-height: 40px; padding: 8px 10px; font-size: 13px; }
.tags, .filters, .card-actions, .pagination, .buylinks { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.tag { display: inline-block; margin: 0 4px 4px 0; padding: 4px 9px; border-radius: 999px; background: var(--leaf); color: var(--green); font-size: 12px; font-weight: 700; }
.tags .tag { margin: 0; }
.filters { margin-block: 15px 7px; }
.pagination { justify-content: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.pagination span { min-width: 62px; text-align: center; }
.week, .specialcard { padding: 15px 0; border-bottom: 1px solid var(--line); }
.week:last-child, .specialcard:last-child { border-bottom: 0; padding-bottom: 0; }
.week b { font-size: 17px; }
.week p, .specialcard p { margin: 5px 0 9px; }
.specialcard h3 { margin-top: 4px; }
.check, .step { display: flex; align-items: start; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check input, .step input { flex: none; width: 21px; height: 21px; margin: 2px 0 0; accent-color: var(--green); }
.check input:checked + span, .step input:checked + span { color: var(--muted); text-decoration: line-through; }
.step b { color: var(--green); font-size: 12px; }

dialog {
  width: min(100% - 28px, 590px); max-height: min(86dvh, 760px); padding: clamp(17px, 4vw, 31px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 65px #172a2340; overscroll-behavior: contain;
}
dialog::backdrop { background: #1e2e25a6; }
body:has(dialog[open]) { overflow: hidden; }
dialog .close { position: sticky; top: 0; float: right; margin-left: 8px; }
dialog h2 { margin: 5px 0 12px; }
dialog h3 { margin-top: 22px; }
dialog .eyebrow { padding-top: 5px; color: var(--green); font-size: 13px; font-weight: 700; }
.buylinks { margin-block: 12px 7px; }
.buylinks a { flex: 1 0 125px; }
.tip { margin: 17px 0; padding: 14px; border-radius: 12px; background: var(--leaf); }
.tip p { margin-top: 4px; }
.video { width: 100%; }

@media (max-width: 850px) {
  .wrap { width: min(100% - 36px, 1176px); }
  .hero { min-height: 290px; }
  .dashboard { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 28px); }
  .site-header .wrap { min-height: 0; display: block; padding-block: 9px 6px; }
  .brand { font-size: 16px; }
  .brand img { width: 31px; height: 31px; border-radius: 8px; }
  .explore { margin-top: 3px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .explore button { min-height: 40px; padding-inline: 2px; font-size: clamp(11px, 3.3vw, 14px); }
  main.wrap { padding-block: 14px 28px; }
  .hero { min-height: 0; grid-template-columns: 1fr; border-radius: 20px; }
  .hero-copy { padding: 17px 17px 18px; }
  .hero-date { margin-bottom: 5px; font-size: 12px; }
  .hero h1 { font-size: clamp(31px, 8.6vw, 47px); }
  .hero-description { margin-top: 6px; }
  .hero-facts { margin-top: 10px; }
  .hero-image { min-height: 130px; height: clamp(133px, 33vw, 200px); }
  .hero-image figcaption { right: 8px; bottom: 8px; }
  .workspace-nav { margin-block: 12px; padding: 3px; gap: 1px; }
  .workspace-nav button { padding-inline: 1px; font-size: clamp(11px, 3.3vw, 14px); }
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  .dashboard-side { gap: 12px; }
  .panel { border-radius: 17px; }
  .mobile-recommend { display: inline-flex; font-size: 12px; }
  .dish-actions button { padding-inline: 8px; font-size: 12px; }
}

@media (max-width: 360px) {
  .library-panel .dish { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .library-panel .dish-actions { justify-content: start; }
  .input-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
