@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800&display=swap');
:root{font-family:'Golos Text',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#162337;background:#f3f5f9;font-synthesis:none;font-size:18px;--blue:#155bd7;--blue-soft:#eaf1ff;--ink:#162337;--muted:#637086;--line:#e3e7ee;--green:#187452;--red:#b23838}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button,a,input,select{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #eea926;outline-offset:3px}button{color:inherit}button:disabled{opacity:.5;cursor:not-allowed}h1,h2,h3,p{margin:0}h1{font-size:2rem;letter-spacing:-.055em;line-height:1.16;font-weight:800}h2{font-size:1.35rem;letter-spacing:-.035em;line-height:1.25}h3{font-size:1.05rem;line-height:1.35}a{color:var(--blue)}.muted{color:var(--muted)}.small{font-size:.8rem;line-height:1.5}.eyebrow{font-size:.75rem;letter-spacing:.11em;text-transform:uppercase;font-weight:600;color:var(--muted)}.spacer{flex:1}.row{display:flex;align-items:center;gap:12px}.wrap{flex-wrap:wrap}.between{justify-content:space-between}.stack{display:grid;gap:18px}.icon{width:22px;height:22px;display:inline-block;flex-shrink:0;vertical-align:middle;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.badge{font-size:.75rem;font-weight:600;padding:6px 10px;border-radius:8px;background:#eef1f5;color:#4c5b70;white-space:nowrap}.badge.blue{color:var(--blue);background:var(--blue-soft)}.badge.green{color:var(--green);background:#e9f6ee}
.shell{max-width:1280px;margin:0 auto;min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}.rail{padding:34px 22px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;border-right:1px solid var(--line);background:#fff}.brand{display:flex;align-items:center;gap:11px;font-size:1.35rem;font-weight:800;letter-spacing:-.06em}.brand-mark{display:grid;place-items:center;width:40px;height:40px;background:var(--blue);border-radius:12px;color:#fff;flex-shrink:0}.brand-mark .icon{width:26px;height:26px}.rail-sub{margin:12px 0 36px;font-size:.8rem;color:var(--muted)}.rail-nav{display:grid;gap:9px}.nav-item{border:0;background:transparent;display:flex;gap:12px;align-items:center;min-height:58px;border-radius:12px;padding:14px 13px;text-align:left;color:#5d6b80;font-size:.9rem;font-weight:500}.nav-item.active{background:var(--blue-soft);color:var(--blue);font-weight:700}.nav-count{margin-left:auto;font-size:.7rem;background:white;border-radius:6px;padding:2px 6px}.rail-footer{margin-top:auto}.profile{display:flex;align-items:center;gap:10px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 12px;min-height:50px}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eaf1ff;color:var(--blue);font-size:.8rem;font-weight:700}.rail-footer .profile{width:100%}.rail-footer .quiet{margin-top:14px;width:100%}.workspace{padding:32px 42px 48px;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:35px}.demo-badge{display:flex;align-items:center;gap:7px;background:transparent;border:0;color:var(--muted);font-size:.75rem;padding:8px 0}.demo-badge .icon{width:17px;height:17px}.mobile-brand,.mobile-profile{display:none}.heading{margin-bottom:26px}.heading p{margin-top:10px;color:var(--muted);line-height:1.5}.page-content{display:grid;gap:24px}.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:24px;align-items:start}.panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:25px;box-shadow:0 3px 12px #16233703}.panel-title{margin-bottom:22px}.button{border:0;border-radius:12px;padding:14px 18px;min-height:54px;font-weight:600;font-size:.9rem;display:inline-flex;align-items:center;justify-content:center;gap:10px;background:var(--blue);color:#fff}.button:hover{filter:brightness(.96)}.button.secondary{background:#f1f4f8;color:var(--ink)}.button.outline{border:1px solid var(--line);background:#fff;color:var(--ink)}.button.danger{background:#fff0ef;color:var(--red)}.button.full{width:100%}.quiet{background:none;border:0;min-height:44px;padding:8px 4px;display:inline-flex;justify-content:center;align-items:center;gap:8px;color:var(--blue);font-size:.85rem;font-weight:500}.quiet.muted{color:var(--muted)}.icon-btn{border:0;background:transparent;min-height:44px;min-width:44px;padding:10px;display:grid;place-items:center;border-radius:10px;color:var(--muted)}.icon-btn:hover{background:#f0f3f8}.section-line{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:10px}.section-label{font-size:.85rem;font-weight:600;color:var(--muted)}.drafts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.draft-card{min-height:130px;border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px;text-align:left;display:flex;flex-direction:column;gap:10px;position:relative;min-width:0}.draft-card.selected{border:2px solid var(--blue);padding:17px;background:#f1f6ff}.draft-card.selected:after{content:'';position:absolute;bottom:-7px;left:28px;width:12px;height:12px;background:#f1f6ff;border-right:2px solid var(--blue);border-bottom:2px solid var(--blue);transform:rotate(45deg)}.draft-card h3{font-size:.95rem}.draft-card p{font-size:.75rem;color:var(--muted);line-height:1.4}.draft-card .icon{width:25px;height:25px;color:var(--blue)}.draft-card.new{border-style:dashed;justify-content:center;align-items:center;color:var(--blue);background:transparent;font-size:.85rem;font-weight:600}.draft-card .draft-check{margin-left:auto;width:20px;height:20px}.ingredients{list-style:none;padding:0;margin:0}.ingredient{display:flex;align-items:center;gap:8px;padding:14px 0;border-bottom:1px solid #eef0f4}.ingredient:last-child{border-bottom:0}.ingredient-main{flex:1;min-width:0}.ingredient-name{font-size:.95rem;font-weight:500;overflow-wrap:anywhere}.ingredient-source{font-size:.72rem;color:var(--muted);margin-top:4px}.ingredient-weight{font-size:.9rem;font-weight:600;white-space:nowrap}.ingredient .icon-btn{min-width:40px;padding:8px}.ingredient .icon{width:18px}.add-ingredient{margin-top:9px}.totals-line{display:flex;align-items:center;justify-content:space-between;background:#f3f6fa;border-radius:12px;padding:14px 16px;margin:17px 0;gap:10px}.totals-line strong{font-size:1.1rem;white-space:nowrap}.actions-bar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.voice-button{background:var(--blue);color:#fff}.voice-button .icon{width:23px;height:23px}.hint{font-size:.78rem;color:var(--muted);line-height:1.55}.saved-line{display:flex;gap:6px;align-items:center;font-size:.72rem;color:var(--muted);margin-top:14px}.saved-line .icon{width:15px;height:15px}.side-note{padding:20px;background:#eaf1ff;border-radius:18px;color:#264978}.side-note h3{font-size:.95rem;margin:14px 0 9px}.side-note p{font-size:.8rem;line-height:1.6}.side-note .icon{color:var(--blue)}.side-stat{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;margin-top:16px}.side-stat p{font-size:.8rem;line-height:1.55;margin-top:8px}.side-stat .number{font-size:1.8rem;font-weight:700;letter-spacing:-.06em}.containers-preview{display:flex;gap:10px;align-items:center;margin-top:14px;font-size:.8rem}.containers-preview span{flex:1}.bottom-nav{display:none}.list-grid{display:grid;gap:14px}.dish-card{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;width:100%;text-align:left}.dish-card:hover{border-color:#abc3ed}.dish-photo{width:94px;height:102px;object-fit:cover;object-position:55% 65%;border-radius:12px;flex-shrink:0}.dish-placeholder{width:72px;height:78px;border-radius:12px;background:#edf3ff;display:grid;place-items:center;color:var(--blue);flex-shrink:0}.dish-placeholder .icon{width:31px;height:31px}.dish-info{flex:1;min-width:0}.dish-info h3{margin:3px 0 6px;overflow-wrap:anywhere}.dish-info p{font-size:.78rem;line-height:1.5;color:var(--muted)}.dish-kcal{font-weight:700;font-size:.9rem;margin-top:10px}.dish-kcal span{font-size:.75rem;color:var(--muted);font-weight:400}.dish-add{width:44px;height:44px;border-radius:50%;background:var(--blue-soft);color:var(--blue);display:grid;place-items:center;flex-shrink:0}.meal-summary{background:#fff;border:1px solid var(--line);border-radius:20px;padding:25px}.calorie-total{display:flex;align-items:baseline;gap:8px;margin-top:15px}.calorie-total strong{font-size:2.7rem;line-height:1.1;letter-spacing:-.07em}.calorie-total span{font-size:.85rem;color:var(--muted)}.progress{height:8px;border-radius:8px;background:#edf1f7;overflow:hidden;margin:18px 0}.progress-fill{height:100%;background:var(--blue);border-radius:8px;max-width:100%}.macro-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:21px}.macro-grid p{font-size:.75rem;color:var(--muted);margin-bottom:5px}.macro-grid strong{font-size:1.05rem;font-weight:600}.macro-grid span{font-size:.78rem;font-weight:400}.entry{padding:17px 0;border-bottom:1px solid var(--line)}.entry:last-child{border:0;padding-bottom:0}.entry:first-of-type{padding-top:0}.entry h3{font-size:.95rem}.entry .meta{font-size:.8rem;color:var(--muted);margin-top:5px}.entry-buttons{display:flex;gap:8px;margin-top:13px;flex-wrap:wrap}.entry-buttons .button{min-height:46px;padding:10px 13px;font-size:.8rem}.entry-kcal{font-weight:600;font-size:.85rem;white-space:nowrap}.empty{padding:34px 20px;text-align:center;color:var(--muted);line-height:1.5}.empty .icon{width:34px;height:34px;margin-bottom:12px}.empty p{font-size:.85rem}.planned-heading{display:flex;align-items:center;gap:10px;margin-bottom:18px}.planned-heading span{color:#845b13;background:#fff3d8;border-radius:7px;padding:4px 8px;font-size:.75rem}.planned-note{margin-top:-6px;margin-bottom:20px;font-size:.78rem;color:var(--muted);line-height:1.45}
dialog{border:none;padding:0;border-radius:24px;max-width:520px;width:calc(100% - 32px);max-height:90dvh;box-shadow:0 20px 80px #10284b33;color:var(--ink);background:white;overscroll-behavior:contain}dialog::backdrop{background:#17294480;backdrop-filter:blur(4px)}.sheet-inner{padding:25px}.sheet-header{display:flex;align-items:flex-start;gap:10px;margin-bottom:22px}.sheet-header h2{flex:1;padding-top:7px}.sheet-header .icon-btn{margin-right:-10px}.sheet-intro{font-size:.86rem;color:var(--muted);line-height:1.6;margin-bottom:22px}.field{display:block;margin:19px 0}.field>span,.field>label{display:block;font-weight:600;font-size:.85rem;margin-bottom:9px}input,select{border:1px solid #ccd4e0;border-radius:11px;min-height:54px;padding:13px;width:100%;background:#fff;color:var(--ink);font-size:1rem}input[type=number]{font-variant-numeric:tabular-nums}.field-help{margin-top:7px;font-size:.75rem;color:var(--muted);line-height:1.5}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-error{color:var(--red);font-size:.8rem;min-height:24px;margin:8px 0}.modal-actions{display:flex;gap:10px;margin-top:20px}.modal-actions>*{flex:1}.command{width:100%;padding:17px;text-align:left;border:1px solid var(--line);border-radius:13px;background:#f7f9fc;font-size:.95rem;line-height:1.5;display:flex;gap:12px;align-items:flex-start;margin-top:11px}.command .icon{color:var(--blue);margin-top:3px}.command:hover{background:var(--blue-soft);border-color:#afc8f2}.command-preview{border-left:3px solid var(--blue);padding:12px 16px;background:var(--blue-soft);border-radius:0 10px 10px 0;margin:20px 0;font-size:.88rem;line-height:1.6}.review-list{padding:0;list-style:none;margin:15px 0}.review-list li{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding:11px 0;font-size:.9rem}.review-list li span:last-child{white-space:nowrap;font-weight:500}.notice{border-radius:12px;background:#f4f6fa;padding:15px;font-size:.8rem;line-height:1.6;color:var(--muted)}.result-box{background:var(--blue-soft);border-radius:14px;padding:18px;margin:18px 0}.result-box strong{display:block;font-size:1.6rem;letter-spacing:-.045em;margin:7px 0}.portion-number{position:relative}.portion-number input{font-size:2rem;font-weight:700;padding:15px 65px 15px 18px;height:82px}.portion-number span{position:absolute;right:20px;top:29px;font-size:.95rem;color:var(--muted)}.segmented{display:flex;background:#eef2f7;border-radius:12px;padding:4px;margin:20px 0}.segmented button{border:0;background:transparent;border-radius:9px;padding:13px 8px;flex:1;font-size:.85rem;font-weight:600;color:var(--muted);min-height:48px}.segmented button.active{background:#fff;color:var(--ink);box-shadow:0 2px 7px #20345514}.profile-choice{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:1px solid var(--line);padding:15px;border-radius:12px;background:#fff;min-height:60px;margin-bottom:10px}.profile-choice.active{border-color:var(--blue);background:var(--blue-soft)}.profile-choice .icon{margin-left:auto;color:var(--blue)}.review-foot{margin-top:18px}.about-list{margin:0;padding-left:20px;font-size:.88rem;line-height:1.7}.about-list li{margin:9px 0}#toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:10;background:#162337;color:#fff;padding:15px 22px;border-radius:13px;box-shadow:0 8px 30px #16233730;font-size:.86rem;width:max-content;max-width:calc(100% - 32px);transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:1280px){.shell{border-left:1px solid var(--line);border-right:1px solid var(--line)}}
@media(max-width:1060px){.shell{grid-template-columns:190px minmax(0,1fr)}.rail{padding:30px 16px}.workspace{padding:30px 26px}.page-grid{grid-template-columns:minmax(0,1fr)}.aside{display:none}}
@media(max-width:700px){:root{font-size:18px}.shell{display:block}.rail{display:none}.workspace{padding:16px 18px calc(105px + env(safe-area-inset-bottom))}.topbar{margin-bottom:24px;flex-wrap:wrap;gap:12px}.mobile-brand{display:flex;gap:8px}.brand{font-size:1.2rem}.brand-mark{width:34px;height:34px;border-radius:10px}.brand-mark .icon{width:23px;height:23px}.mobile-profile{display:flex;padding:6px 10px;min-height:44px;font-size:.8rem}.mobile-profile .avatar{width:26px;height:26px}.topbar>.eyebrow{display:none}.demo-badge{font-size:.72rem;padding:0;min-height:28px;order:3;flex-basis:100%;justify-content:space-between}.demo-badge:after{content:'Примерные данные';font-size:.7rem;color:var(--muted)}h1{font-size:1.65rem}.heading{margin-bottom:23px}.heading p{font-size:.86rem;margin-top:8px}.heading .button{min-height:46px;padding:11px 12px;font-size:.8rem}.heading .row{gap:8px}.page-content{gap:20px}.page-grid{gap:20px}.panel{padding:19px;border-radius:17px}.panel-title{margin-bottom:14px}.drafts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.draft-card{padding:15px;min-height:119px}.draft-card.selected{padding:14px}.draft-card.new{grid-column:1/-1;min-height:48px;flex-direction:row;gap:7px;padding:10px}.draft-card.new .icon{width:19px;height:19px}.draft-card.selected:after{display:none}.ingredient{padding:13px 0}.ingredient-name{font-size:.92rem}.ingredient-weight{font-size:.88rem}.ingredient-source{font-size:.7rem}.ingredient .icon-btn{min-width:36px;width:36px;padding:7px}.actions-bar{grid-template-columns:1fr}.actions-bar .button{min-height:56px}.totals-line{padding:13px;margin:16px 0}.totals-line .small{font-size:.74rem}.bottom-nav{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(3,1fr);padding:9px 12px calc(8px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(16px);border-top:1px solid var(--line);z-index:3}.bottom-nav .nav-item{display:flex;flex-direction:column;gap:4px;justify-content:center;padding:6px 3px;min-height:57px;font-size:.73rem;border-radius:10px}.bottom-nav .nav-item.active{background:var(--blue-soft)}.bottom-nav .nav-count{display:none}.bottom-nav .icon{width:23px;height:23px}.dish-card{gap:13px;padding:15px}.dish-photo{width:74px;height:100px}.dish-placeholder{width:57px;height:68px}.dish-add{width:36px;height:36px}.dish-info h3{font-size:1rem}.dish-info p{font-size:.74rem}.dish-kcal{font-size:.85rem}.dish-kcal span{font-size:.72rem}.meal-summary{padding:21px}.macro-grid{gap:10px}.macro-grid p{font-size:.73rem}.calorie-total strong{font-size:2.5rem}.entry-kcal{font-size:.8rem}.entry h3{font-size:.9rem}.entry-buttons .button{font-size:.77rem;padding:10px 12px}.sheet-inner{padding:21px}dialog{width:100%;max-width:100%;max-height:94dvh;margin:auto 0 0;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom)}.sheet-header h2{font-size:1.25rem}.command{font-size:.88rem}.modal-actions{flex-wrap:wrap}.modal-actions .button{min-width:120px}.two-fields{grid-template-columns:1fr 1fr}.two-fields .field{min-width:0}.small{font-size:.78rem}#toast{bottom:calc(100px + env(safe-area-inset-bottom));font-size:.8rem}.review-list li{font-size:.86rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Comfortable kitchen controls */
.button{min-height:58px;padding:16px 20px;font-size:.95rem}
.quiet{min-height:56px;padding:12px 10px;font-size:.9rem}
.icon-btn{min-height:56px;min-width:56px;width:56px;padding:15px}
.icon-btn .icon{width:24px;height:24px}
input,select{min-height:60px;padding:16px;font-size:1rem}
.profile{min-height:56px}.profile-choice{min-height:72px;padding:18px}
.sheet-header .icon-btn{margin-top:0}.sheet-header h2{padding-top:12px}
.sheet-intro{font-size:.9rem}.sheet-header{margin-bottom:18px}
.panel-title>.icon-btn{background:#f1f4f8;flex-shrink:0}
.ingredient{padding:0;border-bottom:0;margin-bottom:10px}
.ingredient-touch{display:flex;align-items:center;gap:12px;width:100%;min-height:82px;padding:14px 12px;text-align:left;border:1px solid var(--line);border-radius:14px;background:#fff}
.ingredient-touch:hover{background:#f4f7ff;border-color:#aec6ed}
.ingredient-touch:active,.vessel-choice:active,.vessel-group:active{background:#eaf1ff}
.ingredient-touch .ingredient-name,.ingredient-touch .ingredient-source{display:block}
.ingredient-touch .ingredient-name{font-size:1rem;line-height:1.4}
.ingredient-touch .ingredient-source{font-size:.78rem;margin-top:5px}
.ingredient-touch .ingredient-weight{font-size:.95rem}
.touch-edit{display:grid;place-items:center;flex-shrink:0;color:var(--blue);width:32px;height:36px}
.touch-edit .icon{width:22px;height:22px}
.add-ingredient{margin-top:4px}
.actions-bar{display:grid;grid-template-columns:1fr;gap:14px}
.button.finish-button{width:100%;min-height:76px;background:#147a48;color:#fff;font-size:1.1rem;font-weight:700;border-radius:15px;box-shadow:0 4px 12px #147a4818}
.button.finish-button:hover{background:#106b3e}.button.finish-button .icon{width:29px;height:29px}
.button.finish-button:disabled{background:#e6eeea;color:#65776d;opacity:1;box-shadow:none}
.cookware-open{min-height:56px;padding:13px 16px;flex-shrink:0}
.cookware-selection{display:grid;gap:10px;margin:23px 0 19px}
.vessel-selected{width:100%;display:flex;align-items:center;gap:14px;min-height:86px;border:1px solid #a9c1e9;border-radius:14px;background:#f2f6ff;padding:17px;text-align:left;color:var(--blue)}
.vessel-selected>span{flex:1;min-width:0}
.vessel-selected strong,.vessel-selected small{display:block;overflow-wrap:anywhere}
.vessel-selected strong{font-size:.98rem;line-height:1.4;font-weight:600}
.vessel-selected small{color:var(--muted);font-size:.8rem;line-height:1.45;margin-top:5px}
.vessel-selected.has-selection{background:#fff;border-color:var(--line);color:var(--ink)}
.search-field{margin:16px 0}.search-field>span{font-size:.85rem}
.vessel-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 0}
.vessel-group{display:flex;align-items:center;gap:10px;text-align:left;min-height:80px;padding:15px 12px;border:1px solid var(--line);border-radius:14px;background:#f5f7fc;color:var(--ink)}
.vessel-group>.icon{color:var(--blue);width:24px;height:24px}
.vessel-group>span{flex:1;font-size:.86rem;font-weight:600;overflow-wrap:anywhere}
.vessel-group>small{font-size:.8rem;color:var(--muted)}
.vessel-list{display:grid;gap:12px}
.vessel-choice{display:flex;align-items:center;gap:14px;width:100%;min-height:84px;padding:18px;text-align:left;border:1px solid var(--line);border-radius:14px;background:#fff}
.vessel-choice>span{flex:1;min-width:0}
.vessel-choice strong,.vessel-choice small{display:block;overflow-wrap:anywhere}
.vessel-choice strong{font-size:1rem;font-weight:600;line-height:1.45}
.vessel-choice small{font-size:.85rem;color:var(--muted);margin-top:6px;line-height:1.5}
.vessel-choice>.icon{color:var(--blue);width:25px;height:25px}
.vessel-choice.selected{border:2px solid var(--blue);padding:17px;background:var(--blue-soft)}
.zero-vessel{background:#f3f6fa;margin:16px 0 20px}.zero-vessel .icon:last-child{color:var(--muted)}
.vessel-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 16px}
.vessel-list-heading>.section-label{text-align:right;font-size:.85rem}
.vessel-list-heading>.button{font-size:.85rem;padding:14px 16px}
.group-choice{min-height:60px;padding:14px 10px;background:#fff;border:1px solid var(--line);border-radius:12px;font-size:.9rem}
.group-choice.active{border:2px solid var(--blue);padding:13px 9px;background:var(--blue-soft);color:var(--blue);font-weight:600}
.segmented button{min-height:56px}.entry-buttons .button{min-height:56px;font-size:.86rem;padding:14px}
@media(max-width:700px){
 .workspace{padding-bottom:calc(205px + env(safe-area-inset-bottom))}
 .mobile-profile{min-height:52px;padding:10px 12px}
 .topbar .demo-badge{min-height:44px}
 .bottom-nav .nav-item{min-height:64px;font-size:.78rem}
 .bottom-nav .nav-item{position:relative}
 .bottom-nav .nav-count{display:grid;place-items:center;position:absolute;top:2px;left:calc(50% + 8px);margin:0;min-width:20px;height:20px;padding:0 4px;border-radius:999px;background:#d92d28;color:#fff;box-shadow:0 0 0 2px #fff;font-size:12px;font-weight:700;line-height:1}
 .draft-card{min-height:138px;padding:18px}.draft-card.selected{padding:17px}
 .draft-card h3{font-size:1rem}.draft-card p{font-size:.8rem}.draft-card.new{min-height:62px;padding:14px}
 .panel{padding:17px}.panel-title{gap:10px}.panel-title h2{font-size:1.4rem;overflow-wrap:anywhere}
 .ingredient-touch{min-height:88px;padding:14px 10px;gap:9px}
 .ingredient-touch .ingredient-name{font-size:.97rem}.ingredient-touch .ingredient-weight{font-size:.9rem}
 .touch-edit{width:26px}.ingredient-touch .ingredient-source{font-size:.76rem}
 .actions-bar{display:grid}.actions-bar .button.finish-button{min-height:80px;font-size:1.12rem}
 .vessel-selected{padding:16px;min-height:92px;gap:12px}
 .vessel-groups{gap:10px}.vessel-group{min-height:84px;padding:12px 10px;flex-wrap:wrap;gap:8px}
 .vessel-group>span{flex-basis:calc(100% - 42px);font-size:.9rem}.vessel-group>small{display:none}
 .vessel-choice{min-height:88px;padding:18px 16px}.vessel-choice.selected{padding:17px 15px}
 .sheet-inner{padding:20px}.sheet-header h2{font-size:1.3rem}
 .entry .icon-btn{min-width:52px;width:52px;min-height:56px;padding:12px}
 .entry-buttons{gap:10px}.entry-buttons .button{min-height:56px;font-size:.85rem}
 #toast{bottom:calc(180px + env(safe-area-inset-bottom))}
}

/* Ingredient inputs above the list; completion controls below it. */
.ingredient-controls{display:grid;gap:10px;margin:0 0 20px}
.ingredient-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ingredient-actions .button{width:100%;min-width:0;min-height:62px;padding:14px 12px;gap:8px;white-space:nowrap}
.cooking-footer{display:grid;gap:12px;margin-top:22px}
.cooking-footer .totals-line{margin:0;background:transparent;padding:8px 0;gap:14px}
.cooking-footer .totals-line .small{font-size:.85rem}
.cooking-footer .cookware-selection{margin:0;display:block}
.cooking-footer .cookware-selection>.section-label{display:none}
.cooking-footer .vessel-selected{min-height:76px;padding:13px 16px}
.cooking-footer .vessel-selected small{font-size:.76rem;line-height:1.4}
.cooking-footer .finish-button{min-height:78px}
@media(max-width:700px){
 .ingredient-actions{gap:10px}
 .ingredient-actions .button{font-size:.9rem;padding:14px 10px;min-height:62px}
 .ingredient-actions .icon{width:21px;height:21px}
 .workspace:has(.cooking-footer){padding-bottom:calc(380px + env(safe-area-inset-bottom))}
 .cooking-footer{position:fixed;bottom:calc(82px + env(safe-area-inset-bottom));left:0;right:0;z-index:2;margin:0;padding:12px 18px 14px;gap:10px;background:#fffffff7;backdrop-filter:blur(14px);border-top:1px solid var(--line);box-shadow:0 -6px 24px #16233708}
 .cooking-footer .totals-line{padding:3px 0;min-height:32px}
 .cooking-footer .totals-line strong{font-size:1.05rem}
 .cooking-footer .totals-line .small{font-size:.81rem}
 .cooking-footer .vessel-selected{min-height:72px;padding:10px 15px}
 .cooking-footer .vessel-selected strong{font-size:.95rem}
 .cooking-footer .finish-button{min-height:76px}
 .workspace:has(.cooking-footer)~.bottom-nav{border-top:0}
 body:has(.cooking-footer) #toast{bottom:calc(355px + env(safe-area-inset-bottom))}
}
@media(max-width:700px) and (max-height:650px){
 .cooking-footer{position:static;padding:0;margin-top:22px;border:0;background:none;box-shadow:none;backdrop-filter:none}
 .workspace:has(.cooking-footer){padding-bottom:calc(110px + env(safe-area-inset-bottom))}
}

.topbar-secondary{display:flex;align-items:center;gap:12px;margin-left:auto}.settings-open{background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--muted)}
.ingredient-suggestions{margin:20px 0;padding:18px;background:var(--blue-soft);border:1px solid #cad8f3;border-radius:14px}
.ingredient-suggestions h3{font-size:1rem;line-height:1.45;overflow-wrap:anywhere;margin:0 0 10px}
.ingredient-suggestions .hint{font-size:.85rem;line-height:1.5}
.ingredient-suggestions .field-help{font-size:.8rem}
.suggestion-preview{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;padding:0}
.suggestion-preview li{padding:8px 12px;border-radius:9px;background:#fff;font-size:.9rem;line-height:1.4;overflow-wrap:anywhere}
.suggestion-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.suggestion-button{display:flex;align-items:center;gap:9px;min-width:0;min-height:64px;padding:12px;text-align:left;border:1px solid #bacce9;border-radius:11px;background:#fff;color:var(--ink);font-size:.95rem;line-height:1.4}
.suggestion-button span{overflow-wrap:anywhere}.suggestion-button .icon{flex-shrink:0;width:21px;height:21px;color:var(--blue)}
.suggestion-button:hover{border-color:var(--blue)}.suggestion-button[aria-pressed="true"]{border:2px solid var(--blue);padding:11px;background:#e0eaff}
.suggestion-empty{margin:18px 0;font-size:.9rem}
@media(max-width:700px){.suggestion-button .icon{display:none}.suggestion-button{justify-content:center;text-align:center}}
@media(max-width:370px){.suggestion-buttons{grid-template-columns:1fr}.ingredient-suggestions{padding:14px}}
@media(max-width:700px){.topbar-secondary{flex-basis:100%;order:3;justify-content:space-between;margin-left:0}.topbar-secondary .demo-badge{flex-basis:auto;order:0;min-height:52px}.topbar-secondary .demo-badge:after{display:none}.topbar-secondary .settings-open{min-width:56px;flex-shrink:0}}

/* Mobile cooking prototype: header and actions stay outside ingredient scrolling. */
.workspace:has(.cook-page){height:100dvh;display:flex;flex-direction:column;padding-bottom:20px;min-height:0}
.workspace:has(.cook-page) .topbar{flex-shrink:0;margin-bottom:16px}
.cook-page{display:flex;flex-direction:column;flex:1;min-height:0;max-width:760px;width:100%}
.cook-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;flex-shrink:0}
.cook-heading h1{font-size:1.7rem}
.cook-workspace{display:flex;flex-direction:column;flex:1;min-height:0}
.cooking-tabs{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;margin-bottom:16px;flex-shrink:0}
.cooking-tab-strip{position:relative;display:flex;gap:8px;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.cooking-tab-strip::-webkit-scrollbar{display:none}
.cooking-tab-strip .cooking-tab{flex:1 0 calc((100% - 16px)/3);min-width:96px}
.cooking-tabs.one-draft{grid-template-columns:minmax(0,1fr) 44px}
.cooking-tabs.no-drafts{grid-template-columns:minmax(0,1fr)}
.cooking-tab{position:relative;min-width:0;border:1px solid #cbd7e6;border-radius:14px 14px 4px 4px;background:white}
.cooking-tab.selected{border-color:var(--blue);background:var(--blue-soft);box-shadow:inset 0 -3px var(--blue)}
.select-cooking{width:100%;min-height:100px;padding:12px 10px 14px;border:0;background:transparent;display:flex;flex-direction:column;justify-content:space-between;gap:10px;text-align:left}
.tab-status{padding-right:32px;color:var(--muted);font-size:.68rem}
.tab-title{font-size:.94rem;font-weight:600;overflow-wrap:anywhere;max-width:100%}
.tab-menu{position:absolute;right:0;top:0;width:44px;height:44px;border:0;background:transparent;color:var(--blue);font-size:1.25rem}
.new-cooking{grid-column:2;grid-row:1;min-height:102px;border:1px solid #cbd7e6;border-radius:14px 14px 4px 4px;background:white;color:var(--blue);display:flex;align-items:center;justify-content:center;gap:10px;font-size:.95rem;font-weight:600;padding:8px}
.one-draft .new-cooking{grid-column:2}.no-drafts .new-cooking{grid-column:1;background:var(--blue-soft)}
.cook-workspace.compact .select-cooking{height:64px}
.cook-workspace.compact .new-cooking{height:66px}
.cook-workspace .ingredient-controls{flex-shrink:0;margin-bottom:14px}
.cook-workspace .ingredient-actions .button{min-height:50px;font-size:.9rem;padding:10px;color:var(--blue)}
.cooking-scroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-width:thin;scrollbar-color:#cbd7e6 transparent;padding:2px 4px 4px 0}
.cook-page .ingredient-touch{min-height:84px;padding:12px 10px 12px 14px}
.cook-page .ingredient-main{display:block}
.cook-page .ingredient-source.pending{color:var(--blue)}
.cook-page .touch-edit{width:44px;height:44px;border-radius:10px;background:var(--blue-soft);color:var(--blue)}
.cook-page .totals-line{padding:9px 2px;margin:0;background:none}
.cook-page .totals-line .small{font-size:.75rem}
.cook-page .totals-line strong{font-size:.9rem}
.cook-page .cooking-scroll>.hint{padding:8px 2px 14px;font-size:.7rem}
.cook-footer{flex-shrink:0;border-top:1px solid var(--line);padding:10px 0 0}
.finish-actions{display:grid;grid-template-columns:minmax(94px,1fr) minmax(0,1.7fr);gap:9px}
.finish-actions .button{min-height:52px;font-size:.9rem;padding:8px;gap:7px;margin:0}
.finish-actions .finish-button{border-radius:12px;box-shadow:none}
.finish-actions .cookware-compact{color:var(--blue)}
.tare-summary{font-size:.75rem;color:var(--muted);line-height:1.3;display:flex;gap:8px;align-items:center}
.tare-summary .quiet{min-height:44px;margin-left:auto;padding:4px;font-size:.75rem}
.cancel-notice{display:flex;align-items:center;gap:8px;background:var(--blue-soft);padding:8px 12px;border-radius:12px;font-size:.78rem;margin-bottom:12px;flex-shrink:0}
.cancel-notice .quiet{font-size:.75rem;min-height:44px;padding:4px}
.cancel-cooking{color:var(--red)}
.plan-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0 16px}
.plan-choice{display:flex;align-items:center;gap:8px;padding:12px;min-height:58px;text-align:left;background:white;border:1px solid var(--line);border-radius:12px;font-size:.9rem;overflow-wrap:anywhere}
.plan-choice span{min-width:0}.plan-choice .icon{color:var(--blue);width:20px}
.plan-choice.selected{border-color:var(--blue);background:var(--blue-soft)}
.more-products{margin:18px 0}.more-products summary{padding:14px 0;min-height:48px;color:var(--blue);cursor:pointer}
@media(max-width:700px){
 .shell:has(.cook-page){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .workspace:has(.cook-page){height:auto;flex:1;min-height:0;padding:12px 14px 8px}
 .shell:has(.cook-page)>.bottom-nav{position:static;flex-shrink:0}
 .workspace:has(.cook-page) .topbar{margin-bottom:8px;row-gap:0}
 .workspace:has(.cook-page) .brand{font-size:1.18rem}
 .workspace:has(.cook-page) .brand-mark{width:30px;height:30px;border-radius:9px}.workspace:has(.cook-page) .brand-mark .icon{width:21px;height:21px}
 .workspace:has(.cook-page) .mobile-profile{min-height:44px;padding:6px 8px}.workspace:has(.cook-page) .mobile-profile>span:not(.avatar){display:none}
 .workspace:has(.cook-page) .topbar-secondary{flex-basis:auto;order:0;margin-left:0;gap:4px}
 .workspace:has(.cook-page) .topbar-secondary .demo-badge{display:none}
 .workspace:has(.cook-page) .settings-open{min-width:44px;width:44px;min-height:44px;padding:10px;border:0;background:none}
 .cook-heading{margin-bottom:12px}.cook-heading h1{font-size:1.5rem}
 .cooking-tabs{margin-bottom:12px}.select-cooking{padding:12px 8px}
 .tab-title{font-size:.9rem}.tab-status{font-size:.64rem}
 .cook-workspace .ingredient-controls{gap:8px;margin-bottom:10px}
 .cook-page .ingredient-touch .ingredient-name{font-size:.95rem}
 .cook-page .ingredient-touch .ingredient-source{font-size:.75rem}
 .cook-page .totals-line{gap:6px}.bottom-nav{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
 body:has(.cook-page) #toast{bottom:calc(150px + env(safe-area-inset-bottom))}
}
@media(max-width:370px){.workspace:has(.cook-page){padding-left:10px;padding-right:10px}.tab-title{font-size:.82rem}.tab-status{font-size:.61rem}.select-cooking{padding-left:6px;padding-right:6px}.finish-actions .button{font-size:.8rem}.plan-choices{grid-template-columns:1fr}}
@media(max-height:650px) and (max-width:700px){.select-cooking{min-height:78px;padding:8px}.new-cooking{min-height:80px}.cook-heading{margin-bottom:8px}.cooking-tabs{margin-bottom:8px}.cook-workspace .ingredient-actions .button{min-height:44px}.cook-heading h1{font-size:1.3rem}}

/* Phone review: readable ingredient weights and smoothly collapsing tabs. */
:root{font-size:19px}
.brand-mark .brand-icon{width:100%;height:100%;display:block;color:white}
.workspace:has(.cook-page) .brand-mark{width:36px;height:36px;border-radius:10px}
.select-cooking{width:calc(100% - 44px);height:100px;min-height:0;padding:8px 4px 8px 10px;gap:0;justify-content:center;transition:height 280ms cubic-bezier(.2,.7,.2,1)}
.tab-title{font-size:18px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.tab-menu{top:50%;transform:translateY(-50%)}
.new-cooking{height:102px;min-height:0;transition:height 280ms cubic-bezier(.2,.7,.2,1)}
.cook-page .ingredient-touch{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;min-height:84px;padding:10px 12px}
.cook-page .ingredient-touch .ingredient-name{font-size:21px;line-height:1.2;font-weight:600;overflow-wrap:anywhere}
.cook-page .ingredient-touch .ingredient-source{font-size:15px;line-height:1.25;margin-top:5px}
.ingredient-amount{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.cook-page .ingredient-touch .ingredient-weight{font-size:24px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.weight-unit{font-size:17px;font-weight:500}
.cook-page .touch-edit{width:20px;height:24px;border-radius:0;background:transparent;color:var(--blue)}
.cook-page .touch-edit .icon{width:20px;height:20px}
.cook-page .ingredient-touch.is-planned{background:#f3f5f9}
.cook-page .ingredient-touch.is-planned .ingredient-name{color:var(--muted);font-weight:500}
.cook-page .ingredient-touch.is-planned .ingredient-weight{color:var(--muted)}
.cook-page .totals-line .small,.cook-page .cooking-scroll>.hint{font-size:15px}
.cook-heading h1{font-size:28px}
.cook-workspace .ingredient-controls .section-label{font-size:18px}
.cook-workspace .ingredient-actions .button,.finish-actions .button{font-size:17px}
.bottom-nav .nav-item{font-size:15px}
@media(max-width:370px){.select-cooking{padding:8px 2px 8px 6px}.tab-title{font-size:17px;display:block;white-space:nowrap;text-overflow:ellipsis}.finish-actions .button{font-size:16px}}
@media(max-width:340px){.cook-page .ingredient-touch{padding:10px;gap:8px}.ingredient-amount{gap:5px}.cook-page .ingredient-touch .ingredient-name{font-size:20px}.cook-page .ingredient-touch .ingredient-weight{font-size:23px}}
@media(max-height:650px) and (max-width:700px){.select-cooking{height:78px}.new-cooking{height:80px}}
@media(prefers-reduced-motion:reduce){.select-cooking,.new-cooking{transition:none}}

/* The logo is a 44 px refresh target without enlarging the header. */
.brand-refresh{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:4px;border:0;border-radius:12px;background:transparent}
.brand-refresh .brand-mark{flex-shrink:0}
.brand-refresh:hover{background:var(--blue-soft)}
.brand-refresh:disabled{opacity:1;cursor:wait}
.is-refreshing .brand-icon{animation:brand-refresh-spin .7s linear infinite;transform-origin:50% 50%}
@keyframes brand-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.is-refreshing .brand-icon{animation:none}}

/* Mobile feedback: compact notices, inline confirmation and immediately editable weight. */
.cancel-notice>span{flex:1;min-width:0;overflow-wrap:anywhere}
.cancel-notice .icon-btn{flex-shrink:0;width:44px;height:44px;padding:10px}
.cancel-notice{gap:4px;padding:6px 8px}
.custom-ingredient-entry{display:flex;gap:6px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:4px;background:white}
.custom-ingredient-entry input{min-width:0;flex:1;border:0;padding:10px 8px;width:0;background:transparent}
.custom-ingredient-entry .button{min-width:44px;min-height:44px;width:44px;height:44px;padding:10px;flex-shrink:0;border-radius:9px}
.custom-confirmation{color:var(--green)}
.weight-modes{margin-bottom:20px}
.weight-modes button{min-height:48px;font-size:18px}
.weight-entry input{font-size:36px;font-weight:600;min-height:76px;font-variant-numeric:tabular-nums}
.weight-preview:empty{display:none}
.weight-preview{font-size:17px;line-height:1.4;margin-bottom:12px}
/* Only the active tab needs its actions; other titles keep the available width. */
.cooking-tab-strip .cooking-tab{flex-basis:calc((100% - 16px)/3);min-width:96px}
.cooking-tab:not(.selected) .tab-menu{display:none}
.cooking-tab:not(.selected) .select-cooking{width:100%;padding-right:8px}
.tab-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.cook-workspace.compact .tab-title{-webkit-line-clamp:2}
@media(max-height:650px) and (max-width:700px){.tab-title{-webkit-line-clamp:2}}
.custom-ingredient-entry .button{background:var(--green)}
.selected-ingredients{margin:16px 0 20px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f7f9fc}
.selected-ingredients .plan-choices{margin-bottom:0;gap:8px}
.selected-product{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;border:1px solid #cbd7e6;border-radius:12px;background:white;padding:5px 2px 5px 10px;font-size:17px;line-height:1.3}
.selected-product>span{min-width:0;overflow-wrap:anywhere}
.selected-product .icon-btn{width:44px;min-width:44px;height:44px;min-height:44px;padding:11px;flex-shrink:0;color:var(--muted)}
.quantity-units{margin:12px 0}
.quantity-units button{min-height:44px;font-size:18px}
#ingredient-quantity-fields .field-help{font-size:15px;margin:6px 0 12px}
#ingredient-quantity-fields .field{margin-bottom:12px}
#ingredient-quantity-fields .weight-modes{margin-bottom:12px}
.selected-ingredients .plan-choices{display:flex;flex-wrap:wrap}
.selected-product{flex:0 1 auto;max-width:100%}

/* Direct quantity editing: focus chooses replace or add. */
.ingredient-editor-heading{margin:8px 0 18px;overflow-wrap:anywhere}
.ingredient-editor-heading h3{font-size:26px;line-height:1.2;margin:0 0 6px;font-weight:650}
.ingredient-editor-heading p{font-size:21px;line-height:1.3;margin:0;color:var(--muted)}
.quantity-pair{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:8px;align-items:end}
.quantity-pair.single{grid-template-columns:minmax(0,1fr)}
.quantity-plus{align-self:center;margin-top:18px;font-size:25px;color:var(--muted);text-align:center}
.quantity-choice{min-width:0}
.quantity-choice>span{font-size:17px;font-weight:600}
.quantity-choice input{font-size:32px;min-height:76px;width:100%;padding:12px;background:#f5f7fa;color:var(--muted)}
.quantity-choice.active input{background:white;border-color:var(--blue);color:var(--ink);box-shadow:0 0 0 1px var(--blue)}
.quantity-choice.active>span{color:var(--blue)}
#ingredient-quantity-fields .weight-preview{font-size:22px;font-weight:600;line-height:1.3;color:var(--ink);margin:4px 0 18px}
.ingredient-delete{width:100%;min-height:44px;margin-top:12px;color:var(--red)}
@media(max-width:370px){.quantity-pair{gap:6px;grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr)}.quantity-pair.single{grid-template-columns:minmax(0,1fr)}.quantity-choice input{font-size:28px;padding:10px}.quantity-choice>span{font-size:16px}}

/* Reserve three rows; six products fit before horizontal scrolling is needed. */
.selected-ingredients{padding:12px}
.composition-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;height:36px;position:relative}
.composition-nav{display:flex;gap:2px;margin-right:-4px}
.composition-nav .icon-btn{width:44px;height:44px;color:var(--blue)}
.composition-nav .icon-btn:disabled{color:#b6bfcb;background:transparent;cursor:default}
.composition-nav[hidden],.composition-nav [hidden]{display:none}
.arrow-left{transform:rotate(90deg)}
.arrow-right{transform:rotate(-90deg)}
.selected-ingredients .plan-choices{position:relative;display:grid;grid-template-columns:none;grid-auto-flow:column;grid-template-rows:repeat(2,52px);grid-auto-columns:calc((100% - 6px)/2);gap:6px;height:156px;min-height:156px;margin:8px 0 0;padding-bottom:4px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;align-content:start}
.selected-ingredients.is-dense .plan-choices{grid-template-rows:repeat(3,46px);row-gap:5px}
.selected-ingredients>.field-help{display:flex;align-items:center;height:156px;margin:8px 0 0}
.selected-product{max-width:none;width:100%;height:52px;padding:1px 0 1px 8px;font-size:17px;gap:2px}
.is-dense .selected-product{height:46px;font-size:16px;padding-left:6px;gap:0}
.selected-product>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.2}

/* Save stays within reach while the on-screen keyboard reduces the viewport. */
.quantity-editor{scroll-padding-top:80px}
.quantity-editor .sheet-inner{padding:0 20px 20px}
.quantity-editor .sheet-header{position:sticky;top:0;z-index:5;align-items:center;gap:6px;padding:10px 0;margin-bottom:14px;background:white;border-bottom:1px solid var(--line)}
.quantity-editor .sheet-header h2{font-size:18px;padding:0;min-width:0}
.quantity-editor .sheet-header .icon-btn{margin:0;flex-shrink:0;width:44px;height:44px}
.quantity-editor .sheet-primary{font-size:16px;min-height:44px;padding:10px 12px;flex-shrink:0}
.quantity-editor input{scroll-margin-top:80px}
@media(max-width:700px){.quantity-editor{position:fixed;top:var(--editor-visible-top,8px);bottom:auto;margin:0;max-height:var(--editor-visible-height,calc(100dvh - 16px));border-radius:20px}}

/* Plans share the cooking cards; only confirmed amounts count as added. */
.cook-page .ingredient-swipe{position:relative;display:block;overflow:hidden;padding:0;border:0;border-radius:14px;touch-action:pan-y;background:#c73535}
.ingredient-face{display:flex;position:relative;width:100%;align-items:stretch;background:white;border-radius:14px;transition:transform .18s ease}
.ingredient-face.is-planned{background:#f3f5f9}
.ingredient-face.dragging{transition:none}
.cook-page .ingredient-face .ingredient-touch{flex:1;min-width:0;width:100%;margin:0}
.swipe-delete{position:absolute;right:0;top:0;bottom:0;width:88px;border:0;background:#c73535;color:white;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:15px}
.swipe-delete:disabled{visibility:hidden}
.voice-target{margin:6px 0 22px;overflow-wrap:anywhere}
.voice-target p{font-size:24px;font-weight:600;margin-bottom:6px}
.voice-target h3{font-size:32px;line-height:1.15}
.version-status{padding:16px;margin:16px 0 4px;border-radius:14px;background:var(--blue-soft);font-size:21px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.refresh-actions{flex-direction:column}
.trash-entry{padding:16px 0;border-bottom:1px solid var(--line)}
.trash-entry h3{font-size:23px;overflow-wrap:anywhere}
.trash-entry p{font-size:16px;color:var(--muted);margin:8px 0 12px}
.prep-option{display:flex;align-items:center;gap:12px;padding:16px 0;margin:8px 0}
.prep-option input{width:24px;height:24px;flex:0 0 24px;accent-color:var(--green)}
.prep-option strong,.prep-option small{display:block}
.prep-option small{font-size:15px;color:var(--muted);line-height:1.4;margin-top:5px}
@media(prefers-reduced-motion:reduce){.ingredient-face{transition:none}}

/* The same pinned picker action serves new dishes and quick additions. */
.ingredient-picker{scroll-padding-top:150px}
.ingredient-picker .sheet-header{flex-wrap:wrap;gap:4px 8px;margin-bottom:0;padding:8px 0 10px}
.ingredient-picker .sheet-header h2{font-size:20px;line-height:1.2}
.picker-toolbar{flex:0 0 100%;display:flex;align-items:center;gap:12px}
.picker-dish{flex:1;min-width:0;margin:0;font-size:18px;font-weight:400;line-height:1.25;color:var(--muted);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.picker-toolbar .sheet-primary{flex-direction:column;gap:2px;max-width:60%;padding:8px 12px;min-height:48px;background:var(--green)}
.picker-toolbar .sheet-primary small{font-size:13px;font-weight:400;line-height:1.2}
.ingredient-picker input{scroll-margin-top:150px}
.pan-filled path{fill:currentColor;stroke:none}
.saved-dish{border:1px solid var(--line);border-radius:18px;background:white;overflow:hidden}
.saved-dish .dish-card{border:0}
.dish-repeat{width:100%;min-height:48px;border-top:1px solid var(--line);font-size:17px}

/* A dish keeps the same compact-tab identity in the ingredient picker. */
.ingredient-picker .sheet-header h2{font-size:16px;font-weight:500;color:var(--muted)}
.picker-dish{min-height:66px;display:flex;align-items:center;padding:10px 13px;border:1px solid var(--blue);border-radius:16px;background:var(--blue-soft);box-shadow:inset 0 -3px var(--blue);font-size:19px;font-weight:700;color:var(--ink);line-height:1.2;overflow-wrap:anywhere;-webkit-line-clamp:unset}
.search-product{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:12px 14px;margin:6px 0;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);font:inherit;min-height:48px}
.search-product span{min-width:0;overflow-wrap:anywhere}.search-product small{display:block;font-size:13px;color:var(--muted);margin-top:3px}.search-product:disabled{opacity:.6}.search-product.new-product{color:var(--blue);justify-content:flex-start}
.nutrition-name{font-size:24px;overflow-wrap:anywhere;margin:12px 0}.nutrition-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.nutrition-fields .field{min-width:0}.nutrition-fields input{width:100%;min-width:0;font-size:20px}
.picker-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.picker-toolbar .sheet-primary{min-width:0;max-width:none;width:100%;white-space:normal}

/* Same tab silhouette in the cooking strip and ingredient picker. */
.picker-dish{border-radius:14px 14px 4px 4px}
.pan-side{stroke-width:1.6}
.ingredient-amount-editor .sheet-header{margin-bottom:8px}
.ingredient-amount-editor .sheet-header h2{font-size:22px;line-height:1.18;font-weight:650;overflow-wrap:anywhere}
.editor-dish{display:block;font-size:15px;font-weight:400;line-height:1.25;color:var(--muted);margin-top:4px}
.ingredient-amount-editor .quantity-units{margin:8px 0 12px}
.ingredient-amount-editor .quantity-pair .field{margin:8px 0}
.ingredient-amount-editor .field-error:empty{min-height:0;margin:0}
.ingredient-amount-editor .ingredient-delete{position:sticky;bottom:0;margin:4px 0 0;width:100%;min-height:44px;background:white;border-top:1px solid var(--line);z-index:4}
.repeat-suggestion span{display:block}
.ingredient-amount-editor .sheet-inner{padding-bottom:0}
@media(max-width:360px){.ingredient-amount-editor .sheet-header h2{font-size:20px}.ingredient-amount-editor .sheet-primary{padding:10px 8px}}

.ingredient-amount-editor .sheet-header{flex-wrap:nowrap;align-items:flex-start}
.ingredient-amount-editor .sheet-primary{width:108px;min-width:108px;max-width:108px;flex:0 0 108px}

/* Completion prototype: keep the weight choice and result easy to scan on a phone. */
.finish-weight{margin:24px 0 18px}
.finish-method{margin:10px 0 0}
.finish-method button{line-height:1.2;padding:12px 7px}
.finish-method button:disabled{opacity:.45}
.finish-weight .field-help{margin:8px 0 0}
.finish-weight .cookware-selection{margin-top:19px}
.finish-weight .field{margin:17px 0 0}
.finish-sum-note{margin:16px 0 0;padding:15px;border-radius:12px;background:#eef5ff;color:#315274;font-size:.85rem;line-height:1.45}
.weight-warning-numbers{display:grid;gap:10px;margin:18px 0 22px}
.weight-warning-numbers span{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 14px;border-radius:11px;background:#f4f6fa;font-size:.82rem}
.weight-warning-numbers strong{font-size:1.05rem;white-space:nowrap}
.weight-alert{display:flex;align-items:flex-start;gap:13px;padding:15px;margin-bottom:16px;border:1px solid #e9a9a9;border-radius:14px;background:#fff0ef;color:#8f2929}
.weight-alert-mark{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:#b23838;color:#fff;font-size:1.2rem;font-weight:800;line-height:1}
.weight-alert strong{display:block;font-size:.94rem;line-height:1.25}
.weight-alert p{margin-top:6px;font-size:.82rem;line-height:1.45}
.weight-warning-numbers .weight-warning-result{background:#fff0ef;border:1px solid #e9a9a9;color:#8f2929}
.weight-warning-confirm{background:#fff;color:#9f3030;border:1px solid #d88989}
.weight-warning-confirm:hover{background:#fff0ef;filter:none}
.weight-warning-numbers + .field-error:empty{display:none}

/* CHG0008: four destinations and a separate reference library. */
.library-page{max-width:720px}.library-page .segmented{margin-top:0}.library-note{margin:12px 0 20px}.library-recipe{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:20px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:17px;min-width:0}.library-recipe strong{font-size:1.1rem}.library-recipe>span:not(.badge){font-size:.85rem;line-height:1.5;overflow-wrap:anywhere}.library-recipe-action{color:var(--blue);font-weight:600}.library-products{list-style:none;padding:0;margin:0;background:#fff;border:1px solid var(--line);border-radius:17px;overflow:hidden}.library-product{display:flex;align-items:center;gap:12px;padding:17px;border-bottom:1px solid var(--line)}.library-product:last-child{border-bottom:0}.library-product>div{flex:1;min-width:0}.library-product h3{font-size:1rem;overflow-wrap:anywhere}.library-product p{font-size:.75rem;color:var(--muted);line-height:1.5;margin-top:6px}.library-product>strong{font-size:.85rem;white-space:nowrap}.library-search{margin-top:0}
@media(max-width:700px){.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr));padding-left:6px;padding-right:6px}.bottom-nav .nav-item{font-size:12px;min-width:0}.library-product{padding:14px;gap:8px}}

/* CHG0009: scroll the weight input and its save action as one unit. */
.finish-entry-row{display:flex;align-items:flex-end;gap:10px;margin-top:17px}
.finish-entry-row>div{flex:1;min-width:0}
.finish-entry-row .field{margin:0;min-width:0}
.finish-entry-row input{width:100%;min-width:0;min-height:52px;font-size:20px}
.finish-entry-row .finish-save{flex:0 0 112px;width:112px;min-height:52px;padding:10px 8px;font-size:16px;border-radius:12px;box-shadow:none}
.finish-editor .prep-option{margin-bottom:0}
.finish-editor .finish-weight{margin-top:14px}
.finish-editor .field-error:empty{margin:0;min-height:0}
@media(max-width:700px){.finish-editor{position:fixed;top:var(--editor-visible-top,8px);bottom:auto;margin:0;max-height:var(--editor-visible-height,calc(100dvh - 16px));border-radius:20px}.finish-editor .sheet-inner{padding:16px}.finish-editor .sheet-header{position:sticky;top:0;z-index:5;padding:8px 0;background:white}.finish-editor .sheet-header h2{font-size:20px}.finish-entry-row .field>span{font-size:16px}}
