.gallery-page{max-width:1320px;margin:auto;padding:40px 5% 70px}.gallery-heading{max-width:720px}.gallery-heading>a{font-size:13px;color:var(--gold);display:inline-block;margin-bottom:26px}.gallery-heading h1{font-size:clamp(36px,5vw,60px);margin:12px 0 18px}.gallery-heading>p:last-child{color:var(--muted);line-height:1.7}.gallery-viewer{margin-top:28px;border:1px solid var(--border);border-radius:20px;padding:24px;background:#191e19}.gallery-toolbar{display:flex;align-items:center;justify-content:space-between;color:var(--gold);font-size:13px;letter-spacing:.08em}.gallery-toolbar button{width:48px;height:44px;border:1px solid #8d7a50;background:#262c23;color:#f2ddb0;border-radius:8px;cursor:pointer;font-size:24px;margin-left:8px}.gallery-toolbar button:hover{background:#414532}:is(#project-title,.roof-project-title){font-size:clamp(20px,3vw,30px);margin:20px 0}:is(#gallery-stage,.roof-stage){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;touch-action:pan-y}:is(#gallery-stage,.roof-stage).single{grid-template-columns:1fr}:is(#gallery-stage,.roof-stage) figure{position:relative;margin:0;min-width:0;background:#0e120f;border-radius:12px;overflow:hidden}:is(#gallery-stage,.roof-stage) img{width:100%;height:560px;max-height:65vh;object-fit:contain;display:block;cursor:zoom-in}:is(#gallery-stage,.roof-stage) figcaption{position:absolute;top:14px;left:14px;background:#10150fe8;color:#f5e7c5;border:1px solid #6c6042;border-radius:30px;font-size:13px;padding:8px 16px}#gallery-note{font-size:12px;line-height:1.6;color:var(--muted);min-height:20px}:is(#gallery-thumbs,.roof-thumbs){display:flex;gap:10px;overflow-x:auto;padding:8px 2px;scrollbar-color:#756747 #171c17}:is(#gallery-thumbs,.roof-thumbs) button{flex:0 0 76px;background:none;border:2px solid transparent;padding:3px;border-radius:9px;cursor:pointer}:is(#gallery-thumbs,.roof-thumbs) button[aria-pressed=true]{border-color:var(--gold)}:is(#gallery-thumbs,.roof-thumbs) img{width:66px;height:58px;display:block;object-fit:cover;border-radius:4px}.gallery-hint{font-size:12px;color:var(--muted);text-align:center;margin-top:20px}a[aria-current=page]{color:var(--gold)}button:focus-visible,a:focus-visible,.gallery-viewer:focus-visible{outline:2px solid var(--gold);outline-offset:4px}.gallery-lightbox{background:#101510;color:#eee;border:1px solid #8d7a50;border-radius:12px;padding:16px;max-width:96vw;max-height:96vh}.gallery-lightbox::backdrop{background:#000e}.gallery-lightbox img{display:block;max-width:88vw;max-height:76vh;object-fit:contain}.gallery-lightbox button{background:#262c23;color:#f2ddb0;border:1px solid #8d7a50;border-radius:6px;padding:8px 14px;cursor:pointer}.lightbox-controls{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}
@media(max-width:600px){.gallery-page{padding:25px 4% 45px}.gallery-heading>a{margin-bottom:20px}.gallery-viewer{padding:12px;border-radius:14px}:is(#gallery-stage,.roof-stage){gap:8px}:is(#gallery-stage,.roof-stage) img{height:310px;max-height:55vh}:is(#gallery-stage,.roof-stage).single img{height:480px;max-height:65vh}:is(#gallery-stage,.roof-stage) figcaption{top:7px;left:6px;padding:5px 9px;font-size:11px}.gallery-toolbar button{width:44px}.gallery-heading h1{font-size:40px}}

.gallery-toolbar button:disabled,.gallery-lightbox button:disabled{opacity:.3;cursor:default}

.roof-section{margin-top:80px;padding-top:48px;border-top:1px solid var(--border)}.roof-heading{font-size:clamp(32px,5vw,50px);margin:0 0 16px}.roof-thumbs{margin-top:24px}@media(max-width:600px){.roof-section{margin-top:48px;padding-top:32px}}

/* Keep the enlarged photo inside narrow viewports, including its padding. */
.gallery-lightbox{box-sizing:border-box;width:min(960px,calc(100% - 24px));max-width:calc(100% - 24px)}
.gallery-lightbox img{width:100%;max-width:100%;height:auto}
.gallery-lightbox p{overflow-wrap:anywhere}
