/* An image-led masonry gallery, with the original photo proportions intact. */
#gallery{--gallery-topbar-height:114px;position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#fcfaf5;color:var(--ink);box-shadow:none;overscroll-behavior:contain;scrollbar-gutter:stable}
#gallery::backdrop{background:var(--paper)}
.gallery-topbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:20px;height:var(--gallery-topbar-height);padding:12px 3%;border-bottom:1px solid var(--line);background:#fcfaf5f5;backdrop-filter:blur(12px)}
.gallery-brand{gap:12px;text-align:center;color:var(--accent)}
.gallery-brand svg{display:block;flex-shrink:0;width:45px;height:52px}
.gallery-brand small{font-family:var(--sans);font-size:7px;letter-spacing:2.3px;margin-top:10px}
.gallery-topbar-actions{display:flex;gap:24px;align-items:center}
.gallery-topbar button{border:0;background:none;font-size:11px;color:var(--accent);padding:8px 0;min-height:44px}
.gallery-dismiss{display:flex;gap:16px;align-items:center}
.gallery-dismiss span{font-size:29px;line-height:1}
.gallery-back span{margin-right:10px}
.gallery-overview{padding:42px 2% 40px;max-width:1920px;margin:auto}
.gallery-heading{text-align:center;margin-bottom:24px}
.gallery-heading .eyebrow{font-size:9px;letter-spacing:2.4px;margin:0 0 12px}
#gallery h2{font-size:clamp(38px,4.3vw,62px);line-height:1.1}
#gallery-title:focus{outline:none}
#gallery-count{font-size:10px;color:var(--muted);margin:16px 0 0}
.gallery-filters{position:sticky;top:var(--gallery-topbar-height);z-index:3;display:flex;justify-content:center;gap:30px;overflow-x:auto;scrollbar-width:thin;padding:0 12px;margin:0 0 20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fcfaf5f5;backdrop-filter:blur(12px)}
.gallery-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:58px;flex-shrink:0;padding:12px 0;border:0;background:none;font-size:11px;color:var(--muted);transition:color .2s}
.gallery-filter::after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--accent);transform:scaleX(0);transition:transform .2s}
.gallery-filter[aria-pressed="true"],.gallery-filter:hover{color:var(--ink)}
.gallery-filter[aria-pressed="true"]::after{transform:scaleX(1)}
.gallery-filter-count{font-size:9px;align-self:center;color:var(--muted)}
.gallery-mosaic{--gallery-columns:4;--gallery-gap:12px;display:grid;grid-template-columns:repeat(var(--gallery-columns),minmax(0,1fr));gap:var(--gallery-gap);align-items:start}
.gallery-mosaic.is-masonry{position:relative;display:block}
.gallery-tile{display:block;min-width:0;padding:0;border:0;background:none;text-align:left;animation:gallery-appear .35s ease both}
.is-masonry .gallery-tile{position:absolute}
.gallery-tile-image{position:relative;display:block;overflow:hidden;background:#eee8dd}
.gallery-tile img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .6s ease}
.gallery-tile:hover img{transform:scale(1.025)}
.gallery-tile:focus-visible{outline:2px solid var(--accent);outline-offset:3px;z-index:1}
.gallery-enlarge{position:absolute;right:12px;bottom:12px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fcfaf5e8;color:var(--accent);font-size:20px;opacity:0;transition:opacity .2s}
.gallery-tile:hover .gallery-enlarge,.gallery-tile:focus-visible .gallery-enlarge{opacity:1}
.gallery-viewer{max-width:1700px;margin:0 auto;padding:18px 3% 22px}
.gallery-stage{position:relative;display:grid;place-items:center;height:calc(100dvh - var(--gallery-topbar-height) - 172px);min-height:240px;touch-action:pan-y pinch-zoom}
#gallery #gallery-image{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain}
.gallery-step{position:absolute;top:50%;transform:translateY(-50%);border:1px solid var(--line);border-radius:50%;background:#fcfaf5f0;color:var(--accent);width:48px;height:48px;display:grid;place-items:center;font-size:23px}
.gallery-step:hover{background:#fff}
#gallery #prev{left:12px}
#gallery #next{right:12px}
.gallery-viewer-caption{display:flex;justify-content:center;padding:12px 0 8px}
/* Descriptions remain available to screen readers, without appearing under photos. */
#gallery-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#gallery-position{font-size:10px;letter-spacing:1.4px;color:var(--muted)}
.gallery-thumbnails{display:flex;gap:9px;overflow-x:auto;padding:5px 1px 9px;scrollbar-width:thin}
.gallery-thumbnail{flex:0 0 90px;height:65px;border:2px solid transparent;padding:3px;background:transparent;opacity:.6;transition:opacity .2s}
.gallery-thumbnail[aria-current="true"]{border-color:var(--accent);opacity:1}
.gallery-thumbnail:hover,.gallery-thumbnail:focus-visible{opacity:1}
.gallery-thumbnail img{width:100%;height:100%;object-fit:cover}
#gallery-image-error{position:absolute;inset:auto 60px;text-align:center;background:var(--paper);padding:18px;font-size:12px}
@keyframes gallery-appear{from{opacity:.3}to{opacity:1}}
@media(max-width:1100px){.gallery-mosaic{--gallery-columns:3}.gallery-filters{gap:24px}}
@media(max-width:800px){.gallery-filters{justify-content:start;gap:24px}}
@media(max-width:700px){.gallery-mosaic{--gallery-columns:2;--gallery-gap:8px}}
@media(max-width:600px){
 #gallery{--gallery-topbar-height:96px}#gallery:has(.gallery-viewer:not([hidden])){--gallery-topbar-height:132px}
 .gallery-topbar{display:grid;grid-template-columns:1fr auto;padding:10px 18px;gap:8px 12px}.gallery-brand{grid-column:1;grid-row:1;gap:8px;text-align:left}.gallery-brand svg{width:34px;height:42px}.gallery-brand .brand-name{font-size:25px}.gallery-brand small{font-size:6px;letter-spacing:1.2px;margin-top:8px}.gallery-dismiss{grid-column:2;grid-row:1;gap:9px}.gallery-topbar-actions{display:contents}.gallery-topbar button{font-size:10px}.gallery-back{grid-column:1/-1;grid-row:2;justify-self:start;text-align:left;line-height:1.4}.gallery-topbar .gallery-back{min-height:32px;padding:0}.gallery-back span{margin-right:6px}
 .gallery-overview{padding:30px 10px 25px}.gallery-heading{margin-bottom:22px}#gallery h2{font-size:38px}.gallery-heading .eyebrow{font-size:8px}#gallery-count{margin-top:12px}.gallery-filters{padding:0 8px;margin-bottom:12px;gap:22px}.gallery-filter{font-size:10px;min-height:52px;gap:6px}.gallery-filter-count{font-size:8px}.gallery-enlarge{display:none}
 .gallery-viewer{padding:14px 12px 15px}.gallery-stage{height:calc(100dvh - var(--gallery-topbar-height) - 157px);min-height:240px}.gallery-step{width:40px;height:40px;font-size:20px}#gallery #prev{left:0}#gallery #next{right:0}.gallery-thumbnail{flex-basis:75px;height:57px}
}
@media(prefers-reduced-motion:reduce){.gallery-tile{animation:none}.gallery-tile img,.gallery-filter,.gallery-filter::after,.gallery-thumbnail{transition:none}}

/* Room information is shown beside the enlarged image, not under the mosaic. */
.gallery-room-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 24px;margin:0 0 22px}
.gallery-room-links button{border:0;border-bottom:1px solid var(--line);padding:8px 0;background:none;font-family:var(--serif);font-size:23px;color:var(--accent)}
.gallery-room-links[hidden],.gallery-room-details[hidden]{display:none}
.gallery-viewer:has(.gallery-room-details:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 290px;column-gap:36px}
.gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-stage{grid-column:1;grid-row:1}
.gallery-room-details{grid-column:2;grid-row:1/4;align-self:center;padding:25px 0}
.gallery-room-details .eyebrow{font-size:8px;color:var(--accent);margin-bottom:12px}
.gallery-room-details h3{font-size:39px;margin-bottom:20px}
.gallery-room-details .room-description{font-size:12px}
.gallery-room-note{font-size:10px;color:var(--muted);margin-top:18px}
.gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-viewer-caption,.gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-thumbnails{grid-column:1;min-width:0}
@media(max-width:760px){
 .gallery-room-links{justify-content:start;gap:4px 18px;padding:0 8px}.gallery-room-links button{font-size:21px}
 .gallery-viewer:has(.gallery-room-details:not([hidden])){display:flex;flex-direction:column;gap:0}
 .gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-stage{height:auto;aspect-ratio:var(--gallery-photo-ratio,3/2);min-height:0;max-height:55dvh;order:0}
 .gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-viewer-caption{order:1}
 .gallery-viewer:has(.gallery-room-details:not([hidden])) .gallery-thumbnails{order:2;width:100%}
 .gallery-room-details{order:3;align-self:stretch;padding:24px 10px}.gallery-room-details h3{font-size:34px}
}
