/* Media gallery and original-quality viewer. Fully scoped; composer and billing untouched. */
html.ax37 #ax-community38{--ac-bg:var(--ax37-bg,#18191c);--ac-panel:var(--ax37-panel,#222429);--ac-text:var(--ax37-text,#f4f4f5);--ac-muted:var(--ax37-muted,#a3a6af);--ac-line:var(--ax37-border,#ffffff1c);width:100%;max-width:1200px;margin:0 auto;padding:18px 12px 34px;box-sizing:border-box;color:var(--ac-text)}
html.ax37 #ax-community38 *,dialog.axc38-viewer *,dialog.axc38-modal *{box-sizing:border-box}
html.ax37 #ax-community38 button,dialog.axc38-viewer button,dialog.axc38-modal button{font:inherit;cursor:pointer;color:inherit;text-transform:none;letter-spacing:normal}
html.ax37 #ax-community38 svg,html.ax37 #ax-community38 svg path,dialog.axc38-viewer svg,dialog.axc38-viewer svg path,dialog.axc38-modal svg,dialog.axc38-modal svg path{fill:none!important;stroke:currentColor!important;stroke-width:1.7!important}
html.ax37 #ax-community38 svg,dialog.axc38-viewer svg,dialog.axc38-modal svg{width:19px!important;height:19px!important;flex-shrink:0;display:block}
html.ax37 #ax-community38 button:disabled,dialog.axc38-viewer button:disabled,dialog.axc38-modal button:disabled{opacity:.5;cursor:not-allowed}
html.ax37 #ax-community38 button:focus-visible,dialog.axc38-viewer button:focus-visible,dialog.axc38-modal button:focus-visible{outline:2px solid var(--ax37-accent,#e4c79a);outline-offset:3px}
html.ax37 #ax-community38 .axc38-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:26px}
html.ax37 #ax-community38 .axc38-tabs{display:flex;gap:20px;align-items:center;border-bottom:1px solid var(--ac-line)}
html.ax37 #ax-community38 .axc38-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;border-radius:0;padding:12px 2px;color:var(--ac-muted);font-size:15px;white-space:nowrap}
html.ax37 #ax-community38 .axc38-tabs button.active{border-bottom-color:var(--ax37-accent,#e3c390);color:var(--ac-text)}
html.ax37 #ax-community38 .axc38-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.axc38-button{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;padding:10px 13px!important;min-height:40px!important;border:1px solid var(--ax37-border,#ffffff20)!important;border-radius:11px!important;background:var(--ax37-panel,#222429)!important;color:var(--ax37-text,#f4f4f5)!important;text-decoration:none;font:inherit!important;font-size:13px!important;line-height:1.3!important;text-align:center;white-space:normal}
.axc38-button.axc38-primary{background:var(--ax37-accent,#e2c492)!important;color:var(--ax37-accent-text,#191919)!important;border-color:transparent!important}
html.ax37 #ax-community38 .axc38-heading{margin:0 0 22px;max-width:780px}
html.ax37 #ax-community38 .axc38-heading h1{font-size:clamp(23px,3vw,34px);font-weight:650;letter-spacing:-.035em;line-height:1.15;margin:0 0 10px}
html.ax37 #ax-community38 .axc38-heading p{font-size:14px;line-height:1.6;color:var(--ac-muted);margin:0}
html.ax37 #ax-community38 .axc38-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 22px}
html.ax37 #ax-community38 .axc38-filters button{padding:7px 12px;border:1px solid var(--ac-line);border-radius:999px;background:transparent;color:var(--ac-muted);font-size:12px}
html.ax37 #ax-community38 .axc38-filters button.active{background:var(--ac-panel);color:var(--ac-text);border-color:var(--ax37-accent,#d8bd8c)}
html.ax37 #ax-community38 .axc38-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:17px;align-items:start;width:100%;min-width:0}
html.ax37 #ax-community38 .axc38-tile{position:relative;min-width:0;overflow:hidden;border-radius:17px;border:1px solid var(--ac-line);background:var(--ac-panel);isolation:isolate}
html.ax37 #ax-community38 .axc38-preview{display:block;width:100%;height:auto;aspect-ratio:1;overflow:hidden;border:0;border-radius:0;position:relative;background:var(--ac-panel);padding:0;text-align:left}
html.ax37 #ax-community38 .axc38-preview img,html.ax37 #ax-community38 .axc38-preview video{display:block;width:100%;height:100%;object-fit:cover;background:#0c0c0d;transition:transform .18s ease}
html.ax37 #ax-community38 .axc38-preview:hover img{transform:scale(1.025)}
html.ax37 #ax-community38 .axc38-tile-name{position:absolute;left:0;right:0;bottom:0;padding:38px 66px 13px 13px;background:linear-gradient(transparent,#000b);color:#fff;font-size:12px;font-weight:550;line-height:1.4;text-shadow:0 1px 4px #0008;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.ax37 #ax-community38 .axc38-play{position:absolute;top:12px;right:12px;border:1px solid #ffffff80;border-radius:50%;width:31px;height:31px;display:grid;place-items:center;color:#fff;background:#0005}
html.ax37 #ax-community38 .axc38-play svg{width:14px!important;height:14px!important}
.axc38-like{display:flex!important;align-items:center;justify-content:center;gap:5px;min-width:48px;height:32px;border:1px solid #ffffff40;border-radius:999px;background:#16181dba;color:#fff!important;padding:5px 8px;font-size:12px!important;font-weight:550;line-height:1;cursor:pointer}
html.ax37 #ax-community38 .axc38-like{position:absolute;right:10px;bottom:10px;z-index:2}
.axc38-like.liked{color:#ff798a!important}.axc38-like.liked svg path{fill:currentColor!important}
html.ax37 #ax-community38 .axc38-publish{display:block;width:100%;min-height:39px;background:var(--ac-panel);color:var(--ac-text);border:0;border-top:1px solid var(--ac-line);padding:9px 12px;font-size:12px}
html.ax37 #ax-community38 .axc38-status{position:absolute;left:10px;top:10px;max-width:calc(100% - 54px);padding:5px 8px;border:1px solid #ffffff30;border-radius:7px;background:#17191ddb;color:#fff;font-size:10px}
html.ax37 #ax-community38 .axc38-status.pending{color:#ffe3a3}.axc38-status.rejected{color:#ffb2b2}
html.ax37 #ax-community38 .axc38-skeleton{aspect-ratio:1;border-radius:17px;background:var(--ac-panel);border:1px solid var(--ac-line)}
html.ax37 #ax-community38 .axc38-empty{padding:36px 18px;text-align:center;color:var(--ac-muted);border:1px dashed var(--ac-line);border-radius:14px;font-size:14px;line-height:1.7}
html.ax37 #ax-community38 .axc38-empty h2{font-size:20px;margin:0 0 9px;color:var(--ac-text)}
html.ax37 #ax-community38 .axc38-samples-title{font-size:17px;font-weight:550;color:var(--ac-muted);margin:30px 0 15px}
.axc38-alert{padding:12px 14px;border:1px solid #d96d4c44;border-radius:10px;background:#d96d4c0d;font-size:13px;line-height:1.6;color:var(--ax37-text,#f4f4f5);margin:0 0 16px}
.axc38-alert button{background:transparent;border:0;text-decoration:underline;color:inherit}
html.ax37 #ax-community38 .axc38-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin:25px 0 0;font-size:12px;color:var(--ac-muted)}
html.ax37 #ax-community38 .axc38-pagination button{padding:8px 13px;border-radius:9px;border:1px solid var(--ac-line);background:var(--ac-panel);color:var(--ac-text)}
/* Native top-layer viewer preserves full-resolution originals, even under old overlays. */
dialog.axc38-viewer{position:fixed!important;inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#050505!important;color:var(--ax37-text,#f1f1f3)!important;overflow:hidden!important;box-shadow:none!important;grid-template-columns:minmax(0,1fr) minmax(292px,340px) 70px;gap:8px;outline:none}
dialog.axc38-viewer[open]{display:grid!important}
dialog.axc38-viewer::backdrop{background:#000}
dialog.axc38-viewer .axc38-stage{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:hidden;background:#050505}
dialog.axc38-viewer .axc38-original{display:flex;align-items:center;justify-content:center;overflow:auto;width:100%;height:100%;padding:32px 36px;overscroll-behavior:contain;cursor:zoom-in}
dialog.axc38-viewer .axc38-original img,dialog.axc38-viewer .axc38-original video{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;flex:0 0 auto}
dialog.axc38-viewer .axc38-original video{cursor:default;width:100%}
dialog.axc38-viewer .axc38-original.zoomed{display:block;padding:30px;cursor:zoom-out}
dialog.axc38-viewer .axc38-original.zoomed img{max-width:none;max-height:none;margin:auto}
dialog.axc38-viewer .axc38-arrow,dialog.axc38-viewer .axc38-stage-close,dialog.axc38-viewer .axc38-zoom{position:absolute;z-index:2;border:1px solid #ffffff22;background:#0c0c0d88;color:#fff;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:10px}
dialog.axc38-viewer .axc38-arrow{top:50%;transform:translateY(-50%)}dialog.axc38-viewer .axc38-arrow.prev{left:8px}dialog.axc38-viewer .axc38-arrow.next{right:8px}
dialog.axc38-viewer .axc38-stage-close{top:12px;left:12px;display:none}dialog.axc38-viewer .axc38-zoom{left:15px;bottom:15px;gap:7px;font-size:12px}
dialog.axc38-viewer .axc38-details{display:flex;flex-direction:column;min-height:0;min-width:0;margin:5px 0;padding:18px 17px;background:var(--ax37-panel,#121315);border:1px solid var(--ax37-border,#ffffff22);border-radius:19px;overflow:auto;overscroll-behavior:contain}
dialog.axc38-viewer .axc38-author{display:flex;align-items:center;gap:11px;margin:0 0 24px}
dialog.axc38-viewer .axc38-author-avatar{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:50%;background:var(--ax37-hover,#ffffff15);font-size:16px;color:var(--ax37-accent,#dcc292)}
dialog.axc38-viewer .axc38-author>div{flex:1;min-width:0}dialog.axc38-viewer .axc38-author b{display:block;font-size:13px;overflow-wrap:anywhere}dialog.axc38-viewer .axc38-author span:not(.axc38-author-avatar){display:block;font-size:11px;margin-top:3px;color:var(--ax37-muted,#9da1aa)}
dialog.axc38-viewer .axc38-author button{border:0;background:transparent;color:var(--ax37-muted,#9da1aa);padding:7px}
dialog.axc38-viewer h2{font-size:11px!important;font-weight:600!important;letter-spacing:.06em!important;text-transform:uppercase;margin:0 0 12px;color:var(--ax37-muted,#969aa3)}
dialog.axc38-viewer dl{border:1px solid var(--ax37-border,#ffffff20);border-radius:14px;overflow:hidden;flex-shrink:0;margin:0 0 21px;font-size:12px}
dialog.axc38-viewer dl>div{display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:45px;padding:12px;border-bottom:1px solid var(--ax37-border,#ffffff15)}dialog.axc38-viewer dl>div:last-child{border-bottom:0}
dialog.axc38-viewer dt{color:var(--ax37-muted,#969aa3)}dialog.axc38-viewer dd{min-width:0;max-width:65%;margin:0;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:550}
dialog.axc38-viewer .axc38-prompt-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}dialog.axc38-viewer .axc38-prompt-label h2{margin:0}
dialog.axc38-viewer .axc38-prompt-label button{border:1px solid var(--ax37-border,#ffffff20);border-radius:7px;background:transparent;color:var(--ax37-muted,#a8a8ae);font-size:11px;padding:5px 8px}
.axc38-prompt{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:13px;border:1px solid var(--ax37-border,#ffffff20);border-radius:12px;padding:13px;background:var(--ax37-bg,#18191b);color:var(--ax37-muted,#b1b3b9);overflow:auto;max-height:36vh;min-height:90px;overscroll-behavior:contain}
dialog.axc38-viewer .axc38-viewer-actions{margin-top:auto;padding-top:22px;display:grid;gap:8px;flex-shrink:0}dialog.axc38-viewer .axc38-viewer-actions>.axc38-button{width:100%}dialog.axc38-viewer .axc38-viewer-actions>div{display:flex;gap:7px;align-items:stretch}dialog.axc38-viewer .axc38-viewer-actions>div>.axc38-button{flex:1;min-width:0;font-size:11px!important;padding:9px!important}dialog.axc38-viewer .axc38-viewer-actions .axc38-like{height:auto;min-width:56px;border-radius:10px}
dialog.axc38-viewer .axc38-filmstrip{display:flex;flex-direction:column;gap:8px;overflow-y:auto;padding:6px 5px 6px 0;min-height:0;overscroll-behavior:contain}
dialog.axc38-viewer .axc38-filmstrip button{flex:0 0 62px;border:2px solid transparent;background:#171719;border-radius:9px;padding:0;overflow:hidden;width:60px;height:62px;color:#fff}dialog.axc38-viewer .axc38-filmstrip button.active{border-color:var(--ax37-accent,#e3c796)}dialog.axc38-viewer .axc38-filmstrip img{display:block;width:100%;height:100%;object-fit:cover}dialog.axc38-viewer .axc38-filmstrip span{display:grid;place-items:center;height:100%}
/* Explicit upload/publish confirmation. No optimistic publication or automatic generation. */
dialog.axc38-modal{width:min(560px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);padding:25px;border:1px solid var(--ax37-border,#ffffff22);border-radius:20px;background:var(--ax37-panel,#222429);color:var(--ax37-text,#f5f5f7);overflow:auto;overscroll-behavior:contain}
dialog.axc38-modal::backdrop{background:#0009;backdrop-filter:blur(5px)}dialog.axc38-modal h2{font-size:22px;margin:0 34px 12px 0}dialog.axc38-modal p{font-size:13px;line-height:1.65;color:var(--ax37-muted,#a9adb8)}dialog.axc38-modal form{display:grid;gap:15px}dialog.axc38-modal label{display:grid;gap:7px;font-size:13px}dialog.axc38-modal input:not([type=checkbox]),dialog.axc38-modal textarea{display:block;width:100%;border:1px solid var(--ax37-border,#ffffff22);border-radius:10px;padding:10px 12px;background:var(--ax37-bg,#18191c);color:var(--ax37-text,#f5f5f7);font:inherit;max-width:100%}dialog.axc38-modal input[type=file]{font-size:12px}dialog.axc38-modal textarea{resize:vertical;min-height:100px}dialog.axc38-modal .axc38-consent{display:flex;align-items:flex-start;gap:9px;line-height:1.5;margin:14px 0}dialog.axc38-modal .axc38-consent input{flex:0 0 17px;width:17px;height:17px;margin-top:2px;accent-color:var(--ax37-accent,#dec08b)}dialog.axc38-modal .axc38-modal-close{position:absolute;top:17px;right:17px;display:grid;place-items:center;width:32px;height:32px;border:0;background:var(--ax37-hover,#ffffff10);border-radius:8px;color:inherit}dialog.axc38-modal .axc38-form-error{color:#d96c6c;min-height:0;margin:0}dialog.axc38-modal progress{width:100%;height:7px;accent-color:var(--ax37-accent,#dec08b)}
@media(max-width:900px){dialog.axc38-viewer{grid-template-columns:minmax(0,1fr) 285px!important}dialog.axc38-viewer .axc38-filmstrip{display:none}}
@media(max-width:640px){html.ax37 #ax-community38{padding:13px 0 26px}html.ax37 #ax-community38 .axc38-toolbar{gap:12px;margin-bottom:22px}html.ax37 #ax-community38 .axc38-toolbar-actions{gap:6px}html.ax37 #ax-community38 .axc38-toolbar-actions .axc38-button{font-size:11px!important;padding:8px 10px!important}html.ax37 #ax-community38 .axc38-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}html.ax37 #ax-community38 .axc38-tile{border-radius:12px}html.ax37 #ax-community38 .axc38-tile-name{font-size:10px;padding:30px 53px 10px 10px}html.ax37 #ax-community38 .axc38-like{right:6px;bottom:7px;min-width:43px;height:28px;padding:4px 6px;font-size:11px!important}html.ax37 #ax-community38 .axc38-like svg{width:15px!important;height:15px!important}html.ax37 #ax-community38 .axc38-status{font-size:9px;left:6px;top:6px;padding:4px 6px}dialog.axc38-viewer{grid-template-columns:1fr!important;grid-template-rows:minmax(245px,50dvh) minmax(0,1fr)!important;gap:0!important;overflow:auto!important}dialog.axc38-viewer .axc38-stage-close{display:flex}dialog.axc38-viewer .axc38-original{padding:18px 28px}dialog.axc38-viewer .axc38-details{margin:0;border-radius:18px 18px 0 0;overflow:visible;min-height:min-content;padding:18px}dialog.axc38-viewer .axc38-prompt{max-height:200px}dialog.axc38-viewer .axc38-author{margin-bottom:18px}dialog.axc38-viewer .axc38-viewer-actions{margin-top:20px;padding-top:0}dialog.axc38-modal{padding:22px 17px}.axc38-button{min-height:39px!important}}
@media(prefers-reduced-motion:reduce){html.ax37 #ax-community38 *{transition:none!important}}

/* Portal dialogs live outside #sk-v39-root; defeat old page-wide gold link fills. */
html.ax37 :is(#ax-community38,dialog.axc38-modal,dialog.axc38-viewer) .axc38-button{background:var(--ax37-panel,#222429)!important;background-image:none!important;color:var(--ax37-text,#f2f1ed)!important;-webkit-text-fill-color:currentColor!important;text-shadow:none!important;filter:none!important}
html.ax37 :is(#ax-community38,dialog.axc38-modal,dialog.axc38-viewer) .axc38-button *{color:inherit!important;-webkit-text-fill-color:currentColor!important}
html.ax37 :is(#ax-community38,dialog.axc38-modal,dialog.axc38-viewer) .axc38-button:not(.axc38-primary):not(:disabled):hover{background:var(--ax37-hover,#2d3036)!important}
html.ax37 :is(#ax-community38,dialog.axc38-modal,dialog.axc38-viewer) .axc38-button.axc38-primary{background:var(--ax37-accent,#d8bd91)!important;color:var(--ax37-accent-text,#211c13)!important;-webkit-text-fill-color:currentColor!important;border-color:transparent!important}
html.ax37 dialog.axc38-modal{background:var(--ax37-panel,#222429)!important;color:var(--ax37-text,#f2f1ed)!important;-webkit-text-fill-color:currentColor!important}
html.ax37 dialog.axc38-modal h2{color:var(--ax37-text,#f2f1ed)!important;-webkit-text-fill-color:currentColor!important;text-shadow:none!important}
html.ax37 dialog.axc38-modal p:not(.axc38-form-error){color:var(--ax37-muted,#aaa9a3)!important;-webkit-text-fill-color:currentColor!important}
html.ax37 dialog.axc38-modal .axc38-modal-close{color:var(--ax37-text,#f2f1ed)!important;-webkit-text-fill-color:currentColor!important;background:var(--ax37-hover,#2d3036)!important}
html.ax37 dialog.axc38-modal :is(input,textarea,label){color:var(--ax37-text,#f2f1ed)!important;-webkit-text-fill-color:currentColor!important}
html.ax37 dialog.axc38-modal .axc38-form-error{color:#e99191!important;-webkit-text-fill-color:currentColor!important}
html.ax37[data-sk-theme="light"] dialog.axc38-modal .axc38-form-error{color:#a32b2b!important}

/* Explicit, square destructive action beside the publication control. */
html.ax37 #ax-community38 .axc38-tile-actions{display:flex;width:100%;align-items:stretch}
html.ax37 #ax-community38 .axc38-tile-actions .axc38-publish{flex:1;min-width:0}
html.ax37 #ax-community38 .axc38-delete{display:inline-flex;flex:0 0 39px;align-items:center;justify-content:center;min-width:39px;min-height:39px;border:0;border-radius:5px;background:#b72d35;color:#fff;cursor:pointer}
html.ax37 #ax-community38 .axc38-delete:hover{background:#d83a43}
html.ax37 #ax-community38 .axc38-delete svg{width:18px;height:18px}
.axc38-modal .axc38-delete{background:#b72d35;color:white}
.ax37-memory-list{list-style:none;margin:12px 0;padding:0}.ax37-memory-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border-bottom:1px solid #8884}.ax37-memory-row span{min-width:0}.ax37-memory-row small{display:block;overflow-wrap:anywhere}.ax37-memory-actions{display:flex;flex-wrap:wrap;gap:8px}
.ax307-ratio-shape{display:inline-block;width:18px;max-height:20px;aspect-ratio:var(--ratio);border:1.5px solid currentColor;border-radius:2px;vertical-align:middle;margin-right:7px;object-fit:contain}
