/* Gallery editor structural styles; loaded on Gallery pages only. */
.epic-profile-card { grid-column:1 / -1; }
.epic-profile-editor { display:grid; gap:1rem; }
.epic-profile-editor label { display:grid; gap:.4rem; min-width:0; }
.epic-profile-editor input:not([type="checkbox"]), .epic-profile-editor textarea, .epic-profile-editor select { width:100%; box-sizing:border-box; padding:.65rem; border-radius:.55rem; }
.epic-profile-editor fieldset { min-width:0; border:1px solid currentColor; border-radius:.8rem; padding:1rem; }
.epic-profile-editor fieldset[hidden] { display:none; }
.epic-profile-avatar { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.epic-profile-avatar img { width:96px; height:96px; object-fit:cover; border-radius:50%; }
.epic-profile-media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:1rem; margin-block:1rem; }
.epic-profile-media-item { display:grid; gap:.25rem; min-width:0; }
.epic-profile-media-frame { position:relative; width:100%; aspect-ratio:3 / 4; box-sizing:border-box; border:2px solid #000; background:var(--panel-2); overflow:hidden; }
.epic-profile-media-frame img, .epic-profile-media-frame video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:0; }
.epic-profile-media-frame video { object-fit:contain; background:#000; }
.epic-profile-media-item[data-visible="false"] .epic-profile-media-frame > img { opacity:.6; }
.epic-profile-media-visibility { min-height:44px; width:fit-content; cursor:pointer; font-size:.9rem; }
.epic-profile-media-visibility input { width:18px; height:18px; margin:0; }
.epic-gallery-remove { position:absolute; top:6px; right:6px; display:grid; place-items:center; box-sizing:border-box; width:44px; height:44px; padding:0; border:1px solid #64676c; border-radius:50%; background:rgb(15 17 23 / 88%); color:#fff; font:400 1.6rem/1 system-ui,sans-serif; cursor:pointer; }
.epic-gallery-remove:hover:not(:disabled) { background:#0f1117; }
.epic-gallery-remove:disabled { cursor:default; opacity:.5; }
.epic-gallery-remove:focus-visible, .epic-profile-media-visibility:focus-within { outline:2px solid var(--text); outline-offset:2px; }
.epic-profile-checkbox { display:flex!important; align-items:center; gap:.5rem; }
.epic-profile-link-entry { display:grid; grid-template-columns:1fr 2fr auto; gap:.75rem; align-items:end; margin-block:1rem; }

@media(max-width:650px) { .epic-profile-media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .epic-profile-link-entry { grid-template-columns:1fr; } }


.epic-gallery-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding-block:16px; border-bottom:1px solid var(--border); margin-bottom:20px; min-width:0; }
.epic-gallery-layout [data-stream-settings] { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; min-width:0; }
.epic-gallery-layout > *, .epic-gallery-layout [data-gallery-preview-panel] { min-width:0; max-width:100%; box-sizing:border-box; }
.epic-gallery-layout [hidden] { display:none; }
.epic-gallery-layout [data-gallery-preview-root] { width:100%; max-width:720px; margin-inline:auto; }
.epic-gallery-layout [data-gallery-preview] { justify-self:start; min-height:44px; }

/* Add creates a draft slot; its image placeholder opens the native file picker. */
.epic-gallery-slot-toolbar { display:flex; align-items:center; gap:16px; margin-block:16px; }
.epic-gallery-slot-toolbar::before, .epic-gallery-slot-toolbar::after { content:""; flex:1; height:1px; background:var(--border); }
.epic-gallery-slot-toolbar .epic-gallery-add-slot { display:inline-flex; align-items:center; justify-content:center; gap:8px; width:auto; min-height:44px; padding:6px 16px; border-radius:8px; font:600 .9rem/1.2 system-ui,sans-serif; cursor:pointer; }
.epic-gallery-add-slot span[aria-hidden] { font:300 1.8rem/1 system-ui,sans-serif; }
.epic-gallery-add-slot:disabled { opacity:.5; cursor:default; }
.epic-gallery-empty-slot { min-width:0; }
.epic-profile-media-frame--empty { border:1px solid #c8cbd0; background:#f8f9fa; }
.epic-gallery-upload-placeholder { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; width:100%; height:100%; min-width:0; padding:8px; box-sizing:border-box; border:0; background:transparent; color:#59616b; font:600 clamp(.65rem, 1.5vw, 1rem)/1.3 system-ui,sans-serif; text-transform:uppercase; cursor:pointer; }
.epic-gallery-upload-placeholder svg { display:block; width:65%; max-width:160px; height:auto; flex-shrink:1; color:#b9bec5; }
.epic-gallery-upload-placeholder span { max-width:100%; overflow-wrap:anywhere; }
.epic-gallery-upload-placeholder:hover:not(:disabled) { background:#eef0f3; }
.epic-gallery-upload-placeholder:disabled { opacity:.65; cursor:default; }
.epic-gallery-remove--empty { background:#e5e7eb; color:#434951; border-color:#c8cbd0; }
.epic-gallery-remove--empty:hover:not(:disabled) { background:#d8dce2; }
.epic-gallery-add-slot:focus-visible { outline:2px solid var(--text); outline-offset:3px; }
.epic-gallery-upload-placeholder:focus-visible { outline:3px solid #495e9e; outline-offset:-4px; }
.epic-profile-editor [data-gallery-files][hidden] { display:none; }
.epic-gallery-links { margin-top:20px; border-top:1px solid var(--border); padding-top:16px; min-width:0; }
.epic-gallery-links summary { cursor:pointer; padding-block:8px; overflow-wrap:anywhere; }
.epic-gallery-links summary:focus-visible { outline:2px solid var(--text); outline-offset:3px; }



#gallery-manager-root > .portal-header .secondary-action { width:auto; flex-shrink:0; }
#account-gallery { scroll-margin-top:20px; }
