.ml-tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:22px;position:sticky;top:0;background:var(--surface,#fff);z-index:2;padding:4px 0 10px}.ml-tabs [role=tab]{border:0;background:transparent;color:var(--muted);border-radius:8px;padding:11px 14px;white-space:nowrap;font:inherit;cursor:pointer}.ml-tabs [aria-selected=true]{background:var(--surface-subtle);color:var(--ink);font-weight:650}.ml-tabs button:focus-visible,.ml-photo:focus-visible{outline:2px solid var(--muted);outline-offset:2px}.ml-editor [role=tabpanel][hidden]{display:none}.ml-editor [role=tabpanel]{min-height:240px}.ml-option-group{border:1px solid var(--line);border-radius:8px;padding:16px;margin:16px 0}.ml-option-group legend{color:var(--brand);font-weight:650;padding:0 6px}.ml-option-row{display:grid;grid-template-columns:minmax(120px,1fr) 130px 70px auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid var(--line)}.ml-option-row .field{margin:0}.ml-option-row .zx-check{align-self:center}.ml-row-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.ml-gallery-preview{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:15px}.ml-gallery-preview img{width:110px;height:110px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:var(--surface-subtle)}.ml-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:22px}.ml-gallery article{min-width:0;border:1px solid var(--line);border-radius:8px;padding:10px}.ml-gallery article>span{display:block;padding:7px 0;color:var(--muted)}.ml-gallery article>div{display:flex;gap:4px;flex-wrap:wrap}.ml-gallery .btn{padding:7px;font-size:12px}.ml-photo{border:0;padding:0;width:100%;height:140px;background:var(--surface-subtle);border-radius:8px;cursor:zoom-in}.ml-photo img{width:100%;height:100%;object-fit:contain;border-radius:8px}.ml-store-cover{width:100%;max-height:200px;object-fit:cover;border-radius:8px;margin-bottom:18px}.ml-save-state{background:var(--surface-subtle);border:1px solid var(--line);border-radius:8px;padding:18px;line-height:1.65}.ml-save-state.has-warning{background:#fff8e8;border-color:#ead49c}.ml-save-state p{margin:7px 0 0}.ml-editor .zx-policy-mini{line-height:1.65}.ml-editor [role=tabpanel]>.field:last-child{margin-bottom:20px}@media(max-width:600px){.ml-tabs{gap:2px;margin-bottom:16px}.ml-tabs [role=tab]{padding:10px 11px;font-size:13px}.ml-option-group{padding:12px}.ml-option-row{grid-template-columns:minmax(0,1fr) minmax(90px,.7fr)}.ml-option-row .zx-check{margin-top:3px}.ml-option-row>.btn{justify-self:end;align-self:center}.ml-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ml-photo{height:120px}.ml-gallery-preview img{width:90px;height:90px}.ml-editor .field-grid{grid-template-columns:1fr}}
.ml-cover-preview{border:0;background:transparent;padding:0;cursor:zoom-in}.ml-cover-preview:focus-visible{outline:2px solid var(--muted);outline-offset:3px}

/* Keep navigation and actions outside the editor's only vertical scroller. */
#modal.ml-editor-dialog[open]:has(.ml-editor){display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
#modal.ml-editor-dialog:has(.ml-editor)>.modal-head{flex-shrink:0}
#modal.ml-editor-dialog:has(.ml-editor)>#zx-business-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}
#modal.ml-editor-dialog:has(.ml-editor) .ml-tabs{position:static;flex-shrink:0;min-width:0;max-width:100%;margin:0;padding:12px 26px;overscroll-behavior-x:contain;scrollbar-width:thin}
#modal.ml-editor-dialog:has(.ml-editor) #zx-business-form>.form-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:16px;-webkit-overflow-scrolling:touch}
#modal.ml-editor-dialog:has(.ml-editor) .ml-editor{min-width:0}
#modal.ml-editor-dialog:has(.ml-editor) .ml-editor [role=tabpanel]{min-height:0}
#modal.ml-editor-dialog:has(.ml-editor) .modal-footer{flex-shrink:0;align-items:center;gap:10px;flex-wrap:wrap}
.ml-step-navigation{display:flex;flex-shrink:0;align-items:center;gap:8px;margin-right:auto;min-width:0}
.ml-step-navigation [data-ml-step]{white-space:nowrap;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums;margin-right:4px}
.ml-step-navigation .btn{white-space:nowrap;padding:9px 12px}
#modal.ml-editor-dialog:has(.ml-editor) .modal-footer>.btn{white-space:nowrap;flex-shrink:0}
@media(min-width:801px){
 #modal.ml-editor-dialog[open]:has(.ml-editor){width:min(760px,calc(100vw - 48px));height:min(780px,calc(100vh - 48px));height:min(780px,calc(100dvh - 48px));max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px)}
}
@media(max-width:800px){
 #modal.ml-editor-dialog:has(.ml-editor)>.modal-head{padding-top:4px;padding-bottom:10px}
 #modal.ml-editor-dialog:has(.ml-editor) .ml-tabs{padding:8px 16px;gap:2px}
 #modal.ml-editor-dialog:has(.ml-editor) .ml-tabs [role=tab]{padding:9px 10px;font-size:13px}
 #modal.ml-editor-dialog:has(.ml-editor) .modal-footer{gap:6px;padding:10px 12px max(10px,env(safe-area-inset-bottom))}
 .ml-step-navigation{gap:4px}
 .ml-step-navigation [data-ml-step]{font-size:12px;margin-right:2px}
 #modal.ml-editor-dialog:has(.ml-editor) .modal-footer .btn{padding:8px;font-size:12px;min-height:42px}
 #modal.ml-editor-dialog:has(.ml-editor) .ml-step-navigation .btn{padding:8px 5px}
}
