/* The portrait archive is a calm, source-resolution artbook. */
#gallery-viewer{
 --gallery-accent:#d8c08d;
 box-sizing:border-box;
 width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;
 padding:0;background:#050711;color:#f7f1e8;
}
#gallery-viewer[data-tone=azure]{--gallery-accent:#86c8ff}
#gallery-viewer[data-tone=golden]{--gallery-accent:#f3cf89}
#gallery-viewer[data-tone=crimson]{--gallery-accent:#ff7796}
#gallery-viewer[data-tone=dowster]{--gallery-accent:#f35a82}
#gallery-viewer::backdrop{background:#01020cf2;backdrop-filter:blur(8px)}
#gallery-viewer header{
 position:relative;z-index:2;min-height:68px;box-sizing:border-box;
 border-bottom:1px solid color-mix(in srgb,var(--gallery-accent) 37%,transparent);
 background:linear-gradient(100deg,#0b1020,#100c1a 55%,#080912);
 padding:9px clamp(15px,2vw,30px);
}
#gallery-viewer .gallery-heading{display:grid;gap:3px;min-width:0;flex:1 1 auto}
#gallery-viewer .gallery-kicker{font:700 10px/1.2 Body,Arial,sans-serif;letter-spacing:.19em;color:var(--gallery-accent)}
#gallery-viewer [data-gallery-caption]{font:400 clamp(19px,2vw,27px)/1.16 Editorial,Georgia,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#gallery-viewer [data-gallery-close]{flex:none;min-width:46px;min-height:46px;padding:3px 10px;border-radius:50%;font-size:27px}
#gallery-viewer .gallery-stage{
 position:relative;display:grid;place-items:center;flex:1;min-height:0;overflow:hidden;
 background:radial-gradient(ellipse 65% 82% at 50% 43%,color-mix(in srgb,var(--gallery-accent) 10%,#0b0d19),#04050a 78%);
}
#gallery-viewer .gallery-stage::before{
 content:"";position:absolute;inset:clamp(10px,2vw,28px);border:1px solid color-mix(in srgb,var(--gallery-accent) 17%,transparent);
 pointer-events:none;z-index:1;
}
#gallery-viewer .gallery-artwork-frame{display:grid;place-items:center;width:100%;height:100%;min-height:0;overflow:hidden}
#gallery-viewer .gallery-stage img{
 display:block;width:auto;height:auto;
 max-width:min(100%,var(--gallery-native-width,100%));
 max-height:min(100%,var(--gallery-native-height,100%));
 object-fit:contain;object-position:center;
 transform:translate(var(--gallery-pan-x,0px),var(--gallery-pan-y,0px)) scale(var(--gallery-zoom,1));
 transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .2s ease;
 user-select:none;-webkit-user-drag:none;
}
#gallery-viewer[data-zoomed=true] .gallery-stage{cursor:grab;touch-action:none}
#gallery-viewer[data-zoomed=true] .gallery-stage:active{cursor:grabbing}
#gallery-viewer[data-zoomed=true] .gallery-stage img{transition:none}
#gallery-viewer .gallery-loading{
 position:absolute;left:50%;bottom:22px;transform:translateX(-50%);
 padding:8px 12px;background:#070914dc;border:1px solid color-mix(in srgb,var(--gallery-accent) 35%,transparent);
 color:#f2e6d4;font:600 12px/1.3 Body,Arial,sans-serif;letter-spacing:.04em;opacity:0;pointer-events:none;
}
#gallery-viewer.gallery-pending .gallery-stage img{opacity:.65}
#gallery-viewer.gallery-pending .gallery-loading{opacity:1}
#gallery-viewer .gallery-error{
 position:absolute;z-index:2;left:50%;bottom:22px;transform:translateX(-50%);
 display:flex;align-items:center;justify-content:center;gap:12px;max-width:calc(100% - 28px);
 padding:9px 12px;border:1px solid color-mix(in srgb,var(--gallery-accent) 48%,transparent);
 background:#070914ed;color:#f7f1e8;font:600 13px/1.35 Body,Arial,sans-serif;text-align:center;
}
#gallery-viewer [data-gallery-retry]{min-height:44px;padding:7px 12px;color:#090c15;background:var(--gallery-accent);white-space:nowrap}
#gallery-viewer footer{
 display:grid;gap:10px;flex:none;box-sizing:border-box;padding:12px clamp(15px,2vw,30px) 17px;
 border-top:1px solid color-mix(in srgb,var(--gallery-accent) 30%,transparent);
 background:linear-gradient(120deg,#0b1020,#110b18);
}
#gallery-viewer .gallery-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center}
#gallery-viewer .gallery-controls>[data-gallery-next]{justify-self:end}
#gallery-viewer .gallery-controls button{font:600 13px/1.3 Body,Arial,sans-serif;letter-spacing:.02em;border-color:color-mix(in srgb,var(--gallery-accent) 36%,transparent)}
#gallery-viewer .gallery-display{display:flex;gap:0;border:1px solid color-mix(in srgb,var(--gallery-accent) 42%,transparent)}
#gallery-viewer .gallery-display button{border:0;min-width:62px;padding:8px 12px;background:#080d1a}
#gallery-viewer .gallery-display button+button{border-left:1px solid color-mix(in srgb,var(--gallery-accent) 32%,transparent)}
#gallery-viewer .gallery-display button[aria-pressed=true]{color:#080b12;background:var(--gallery-accent)}
#gallery-viewer .gallery-strip{
 display:flex;gap:8px;align-items:center;overflow-x:auto;overflow-y:hidden;
 padding:3px 2px 7px;scrollbar-width:thin;scrollbar-color:var(--gallery-accent) transparent;
}
#gallery-viewer .gallery-strip button{
 position:relative;flex:0 0 72px;width:72px;height:68px;padding:2px;min-height:0;overflow:hidden;
 border:1px solid #8b92a54d;background:#0c1221;color:#fff;
}
#gallery-viewer .gallery-strip button[aria-current=true]{border-color:var(--gallery-accent);box-shadow:0 0 0 1px var(--gallery-accent),0 0 16px color-mix(in srgb,var(--gallery-accent) 26%,transparent)}
#gallery-viewer .gallery-strip img{display:block;width:100%;height:100%;object-fit:cover}
#gallery-viewer .gallery-strip button>span{position:absolute;right:2px;bottom:2px;background:#050713d9;padding:2px 4px;font:700 10px/1 Body,Arial,sans-serif}
#gallery-viewer button:focus-visible{outline:2px solid #fff;outline-offset:3px}
#gallery-viewer .gallery-strip button:focus-visible{outline-offset:-4px}
@media(max-width:760px){
 #gallery-viewer header{min-height:59px;padding:6px 13px}
 #gallery-viewer [data-gallery-caption]{font-size:20px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
 #gallery-viewer footer{padding:9px 12px max(10px,env(safe-area-inset-bottom));gap:7px}
 #gallery-viewer .gallery-controls{gap:5px}
 #gallery-viewer .gallery-controls button{font-size:13px;padding:7px 8px;min-height:44px}
 #gallery-viewer .gallery-display button{min-width:48px;padding-inline:7px}
 #gallery-viewer .gallery-strip button{flex-basis:62px;width:62px;height:56px}
 #gallery-viewer .gallery-stage::before{inset:10px}
}
@media(max-height:480px){
 #gallery-viewer header{min-height:45px}
 #gallery-viewer .gallery-kicker{display:none}
 #gallery-viewer [data-gallery-caption]{font-size:17px;line-height:1.15}
 #gallery-viewer footer{padding-block:5px}
 #gallery-viewer .gallery-strip{display:none}
 #gallery-viewer .gallery-controls button{min-height:44px}
}
@media(prefers-reduced-motion:reduce){#gallery-viewer .gallery-stage img,#gallery-viewer .gallery-strip{transition:none;scroll-behavior:auto}}
