/* Material editors use the existing orange and green tool palette. */
.sb-material-page,.sb-material-detail{background:var(--ui-bg,#fafbfc);color:var(--ui-ink,#111318);display:flex;flex-direction:column;height:100%;min-height:0;font-size:14px}
.sb-m-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px;min-height:56px;background:#fff;border-bottom:1px solid #e9edf1}
.sb-m-header h1{margin:0;font-size:18px;line-height:24px;overflow-wrap:anywhere}
.sb-m-header>button{min-width:44px;flex-shrink:0}.sb-m-header .ui-icon{width:22px;height:22px}
.sb-m-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px calc(24px + env(safe-area-inset-bottom,0px));scrollbar-color:#b4bfcc #fafbfc}
.sb-m-scroll>*{max-width:640px;margin-left:auto;margin-right:auto}
.sb-material-page button,.sb-material-detail button{min-height:44px;padding:8px 12px;line-height:1.4;border-radius:10px;font-size:14px}
.sb-material-page button:not(.ui-primary),.sb-material-detail button:not(.ui-primary){color:var(--ui-link,#b94400);background:#fff;border:1px solid #e9edf1}
.sb-material-page button:disabled,.sb-material-detail button:disabled{opacity:.5;cursor:default}
.sb-material-page :focus-visible,.sb-material-detail :focus-visible{outline:2px solid #16866a;outline-offset:2px}
.sb-material-page ::selection,.sb-material-detail ::selection{background:#ffdcc2;color:#111318}
.sb-m-tabs{display:flex;gap:8px;padding:10px 16px 0}.sb-m-tabs button{flex:1}.sb-m-tabs .is-active{color:#fff!important;background:#bc4300!important;border-color:#bc4300!important}
.sb-m-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;color:#415577;font-size:13px;margin-top:0;margin-bottom:12px;font-variant-numeric:tabular-nums}.sb-m-summary strong{color:#111318}
.sb-m-muted{color:#415577;font-size:13px;line-height:1.6}.sb-m-groups,.sb-m-entries{list-style:none;padding:0}
.sb-m-groups>li{display:flex;align-items:center;flex-wrap:wrap;gap:4px;background:#fff;border:1px solid #e9edf1;border-radius:11px;padding:8px;margin-bottom:10px}
.sb-m-groups .sb-m-group-entry{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:8px;text-align:left;min-width:130px;border:0!important;color:#111318!important}.sb-m-group-entry strong{overflow-wrap:anywhere}.sb-m-count{color:#415577;font-size:12px;white-space:nowrap}
.sb-m-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}.sb-m-entry{padding:12px;margin-bottom:12px;background:#fff;border:1px solid #e9edf1;border-radius:11px}
.sb-m-entry-heading{display:flex;justify-content:space-between;align-items:center;color:#415577;font-size:12px}.sb-m-entry-heading .sb-m-tools{margin:0;gap:4px}
.sb-m-copy,.sb-m-import-preview li{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;margin:8px 0 0}.sb-m-entry-row{display:flex;gap:10px;align-items:flex-start}.sb-m-entry-row>.sb-m-copy{flex:1;min-width:0}
.sb-m-check{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}.sb-m-check input{width:24px;height:24px;accent-color:#16866a}.sb-material-detail .sb-m-remove{color:#c83935!important;padding:10px}.sb-m-remove svg{display:block;width:24px;height:24px}
.sb-m-editor{padding:12px 0}.sb-m-editor h2,.sb-m-dialog h2{margin:0 0 16px;font-size:18px}.sb-m-editor label,.sb-m-dialog label{display:block;color:#415577;line-height:1.6}
.sb-m-editor textarea,.sb-m-dialog input,.sb-m-editor select{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:12px;min-height:44px;background:#fafbfc;border:1px solid #c6d0db;border-radius:8px;color:#111318;font:inherit;font-size:16px;caret-color:#bc4300}
.sb-m-editor textarea{resize:vertical;line-height:1.75}.sb-m-import-preview{max-height:260px;overflow-y:auto;padding-left:24px}.sb-m-feedback{padding:10px 12px;background:#fff3e6;color:#873700;border-radius:8px;overflow-wrap:anywhere}.sb-m-empty{padding:40px 12px;text-align:center;color:#415577}
.sb-material-page .sb-m-danger,.sb-material-detail .sb-m-danger{color:#b52d29!important;border-color:#e4bdbb!important}
.sb-m-overlay{position:fixed;box-sizing:border-box;inset:0;z-index:50;background:#11182755;display:flex;align-items:center;justify-content:center;padding:16px;overflow-y:auto}.sb-m-dialog{width:100%;max-width:420px;padding:20px;background:#fff;border-radius:16px;box-sizing:border-box;max-height:100%;overflow-y:auto}.sb-m-dialog p{line-height:1.6;overflow-wrap:anywhere}.sb-m-dialog .sb-m-tools{justify-content:flex-end;margin:20px 0 0}
.sb-material-modal{--height:100%;--width:100%;--border-radius:0}
@media(min-width:700px){.sb-m-header{padding-left:max(16px,calc((100% - 640px)/2));padding-right:max(16px,calc((100% - 640px)/2))}.sb-m-tabs{max-width:672px;width:100%;align-self:center;box-sizing:border-box}}
.sb-m-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin-top:16px}.sb-m-images li{min-width:0;display:flex;flex-direction:column;gap:6px}.sb-material-detail .sb-m-image-preview{padding:0;border:0;overflow:hidden;aspect-ratio:1;background:#e9edf1}.sb-m-images img{display:block;width:100%;height:100%;object-fit:cover}.sb-m-picture img{display:block;width:100%;max-height:65vh;object-fit:contain;margin-top:12px}

/* Overlay actions keep the picture grid compact; each target remains 44px. */
.sb-m-images li{position:relative;gap:0;border-radius:10px}
.sb-material-detail .sb-m-image-preview{width:100%;box-sizing:border-box;min-height:44px;outline-offset:3px}
.sb-m-images .is-selected .sb-m-image-preview{outline:3px solid #16866a;outline-offset:-3px}
.sb-material-detail .sb-m-image-remove,.sb-m-image-select{position:absolute;top:0;right:0;width:44px;height:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0;border:0!important;background:transparent!important}
.sb-material-detail .sb-m-image-remove svg{width:24px;height:24px;padding:2px;border-radius:50%;color:#b52d29;background:#fff;box-sizing:border-box}
.sb-m-image-select input{width:24px;height:24px;margin:0;accent-color:#16866a;cursor:pointer}
.sb-m-image-management{background:#fff3e6;padding:12px;border-radius:10px;margin-bottom:12px}.sb-m-image-management .sb-m-tools{margin:0}.sb-m-image-management .sb-m-muted{margin:8px 0 0}.sb-m-image-management strong{font-size:14px;color:#111318;font-variant-numeric:tabular-nums}
