#tab-tools{--tools-ink:#203c32;--tools-muted:#617167;--tools-line:#e3e9e4;--tools-tint:#eff4ee;--tools-accent:#24644b;color:var(--tools-ink);padding:24px 28px;border:0;border-radius:14px;background:#fff;font-size:14px}
#tab-tools *{box-sizing:border-box}
#tab-tools h3,#tab-tools h4,#tab-tools p{margin:0}
#tab-tools button,#tab-tools input,#tab-tools select,#tab-tools textarea{font:inherit;color:inherit}
#tab-tools button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--tools-line);border-radius:9px;background:#fff;padding:9px 13px;font-size:13px;font-weight:600;cursor:pointer;transition:background .15s ease}
#tab-tools button:hover{background:var(--tools-tint)}
#tab-tools button:disabled{opacity:.55;cursor:wait}
#tab-tools svg{width:18px;height:18px;flex:none;vertical-align:middle}
#tab-tools .tools-primary{background:var(--tools-ink);border-color:var(--tools-ink);color:#fff}
#tab-tools .tools-primary:hover{background:#315847}
#tab-tools .tools-icon{width:40px;height:40px;min-height:40px;padding:9px;border:0;background:transparent;flex:none}
#tab-tools .tools-quiet{border-color:transparent;background:transparent;color:var(--tools-muted)}
#tab-tools .tools-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
#tab-tools .tools-heading h3{font-size:21px;font-weight:650;letter-spacing:-.025em}
#tab-tools .tools-switch{display:flex;border-bottom:1px solid var(--tools-line);gap:24px;margin-bottom:24px}
#tab-tools .tools-switch button{border:0;border-radius:0;background:transparent;padding:0 0 12px;min-height:32px;color:var(--tools-muted);position:relative}
#tab-tools .tools-switch button[aria-pressed=true]{color:var(--tools-ink)}
#tab-tools .tools-switch button[aria-pressed=true]:after{content:"";height:2px;background:var(--tools-ink);position:absolute;bottom:-1px;left:0;right:0}
#tab-tools .tools-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
#tab-tools .tools-list-heading h4{font-size:17px;letter-spacing:-.02em;font-weight:650}
#tab-tools .tools-list-heading h4 span{display:inline-flex;font-size:11px;align-items:center;justify-content:center;min-width:23px;height:22px;border-radius:6px;background:var(--tools-tint);margin-left:5px;color:var(--tools-muted)}
#tab-tools .tools-list-heading p{font-size:12px;color:var(--tools-muted);margin-top:4px}
#tab-tools .tools-columns,#tab-tools .tools-recipe-row{display:grid;grid-template-columns:minmax(120px,1fr) 80px 70px 90px 20px;gap:16px;text-align:right;align-items:center;width:100%}
#tab-tools .tools-columns{padding:0 12px 8px;font-size:11px;color:var(--tools-muted)}
#tab-tools .tools-columns>:first-child{text-align:left}
#tab-tools .tools-recipe-row{border:0;border-bottom:1px solid var(--tools-line);border-radius:0;padding:14px 12px;min-height:72px;font-size:14px;font-variant-numeric:tabular-nums;background:#fff;font-weight:500}
#tab-tools .tools-recipe-name{text-align:left;overflow:hidden;min-width:0}
#tab-tools .tools-recipe-name strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
#tab-tools .tools-recipe-name small{display:block;font-size:11px;color:var(--tools-muted);margin-top:4px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tab-tools .tools-row-margin{color:var(--tools-muted);font-size:12px}
#tab-tools .tools-row-price{color:var(--tools-accent);font-size:15px}
#tab-tools .tools-chevron{color:#819289;display:flex;justify-content:end}
#tab-tools .tools-chevron svg{width:14px;height:14px}
#tab-tools .tools-price-note,#tab-tools .tools-footnote{font-size:11px;color:var(--tools-muted);line-height:1.55}
#tab-tools .tools-price-note{margin-top:12px}
#tab-tools .tools-footnote{margin-top:26px;padding-top:14px;border-top:1px solid var(--tools-line)}
#tab-tools .tools-empty{padding:32px 0 36px;max-width:420px}
#tab-tools .tools-empty h4{font-size:20px;margin-bottom:8px;letter-spacing:-.025em}
#tab-tools .tools-empty p{line-height:1.6;color:var(--tools-muted);margin-bottom:20px}
#tab-tools .tools-menu-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
#tab-tools .tools-menu-toolbar button{font-size:12px;min-height:38px;padding:8px 10px}
#tab-tools .tools-dish-row{display:grid;grid-template-columns:minmax(0,1fr) auto 16px;gap:20px;text-align:left;width:100%;padding:14px 12px;border:0;border-bottom:1px solid var(--tools-line);border-radius:0}
#tab-tools .tools-dish-row strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#tab-tools .tools-dish-row small{display:block;color:var(--tools-muted);font-size:11px;margin-top:4px;font-weight:400}
#tab-tools .tools-dish-row svg{width:14px;height:14px;color:var(--tools-muted)}
#tab-tools .tools-menu-versions{display:flex;align-items:center;gap:14px;justify-content:space-between;margin-top:20px}
#tab-tools .tools-menu-versions label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--tools-muted)}
#tab-tools .tools-menu-versions select{min-height:38px;max-width:170px;border:1px solid var(--tools-line);border-radius:8px;padding:7px;background:#fff}
#tab-tools [data-status]{font-size:12px;line-height:1.5;color:var(--tools-accent);padding:10px 12px;margin-bottom:14px;background:var(--tools-tint);border-radius:8px}
#tab-tools [hidden]{display:none!important}
#tab-tools :focus-visible{outline:3px solid #658573;outline-offset:3px}
#tab-tools ::selection{background:#dbe9db}
#tab-tools .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#tab-tools .tools-dialog{color:var(--tools-ink);width:min(630px,calc(100vw - 40px));max-width:none;max-height:min(860px,calc(var(--buyer-modal-viewport-height,var(--tools-viewport-height,100dvh)) - 64px));padding:0;border:0;border-radius:18px;box-shadow:0 24px 90px #132c2a30;background:#fff;overflow:hidden}
#tab-tools .tools-dialog[open]{display:flex;flex-direction:column}
#tab-tools .tools-dialog::backdrop{background:rgb(18 32 26 / 42%)}
#tab-tools .tools-modal-head{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--tools-line);flex:none}
#tab-tools .tools-modal-head h3{font-size:21px;font-weight:650;letter-spacing:-.025em;overflow-wrap:anywhere}
#tab-tools .tools-modal-head p{font-size:12px;color:var(--tools-muted);margin-top:5px}
#tab-tools .tools-modal-body{padding:20px 24px;overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-color:#bccbc0 transparent;scrollbar-width:thin}
#tab-tools .tools-modal-body>p{font-size:13px;line-height:1.65;margin-bottom:12px}
#tab-tools .tools-modal-footer{flex:none;padding:14px 24px 20px;border-top:1px solid var(--tools-line);background:#fafcf9;display:flex;align-items:center;justify-content:end;gap:8px;flex-wrap:wrap}
#tab-tools .tools-modal-footer [data-status]{width:100%;margin:0 0 3px;text-align:left}
#tab-tools .tools-field{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:550;color:var(--tools-muted);min-width:0}
#tab-tools .tools-field input,#tab-tools .tools-field select,#tab-tools .tools-field textarea,#tab-tools .tools-catalogue>select{width:100%;min-width:0;min-height:42px;border:1px solid #d9e2d9;border-radius:8px;background:#fff;padding:9px 11px;color:var(--tools-ink);font-size:14px}
#tab-tools .tools-field input::placeholder,#tab-tools textarea::placeholder{color:#718076}
#tab-tools .tools-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#tab-tools .tools-recipe-title{display:grid;grid-template-columns:1fr 145px;gap:12px;margin-bottom:12px}
#tab-tools .tools-base-line{display:grid;grid-template-columns:minmax(0,1fr) 100px;align-items:center;gap:10px}
#tab-tools .tools-base-line>select,#tab-tools .tools-base-line>input,#tab-tools .tools-base-price input{width:100%;min-width:0;min-height:44px;border:1px solid #d9e2d9;border-radius:7px;background:#fff;padding:8px 10px;font:inherit;font-size:16px;color:var(--tools-ink)}
#tab-tools .tools-base-price{position:relative;margin:0}
#tab-tools .tools-base-price>span{position:absolute;left:10px;top:12px;font-size:14px;color:var(--tools-muted)}
#tab-tools .tools-base-price input{padding-left:25px}
#tab-tools .tools-base-line+.tools-section-title{margin-top:14px}
#tab-tools .tools-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 0 10px}
#tab-tools .tools-section-title h4{font-size:14px;font-weight:650}
#tab-tools .tools-section-title span{font-size:11px;color:var(--tools-muted)}
#tab-tools details summary{cursor:pointer;list-style:none}
#tab-tools details summary::-webkit-details-marker{display:none}
#tab-tools details summary:after{content:"";display:inline-block;width:6px;height:6px;border-bottom:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);margin-left:8px;vertical-align:3px;transition:transform .15s}
#tab-tools details[open]>summary:after{transform:rotate(225deg);vertical-align:0}
#tab-tools .tools-catalogue{margin-top:8px;font-size:12px;color:var(--tools-muted)}
#tab-tools .tools-catalogue summary{padding:5px 0 9px}
#tab-tools details p{font-size:11px;line-height:1.55;color:var(--tools-muted);margin:9px 0}
#tab-tools .tools-ingredient{padding:10px 0 12px;border-bottom:1px solid var(--tools-line)}
#tab-tools .tools-ingredient-top{display:grid;grid-template-columns:minmax(0,1fr) 76px 76px 32px;align-items:center;gap:8px}
#tab-tools .tools-ingredient-top.is-pack{grid-template-columns:minmax(0,1fr) 76px 70px 80px 32px}
#tab-tools .tools-ingredient-name{justify-content:start;text-align:left;border:0;background:transparent;padding:5px 0;min-width:0;font-size:14px}
#tab-tools .tools-ingredient-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#tab-tools .tools-ingredient-name svg{width:12px;height:12px;flex:none;transform:rotate(90deg);color:var(--tools-muted)}
#tab-tools .tools-ingredient-top select,#tab-tools .tools-unit-price,#tab-tools .tools-pack-weight input{width:100%;min-width:0;min-height:40px;border:1px solid #d9e2d9;border-radius:7px;background:#fff;padding:7px;color:var(--tools-ink);font-size:13px}
#tab-tools .tools-ingredient-top select{padding:7px 3px;font-size:12px}
#tab-tools .tools-ingredient-top>.tools-icon{width:32px;height:44px;padding:7px;color:#718076}
#tab-tools .tools-pack-weight{display:block;position:relative}
#tab-tools .tools-pack-weight input{padding-right:16px}
#tab-tools .tools-pack-weight>span:last-child{position:absolute;right:6px;top:13px;font-size:11px;color:var(--tools-muted)}
#tab-tools .tools-portion-line{display:grid;grid-template-columns:70px minmax(0,1fr) 58px;gap:12px;align-items:center;margin-top:6px}
#tab-tools .tools-portion-input{position:relative}
#tab-tools .tools-portion-input input{width:100%;min-width:0;min-height:40px;border:1px solid #d9e2d9;border-radius:7px;padding:8px 20px 8px 8px;background:#fff;font:inherit;font-size:14px;color:var(--tools-ink)}
#tab-tools .tools-portion-input>span:last-child{position:absolute;right:9px;top:12px;font-size:12px;color:var(--tools-muted)}
#tab-tools .tools-portion-line>output{text-align:right;font-size:14px;font-weight:650;font-variant-numeric:tabular-nums}
#tab-tools input[type=range]{width:100%;accent-color:var(--tools-accent);height:30px;margin:5px 0 0;cursor:pointer}
#tab-tools .tools-portion-line input[type=range]{margin:0;height:36px}
#tab-tools .tools-ingredient-choice{padding:12px;margin:4px 0 8px;background:var(--tools-tint);border-radius:9px}
#tab-tools .tools-source-switch{display:flex;gap:6px;margin-bottom:10px}
#tab-tools .tools-source-switch button{font-size:12px;min-height:36px;padding:7px 10px;border-color:transparent}
#tab-tools .tools-source-switch button[aria-pressed=true]{background:var(--tools-ink);color:#fff}
#tab-tools .tools-source-switch button:disabled{cursor:default}
#tab-tools .tools-choice-fields{display:flex;gap:8px;align-items:end}
#tab-tools .tools-choice-fields>.tools-field{flex:1}
#tab-tools .tools-choice-fields>button{min-height:42px;font-size:12px}
#tab-tools .tools-ingredient-choice p{font-size:11px;line-height:1.5;margin-top:8px;color:var(--tools-muted)}
#tab-tools .tools-recipe-entry{position:relative}
#tab-tools .tools-recipe-actions{position:absolute;right:0;top:14px;z-index:2}
#tab-tools .tools-recipe-actions>summary{display:flex;align-items:center;justify-content:center;width:32px;height:44px;color:var(--tools-muted);border-radius:7px}
#tab-tools .tools-recipe-actions>summary:hover{background:var(--tools-tint)}
#tab-tools .tools-recipe-actions>summary:after{display:none}
#tab-tools .tools-recipe-actions>button{position:absolute;right:0;top:44px;white-space:nowrap;box-shadow:0 8px 24px #203c3224;min-width:130px}
#tab-tools .tools-modal-actions .tools-discard{margin-right:auto;color:var(--tools-muted)}
#tab-tools .tools-import-recipes{display:flex;flex-direction:column;gap:4px}
#tab-tools .tools-import-recipes>button{display:flex;justify-content:space-between;text-align:left;border:0;border-bottom:1px solid var(--tools-line);border-radius:0;min-height:52px}
#tab-tools .tools-import-recipes span{font-size:12px;color:var(--tools-muted)}
#tab-tools .tools-add-topping{display:flex;gap:10px;align-items:center;margin:14px 0 22px}
#tab-tools .tools-add-topping .tools-field{flex:1}
#tab-tools .tools-add-topping select{font-size:12px}
#tab-tools .tools-empty-toppings{font-size:12px;color:var(--tools-muted);padding:12px 0}
#tab-tools .tools-overheads{border-top:1px solid var(--tools-line);border-bottom:1px solid var(--tools-line);margin:0 0 20px;padding:14px 0}
#tab-tools .tools-overheads summary{font-size:13px;display:flex;align-items:center;gap:8px}
#tab-tools .tools-overheads small{color:var(--tools-muted);font-size:11px;font-weight:400;margin-left:auto}
#tab-tools .tools-overheads .tools-fields{margin:12px 0 4px}
#tab-tools .tools-margin-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:600}
#tab-tools .tools-margin-label output{background:var(--tools-tint);border-radius:6px;padding:5px 9px;font-size:12px;font-variant-numeric:tabular-nums}
#tab-tools .tools-hint{font-size:11px;color:var(--tools-muted);line-height:1.5;margin-top:6px}
#tab-tools .tools-live-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;width:100%;padding:0 0 13px;border-bottom:1px solid var(--tools-line)}
#tab-tools .tools-live-totals span{font-size:10px;color:var(--tools-muted)}
#tab-tools .tools-live-totals strong{display:block;margin-top:5px;font-size:20px;letter-spacing:-.025em;color:var(--tools-ink);font-variant-numeric:tabular-nums;font-weight:650}
#tab-tools .tools-live-totals span:last-child strong{color:var(--tools-accent)}
#tab-tools .tools-modal-actions{display:flex;gap:8px;align-items:center;justify-content:end;width:100%;padding-top:2px}
#tab-tools .tools-modal-actions .tools-quiet{margin-right:auto;padding-left:0}
#tab-tools .tools-description{margin-top:16px}
#tab-tools .tools-description textarea{min-height:90px;resize:vertical}
#tab-tools .tools-check{display:flex;align-items:start;gap:9px;font-size:12px;line-height:1.5;margin-top:16px}
#tab-tools .tools-check input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--tools-accent);flex:none}
#tab-tools .tools-paper{padding:26px;background:#fffdf6;color:#203c32;border:1px solid #e3e5db;border-radius:3px;overflow-wrap:anywhere;margin:12px 0 0}
#tab-tools .tools-paper h2{font-family:Georgia,serif;font-size:29px;letter-spacing:-.025em;margin:0 0 14px}
#tab-tools .tools-paper.modern h2{font-family:inherit}
#tab-tools .tools-paper h3{font-size:15px;margin:20px 0 12px}
#tab-tools .tools-paper>p{font-size:12px;margin:0 0 14px}
#tab-tools .tools-paper img{max-width:110px;max-height:65px;object-fit:contain;margin-bottom:16px}
#tab-tools .tools-preview-dish{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;font-size:12px;margin:16px 0}
#tab-tools .tools-preview-dish p{grid-column:1/-1;margin:0;font-size:11px;line-height:1.5}
#tab-tools .tools-preview-dish span{font-variant-numeric:tabular-nums}
.tools-only .tab-btn:not([data-tab="tools"]),.tools-only #session-orders,.tools-only #session-account,.tools-only #session-addresses,.tools-only #session-notifications-trigger{display:none!important}
@media(max-width:600px){
 #tab-tools{padding:18px 16px;border-radius:12px}
 #tab-tools .tools-heading{margin-bottom:12px}
 #tab-tools .tools-heading h3{font-size:20px}
 #tab-tools .tools-switch{margin-bottom:20px}
 #tab-tools .tools-list-heading{margin-bottom:20px}
 #tab-tools .tools-list-heading h4{font-size:16px}
 #tab-tools .tools-list-heading p{font-size:11px}
 #tab-tools .tools-list-heading>.tools-primary{font-size:12px;padding:8px 10px;min-height:38px}
 #tab-tools .tools-columns,#tab-tools .tools-recipe-row{grid-template-columns:minmax(0,1fr) 49px 42px 59px 12px;gap:8px}
 #tab-tools .tools-columns{padding:0 0 8px;font-size:10px}
 #tab-tools .tools-recipe-row{padding:13px 0;min-height:68px;font-size:12px}
 #tab-tools .tools-recipe-name strong{font-size:13px}
 #tab-tools .tools-recipe-name small{font-size:10px}
 #tab-tools .tools-row-price{font-size:13px}
 #tab-tools .tools-row-margin{font-size:11px}
 #tab-tools .tools-dialog{width:calc(100vw - 16px);max-height:calc(var(--buyer-modal-viewport-height,var(--tools-viewport-height,100dvh)) - 24px);margin:auto auto 8px;border-radius:16px}
 #tab-tools .tools-modal-head{padding:16px 16px 13px;gap:8px}
 #tab-tools .tools-modal-head h3{font-size:20px}
 #tab-tools .tools-modal-head p{font-size:11px}
 #tab-tools .tools-modal-body{padding:16px}
 #tab-tools .tools-modal-footer{padding:12px 16px max(14px,env(safe-area-inset-bottom));gap:8px}
 #tab-tools .tools-recipe-title{grid-template-columns:1fr 112px;gap:10px;margin-bottom:12px}
 #tab-tools .tools-field input,#tab-tools .tools-field select,#tab-tools .tools-field textarea{font-size:16px;min-height:44px}
 #tab-tools .tools-ingredient-top{grid-template-columns:minmax(0,1fr) 68px 65px 32px;gap:6px}
 #tab-tools .tools-ingredient-top.is-pack{grid-template-columns:minmax(0,1fr) 66px 56px 68px 28px;gap:6px}
 #tab-tools .tools-ingredient-top .tools-icon{width:28px;padding:5px}
 #tab-tools .tools-unit-price,#tab-tools .tools-pack-weight input,#tab-tools .tools-portion-input input{font-size:16px;min-height:44px}
 #tab-tools .tools-portion-line{grid-template-columns:66px minmax(0,1fr) 54px;gap:10px;margin-top:2px}
 #tab-tools .tools-portion-line>output{font-size:13px}
 #tab-tools .tools-overheads small{font-size:10px}
 #tab-tools .tools-modal-actions{gap:5px}
 #tab-tools .tools-modal-actions button{font-size:11px;min-height:40px;padding:8px 10px}
 #tab-tools .tools-modal-actions .tools-delete{width:30px;padding:5px}
 #tab-tools .tools-modal-actions .tools-quiet{padding-left:0;padding-right:4px}
 #tab-tools .tools-live-totals{gap:10px;padding-bottom:10px}
 #tab-tools .tools-live-totals strong{font-size:20px}
 #tab-tools .tools-fields{gap:12px}
 #tab-tools .tools-menu-toolbar{gap:6px}
 #tab-tools .tools-menu-toolbar button{font-size:11px;gap:5px;padding:8px}
 #tab-tools .tools-menu-toolbar svg{width:15px;height:15px}
}
@media(prefers-reduced-motion:reduce){#tab-tools button,#tab-tools details summary:after{transition:none}}

@media(max-width:360px){#tab-tools .tools-ingredient-top.is-pack{grid-template-columns:minmax(0,1fr) 60px 48px 68px 28px;gap:4px}#tab-tools .tools-ingredient-top select{font-size:11px;padding:5px 0}#tab-tools .tools-unit-price,#tab-tools .tools-pack-weight input{padding-left:5px}}

/* Compact quantities keep their digits visible; arrows are replaced by the slider. */
#tab-tools .tools-ingredient input[type=number]{appearance:textfield;-moz-appearance:textfield}
#tab-tools .tools-ingredient input[type=number]::-webkit-inner-spin-button,#tab-tools .tools-ingredient input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

#tab-tools .tools-dialog {
 position:fixed;
 top:calc(var(--buyer-modal-viewport-top,0px) + max(12px,env(safe-area-inset-top)));
 bottom:auto;
 margin-block:0;
 max-height:min(860px,calc(var(--buyer-modal-viewport-height,100dvh) - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom))));
}

/* Menu AI review warning and allergen differences (server allergen guard). */
.tools-ai-notice { border: 1px solid #b45309; background: #fffbeb; color: #78350f; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.tools-ai-notice ul { margin: 6px 0 0; padding-left: 18px; }
