
.image-add {background:#fff;border:1px solid #dce5de;border-radius:12px;padding:1rem;min-width:0;text-align:left}
.image-add h2{font-size:1.1rem;margin:0 0 .75rem}
.image-add .material-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-height:19rem;overflow:auto}
.image-add .material-results button{overflow-wrap:anywhere;min-width:0}
.image-add .file{display:block;margin-bottom:.6rem}
.image-selection{overflow-wrap:anywhere;margin:0}
.bench-image-actions,.bench-assets .sheet-close{display:none}
[hidden]{display:none!important}
@media(min-width:701px){
 .editor:has(.image-add){grid-template-columns:minmax(0,1fr) minmax(280px,340px)}
 .editor .workspace .image-add{display:block;width:100%;margin-top:1rem}
 .workbench:has(.image-add){grid-template-columns:minmax(0,1fr) minmax(280px,340px)}
 .bench-stage .image-add{margin-top:1rem}
}
@media(max-width:700px){
 .bench-image-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.7rem}
 .bench-assets.image-add{display:none;position:fixed;z-index:100;inset:auto 0 0;max-height:52dvh;overflow:auto;overscroll-behavior:contain;padding-bottom:calc(1rem + env(safe-area-inset-bottom))}
 .bench-assets.image-add-open,.bench-assets .sheet-close{display:block}
 .image-add .material-results{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.languages{padding:3px;background:#f3f4f6;border:1px solid #e5e7eb;gap:2px;border-radius:999px}
.languages a,.languages a+a{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;background:transparent;border:0;border-radius:50%;font-size:13px;line-height:32px;color:#1f2937}
.languages a[aria-current=true]{background:#22c55e;color:#fff;font-weight:600}
.languages a:focus-visible{outline:2px solid #2e8b57;outline-offset:2px}
.metricool-art img{display:block;max-width:100%;height:auto}

/* Keep the canvas interactive above the mobile controls. */
.mobile-panel-close{display:none}
@media(max-width:700px){
 .editor .mobile-tools,.workbench .bench-image-actions{
  position:sticky;bottom:0;z-index:101;display:flex;flex-wrap:wrap;gap:4px;
  padding:6px 8px max(6px,env(safe-area-inset-bottom));margin:0;background:#f5f8f6
 }
 .mobile-tools button,.bench-image-actions button{padding:6px 9px;min-height:38px}
 .mobile-tools button[aria-expanded=true],.bench-image-actions button[aria-expanded=true]{background:#d6f2df;border-color:#16814a}
 [data-mobile-edit] .mobile-tools,[data-mobile-edit] .bench-image-actions{position:fixed!important;inset:auto 0 0;min-height:54px}
 .editor .mobile-edit-controls,.editor .mobile-edit-assets,.workbench .mobile-edit-controls{display:none!important}
 [data-mobile-edit=assets] .mobile-edit-assets,
 [data-mobile-edit]:not([data-mobile-edit=assets]) .mobile-edit-controls{
  display:block!important;position:fixed;inset:auto 0 var(--mobile-edit-bar-height,54px) 0;z-index:100;
  max-height:43dvh;overflow:auto;overscroll-behavior:contain;
  border-radius:16px 16px 0 0;padding:12px;background:white;box-shadow:0 -6px 22px #17362925
 }
 .mobile-edit-assets .sheet-close,.mobile-edit-controls .mobile-panel-close{display:inline-flex!important;margin-bottom:8px}
 .mobile-edit-controls > :not(.mobile-panel-close):not([role=status]){display:none}
 [data-mobile-edit=background] .mobile-edit-controls > [data-edit-group=background],
 [data-mobile-edit=adjust] .mobile-edit-controls > [data-edit-group=adjust],
 [data-mobile-edit=layers] .mobile-edit-controls > [data-edit-group=layers]{display:revert;margin-bottom:8px}
 [data-mobile-edit] .mobile-edit-controls > .bench-row[data-edit-group]{gap:8px}
 [data-mobile-edit=background] .mobile-edit-controls > .bench-row[data-edit-group=background],
 [data-mobile-edit=adjust] .mobile-edit-controls > .bench-row[data-edit-group=adjust]{display:flex}
 .image-add .material-results{grid-template-columns:repeat(4,minmax(0,1fr));max-height:11rem}
 .image-add .material-results button{padding:4px;font-size:12px;line-height:1.2}
}

.image-add .file{position:relative}

.flyer-mobile-note{display:none}
.carousel-pagination{margin:12px 0}
.carousel-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin:.6rem 0}
.carousel-tile{display:block;width:auto;max-width:100%;max-height:36dvh;margin:auto;touch-action:pan-y}
@media(max-width:700px){.flyer-mobile-note{display:block}}

/* Build 008.1 Human Gate adjustments */
#editor .workspace{min-width:0}
#editor .workspace > canvas{display:block;margin-inline:auto}
#editor .workspace > .image-add{box-sizing:border-box;clear:both;margin:16px 0 0}
.image-add .material-results{grid-template-columns:repeat(4,minmax(0,1fr));max-width:none;align-content:start;overflow-x:hidden;padding:2px;scrollbar-gutter:stable}
.image-add .material-results button{box-sizing:border-box;width:100%;aspect-ratio:1;min-height:0;padding:5px;display:grid;place-items:center;background:#fff}
.image-add .material-results img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;pointer-events:none}
.image-add .material-more{margin-block:14px 12px}
.image-add .asset-status:empty{margin:0}
@media(max-width:700px){
 #editor[data-mobile-edit=assets] .workspace > .image-add{position:static;max-height:none;overflow:visible;box-shadow:none}
}

#editor .workspace > canvas{grid-column:1;grid-row:1}
#editor .workspace > .preview-note{grid-column:1;grid-row:2}
#editor .workspace > .image-add{grid-column:1;grid-row:3;width:100%}
@media(max-width:700px){
 .image-add .material-results{max-height:min(11rem,32vw)}
 #editor[data-mobile-edit=assets] .mobile-tools{position:sticky!important;inset:auto 0 0}
}

.image-add{container-type:inline-size}
@media(min-width:701px){.image-add .material-results{max-height:min(19rem,56cqw)}}

.image-drop-active{outline:3px dashed #218654!important;outline-offset:-3px;background-color:#e8f6ee}

.split-material-hidden{display:none!important}

.layout-thumbnails button svg,.create-controls button svg{width:52px;height:32px;display:block;margin:auto;color:#397d53}.layout-thumbnails button[aria-pressed=true],.create-controls button[aria-pressed=true]{background:#def2e4;border-color:#397d53}

#save-format{min-width:0;border:1px solid #c9dfd2;border-radius:8px;padding:10px;margin:8px 0}#save-format label{display:flex;align-items:center;gap:6px}#save-format small{display:block;margin:3px 0 7px}
#save-format label{display:grid;grid-template-columns:17px minmax(0,1fr);align-items:start;gap:8px;padding:8px 4px;min-height:44px;cursor:pointer}
#save-format input[type=radio]{width:17px;height:17px;min-width:17px;margin:3px 0 0;accent-color:#397d53}
#save-format small{margin:2px 0 0}
.layout-thumbnails{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(118px,100%),1fr));gap:8px}
.layout-thumbnails button{display:grid;grid-template-rows:32px 1fr;place-items:center;gap:4px;min-height:86px;padding:6px}
.layout-thumbnails button[hidden]{display:none}
