/* Real menu builder presentation. Values, writes and validation remain in menu.html. */
body[data-screen=menu] [hidden]{display:none!important}
body[data-screen=menu] .menu-page-heading{margin-bottom:24px}
.menu-shop-context{display:flex;align-items:center;gap:12px;margin-top:15px;color:var(--ui-muted);font-size:12px}.menu-shop-context b{color:var(--ui-ink);font-weight:600}.menu-shop-context span{border-left:1px solid var(--ui-line);padding-left:12px}
body[data-screen=menu] .toolbar{gap:9px;margin-bottom:24px;align-items:center}.toolbar #preview-link{margin-left:auto}.toolbar #add-btn{padding-inline:20px}.toolbar .btn svg{width:17px;height:17px}
.menu-role-note{padding:14px 16px;border:1px solid #d8d0bd;background:#f5efdf;color:#76613a;border-radius:8px;font-size:13px;line-height:1.7;margin-bottom:20px}
.menu-filter-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.menu-filter-bar #cats{margin:0;display:flex;flex-wrap:wrap;gap:6px;padding:0;overflow:visible;align-items:center;flex:1}
body[data-screen=menu] .chip{min-height:44px;padding:9px 13px;border-radius:7px;background:transparent;border-color:transparent;font-size:13px;color:var(--ui-muted)}body[data-screen=menu] .chip.on{border-color:var(--ui-line);background:#fff;color:var(--ui-brand);font-weight:650}.chip[data-manage]{border:1px dashed #d5cbbb!important;background:#fbf8f1!important;color:#82715a!important;font-size:12px!important}.chip[data-manage] svg{width:15px;height:15px}
.menu-search{position:relative;display:block;max-width:300px;min-width:210px;margin:0!important;font-weight:400;flex:.8}.menu-search>svg{position:absolute;top:15px;left:13px;stroke:#8a8070;fill:none;stroke-width:1.7;width:17px;height:17px;pointer-events:none}body[data-screen=menu] #menu-search{width:100%;min-height:46px;font-size:14px;padding:11px 13px 11px 40px;border:1px solid #d4ccbf;border-radius:7px;background:white;color:var(--ui-ink)}
.menu-list-panel{background:white;border:1px solid var(--ui-line);border-radius:12px;overflow:hidden;box-shadow:0 5px 25px #38291b04}.menu-list-heading{padding:16px 22px;border-bottom:1px solid var(--ui-line);background:#fbfaf7;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--ui-muted)}.menu-list-heading b{font-weight:600}.menu-list-heading>span{font-size:11px}
body[data-screen=menu] #items .row{display:grid;grid-template-columns:72px minmax(0,1fr) auto 208px;gap:18px;padding:19px 22px;margin:0;background:#fff;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;min-height:135px;align-items:center}body[data-screen=menu] #items .row:last-child{border-bottom:0}.row.off{background:#fbfaf7!important}.row.off .nm{text-decoration:none;opacity:.75}.row.off .thumb{opacity:.6}body[data-screen=menu] .thumb{width:72px;height:72px;border:1px solid #e6dfd3;background:#f4eee2;border-radius:9px;object-fit:cover}body[data-screen=menu] .thumb.ph{font-size:29px;color:#9b8768}.thumb.ph svg{width:30px;height:30px}
.menu-name-line{display:flex;align-items:baseline;gap:8px;margin-bottom:4px;flex-wrap:wrap}.menu-name-line .code{border:0;background:#f1eee7;border-radius:4px;font-size:10px;color:#87775f;padding:3px 5px;font-weight:600;flex-shrink:0}.menu-name-line .nm{font-size:16px;line-height:1.4;font-weight:650;letter-spacing:-.015em}body[data-screen=menu] .row .info{min-width:0}.row .info>.zh{font-size:13px;line-height:1.5;color:var(--ui-muted);margin-left:0}.menu-row-meta{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:10px}.menu-category-name{font-size:11px;color:#807667}.menu-row-meta .badge{margin:0;border:0;font-size:10px;line-height:1.5;padding:4px 7px;border-radius:4px}.badge.available{background:var(--ui-green-soft);color:var(--ui-green)}body[data-screen=menu] .badge.out{background:#f5e4df;color:#8f4938}.badge.grp{color:var(--ui-brand);background:#f3e7e5}.badge.legacy{color:#8a7043;background:#f6f0e1}
body[data-screen=menu] .prc{font-size:16px;align-self:start;margin-top:5px;color:var(--ui-ink);font-weight:650}.prc .bigp{font-size:11px;line-height:1.6;font-weight:400;color:var(--ui-muted);margin-top:4px}
body[data-screen=menu] #items .acts{display:flex!important;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:5px;width:208px}body[data-screen=menu] .menu-edit{min-height:44px;font-size:12px;padding:8px 13px!important;gap:6px}.menu-edit svg{width:15px;height:15px}.menu-stock{border:0;background:transparent;color:var(--ui-brand);min-height:44px;line-height:1.4;padding:8px 5px;font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.menu-order-actions{display:flex;justify-content:flex-end;gap:4px;width:100%}body[data-screen=menu] .ibtn{width:38px;height:38px;min-width:38px;min-height:38px;border:1px solid #e3ddd2;border-radius:6px;background:#fff;color:#8a8070}body[data-screen=menu] .ibtn svg{width:15px;height:15px}.ibtn.danger{color:#9c6253!important;background:#fff!important}.menu-order-actions .ibtn:hover{background:#f7f2e9}.menu-empty-state,#items>.empty{padding:48px 22px;text-align:center;color:var(--ui-muted);font-size:14px;line-height:1.8}.menu-empty-state h3{font-size:20px!important;margin-bottom:10px}.menu-empty-state p{margin-bottom:20px}.menu-empty-state .btn,#items>.empty .btn{margin-top:18px}#count{font-size:12px;margin:16px 2px 0}
/* Existing side editor: retain all fields and operations. */
body.menu-overlay-open{overflow:hidden}body[data-screen=menu] #sheet-w{z-index:90;background:#231c1ba8;backdrop-filter:blur(2px)}body[data-screen=menu] .sheet{width:650px;max-width:100%;height:100dvh;border-left:1px solid #e3d8ca;box-shadow:-16px 0 70px #231c1b24;background:#fffdf9}.s-head{padding:20px 26px;background:#fffdf9;border-bottom:1px solid var(--ui-line)}body[data-screen=menu] .s-head h3{font-size:23px}.s-head .x{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--ui-line);background:#fff;border-radius:8px;font-size:18px;color:var(--ui-muted)}.s-body{padding:8px 26px 26px}.menu-section-title{font-size:13px;font-weight:650;color:var(--ui-brand);letter-spacing:.02em;margin:20px 0 4px}.menu-choice-heading{border-top:1px solid var(--ui-line);padding-top:24px;margin-top:25px}.menu-choice-heading h4{font-size:20px;letter-spacing:-.02em;margin:0 0 8px}.menu-choice-heading p{font-size:13px;color:var(--ui-muted);line-height:1.7;margin:0}
body[data-screen=menu] .s-body input:not([type=checkbox]),body[data-screen=menu] .s-body select,body[data-screen=menu] .s-body textarea{font-size:16px;min-height:46px;padding:11px 12px;border:1px solid #d2c9ba;border-radius:7px;background:white;color:var(--ui-ink);line-height:1.5}.s-body input[readonly]{background:#f2eee6!important;color:#8b7a63!important}.s-body label{margin-top:15px;line-height:1.6}.s-body .fgrid3{gap:12px}.s-body .chkrow{align-items:flex-start;gap:9px;font-size:13px}.s-body .chkrow>input{margin-top:3px}.s-foot{padding:15px 26px;background:#fffdf9;border-top:1px solid var(--ui-line);gap:10px}.s-foot .btn{min-width:110px;min-height:48px}body[data-screen=menu] #s-msg.err{display:block;margin:14px 0 4px;line-height:1.7}.ph-row{padding:14px;background:#f6f1e7;border-radius:9px;margin-top:10px}.ph-row .filebtn{min-height:44px;font-size:12px}.ph-row #ph-msg{margin-top:8px;font-size:11px}.ph-row .thumb{width:70px;height:70px}
body[data-screen=menu] .gcard{padding:20px;margin:18px 0;background:#fff;border:1px solid #ddd4c4;border-radius:10px;box-shadow:0 3px 12px #31241304}.ghead{gap:9px;padding-bottom:13px;border-bottom:1px solid #eee6d9;margin-bottom:3px}.ghead>b{font-size:15px;color:var(--ui-brand);margin-right:auto}.ghead>.btn{min-height:36px!important;padding:6px 9px!important;font-size:11px!important;background:#fff!important;border-color:#e6d5ce!important;color:#9a5b48!important}.menu-tech-toggle{padding:7px 6px;background:none;border:0;color:#9c8f7b;text-decoration:underline;text-underline-offset:3px;font-size:10px;min-height:36px}.gcard>.fgrid3{grid-template-columns:1fr 1fr}.gcard .menu-key-field,.gcard .orow .o-key{display:none}.gcard.show-keys .menu-key-field{display:block;grid-column:1/-1}.gcard.show-keys .orow .o-key{display:block}.gcard .orow{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 96px 38px;gap:7px;margin:9px 0}.gcard.show-keys .orow{grid-template-columns:80px minmax(0,1fr) minmax(0,1fr) 80px 38px}.gcard .orow input{font-size:14px!important;min-height:44px!important;padding:9px 10px!important;min-width:0}.gcard .orow .btn{width:38px;min-height:44px;padding:7px!important;background:#fff!important;border:1px solid #e6d5ce;color:#a16d5a;font-size:12px!important}.menu-pricing-hint{font-size:11px;color:#89765c;line-height:1.8;background:#f7f2e7;padding:11px 12px;border-radius:6px;margin:15px 0 5px}.gcard .olab{font-size:12px;color:var(--ui-ink);margin:18px 0 10px;font-weight:600}.grow{margin-top:15px}.grow>.btn{font-size:13px;min-height:46px}#groups-note{border:1px solid #e1cca4;background:#fbf3e3;color:#7b5e2d;font-size:12px;line-height:1.8;padding:13px 15px;border-radius:8px;margin:18px 0}details.adv{padding:15px;border-color:#e3dacc;margin-top:24px;background:#fbf8f2}details.adv summary{min-height:33px;display:flex;align-items:center;font-size:13px;color:#7c6b50;cursor:pointer}details.adv textarea{font-family:ui-monospace,monospace!important;font-size:12px!important;min-height:130px}
/* Existing category, CSV and delete dialogs. */
body[data-screen=menu] #modal{z-index:100;background:#231c1ba8;backdrop-filter:blur(2px);padding:28px 16px;align-items:flex-start}.mcard{border-radius:13px;padding:26px;border:1px solid var(--ui-line);box-shadow:0 20px 80px #211b1726}.mcard.wide{max-width:760px}.mcard h3{font-size:23px!important;margin-bottom:14px}.mtext{font-size:13px;line-height:1.8;color:var(--ui-muted);margin-bottom:17px}.mrow{gap:9px;padding-top:17px;border-top:1px solid var(--ui-line);margin-top:22px}.mrow .btn{min-height:44px}.mcard textarea{width:100%;font-family:ui-monospace,monospace;font-size:13px;padding:13px;border:1px solid #d1c7b6;border-radius:7px}.mcard .cat-row{grid-template-columns:100px minmax(0,1fr) minmax(0,1fr) auto auto;gap:7px;margin:13px 0;align-items:center}.mcard .cat-row.add{grid-template-columns:100px minmax(0,1fr) minmax(0,1fr) auto;padding-top:18px;border-top:1px solid var(--ui-line)}.mcard .cat-row input{min-width:0;min-height:44px;padding:9px;font-size:14px}.mcard .cat-row .btn{padding:9px 10px;font-size:12px;min-height:44px}.cat-key{font-size:11px;color:#91836d}.cat-key .mini{font-size:10px}body[data-screen=menu] .btn.danger{background:#934438;border-color:#934438;color:#fff}body[data-screen=menu] #toasts{right:22px;bottom:24px;z-index:150}.toast{font-size:13px;background:var(--ui-green);padding:13px 18px;max-width:380px}
@media(max-width:1200px){body[data-screen=menu] #items .row{grid-template-columns:62px minmax(0,1fr) auto 178px;gap:14px;padding:18px}.row .thumb{width:62px!important;height:66px!important}body[data-screen=menu] #items .acts{width:178px}.menu-stock{font-size:10px}.menu-edit{font-size:11px!important;padding-inline:9px!important}.menu-name-line .nm{font-size:15px}.menu-filter-bar{gap:12px}.menu-search{max-width:250px;min-width:180px}.toolbar .btn{padding-inline:13px;font-size:12px}.menu-order-actions .ibtn{width:36px;height:36px;min-width:36px;min-height:36px}}
@media(max-width:750px){.menu-filter-bar{flex-direction:column}.menu-search{width:100%;max-width:none;flex:auto}.menu-filter-bar #cats{width:100%;flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.menu-filter-bar .chip{flex:none}.toolbar{gap:7px!important}.toolbar #preview-link{margin-left:0}.toolbar .btn{font-size:12px!important;padding:9px 12px!important}body[data-screen=menu] #items .row{grid-template-columns:60px minmax(0,1fr) auto;gap:12px;padding:17px}.row>.acts{grid-column:2/-1}body[data-screen=menu] #items .acts{width:100%;justify-content:flex-start;gap:8px}.menu-order-actions{width:auto;margin-left:auto}.menu-stock{font-size:11px}.menu-edit{font-size:12px!important;min-height:44px!important}.menu-name-line .nm{font-size:15px}.menu-list-heading{padding:15px 17px}.menu-row-meta{gap:5px;margin-top:7px}.menu-category-name{font-size:10px}.menu-row-meta .badge{font-size:9px;padding:3px 5px}.menu-shop-context{font-size:11px;gap:8px}.menu-shop-context span{padding-left:8px}.s-head{padding:16px 20px}.s-body{padding:8px 20px 25px}.s-foot{padding:13px 20px}.gcard.show-keys .orow{grid-template-columns:1fr 1fr 80px 36px}.gcard.show-keys .orow .o-key{grid-column:1/-1}.menu-choice-heading h4{font-size:20px}.ghead>b{font-size:14px}.ghead>.btn{font-size:10px!important}.menu-tech-toggle{font-size:9px}.gcard{padding:16px!important}.gcard>.fgrid3{gap:10px}.gcard>.fgrid3 label{font-size:12px}.gcard .orow{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 76px 32px;gap:5px}.gcard .orow input{font-size:12px!important;padding:8px!important}.gcard .orow .btn{width:32px;font-size:11px!important}.mcard{padding:22px}.mcard .cat-row{grid-template-columns:1fr 1fr auto auto}.mcard .cat-row .cat-key{grid-column:1/-1}.mcard .cat-row.add{grid-template-columns:1fr 1fr auto}.mcard .cat-row.add .cat-key{grid-column:1/-1}}
@media(max-width:560px){body[data-screen=menu] .sheet{height:100dvh;max-height:100dvh;width:100%;align-self:stretch}.menu-section-title{margin-top:14px}.s-head h3{font-size:21px!important}.s-body .fgrid3{grid-template-columns:1fr 1fr}.s-body .fgrid3 label:first-child{grid-column:1/-1}.gcard>.fgrid3 label:first-child{grid-column:auto}.gcard>.fgrid3 .menu-key-field{grid-column:1/-1}.menu-list-heading{font-size:11px}.menu-list-heading>span{font-size:10px}.menu-stock{font-size:11px;min-height:44px}.menu-order-actions .ibtn{width:37px;height:42px;min-width:37px;min-height:42px}.menu-name-line .code{font-size:9px}body[data-screen=menu] .prc{font-size:14px}.prc .bigp{font-size:10px}.menu-shop-context{display:none}.menu-search input{font-size:16px!important}.gcard .orow{grid-template-columns:1fr 1fr 36px}.gcard .orow .o-price{grid-column:1/3}.gcard .orow .btn{grid-row:1/3;grid-column:3;min-height:44px}.gcard.show-keys .orow{grid-template-columns:1fr 1fr 36px}.gcard.show-keys .orow .o-key{grid-column:1/-1}.gcard.show-keys .orow .btn{grid-row:2/4}.menu-pricing-hint{font-size:11px}.gcard .ghead{flex-wrap:wrap}.ghead>b{flex:1}.ghead .menu-tech-toggle{order:3;width:100%;text-align:left;padding-left:0;min-height:30px}.s-foot .btn{flex:1;min-width:0}.mcard h3{font-size:21px!important}body[data-screen=menu] #toasts{bottom:88px;right:14px;left:14px}.toast{max-width:none;font-size:12px}.menu-page-heading h1{font-size:27px!important}.toolbar #add-btn{flex:1}.toolbar #preview-link{flex:1}.toolbar #export-btn,.toolbar #import-btn{order:3;flex:1}.toolbar #ai-import-btn{order:4;width:100%}.menu-row-meta .badge{font-size:10px}.row .info>.zh{font-size:12px}}
.menu-sheet-tools{display:flex;gap:10px;align-items:center}.menu-sheet-language{min-height:44px;padding:8px 12px;border:1px solid var(--ui-line);background:#fff;border-radius:7px;color:var(--ui-brand);font-size:12px;font-weight:600}.menu-sheet-language:hover{background:#f4ece5}
/* Finishing pass: keep account/shop context compact without reducing controls. */
body[data-screen=menu] .menu-shop-context #shop-name{font-size:13px;font-weight:600;line-height:1.5;letter-spacing:0;margin:0}
body[data-screen=menu] .menu-shop-context #shop-slug{font-size:11px;color:var(--ui-muted);overflow-wrap:anywhere}
body[data-screen=menu] #items .ibtn{width:44px;height:44px;min-width:44px;min-height:44px}
@media(min-width:641px){
 body[data-screen=menu] .ui-main .wrap{padding-top:20px}
 body[data-screen=menu] #me-card[style*="block"]{display:grid!important;grid-template-columns:minmax(130px,.8fr) minmax(0,1.5fr);gap:18px;align-items:center;padding:9px 15px;min-height:64px;margin-bottom:18px}
 body[data-screen=menu] #me-card #who-line{font-size:11px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.7}
 body[data-screen=menu] #me-card #shop-select[style*="block"]{display:flex!important;align-items:center;gap:11px;max-width:none;min-width:0}
 body[data-screen=menu] #me-card #shop-select label{margin:0;font-size:11px;white-space:nowrap;flex:none}
 body[data-screen=menu] #me-card #shop-sel{flex:1;width:0;min-width:0;min-height:44px;font-size:13px;padding:9px 10px}
 body[data-screen=menu] .menu-page-heading{margin-bottom:18px}
 body[data-screen=menu] .menu-page-heading h1{font-size:27px;margin:5px 0}
 body[data-screen=menu] .menu-page-heading p{font-size:12px;margin-top:6px;line-height:1.6}
 body[data-screen=menu] .menu-page-heading .ui-eyebrow{font-size:9px;line-height:1.4}
 body[data-screen=menu] .menu-shop-context{margin-top:9px;gap:10px;font-size:12px;line-height:1.5}
 body[data-screen=menu] .toolbar{margin-bottom:16px}
 body[data-screen=menu] .menu-filter-bar{margin-bottom:16px}
 body[data-screen=menu] .menu-list-heading{padding-block:14px}
}
@media(max-width:640px){
 body[data-screen=menu] #me-card{padding:12px 15px}
 body[data-screen=menu] #me-card #who-line{font-size:11px!important;overflow-wrap:anywhere}
 body[data-screen=menu] #me-card #shop-select label{margin-top:9px;margin-bottom:5px;font-size:12px}
 body[data-screen=menu] #me-card #shop-sel{min-height:46px;font-size:14px;max-width:100%}
 body[data-screen=menu] #items .acts{row-gap:5px}
 body[data-screen=menu] .menu-stock{min-height:44px}
}
@media(min-width:641px){body[data-screen=menu] .ui-main .wrap{padding-top:16px}body[data-screen=menu] #me-card[style*="block"]{margin-bottom:14px}body[data-screen=menu] .menu-page-heading{margin-bottom:16px}}
