:root{--ink:#243b30;--muted:#6b776e;--green:#174c37;--green-soft:#e9f1e8;--paper:#f8f7f2;--white:#fff;--line:#e4e7df;--gold:#ae7932;--amber:#fff3df;--danger:#a84132;--radius:20px;--shadow:0 8px 28px #183e2e06;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);font-size:16px;background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:var(--green);text-underline-offset:3px}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #adca83;outline-offset:3px}button{border:0}h1,h2,h3,p{margin:0}h1{font-size:1.8rem;letter-spacing:-.03em;line-height:1.4}h2{font-size:1.25rem;line-height:1.6}h3{font-size:1.05rem;line-height:1.6}p{line-height:1.8}small,.small{font-size:.875rem;line-height:1.6}.muted{color:var(--muted)}.eyebrow{font-size:.8rem;letter-spacing:.12em;text-transform:uppercase}.icon{width:22px;height:22px;flex-shrink:0;display:inline-block;vertical-align:middle}.loading{display:grid;place-content:center;gap:18px;text-align:center;min-height:100vh}.brand-mark{display:grid;place-items:center;width:44px;height:44px;background:var(--green);color:white;border-radius:14px;font-size:1.25rem;font-weight:700}
.shell{display:flex;min-height:100vh}.sidebar{width:234px;position:fixed;inset:0 auto 0 0;padding:30px 22px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:12px;margin-bottom:42px}.brand strong{font-size:1.2rem;display:block}.brand span{font-size:.8rem;color:var(--muted);display:block;margin-top:5px}.nav{display:flex;flex-direction:column;gap:10px}.nav button{background:transparent;color:var(--muted);display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:12px;text-align:left}.nav button.active{background:var(--green-soft);color:var(--green);font-weight:700}.nav button:hover{background:#f1f5ef}.sidebar-bottom{margin-top:auto;padding:22px 10px 0;display:grid;gap:14px}.privacy{display:flex;gap:9px;align-items:center;font-size:.8rem;color:var(--muted)}.user-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#eadfc9;color:var(--green)}.user{display:flex;align-items:center;gap:10px}.user span{display:block}.main{margin-left:234px;padding:34px 42px 40px;width:calc(100% - 234px);max-width:1510px}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:26px}.topbar .muted{margin-top:6px;font-size:.9rem}.top-actions{display:flex;gap:10px;align-items:center}.badge{padding:5px 10px;border-radius:20px;background:#edf3e9;color:var(--green);display:inline-flex;gap:5px;align-items:center;font-size:.8rem;line-height:1.5}.badge.amber{background:var(--amber);color:#8d6429}.badge.gray{background:#f0f1ef;color:var(--muted)}.btn{padding:11px 17px;border-radius:11px;background:var(--green);color:white;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;font-size:.9rem;font-weight:600;line-height:1.5}.btn.secondary{color:var(--green);background:white;border:1px solid var(--line)}.btn.soft{background:var(--green-soft);color:var(--green)}.btn.danger{color:var(--danger);background:#fff0eb}.btn.small{padding:7px 11px;min-height:36px;font-size:.8rem}.link-btn{background:transparent;color:var(--green);padding:8px;font-size:.9rem;min-height:40px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 14px}.section-head .muted{font-size:.875rem;margin-top:3px}.state-bar{background:white;padding:16px 20px;border:1px solid var(--line);border-radius:16px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.state-label{display:flex;align-items:center;gap:12px}.state-label strong{font-size:.95rem}.state-label span{display:block;font-size:.8rem;color:var(--muted);margin-top:3px}.segmented{display:flex;gap:4px;background:#f2f4ee;border-radius:11px;padding:4px}.segmented button{background:transparent;padding:9px 15px;border-radius:8px;min-height:40px;font-size:.875rem;color:var(--muted);white-space:nowrap}.segmented button.active{background:var(--green);color:white;box-shadow:0 2px 8px #174c371a}.hero{display:grid;grid-template-columns:1.2fr 1fr;overflow:hidden;border-radius:var(--radius);background:#eaf0e1;border:1px solid #dfe7d5;min-height:182px}.hero-text{padding:26px 30px;display:grid;gap:12px;align-content:center}.hero h2{font-size:1.45rem}.hero p{font-size:.9rem;max-width:480px}.hero-image{position:relative;overflow:hidden;min-height:180px}.hero-image img{height:100%;width:100%;max-height:220px;object-fit:cover;display:block}.photo-label{position:absolute;bottom:10px;right:12px;padding:4px 9px;border-radius:8px;background:#fffE;font-size:.75rem;color:#566456}.hero.no-photo{grid-template-columns:1fr;background:#fff3df}.notice{display:flex;gap:10px;align-items:flex-start;padding:13px 16px;border:1px solid #ede3cb;border-radius:12px;background:#fffaf0;color:#776137;font-size:.875rem;line-height:1.7;margin-top:16px}.notice .icon{margin-top:2px;width:18px}.notice a{color:inherit}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.meal{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px;display:flex;flex-direction:column;min-height:288px;box-shadow:var(--shadow)}.meal-label{display:flex;align-items:center;justify-content:space-between;font-size:.875rem;color:var(--muted);margin-bottom:20px}.meal-label .meal-icon{display:flex;align-items:center;gap:8px;color:var(--gold)}.meal h3{font-size:1.1rem;line-height:1.8;margin-bottom:8px}.meal .meta{display:flex;gap:12px;align-items:center;margin-top:10px;font-size:.8rem;color:var(--muted);flex-wrap:wrap}.meal .ingredient-preview{font-size:.85rem;line-height:1.8;color:var(--muted);margin:12px 0 18px}.meal-actions{margin-top:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.meal-actions .btn{flex:1;white-space:nowrap}.meal .empty{padding:15px 0;text-align:left}.below-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:18px;margin-top:20px}.panel{border:1px solid var(--line);border-radius:var(--radius);padding:24px;background:white;box-shadow:var(--shadow)}.panel>.section-head:first-child{margin-top:0}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick{display:flex;align-items:center;gap:12px;background:#f5f6ef;border-radius:13px;padding:16px;color:var(--ink);text-align:left}.quick .icon{color:var(--green)}.quick strong{display:block;font-size:.9rem}.quick span{display:block;font-size:.8rem;color:var(--muted);margin-top:4px}.metric{font-size:2.25rem;line-height:1.4;color:var(--green);font-weight:700}.metric-unit{font-size:.85rem;font-weight:400;color:var(--muted);margin-left:6px}.empty{padding:30px 18px;text-align:center;color:var(--muted);display:grid;gap:14px;justify-items:center}.empty .icon{width:38px;height:38px;color:#9ab19d}.footnote{margin-top:24px;padding:0 2px;font-size:.8rem;color:var(--muted);line-height:1.8}.footnote a{color:var(--muted)}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tabs button{background:white;border:1px solid var(--line);color:var(--muted);border-radius:10px;padding:9px 15px;font-size:.875rem;min-height:40px}.tabs button.active{background:var(--green);border-color:var(--green);color:white}.content-split{display:grid;grid-template-columns:1.1fr .9fr;gap:20px;align-items:start}.field{display:grid;gap:8px;margin-bottom:18px}.field>label,.label{font-size:.875rem;font-weight:600}.field input,.field select,.field textarea,.search,.inline-select{width:100%;background:#fff;border:1px solid #d9dfd5;border-radius:10px;min-height:44px;padding:10px 12px;color:var(--ink)}.field textarea{min-height:90px;resize:vertical;line-height:1.7}.field small{color:var(--muted);font-size:.8rem}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.check-group{display:flex;gap:16px;flex-wrap:wrap;margin:10px 0 20px}.check-group label{display:flex;align-items:center;gap:7px;font-size:.9rem;line-height:1.6}.check-group input{accent-color:var(--green);width:18px;height:18px}.search{max-width:360px}.food-result{border:1px solid var(--line);padding:14px 16px;border-radius:12px;margin-bottom:10px}.food-result-top{display:flex;justify-content:space-between;align-items:center;gap:15px}.food-result h3{font-size:.95rem}.food-result p{font-size:.8rem;color:var(--muted);margin-top:5px}.food-list{max-height:500px;overflow:auto;padding-right:4px}.food-list .btn{white-space:nowrap}.calc-heading{display:flex;gap:10px;align-items:center;margin-bottom:20px}.calc-heading>.icon{width:30px;height:30px;color:var(--green)}.summary{padding:20px;background:var(--green-soft);border-radius:14px;margin:20px 0}.summary p{font-size:.85rem;color:var(--muted);margin-top:4px}.cart-item{padding:14px 0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:10px}.cart-item strong{font-size:.9rem}.cart-item .muted{font-size:.8rem;display:block;margin-top:4px}.cart-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;grid-column:1/-1}.cart-controls input{width:98px;padding:8px;border:1px solid var(--line);border-radius:7px}.cart-controls select{padding:8px;border:1px solid var(--line);border-radius:7px;max-width:145px}.chart{width:100%;display:block;max-height:300px}.chart text{font-family:inherit;font-size:12px;fill:var(--muted)}.chart .target{stroke:#bc8743;stroke-dasharray:6 5;stroke-width:1.5}.chart .hospital{fill:var(--green)}.chart .home{fill:#c19d5d}.legend{display:flex;gap:18px;font-size:.8rem;color:var(--muted);margin:10px 0}.legend .dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--green);margin-right:5px}.legend .dot.home{background:#c19d5d}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.875rem;text-align:left}th{color:var(--muted);font-weight:500;background:#f6f7f1;white-space:nowrap}th,td{padding:14px 12px;border-bottom:1px solid var(--line);line-height:1.7}td .small{font-size:.8rem}.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.stat{padding:20px;background:white;border:1px solid var(--line);border-radius:16px}.stat .label{color:var(--muted);font-weight:400;margin-bottom:8px}.stat .metric{font-size:1.7rem}.post{padding:22px 0;border-bottom:1px solid var(--line)}.post:first-child{padding-top:0}.post:last-child{border:0}.post .post-meta{display:flex;gap:10px;align-items:center;font-size:.8rem;color:var(--muted);margin-bottom:9px;flex-wrap:wrap}.post h3{margin-bottom:8px}.post .post-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.95rem}.post-actions{display:flex;gap:10px;align-items:center;margin-top:13px}.comments{background:#f6f7f2;border-radius:12px;padding:12px 16px;margin-top:15px}.comment{font-size:.875rem;padding:9px 0;white-space:pre-wrap;overflow-wrap:anywhere}.comment strong{color:var(--green);margin-right:8px}.community-intro{background:var(--green);color:white;border-radius:18px;padding:22px 26px;margin-bottom:20px}.community-intro p{font-size:.9rem;color:#dbe6da;margin-top:7px}.source-card{padding:18px;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}.source-card p{font-size:.875rem;color:var(--muted);margin:8px 0}.week-list{display:grid;gap:12px}.week-day{padding:16px;background:#f6f7f2;border-radius:12px}.week-day h3{margin-bottom:10px}.week-meal{font-size:.875rem;padding:5px 0}.shopping-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.shopping-item input{width:20px;height:20px;accent-color:var(--green)}.shopping-item:has(input:checked){opacity:.5;text-decoration:line-through}.shopping-item .amount{margin-left:auto;font-size:.85rem;color:var(--muted);text-align:right}.recipe-ingredients{margin:18px 0}.recipe-ingredients li{line-height:1.8;margin-bottom:5px;font-size:.95rem}.steps{padding-left:22px;line-height:1.9}.steps li{padding-left:5px;margin:10px 0}.recipe-choice{display:flex;gap:16px;justify-content:space-between;align-items:center;padding:16px;border:1px solid var(--line);border-radius:12px;margin:10px 0}.recipe-choice strong{display:block}.recipe-choice p{font-size:.8rem;color:var(--muted);margin-top:5px}.recipe-choice .btn{flex-shrink:0}
dialog{border:1px solid var(--line);border-radius:22px;padding:28px;width:min(620px,calc(100% - 28px));max-height:88vh;overflow:auto;color:var(--ink);box-shadow:0 30px 90px #102b2840}dialog::backdrop{background:#102d2766;backdrop-filter:blur(4px)}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.modal-head h2{font-size:1.3rem}.modal-close{display:grid;place-items:center;min-width:38px;min-height:38px;border-radius:50%;background:#f3f5ef;color:var(--muted)}.modal-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}.form-error{color:var(--danger);font-size:.875rem;line-height:1.7;margin:12px 0}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:100;color:white;background:var(--green);padding:12px 20px;border-radius:12px;box-shadow:0 5px 30px #173c2e30;max-width:calc(100% - 30px);font-size:.9rem;display:none}#toast.visible{display:block}
@media(min-width:1500px){.main{padding-left:50px;padding-right:50px}}@media(max-width:1180px){.sidebar{width:200px;padding:28px 16px}.main{margin-left:200px;width:calc(100% - 200px);padding:26px}.grid3{gap:12px}.meal{padding:17px}.meal-actions{gap:5px}.meal-actions .btn{font-size:.8rem;padding:10px}.hero-text{padding:22px}.state-bar{align-items:flex-start;flex-direction:column;gap:12px}.stat .metric{font-size:1.4rem}.content-split{grid-template-columns:1fr 1fr}}
@media(max-width:850px){.sidebar{width:82px;padding:24px 12px}.brand{justify-content:center}.brand>div:last-child,.nav button span,.sidebar-bottom{display:none}.nav button{justify-content:center;padding:15px}.main{margin-left:82px;width:calc(100% - 82px);padding:24px}.grid3{grid-template-columns:1fr}.meal{min-height:unset}.meal-label{margin-bottom:10px}.meal-actions .btn{flex:unset;font-size:.9rem;padding:10px 16px}.hero{grid-template-columns:1fr .8fr}.below-grid,.content-split{grid-template-columns:1fr}.food-list{max-height:380px}.top-actions .badge{display:none}}
@media(max-width:560px){.sidebar{inset:auto 0 0;width:100%;height:72px;border-right:0;border-top:1px solid var(--line);padding:6px 8px;background:#ffffffF5;backdrop-filter:blur(12px)}.brand,.sidebar-bottom{display:none}.nav{flex-direction:row;justify-content:space-around;gap:0}.nav button{display:flex;flex-direction:column;gap:4px;font-size:.75rem;padding:6px 8px;min-width:56px;border-radius:9px}.nav button span{display:block}.nav button .icon{width:21px;height:21px}.main{margin-left:0;width:100%;padding:22px 16px 98px}.topbar{gap:10px;margin-bottom:19px;align-items:center}h1{font-size:1.4rem}.topbar .muted{font-size:.8rem}.top-actions .btn{font-size:.8rem;padding:9px 12px}.state-bar{padding:14px;gap:12px}.segmented{width:100%}.segmented button{flex:1;padding:9px 8px;font-size:.8rem}.hero{grid-template-columns:1fr}.hero-text{padding:20px}.hero h2{font-size:1.2rem}.hero-image{min-height:120px;max-height:140px}.hero-image img{height:140px}.panel{padding:18px}.section-head{margin-top:22px}.section-head h2{font-size:1.15rem}.form-row{gap:12px}.stat-row{grid-template-columns:1fr 1fr;gap:10px}.stat-row .stat:last-child{grid-column:1/-1}.stat{padding:16px}.quick{padding:13px;gap:8px}.quick strong{font-size:.85rem}.quick span{font-size:.75rem}.toolbar{gap:9px}.toolbar .search{max-width:100%}.badge{font-size:.75rem}.food-result{padding:12px}.recipe-choice{gap:10px;padding:12px;align-items:flex-start}.recipe-choice .btn{padding:8px 10px;font-size:.8rem}dialog{padding:22px 18px;border-radius:18px}.modal-actions .btn{flex:1}#toast{bottom:88px}.photo-label{font-size:.7rem}.footnote{font-size:.75rem}}
.section-head>.link-btn{white-space:nowrap;flex-shrink:0}.content-split>div>.panel+.panel{margin-top:20px}.field>label>input,.field>label>select,.field>label>textarea{margin-top:8px}form>h2{margin:24px 0 16px}.panel.table-wrap table{min-width:680px}
@media(prefers-reduced-motion:no-preference){.btn,.nav button,.quick{transition:background .15s,transform .15s}.btn:hover,.quick:hover{transform:translateY(-1px)}}

/* Phone is the primary layout; desktop retains the wider workspace. */
.mobile-tools-nav,.mobile-basket-dock,.urate-cards{display:none}
.home-shortcuts{margin-top:18px}.home-shortcuts .quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.below-grid{grid-template-columns:1fr}.topbar .top-actions>button{flex-shrink:0}
.step-number{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#e7ebe3;font-size:12px}
.basket-count{padding:2px 6px;border-radius:20px;background:#d6e4d4;font-size:12px}
@media(max-width:720px){
  :root{--radius:20px;font-size:16px;background:#f5f6f0}
  body{overflow-wrap:break-word}
  .shell{display:block;min-height:100dvh}
  .sidebar{inset:auto 0 0;width:100%;height:auto;padding:7px 12px calc(8px + env(safe-area-inset-bottom,0px));border:0;border-top:1px solid #e3e8df;background:#fffffff5;backdrop-filter:blur(16px)}
  .brand,.sidebar-bottom{display:none}
  .nav{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}
  .nav button{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0;min-height:54px;padding:7px 3px;border-radius:14px;font-size:11px;color:#7b857d}
  .nav button span{display:block}.nav button .icon{width:23px;height:23px}
  .nav button.active{color:#174c37;background:#edf3e9}
  .main{margin:0;width:100%;max-width:none;padding:calc(22px + env(safe-area-inset-top,0px)) 16px calc(108px + env(safe-area-inset-bottom,0px))}
  .topbar{align-items:center;gap:12px;margin-bottom:20px}.topbar>div:first-child{min-width:0}
  h1{font-size:23px;font-weight:750;letter-spacing:-.045em}h2{font-size:18px}h3{font-size:17px}
  .topbar .muted{font-size:12px;line-height:1.6;margin-top:4px}
  .topbar .top-actions{gap:0}.top-actions .badge{display:none}
  .topbar .top-actions .btn{min-height:44px;padding:10px 12px;font-size:13px;border-radius:14px;white-space:nowrap}
  .topbar .top-actions .btn[data-page="profile"]{width:44px;height:44px;padding:0;border-radius:50%;background:#e6edde;border:0}
  .topbar .top-actions .btn[data-page="profile"] span{display:none}
  .btn,.btn.small,.link-btn{min-height:44px}.btn{border-radius:13px}
  .state-bar{padding:14px;gap:12px;border-radius:18px;align-items:stretch}
  .state-label{gap:8px}.state-label strong{font-size:14px}.state-label span{font-size:11px;line-height:1.5}
  .state-label>.icon{width:19px}.segmented{width:100%;padding:4px;border-radius:13px}
  .segmented button{flex:1;padding:10px 3px;font-size:13px;min-height:44px;border-radius:10px}
  .hero{grid-template-columns:minmax(0,1fr) 94px;min-height:0;background:#e8efdf;border-radius:20px}
  .hero-text{padding:17px 14px;gap:8px}.hero h2{font-size:17px;line-height:1.55}
  .hero-text p{font-size:12px;line-height:1.7}.hero-detail{display:none}.hero-text .small{font-size:10px;line-height:1.7}
  .hero-image{min-height:0;max-height:none}.hero-image img{height:100%;max-height:none;width:100%;object-fit:cover}
  .photo-label{left:5px;right:5px;bottom:7px;padding:4px 5px;text-align:center;font-size:9px;line-height:1.6}
  .hero.no-photo{grid-template-columns:1fr}.hero.no-photo .hero-text{padding:16px}
  .notice{padding:12px;font-size:12px;line-height:1.8;margin-top:12px;border-radius:13px;gap:8px}
  .notice .link-btn{font-size:12px;padding:3px 6px;min-height:36px}
  .home-shortcuts{margin-top:16px}.home-shortcuts .quick-grid{gap:8px}
  .home-shortcuts .quick{display:flex;flex-direction:column;gap:9px;text-align:center;justify-content:flex-start;padding:13px 3px;background:white;border:1px solid var(--line);border-radius:17px;min-height:82px}
  .home-shortcuts .quick>.icon{width:23px;height:23px}.home-shortcuts .quick strong{font-size:11px;font-weight:600;white-space:nowrap}.home-shortcuts .quick span{display:none}
  .section-head{margin:23px 0 13px;gap:8px}.section-head h2{font-size:18px}.section-head .muted{font-size:11px;line-height:1.6}.section-head>.link-btn{font-size:12px;padding:4px;min-height:44px}
  .grid3{gap:12px}.meal{padding:18px;min-height:0;border-radius:20px;box-shadow:0 3px 14px #284a3305}
  .meal-label{margin-bottom:11px;font-size:12px}.meal-label .meal-icon{font-weight:600;gap:7px}.meal-label .icon{width:19px}
  .meal h3{font-size:18px;line-height:1.65;margin-bottom:8px}.meal .badge{font-size:10px;padding:4px 8px}
  .meal .meta{font-size:12px;gap:14px}.meal .meta .icon{width:15px;height:15px}
  .meal .ingredient-preview{font-size:12px;margin:11px 0 16px;line-height:1.8}
  .meal-actions{gap:10px;flex-wrap:nowrap}.meal-actions .btn{flex:1;padding:11px 9px;font-size:13px;min-height:46px}
  .meal-actions .btn:first-child{background:#174c37;color:#fff}.meal-actions .btn .icon{width:17px;height:17px}
  .panel{padding:18px;border-radius:20px}.below-grid{gap:12px;margin-top:16px}
  .content-split{grid-template-columns:minmax(0,1fr);gap:14px}.content-split>*,.form-row>*{min-width:0}
  .toolbar{margin-bottom:16px;gap:10px}.tabs{gap:6px}.tabs button{min-height:44px;font-size:13px;padding:10px 14px;border-radius:12px}
  .page-tools>.toolbar .tabs{width:100%;padding:4px;background:#e9ede3;border-radius:15px;display:grid;grid-template-columns:1fr 1fr;gap:4px}
  .page-tools>.toolbar .tabs button{border:0;background:transparent;font-size:14px;color:#70806f}
  .page-tools>.toolbar .tabs button.active{background:#fff;color:#174c37;box-shadow:0 2px 6px #234f3510}
  .mobile-tools-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 16px}
  .mobile-tools-nav button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:7px 3px;background:transparent;color:#758071;font-size:13px;border-bottom:2px solid #e0e6da}
  .mobile-tools-nav button.active{color:#174c37;font-weight:600;border-color:#174c37}.mobile-tools-nav button.active .step-number{background:#174c37;color:white}
  .tools-layout.step-foods:not(.lookup-mode) .basket-panel,.tools-layout.step-basket:not(.lookup-mode) .food-picker{display:none}
  .lookup-mode .basket-panel{display:none}
  .calc-heading{gap:10px;margin-bottom:17px}.calc-heading h2{font-size:17px}.calc-heading .small{font-size:11px}
  .food-picker{padding:16px}.food-picker .toolbar{display:grid;grid-template-columns:minmax(0,1fr) 95px;gap:8px}
  .food-picker .search,.food-picker .inline-select{max-width:none;width:100%;min-height:46px;font-size:13px;padding:11px 10px;background:#f7f8f3;border:1px solid #e4e8df;border-radius:12px}
  .food-list{max-height:none;overflow:visible;padding:0}.food-result{padding:15px 0;margin:0;border:0;border-bottom:1px solid #edf0e7;border-radius:0}
  .food-result:last-child{border:0}.food-result h3{font-size:15px}.food-result p{font-size:11px;line-height:1.7;margin-top:6px}
  .food-result-top{gap:10px;align-items:center}.food-result .btn{font-size:12px;padding:8px 10px;min-width:65px;border-radius:12px}.food-result .btn .icon{width:16px}
  .food-result>a{display:inline-flex;align-items:center;min-height:34px;font-size:11px}
  .mobile-basket-dock{display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;left:16px;right:16px;bottom:calc(86px + env(safe-area-inset-bottom,0px));padding:12px 14px;z-index:9;border:1px solid #dce5d7;background:#fffffff5;backdrop-filter:blur(16px);border-radius:18px;box-shadow:0 8px 35px #24462c20}
  .mobile-basket-dock strong{display:block;font-size:14px}.mobile-basket-dock span{display:block;margin-top:4px;font-size:11px;color:#788572}.mobile-basket-dock .btn{font-size:13px;min-height:46px;padding:10px 14px}
  .has-basket-dock{padding-bottom:calc(204px + env(safe-area-inset-bottom,0px))}
  .basket-panel>.section-head:first-child{margin:0 0 12px}.basket-panel>.btn,.basket-panel #calc-result>.btn{width:100%;min-height:50px;font-size:15px}
  .cart-item{padding:16px 0;gap:12px}.cart-item strong{font-size:15px}.cart-item .muted{font-size:12px}
  .cart-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cart-controls label{font-size:12px}.cart-controls input,.cart-controls select{min-height:46px;background:#f8f9f4;font-size:16px}
  .cart-controls input{width:calc(100% - 27px)}.cart-controls select{width:100%;max-width:none}
  .field input,.field select,.field textarea{min-height:48px;font-size:16px;border-radius:12px;background:#fafbf7}
  .field>label,.label{font-size:13px}.field small{font-size:11px;line-height:1.8}.field{margin-bottom:18px}.form-row{gap:12px}
  .stat-row{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:10px;margin-bottom:16px}
  .stat{padding:15px;border-radius:18px}.stat:first-child{background:#174c37;border-color:#174c37}.stat:first-child .metric{color:white}.stat:first-child .label,.stat:first-child .muted,.stat:first-child .metric-unit{color:#d4e2d0}
  .stat .label{font-size:11px;line-height:1.5;margin-bottom:10px}.stat .metric{font-size:26px;line-height:1.3}.stat .metric-unit{font-size:10px;display:block;margin:4px 0 0}.stat .small{font-size:10px;margin-top:8px}.stat .link-btn{font-size:11px;padding:4px 0}
  .stat-row .stat:last-child{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:11px 15px}.stat:last-child .label{margin:0}.stat:last-child .metric{font-size:18px;display:flex;gap:5px;align-items:center}.stat:last-child .metric-unit{display:inline;margin:0}.stat:last-child p{margin:0 0 0 auto;font-size:10px}
  .page-records>.toolbar{display:flex;justify-content:space-between;gap:5px}.page-records>.toolbar .link-btn{font-size:11px;padding:5px 0}.page-records>.toolbar .tabs button{font-size:12px;padding:10px 12px}
  .urate-table{display:none}.urate-cards{display:grid;gap:12px}.urate-card{padding:18px;background:#fff;border:1px solid var(--line);border-radius:20px}
  .urate-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.urate-card-head>strong{font-size:13px}.urate-card-head .badge{font-size:10px}
  .urate-card-result{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}.urate-card-result strong{font-size:30px;font-weight:700;color:#174c37}.urate-card-result span{font-size:12px;color:#6f7d70;margin-left:5px}.urate-card-result p{font-size:11px;color:#78836f}
  .urate-card-result .urate-source{display:flex;align-items:center;gap:5px;font-size:11px;margin:0}.urate-source .icon{width:15px;height:15px}.urate-note{margin-top:12px;font-size:12px;color:#6b776e;white-space:pre-wrap;overflow-wrap:anywhere}
  .urate-card-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #edf0e7;padding-top:12px;margin-top:13px}.urate-card-actions .btn{font-size:12px;padding:9px 13px}.urate-card-actions .icon{width:16px;height:16px}.urate-card-actions .link-btn{font-size:12px;color:#997265}
  .chart{min-height:160px;max-height:none}.legend{font-size:10px;gap:12px;line-height:1.6}.chart text{font-size:22px}
  .community-intro{padding:19px 18px;border-radius:20px;background:linear-gradient(120deg,#174c37,#346149);margin-bottom:16px}.community-intro h2{font-size:18px}.community-intro p{font-size:11px;line-height:1.9;margin-top:7px}
  .page-community>.toolbar.tabs{flex-wrap:nowrap;overflow:auto;gap:7px;padding-bottom:4px;scrollbar-width:none}.page-community>.toolbar.tabs button{white-space:nowrap;flex-shrink:0;font-size:12px;padding:10px 13px}
  .page-community>section.panel{padding:0;background:transparent;border:0;box-shadow:none}.page-community .post{padding:18px;background:#fff;border:1px solid var(--line);border-radius:20px;margin-bottom:12px}.page-community .post:last-child{border:1px solid var(--line)}
  .post .post-meta{font-size:11px;gap:7px}.post h3{font-size:17px;line-height:1.7}.post .post-body{font-size:14px;line-height:1.9}.post-actions{gap:7px;flex-wrap:wrap}.post-actions .btn,.post-actions .link-btn{font-size:11px;padding:8px}.comments{padding:10px 12px}.comment{font-size:12px;line-height:1.8}
  .page-profile .panel>h2{font-size:17px}.page-profile form>h2{font-size:17px}.page-profile .section-head{flex-wrap:wrap}.page-profile .section-head .btn{flex:1;white-space:nowrap;font-size:12px}
  dialog{position:fixed;inset:auto 0 0;width:100%;max-width:720px;max-height:92vh;max-height:92dvh;margin:0 auto;border-radius:24px 24px 0 0;padding:12px 20px calc(18px + env(safe-area-inset-bottom,0px));border-bottom:0;overscroll-behavior:contain}
  dialog::before{content:'';display:block;width:34px;height:4px;background:#d4dccf;border-radius:10px;margin:0 auto 16px}
  .modal-head{position:sticky;top:-13px;background:white;z-index:2;padding:10px 0;margin-bottom:16px}.modal-head h2{font-size:19px}.modal-close{min-width:44px;min-height:44px}
  .modal-actions{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom,0px));background:white;padding:14px 0 calc(6px + env(safe-area-inset-bottom,0px));margin-top:20px;gap:12px;z-index:1;border-top:1px solid #edf0e7}
  .modal-actions .btn{flex:1;min-height:50px;font-size:14px}.recipe-ingredients{padding-left:20px}.recipe-ingredients li,.steps li{font-size:14px;line-height:1.9}.recipe-choice{align-items:center}.recipe-choice strong{font-size:14px}.recipe-choice p{font-size:11px}
  #toast{bottom:calc(92px + env(safe-area-inset-bottom,0px));font-size:13px;line-height:1.7;max-width:calc(100% - 32px);text-align:center}
  .footnote{font-size:11px;line-height:1.9;margin-top:22px}.footnote .link-btn{font-size:11px;padding:5px 0}
}
@media(max-width:360px){.main{padding-left:12px;padding-right:12px}h1{font-size:21px}.home-shortcuts .quick strong{font-size:10px}.hero{grid-template-columns:minmax(0,1fr) 78px}.hero h2{font-size:16px}.cart-controls{grid-template-columns:1fr}.form-row{grid-template-columns:1fr}.stat:last-child p{display:none}.meal-actions .btn{font-size:12px;padding:10px 6px}}
.photo-intro{padding:24px;background:#e8efdf;border-radius:20px;margin-bottom:20px}.photo-intro h2{margin-top:10px}.photo-intro p{color:var(--muted);font-size:13px;margin-top:7px}.photo-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.photo-layout>.panel>p{margin:8px 0 16px}.photo-placeholder{display:grid;place-items:center;gap:12px;min-height:240px;border:2px dashed #d5dfcf;border-radius:18px;background:#f7f9f2;color:#6b806a;text-align:center;padding:18px}.photo-placeholder .icon{width:48px;height:48px}.photo-placeholder span{font-size:12px}.photo-preview{width:100%;max-height:300px;object-fit:contain;background:#f6f7f2;border-radius:18px;display:block}.photo-pick-actions{display:flex;gap:10px;margin:16px 0}.photo-pick-actions .btn{flex:1;cursor:pointer}.file-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.photo-pick-actions label:focus-within{outline:3px solid #adca83;outline-offset:3px}.photo-service{display:flex;justify-content:space-between;align-items:center;gap:8px}.photo-service span{overflow-wrap:anywhere}.photo-primary{width:100%;min-height:50px}.photo-confirm>h2{margin-bottom:10px}.photo-item{padding:16px 0;border-bottom:1px solid var(--line)}.photo-item>.section-head{margin:0 0 10px}.photo-item .field{margin-bottom:12px}.photo-confirm>.btn.soft{margin:16px 0}.photo-risk-flags{background:#f7f8f3;border-radius:16px;padding:16px}.photo-risk-flags h3{font-size:14px;margin-bottom:8px}.photo-risk-flags label{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px}.photo-risk-flags input{width:19px;height:19px;accent-color:#174c37}.photo-results{margin-top:20px;scroll-margin-top:18px}.photo-risk{padding:20px;border-radius:18px;background:#f0f1ee;color:#596758}.photo-risk h2{display:flex;align-items:center;gap:8px;margin:8px 0}.photo-risk p{font-size:12px;line-height:1.8}.photo-risk ul{padding-left:22px;font-size:13px;line-height:1.9}.photo-risk.red{background:#fff0eb;color:#9c3c2f}.photo-risk.orange{background:#fff3df;color:#916325}.photo-risk.green{background:#e9f1e8;color:#174c37}.photo-nutrients{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.photo-nutrients>div{background:#f6f8f2;padding:18px;border:1px solid var(--line);border-radius:16px;min-width:0}.photo-nutrients span{font-size:12px;color:var(--muted)}.photo-nutrients strong{font-size:26px;display:block;color:#174c37;margin:10px 0}.photo-nutrients small{font-size:13px}.photo-nutrients p{font-size:11px;color:var(--muted);overflow-wrap:anywhere;line-height:1.8}.photo-sources{margin:18px 0;font-size:12px}.photo-sources summary{padding:12px 0;cursor:pointer}.photo-sources>div{padding:12px 0;border-bottom:1px solid var(--line)}.photo-sources p{font-size:12px}.photo-sources a{display:inline-block;padding:8px 0}
@media(max-width:720px){.page-tools>.toolbar .tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.page-tools>.toolbar .tabs button{font-size:12px;padding:10px 4px}.photo-intro{padding:18px}.photo-intro h2{font-size:18px}.photo-intro p{font-size:11px;line-height:1.8}.photo-layout{grid-template-columns:minmax(0,1fr);gap:16px}.photo-placeholder{min-height:190px}.photo-preview{max-height:250px}.photo-layout>.panel>p{font-size:12px}.photo-service span{font-size:10px}.photo-service .link-btn{font-size:11px;white-space:nowrap}.photo-risk{padding:16px}.photo-risk h2{font-size:17px}.photo-results{padding:16px}.photo-nutrients{gap:10px}.photo-nutrients>div{padding:13px}.photo-nutrients strong{font-size:23px}.photo-nutrients span{font-size:10px}.photo-item .section-head strong{font-size:14px}.photo-confirm>.field{margin-top:16px}.photo-pick-actions .btn{font-size:13px}.photo-results>.modal-actions{position:static;padding:0;border:0}}

.recipe-home-actions{display:flex;flex-wrap:wrap;gap:8px}.recipe-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}.library-recipe{padding:18px 0;border-bottom:1px solid var(--line)}.library-recipe h3{margin:10px 0;overflow-wrap:anywhere}.library-actions{display:flex;gap:10px;margin-top:12px}.cooking-steps{list-style:none;padding:0;display:grid;gap:12px}.cooking-steps li{background:#f6f8f2;border:1px solid var(--line);border-radius:16px;padding:16px}.cooking-steps label{display:flex;align-items:flex-start;gap:10px;cursor:pointer}.cooking-steps input{width:20px;height:20px;flex-shrink:0;accent-color:#174c37;margin-top:3px}.step-number{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;border-radius:50%;background:#dfead5;color:#174c37;font-size:13px;font-weight:bold}.step-copy{min-width:0;display:grid;gap:6px;line-height:1.85;font-size:14px}.step-copy strong{font-size:15px}.cooking-steps label:has(input:checked) .step-copy{opacity:.6}.cooking-steps label:has(input:checked) .step-number{background:#174c37;color:white}
@media(max-width:720px){.recipe-home-actions{justify-content:flex-end;gap:6px}.recipe-filters{grid-template-columns:1fr 1fr}.recipe-filters>.field:first-child{grid-column:1/-1}.cooking-steps li{padding:13px 11px}.cooking-steps label{gap:8px}.step-copy{font-size:13px}.step-copy strong{font-size:14px}.library-actions .btn{flex:1;min-height:46px}.library-recipe h3{font-size:16px}}
.recipe-entry{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:18px;margin:16px 0;background:#e8efdf;border:1px solid #c8d9b7;border-radius:18px}.recipe-entry p{font-size:13px;margin:6px 0}.recipe-entry small{font-size:11px;color:var(--muted)}.recipe-limit{color:#916325;margin-top:8px}.library-actions button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:720px){.recipe-entry{padding:14px;gap:10px}.recipe-entry strong{font-size:14px}.recipe-entry p{font-size:11px}.recipe-entry .btn{white-space:nowrap;font-size:12px;padding:12px}}
