.gallery-page { background: #382d33; color: white; overflow-anchor: none; }
.gallery-page [hidden] { display: none !important; }
.gallery-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-route { --stage-height: max(420px, calc(100svh - var(--gallery-header-height, 80px))); position: relative; background: #ece8df; }
.gallery-route.is-entered { height: calc(var(--stage-height) + var(--walk-length)); }
.gallery-sticky { position: sticky; top: var(--gallery-header-height, 80px); height: var(--stage-height); overflow: hidden; isolation: isolate; background: #ece8df; color: #382d33; }
.gallery-canvas, .gallery-exhibits { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.gallery-exhibits { pointer-events: none; }
.gallery-sign, .gallery-end-sign { position: absolute; z-index: 2; transform: translate(-50%, -50%); color: #382d33; background: transparent; text-decoration: none; }
.gallery-sign, .gallery-end-sign { top: var(--sign-y, 49%); left: var(--sign-x, 69%); display: grid; grid-template-columns: auto auto; align-items: end; column-gap: .63em; font-size: clamp(1.55rem, 4.8svh, 3.9rem); line-height: .91; white-space: nowrap; background: #f3eee3; border-top: 1px solid #fff9; border-bottom: 1px solid #867a6429; box-shadow: 1px 2px 4px #30231929; padding: .35em .51em .39em; }
.gallery-sign-label { grid-column: 1 / -1; margin: 0 0 .47em .12em; font-size: .32em; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.gallery-sign-title { font-size: 1em; font-weight: 600; letter-spacing: -.057em; }
.gallery-sign-arrow { color: #a83d4e; font-size: .9em; line-height: .85; transition: transform .22s; }
.gallery-sign:hover .gallery-sign-arrow, .gallery-end-sign:hover .gallery-sign-arrow { transform: translateX(.15em); }
.gallery-end-sign { top: var(--end-sign-y, 56%); left: var(--end-sign-x, 68%); font-size: clamp(1.38rem, 4.7svh, 3.65rem); }
.gallery-end-sign .gallery-sign-arrow { color: #ff4f68; }
.gallery-route.is-entered .gallery-canvas { cursor: grab; }
.gallery-sticky.is-dragging :is(.gallery-canvas, .gallery-art-link) { cursor: grabbing; }
.gallery-page :focus-visible { outline: 2px solid #c52e48; outline-offset: 5px; }
.gallery-page .site-header :focus-visible, .gallery-page .site-footer :focus-visible { outline-color: #e5ff39; }
.gallery-walk-hint { position: absolute; z-index: 2; left: max(20px, 3vw); bottom: max(20px, env(safe-area-inset-bottom)); margin: 0; padding: .55rem .75rem; border-radius: 4px; background: #faf7f0ef; color: #382d33; font-size: .875rem; pointer-events: none; }
.gallery-walk-hint span { margin: 0 .45rem; }
.gallery-controls { position: absolute; z-index: 3; bottom: max(20px, env(safe-area-inset-bottom)); right: max(20px, 3vw); display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid #382d331f; border-radius: 7px; background: #faf7f0f5; box-shadow: 0 2px 14px #3023191f; }
.gallery-control { min-height: 40px; display: inline-flex; align-items: center; padding: 5px 11px; color: #382d33; border: 0; border-radius: 4px; background: transparent; font: 500 .875rem Outfit, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.gallery-control:hover, .gallery-sound.is-sound-enabled, .gallery-sound-credits[open] summary { background: #e9dfd6; }
.gallery-sound-credits summary { list-style: none; }
.gallery-sound-credits summary::-webkit-details-marker { display: none; }
.gallery-sound-credits p { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(20rem, 80vw); margin: 0; padding: .9rem 1rem; border: 1px solid #382d331f; border-radius: 7px; background: #faf7f0; color: #382d33; font-size: .875rem; overflow-wrap: anywhere; box-shadow: 0 2px 14px #3023191f; }
.gallery-sound-credits a { color: inherit; text-underline-offset: .2em; }
.gallery-credit summary { width: fit-content; cursor: pointer; }
.gallery-credit p { margin-bottom: 0; }
.gallery-art-link { position: absolute; display: block; width: 1px; height: 1px; top: 0; left: 0; overflow: hidden; opacity: 0; pointer-events: none; }
.gallery-art-link[data-visible] { opacity: 1; pointer-events: auto; }
.gallery-art-link:hover, .gallery-art-link:focus-visible { background: #fff2; outline: none; }
.gallery-art-link:focus-visible { background: #ff4f6835; box-shadow: inset 0 0 0 5px #c52e48; }
.gallery-caption { position: absolute; color: #2d2623; background: #faf7eee8; border-radius: 1px; transform: translate(-50%, 0); text-align: center; line-height: 1.15; font-size: var(--caption-size, 12px); font-weight: 500; width: max-content; max-width: min(36%, 190px); padding: .36em .65em; pointer-events: none; visibility: hidden; }
.gallery-art-link[data-visible] + .gallery-caption[data-readable],
.gallery-art-link[data-visible]:is(:hover,:focus-visible) + .gallery-caption { visibility: visible; }
.gallery-progress { position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; height: 2px; background: #382d331a; }
.gallery-progress span { display: block; height: 100%; background: #ff4f68; transform: scaleX(var(--progress, 0)); transform-origin: left; }
.gallery-archive, .gallery-project { background: #f6f3ed; color: #382d33; padding: clamp(2.6rem, 7vw, 7rem) 0; }
.gallery-archive h2, .gallery-project h1 { margin: 0 0 clamp(1.8rem, 4vw, 3.25rem); font-size: clamp(2.7rem, 7vw, 6.4rem); line-height: .97; font-weight: 600; letter-spacing: -.062em; }
.gallery-archive h2 span { color: #c52e48; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 4rem) clamp(1rem, 2.6vw, 2.5rem); padding: 0; margin: 0; list-style: none; }
.gallery-card { display: grid; align-content: start; color: inherit; text-decoration: none; }
.gallery-card-image { display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; background: #ece7df; }
.gallery-card-image img { display: block; width: 100%; height: 100%; object-fit: contain; transition: scale .3s; }
.gallery-card:hover img { scale: .975; }
.gallery-card-title { margin-top: .85rem; font-size: clamp(1.05rem, 1.65vw, 1.42rem); font-weight: 600; line-height: 1.14; }
.gallery-card:hover .gallery-card-title { text-decoration: underline; text-decoration-color: #c52e48; text-underline-offset: .2em; }
.gallery-card-category { margin-top: .32rem; color: #584f50; font-size: .9rem; }
.gallery-credit { border-top: 1px solid #382d3330; margin: 3rem 0 0; padding-top: 1.2rem; color: #584f50; font-size: .81rem; overflow-wrap: anywhere; }
.gallery-credit a, .gallery-project a { color: inherit; text-underline-offset: .22em; }
.gallery-project h1 { max-width: 16ch; margin: 1.7rem 0 .75rem; }
.gallery-project figure { margin: 2rem 0; }
.gallery-project img { display: block; max-width: 100%; width: auto; height: auto; max-height: 78svh; object-fit: contain; }
.gallery-project-original, .gallery-project-back { display: inline-block; font-weight: 600; }
.gallery-project-back { min-height: 44px; padding: .6rem 0; }
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-sign-arrow, .gallery-card-image img { transition: none; }
}

.gallery-archive, .gallery-grid > li { scroll-margin-top: calc(var(--header) + 1rem); }
