:root{--navy:#10233e;--blue:#418fde;--green:#218d5c;--amber:#b57400;--red:#b84b45;--line:#e2e8ee;--muted:#6f7b88;--bg:#f4f7fa}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17212b}.app{max-width:620px;margin:auto;min-height:100vh;background:#fff;padding:15px 16px 98px}.hidden{display:none!important}.top{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line);padding:10px 0 9px;display:flex;justify-content:space-between;align-items:center}.brand{border:0;background:none;padding:0;font-size:21px;font-weight:950;color:var(--navy);letter-spacing:-.04em}.sync{font-size:10px;font-weight:900;border-radius:999px;padding:6px 8px;background:#eef2f5;color:var(--navy)}.eyebrow{font-size:10px;font-weight:900;letter-spacing:.12em;color:var(--blue);margin-top:15px}h1{font-size:34px;line-height:1;margin:5px 0 8px;color:var(--navy);letter-spacing:-.05em}h2{font-size:22px;margin:0;color:var(--navy)}.note{font-size:13px;line-height:1.45;color:var(--muted)}.card{border:1px solid var(--line);border-radius:18px;padding:14px;margin:11px 0}.section{font-size:10px;font-weight:900;letter-spacing:.1em;color:var(--muted);text-transform:uppercase;margin-bottom:9px}.section.mini{margin-top:12px}.hero{background:var(--navy);color:#fff;border-radius:22px;padding:18px;margin:12px 0}.hero .eyebrow{color:#8fc1ef;margin-top:0}.hero h1{color:#fff}.hero .note{color:#cbd5df}.heroRow{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-top:18px}.yard{font-size:44px;font-weight:950;letter-spacing:-.06em}.yard small{display:block;font-size:10px;letter-spacing:.08em;color:#aebdca}.pill{display:inline-block;border-radius:999px;padding:6px 9px;background:#e9f7f0;color:#176641;font-size:10px;font-weight:900}.pill.dark{background:rgba(255,255,255,.13);color:#fff}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.metric{background:#f7f9fb;border-radius:11px;padding:9px}.metric b{display:block;color:var(--navy);font-size:18px}.metric span{font-size:9px;color:var(--muted)}.quick{display:grid;grid-template-columns:1fr 1fr;gap:8px}.q{border:1px solid var(--line);border-radius:15px;padding:12px;background:#fff;text-align:left}.q b{display:block;color:var(--navy);font-size:18px}.q span{display:block;font-size:10px;color:var(--muted);margin-top:3px}.progress{height:7px;background:#edf1f4;border-radius:99px;margin-top:10px;overflow:hidden}.progress i{display:block;height:100%;width:0;background:var(--green)}.steps{padding:0}.step{display:grid;grid-template-columns:32px 1fr;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #edf1f4}.step:last-child{border-bottom:0}.ico{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eef2f5;color:var(--navy);font-weight:950}.ico.done{background:#e9f7f0;color:var(--green)}.step strong,.step small{display:block}.step small{font-size:11px;color:var(--muted);margin-top:2px}.plan{padding:11px 0;border-bottom:1px solid #edf1f4}.plan.current{background:#f4f8fd;border-radius:12px;padding:10px;margin:4px -5px}.planHead{display:flex;justify-content:space-between;gap:10px}.planHead strong{color:var(--navy)}.planText{font-size:12px;color:#53606d;line-height:1.45;margin-top:5px}.attention{border-left:4px solid var(--amber);background:#fff8eb;border-radius:12px;padding:11px;margin:8px 0}.attention.good{border-left-color:var(--green);background:#eef9f3}.attention.bad{border-left-color:var(--red);background:#fff1f0}.attention b,.attention span{display:block}.attention span{font-size:11px;color:#66737f;margin-top:3px}.tools{background:#fff;padding:8px 0}.search,input,select,textarea{width:100%;border:1px solid var(--line);border-radius:13px;padding:12px;font-size:16px;background:#fff;margin-top:5px}textarea{min-height:76px;resize:vertical}label{font-size:11px;font-weight:800;color:#53606d;display:block;margin-top:9px}.cats{display:flex;gap:6px;overflow:auto;padding:8px 0}.cat{white-space:nowrap;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 10px;font-size:11px;font-weight:850;color:var(--navy)}.cat.active{background:var(--navy);color:#fff}.pantryRow{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #eef2f5}.pantryRow strong,.pantryRow small{display:block}.pantryRow small{font-size:11px;color:var(--muted);margin-top:2px}.verify{font-size:9px;font-weight:900;border-radius:999px;padding:5px 7px;background:#e9f7f0;color:#176641;height:max-content}.verify.no{background:#fff2de;color:#895900}.bottom{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(620px,100%);z-index:40;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:7px 8px calc(7px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);gap:3px}.nav{border:0;background:none;border-radius:12px;padding:8px 2px;color:#7b8792;font-size:10px;font-weight:850}.nav span{display:block;font-size:18px;margin-bottom:3px}.nav.active{background:#eef5fb;color:var(--navy)}.raceFrame{position:fixed;left:50%;transform:translateX(-50%);top:52px;bottom:70px;width:min(620px,100%);height:calc(100vh - 122px);border:0;background:#fff;z-index:10}.cta{width:100%;border:0;border-radius:14px;padding:14px;font-size:14px;font-weight:900;background:var(--navy);color:#fff;margin-top:9px}.secondary{background:#eef2f5;color:var(--navy)}.warn{background:#fdeceb;color:#9e3e38}.dangerZone{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.check{display:flex;gap:9px;align-items:flex-start;font-size:13px;font-weight:600}.check input{width:auto;margin-top:2px}.devNotice{background:#fff4e2;border-radius:12px;padding:10px;font-size:11px;color:#7f581f;margin:8px 0}details summary{font-weight:900;color:var(--navy);cursor:pointer}.invite{padding:9px 0;border-bottom:1px solid #eef2f5;font-size:12px}.invite b,.invite span{display:block}.invite span{color:var(--muted);margin-top:2px}.researchCard{border:1px solid var(--line);border-radius:18px;padding:14px;margin:10px 0}.researchHead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.researchHead b{color:var(--navy)}.chips{display:flex;gap:6px;flex-wrap:wrap}.chips button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 9px;font-size:11px;font-weight:800}.chips button.active{background:var(--navy);color:#fff}.sheetBack{position:fixed;inset:0;background:rgba(16,35,62,.38);z-index:80;display:flex;align-items:flex-end;justify-content:center}.sheet{width:min(620px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px 22px 0 0;padding:17px 16px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -12px 35px rgba(0,0,0,.15)}.handle{width:42px;height:4px;background:#d9dfe4;border-radius:999px;margin:0 auto 14px}@media(max-width:480px){.formGrid,.row{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(3,1fr)}}

.simCta{margin:0 0 12px;background:#418fde}
.simTop{display:flex;justify-content:space-between;gap:10px;align-items:center}
.simStep{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #edf1f4}
.simStep:last-child{border-bottom:0}
.simNum{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eef2f5;color:#10233e;font-weight:900;font-size:11px}
.simNum.done{background:#e9f7f0;color:#176641}
.simNum.warn{background:#fff2de;color:#895900}
.simStep strong,.simStep small{display:block}.simStep small{color:#6f7b88;margin-top:3px}
.simStatus{font-size:9px;font-weight:900;border-radius:999px;padding:5px 7px;background:#eef2f5;color:#10233e;white-space:nowrap}
.simStatus.done{background:#e9f7f0;color:#176641}.simStatus.warn{background:#fff2de;color:#895900}
.roleGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.roleBtn{border:1px solid #e2e8ee;background:#fff;color:#10233e;border-radius:13px;padding:11px;font-weight:900}
.roleBtn.active{background:#10233e;color:#fff;border-color:#10233e}
.probe{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #edf1f4;font-size:12px}
.probe .yes{color:#176641;font-weight:900}.probe .no{color:#9e3e38;font-weight:900}
.manualBtn{border:0;border-radius:10px;padding:7px 9px;background:#eef2f5;color:#10233e;font-size:10px;font-weight:900}
.manualBtn.done{background:#e9f7f0;color:#176641}
.startBox{background:#eef5fb;border-radius:18px;padding:14px;margin:12px 0}
.startBox .cta{margin-top:8px}

.libraryResults{max-height:360px;overflow:auto;margin:8px 0 14px}.libraryRow{gap:12px}.miniBtn{border:1px solid #d8e0ea;background:#fff;color:#152746;border-radius:12px;padding:9px 12px;font-weight:800;white-space:nowrap}.miniBtn.added{background:#eef3f8;color:#637083}.miniBtn.remove{color:#a64b45;border-color:#ead4d1}.pantryActions{display:flex;align-items:center;gap:8px}.emptyPantry{padding:22px;text-align:center;background:#f7f9fb;border:1px dashed #ccd6e1;border-radius:16px;display:flex;flex-direction:column;gap:5px}.emptyPantry span{color:#6a7584;font-size:14px}.customFood{margin:10px 0 18px}.section.mini{margin-top:18px}.attention.good{background:#edf8f1;border-color:#cbe9d5}

.foodGroup{border:1px solid #e5ebf1;border-radius:16px;padding:12px;margin:10px 0;background:#fff}.foodGroupHead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.foodGroupHead strong,.foodGroupHead small{display:block}.foodGroupHead strong{color:#10233e;font-size:14px}.foodGroupHead small{color:#6f7b88;font-size:11px;margin-top:2px}.foodMeta{font-size:9px;font-weight:850;color:#7a8794;white-space:nowrap}.variantGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.variantChoice{border:1px solid #dce4ec;background:#f9fbfd;border-radius:12px;padding:9px;text-align:left;color:#10233e;min-height:66px}.variantChoice span,.variantChoice small,.variantChoice b{display:block}.variantChoice span{font-size:11px;font-weight:850;line-height:1.25}.variantChoice small{font-size:9px;color:#7a8794;margin-top:3px}.variantChoice b{font-size:10px;color:#418fde;margin-top:6px}.variantChoice.selected{background:#edf8f1;border-color:#c6e5d3}.variantChoice.selected b{color:#218d5c}.cat span{opacity:.65;font-weight:700}.libraryResults{max-height:520px;overflow:auto;margin:8px 0 14px;padding-right:2px}@media(max-width:380px){.variantGrid{grid-template-columns:1fr}}

/* Pantry UX v2: spacious mobile-first browse + selection */
.pantryCard{padding:16px 14px 18px;overflow:visible}
.pantryCard>summary{font-size:17px;padding:3px 1px 6px}
.pantryIntro{font-size:14px;line-height:1.5;margin:8px 0 14px}
.pantryMetrics{margin:12px 0}
.pantryStatus{margin:12px 0 18px}
.pantrySelectedBox,.pantryLibraryBox{border:1px solid #e2e8ee;border-radius:18px;padding:16px 14px;margin:16px 0;background:#fff}
.pantrySelectedBox{background:#f8fbfe;border-color:#d9e7f4}
.pantryLibraryBox{background:#fff}
.pantrySectionHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.pantryKicker{display:block;font-size:9px;letter-spacing:.12em;font-weight:950;color:#418fde;margin-bottom:3px}
.pantrySectionHead h3{font-size:20px;line-height:1.1;letter-spacing:-.03em;color:#10233e;margin:0}
.pantryCountBadge{white-space:nowrap;border-radius:999px;padding:7px 10px;background:#eaf3fb;color:#10233e;font-size:11px;font-weight:900}
.pantryTools{padding:0;margin-top:8px}
.librarySearch{height:52px;border-radius:15px;padding:0 15px;font-weight:650;background:#fbfcfd}
.libraryCats{padding:10px 0 7px;gap:8px}
.libraryCats .cat,.pantryTools .cat{padding:10px 13px;font-size:12px;border-radius:14px}
.librarySummary{margin:3px 0 12px}
.libraryResults{max-height:none;overflow:visible;margin:0;padding:0}
.foodGroup{border:1px solid #e2e8ee;border-radius:17px;padding:0;margin:10px 0;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,35,62,.03)}
.foodGroup[open]{border-color:#bfd5e9;box-shadow:0 3px 12px rgba(16,35,62,.06)}
.foodGroupSummary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 14px;cursor:pointer;min-height:70px}
.foodGroupSummary::-webkit-details-marker{display:none}
.foodTitle{min-width:0;flex:1}
.foodTitle strong{display:block;color:#10233e;font-size:15px;line-height:1.25}
.foodTitle small{display:block;color:#75818d;font-size:11px;line-height:1.3;margin-top:4px}
.foodGroupRight{display:flex;align-items:center;gap:7px;flex-shrink:0}
.foodMeta{font-size:10px;font-weight:850;color:#75818d;white-space:nowrap}
.selectedBadge{font-size:9px;font-weight:900;color:#176641;background:#e9f7f0;border-radius:999px;padding:5px 7px;white-space:nowrap}
.foodChevron{font-size:20px;line-height:1;color:#8a96a2;transition:transform .15s ease}
.foodGroup[open] .foodChevron{transform:rotate(180deg)}
.servingList{border-top:1px solid #edf1f4;background:#fbfcfd;padding:6px 12px 10px}
.servingRow{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:12px;align-items:center;padding:12px 2px;border-bottom:1px solid #edf1f4}
.servingRow:last-child{border-bottom:0}
.servingRow.selected{opacity:.78}
.servingInfo b{display:block;color:#10233e;font-size:14px;line-height:1.3}
.servingVerify{display:inline-block;margin-top:5px;font-size:10px;font-weight:800;color:#8a651e;background:#fff2de;border-radius:999px;padding:4px 7px}
.servingVerify.verified{color:#176641;background:#e9f7f0}
.addPantryBtn{min-height:46px;border:0;border-radius:13px;background:#10233e;color:#fff;font-size:12px;font-weight:900;padding:10px 12px;white-space:nowrap}
.addPantryBtn:active{transform:scale(.98)}
.addPantryBtn.added{background:#e8f5ee;color:#176641}
.planFoodBtn{margin-top:14px;min-height:50px}
.customFood{margin:12px 0 0;border-top:1px solid #edf1f4;padding-top:12px}
.customFood>summary{padding:8px 0;font-size:13px}
.selectedPantryRow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid #e3eaf1;border-radius:15px;padding:13px;margin:9px 0}
.selectedFood strong{display:block;color:#10233e;font-size:14px;line-height:1.25}
.selectedFood small{display:block;color:#75818d;font-size:11px;line-height:1.35;margin-top:4px}
.selectedVerify{display:inline-block;margin-top:7px;font-size:9px;font-weight:900;color:#8a651e;background:#fff2de;border-radius:999px;padding:4px 7px}
.selectedVerify.verified{color:#176641;background:#e9f7f0}
.removePantryBtn{min-height:44px;border:1px solid #ead3d0;border-radius:12px;background:#fff7f6;color:#9d4b45;font-size:12px;font-weight:900;padding:9px 12px}
.libraryEmpty{padding:28px 20px;text-align:center;background:#f7f9fb;border:1px dashed #cbd6e1;border-radius:16px;display:flex;flex-direction:column;gap:6px}
.libraryEmpty b{color:#10233e}
.libraryEmpty span{font-size:12px;color:#6f7b88;line-height:1.45}
.emptyPantry{padding:24px 18px;margin:8px 0 12px}
#confirmPantry{min-height:52px;font-size:15px;margin-top:14px}
@media(max-width:480px){
 .pantrySelectedBox,.pantryLibraryBox{margin-left:-4px;margin-right:-4px;padding:15px 12px}
 .foodGroupSummary{padding:15px 12px}
 .foodGroupRight{gap:5px}
 .foodMeta{font-size:9px}
 .servingRow{grid-template-columns:minmax(0,1fr) 124px;gap:9px;padding:12px 0}
 .addPantryBtn{min-height:48px;font-size:12px;padding:9px 10px}
}
@media(max-width:370px){
 .servingRow{grid-template-columns:1fr}
 .addPantryBtn{width:100%}
 .foodMeta{display:none}
}
.registrationSwitcher{margin-top:12px}.registrationSwitcher label{font-size:12px;font-weight:800;color:#526172}.registrationSwitcher select{margin-top:7px}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}#adminPanel .section.mini{margin-top:18px}.row .cta{min-width:0}#startRace{margin-top:12px}
.planItemRow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid #eef2f5;font-size:13px}.planItemRow:first-of-type{margin-top:8px}.planItemRow button{border:0;background:#f2f5f7;color:#8b3f3a;border-radius:10px;padding:8px 10px;font-weight:800}.planItemRow span{line-height:1.35;color:#334155}
