.project-gallery{background:#fff;color:#202020;color-scheme:light;padding:clamp(48px,6vw,96px) var(--gutter);scroll-margin-top:24px}
.project-gallery-inner{max-width:1440px;margin:0 auto}
.project-gallery-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:32px}
.project-gallery-heading h2{font-size:20px;line-height:1.4;font-weight:400;letter-spacing:-.02em}
.project-gallery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}
.project-gallery-item{display:block;position:relative;aspect-ratio:1;overflow:hidden;background:#f7f7f5}
.project-gallery-item img{display:block;width:100%;height:100%;object-fit:cover;transition:opacity .2s ease}
.project-gallery-item--drawing{background:#fff}
.project-gallery-item--drawing img{object-fit:contain}
.project-gallery-item:hover img{opacity:.8}
.project-gallery-item:focus-visible{outline:2px solid #202020;outline-offset:4px}
html.gallery-is-open,html.gallery-is-open body{overflow:hidden;overscroll-behavior:none}
.gallery-viewer{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:16px 24px;border:0;background:#101010;color:#f4f5f0;color-scheme:dark}
.gallery-viewer:not([open]){display:none}
.gallery-viewer[open]{display:grid;grid-template-rows:48px minmax(0,1fr) 56px;gap:12px}
.gallery-viewer::backdrop{background:rgba(0,0,0,.96)}
.gallery-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.gallery-viewer-counter{color:#b7b7b2;font-size:13px;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.gallery-viewer button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;touch-action:manipulation}
.gallery-viewer button:hover{background:#ffffff12}
.gallery-viewer button:focus-visible{outline:1px solid currentColor;outline-offset:3px}
.gallery-viewer button svg{width:24px;height:24px;pointer-events:none}
.gallery-viewer-content{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;min-height:0;margin:0 52px}
.gallery-viewer-stage{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;touch-action:pan-y pinch-zoom;user-select:none}
.gallery-viewer-content.has-schedule{grid-template-columns:minmax(0,1fr) 280px;background:#fff;color:#202020;color-scheme:light;--muted:#71716e;--line:#e5e5e5;padding:16px}
.gallery-viewer-schedule{align-self:center;width:100%;padding:20px 12px 20px 24px}
.gallery-viewer-schedule[hidden]{display:none}
.gallery-viewer-plan-labels{position:absolute;inset:0;pointer-events:none}
.gallery-viewer-stage.is-loading .gallery-viewer-plan-labels{visibility:hidden}
.gallery-viewer-image[hidden]~.gallery-viewer-plan-labels{display:none}
.gallery-viewer-image{display:block;width:100%;height:100%;min-height:0;object-fit:contain;transition:opacity .15s ease}
.gallery-viewer-image[hidden]{display:none}
.gallery-viewer-stage.is-loading .gallery-viewer-image{opacity:.35}
.gallery-viewer-error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:14px;text-align:center}
.gallery-viewer-error[hidden]{display:none}
.gallery-viewer-footer{display:flex;align-items:center;justify-content:center;gap:16px;min-width:0}
.gallery-viewer-caption{font-size:14px;font-weight:400;line-height:1.5;text-align:center;color:#b7b7b2}
.gallery-viewer-prev,.gallery-viewer-next{position:absolute;top:50%;transform:translateY(-50%)}
.gallery-viewer-prev{left:16px}
.gallery-viewer-next{right:16px}
@media(max-width:900px){.project-gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}}
@media(max-width:850px){.gallery-viewer-content.has-schedule{display:block;overflow-y:auto;overscroll-behavior:contain;padding:12px}.gallery-viewer-content.has-schedule .gallery-viewer-image{height:auto}.gallery-viewer-content.has-schedule .gallery-viewer-stage{min-height:0}.gallery-viewer-schedule{max-width:360px;margin:0 auto;padding:24px 12px 16px}}
@media(max-width:600px){.project-gallery-heading{margin-bottom:24px}.project-gallery-heading h2{font-size:18px}.project-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.gallery-viewer{padding:8px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.gallery-viewer[open]{grid-template-rows:44px minmax(0,1fr) 64px;gap:8px}.gallery-viewer-content{margin:0}.gallery-viewer-footer{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px}.gallery-viewer-caption{font-size:13px}.gallery-viewer-prev,.gallery-viewer-next{position:static;transform:none}}
@media(max-width:420px){.project-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.project-gallery-item img,.gallery-viewer-image{transition:none}}
