:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --ink: #24382d;
  --muted: #778078;
  --green: #315b45;
  --green-dark: #234735;
  --sage: #e8eee4;
  --sage-deep: #cddbc8;
  --orange: #c96f43;
  --orange-soft: #f3e3d6;
  --line: #e5e7df;
  --shadow: 0 14px 40px rgba(42, 63, 49, .07);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
button, [data-recipe-id] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(201, 111, 67, .28); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 35px 24px 26px; background: #f0f2e9; border-right: 1px solid #e1e5da; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px; border: 0; background: transparent; text-align: left; width: max-content; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--green); transform: rotate(-3deg); }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 26px; letter-spacing: 5px; line-height: 1.1; }
.brand small { display: block; margin-top: 5px; color: #7d8a7b; font-size: 8px; letter-spacing: 3px; }
.main-nav { display: grid; gap: 9px; margin-top: 57px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 15px; border: 0; border-radius: 12px; background: transparent; color: #718074; font-size: 14px; text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { background: rgba(255,255,255,.55); color: var(--green); }
.nav-item.active { background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(49,91,69,.18); }
.sidebar-note { margin-top: auto; padding: 25px 9px; color: var(--green); }
.sidebar-note > svg { width: 27px; height: 27px; color: #8da086; margin-bottom: 12px; }
.sidebar-note p { margin: 0 0 9px; font-family: "Songti SC", "STSong", serif; font-size: 18px; line-height: 1.8; letter-spacing: 2px; }
.sidebar-note span { font-size: 11px; color: #98a194; }
.sidebar-foot { border-top: 1px solid #dfe4d8; padding: 20px 8px 0; color: #8a9488; font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #7f9d72; margin-right: 5px; box-shadow: 0 0 0 4px rgba(127,157,114,.1); }

.app-main { min-width: 0; max-width: 1500px; width: 100%; padding: 0 48px 25px; margin: 0 auto; }
.topbar { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); color: #8a918a; font-size: 12px; }
.topbar p { margin: 0; }
.topbar-label { white-space: nowrap; }
.view { padding-top: 40px; animation: view-in .35s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #88927f; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
.eyebrow svg { width: 14px; height: 14px; color: var(--orange); }

.hero { min-height: 340px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 50px; align-items: center; padding: 25px 0 38px; }
.hero h1, .page-heading h1 { margin: 18px 0 18px; font-family: "Songti SC", "STSong", "Noto Serif SC", serif; font-weight: 600; font-size: clamp(38px, 4vw, 56px); line-height: 1.35; letter-spacing: 1px; }
.hero h1 em { color: var(--green); font-style: normal; position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='8' viewBox='0 0 240 8'%3E%3Cpath d='M1 6c65-7 143 2 238-4' fill='none' stroke='%23c96f43' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; opacity: .65; }
.hero-copy > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.text-link { display: inline-flex; align-items: center; gap: 9px; padding: 0; margin-top: 25px; border: 0; background: none; color: var(--green); font-size: 13px; font-weight: 600; }
.text-link svg { width: 17px; transition: transform .2s; }
.text-link:hover svg { transform: translateX(4px); }
.text-link.small { margin: 0; font-size: 12px; }
.hero-visual { position: relative; min-height: 280px; padding: 25px 12px 20px 25px; }
.hero-visual::before { content: ""; position: absolute; inset: 0 0 0 20px; border-radius: 48% 48% 40% 55%; background: #e5ebde; transform: rotate(-4deg); }
.hero-visual::after { content: ""; position: absolute; width: 62px; height: 62px; right: -10px; top: 12px; border: 1px solid #bdcdb6; border-radius: 50%; opacity: .65; }
.hero-scribble { position: absolute; left: -8px; top: 0; color: var(--orange); font-family: "Songti SC", serif; font-size: 13px; letter-spacing: 3px; transform: rotate(-8deg); z-index: 2; }
.featured-dish { position: relative; z-index: 1; width: 100%; min-height: 240px; padding: 37px 35px 28px; border: 1px solid rgba(255,255,255,.75); border-radius: 22px; background: rgba(255,255,255,.85); box-shadow: 0 20px 50px rgba(49,91,69,.09); text-align: left; transform: rotate(2deg); transition: transform .25s, box-shadow .25s; }
.featured-dish:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 25px 55px rgba(49,91,69,.14); }
.featured-kicker { display: block; color: #8b9387; font-size: 11px; letter-spacing: 2px; }
.featured-dish > strong { display: block; margin: 12px 0 10px; font-family: "Songti SC", serif; font-size: 35px; font-weight: 600; letter-spacing: 4px; }
.featured-ingredients { display: block; color: #8a9187; font-size: 12px; }
.featured-meta { display: flex; gap: 18px; margin-top: 25px; color: #657269; font-size: 11px; }
.featured-meta > span { display: flex; align-items: center; gap: 5px; }
.featured-meta svg { width: 14px; height: 14px; color: var(--orange); }
.featured-action { position: absolute; right: 27px; bottom: 25px; display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 11px; }
.featured-action svg { width: 14px; }
.hero-stamp { position: absolute; z-index: 2; right: -9px; bottom: 4px; width: 70px; height: 70px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; gap: 4px; transform: rotate(9deg); box-shadow: 0 8px 20px rgba(201,111,67,.2); }
.hero-stamp svg { width: 23px; height: 23px; }
.hero-stamp span { font-family: "Songti SC", serif; font-size: 12px; line-height: 1.4; }

.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.entry-card { position: relative; min-width: 0; min-height: 185px; display: flex; align-items: flex-start; gap: 19px; padding: 29px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.entry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.ingredient-entry { background: #fff; }
.meal-entry { background: var(--green); border-color: var(--green); color: #fff; }
.entry-card::after { content: ""; position: absolute; width: 150px; height: 150px; border: 1px solid currentColor; border-radius: 50%; right: -100px; bottom: -95px; opacity: .08; }
.entry-icon { flex: 0 0 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: var(--sage); color: var(--green); }
.meal-entry .entry-icon { background: rgba(255,255,255,.13); color: #fff; }
.entry-icon svg { width: 23px; height: 23px; }
.entry-content { display: block; min-width: 0; }
.entry-content > small { display: block; font-size: 8px; letter-spacing: 1.2px; color: #9a9f96; margin-bottom: 8px; }
.meal-entry .entry-content > small { color: #b8c8ba; }
.entry-content > strong { display: block; font-size: 20px; letter-spacing: 1px; }
.entry-content > span:not(.sample-chips):not(.meal-entry-times) { display: block; margin-top: 9px; color: #8b928b; font-size: 12px; line-height: 1.7; }
.meal-entry .entry-content > span:not(.meal-entry-times) { color: #c2d0c3; }
.sample-chips, .meal-entry-times { display: flex; gap: 6px; margin-top: 17px; }
.sample-chips i, .meal-entry-times i { padding: 4px 9px; border-radius: 6px; background: #f3f5ef; color: #71806e; font-size: 10px; font-style: normal; }
.meal-entry-times i { background: rgba(255,255,255,.1); color: #dce5dc; }
.round-arrow { position: absolute; right: 23px; top: 25px; width: 31px; height: 31px; border: 1px solid #e6e9e0; border-radius: 50%; display: grid; place-items: center; color: var(--green); }
.round-arrow svg { width: 15px; }
.meal-entry .round-arrow { border-color: rgba(255,255,255,.25); color: #fff; }

.inspiration-section { margin-top: 43px; }
.section-heading, .results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .results-heading h2 { margin: 7px 0 0; font-family: "Songti SC", serif; font-size: 23px; font-weight: 600; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.recipe-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; transition: transform .25s, box-shadow .25s; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.recipe-art-button { position: relative; display: block; width: 100%; height: 132px; border: 0; overflow: hidden; background: var(--card-bg, #e9efe5); }
.recipe-art-button::before, .detail-art::before { content: ""; position: absolute; width: 140px; height: 140px; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 1px solid rgba(49,91,69,.12); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.22), 0 0 0 16px rgba(49,91,69,.05); }
.recipe-art-button::after { content: ""; position: absolute; width: 40px; height: 1px; background: rgba(49,91,69,.18); left: calc(50% + 58px); top: 50%; transform: rotate(-30deg); box-shadow: 0 5px 0 rgba(49,91,69,.12), 0 10px 0 rgba(49,91,69,.08); }
.dish-monogram { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1; font-family: "Songti SC", serif; font-size: 32px; color: var(--card-accent, #6b8267); letter-spacing: 3px; white-space: nowrap; }
.art-1 { --card-bg: #f3e7dc; --card-accent: #af7656; }
.art-2 { --card-bg: #e4ece4; --card-accent: #5e7a63; }
.art-3 { --card-bg: #eee9dc; --card-accent: #8a805b; }
.art-4 { --card-bg: #e7e9ef; --card-accent: #68738c; }
.art-5 { --card-bg: #f1e4e1; --card-accent: #996e67; }
.recipe-time { position: absolute; z-index: 2; right: 12px; top: 12px; display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: rgba(255,255,255,.8); backdrop-filter: blur(5px); border-radius: 20px; font-size: 10px; color: #637064; }
.recipe-time svg { width: 12px; height: 12px; }
.recipe-card-body { padding: 17px 18px 16px; }
.tag-list { display: flex; gap: 6px; min-height: 20px; }
.tag-list span { color: #7d8b78; background: #f1f4ee; border-radius: 5px; padding: 3px 7px; font-size: 9px; }
.recipe-title-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 9px 0 8px; padding: 0; border: 0; background: transparent; text-align: left; }
.recipe-title-button strong { font-family: "Songti SC", serif; font-size: 19px; font-weight: 600; }
.recipe-title-button svg { flex: 0 0 16px; width: 16px; color: #a8afa5; transition: transform .2s; }
.recipe-title-button:hover svg { transform: translateX(3px); color: var(--green); }
.recipe-ingredients { min-height: 34px; margin: 0; color: #92998f; font-size: 11px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eff0eb; color: #7e887d; font-size: 10px; }
.recipe-card-foot span { display: flex; align-items: center; gap: 5px; }
.recipe-card-foot svg { width: 13px; height: 13px; color: var(--orange); }
.card-skeleton { height: 278px; border-radius: 18px; background: linear-gradient(100deg, #edeee8 20%, #f6f7f3 40%, #edeee8 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.page-heading { max-width: 700px; margin-bottom: 32px; }
.page-heading h1 { margin: 12px 0 10px; font-size: clamp(32px, 3.6vw, 46px); }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.match-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: stretch; }
.input-card { padding: 28px 30px 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(42,63,49,.035); }
.input-card-heading { display: flex; align-items: flex-start; gap: 14px; }
.step-number { display: grid; place-items: center; flex: 0 0 35px; height: 35px; border-radius: 10px; background: var(--sage); color: var(--green); font-size: 11px; font-weight: 700; }
.input-card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.input-card-heading p { margin: 6px 0 0; color: #939a92; font-size: 11px; }
.ingredient-input-wrap { display: flex; align-items: center; gap: 10px; height: 57px; margin-top: 24px; padding: 0 15px; border: 1px solid #dfe4da; border-radius: 12px; background: #fafbf8; transition: border .2s, box-shadow .2s; }
.ingredient-input-wrap:focus-within { border-color: #91a78e; box-shadow: 0 0 0 4px rgba(49,91,69,.06); }
.ingredient-input-wrap > svg { flex: 0 0 20px; color: #84927f; }
.ingredient-input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.ingredient-input-wrap input::placeholder { color: #abb1aa; }
.input-clear { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #a4aca2; opacity: 0; pointer-events: none; }
.ingredient-input-wrap:focus-within .input-clear, .ingredient-input-wrap.has-value .input-clear { opacity: 1; pointer-events: auto; }
.input-clear svg { width: 15px; }
.quick-label { margin: 18px 0 10px; color: #8d958c; font-size: 11px; }
.quick-ingredients { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-ingredients button { display: flex; align-items: center; gap: 4px; padding: 7px 11px; border: 1px solid #e5e8e0; border-radius: 8px; background: #fff; color: #69766b; font-size: 11px; transition: .2s; }
.quick-ingredients button svg { width: 12px; height: 12px; }
.quick-ingredients button:hover, .quick-ingredients button.active { border-color: #9caf97; background: var(--sage); color: var(--green); }
.quick-ingredients button.active svg { transform: rotate(45deg); }
.input-help { display: flex; align-items: center; gap: 5px; margin: 14px 0 20px; color: #a0a69e; font-size: 10px; }
.input-help svg { flex: 0 0 13px; width: 13px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 49px; border: 0; border-radius: 11px; background: var(--green); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 20px rgba(49,91,69,.15); transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary-button svg { width: 17px; }
.primary-button .button-arrow { margin-left: auto; }
.primary-button .button-arrow + * { margin-left: 0; }
.primary-button { padding: 0 18px; }
.primary-button > span { flex: 1; text-align: center; }
.match-guide { position: relative; overflow: hidden; padding: 28px 26px; border-radius: var(--radius); background: #e9eee3; }
.match-guide::after { content: ""; position: absolute; right: -65px; bottom: -70px; width: 180px; height: 180px; border: 1px solid #cbd8c4; border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.13); }
.match-guide h2 { margin: 12px 0 23px; font-family: "Songti SC", serif; font-size: 23px; font-weight: 600; line-height: 1.6; }
.match-guide ol { list-style: none; display: grid; gap: 18px; margin: 0; padding: 0; position: relative; z-index: 1; }
.match-guide li { display: flex; gap: 11px; }
.match-guide li > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border: 1px solid #a9b9a2; border-radius: 50%; color: #6c8167; font-family: serif; font-size: 11px; }
.match-guide li strong { display: block; font-size: 12px; font-weight: 600; }
.match-guide li p { margin: 4px 0 0; color: #83907e; font-size: 10px; line-height: 1.6; }
.match-results { margin-top: 35px; }
.empty-state { padding: 45px 20px 35px; text-align: center; color: #98a095; }
.empty-illustration { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 15px; border: 1px dashed #bdc7b8; border-radius: 50%; color: #8a9a84; }
.empty-illustration svg { width: 30px; height: 30px; }
.empty-state h2 { margin: 0 0 8px; color: #6e7e70; font-family: "Songti SC", serif; font-size: 17px; font-weight: 500; }
.empty-state p { margin: 0; font-size: 11px; }
.menu-summary { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.menu-summary h2 { margin: 0 0 6px; font-family: "Songti SC", serif; font-size: 23px; font-weight: 600; }
.menu-summary p { margin: 0; color: var(--muted); font-size: 11px; }
.menu-summary > span { color: #899386; font-size: 11px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.menu-card { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.menu-card:first-child { border-color: #b9c9b3; box-shadow: 0 10px 30px rgba(49,91,69,.06); }
.menu-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.menu-number { color: #a3aaa0; font-size: 9px; letter-spacing: 1.5px; }
.coverage-pill { padding: 4px 8px; border-radius: 20px; background: var(--sage); color: var(--green); font-size: 9px; }
.menu-card h3 { margin: 0 0 15px; font-family: "Songti SC", serif; font-size: 20px; font-weight: 600; }
.menu-dishes { display: grid; gap: 8px; }
.menu-dish { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: #f6f7f2; text-align: left; transition: background .2s; }
.menu-dish:hover { background: var(--sage); }
.menu-dish-icon { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: var(--green); }
.menu-dish-icon svg { width: 16px; }
.menu-dish > span:nth-child(2) { flex: 1; min-width: 0; }
.menu-dish strong { display: block; font-size: 12px; font-weight: 600; }
.menu-dish small { display: block; margin-top: 4px; color: #929a90; font-size: 9px; }
.menu-dish > svg { width: 14px; color: #a2aaa0; }
.menu-stats { display: flex; gap: 13px; margin: 15px 0 13px; color: #7f897d; font-size: 10px; }
.menu-stats span { display: flex; align-items: center; gap: 4px; }
.menu-stats svg { width: 12px; height: 12px; color: var(--orange); }
.missing-row { padding-top: 12px; border-top: 1px dashed #e2e5dc; color: #969d94; font-size: 10px; line-height: 1.7; }
.missing-row strong { color: #6d7b6e; font-weight: 500; }
.error-state { padding: 25px; border: 1px solid #ead7cc; border-radius: 14px; background: #fbf4ef; color: #a46a4d; text-align: center; font-size: 13px; }

.meal-controls { padding: 22px 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.meal-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meal-tabs button { position: relative; display: grid; grid-template-columns: 28px auto 1fr; align-items: center; gap: 8px; padding: 14px 17px; border: 1px solid #e7e9e2; border-radius: 11px; background: #fafbf8; color: #7e897d; text-align: left; transition: .2s; }
.meal-tabs button > svg { width: 20px; }
.meal-tabs button > span { font-size: 14px; font-weight: 600; }
.meal-tabs button > small { justify-self: end; font-size: 10px; font-weight: 400; opacity: .7; }
.meal-tabs button.active { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 7px 18px rgba(49,91,69,.12); }
.filter-row { display: flex; align-items: center; gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #eff0eb; }
.filter-row > span { flex: 0 0 auto; color: #8d958b; font-size: 11px; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tags button { display: flex; align-items: center; gap: 4px; padding: 6px 11px; border: 1px solid #e4e7df; border-radius: 20px; background: #fff; color: #788375; font-size: 10px; transition: .2s; }
.filter-tags button svg { width: 12px; height: 12px; }
.filter-tags button:hover, .filter-tags button[aria-pressed="true"] { border-color: #9fb098; background: var(--sage); color: var(--green); }
.results-heading { margin: 30px 0 18px; align-items: center; }
.results-heading h2 { font-size: 22px; }
.results-heading p { margin: 7px 0 0; color: #929a90; font-size: 11px; }
.results-heading > span { padding: 6px 11px; border-radius: 20px; background: #ecefe6; color: #778371; font-size: 10px; white-space: nowrap; }
.full-empty { grid-column: 1/-1; padding: 55px 20px; border: 1px dashed #d9ded4; border-radius: 18px; color: #8e978b; text-align: center; }
.full-empty svg { width: 30px; height: 30px; margin-bottom: 10px; }
.full-empty h3 { margin: 0 0 8px; font-family: "Songti SC", serif; font-size: 18px; font-weight: 500; }
.full-empty p { margin: 0; font-size: 11px; }

.nav-count { display: grid; place-items: center; min-width: 19px; height: 19px; margin-left: auto; padding: 0 5px; border-radius: 10px; background: #dce5d8; color: var(--green); font-size: 9px; font-weight: 600; }
.nav-item.active .nav-count { background: rgba(255,255,255,.18); color: #fff; }
.fridge-overview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.fridge-board { position: relative; overflow: hidden; padding: 31px 33px; border-radius: var(--radius); background: var(--green); color: #fff; }
.fridge-board::after { content: ""; position: absolute; right: -70px; top: -85px; width: 250px; height: 250px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025); pointer-events: none; }
.fridge-board-icon { position: absolute; right: 35px; top: 32px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.1); color: #dce7dc; }
.fridge-board-icon svg { width: 25px; height: 25px; }
.fridge-board .eyebrow { color: #b8c9b9; }
.fridge-board h2 { position: relative; z-index: 1; margin: 16px 0 25px; font-family: "Songti SC", serif; font-size: 26px; font-weight: 500; line-height: 1.6; letter-spacing: 1px; }
.fridge-stats { display: flex; gap: 0; margin-bottom: 25px; }
.fridge-stats > div { min-width: 100px; padding-right: 27px; margin-right: 27px; border-right: 1px solid rgba(255,255,255,.16); }
.fridge-stats > div:last-child { border: 0; }
.fridge-stats strong { display: block; font-family: "Songti SC", serif; font-size: 29px; font-weight: 500; line-height: 1; }
.fridge-stats span { display: block; margin-top: 8px; color: #b9c9ba; font-size: 10px; }
.fridge-match-button { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; width: 100%; height: 47px; padding: 0 16px; border: 0; border-radius: 11px; background: #fff; color: var(--green); font-size: 12px; font-weight: 600; transition: transform .2s, background .2s; }
.fridge-match-button > span { flex: 1; text-align: left; }
.fridge-match-button svg { width: 16px; }
.fridge-match-button:hover:not(:disabled) { transform: translateY(-2px); background: #f2f5ee; }
.fridge-match-button:disabled { cursor: not-allowed; opacity: .45; }
.fridge-board > p { margin: 10px 0 0; color: #aec1b1; font-size: 9px; text-align: center; }
.fridge-add-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.fridge-add-card .step-number svg { width: 16px; }
.fridge-field { display: block; margin-top: 18px; }
.fridge-field > span { display: block; margin-bottom: 7px; color: #818c80; font-size: 10px; }
.fridge-field input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #dfe4da; border-radius: 9px; outline: 0; background: #fafbf8; color: var(--ink); font-size: 12px; }
.fridge-field input:focus { border-color: #91a78e; box-shadow: 0 0 0 3px rgba(49,91,69,.06); }
.fridge-form-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.fridge-storage-hint { min-height: 30px; margin: 10px 0 12px; color: #929b8f; font-size: 9px; line-height: 1.6; }
.fridge-quick-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.fridge-quick-add > span { width: 100%; margin-bottom: 2px; color: #9aa297; font-size: 9px; }
.fridge-quick-add button { padding: 4px 8px; border: 1px solid #e4e8df; border-radius: 6px; background: #fff; color: #758271; font-size: 9px; }
.fridge-quick-add button:hover { border-color: #a6b59f; background: var(--sage); }
.fridge-add-card .primary-button { height: 43px; font-size: 11px; }
.fridge-inventory { margin-top: 35px; }
.local-save-label { color: #919a8e; font-size: 10px; white-space: nowrap; }
.fridge-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fridge-item { padding: 18px 19px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.fridge-item-top { display: flex; align-items: center; gap: 11px; }
.fridge-item-icon { display: grid; place-items: center; flex: 0 0 39px; height: 39px; border-radius: 11px; background: var(--sage); color: var(--green); }
.fridge-item-icon svg { width: 19px; }
.fridge-item-name { flex: 1; min-width: 0; }
.fridge-item-name h3 { margin: 0; font-family: "Songti SC", serif; font-size: 17px; font-weight: 600; }
.fridge-item-name p { margin: 4px 0 0; color: #969e93; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fridge-remove { display: grid; place-items: center; width: 29px; height: 29px; border: 0; border-radius: 8px; background: transparent; color: #adb3aa; }
.fridge-remove:hover { background: #f7ece6; color: #b67857; }
.fridge-remove svg { width: 15px; }
.fridge-expiry { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 17px; }
.fridge-expiry strong { color: var(--green); font-size: 12px; font-weight: 600; }
.fridge-expiry span { color: #949d91; font-size: 9px; }
.freshness-track { height: 4px; margin: 10px 0; border-radius: 4px; background: #edf0e9; overflow: hidden; }
.freshness-track i { display: block; height: 100%; border-radius: inherit; background: #8ea685; }
.fridge-item-foot { display: flex; justify-content: space-between; gap: 10px; color: #a0a79d; font-size: 9px; }
.fridge-item.freshness-soon { border-color: #ead8c5; background: #fffdfa; }
.freshness-soon .fridge-item-icon { background: var(--orange-soft); color: var(--orange); }
.freshness-soon .fridge-expiry strong { color: #b46d43; }
.freshness-soon .freshness-track i { background: #d59a71; }
.fridge-item.freshness-expired { background: #f4f4f1; }
.freshness-expired .fridge-item-icon { background: #e7e8e3; color: #939a90; }
.freshness-expired .fridge-expiry strong { color: #a17c70; }
.freshness-expired .freshness-track i { background: #b9a099; }
.fridge-empty { grid-column: 1/-1; padding: 42px 20px; border: 1px dashed #d5ddd0; border-radius: 16px; color: #96a092; text-align: center; }
.fridge-empty svg { width: 29px; height: 29px; margin-bottom: 10px; }
.fridge-empty h3 { margin: 0 0 7px; color: #748272; font-family: "Songti SC", serif; font-size: 17px; font-weight: 500; }
.fridge-empty p { margin: 0; font-size: 10px; }
.fridge-safety { display: flex; align-items: flex-start; gap: 6px; margin: 16px 0 0; color: #9aa197; font-size: 9px; line-height: 1.7; }
.fridge-safety svg { flex: 0 0 13px; width: 13px; margin-top: 1px; }

.app-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 55px; padding: 20px 0 0; border-top: 1px solid var(--line); color: #a0a69e; font-size: 9px; }
.app-footer span { display: flex; align-items: center; gap: 5px; }
.app-footer svg { width: 12px; height: 12px; }

.recipe-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(850px, calc(100vh - 42px)); padding: 0; border: 0; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px rgba(24,47,34,.25); overflow: auto; }
.recipe-dialog::backdrop { background: rgba(25,42,31,.55); backdrop-filter: blur(5px); }
.recipe-dialog[open] { animation: dialog-in .25s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(15px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-close { position: absolute; right: 18px; top: 18px; z-index: 5; display: grid; place-items: center; width: 35px; height: 35px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--green); backdrop-filter: blur(5px); }
.dialog-close svg { width: 18px; }
.detail-art { position: relative; min-height: 205px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 60px; background: var(--card-bg, #e8eee4); overflow: hidden; text-align: center; }
.detail-art::before { width: 180px; height: 180px; left: auto; right: -45px; top: -50px; transform: none; opacity: .7; }
.detail-art .tag-list { position: relative; z-index: 1; justify-content: center; }
.detail-art h2 { position: relative; z-index: 1; margin: 14px 0 9px; font-family: "Songti SC", serif; font-size: 35px; font-weight: 600; letter-spacing: 3px; color: var(--card-accent, var(--green)); }
.detail-art > p { position: relative; z-index: 1; margin: 0; color: #7b8778; font-size: 11px; }
.detail-body { padding: 27px 32px 34px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 27px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-stat { display: flex; align-items: center; justify-content: center; gap: 8px; border-right: 1px solid var(--line); }
.detail-stat:last-child { border: 0; }
.detail-stat svg { width: 19px; color: var(--orange); }
.detail-stat strong { display: block; font-size: 13px; }
.detail-stat small { display: block; margin-top: 3px; color: #9aa198; font-size: 9px; }
.detail-section { margin-top: 24px; }
.detail-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-family: "Songti SC", serif; font-size: 18px; font-weight: 600; }
.detail-section h3 svg { width: 17px; color: #82977c; }
.ingredient-groups { display: grid; gap: 9px; }
.ingredient-group { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 11px 13px; border-radius: 9px; background: #f7f8f4; font-size: 11px; line-height: 1.7; }
.ingredient-group > span { color: #8a9587; }
.ingredient-group p { margin: 0; color: #536458; }
.detail-steps { list-style: none; display: grid; gap: 15px; margin: 0; padding: 0; counter-reset: steps; }
.detail-steps li { display: grid; grid-template-columns: 27px 1fr; gap: 11px; color: #657268; font-size: 12px; line-height: 1.8; counter-increment: steps; }
.detail-steps li::before { content: counter(steps, decimal-leading-zero); display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: var(--sage); color: var(--green); font-size: 9px; font-weight: 600; }
.detail-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 25px; }
.detail-note { padding: 15px; border-radius: 11px; background: #f2f5ee; }
.detail-note:last-child { background: #faf3ed; }
.detail-note strong { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; color: #6d7e69; font-size: 11px; }
.detail-note:last-child strong { color: #a2765b; }
.detail-note svg { width: 14px; }
.detail-note p { margin: 0; color: #818b7e; font-size: 10px; line-height: 1.7; }
.detail-note:last-child p { color: #998778; }
.detail-calorie-note { margin: 20px 0 0; color: #a2a9a0; font-size: 9px; text-align: center; }
.dialog-loading { min-height: 400px; display: grid; place-items: center; color: #83917e; font-size: 12px; }
.spinner { display: inline-block; width: 18px; height: 18px; margin-right: 8px; border: 2px solid #d8e0d4; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border: 1px solid #dfe4da; border-radius: 8px; background: #fff; color: #6d7b6c; font-size: 10px; white-space: nowrap; transition: .2s; }
.ghost-button:hover { border-color: #9fb098; background: var(--sage); color: var(--green); }
.ghost-button svg { width: 13px; height: 13px; }
.tag-custom { color: #a06f4d !important; background: #f6e9dd !important; }

.import-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 42px)); padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px rgba(24,47,34,.25); overflow: auto; }
.import-dialog::backdrop { background: rgba(25,42,31,.55); backdrop-filter: blur(4px); }
.import-dialog[open] { animation: dialog-in .25s ease; }
.import-body { padding: 30px 30px 26px; }
.import-body h2 { margin: 12px 0 8px; font-family: "Songti SC", serif; font-size: 26px; font-weight: 600; }
.import-body > p { margin: 0 0 20px; color: #8d958c; font-size: 11px; line-height: 1.8; }
.import-file { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 1px dashed #cbd5c5; border-radius: 12px; background: #fafbf7; cursor: pointer; transition: .2s; }
.import-file:hover, .import-file.is-dragover { border-color: #8fa889; background: #f2f5ee; }
.import-file-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--sage); color: var(--green); }
.import-file-icon svg { width: 17px; height: 17px; }
.import-file strong { display: block; font-size: 12px; }
.import-file small { display: block; margin-top: 4px; color: #98a095; font-size: 9px; }
.import-or { position: relative; margin: 18px 0 12px; text-align: center; }
.import-or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #eceee8; }
.import-or span { position: relative; padding: 0 10px; background: #fff; color: #a3aa9f; font-size: 9px; }
.import-dialog textarea { width: 100%; min-height: 140px; padding: 12px; border: 1px solid #dfe4da; border-radius: 10px; outline: 0; background: #fafbf8; color: #4d5f52; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.7; resize: vertical; }
.import-dialog textarea:focus { border-color: #91a78e; box-shadow: 0 0 0 3px rgba(49,91,69,.06); }
.import-hint { display: flex; gap: 5px; margin: 10px 0 0 !important; color: #a0a79c !important; font-size: 9px !important; }
.import-hint svg { flex: 0 0 12px; width: 12px; height: 12px; }
.import-actions { display: flex; gap: 10px; margin-top: 18px; }
.import-actions .ghost-button { height: 44px; padding: 0 15px; }
.import-submit { flex: 1; height: 44px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; }
.import-submit:hover { background: var(--green-dark); }
.import-submit:disabled { opacity: .6; cursor: wait; }
.import-result { margin-top: 16px; padding: 13px 14px; border-radius: 10px; background: #f1f5ec; color: #5f715d; font-size: 10px; line-height: 1.7; }
.import-result strong { display: block; margin-bottom: 5px; font-size: 11px; color: var(--green); }
.import-result ul { margin: 0; padding-left: 15px; color: #8b7a68; }
.import-result p { margin: 3px 0 0; }
.import-result.is-error { background: #fbf1ea; color: #a86a4c; }
.detail-delete { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; margin-top: 22px; border: 1px solid #ecdbd1; border-radius: 9px; background: #fff; color: #ad7355; font-size: 10px; }
.detail-delete:hover { background: #fbf2ec; }
.detail-delete svg { width: 14px; height: 14px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 10px; background: #253e30; color: #fff; box-shadow: 0 10px 30px rgba(30,50,38,.2); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1450px) {
  .app-shell { grid-template-columns: 250px minmax(0,1fr); }
  .app-main { padding-left: 60px; padding-right: 60px; }
  .hero { gap: 75px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0,1fr); }
  .sidebar { padding-left: 18px; padding-right: 18px; }
  .app-main { padding-left: 30px; padding-right: 30px; }
  .hero { grid-template-columns: 1fr 310px; gap: 25px; }
  .hero h1 { font-size: 40px; }
  .entry-card { padding: 23px; gap: 13px; }
  .entry-icon { flex-basis: 38px; height: 38px; }
  .round-arrow { display: none; }
  .match-workspace { grid-template-columns: 1fr 230px; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-card { display: grid; grid-template-columns: 160px 1fr; column-gap: 20px; }
  .menu-card-top, .menu-card h3 { grid-column: 1; }
  .menu-dishes { grid-column: 2; grid-row: 1/4; }
  .menu-stats, .missing-row { grid-column: 1/-1; }
  .fridge-overview { grid-template-columns: minmax(0, 1fr) 300px; }
  .fridge-board { padding: 27px; }
  .fridge-stats > div { min-width: 80px; padding-right: 18px; margin-right: 18px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 12px 25px; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid #e1e5da; background: rgba(240,242,233,.95); backdrop-filter: blur(12px); }
  .brand { padding: 0; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
  .brand-mark svg { width: 21px; }
  .brand strong { font-size: 21px; }
  .brand small, .sidebar-note, .sidebar-foot { display: none; }
  .main-nav { display: flex; gap: 5px; margin: 0; }
  .nav-item { width: auto; padding: 9px 12px; font-size: 12px; }
  .nav-item svg { width: 16px; }
  .topbar { min-height: 58px; }
  .view { padding-top: 28px; }
  .hero { min-height: 310px; }
  .entry-grid { gap: 14px; }
  .entry-card { min-height: 190px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-recipes .recipe-card:last-child { display: none; }
  .match-workspace { grid-template-columns: 1fr; }
  .match-guide { display: none; }
  .meal-tabs button { grid-template-columns: 25px 1fr; }
  .meal-tabs button small { display: none; }
  .fridge-overview { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 650px) {
  .sidebar { padding: 10px 14px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 19px; letter-spacing: 3px; }
  .brand-mark { width: 33px; height: 33px; }
  .main-nav { gap: 2px; }
  .nav-item { padding: 9px; }
  .nav-item span { display: none; }
  .nav-item svg { width: 19px; height: 19px; }
  .nav-count { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px; font-size: 8px; }
  .app-main { padding: 0 18px 20px; }
  .topbar { min-height: 49px; font-size: 10px; }
  .topbar p { display: none; }
  .topbar-label { margin-left: auto; }
  .view { padding-top: 24px; }
  .hero { display: block; padding: 12px 0 25px; }
  .hero h1 { margin-top: 15px; font-size: 37px; line-height: 1.4; }
  .hero-copy > p { font-size: 12px; }
  .hero-copy > p br { display: none; }
  .hero-visual { display: none; }
  .text-link { margin-top: 20px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-card { min-height: 155px; padding: 24px 22px; }
  .entry-content > strong { font-size: 19px; }
  .round-arrow { display: grid; right: 18px; top: 20px; }
  .inspiration-section { margin-top: 34px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading .eyebrow { font-size: 8px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .home-recipes .recipe-card:last-child { display: block; }
  .recipe-card { display: grid; grid-template-columns: 115px 1fr; border-radius: 15px; }
  .recipe-art-button { height: 100%; min-height: 160px; }
  .recipe-art-button::before { width: 85px; height: 85px; }
  .recipe-art-button::after { display: none; }
  .dish-monogram { font-size: 23px; writing-mode: vertical-rl; letter-spacing: 4px; }
  .recipe-card-body { padding: 15px; min-width: 0; }
  .recipe-title-button strong { font-size: 18px; }
  .recipe-ingredients { min-height: 0; }
  .recipe-card-foot { margin-top: 10px; }
  .card-skeleton { height: 160px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 31px; line-height: 1.5; }
  .page-heading p { font-size: 12px; }
  .input-card { padding: 22px 18px; border-radius: 17px; }
  .input-card-heading { gap: 10px; }
  .input-card-heading p { line-height: 1.6; }
  .ingredient-input-wrap { height: 53px; padding: 0 12px; }
  .ingredient-input-wrap input { font-size: 13px; }
  .quick-ingredients { gap: 7px; }
  .input-help { align-items: flex-start; line-height: 1.6; }
  .menu-summary { align-items: flex-start; }
  .menu-summary > span { display: none; }
  .menu-card { display: block; padding: 20px; }
  .menu-dishes { margin-top: 0; }
  .meal-controls { padding: 14px; }
  .meal-tabs { gap: 7px; }
  .meal-tabs button { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 6px; text-align: center; }
  .meal-tabs button > span { font-size: 12px; }
  .meal-tabs button > svg { width: 18px; }
  .filter-row { display: block; margin-top: 14px; padding-top: 14px; }
  .filter-row > span { display: block; margin-bottom: 10px; }
  .filter-tags { gap: 6px; }
  .filter-tags button { padding: 6px 9px; }
  .results-heading { margin-top: 25px; }
  .results-heading h2 { font-size: 19px; }
  .results-heading > span { display: none; }
  .fridge-overview { grid-template-columns: 1fr; }
  .fridge-board { padding: 26px 22px; }
  .fridge-board h2 { font-size: 23px; }
  .fridge-board-icon { right: 22px; top: 23px; width: 40px; height: 40px; }
  .fridge-stats { justify-content: space-between; }
  .fridge-stats > div { min-width: 0; flex: 1; padding-right: 12px; margin-right: 12px; }
  .fridge-add-card { padding: 22px 19px; }
  .fridge-list { grid-template-columns: 1fr; }
  .local-save-label { font-size: 8px; }
  .fridge-item { padding: 16px; }
  .app-footer { display: block; margin-top: 38px; line-height: 1.7; }
  .app-footer > span:last-child { display: none; }
  .recipe-dialog { width: 100vw; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .import-dialog { width: 100vw; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .import-body { padding: 26px 18px 22px; }
  .import-body h2 { font-size: 23px; }
  .results-heading { flex-wrap: wrap; gap: 10px; }
  #openImport { margin-left: auto; }
  .detail-art { min-height: 180px; padding: 30px 45px; }
  .detail-art h2 { font-size: 30px; }
  .detail-body { padding: 23px 20px 28px; }
  .detail-stat strong { font-size: 11px; }
  .detail-notes { grid-template-columns: 1fr; }
  .detail-note { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
