/* The project viewer keeps the full photograph inside a quiet editorial frame. */
#gallery-dialog{width:min(1280px,94vw);max-width:94vw;height:min(92svh,1000px);max-height:calc(100svh - 24px);padding:22px 26px 12px;border:1px solid #c8d8d540;border-radius:26px;background:linear-gradient(135deg,#17262a,#0c171c 75%);color:#e9eeeb;overflow:hidden;box-shadow:0 28px 120px #0006}
#gallery-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;gap:14px}
#gallery-dialog::backdrop{background:#030a0dde;backdrop-filter:blur(8px)}
.gallery-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;min-width:0}
.gallery-heading>div{min-width:0}.gallery-heading .eyebrow{font-size:8px;margin:0 0 5px;letter-spacing:.15em;color:#9fb7af}
.gallery-heading [data-gallery-title]{font-size:16px;line-height:1.5;color:#e0e9e1;margin:0;max-width:75ch}
.gallery-heading .dialog-close{position:static;flex:none;width:44px;height:44px;min-width:44px;display:grid;place-items:center;border:1px solid #c8d8d53d;border-radius:50%;color:#dbe6de;background:#c8d8d508;font-size:25px;line-height:1;transition:background .2s}
.gallery-heading .dialog-close:hover{background:#c8d8d51a}
.gallery-stage{display:grid;grid-template-rows:minmax(0,1fr) auto;position:relative;min-height:0;min-width:0;margin:0;border:1px solid #c8d8d520;border-radius:16px;overflow:hidden;background:#060e11}
.gallery-stage>[data-gallery-photo]{display:block;min-height:0;width:100%;height:100%;object-fit:contain;transition:opacity .2s}
.gallery-stage>[data-gallery-photo]:not([src]){visibility:hidden}
.gallery-stage figcaption{padding:9px 15px;background:#101e22;border-top:1px solid #c8d8d51a;color:#a9bfb5;font-size:10px;line-height:1.6;min-height:33px}
.gallery-loading{display:none;position:absolute;inset:0 0 33px;place-items:center;pointer-events:none}
#gallery-dialog.is-loading .gallery-loading{display:grid}
#gallery-dialog.is-loading .gallery-stage>[data-gallery-photo]{opacity:.35}
.gallery-loading>span{width:30px;height:30px;border:1px solid #c8d8d54d;border-top:2px solid #dbcca8;border-radius:50%}
.gallery-error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;gap:12px;background:radial-gradient(ellipse at center,#23333266,transparent 70%)}
.gallery-error[hidden]{display:none}.gallery-error p{margin:0;max-width:30ch;color:#dbe6de;font-size:clamp(16px,2vw,22px);line-height:1.5}.gallery-error small{max-width:34ch;color:#9fb7af;font-size:12px;line-height:1.7}
#gallery-dialog .gallery-error button{border:1px solid #d3c49e66;border-radius:999px;padding:12px 24px;margin-top:8px;min-height:44px;background:#d3c49e0c;color:#e1d4b6;font:inherit;font-size:12px;cursor:pointer}
#gallery-dialog .gallery-error button:hover{background:#d3c49e20}#gallery-dialog.has-photo-error .gallery-stage>[data-gallery-photo],#gallery-dialog.has-photo-error figcaption{visibility:hidden}
#gallery-dialog .gallery-controls{padding:0;min-height:44px;gap:15px;justify-content:space-between;margin:0}
#gallery-dialog .gallery-controls>div{gap:14px;min-width:0}
#gallery-dialog .gallery-controls button{width:44px;height:44px;flex:none;color:#dbe6de;background:#c8d8d508;border-color:#c8d8d53d;font-size:22px}
#gallery-dialog .gallery-controls button:disabled{opacity:.3;cursor:default}
#gallery-dialog .gallery-controls [role=status]{font-size:11px;line-height:1.6;min-width:50px;max-width:230px;text-align:center;color:#c2d0c6}
#gallery-dialog .gallery-controls a{font-size:11px;white-space:nowrap;color:#d3c49e;text-underline-offset:4px}
#gallery-dialog .gallery-controls a:hover{text-decoration:underline}
.gallery-filmstrip{display:flex;justify-content:center;align-items:center;gap:9px;overflow:auto;min-width:0;max-width:100%;padding:5px 4px;scrollbar-width:thin;scrollbar-color:#61776c transparent}
.gallery-filmstrip[hidden]{display:none}
.gallery-filmstrip button{position:relative;flex:0 0 80px;width:80px;height:58px;border-radius:9px;padding:3px;border:1px solid transparent;background:#c8d8d50a;transition:background .2s,border-color .2s}
.gallery-filmstrip button>img{width:100%;height:100%;object-fit:cover;border-radius:5px;opacity:.55;transition:opacity .2s}
.gallery-filmstrip button:hover>img,.gallery-filmstrip button[aria-current=true]>img{opacity:1}
.gallery-filmstrip button[aria-current=true]{border-color:#d5c49c;background:#d5c49c15}
.gallery-filmstrip button:focus-visible{outline-offset:1px}
.gallery-keyboard-hint{margin:0;max-width:none;text-align:center;font-size:9px;line-height:1.5;color:#97afa6}
@media(max-width:700px){#gallery-dialog{padding:15px 15px 12px;border-radius:20px;width:96vw;max-width:96vw;height:94svh;max-height:calc(100svh - 16px)}#gallery-dialog[open]{gap:12px}.gallery-heading{gap:15px}.gallery-heading [data-gallery-title]{font-size:13px}.gallery-heading .eyebrow{font-size:7px}.gallery-stage{border-radius:12px}.gallery-stage figcaption{font-size:9px;padding:9px 11px}#gallery-dialog .gallery-controls{gap:10px}#gallery-dialog .gallery-controls>div{gap:8px}#gallery-dialog .gallery-controls [role=status]{font-size:10px;min-width:35px;max-width:120px}#gallery-dialog .gallery-controls a{font-size:10px}.gallery-filmstrip{justify-content:safe center;gap:8px}.gallery-filmstrip button{flex-basis:68px;width:68px;height:52px}.gallery-keyboard-hint{font-size:9px}}
@media(pointer:coarse){.gallery-keyboard-hint{display:none}}
@media(max-height:480px){#gallery-dialog{height:96svh;max-height:calc(100svh - 12px);padding:10px 15px}#gallery-dialog[open]{grid-template-rows:auto minmax(0,1fr) auto;gap:8px}.gallery-heading .eyebrow,.gallery-filmstrip,.gallery-keyboard-hint{display:none}.gallery-heading [data-gallery-title]{font-size:12px}.gallery-heading .dialog-close{height:34px;width:34px;min-width:34px}.gallery-stage figcaption{font-size:9px;padding-block:5px;min-height:25px}.gallery-loading{bottom:25px}#gallery-dialog .gallery-controls{min-height:36px}#gallery-dialog .gallery-controls button{height:36px;width:36px;min-width:36px;min-height:36px}}
@media(max-width:360px){#gallery-dialog{padding-inline:11px}.gallery-heading [data-gallery-title]{font-size:12px}.gallery-controls{flex-wrap:wrap}#gallery-dialog .gallery-controls>div{margin-left:auto}.gallery-heading .dialog-close{width:40px;height:40px;min-width:40px}.gallery-stage figcaption{font-size:9px}}
@media(prefers-reduced-motion:reduce){.gallery-heading .dialog-close,.gallery-stage>[data-gallery-photo],.gallery-filmstrip button,.gallery-filmstrip button>img{transition:none}}
