/* U3 isolated gallery — two-pane on iPad/desktop; compact selector above preview on phones. */
#modal-root:has(.u3-gallery) .modal{width:min(1060px,calc(100vw - 28px))!important;max-width:none!important;max-height:min(88dvh,920px)!important;overflow:hidden!important;padding:0!important;border-radius:27px!important;background:rgba(247,250,249,.92)!important;-webkit-backdrop-filter:blur(30px);backdrop-filter:blur(30px)}
.u3-gallery{display:flex;flex-direction:column;height:min(85dvh,850px);min-height:480px;color:var(--text,#142c29)}
.u3-gallery-heading{display:flex;justify-content:space-between;align-items:center;padding:19px 22px 15px;border-bottom:1px solid rgba(95,124,116,.13)}
.u3-gallery-heading h2{font-size:22px;margin:0;letter-spacing:-.025em}.u3-gallery-close{width:38px;height:38px;min-width:38px;border:0;border-radius:50%;background:rgba(255,255,255,.73);font-size:25px;color:inherit;cursor:pointer}
.u3-gallery-body{display:grid;grid-template-columns:minmax(230px,33%) minmax(0,1fr);flex:1;min-height:0}
.u3-gallery-sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid rgba(95,124,116,.17);background:rgba(227,237,234,.31)}
.u3-gallery-search-wrap{padding:15px 12px 10px}.u3-gallery-search-wrap input{width:100%;border:1px solid rgba(111,144,134,.22);border-radius:12px;background:rgba(255,255,255,.72);padding:12px;font-size:14px;color:inherit;outline-offset:1px}
.u3-gallery-sidebar-scroll{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:2px 9px 12px}.u3-gallery-list-title{display:flex;justify-content:space-between;gap:5px;align-items:center;padding:7px 9px 9px;font-size:12px;font-weight:800}.u3-gallery-list-title small{font-size:10px;color:var(--muted,#77817f);font-weight:500}
.u3-gallery-items{display:flex;flex-direction:column;gap:4px}.u3-gallery-option{display:flex;gap:10px;align-items:center;width:100%;min-height:61px;padding:8px 9px;border-radius:13px;border:1px solid transparent;background:transparent;color:inherit;text-align:left;cursor:pointer}.u3-gallery-option:hover,.u3-gallery-option.selected{background:rgba(255,255,255,.74);border-color:rgba(13,117,86,.24)}.u3-gallery-option.selected{box-shadow:inset 3px 0 #0c795c}.u3-gallery-option[hidden]{display:none!important}
.u3-gallery-list-icon{width:35px;height:35px;border-radius:11px;background:#d6ebe4;display:grid;place-items:center;color:#096a50;font-size:18px;flex-shrink:0}.u3-gallery-list-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}.u3-gallery-list-copy b{font-size:12px;font-weight:740}.u3-gallery-list-copy small{font-size:10px;color:var(--muted,#667973);line-height:1.25}.u3-gallery-option em{font-size:9px;color:#096c55;white-space:nowrap;font-style:normal}
.u3-gallery-manage{margin:8px 12px 14px;padding:12px;border:1px solid rgba(12,101,76,.16);border-radius:11px;background:rgba(255,255,255,.75);color:#09664d;font-weight:720;font-size:12px;cursor:pointer}
.u3-gallery-inspector{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px 26px;display:flex;flex-direction:column;gap:14px}
.u3-gallery-inspector-head{text-align:center}.u3-gallery-inspector-head b{font-size:19px}.u3-gallery-inspector-head p{color:var(--muted,#64746b);font-size:12px;margin:5px 0 0}
.u3-gallery-preview{border:1px solid rgba(143,165,159,.18);border-radius:20px;background:rgba(197,215,209,.23);min-height:155px;flex:1;display:grid;place-items:center;overflow:hidden;padding:19px 12px}
.u3-gallery-preview-frame{width:min(100%,500px);min-width:0;pointer-events:none}.u3-gallery-preview-frame.widget-small{max-width:230px}.u3-gallery-preview-frame.widget-medium{max-width:350px}.u3-gallery-preview-frame.widget-large{max-width:510px}.u3-gallery-preview-frame>.home-widget{width:100%;max-width:100%;grid-column:auto!important}.u3-gallery-preview-frame .card{margin:0!important}
.u3-gallery-size-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.u3-gallery-size-options button{background:rgba(255,255,255,.81);border:1px solid rgba(113,148,136,.19);border-radius:13px;color:inherit;font-size:12px;font-weight:700;padding:13px 8px;cursor:pointer}.u3-gallery-size-options button.chosen{background:#e4f6e9;border:2px solid #439a75;color:#08573f}
.u3-gallery-add-row{margin-top:auto;display:flex;flex-direction:column;gap:7px}.u3-gallery-add{width:100%;padding:14px 10px;border-radius:13px;background:#087354;border:0;color:#fff;font-size:14px;font-weight:750;cursor:pointer}.u3-gallery-add:disabled{background:#a9c5b8;color:#335d4e;cursor:default}.u3-gallery-feedback{min-height:15px;font-size:11px;text-align:center;color:#126c51}
@media(max-width:600px){#modal-root:has(.u3-gallery) .modal{width:calc(100vw - 16px)!important;max-height:94dvh!important;border-radius:22px!important}.u3-gallery{height:90dvh;min-height:0}.u3-gallery-heading{padding:12px 15px}.u3-gallery-heading h2{font-size:17px}.u3-gallery-body{display:flex;flex-direction:column}.u3-gallery-sidebar{border-right:0;border-bottom:1px solid rgba(95,124,116,.18);height:185px;flex-shrink:0}.u3-gallery-search-wrap{padding:7px 11px 5px}.u3-gallery-search-wrap input{font-size:12px;padding:8px 11px}.u3-gallery-sidebar-scroll{padding:0 8px;overflow-x:auto;overflow-y:hidden}.u3-gallery-list-title{display:none}.u3-gallery-items{flex-direction:row;width:max-content;gap:6px;padding-bottom:4px}.u3-gallery-option{width:146px;min-height:76px;align-items:start;padding:7px}.u3-gallery-list-icon{width:29px;height:29px;font-size:14px}.u3-gallery-list-copy b{font-size:11px}.u3-gallery-list-copy small{display:none}.u3-gallery-option em{position:absolute;margin-top:43px;margin-left:33px}.u3-gallery-manage{margin:2px 8px 7px;padding:5px;font-size:10px}.u3-gallery-inspector{padding:11px 12px;gap:9px}.u3-gallery-inspector-head b{font-size:15px}.u3-gallery-inspector-head p{font-size:11px}.u3-gallery-preview{min-height:115px;padding:10px}.u3-gallery-size-options button{padding:10px 6px}.u3-gallery-add{padding:11px}}
@media(prefers-reduced-motion:reduce){.u3-gallery *{transition:none!important}}
/* Keep the preview/action region full-height on phones rather than leaving a blank footer. */
@media(max-width:600px){.u3-gallery-inspector{flex:1 1 0;min-height:0}.u3-gallery-preview{flex:1 1 auto;min-height:130px}.u3-gallery-add-row{margin-top:0}}
