:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --card: rgba(255, 255, 251, .88);
  --ink: #2f372f;
  --muted: #83877c;
  --line: #e8e6dc;
  --green: #608c70;
  --green-dark: #3d6a4d;
  --green-soft: #e4eee3;
  --rose: #d9778d;
  --rose-soft: #f8e7e9;
  --yellow: #f1d99b;
  --shadow: 0 18px 48px rgba(74, 77, 58, .08);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(96,140,112,.28); outline-offset: 2px; }
.ambient { position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(2px); opacity: .6; }
.ambient-one { width: 420px; height: 420px; top: -220px; right: -90px; background: radial-gradient(circle, #f6e1d4, transparent 70%); }
.ambient-two { width: 460px; height: 460px; bottom: -300px; left: -180px; background: radial-gradient(circle, #e0ecdc, transparent 70%); }
.app-shell { max-width: 1180px; padding: 26px 28px 56px; margin: 0 auto; }
.initial-loading { min-height: 60vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.loading-heart { font-size: 48px; color: var(--rose); animation: heartbeat 1.4s ease-in-out infinite; }
@keyframes heartbeat { 50% { transform: scale(1.12); } }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 17px; background: var(--rose-soft); color: var(--rose); font-size: 29px; box-shadow: inset 0 0 0 1px rgba(217,119,141,.08); }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: .3px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.member-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); font-size: 13px; color: #626b60; }
.member-dot { width: 8px; height: 8px; border-radius: 50%; background: #86b293; box-shadow: 0 0 0 3px #e4eee3; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.8); color: var(--muted); font-size: 17px; }
.navbar { display: flex; gap: 7px; padding: 6px; margin-bottom: 24px; border: 1px solid rgba(226,225,215,.9); border-radius: 18px; background: rgba(255,255,255,.56); width: fit-content; max-width: 100%; overflow-x: auto; }
.nav-button { border: 0; border-radius: 13px; padding: 10px 17px; background: transparent; color: #777c72; font-size: 13px; white-space: nowrap; transition: .2s ease; }
.nav-button:hover { background: #f0f1e9; color: var(--ink); }
.nav-button.active { background: var(--green); color: white; box-shadow: 0 4px 12px rgba(76,123,90,.18); }
.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; min-height: 300px; padding: 34px 38px; overflow: hidden; border-radius: 30px; background: linear-gradient(118deg, #e7efe1 0%, #f1f1df 55%, #f8e5e5 100%); box-shadow: var(--shadow); }
.hero:before { content: ""; position: absolute; width: 300px; height: 300px; right: 16%; top: -190px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; align-self: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.65); color: #61836a; font-size: 12px; font-weight: 650; letter-spacing: .4px; }
.hero h1 { max-width: 520px; margin: 16px 0 10px; font-size: clamp(29px, 4vw, 44px); line-height: 1.18; letter-spacing: -1.4px; font-weight: 750; }
.hero h1 span { color: var(--green-dark); }
.hero-copy p { max-width: 420px; margin: 0; color: #737b6e; font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 650; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(71,116,82,.19); }
.btn-primary:hover { background: var(--green-dark); }
.btn-light { background: rgba(255,255,255,.72); border-color: rgba(255,255,255,.85); color: #4e6250; }
.btn-quiet { background: transparent; border-color: var(--line); color: #6d756a; }
.btn-rose { background: var(--rose-soft); color: #a95167; border-color: #f2d7dd; }
.btn-danger { background: #fff0ee; color: #a84f4a; border-color: #f3d3d0; }
.btn-small { min-height: 32px; padding: 7px 10px; border-radius: 10px; font-size: 12px; }
.btn-full { width: 100%; }
.hero-art { position: relative; min-height: 220px; display: grid; place-items: center; }
.plate { position: relative; width: min(250px, 100%); aspect-ratio: 1; display: grid; place-items: center; border: 14px solid rgba(255,255,255,.75); border-radius: 50%; background: radial-gradient(circle, #fffdf6 0 48%, #f7e6d5 49% 56%, #fffdf6 57% 66%, #d7e4d3 67%); box-shadow: 0 24px 42px rgba(95,103,74,.12); transform: rotate(-7deg); }
.plate-emoji { font-size: clamp(76px, 10vw, 112px); filter: drop-shadow(0 8px 6px rgba(70,60,40,.08)); }
.floating-note { position: absolute; z-index: 1; display: flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.8); border-radius: 14px; background: rgba(255,255,255,.84); box-shadow: 0 12px 28px rgba(70,70,50,.09); color: #697565; font-size: 12px; }
.floating-note.note-top { top: 15px; right: 2px; transform: rotate(4deg); }
.floating-note.note-bottom { bottom: 8px; left: 0; transform: rotate(-4deg); }
.section { margin-top: 31px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 15px; }
.section-kicker { margin-bottom: 5px; color: var(--rose); font-size: 11px; font-weight: 750; letter-spacing: 1.3px; text-transform: uppercase; }
.section-title { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.section-description { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.text-link { padding: 6px 0; border: 0; background: transparent; color: var(--green-dark); font-size: 13px; font-weight: 650; white-space: nowrap; }
.grid { display: grid; gap: 15px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { position: relative; min-height: 150px; padding: 20px; overflow: hidden; border: 1px solid rgba(231,229,218,.9); border-radius: 22px; background: var(--card); box-shadow: 0 8px 25px rgba(74,77,58,.035); text-align: left; }
.feature-card:after { content: ""; position: absolute; width: 100px; height: 100px; right: -28px; bottom: -32px; border-radius: 50%; background: rgba(223,235,220,.7); }
.feature-card.pink:after { background: rgba(248,222,226,.72); }
.feature-card.yellow:after { background: rgba(247,232,189,.75); }
.feature-card .feature-emoji { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 15px; border-radius: 14px; background: #edf3e9; font-size: 24px; }
.feature-card.pink .feature-emoji { background: #fbeded; }
.feature-card.yellow .feature-emoji { background: #fbf3d9; }
.feature-card strong { position: relative; z-index: 1; display: block; margin-bottom: 6px; font-size: 15px; }
.feature-card small { position: relative; z-index: 1; display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.filter-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px; margin-top: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.66); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { color: #777d71; font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea, .input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #e5e4da; border-radius: 12px; outline: none; background: #fffefa; color: var(--ink); font-size: 13px; }
.field textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #b2b4aa; }
.field-hint { color: #9a9d92; font-size: 11px; line-height: 1.5; }
.decision-result { margin-top: 18px; padding: 22px; border: 1px solid #e8e9de; border-radius: 24px; background: rgba(255,255,251,.92); box-shadow: var(--shadow); }
.result-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 18px; }
.result-head h3 { margin: 0; font-size: 20px; }
.result-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.result-metrics { display: flex; flex-wrap: wrap; gap: 7px; }
.metric { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; background: #f1f3eb; color: #637260; font-size: 11px; white-space: nowrap; }
.meal-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.meal-item { min-width: 0; overflow: hidden; border: 1px solid #eae8df; border-radius: 18px; background: #fff; }
.meal-item-art { position: relative; display: grid; place-items: center; min-height: 112px; background: linear-gradient(135deg, #f2f2e6, #f9e7df); }
.meal-item:nth-child(3n+2) .meal-item-art { background: linear-gradient(135deg, #e7eee1, #f8eedb); }
.meal-item:nth-child(3n+3) .meal-item-art { background: linear-gradient(135deg, #f9e9eb, #f6f0de); }
.meal-item-art .food-emoji { font-size: 54px; filter: drop-shadow(0 7px 5px rgba(80,70,50,.1)); }
.role-pill { position: absolute; top: 9px; left: 9px; padding: 5px 7px; border-radius: 8px; background: rgba(255,255,255,.8); color: #6b7869; font-size: 10px; }
.meal-item-body { padding: 13px; }
.meal-item-title { margin: 0; font-size: 14px; line-height: 1.4; }
.meal-item-meta { display: flex; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.meal-item-actions { display: flex; justify-content: space-between; gap: 6px; margin-top: 12px; }
.result-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #efeee7; }
.result-footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.result-footer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recipe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.recipe-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,251,.88); transition: transform .18s ease, box-shadow .18s ease; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74,77,58,.08); }
.recipe-art { position: relative; display: grid; place-items: center; min-height: 124px; background: linear-gradient(135deg, #f3f0df, #f8e6df); }
.recipe-card:nth-child(4n+2) .recipe-art { background: linear-gradient(135deg, #e6efdf, #f8f0d9); }
.recipe-card:nth-child(4n+3) .recipe-art { background: linear-gradient(135deg, #f8e4e7, #f7eedb); }
.recipe-card:nth-child(4n+4) .recipe-art { background: linear-gradient(135deg, #e5ecee, #f8e6da); }
.recipe-art .food-emoji { font-size: 53px; filter: drop-shadow(0 7px 5px rgba(80,70,50,.1)); }
.heart-toggle { position: absolute; top: 9px; right: 9px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(255,255,255,.85); color: #a7aaa0; font-size: 16px; }
.heart-toggle.active { color: var(--rose); background: #fff5f5; }
.recipe-card-body { padding: 13px; }
.recipe-title-row { display: flex; justify-content: space-between; align-items: start; gap: 7px; }
.recipe-title { margin: 0; font-size: 14px; line-height: 1.45; }
.recipe-desc { min-height: 32px; margin: 6px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 6px; color: #7b8175; font-size: 10px; }
.tag { display: inline-flex; align-items: center; padding: 5px 7px; border-radius: 7px; background: #f0f2e9; color: #74816e; font-size: 10px; }
.tag.rose { background: #f9e9eb; color: #b56a7b; }
.card-actions { display: flex; gap: 7px; margin-top: 12px; }
.card-actions .btn { flex: 1; }
.search-row { display: flex; gap: 10px; width: 100%; }
.search-row input { flex: 1; min-width: 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 15px 0 19px; }
.chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); color: #7b8075; font-size: 12px; }
.chip.active { border-color: #b8cfb8; background: var(--green-soft); color: var(--green-dark); font-weight: 650; }
.empty-state { padding: 36px 18px; border: 1px dashed #dcded2; border-radius: 20px; background: rgba(255,255,255,.45); text-align: center; color: var(--muted); }
.empty-state .empty-emoji { margin-bottom: 9px; font-size: 34px; }
.empty-state strong { display: block; margin-bottom: 6px; color: #606b5d; font-size: 15px; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.7; }
.content-panel { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,251,.84); }
.history-list { display: grid; gap: 12px; }
.history-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,251,.88); }
.history-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.history-date { color: var(--muted); font-size: 12px; }
.history-title { margin: 5px 0 0; font-size: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: #e8f0e5; color: #5d8265; font-size: 11px; white-space: nowrap; }
.status-pill.pending { background: #faf0d7; color: #9b7c37; }
.history-dishes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.history-dish { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: #f5f4ec; color: #697263; font-size: 12px; }
.history-notes { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.space-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.panel-title-row h3 { margin: 0; font-size: 16px; }
.panel-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.member-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.member-card { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 15px; background: #f2f4ec; }
.member-avatar { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 39px; border-radius: 14px; background: #e2ebdc; font-size: 20px; }
.member-card:nth-child(2) .member-avatar { background: #f8e2e6; }
.member-name { font-size: 13px; font-weight: 700; }
.member-role { margin-top: 4px; color: var(--muted); font-size: 11px; }
.shopping-list { display: grid; gap: 8px; }
.shopping-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0efe8; }
.shopping-row:last-child { border-bottom: 0; }
.shopping-row input[type=checkbox] { accent-color: var(--green); width: 16px; height: 16px; }
.shopping-name { flex: 1; font-size: 13px; }
.shopping-name.done { color: #a4a89d; text-decoration: line-through; }
.shopping-amount { color: var(--muted); font-size: 11px; }
.pref-form { display: grid; gap: 13px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(37,45,37,.38); backdrop-filter: blur(7px); }
.modal { width: min(620px, 100%); max-height: min(86vh, 900px); overflow: auto; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: #fffef9; box-shadow: 0 25px 80px rgba(31,40,30,.25); }
.modal-header { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding: 22px 24px 16px; border-bottom: 1px solid #efeee6; }
.modal-header h2 { margin: 0; font-size: 21px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-body { padding: 22px 24px 24px; }
.detail-hero { display: flex; align-items: center; gap: 17px; padding: 15px; border-radius: 18px; background: linear-gradient(120deg, #f0f2e8, #f9e9e6); }
.detail-emoji { display: grid; place-items: center; width: 78px; height: 78px; flex: 0 0 78px; border-radius: 22px; background: rgba(255,255,255,.7); font-size: 45px; }
.detail-title { margin: 0; font-size: 20px; }
.detail-subtitle { margin-top: 7px; color: var(--muted); font-size: 12px; }
.detail-section { margin-top: 20px; }
.detail-section h3 { margin: 0 0 10px; font-size: 14px; }
.ingredient-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ingredient-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; background: #f7f6f0; font-size: 12px; }
.ingredient-row span:last-child { color: var(--muted); }
.steps-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps-list li { position: relative; min-height: 30px; padding-left: 36px; color: #646c60; font-size: 13px; line-height: 1.7; counter-increment: step; }
.steps-list li:before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; background: #e8efe3; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toast { position: fixed; z-index: 50; bottom: 22px; left: 50%; max-width: calc(100vw - 30px); padding: 12px 17px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: #334b38; color: #fff; box-shadow: 0 10px 30px rgba(40,55,40,.22); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-wrap { display: grid; grid-template-columns: 1fr .9fr; gap: 28px; min-height: 80vh; align-items: center; }
.auth-story { padding: 20px 10px; }
.auth-story .brand-mark { margin-bottom: 24px; }
.auth-story h1 { max-width: 500px; margin: 0 0 13px; font-size: clamp(32px, 5vw, 52px); line-height: 1.15; letter-spacing: -1.5px; }
.auth-story h1 span { color: var(--green-dark); }
.auth-story p { max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-quote { margin-top: 28px; padding: 17px; border-left: 3px solid #d9b4bc; border-radius: 0 13px 13px 0; background: rgba(255,255,255,.6); color: #777d70; font-size: 13px; line-height: 1.8; }
.auth-card { padding: 28px; border: 1px solid rgba(230,228,218,.9); border-radius: 27px; background: rgba(255,255,251,.9); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0; font-size: 22px; }
.auth-card .auth-intro { margin: 8px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-form { display: grid; gap: 14px; }
.auth-footnote { margin-top: 16px; color: #9a9e93; font-size: 11px; line-height: 1.7; }
.page-title-row { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 20px; }
.page-title-row h1 { margin: 0; font-size: 27px; letter-spacing: -.8px; }
.page-title-row p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.subtle-rule { height: 1px; margin: 18px 0; background: var(--line); }
.small-muted { color: var(--muted); font-size: 11px; line-height: 1.6; }
.footer-note { margin-top: 34px; text-align: center; color: #a0a398; font-size: 11px; }
@media (max-width: 920px) {
  .app-shell { padding: 22px 20px 42px; }
  .hero { grid-template-columns: 1.1fr .9fr; padding: 28px; }
  .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { gap: 11px; }
  .feature-card { padding: 16px; }
}
@media (max-width: 680px) {
  .app-shell { padding: 16px 14px 34px; }
  .topbar { margin-bottom: 18px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; font-size: 25px; }
  .brand-name { font-size: 17px; }
  .brand-subtitle { font-size: 10px; }
  .member-pill { padding: 7px 9px; font-size: 11px; }
  .top-actions { gap: 6px; }
  .navbar { width: 100%; margin-bottom: 18px; border-radius: 15px; }
  .nav-button { flex: 1; padding: 10px 11px; font-size: 12px; }
  .hero { display: block; min-height: auto; padding: 25px 22px 20px; border-radius: 24px; }
  .hero h1 { margin-top: 13px; font-size: 31px; }
  .hero-copy p { font-size: 13px; }
  .hero-actions { margin-top: 18px; }
  .hero-art { min-height: 185px; margin-top: 6px; }
  .plate { width: 168px; border-width: 9px; }
  .plate-emoji { font-size: 75px; }
  .floating-note { padding: 8px 10px; font-size: 10px; }
  .floating-note.note-top { top: 5px; right: 5px; }
  .floating-note.note-bottom { bottom: 3px; left: 7px; }
  .section { margin-top: 25px; }
  .section-title { font-size: 19px; }
  .section-heading { align-items: start; }
  .grid-3 { grid-template-columns: 1fr; }
  .feature-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 13px; min-height: auto; padding: 15px; }
  .feature-card .feature-emoji { grid-row: span 2; margin: 0; }
  .feature-card strong { align-self: end; }
  .feature-card small { align-self: start; }
  .filter-panel { gap: 10px; padding: 13px; border-radius: 17px; }
  .field input, .field select, .field textarea, .input { padding: 10px; }
  .decision-result { padding: 15px; border-radius: 19px; }
  .result-head { display: block; }
  .result-metrics { margin-top: 12px; }
  .meal-items { grid-template-columns: 1fr 1fr; gap: 9px; }
  .meal-item-art { min-height: 95px; }
  .meal-item-art .food-emoji { font-size: 43px; }
  .meal-item-body { padding: 10px; }
  .meal-item-title { font-size: 13px; }
  .meal-item-actions .btn { padding: 6px 7px; font-size: 10px; }
  .result-footer { display: block; }
  .result-footer-actions { margin-top: 12px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .recipe-art { min-height: 105px; }
  .recipe-art .food-emoji { font-size: 44px; }
  .recipe-card-body { padding: 10px; }
  .recipe-title { font-size: 13px; }
  .recipe-desc { min-height: 30px; font-size: 10px; }
  .card-actions .btn { font-size: 10px; padding: 7px 6px; }
  .space-grid { grid-template-columns: 1fr; }
  .member-cards { gap: 7px; }
  .member-card { padding: 10px; gap: 8px; }
  .member-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 17px; }
  .content-panel { padding: 16px; }
  .inline-form { grid-template-columns: 1fr; }
  .auth-wrap { display: block; min-height: auto; padding-top: 14px; }
  .auth-story { padding: 8px 4px 20px; }
  .auth-story .brand-mark { margin-bottom: 16px; }
  .auth-story h1 { font-size: 34px; }
  .auth-story p { margin-bottom: 0; font-size: 13px; }
  .auth-quote { display: none; }
  .auth-card { padding: 21px; border-radius: 22px; }
  .page-title-row { align-items: start; }
  .page-title-row h1 { font-size: 23px; }
  .ingredient-list { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 9px; align-items: end; }
  .modal { max-height: 88vh; border-radius: 22px 22px 14px 14px; }
  .modal-header { padding: 18px 18px 13px; }
  .modal-body { padding: 16px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* iPhone-first refinements: designed around the 402pt-wide iPhone 17 viewport. */
.nav-icon, .nav-mobile-label { display: none; }

@media (max-width: 680px) {
  html { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
  .app-shell {
    width: 100%;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(104px + env(safe-area-inset-bottom));
  }
  .topbar { gap: 9px; margin-bottom: 15px; }
  .brand { gap: 9px; }
  .brand-mark { width: 39px; height: 39px; flex-basis: 39px; font-size: 23px; }
  .brand-name { font-size: 16px; letter-spacing: -.35px; }
  .brand-subtitle { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .top-actions { flex-shrink: 0; }
  .member-pill { gap: 6px; padding: 7px 9px; font-size: 11px; }
  .topbar .icon-button { width: 40px; height: 40px; }

  /* Thumb-friendly bottom navigation stays above the iOS home indicator. */
  .navbar {
    position: fixed;
    z-index: 25;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    width: calc(100% - 20px);
    max-width: 480px;
    gap: 5px;
    justify-content: space-around;
    margin: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border: 1px solid rgba(226,225,215,.9);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: rgba(255,255,251,.94);
    box-shadow: 0 -8px 28px rgba(54,65,48,.09);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    overflow: visible;
  }
  .nav-button {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 49px;
    padding: 5px 3px;
    border-radius: 13px;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .nav-icon { display: block; font-size: 20px; line-height: 1; }
  .nav-mobile-label { display: block; }
  .nav-desktop-label { display: none; }

  /* Keep the main decision action visible without making the hero too tall. */
  .hero {
    display: block;
    min-height: 0;
    padding: 21px 18px 18px;
    border-radius: 23px;
  }
  .hero-copy { width: 100%; }
  .hero .eyebrow { padding: 6px 9px; font-size: 10px; }
  .hero h1 { margin: 12px 0 8px; font-size: 29px; line-height: 1.22; letter-spacing: -.9px; }
  .hero-copy p { max-width: 32em; font-size: 12px; line-height: 1.65; }
  .hero-actions { display: flex; margin-top: 15px; }
  .hero-actions .btn-primary { width: 100%; min-height: 48px; font-size: 14px; }
  .hero-actions .btn-light { display: none; }
  .hero-art { display: none; }
  .section { margin-top: 20px; }
  .section-heading { gap: 10px; margin-bottom: 12px; }
  .section-kicker { font-size: 10px; letter-spacing: 1px; }
  .section-title { font-size: 18px; }
  .section-description { font-size: 12px; line-height: 1.55; }

  /* Preferences are optional; one tap opens the compact controls. */
  .filter-details {
    margin-top: 13px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(255,255,255,.72);
  }
  .filter-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 49px;
    padding: 12px 14px;
    color: #596b57;
    font-size: 13px;
    font-weight: 650;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .filter-details > summary::-webkit-details-marker { display: none; }
  .filter-summary-sub { color: #92978a; font-size: 10px; font-weight: 450; white-space: nowrap; }
  .filter-details[open] > summary { border-bottom: 1px solid var(--line); }
  .filter-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 10px;
    margin: 0;
    padding: 13px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .field { gap: 6px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea, .input {
    min-height: 46px;
    padding: 10px 11px;
    border-radius: 12px;
    font-size: 16px; /* prevents Safari auto-zoom when focusing inputs */
  }
  .field textarea { min-height: 92px; }
  .filter-panel .field-hint { font-size: 10px; }
  .filter-panel .field:nth-last-child(1) { grid-column: 1 / -1; }
  .filter-panel .field:nth-last-child(2) { grid-column: 1 / -1; }

  .btn { min-height: 44px; padding: 11px 14px; border-radius: 13px; }
  .btn-small { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .text-link { min-height: 40px; padding: 8px 0; }
  .decision-result { margin-top: 13px; padding: 13px; border-radius: 19px; }
  .result-head h3 { font-size: 18px; line-height: 1.35; }
  .result-head p { font-size: 12px; line-height: 1.55; }
  .result-metrics { gap: 6px; }
  .metric { padding: 7px 9px; font-size: 11px; }
  .meal-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .meal-item { border-radius: 15px; }
  .meal-item-art { min-height: 91px; }
  .meal-item-art .food-emoji { font-size: 42px; }
  .role-pill { top: 7px; left: 7px; padding: 4px 6px; font-size: 10px; }
  .meal-item-body { padding: 10px; }
  .meal-item-title { font-size: 13px; }
  .meal-item-meta { flex-wrap: wrap; gap: 5px; font-size: 10px; }
  .meal-item-actions { gap: 5px; }
  .meal-item-actions .btn { flex: 1; min-width: 0; min-height: 38px; padding: 7px 5px; font-size: 11px; }
  .result-footer { display: block; }
  .result-footer p { font-size: 11px; }
  .result-footer-actions { display: grid; grid-template-columns: 1fr; margin-top: 12px; }
  .result-footer-actions .btn { width: 100%; }

  .grid-3 { grid-template-columns: 1fr; gap: 9px; }
  .feature-card { min-height: 76px; padding: 13px; border-radius: 17px; }
  .feature-card .feature-emoji { width: 42px; height: 42px; border-radius: 13px; font-size: 22px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .recipe-card { border-radius: 16px; }
  .recipe-art { min-height: 100px; }
  .recipe-art .food-emoji { font-size: 43px; }
  .heart-toggle { width: 38px; height: 38px; font-size: 18px; }
  .recipe-card-body { padding: 10px; }
  .recipe-title { font-size: 13px; line-height: 1.4; }
  .recipe-desc { min-height: 31px; margin: 5px 0 9px; font-size: 11px; line-height: 1.5; }
  .recipe-meta { gap: 5px; font-size: 10px; }
  .card-actions { gap: 6px; }
  .card-actions .btn { min-height: 40px; padding: 7px 5px; font-size: 11px; }
  .chips { gap: 6px; margin: 12px 0 16px; }
  .chip { min-height: 36px; padding: 8px 11px; }

  .page-title-row { flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
  .page-title-row h1 { font-size: 24px; }
  .page-title-row > .btn { width: 100%; }
  .search-row { gap: 8px; }
  .search-row .btn { min-width: 65px; }
  .content-panel { padding: 14px; border-radius: 18px; }
  .space-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .member-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-card { min-width: 0; }
  .member-name { overflow-wrap: anywhere; }
  .shopping-row { gap: 8px; }
  .shopping-row input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; }
  .history-card { padding: 14px; border-radius: 17px; }
  .history-head { align-items: start; }
  .history-title { font-size: 15px; }
  .history-dishes { gap: 6px; }
  .history-dish { font-size: 11px; }
  .auth-wrap { padding-top: 5px; }
  .auth-story h1 { font-size: 32px; }
  .auth-card { padding: 19px; }
  .auth-card .auth-intro { font-size: 13px; }
  .auth-form { gap: 13px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: min(88dvh, 900px); border-radius: 23px 23px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-header { padding: 17px 17px 13px; }
  .modal-body { padding: 15px 17px calc(20px + env(safe-area-inset-bottom)); }
  .detail-hero { gap: 12px; padding: 12px; }
  .detail-emoji { width: 66px; height: 66px; flex-basis: 66px; border-radius: 18px; font-size: 38px; }
  .detail-title { font-size: 18px; }
  .ingredient-list { grid-template-columns: 1fr; }
  .modal-actions .btn { flex: 1 1 calc(50% - 8px); }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 28px); font-size: 12px; }
  .footer-note { margin-top: 24px; padding-bottom: 8px; font-size: 10px; }
}

@media (max-width: 370px) {
  .app-shell { padding-left: 11px; padding-right: 11px; }
  .brand-subtitle { max-width: 150px; }
  .hero { padding: 19px 15px 16px; }
  .filter-panel { gap: 10px 8px; padding: 11px; }
  .meal-item-actions .btn { font-size: 10px; }
  .recipe-grid { gap: 8px; }
  .recipe-card-body { padding: 8px; }
  .nav-button { font-size: 9px; }
}

.filter-details > summary { cursor: pointer; color: #596b57; font-weight: 650; }
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-summary-sub { color: #92978a; font-size: 11px; font-weight: 450; }

/* iOS-inspired app skin: system typography, layered surfaces, glass materials and native-feeling controls. */
:root {
  color-scheme: light dark;
  --paper: #f2f2f7;
  --card: rgba(255,255,255,.92);
  --ink: #1c1c1e;
  --muted: #8e8e93;
  --line: rgba(60,60,67,.12);
  --green: #34c759;
  --green-dark: #248a3d;
  --green-soft: #e5f8e9;
  --rose: #ff375f;
  --rose-soft: #ffe5eb;
  --yellow: #ffd60a;
  --shadow: 0 8px 28px rgba(28,28,30,.055);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html, body { background: var(--paper); color: var(--ink); }
body { background-image: radial-gradient(ellipse at 100% 0%, rgba(52,199,89,.055), transparent 34%), radial-gradient(ellipse at 0% 52%, rgba(255,55,95,.035), transparent 32%); }
button, input, select, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(52,199,89,.28); outline-offset: 2px; }
.ambient { filter: blur(30px); opacity: .42; }
.ambient-one { background: radial-gradient(circle, rgba(52,199,89,.14), transparent 68%); }
.ambient-two { background: radial-gradient(circle, rgba(255,55,95,.09), transparent 68%); }
.app-shell { max-width: 940px; padding-top: 24px; }
.topbar { gap: 14px; margin-bottom: 20px; }
.brand { gap: 11px; }
.brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 15px; background: linear-gradient(145deg,#ffe6ec,#ffd5df); color: #ff375f; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 5px 15px rgba(255,55,95,.1); }
.brand-name { font-family: inherit; font-size: 18px; font-weight: 760; letter-spacing: -.55px; }
.brand-subtitle { max-width: 300px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { gap: 8px; }
.member-pill { padding: 8px 11px; border: 1px solid rgba(255,255,255,.82); background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: #636366; font-size: 12px; }
.member-dot { background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.13); }
.icon-button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.68); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: #636366; transition: transform .18s ease, background .18s ease; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.navbar { gap: 5px; padding: 5px; border: 1px solid rgba(255,255,255,.8); border-radius: 19px; background: rgba(255,255,255,.58); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 5px 18px rgba(28,28,30,.035); }
.nav-button { min-height: 42px; padding: 10px 17px; border-radius: 14px; color: #636366; font-weight: 600; }
.nav-button.active { background: rgba(52,199,89,.13); color: #248a3d; box-shadow: inset 0 0 0 1px rgba(52,199,89,.08); }
.nav-button:hover { background: rgba(52,199,89,.09); color: #248a3d; }
.nav-icon svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hero { border: 1px solid rgba(255,255,255,.82); border-radius: 30px; background: linear-gradient(135deg,rgba(255,255,255,.97) 0%,rgba(239,250,239,.94) 55%,rgba(255,239,243,.92) 100%); box-shadow: 0 14px 38px rgba(28,28,30,.065), inset 0 1px 0 rgba(255,255,255,.9); }
.hero:before { border-color: rgba(255,255,255,.82); }
.hero h1 { font-family: inherit; font-weight: 780; letter-spacing: -1.2px; }
.hero h1 span { color: #248a3d; }
.hero-copy p { color: #6e746e; }
.eyebrow { border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.65); color: #248a3d; font-size: 11px; font-weight: 700; }
.btn { min-height: 44px; border-radius: 14px; font-size: 13px; font-weight: 650; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, filter .16s ease; }
.btn:active, .icon-button:active, .nav-button:active, .chip:active, .heart-toggle:active { transform: scale(.97); }
.btn-primary { background: #34c759; color: #fff; box-shadow: 0 5px 13px rgba(52,199,89,.22); }
.btn-primary:hover { background: #28b84e; }
.btn-light { border-color: rgba(255,255,255,.86); background: rgba(255,255,255,.76); color: #248a3d; }
.btn-quiet { border-color: var(--line); background: rgba(120,120,128,.06); color: #636366; }
.btn-rose { border-color: rgba(255,55,95,.12); background: var(--rose-soft); color: #d91c48; }
.btn-danger { border-color: rgba(255,59,48,.12); background: #fff0ef; color: #d92d20; }
.section { margin-top: 27px; }
.section-kicker { color: #8e8e93; font-size: 10px; letter-spacing: 1.05px; }
.section-title { font-size: 21px; font-weight: 740; letter-spacing: -.45px; }
.section-description { color: var(--muted); }
.text-link { color: #248a3d; }
.feature-card { border-color: rgba(255,255,255,.88); border-radius: 23px; background: rgba(255,255,255,.78); box-shadow: 0 7px 24px rgba(28,28,30,.035), inset 0 1px 0 rgba(255,255,255,.9); }
.feature-card .feature-emoji { border-radius: 15px; background: #e8f8eb; }
.feature-card.pink .feature-emoji { background: #ffe8ed; }
.feature-card.yellow .feature-emoji { background: #fff5ce; }
.feature-card:after { opacity: .52; }
.filter-details { margin-top: 15px; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; background: rgba(255,255,255,.72); box-shadow: 0 4px 18px rgba(28,28,30,.025); }
.filter-details > summary { min-height: 48px; padding: 12px 15px; color: #248a3d; font-size: 13px; }
.filter-summary-sub { color: #8e8e93; }
.filter-details[open] > summary { border-bottom-color: var(--line); }
.filter-panel { border: 0; background: transparent; }
.field label { color: #636366; font-size: 12px; }
.field input, .field select, .field textarea, .input { border-color: rgba(60,60,67,.13); border-radius: 13px; background: rgba(255,255,255,.94); color: #1c1c1e; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: rgba(52,199,89,.55); box-shadow: 0 0 0 3px rgba(52,199,89,.1); }
.field-hint { color: #8e8e93; }
.decision-result { border: 1px solid rgba(255,255,255,.9); border-radius: 27px; background: rgba(255,255,255,.91); box-shadow: 0 8px 28px rgba(28,28,30,.055), inset 0 1px 0 rgba(255,255,255,.9); }
.result-head h3 { font-size: 20px; font-weight: 760; letter-spacing: -.4px; }
.metric { background: #f2f2f7; color: #636366; }
.meal-item { border-color: rgba(60,60,67,.09); border-radius: 20px; background: #fff; box-shadow: 0 3px 10px rgba(28,28,30,.025); }
.meal-item-art { background: linear-gradient(145deg,#f5f5f7,#edf8ed); }
.meal-item:nth-child(3n+2) .meal-item-art { background: linear-gradient(145deg,#edf8ed,#fff6df); }
.meal-item:nth-child(3n+3) .meal-item-art { background: linear-gradient(145deg,#fff0f3,#f5f5f7); }
.role-pill { border: 1px solid rgba(255,255,255,.78); background: rgba(255,255,255,.76); color: #636366; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.result-footer { border-top-color: var(--line); }
.recipe-card { border-color: rgba(60,60,67,.09); border-radius: 21px; background: rgba(255,255,255,.91); box-shadow: 0 4px 16px rgba(28,28,30,.025); }
.recipe-art { background: linear-gradient(145deg,#f2f2f7,#f8f8f8); }
.recipe-card:nth-child(4n+2) .recipe-art { background: linear-gradient(145deg,#eaf8ed,#f4f7ee); }
.recipe-card:nth-child(4n+3) .recipe-art { background: linear-gradient(145deg,#fff0f3,#f7f2f3); }
.recipe-card:nth-child(4n+4) .recipe-art { background: linear-gradient(145deg,#eaf4f8,#f7f3ed); }
.heart-toggle { box-shadow: 0 2px 8px rgba(28,28,30,.05); }
.tag { border-radius: 999px; background: #f2f2f7; color: #636366; }
.tag.rose { background: #ffe8ed; color: #d91c48; }
.chip { border-color: rgba(60,60,67,.12); background: rgba(255,255,255,.74); color: #636366; transition: transform .16s ease, background .16s ease; }
.chip.active { border-color: rgba(52,199,89,.18); background: #e5f8e9; color: #248a3d; }
.empty-state { border-color: rgba(60,60,67,.17); border-radius: 22px; background: rgba(255,255,255,.55); }
.empty-state strong { color: #3a3a3c; }
.content-panel, .history-card { border-color: rgba(60,60,67,.09); border-radius: 23px; background: rgba(255,255,255,.87); box-shadow: 0 5px 20px rgba(28,28,30,.025); }
.status-pill { background: #e5f8e9; color: #248a3d; }
.status-pill.pending { background: #fff5ce; color: #8a6d00; }
.member-card { border: 1px solid rgba(60,60,67,.04); background: #f2f2f7; }
.member-avatar { background: #e5f8e9; }
.member-card:nth-child(2) .member-avatar { background: #ffe5eb; }
.shopping-row { border-bottom-color: var(--line); }
.shopping-row input[type=checkbox] { accent-color: #34c759; }
.modal-backdrop { background: rgba(22,22,24,.34); -webkit-backdrop-filter: blur(14px) saturate(125%); backdrop-filter: blur(14px) saturate(125%); }
.modal { border-color: rgba(255,255,255,.7); border-radius: 27px; background: rgba(255,255,255,.96); box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.modal-header { border-bottom-color: var(--line); }
.detail-hero { border: 1px solid rgba(255,255,255,.8); border-radius: 21px; background: linear-gradient(135deg,#edf8ed,#fff0f3); }
.ingredient-row { border-radius: 12px; background: #f2f2f7; }
.steps-list li:before { border-radius: 50%; background: #e5f8e9; color: #248a3d; }
.toast { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(35,35,38,.92); box-shadow: 0 8px 28px rgba(0,0,0,.18); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.auth-card { border: 1px solid rgba(255,255,255,.88); border-radius: 28px; background: rgba(255,255,255,.82); box-shadow: 0 14px 40px rgba(28,28,30,.06), inset 0 1px 0 rgba(255,255,255,.9); }
.auth-story h1 { font-family: inherit; font-weight: 780; }
.auth-story h1 span { color: #248a3d; }
.auth-quote { border-left-color: #ffb6c5; border-radius: 0 15px 15px 0; background: rgba(255,255,255,.58); }

@media (max-width: 680px) {
  .app-shell { padding: calc(12px + env(safe-area-inset-top)) 14px calc(116px + env(safe-area-inset-bottom)); }
  .topbar { gap: 8px; margin-bottom: 17px; }
  .brand { gap: 9px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 14px; font-size: 24px; }
  .brand-name { font-size: 17px; }
  .brand-subtitle { max-width: 205px; font-size: 10px; }
  .member-pill { padding: 7px 9px; font-size: 11px; }
  .topbar .icon-button { width: 38px; height: 38px; }
  .navbar {
    position: fixed;
    z-index: 25;
    left: 50%;
    bottom: calc(9px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex;
    width: calc(100% - 28px);
    max-width: 440px;
    justify-content: space-around;
    gap: 5px;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 27px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 8px 34px rgba(28,28,30,.13), inset 0 1px 0 rgba(255,255,255,.88);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    backdrop-filter: blur(30px) saturate(190%);
    overflow: visible;
  }
  .nav-button { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 49px; padding: 5px 3px; border-radius: 18px; color: #8e8e93; font-size: 10px; font-weight: 600; line-height: 1.1; }
  .nav-button.active { background: rgba(52,199,89,.12); color: #248a3d; box-shadow: none; }
  .nav-icon { display: grid; place-items: center; }
  .nav-icon svg { width: 23px; height: 23px; stroke-width: 1.8; }
  .nav-mobile-label { display: block; }
  .nav-desktop-label { display: none; }
  .hero { padding: 22px 19px 19px; border-radius: 27px; }
  .hero .eyebrow { padding: 6px 9px; font-size: 10px; }
  .hero h1 { margin: 13px 0 9px; font-size: 30px; line-height: 1.2; letter-spacing: -1px; }
  .hero-copy p { color: #6e746e; font-size: 12px; line-height: 1.7; }
  .hero-actions { margin-top: 17px; }
  .hero-actions .btn-primary { min-height: 49px; border-radius: 16px; font-size: 14px; box-shadow: 0 7px 17px rgba(52,199,89,.23); }
  .hero-actions .btn-light { border-color: rgba(60,60,67,.08); }
  .hero-art { display: none; }
  .section { margin-top: 23px; }
  .section-kicker { display: none; }
  .section-heading { align-items: center; gap: 9px; margin-bottom: 12px; }
  .section-title { font-size: 20px; }
  .section-description { font-size: 12px; }
  .filter-details { margin-top: 14px; border-radius: 19px; }
  .filter-details > summary { min-height: 48px; padding: 12px 14px; font-size: 12px; }
  .filter-summary-sub { font-size: 10px; }
  .filter-panel { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px 10px; padding: 13px; }
  .field { gap: 6px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea, .input { min-height: 46px; padding: 10px 11px; border-radius: 13px; font-size: 16px; }
  .filter-panel .field:nth-last-child(1), .filter-panel .field:nth-last-child(2) { grid-column: 1 / -1; }
  .decision-result { padding: 14px; border-radius: 24px; }
  .result-head { display: block; margin-bottom: 14px; }
  .result-head h3 { font-size: 19px; }
  .result-metrics { gap: 6px; margin-top: 11px; }
  .metric { padding: 7px 9px; font-size: 10px; }
  .meal-items { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .meal-item { border-radius: 17px; }
  .meal-item-art { min-height: 92px; }
  .meal-item-art .food-emoji { font-size: 42px; }
  .meal-item-body { padding: 10px; }
  .meal-item-title { font-size: 13px; }
  .meal-item-meta { flex-wrap: wrap; gap: 5px; font-size: 10px; }
  .meal-item-actions { gap: 5px; }
  .meal-item-actions .btn { min-height: 38px; padding: 7px 5px; font-size: 10px; }
  .result-footer { display: block; margin-top: 14px; padding-top: 13px; }
  .result-footer p { font-size: 11px; }
  .result-footer-actions { display: grid; grid-template-columns: 1fr; margin-top: 11px; }
  .result-footer-actions .btn { width: 100%; }
  .grid-3 { grid-template-columns: 1fr; gap: 9px; }
  .feature-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; min-height: 75px; padding: 13px; border-radius: 19px; }
  .feature-card .feature-emoji { grid-row: span 2; width: 43px; height: 43px; margin: 0; border-radius: 14px; font-size: 22px; }
  .feature-card strong { align-self: end; font-size: 14px; }
  .feature-card small { align-self: start; font-size: 11px; }
  .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .recipe-card { border-radius: 18px; }
  .recipe-art { min-height: 101px; }
  .recipe-art .food-emoji { font-size: 43px; }
  .recipe-card-body { padding: 10px; }
  .recipe-title { font-size: 13px; }
  .recipe-desc { min-height: 31px; font-size: 11px; }
  .card-actions { gap: 6px; }
  .card-actions .btn { min-height: 40px; padding: 7px 5px; font-size: 11px; }
  .chip { min-height: 36px; padding: 8px 12px; }
  .content-panel, .history-card { padding: 15px; border-radius: 21px; }
  .space-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .member-cards { gap: 8px; }
  .member-card { padding: 10px; }
  .page-title-row { flex-wrap: wrap; gap: 11px; }
  .page-title-row h1 { font-size: 25px; }
  .page-title-row > .btn { width: 100%; }
  .search-row { gap: 8px; }
  .search-row .btn { min-width: 66px; }
  .auth-wrap { display: block; min-height: auto; padding-top: 5px; }
  .auth-story { padding: 7px 4px 19px; }
  .auth-story .brand-mark { margin-bottom: 15px; }
  .auth-story h1 { font-size: 34px; }
  .auth-quote { display: none; }
  .auth-card { padding: 20px; border-radius: 25px; }
  .auth-form { gap: 13px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { position: relative; width: 100%; max-height: min(88dvh,900px); padding-bottom: env(safe-area-inset-bottom); border-radius: 28px 28px 0 0; }
  .modal:before { content: ""; display: block; width: 36px; height: 5px; margin: 9px auto 0; border-radius: 999px; background: rgba(120,120,128,.35); }
  .modal-header { padding: 16px 18px 13px; }
  .modal-body { padding: 15px 18px calc(20px + env(safe-area-inset-bottom)); }
  .detail-hero { gap: 12px; padding: 12px; }
  .detail-emoji { width: 66px; height: 66px; flex-basis: 66px; border-radius: 18px; font-size: 38px; }
  .detail-title { font-size: 18px; }
  .ingredient-list { grid-template-columns: 1fr; }
  .modal-actions .btn { flex: 1 1 calc(50% - 8px); }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 28px); font-size: 12px; }
  .footer-note { margin-top: 24px; padding-bottom: 8px; }
}

@media (max-width: 370px) {
  .app-shell { padding-left: 11px; padding-right: 11px; }
  .brand-subtitle { max-width: 150px; }
  .hero { padding: 19px 15px 16px; }
  .filter-panel { gap: 10px 8px; padding: 11px; }
  .meal-item-actions .btn { font-size: 10px; }
  .recipe-grid { gap: 8px; }
  .recipe-card-body { padding: 8px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --card: rgba(28,28,30,.94);
    --ink: #f5f5f7;
    --muted: #98989d;
    --line: rgba(84,84,88,.58);
    --green: #30d158;
    --green-dark: #30d158;
    --green-soft: #173a25;
    --rose: #ff375f;
    --rose-soft: #3a1e27;
    --yellow: #ffd60a;
    --shadow: 0 8px 28px rgba(0,0,0,.28);
  }
  html, body { background: #000; color: #f5f5f7; }
  body { background-image: radial-gradient(ellipse at 100% 0%,rgba(48,209,88,.09),transparent 35%),radial-gradient(ellipse at 0% 60%,rgba(255,55,95,.06),transparent 32%); }
  .ambient { opacity: .18; }
  .brand-mark { border-color: rgba(255,255,255,.08); background: linear-gradient(145deg,#48202c,#311b23); color: #ff6684; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
  .brand-subtitle, .section-description, .field-hint, .result-head p, .result-footer p, .recipe-desc, .history-date, .history-notes { color: #98989d; }
  .member-pill, .icon-button { border-color: rgba(255,255,255,.1); background: rgba(44,44,46,.68); color: #d1d1d6; }
  .navbar { border-color: rgba(255,255,255,.12); background: rgba(35,35,38,.75); box-shadow: 0 8px 26px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.06); }
  .nav-button { color: #a1a1a6; }
  .nav-button:hover, .nav-button.active { background: rgba(48,209,88,.14); color: #30d158; }
  .hero { border-color: rgba(255,255,255,.09); background: linear-gradient(135deg,#1b2b20 0%,#1b2420 54%,#2b1d25 100%); box-shadow: 0 12px 36px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.04); }
  .hero:before { border-color: rgba(255,255,255,.08); }
  .hero h1 span, .auth-story h1 span { color: #30d158; }
  .hero-copy p { color: #b1b7b0; }
  .eyebrow { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.07); color: #7fe69a; }
  .btn-primary { background: #30d158; color: #071b0d; box-shadow: 0 5px 15px rgba(48,209,88,.16); }
  .btn-primary:hover { background: #42df68; }
  .btn-light { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.08); color: #b8f4c5; }
  .btn-quiet { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.055); color: #d1d1d6; }
  .btn-rose { border-color: rgba(255,55,95,.2); background: #3a1e27; color: #ff7b95; }
  .btn-danger { border-color: rgba(255,69,58,.2); background: #3a1c1b; color: #ff8a83; }
  .section-kicker { color: #98989d; }
  .text-link { color: #30d158; }
  .feature-card, .decision-result, .recipe-card, .content-panel, .history-card, .auth-card { border-color: rgba(255,255,255,.09); background: rgba(28,28,30,.92); box-shadow: 0 6px 24px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.025); }
  .feature-card .feature-emoji { background: #203b29; }
  .feature-card.pink .feature-emoji { background: #3a2028; }
  .feature-card.yellow .feature-emoji { background: #3b351d; }
  .feature-card:after { opacity: .12; }
  .filter-details { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.82); box-shadow: none; }
  .filter-details > summary { color: #7fe69a; }
  .filter-summary-sub, .field label { color: #98989d; }
  .filter-panel { background: transparent; }
  .field input, .field select, .field textarea, .input { border-color: rgba(84,84,88,.68); background: #2c2c2e; color: #f5f5f7; color-scheme: dark; }
  .field input::placeholder, .field textarea::placeholder { color: #636366; }
  .field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: rgba(48,209,88,.6); box-shadow: 0 0 0 3px rgba(48,209,88,.12); }
  .metric, .tag, .history-dish { background: #2c2c2e; color: #d1d1d6; }
  .tag.rose { background: #3a1e27; color: #ff7b95; }
  .meal-item { border-color: rgba(255,255,255,.08); background: #2c2c2e; box-shadow: none; }
  .meal-item-art, .meal-item:nth-child(3n+2) .meal-item-art, .meal-item:nth-child(3n+3) .meal-item-art { background: linear-gradient(145deg,#303034,#26372b); }
  .role-pill { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.78); color: #d1d1d6; }
  .recipe-art, .recipe-card:nth-child(4n+2) .recipe-art, .recipe-card:nth-child(4n+3) .recipe-art, .recipe-card:nth-child(4n+4) .recipe-art { background: linear-gradient(145deg,#303034,#242c28); }
  .heart-toggle { border-color: rgba(255,255,255,.12); background: rgba(44,44,46,.88); color: #98989d; }
  .heart-toggle.active { background: #3a1e27; color: #ff6684; }
  .chip { border-color: rgba(255,255,255,.12); background: #1c1c1e; color: #c7c7cc; }
  .chip.active { border-color: rgba(48,209,88,.2); background: #173a25; color: #7fe69a; }
  .empty-state { border-color: rgba(255,255,255,.16); background: rgba(28,28,30,.6); color: #98989d; }
  .empty-state strong { color: #f5f5f7; }
  .status-pill { background: #173a25; color: #7fe69a; }
  .status-pill.pending { background: #3b351d; color: #ffd60a; }
  .member-card { border-color: rgba(255,255,255,.05); background: #2c2c2e; }
  .member-avatar { background: #203b29; }
  .member-card:nth-child(2) .member-avatar { background: #3a2028; }
  .shopping-row { border-bottom-color: rgba(84,84,88,.45); }
  .modal-backdrop { background: rgba(0,0,0,.58); }
  .modal { border-color: rgba(255,255,255,.12); background: rgba(28,28,30,.97); box-shadow: 0 25px 80px rgba(0,0,0,.5); }
  .modal-header { border-bottom-color: rgba(84,84,88,.5); }
  .detail-hero { border-color: rgba(255,255,255,.07); background: linear-gradient(135deg,#203b29,#3a2028); }
  .detail-emoji { background: rgba(255,255,255,.07); }
  .ingredient-row { background: #2c2c2e; }
  .ingredient-row span:last-child { color: #98989d; }
  .steps-list li { color: #d1d1d6; }
  .steps-list li:before { background: #203b29; color: #7fe69a; }
  .auth-quote { border-left-color: #7a3948; background: rgba(255,255,255,.04); }
  .auth-story p, .auth-intro, .auth-footnote { color: #98989d; }
  .auth-card .eyebrow { color: #7fe69a; }
  .toast { border-color: rgba(255,255,255,.12); background: rgba(44,44,46,.94); }
  .modal:before { background: rgba(142,142,147,.65); }
  @media (max-width: 680px) {
    .navbar { border-color: rgba(255,255,255,.14); background: rgba(35,35,38,.78); box-shadow: 0 8px 34px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.08); }
    .nav-button { color: #98989d; }
    .nav-button.active { background: rgba(48,209,88,.15); color: #30d158; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .icon-button, .nav-button, .chip, .heart-toggle, .recipe-card { transition: none !important; }
}

/* Shared SVG identity for the header and install icon. */
.brand-mark { background: none; box-shadow: none; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* Passkey setup follows the same native-inspired grouped surface style. */
.passkey-settings { margin-top:16px; padding:16px; border:1px solid var(--line); border-radius:18px; background:rgba(120,120,128,.055); }
.passkey-title { font-size:15px; font-weight:720; margin-bottom:9px; }
.passkey-settings p { line-height:1.65; margin:7px 0 13px; }
.passkey-list { display:grid; gap:8px; margin-top:13px; }
.passkey-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; background:var(--card); border:1px solid var(--line); border-radius:13px; }
.passkey-row-copy { display:grid; gap:3px; min-width:0; }
.passkey-row-copy strong { font-size:12px; }
.passkey-row-copy .small-muted { font-size:10px; }
.passkey-login { margin-top:0; }
@media (max-width:680px) {
  .passkey-settings { margin-top:14px; padding:13px; }
  .passkey-settings .btn { min-height:46px; }
}
