/* Finite editor/mobile/media additions only. Original global, marketing and tenant stylesheet bodies held. */

@media (max-width: 1279px) {

  [data-site-editor-root] [data-editor-mobile-toolbar][data-editor-mobile-destinations="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1279px) {

  [data-site-editor-root] :is([data-editor-blocks-panel], [data-editor-inspector-panel]),
  [data-site-editor-root] [data-editor-panel-backdrop] {
    bottom: var(--editor-mobile-bar-height);
  }
}
@media (max-width: 1279px) {
  [data-site-editor-root] .editor-mobile-destination {
    display: flex;
    min-width: 0;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 2px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--editor-experience-muted, #496479);
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
  }
}
@media (max-width: 1279px) {
  [data-site-editor-root] .editor-mobile-destination > svg { width: 19px; height: 19px; flex-shrink: 0; }
}
@media (max-width: 1279px) {
  [data-site-editor-root] .editor-mobile-destination[data-state="open"] {
    border-color: color-mix(in srgb, var(--editor-experience-accent, #0284c7) 35%, transparent);
    background: color-mix(in srgb, var(--editor-experience-accent, #0284c7) 14%, transparent);
    color: var(--editor-experience-ink, #123047);
  }
}
@media (max-width: 1279px) {
  [data-site-editor-root] [data-editor-mobile-panel-toggle]:active { transform: translateY(1px); }
}
@media (prefers-reduced-motion: reduce) {
  [data-site-editor-root] [data-editor-mobile-panel-toggle]:active { transform: none; }
}
@media (forced-colors: active) {
  [data-site-editor-root] .editor-mobile-destination[data-state="open"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}
@media (max-width: 1279px) {

  [data-site-editor-root][data-editor-visual-viewport="true"] :is(
    [data-editor-blocks-panel], [data-editor-inspector-panel], [data-editor-panel-backdrop]
  ) {
    top: calc(var(--editor-visual-viewport-top) + var(--editor-mobile-header-height));
    bottom: calc(var(--editor-visual-viewport-bottom) + var(--editor-mobile-bar-height));
    max-height: max(0px, calc(var(--editor-visual-viewport-height) - var(--editor-mobile-header-height) - var(--editor-mobile-bar-height)));
  }
}
/* Sidebar-only presentation. Studio, picker, upload, and stock-photo behavior stay shared. */
.editor-media-sidebar{--ems-ink:#163448;--ems-muted:#526b7e;--ems-line:#d4e1e9;--ems-panel:#fff;--ems-soft:#f0f6f9;--ems-accent:#086d83;color:var(--ems-ink);display:grid;gap:14px;min-width:0}
.dark .editor-media-sidebar{--ems-ink:#edf8ff;--ems-muted:#a6bdce;--ems-line:#294353;--ems-panel:#0b1b29;--ems-soft:#102534;--ems-accent:#82e2ed}
.editor-media-sidebar *{box-sizing:border-box}.editor-media-sidebar :is(.ems-manage,.ems-upload,.ems-search>button,.ems-results-heading>button,.ems-empty>button){cursor:pointer}.editor-media-sidebar :is(button,input):focus-visible{outline:2px solid var(--ems-accent);outline-offset:3px}.editor-media-sidebar :is(.ems-manage,.ems-upload,.ems-search,.ems-empty)>svg,.ems-upload-icon>svg,.ems-empty-icon>svg{flex-shrink:0}
.ems-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.ems-heading>div{min-width:0}.ems-heading h3{margin:0;font-size:13px;line-height:1.5;font-weight:650;letter-spacing:-.015em}.ems-heading p{margin:2px 0 0;color:var(--ems-muted);font-size:10px;line-height:1.6}
.editor-media-sidebar .ems-manage{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 10px;border:1px solid var(--ems-line);border-radius:8px;background:var(--ems-panel);color:var(--ems-ink);font-size:11px;font-weight:600;line-height:1.4}.editor-media-sidebar .ems-manage:hover{border-color:var(--ems-accent);background:var(--ems-soft)}
.editor-media-sidebar .ems-sources{min-height:44px;border:1px solid var(--ems-line);border-radius:9px;background:var(--ems-soft);gap:3px}.editor-media-sidebar .ems-sources>button{min-height:36px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ems-muted);font-size:11px;line-height:1.4;box-shadow:none}.editor-media-sidebar .ems-sources>button[data-state=active]{border-color:var(--ems-line);background:var(--ems-panel);color:var(--ems-ink);box-shadow:0 1px 3px #0617240d}.editor-media-sidebar .ems-sources>button:hover{color:var(--ems-ink)}
.ems-search{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding:0 10px;border:1px solid var(--ems-line);border-radius:8px;background:var(--ems-panel);color:var(--ems-muted)}.editor-media-sidebar .ems-search input{width:100%;min-width:0;height:42px;min-height:42px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ems-ink);font-size:11px;box-shadow:none}.ems-search input::-webkit-search-cancel-button{display:none}.editor-media-sidebar .ems-search input:focus-visible{outline-offset:1px}.ems-search input::placeholder{color:var(--ems-muted);opacity:1}.ems-search>button{display:grid;place-items:center;flex-shrink:0;width:32px;height:36px;border:0;border-radius:5px;background:transparent;color:var(--ems-muted)}
.ems-upload-group{display:grid;gap:7px}.editor-media-sidebar .ems-upload{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:10px;row-gap:5px;align-items:center;width:100%;min-height:88px;padding:12px;border:1px dashed var(--ems-accent);border-radius:10px;background:var(--ems-soft);color:var(--ems-ink);text-align:left;transition:background .15s,border-color .15s,box-shadow .15s}.editor-media-sidebar .ems-upload:hover{box-shadow:inset 0 0 0 1px var(--ems-accent)}.editor-media-sidebar .ems-upload[data-drag-active=true]{border-style:solid;box-shadow:inset 0 0 0 2px var(--ems-accent);background:var(--ems-panel)}.editor-media-sidebar .ems-upload[aria-busy=true]{cursor:wait;opacity:.75}.ems-upload-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--ems-line);border-radius:9px;background:var(--ems-panel);color:var(--ems-accent)}.ems-upload-copy{display:grid;gap:3px;min-width:0}.ems-upload-copy strong{font-size:11px;line-height:1.5;font-weight:650}.ems-upload-copy>span{color:var(--ems-muted);font-size:10px;line-height:1.5}.ems-upload-formats{grid-column:2;font-size:9px;line-height:1.6;color:var(--ems-muted)}
.ems-results-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px;color:var(--ems-muted)}.ems-results-heading h3{font-size:10px;font-weight:600;line-height:1.5}.editor-media-sidebar .ems-results-heading button{min-height:32px;padding:3px 0 3px 8px;color:var(--ems-accent);font-size:10px;font-weight:600;background:transparent;border:0}
.ems-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 14px 16px;text-align:center}.ems-empty-icon{display:grid;place-items:center;width:46px;height:46px;margin-bottom:2px;border:1px solid var(--ems-line);border-radius:15px;background:linear-gradient(145deg,var(--ems-soft),var(--ems-panel));color:var(--ems-accent)}.ems-empty h4{font-size:12px;font-weight:600;line-height:1.5;color:var(--ems-ink)}.ems-empty p{max-width:230px;margin:0;font-size:11px;line-height:1.7;color:var(--ems-muted)}.editor-media-sidebar .ems-empty button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;margin-top:3px;padding:7px 10px;border:1px solid var(--ems-line);border-radius:7px;background:var(--ems-panel);color:var(--ems-accent);font-size:11px;font-weight:600}.editor-media-sidebar .ems-empty button:hover{border-color:var(--ems-accent);background:var(--ems-soft)}.ems-placement-hint{font-size:10px;line-height:1.7;color:var(--ems-muted);text-align:center}
@media(pointer:coarse){.editor-media-sidebar .ems-manage,.editor-media-sidebar .ems-sources>button,.editor-media-sidebar .ems-empty button{min-height:44px}.ems-search>button{width:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.editor-media-sidebar .ems-upload{transition:none}}
@media(forced-colors:active){.editor-media-sidebar{--ems-ink:CanvasText;--ems-muted:CanvasText;--ems-line:ButtonText;--ems-panel:Canvas;--ems-soft:Canvas;--ems-accent:LinkText}.editor-media-sidebar .ems-sources>button[data-state=active]{outline:2px solid Highlight}.ems-empty-icon{background:Canvas}}

/* Touch uses the drawer's scrolling, with controls that remain easy to reach. */
@media(max-width:767px),(pointer:coarse){.editor-media-sidebar .ems-heading h3{font-size:15px}.editor-media-sidebar .ems-heading p{font-size:12px}.editor-media-sidebar .ems-search input{font-size:16px;min-height:46px}.editor-media-sidebar .ems-sources>button{min-height:44px;font-size:12px}.editor-media-sidebar .ems-manage{min-height:44px;font-size:12px}.editor-media-sidebar .ems-upload-copy strong{font-size:13px}.editor-media-sidebar .ems-upload-copy>span,.editor-media-sidebar .ems-upload-formats{font-size:11px}.editor-media-sidebar .ems-results-heading h3,.editor-media-sidebar .ems-results-heading button{font-size:12px;min-height:44px}.editor-media-sidebar [data-editor-media-sidebar-asset] button{min-height:44px}.editor-media-sidebar [data-editor-media-sidebar-asset]>button>span:first-child{font-size:12px}.editor-media-sidebar [data-editor-media-sidebar-asset]>button>span:last-child{font-size:11px}.editor-media-sidebar [data-editor-library-drag-affordance]{display:none}.editor-media-sidebar .ems-placement-hint{font-size:11px}.editor-media-sidebar .ems-empty p{font-size:12px}.editor-media-sidebar .ems-empty button{min-height:44px;font-size:12px}}

@media(pointer:coarse){.editor-media-sidebar .ems-upload-group [aria-label="Dismiss upload error"]{width:44px;min-width:44px;height:44px;min-height:44px}}

/* Media tools share the editor's layering, focus and phone viewport contract. */
body:has([data-editor-media-dialog]) [data-sonner-toaster]{z-index:299!important}
body:has([data-editor-media-dialog]) [data-slot="select-content"]{z-index:350}
[data-editor-media-dialog]{min-width:0;isolation:isolate;overscroll-behavior:contain}
[data-editor-media-dialog] :focus-visible{outline:2px solid #06b6d4;outline-offset:2px}
.dark[data-editor-media-dialog] .text-slate-500{color:#a7bdcd}
[data-editor-media-dialog] [data-media-stage]{background-image:radial-gradient(#94a3b822 1px,transparent 1px);background-size:16px 16px}
[data-editor-media-scroll]{overscroll-behavior:contain;scrollbar-width:auto;scroll-padding:18px;-webkit-overflow-scrolling:touch}
[data-editor-site-media-studio-content]::-webkit-scrollbar{width:12px;height:12px}
[data-editor-site-media-studio-content]::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:10px;background:#7c98a999;background-clip:padding-box}
[data-editor-media-dialog-header]{min-width:0}
[data-editor-media-dialog-header]>div:nth-child(2){overflow-wrap:anywhere}
[data-editor-media-dialog-footer]{background:inherit}
[data-editor-site-media-studio] [data-editor-media-dialog-footer]>p{min-width:0;flex:1;line-height:1.6}
@media(max-width:767px),(max-height:500px) and (pointer:coarse){
  [data-editor-media-dialog]{left:0!important;top:var(--media-viewport-top,0px)!important;width:100%!important;max-width:none!important;height:var(--media-viewport-height,100dvh)!important;max-height:none!important;transform:none!important;translate:none!important;border:0!important;border-radius:0!important}
  [data-editor-media-dialog-header]{align-items:center;gap:10px;padding:calc(12px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 12px max(14px,env(safe-area-inset-left,0px))}
  [data-editor-media-dialog-header]>div:first-child{margin:0;padding:9px}
  [data-editor-media-dialog-header] [data-slot=dialog-title]{font-size:16px}
  [data-editor-media-dialog-header] [data-editor-media-dialog-description]{font-size:11px;line-height:1.5}
  [data-editor-media-dialog] [data-editor-site-media-studio-content]{padding:16px max(14px,env(safe-area-inset-right,0px)) 20px max(14px,env(safe-area-inset-left,0px));overflow-x:hidden;overflow-y:auto}
  [data-editor-media-dialog-footer]{gap:10px;padding:10px max(14px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px))}
  [data-editor-media-dialog] :is(button,[role=button]){min-height:44px}
  [data-editor-media-dialog] :is(input:not([type=range]):not([type=file]),textarea,select){min-height:44px;font-size:16px}
  [data-editor-media-dialog] [data-media-stage]{max-height:320px}
  [data-editor-media-dialog="gallery"] [data-media-stage]{max-height:240px}
  [data-editor-media-dialog]:not([data-editor-media-dialog="site"])>.min-h-0.flex-1{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:auto;-webkit-overflow-scrolling:touch}
  [data-editor-site-media-studio] [data-editor-media-dialog-footer]>p{font-size:10px}
}
@media(max-width:359px){[data-editor-media-dialog-header]>div:first-child{display:none}[data-editor-site-media-studio] [data-editor-media-dialog-footer]>p{max-width:180px}}
@media(max-height:500px) and (pointer:coarse){[data-editor-media-dialog-header]{padding-top:max(8px,env(safe-area-inset-top,0px));padding-bottom:8px}[data-editor-media-dialog-header] [data-editor-media-dialog-description]{display:none}[data-editor-media-dialog-footer]{padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}[data-editor-media-dialog-footer]>p:not([role=alert]):not([role=status]){display:none}}
@media(forced-colors:active){[data-editor-media-dialog]{border:1px solid CanvasText!important}[data-editor-media-scroll]{scrollbar-color:auto}}

/* The library has one vertical scroll owner: its dialog body (or editor drawer). */
.editor-media-manager-tabs,.editor-media-manager,.eml-tab-panel{min-width:0;width:100%}
.editor-media-manager,.eml-picker{--eml-ink:#163448;--eml-muted:#597084;--eml-line:#d7e3eb;--eml-panel:#fff;--eml-soft:#f2f7fa;--eml-accent:#08768b;color:var(--eml-ink)}
.dark .editor-media-manager,.dark .eml-picker{--eml-ink:#edf8ff;--eml-muted:#a7bdcd;--eml-line:#2a4354;--eml-panel:#0d1e2c;--eml-soft:#102737;--eml-accent:#85e5ef}
.editor-media-manager{position:relative;display:grid;gap:18px}.editor-media-manager *,.eml-picker *{box-sizing:border-box}
.editor-media-manager :is(button,input,select):focus-visible,.eml-picker :is(button,input,select):focus-visible{outline:2px solid var(--eml-accent);outline-offset:3px}
.editor-media-manager button{cursor:pointer}.editor-media-manager button:disabled{cursor:default}
.eml-source-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.editor-media-manager .eml-source-switcher{display:grid;grid-template-columns:1fr 1fr;gap:4px;height:auto;width:min(100%,420px);min-width:0;padding:5px;border:1px solid var(--eml-line);border-radius:13px;background:var(--eml-soft)}
.editor-media-manager .eml-source-switcher>button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--eml-muted);font-size:12px;font-weight:650;box-shadow:none}
.editor-media-manager .eml-source-switcher>button[data-state=active]{border-color:var(--eml-line);background:var(--eml-panel);color:var(--eml-ink);box-shadow:0 2px 5px #071b2a08}
.eml-count{display:inline-flex;align-items:center;justify-content:center;min-width:23px;min-height:21px;padding:1px 6px;border-radius:6px;background:var(--eml-soft);color:var(--eml-muted);font-size:10px;font-weight:600;font-variant-numeric:tabular-nums}
.eml-save-note{display:flex;align-items:center;gap:6px;flex-shrink:0;color:var(--eml-muted);font-size:11px}
.eml-permission{padding:12px 14px;border:1px solid var(--eml-line);border-radius:10px;background:var(--eml-soft);color:var(--eml-muted);font-size:12px;line-height:1.7}
.editor-media-manager .eml-tab-panel{margin:0;outline:none}.eml-tab-panel[data-state=active]{display:grid;gap:16px}
.eml-toolbar{display:flex;align-items:center;gap:12px;min-width:0}
.eml-search{display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:48px;padding:0 12px;border:1px solid var(--eml-line);border-radius:11px;background:var(--eml-panel);color:var(--eml-muted)}
.eml-search>svg{flex-shrink:0}.editor-media-manager .eml-search input{min-width:0;width:100%;height:46px;padding:0;border:0;background:transparent;color:var(--eml-ink);font-size:13px;box-shadow:none}.eml-search input::-webkit-search-cancel-button{display:none}.eml-search input::placeholder{color:var(--eml-muted);opacity:1}.eml-search>button{display:grid;place-items:center;flex-shrink:0;height:44px;width:44px;border:0;background:transparent;color:inherit}
.editor-media-manager .eml-upload{min-height:48px;flex-shrink:0;padding:10px 18px;border-radius:10px;font-size:12px}
.eml-mobile-folder-row{display:none}.eml-manager-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:start}
.eml-folders{display:grid;align-content:start;gap:9px;min-width:0;padding:14px;border:1px solid var(--eml-line);border-radius:14px;background:var(--eml-soft)}
.eml-folder-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:2px}.eml-folder-heading h3{font-size:12px;font-weight:650}
.editor-media-manager .eml-square-button{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid var(--eml-line);border-radius:9px;background:var(--eml-panel);color:var(--eml-ink)}
.eml-all-media{display:flex;align-items:center;gap:8px;min-height:44px;width:100%;padding:8px 10px;border:1px solid var(--eml-line);border-radius:8px;background:var(--eml-panel);font-size:12px;text-align:left}.eml-all-media>span:nth-child(2){min-width:0;flex:1;font-weight:600}.eml-all-media[aria-pressed=true]{border-color:var(--eml-accent);color:var(--eml-accent)}
.eml-folder-help{margin:8px 0 0;font-size:11px;line-height:1.8;color:var(--eml-muted)}
.eml-folder-picker{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding-left:12px;border:1px solid var(--eml-line);border-radius:9px;background:var(--eml-panel);color:var(--eml-ink)}
.eml-folder-picker>svg{flex-shrink:0;color:var(--eml-accent)}.eml-folder-picker select{flex:1;width:100%;min-width:0;min-height:44px;padding:8px 28px 8px 0;border:0;background:transparent;color:inherit;font-size:12px;text-overflow:ellipsis}.eml-folder-picker option,.eml-sort option{background:var(--eml-panel);color:var(--eml-ink)}
.eml-folder-create{display:grid;gap:10px;padding:16px;border:1px solid var(--eml-accent);border-radius:12px;background:var(--eml-soft)}.eml-folder-create>label{display:grid;gap:6px;font-size:12px;font-weight:600}.eml-folder-create p{font-size:12px;line-height:1.6;color:var(--eml-muted)}.eml-folder-create>div{display:flex;flex-wrap:wrap;gap:8px}
.eml-collection{min-width:0}.eml-collection-header{display:grid;gap:10px;margin-bottom:16px}.eml-collection-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.eml-collection-title>div:first-child{min-width:0}.eml-collection-title h3{overflow-wrap:anywhere;font-size:16px;line-height:1.5;font-weight:650;letter-spacing:-.02em}.eml-collection-title p{margin-top:2px;color:var(--eml-muted);font-size:11px}
.eml-filter-bar{display:flex;align-items:center;gap:10px;min-width:0}.editor-media-manager .eml-filter-bar>button{min-height:44px;padding:6px 2px;color:var(--eml-accent);font-size:11px;font-weight:600}.editor-media-manager .eml-filter-bar .eml-filter-trigger{display:none}.eml-filter-active{padding:2px 5px;border-radius:5px;background:var(--eml-soft);color:var(--eml-accent);font-size:10px}
.eml-filters{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:12px;border:1px solid var(--eml-line);border-radius:11px;background:var(--eml-soft)}.eml-usage-filters{display:flex;flex-wrap:wrap;gap:5px}.eml-usage-filters>button{display:flex;align-items:center;gap:5px;min-height:40px;padding:8px 11px;border:1px solid var(--eml-line);border-radius:8px;background:var(--eml-panel);color:var(--eml-muted);font-size:11px;font-weight:600}.eml-usage-filters>button[aria-pressed=true]{border-color:var(--eml-accent);background:var(--eml-accent);color:var(--eml-panel)}.eml-sort{display:flex;align-items:center;gap:8px;color:var(--eml-muted);font-size:11px}.eml-sort select{min-height:40px;min-width:0;padding:8px;border:1px solid var(--eml-line);border-radius:8px;background:var(--eml-panel);color:var(--eml-ink);font-size:11px}
.eml-selection-bar{display:grid;gap:8px;margin-bottom:16px;padding:12px;border:1px solid var(--eml-accent);border-radius:12px;background:var(--eml-soft)}.eml-selection-summary{display:flex;align-items:center;gap:8px;color:var(--eml-accent);font-size:12px}.eml-selection-summary>span{flex:1;color:var(--eml-muted);font-size:11px}.eml-selection-actions{display:flex;flex-wrap:wrap;gap:7px}.eml-selection-actions>button{flex-grow:1}
.eml-rename{display:grid;gap:10px;margin-bottom:16px;padding:16px;border:1px solid var(--eml-accent);border-radius:12px;background:var(--eml-soft)}.eml-rename p{color:var(--eml-muted);font-size:11px;line-height:1.6}.eml-error{margin:12px 0;padding:12px;border:1px solid #fb718577;border-radius:9px;background:#fb71851a;color:#a51d3d;font-size:12px;line-height:1.7;overflow-wrap:anywhere}.dark .eml-error{color:#fecdd3}
.eml-asset-grid{display:grid;min-width:0;gap:14px}.eml-asset-grid--grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr))}.eml-asset-grid--list{grid-template-columns:minmax(0,1fr)}.eml-asset-card{min-width:0}.eml-asset-card [data-editor-media-select]{touch-action:pan-y}.eml-asset-card>div:last-child>div:first-child>button:first-child{min-height:44px}.eml-asset-card>div:last-child>div:first-child>button:first-child>span{font-size:12px}
.eml-loading{display:flex;align-items:center;justify-content:center;gap:10px;min-height:220px;color:var(--eml-muted);font-size:13px}.eml-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-height:310px;padding:36px 20px;border:1px dashed var(--eml-line);border-radius:16px;background:radial-gradient(ellipse at 50% 0%,#06b6d40a,transparent 70%);text-align:center}.eml-empty>span{display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--eml-line);border-radius:20px;background:var(--eml-soft);color:var(--eml-accent)}.eml-empty h4{font-size:18px;font-weight:650;letter-spacing:-.025em}.eml-empty p{max-width:310px;color:var(--eml-muted);font-size:12px;line-height:1.8}.eml-empty small{color:var(--eml-muted);font-size:10px}
.eml-picker-folders{display:flex;gap:10px;margin-top:12px;min-width:0}.eml-picker-folders .eml-folder-picker{flex:1}.eml-picker-favorite{display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid var(--eml-line);border-radius:9px;background:var(--eml-panel);font-size:12px}.eml-picker-favorite[aria-pressed=true]{border-color:var(--eml-accent);color:var(--eml-accent)}.eml-picker-toolbar>div:first-child{gap:10px}.eml-picker-preview:disabled{opacity:.6}.eml-picker-results{overscroll-behavior:contain;scrollbar-width:auto}
@media(min-width:900px){.eml-filter-bar{justify-content:flex-end;margin-top:-8px;margin-bottom:-6px}}
@media(max-width:899px){.eml-save-note,.eml-folders{display:none}.eml-manager-layout{display:block}.eml-mobile-folder-row{display:flex;gap:8px;min-width:0}.eml-mobile-folder-row>.eml-folder-picker{flex:1}.editor-media-manager .eml-source-switcher{width:100%}.eml-source-bar{display:block}.editor-media-manager .eml-filter-bar .eml-filter-trigger{display:flex;align-items:center;gap:7px;flex:1;color:var(--eml-ink);text-align:left}.eml-filter-trigger>svg:last-child{margin-left:auto}.eml-filters[data-expanded=false]{display:none}.eml-filters{align-items:stretch;flex-direction:column}.eml-usage-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.eml-usage-filters>button{justify-content:center;min-width:0;min-height:44px;padding:8px 3px;font-size:11px}.eml-sort select{flex:1;min-height:44px}.eml-collection-header{gap:8px}.eml-filter-bar{gap:12px}.eml-asset-grid--grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.eml-selection-actions{display:grid;grid-template-columns:1fr 1fr}.eml-asset-card>div:last-child{padding:10px}.eml-asset-card [data-editor-library-drag-affordance]{display:none}}
@media(max-width:479px){.editor-media-manager{gap:14px}.eml-tab-panel[data-state=active]{gap:13px}.eml-toolbar{flex-wrap:wrap;gap:8px}.eml-search{flex-basis:100%}.editor-media-manager .eml-upload{width:100%;justify-content:center}.eml-collection-title h3{font-size:15px}.eml-asset-card[data-editor-media-card-view=grid]>div:last-child>div:last-child{flex-wrap:wrap}.eml-asset-card[data-editor-media-card-view=grid]>div:last-child>div:last-child>button:first-child{flex-basis:100%}.eml-asset-card[data-editor-media-card-view=grid]>div:last-child>div:last-child>button:last-child{width:100%;min-height:44px}.eml-picker-toolbar>div:first-child>label{flex-basis:100%;order:2}.eml-picker-toolbar>div:first-child>[data-editor-media-view-toggle]{margin-left:auto}.eml-picker-toolbar>div:first-child>button:last-child{flex-basis:100%;min-height:44px;order:3}.eml-picker-folders{flex-wrap:wrap}.eml-picker-folders .eml-folder-picker{flex-basis:100%}}
@media(max-width:767px),(max-height:500px) and (pointer:coarse){.eml-picker{height:auto;min-height:0}.eml-picker-results{flex:none;overflow:visible}.editor-media-manager :is(input:not([type=file]),select),.eml-picker :is(input,select){font-size:16px}.eml-asset-card{content-visibility:visible}.eml-selection-bar{scroll-margin-top:12px}}
@media(prefers-reduced-motion:reduce){.eml-asset-card{transition:none}}
@media(forced-colors:active){.editor-media-manager,.eml-picker{--eml-ink:CanvasText;--eml-muted:CanvasText;--eml-line:ButtonText;--eml-panel:Canvas;--eml-soft:Canvas;--eml-accent:LinkText}.eml-empty{background:Canvas}}

/* Stock browsing shares the same content stream and stable image frames. */
.eml-stock-library{min-width:0}.eml-stock-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:16px}.eml-stock-grid--compact{grid-template-columns:minmax(0,1fr);gap:12px}.eml-stock-card{min-width:0}.eml-stock-card img{color:transparent}.eml-stock-library .eml-stock-views{min-height:54px;max-width:100%;min-width:0}.eml-stock-library .eml-stock-views>button{min-height:44px}.eml-stock-search-panel>div:first-child>div{min-width:0}.eml-stock-search-form{min-width:0}.eml-stock-search-form>button{min-height:44px;min-width:44px}.eml-stock-orientations>button{min-height:44px}.eml-stock-grid--compact .eml-stock-card>div:last-child{padding:12px}
@media(max-width:767px),(pointer:coarse){.eml-stock-library .eml-stock-views{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:3px}.eml-stock-library .eml-stock-views>button{min-width:0;gap:4px;padding:8px 5px;font-size:12px}.eml-stock-library .eml-stock-views>button>svg{display:none}.eml-stock-header>button{width:100%;min-height:44px;justify-content:center}.eml-stock-header>p{display:none}.eml-stock-search-panel{padding:14px}.eml-stock-library--compact .eml-stock-search-panel{padding:0}.eml-stock-search-form input{font-size:16px}.eml-stock-orientations{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}.eml-stock-orientations>button{min-height:44px;font-size:12px!important}.eml-stock-card [data-editor-library-drag-affordance]{display:none}.eml-stock-library .eml-stock-grid{grid-template-columns:minmax(0,1fr)}.eml-stock-card>div:last-child>p:first-child{min-height:0;font-size:13px;line-height:1.6}.eml-stock-card>div:last-child>p:nth-child(2){font-size:12px;line-height:1.7}}

.eml-touch-drag-handle{position:absolute;right:6px;bottom:6px;z-index:2;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:44px;min-height:44px;padding:8px;border:1px solid #ffffff55;border-radius:9px;background:#071b2ae8;color:#fff;font-size:11px;font-weight:600;cursor:grab;touch-action:none;user-select:none}
.eml-touch-drag-handle:active{cursor:grabbing}.editor-media-sidebar [data-editor-library-drag-affordance].eml-touch-drag-handle{display:inline-flex}
@media(hover:hover) and (pointer:fine){.eml-touch-drag-handle{min-height:30px;padding:5px 7px;font-size:10px}}

.eml-stock-library [data-editor-library-drag-affordance].eml-touch-drag-handle{display:inline-flex}

@media(pointer:coarse){.editor-media-manager :is(input:not([type=file]),select),.eml-picker :is(input,select),.eml-stock-library input{font-size:16px}.eml-stock-library button{min-height:44px}.editor-media-manager .eml-square-button,.eml-search>button{min-width:44px}}

.eml-load-more{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:22px;padding:8px 0 12px}.eml-load-more p{color:var(--eml-muted);font-size:11px}.eml-load-more>button{min-height:44px;min-width:180px}

/* Portaled file actions stay usable in short landscape and keyboard viewports. */
:is([data-editor-media-context-menu],[data-editor-media-move-menu],[data-editor-media-folder-submenu]){max-height:min(360px,calc(100dvh - 24px),var(--radix-dropdown-menu-content-available-height,360px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:auto}
