:root{
  --green:#0f773a;--green2:#17673a;--green-soft:#edf8f0;--lime:#9ed23a;
  --text:#1d2a22;--muted:#748078;--line:#e6ece7;--cream:#f8f6ef;--bg:#f4f7f4;
  --orange:#9b6814;--orange-soft:#fff6df;--red:#b94c4c;--red-soft:#fff0f0;
  --blue:#3e7098;--blue-soft:#edf4fb;--shadow:0 12px 28px rgba(18,60,33,.08)
}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#f2f8f3,#f7f8f6 38%,#f2f5f2);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text)}button,input{font:inherit}
.app-shell{width:min(100%,460px);min-height:100vh;margin:0 auto;background:#f8faf8;box-shadow:0 0 50px rgba(20,48,30,.09);padding-bottom:86px;position:relative}
.topbar{height:74px;padding:14px 16px;display:flex;align-items:center;gap:11px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;backdrop-filter:blur(10px)}
.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,var(--green),#249452);color:#fff;font-size:25px;font-weight:900;box-shadow:var(--shadow)}.brand-copy{min-width:0;flex:1}.brand-name{font-size:18px;font-weight:900}.brand-name span{font-size:13px;color:#738078;font-weight:700}.brand-sub{font-size:10px;color:var(--muted);margin-top:2px}.round-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--green);font-weight:900}
#app{padding:14px 14px 22px}.section{display:grid;gap:12px}.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:15px;box-shadow:0 8px 20px rgba(22,53,32,.035)}.card.no-pad{padding:0;overflow:hidden}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.section-head h2,.section-head h3{margin:0}.section-head h2{font-size:20px}.section-head h3{font-size:16px}.section-head p{margin:4px 0 0;font-size:10px;color:var(--muted);line-height:1.55}.text-btn{border:0;background:transparent;color:var(--green);font-size:10px;font-weight:900;padding:3px}
.hero{background:linear-gradient(145deg,var(--green),#17673a 60%,#2a844c);color:#fff;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:180px;height:180px;border-radius:999px;background:rgba(255,255,255,.07);right:-55px;top:-65px}.eyebrow{font-size:9px;font-weight:900;letter-spacing:.08em;opacity:.8}.hero h1{font-size:26px;line-height:1.2;margin:6px 0 6px;position:relative;z-index:1}.hero p{font-size:11px;line-height:1.65;opacity:.86;margin:0;position:relative;z-index:1}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:13px;position:relative;z-index:1}.stat{background:rgba(255,255,255,.12);border-radius:14px;padding:9px 10px}.stat strong{display:block;font-size:17px}.stat span{font-size:9px;opacity:.8}
.today-food{display:flex;align-items:center;gap:11px}.food-icon{width:50px;height:50px;border-radius:16px;background:var(--cream);display:grid;place-items:center;font-size:25px}.food-copy{flex:1}.food-copy h3{margin:0;font-size:18px}.food-copy p{margin:3px 0 0;font-size:10px;color:var(--muted)}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;white-space:nowrap}.badge.green{background:var(--green-soft);color:var(--green)}.badge.orange{background:var(--orange-soft);color:var(--orange)}.badge.gray{background:#f0f3f1;color:#6d7971}.badge.red{background:var(--red-soft);color:var(--red)}.badge.blue{background:var(--blue-soft);color:var(--blue)}
.metric-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.metric{background:#f2f7f3;color:#4f6656;border-radius:999px;padding:6px 8px;font-size:9px;font-weight:800}.notice{background:#f7fbf7;border:1px solid #dceadf;border-radius:15px;padding:10px 11px;font-size:10px;color:#4d6354;line-height:1.65}.notice.warn{background:#fffaf0;border-color:#ead9ae;color:#765d22}.notice.red{background:#fff5f5;border-color:#eccaca;color:#8a4444}
.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.action{border:1px solid var(--line);background:#fff;border-radius:16px;padding:11px;text-align:left}.action.primary{background:linear-gradient(145deg,#eff9f2,#fff);border-color:#cce3d2}.action strong{display:block;font-size:11px}.action span{display:block;margin-top:4px;font-size:9px;color:var(--muted);line-height:1.45}.wide-btn{width:100%;border:0;border-radius:15px;padding:12px 14px;background:linear-gradient(135deg,var(--green),var(--green2));color:#fff;font-size:11px;font-weight:900}.ghost-btn{border:1px solid var(--line);background:#fff;border-radius:14px;padding:10px 12px;color:var(--green);font-size:10px;font-weight:900}
.ai-card{background:linear-gradient(145deg,#fbfffc,#f0f8f2);border-color:#cee2d3}.ai-title{display:flex;align-items:center;gap:8px}.ai-orb{width:35px;height:35px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--green),#55a96f);color:#fff;font-weight:900}.ai-title h3{margin:0;font-size:14px}.ai-title p{margin:2px 0 0;font-size:9px;color:var(--muted)}.quick-prompts{display:flex;gap:6px;overflow:auto;padding:9px 0 2px}.quick-prompts button{border:1px solid #d9e7dc;background:#fff;border-radius:999px;padding:7px 9px;font-size:9px;color:#4d6654;white-space:nowrap}.ai-input{display:flex;gap:7px;margin-top:9px}.ai-input input{flex:1;min-width:0;border:1px solid var(--line);border-radius:13px;padding:10px 11px;font-size:10px;outline:none}.ai-input button{border:0;background:var(--green);color:#fff;border-radius:13px;padding:0 13px;font-size:10px;font-weight:900}
.recipe-card{border:1px solid var(--line);border-radius:17px;padding:12px;background:#fff}.recipe-top{display:flex;gap:10px;align-items:center}.recipe-emoji{width:42px;height:42px;border-radius:13px;background:var(--cream);display:grid;place-items:center;font-size:21px}.recipe-card h4{margin:0;font-size:12px}.recipe-card p{margin:4px 0 0;font-size:9px;color:var(--muted);line-height:1.5}.chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.chip{display:inline-flex;border-radius:999px;background:#f2f5f2;color:#627168;padding:5px 7px;font-size:8.5px;font-weight:800}.chip.brand{background:#edf8f0;color:var(--green)}.chip.block{background:#fff0f0;color:var(--red)}
.pantry-grid{display:flex;gap:6px;flex-wrap:wrap}.pantry-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 9px;font-size:9px;color:#607067}.pantry-chip.selected{background:var(--green-soft);border-color:#bcd8c4;color:var(--green);font-weight:900}.pantry-chip.blocked{background:#fff8f8;color:#a45b5b;border-style:dashed}.legend{display:flex;gap:7px;flex-wrap:wrap}.legend span{font-size:8.5px}.status-dot{display:inline-block;width:7px;height:7px;border-radius:99px;margin-right:3px}.status-dot.green{background:#32a65d}.status-dot.yellow{background:#d8a238}.status-dot.gray{background:#aab1ad}.status-dot.red{background:#c75a5a}
.queue{display:grid;gap:8px}.queue-item{border:1px solid var(--line);border-radius:16px;background:#fff;padding:10px;display:grid;grid-template-columns:24px 38px 1fr auto;align-items:center;gap:8px}.queue-item.current{border-color:#bad6c2;background:#f6fcf7}.drag{font-size:18px;color:#9ca79f;cursor:grab;user-select:none}.q-icon{width:38px;height:38px;border-radius:12px;background:var(--cream);display:grid;place-items:center;font-size:19px}.q-main b{display:block;font-size:10.5px}.q-main small{display:block;margin-top:3px;font-size:8.5px;color:var(--muted);line-height:1.4}.q-actions{display:flex;gap:3px}.mini-btn{border:1px solid var(--line);background:#fff;border-radius:9px;padding:5px 6px;color:var(--green);font-size:8px;font-weight:900}.queue-item.drag-over{border-color:var(--lime);box-shadow:0 0 0 2px rgba(158,210,58,.17)}.queue-item.dragging{opacity:.45}
.guide-search{display:flex;gap:7px}.guide-search input{flex:1;border:1px solid var(--line);border-radius:13px;padding:10px 11px;font-size:10px}.guide-tabs{display:flex;gap:6px;overflow:auto}.guide-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 9px;font-size:9px;white-space:nowrap;color:#5f6f65}.guide-tabs button.active{background:var(--green-soft);color:var(--green);border-color:#bdd8c4;font-weight:900}.guide-card{border:1px solid var(--line);border-radius:18px;padding:12px;background:#fff}.guide-card .type{font-size:8.5px;color:var(--green);font-weight:900}.guide-card h4{font-size:12px;margin:5px 0}.guide-card p{font-size:9px;color:var(--muted);line-height:1.55;margin:0}.social-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.social-tag{font-size:8px;padding:4px 6px;border-radius:999px;background:#f4f6f4;color:#6c7870}.social-tag.xhs{background:#fff0f2;color:#ad4d59}.social-tag.dy{background:#f0f3f5;color:#444f58}
.family-map{display:grid;gap:8px}.family-row{border-radius:15px;padding:10px 11px}.family-row.green{background:#edf8f0;color:var(--green)}.family-row.yellow{background:#fff7e6;color:var(--orange)}.family-row.gray{background:#f1f4f2;color:#68756d}.family-row b{display:block;font-size:10px}.family-row span{display:block;margin-top:4px;font-size:9px;line-height:1.5}
.profile-card{display:flex;align-items:center;gap:11px}.avatar{width:50px;height:50px;border-radius:16px;background:linear-gradient(145deg,#dceee1,#f8fbf8);display:grid;place-items:center;font-size:23px}.profile-card h3{margin:0;font-size:15px}.profile-card p{margin:3px 0 0;font-size:9px;color:var(--muted)}.settings{display:grid;gap:8px}.setting{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:10px 1px}.setting:last-child{border-bottom:0}.setting b{font-size:10.5px}.setting span{font-size:9px;color:var(--muted)}
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,460px);height:68px;background:rgba(255,255,255,.96);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);z-index:30;backdrop-filter:blur(12px)}.tab{border:0;background:transparent;color:#8a958e;display:grid;place-items:center;padding:7px 2px 6px}.tab span{font-size:18px;line-height:1}.tab b{font-size:9px;margin-top:3px}.tab.active{color:var(--green)}
.ai-fab{position:fixed;right:max(16px,calc((100vw - 460px)/2 + 16px));bottom:79px;border:0;border-radius:999px;padding:11px 14px;background:linear-gradient(135deg,var(--green),#2c9652);color:#fff;font-size:10px;font-weight:900;box-shadow:0 10px 25px rgba(15,119,58,.25);z-index:25}.ai-fab span{font-size:13px;margin-right:3px}
.modal-backdrop{position:fixed;inset:0;background:rgba(14,28,19,.48);display:flex;align-items:flex-end;justify-content:center;z-index:50}.modal-backdrop.hidden{display:none}.modal{width:min(100%,460px);max-height:86vh;overflow:auto;background:#fff;border-radius:26px 26px 0 0;padding:17px 15px 24px;box-shadow:0 -20px 50px rgba(12,28,18,.2)}.modal h3{font-size:17px;margin:0}.modal p{font-size:10px;color:var(--muted);line-height:1.65}.modal-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.close{width:32px;height:32px;border:0;border-radius:999px;background:#f0f4f1;color:var(--green);font-weight:900}.source-card{border:1px solid var(--line);border-radius:15px;padding:10px;margin-top:8px}.source-card b{display:block;font-size:10px}.source-card small{display:block;color:var(--muted);font-size:8.5px;margin-top:3px;line-height:1.45}.ai-chat{display:grid;gap:8px;margin:12px 0}.bubble{max-width:88%;padding:10px 11px;border-radius:16px;font-size:10px;line-height:1.6}.bubble.user{justify-self:end;background:var(--green);color:#fff;border-bottom-right-radius:5px}.bubble.ai{justify-self:start;background:#f2f6f3;color:#405347;border-bottom-left-radius:5px}.demo-note{font-size:8.5px;color:#7b857f;line-height:1.5;text-align:center;margin-top:7px}
@media(min-width:700px){body{padding:20px 0}.app-shell{border-radius:26px;overflow:hidden;min-height:calc(100vh - 40px)}.tabbar{bottom:20px;border-radius:0 0 26px 26px}.ai-fab{bottom:96px}}
/* V7 · group representative choice */
.group-choice-box{margin-top:10px;border:1px solid #dce9df;background:linear-gradient(145deg,#fbfefb,#f4faf5);border-radius:16px;padding:10px}.group-choice-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.group-choice-head b{display:block;font-size:10px;color:var(--green)}.group-choice-head small{display:block;font-size:8.5px;color:var(--muted);margin-top:3px;line-height:1.45}.group-choice-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.group-choice-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 8px;font-size:8.5px;color:#617067}.group-choice-chip.active{background:var(--green-soft);border-color:#bcd9c5;color:var(--green);font-weight:900}.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.choice-card{border:1px solid var(--line);background:#fff;border-radius:15px;padding:11px;text-align:left}.choice-card.selected{background:var(--green-soft);border-color:#b7d6c0}.choice-card:disabled{opacity:.55}.choice-card b{display:block;font-size:10.5px}.choice-card span{display:block;font-size:8.5px;color:var(--muted);margin-top:4px;line-height:1.45}

/* V9 · unlocked food map */
.map-zone{border-radius:20px;padding:14px;margin-top:12px;border:1px solid var(--line)}
.map-zone.current{background:linear-gradient(145deg,#eef8f1,#f8fcf9);border-color:#d4e6d9}
.map-zone.tolerated{background:linear-gradient(145deg,#edf8f0,#f8fcf9);border-color:#cfe4d6}
.map-zone.fast{background:linear-gradient(145deg,#fff7e6,#fffdfa);border-color:#edd8aa}
.map-zone.untested{background:linear-gradient(145deg,#f3f5f4,#fafbfa);border-color:#e2e7e3}
.map-zone-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.map-zone-head h4{margin:0;font-size:15px}
.map-zone-def{margin:4px 0 0;font-size:10px;line-height:1.6;font-weight:700}
.map-zone.current .map-zone-def,.map-zone.tolerated .map-zone-def{color:var(--green)}
.map-zone.fast .map-zone-def{color:var(--orange)}
.map-zone.untested .map-zone-def{color:#6d7871}
.map-count{min-width:28px;height:28px;border-radius:999px;display:grid;place-items:center;font-size:11px;font-weight:900;background:#fff;color:var(--text);border:1px solid rgba(0,0,0,.05)}
.map-food-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.map-food-card{border-radius:18px;padding:10px 6px 9px;text-align:center;border:1px solid rgba(0,0,0,.04);background:#fff;min-height:116px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
.map-food-card.current{background:#f7fcf8;color:var(--green)}
.map-food-card.tolerated{background:#ffffff;color:var(--green)}
.map-food-card.fast{background:#fffdfa;color:var(--orange)}
.map-food-card.untested{background:#f7f8f7;color:#7d8780}
.map-food-icon{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;font-size:24px;margin-bottom:8px;background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.03)}
.map-food-card.current .map-food-icon,.map-food-card.tolerated .map-food-icon{background:#eff8f1}
.map-food-card.fast .map-food-icon{background:#fff6e5}
.map-food-card.untested .map-food-icon{background:#eef1ef}
.map-food-card b{display:block;font-size:10px;line-height:1.3}
.map-food-card small{display:block;font-size:8px;line-height:1.4;margin-top:4px;opacity:.85}
.map-empty{border-radius:16px;padding:14px 12px;font-size:10px;font-weight:700;text-align:center}
.map-empty.current,.map-empty.tolerated{background:#f5fbf6;color:var(--green)}
.map-empty.fast{background:#fff9ec;color:var(--orange)}
.map-empty.untested{background:#f3f5f4;color:#6d7871}
@media(max-width:380px){.map-food-grid{grid-template-columns:repeat(3,1fr)}}
/* V10 · recipe library */
.recipe-library-card{border-color:#d9e6dc;background:linear-gradient(145deg,#fff,#fbfefc)}
.recipe-lib-search{display:flex;gap:7px}.recipe-lib-search input{flex:1;min-width:0;border:1px solid var(--line);border-radius:13px;padding:10px 11px;font-size:10px;outline:none}
.recipe-lib-tabs{display:flex;gap:6px;overflow:auto;padding:9px 0 4px}.recipe-lib-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 9px;font-size:9px;white-space:nowrap;color:#5f6f65}.recipe-lib-tabs button.active{background:var(--green-soft);color:var(--green);border-color:#bdd8c4;font-weight:900}
.recipe-library-note{margin:8px 0 10px;border-left:3px solid var(--lime);background:#fbfff4;border-radius:0 13px 13px 0;padding:9px 10px;font-size:9px;line-height:1.6;color:#607067}
.recipe-library-grid{display:grid;grid-template-columns:1fr;gap:7px}.recipe-library-item{width:100%;border:1px solid var(--line);background:#fff;border-radius:16px;padding:10px;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:9px;text-align:left}.recipe-library-item:hover{border-color:#c8ddce}.recipe-lib-icon{width:38px;height:38px;border-radius:12px;background:var(--cream);display:grid;place-items:center;font-size:18px}.recipe-lib-copy b{display:block;font-size:10.5px}.recipe-lib-copy small{display:block;font-size:8.5px;color:var(--muted);margin-top:3px;line-height:1.45}.recipe-lib-meta{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.recipe-lib-meta span{font-size:7.5px;border-radius:999px;padding:4px 6px;background:#f2f5f2;color:#66746b}.recipe-library-item em{font-style:normal;font-size:8px;color:#8b968f;background:#f1f4f2;padding:5px 6px;border-radius:999px;white-space:nowrap}.recipe-loadmore{width:100%;margin-top:10px}
.recipe-admin-preview{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.recipe-admin-preview>div{border:1px solid var(--line);border-radius:15px;padding:10px;background:#fbfdfb}.recipe-admin-preview b{font-size:9px;color:var(--green)}.recipe-admin-preview p{margin:4px 0 0;font-size:9px!important}
.recipe-edit-skeleton{display:grid;gap:8px;margin-top:12px}.recipe-skeleton-step{display:grid;grid-template-columns:32px 1fr;gap:9px;align-items:flex-start;border:1px dashed #d7e1da;border-radius:15px;padding:10px;background:#fcfdfc}.recipe-skeleton-step>span{width:32px;height:32px;border-radius:11px;background:var(--green-soft);display:grid;place-items:center;color:var(--green);font-size:9px;font-weight:900}.recipe-skeleton-step b{font-size:10px}.recipe-skeleton-step p{margin:3px 0 0!important;font-size:8.5px!important}

/* V11 · Today preparation assistant */
.prep-card{border-color:#dfe9e1;background:linear-gradient(145deg,#fff,#fbfdfb)}
.prep-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.store-entry-btn{background:var(--green-soft);border-color:#c9dfcf}.recipe-store-link{display:block;margin-top:9px;padding:5px 0}.service-entry-grid{display:grid;gap:8px;margin-top:11px}.service-entry{width:100%;border:1px solid var(--line);border-radius:16px;background:#fff;padding:11px;display:grid;grid-template-columns:38px 1fr auto;gap:9px;align-items:center;text-align:left}.service-entry>span{width:38px;height:38px;border-radius:13px;background:var(--green-soft);display:grid;place-items:center;font-size:19px}.service-entry b{display:block;font-size:10.5px}.service-entry small{display:block;font-size:8.5px;color:var(--muted);margin-top:3px}.service-entry em{font-style:normal;font-size:8px;color:var(--green);font-weight:900}.service-entry.upcoming{background:#f8f9f8;color:#68736c}.service-entry.upcoming>span{background:#f0f3f1}.service-entry:disabled{opacity:.72}
.prep-card.active{border-color:#bfdcc7;background:linear-gradient(145deg,#f0faf3,#fff)}
.prep-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.prep-kicker{display:block;font-size:8.5px;color:var(--green);font-weight:900}.prep-head h3{font-size:14px;margin:5px 0 3px}.prep-head p{font-size:9px;color:var(--muted);line-height:1.55;margin:0}.prep-day{border-radius:999px;background:var(--green-soft);color:var(--green);padding:7px 9px;font-size:9px;font-weight:900;white-space:nowrap}.prep-buy{margin:10px 0;border-radius:14px;background:#f6f9f6;padding:10px 11px}.prep-buy b{display:block;font-size:9px;color:var(--green)}.prep-buy span{display:block;font-size:10px;font-weight:800;margin-top:4px;line-height:1.5}.today-recipes-card{border-color:#dce8df}.future-recipe-card{border-color:#e5e2d7;background:linear-gradient(145deg,#fff,#fffdf8)}.future-recipe-card.active{border-color:#ead3a2;background:linear-gradient(145deg,#fff9ec,#fff)}.future-recipe-main{display:flex;gap:10px;align-items:center;margin-top:10px}.future-recipe-main b{display:block;font-size:11px}.future-recipe-main small{display:block;font-size:8.5px;color:var(--muted);margin-top:4px}.remind-note{border-radius:12px;background:#fff7e8;color:#7d5e1d;padding:8px 10px;font-size:9px;line-height:1.5}
