/* An interior room, distinct from the aluminium backs of project signs. */
#case-page[data-project="studio-gallery"]{border:0;border-radius:0;background:#e8e4dc;color:#302e29;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;transition:none}
#case-page[data-project="studio-gallery"]::before{background:radial-gradient(ellipse at 50% 5%,#fff9 0,transparent 65%),linear-gradient(90deg,#69553b0a,transparent 14%,transparent 86%,#69553b0a);opacity:1}
#case-page[data-project="studio-gallery"] .case-toolbar{background:#eeeae2;border-bottom:1px solid #3d35261f}
#case-page[data-project="studio-gallery"] #case-scroll{padding:0 clamp(24px,6.5vw,120px);scroll-behavior:auto;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),#76685105 25%)}
#case-page[data-project="studio-gallery"] #case-scroll article{max-width:1540px;margin-inline:auto}
#case-page.gallery-arriving .case-toolbar,#case-page.gallery-arriving #case-scroll{opacity:1;transform:none;transition:none}
.gallery-arriving #studio-gallery{transform:scale(var(--gallery-arrival-scale,1));transform-origin:50% 0}
#studio-gallery{padding-top:0}
#studio-gallery .gallery-intro{position:relative;inset:auto;opacity:1;pointer-events:auto;z-index:auto;text-align:center;max-width:760px;width:auto;margin:0 auto;padding:68px 0 50px}
#studio-gallery .gallery-intro h1{max-width:none}
#studio-gallery .gallery-intro p{letter-spacing:0}
.gallery-kicker{font:11px/1.6 'Courier New',monospace;letter-spacing:.16em;margin:0 0 25px}
#studio-gallery h1{font-size:clamp(60px,7.5vw,112px);font-weight:400;line-height:.9;letter-spacing:-.065em;margin:0 0 30px}
#studio-gallery h1 em{font-family:Georgia,serif;font-weight:400;letter-spacing:-.07em}
#studio-gallery .gallery-intro-copy{font-size:17px;line-height:1.6;margin:0}
#studio-gallery .gallery-invitation{font:10px/1.6 'Courier New',monospace;letter-spacing:.04em;margin:23px 0 0;color:#756e62}
.gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #3d35262b;border-bottom:1px solid #3d35262b;padding:17px 0;margin-bottom:65px}
.gallery-filter-groups{display:flex;flex-wrap:wrap;gap:12px 24px}
.gallery-filter-groups[hidden],.gallery-more[hidden],.gallery-preview[hidden],.gallery-piece[hidden]{display:none}
.gallery-filters{display:flex;flex-wrap:wrap;gap:5px}
.gallery-type-filters{border-left:1px solid #3d35262b;padding-left:24px}
.gallery-filters button,.gallery-more{font:inherit;font-size:11px;border:1px solid transparent;border-radius:30px;padding:10px 13px;background:transparent;color:inherit;cursor:pointer;transition:background .2s,color .2s}
.gallery-filters button:hover,.gallery-more:hover{background:#fff8}
.gallery-filters button[aria-pressed=true]{background:#302e29;color:#f4f0e7;border-color:#302e29}
.gallery-count{font:10px/1.5 'Courier New',monospace;white-space:nowrap;margin:0}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:80px clamp(28px,4vw,76px);align-items:center}
/* content-visibility keeps the long wall cheap, but also contains its paint.
   Reserve transparent room inside that boundary for the ornate frame's shadow. */
.gallery-piece{margin:-32px -32px -40px;padding:32px 32px 40px;min-width:0;content-visibility:auto;contain-intrinsic-size:auto 600px}
.gallery-frame{border-style:solid;border-color:transparent;border-width:40px 38px 48px;border-image-source:url('./gallery-assets/ornate-frame.webp');border-image-slice:214 205 258 205;border-image-repeat:stretch;filter:drop-shadow(0 10px 9px #44372632)}
.gallery-aperture{position:relative;background:#211f1b;isolation:isolate;box-shadow:0 0 0 2px #b9b3a6}
.gallery-preview{display:block;position:relative;width:100%;height:100%;overflow:hidden;outline-offset:5px;color:white;text-decoration:none}
.gallery-preview img{display:block;width:100%;height:auto}
.gallery-aperture video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#171513}
.gallery-play{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;background:linear-gradient(transparent 25%,#0003);font-size:10px;text-shadow:0 1px 5px #000b}
.gallery-play-symbol{display:grid;place-items:center;width:49px;height:49px;border:1px solid #ffffffb3;border-radius:50%;background:#2d292859;box-shadow:inset 0 1px 3px #fff5;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.gallery-play-symbol::after{content:'';border-left:10px solid white;border-top:6px solid transparent;border-bottom:6px solid transparent;margin-left:3px}
.gallery-play>span:last-child{font:9px 'Courier New',monospace;opacity:.9}
.gallery-image-action{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);white-space:nowrap;border:1px solid #fff7;border-radius:20px;padding:8px 11px;background:#25211b8c;font-size:10px;opacity:0;transition:opacity .2s}
.gallery-preview:hover .gallery-image-action,.gallery-preview:focus-visible .gallery-image-action{opacity:1}
.gallery-plaque{display:flex;align-items:baseline;justify-content:center;gap:14px;width:fit-content;max-width:calc(100% - 46px);min-width:min(180px,100%);margin:18px auto 0;padding:12px 15px;background:#f3efe5;border:1px solid #fff8;box-shadow:0 1px 3px #50463012}
.gallery-piece-number{flex-shrink:0;font:9px/1.4 'Courier New',monospace;color:#8d8578}
#studio-gallery .gallery-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;font:9px/1.4 'Courier New',monospace;margin:0;color:#746a5e}
.gallery-meta span{opacity:.75}
#studio-gallery .gallery-piece h2{font-size:12px;font-weight:400;line-height:1.35;letter-spacing:0;margin:0}
#studio-gallery .gallery-credit{font-size:9px;line-height:1.5;opacity:.65;margin:5px 0 0}
.gallery-continuation{text-align:center;padding:50px 0 0;min-height:70px}
.gallery-more{border-color:#3d352647;font-size:12px;padding:13px 24px}
.gallery-load-status{font-size:13px;line-height:1.5}
.gallery-load-status:empty{display:none}
#studio-gallery .gallery-ending{max-width:980px;margin:65px auto 0;border-top-color:#3d352638;padding-top:55px}
#studio-gallery .gallery-ending h2{font-size:clamp(42px,5vw,68px)}
.gallery-archive-note{max-width:980px;margin:50px auto 28px;font-size:10px;line-height:1.7;color:#756e62}
.gallery-toolbar-brand{font:11px/1.2 'Courier New',monospace;letter-spacing:.05em}
.gallery-viewer{color:#f3f1e7;background:#24231ff7;width:min(1120px,calc(100vw - 40px));height:min(920px,calc(100dvh - 40px));max-width:none;max-height:none;padding:0;border:1px solid #e3e8e879;border-radius:12px;box-shadow:0 20px 80px #0006;overflow:hidden}
.gallery-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.gallery-viewer::backdrop{background:#020b12b8;backdrop-filter:blur(10px)}
.gallery-viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 22px;border-bottom:1px solid #ffffff26}
#studio-gallery .gallery-viewer-toolbar h2{font-size:16px;font-weight:400;margin:0;line-height:1.3}
.gallery-viewer button{border:1px solid #ffffff65;background:#ffffff12;color:inherit;border-radius:30px;padding:11px 18px;cursor:pointer;font:inherit;font-size:12px}
.gallery-viewer-media{display:flex;align-items:center;justify-content:center;min-height:0;padding:20px;overflow:hidden}
.gallery-viewer-media img{display:block;max-width:100%;max-height:100%;object-fit:contain;width:auto;height:auto}
.gallery-viewer-footer{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 22px;border-top:1px solid #ffffff26}
.gallery-viewer-credit{font-size:11px;line-height:1.5;max-width:38em;margin:0;opacity:.8}
.gallery-viewer-footer>div{display:flex;gap:16px;align-items:center;flex-shrink:0}
.gallery-viewer-counter{font:11px 'Courier New',monospace}
#studio-gallery :focus-visible{outline:2px solid currentColor;outline-offset:4px}
@media(max-width:1100px){.gallery-controls{flex-direction:column;align-items:center;gap:14px}.gallery-filter-groups{justify-content:center}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:65px 42px}}
@media(max-width:600px){#case-page[data-project="studio-gallery"] #case-scroll{padding-inline:25px}#studio-gallery .gallery-intro{padding:42px 0 34px}#studio-gallery h1{font-size:65px}.gallery-kicker{font-size:10px}#studio-gallery .gallery-intro-copy{font-size:15px}#studio-gallery .gallery-invitation{font-size:9px}.gallery-controls{margin-bottom:38px;padding-block:14px}.gallery-filter-groups{gap:8px}.gallery-filters{justify-content:center}.gallery-filters button{padding:10px 12px;font-size:11px}.gallery-type-filters{border:0;padding:0}.gallery-grid{grid-template-columns:1fr;gap:50px;max-width:420px;margin-inline:auto}.gallery-frame{border-width:39px 37px 47px}.gallery-plaque{margin-top:12px}#studio-gallery .gallery-piece h2{font-size:13px}.gallery-image-action{display:none}.gallery-viewer{width:calc(100vw - 16px);height:calc(100dvh - 16px);border-radius:10px}.gallery-viewer-toolbar{padding:14px;gap:14px}#studio-gallery .gallery-viewer-toolbar h2{font-size:14px}.gallery-viewer-media{padding:10px}.gallery-viewer-footer{flex-direction:column;align-items:stretch;padding:14px;gap:12px}.gallery-viewer-footer>div{justify-content:space-between}.gallery-toolbar-brand{font-size:9px;letter-spacing:0}}
@media(prefers-reduced-motion:reduce){.gallery-filters button,.gallery-image-action{transition:none}}
@media(forced-colors:active){.gallery-frame{border-image:none;border:8px ridge CanvasText}.gallery-plaque{border:1px solid CanvasText}.gallery-play-symbol{background:Canvas;color:CanvasText}.gallery-play-symbol::after{border-left-color:CanvasText}}
/* Keep the art in the first viewport; the wall carries the page. */
#studio-gallery .gallery-intro{padding:38px 0 30px}
#studio-gallery .gallery-intro h1{font-size:clamp(46px,5vw,68px);line-height:1;margin-bottom:18px}
#studio-gallery .gallery-intro h1 br{display:none}
#studio-gallery .gallery-intro h1 em::before{content:' '}
#studio-gallery .gallery-intro .gallery-kicker{margin-bottom:18px;font-size:10px;letter-spacing:.16em}
#studio-gallery .gallery-intro-copy{font-size:15px}
#studio-gallery .gallery-invitation{margin-top:16px}
.gallery-controls{margin-bottom:45px}
@media(max-width:600px){#studio-gallery .gallery-intro{padding:32px 0 24px}#studio-gallery .gallery-intro h1{font-size:43px}#studio-gallery .gallery-intro h1 br{display:block}#studio-gallery .gallery-intro h1 em::before{content:none}#studio-gallery .gallery-intro-copy{font-size:14px}.gallery-controls{margin-bottom:35px}}

/* Rotate the original sideways photograph in its frame and full-size viewer. */
.gallery-preview .gallery-image-rotated{position:absolute;left:50%;top:50%;max-width:none;transform:translate(-50%,-50%) rotate(var(--image-turn))}
.gallery-viewer-media{container-type:size}
.gallery-viewer-media .gallery-viewer-rotated{max-width:none;max-height:none;flex-shrink:0;transform:rotate(var(--image-turn))}
.gallery-viewer-footer{justify-content:flex-end}
