/* Page-local mosaic. Specificity also supersedes the installed legacy gallery CSS. */
.gallery-page { --gallery-gold: #796033; --gallery-paper: #fffdf8; background: #f8f5ee; }
.gallery-page [hidden] { display: none !important; }
.gallery-page h1, .gallery-page h2 { font-family: var(--sans); font-weight: 500; letter-spacing: -.04em; }
.gallery-page .page-intro { padding-top: 25px; padding-bottom: 22px; }
.gallery-page .breadcrumb { margin-bottom: 16px; }
.gallery-page .page-intro h1 { font-size: clamp(34px, 4vw, 49px); line-height: 1.12; }
.gallery-page .page-intro h1 span { color: var(--gallery-gold); }
.gallery-page .page-intro > p:not(.eyebrow) { max-width: 760px; margin-top: 12px; font-size: 14px; line-height: 1.65; }
.gallery-page .gallery-content { padding-bottom: 35px; }
.gallery-page .realisations-section { border-top: 1px solid var(--line); padding-top: 14px; }
.gallery-page .realisations-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.gallery-page .realisations-heading h2 { font-size: 22px; line-height: 1.3; }
.gallery-page .realisations-count { font-size: 12.1px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; padding: 0; }
.gallery-page .realisations-filters { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 5px; margin-bottom: 5px; scrollbar-width: thin; }
.gallery-page .realisations-filters button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 12px; border: 1px solid #d7cbb1; border-radius: 3px; background: transparent; color: var(--ink); font-size: 12.1px; line-height: 1.4; transition: background .18s, color .18s; }
.gallery-page .realisations-filters button:hover { background: #eae3d6; }
.gallery-page .realisations-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.gallery-page .realisation-filter-count { font-size: 11px; opacity: .72; }
.gallery-page .phototheque-tools { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 0 0 10px; }
.gallery-page .phototheque-topic { display: none; min-width: 0; font-size: 12.1px; color: var(--muted); }
.gallery-page .phototheque-topic select { display: block; width: 100%; min-height: 44px; margin-top: 5px; padding: 8px 28px 8px 9px; border: 1px solid #d7cbb1; border-radius: 3px; background: var(--gallery-paper); color: var(--ink); font: inherit; }
.gallery-page .phototheque-motion { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.1px; }
.gallery-page .phototheque-motion button { min-width: 75px; min-height: 44px; border: 0; border-bottom: 1px solid #c5b89e; border-radius: 0; padding: 8px; background: transparent; color: var(--ink); font: inherit; }
.gallery-page .phototheque-motion button:disabled { opacity: .55; cursor: default; }

/* Narrow seams within a series; a slightly wider seam between complete uploads.
   Nested compositions keep every square photograph whole, never cropped. */
.gallery-page #realisations-grid { display: block; columns: 4; column-gap: 7px; max-width: none; }
.gallery-page .mosaic-post { display: inline-grid; vertical-align: top; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 0 0 7px; padding: 0; border: 0; border-radius: 3px; overflow: hidden; break-inside: avoid; isolation: isolate; transform-origin: center; animation: prestige-mosaic-breath var(--drift-duration, 30s) ease-in-out var(--drift-delay, 0s) infinite; animation-play-state: paused; }
.gallery-page .mosaic-post[data-photo-count="1"] { grid-template-columns: minmax(0, 1fr); }
.gallery-page .mosaic-post[data-photo-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-page .mosaic-post[data-photo-count="3"] > :first-child { grid-column: span 2; grid-row: span 2; }
.gallery-page .mosaic-post[data-photo-count="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gallery-page .mosaic-post[data-photo-count="5"] > :nth-child(-n+2) { grid-column: span 3; }
.gallery-page .mosaic-post[data-photo-count="5"] > :nth-child(n+3) { grid-column: span 2; }
.gallery-page .mosaic-post[data-photo-count="2"] > :first-child { grid-column: auto; grid-row: auto; }
.gallery-page [data-realisation-tile] { animation: none !important; transform: none !important; }
.gallery-page .mosaic-post .realisation-card { display: block; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
.gallery-page .mosaic-post .realisation-photo, .gallery-page .realisation-card--archive .realisation-photo { position: relative; display: block; width: 100%; height: 100%; aspect-ratio: 1; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #e9e3d8; }
.gallery-page .mosaic-post .realisation-photo img, .gallery-page .realisation-card--archive .realisation-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; object-position: center; }
.gallery-page .realisation-photo:focus-visible { outline: 3px solid #fff; outline-offset: -4px; z-index: 2; }
.gallery-page .realisation-photo .realisation-zoom { position: absolute; display: grid; place-items: center; inset: auto 6px 6px auto; width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #fffdf8dd; color: #443821; opacity: 0; transition: opacity .18s; }
.gallery-page .realisation-photo:hover .realisation-zoom, .gallery-page .realisation-photo:focus-visible .realisation-zoom { opacity: 1; }
.gallery-page .realisations-empty { padding: 25px 0; font-size: 14px; color: var(--muted); }
.gallery-page #realisations-grid.is-idle .mosaic-post { animation-play-state: running; }
@keyframes prestige-mosaic-breath { 0%,100% { transform: translate3d(0,0,0) scale(1); } 38% { transform: translate3d(1px,-2px,0) scale(.987); } 72% { transform: translate3d(-1px,1px,0) scale(.996); } }

/* Only photographs of the premises remain in the separate, closed album. */
.gallery-page .realisations-archives { margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery-page .realisations-archives > summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 75px; padding: 16px 0; cursor: pointer; list-style: none; }
.gallery-page .realisations-archives > summary::-webkit-details-marker { display: none; }
.gallery-page .realisations-archives > summary strong { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.gallery-page .realisations-archives > summary > span > span { display: block; margin-top: 4px; font-size: 12.1px; color: var(--muted); }
.gallery-page .realisations-archives > summary > svg { transform: rotate(90deg); flex-shrink: 0; }
.gallery-page .realisations-archives[open] > summary > svg { transform: rotate(-90deg); }
.gallery-page .realisations-albums { padding-bottom: 18px; }
.gallery-page .realisations-grid--archives { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; max-width: 800px; }
.gallery-page .realisation-card--archive { min-width: 0; border: 0; border-radius: 3px; overflow: hidden; }
.gallery-page .social-band { gap: 20px; padding-top: 25px; }
.gallery-page .social-band p { font-family: var(--sans); font-size: 21px; line-height: 1.4; letter-spacing: -.025em; }

/* The lightbox is a different scale: large whole image, caption, own-series rail.
   Attribution is accessible under Details, never repeated across the mosaic. */
.gallery-page .realisations-dialog { width: min(1130px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #d7cbb1; border-radius: 8px; color: var(--ink); background: var(--gallery-paper); box-shadow: 0 18px 80px #0005; }
.gallery-page .realisations-dialog::backdrop { background: #171811e8; backdrop-filter: blur(3px); }
.gallery-page .realisations-dialog[open] { display: flex; flex-direction: column; animation: prestige-mosaic-open .2s ease-out; }
@keyframes prestige-mosaic-open { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.gallery-page .realisation-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.gallery-page .realisation-dialog-header h2 { font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.4; }
.gallery-page .realisation-dialog-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--ink); font-size: 29px; line-height: 1; }
.gallery-page .realisation-dialog-close:hover { background: #eee7d9; }
.gallery-page .realisation-dialog-body { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,1fr); min-height: 0; height: min(70dvh,700px); }
.gallery-page .realisation-dialog-image { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 14px; background: #e9e3d8; }
.gallery-page .realisation-dialog-image img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.gallery-page .realisation-dialog-text { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px; }
.gallery-page .realisation-dialog-series { display: flex; align-items: center; gap: 5px; margin-bottom: 20px; }
.gallery-page .realisation-dialog-series button { display: block; flex: 0 0 48px; width: 48px; height: 48px; padding: 2px; border: 1px solid transparent; border-radius: 2px; background: transparent; }
.gallery-page .realisation-dialog-series button[aria-pressed="true"] { border-color: var(--gallery-gold); }
.gallery-page .realisation-dialog-series img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-page .realisation-full-caption { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: 13.2px; line-height: 1.85; }
.gallery-page .realisation-dialog-text .realisation-full-caption { margin: 0; font-size: 13.2px; }
.gallery-page .realisation-dialog-details { margin-top: 22px; border-top: 1px solid var(--line); }
.gallery-page .realisation-dialog-details summary { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; cursor: pointer; color: #6f6b61; font-size: 12.1px; list-style: none; }
.gallery-page .realisation-dialog-details summary::-webkit-details-marker { display: none; }
.gallery-page .realisation-dialog-details summary::after { content: '+'; font-size: 15px; }
.gallery-page .realisation-dialog-details[open] summary::after { content: '−'; }
.gallery-page .realisation-dialog-credit, .gallery-page .realisation-dialog-origin { color: #6f6b61; font-size: 12.1px; line-height: 1.8; overflow-wrap: anywhere; }
.gallery-page .realisation-post-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--gallery-gold); font-size: 12.1px; line-height: 1.6; }
.gallery-page .realisation-dialog-footer { display: flex; align-items: center; justify-content: center; gap: 20px; min-height: 58px; padding: 7px 15px; border-top: 1px solid var(--line); flex-shrink: 0; }
.gallery-page .realisation-dialog-footer button { width: 44px; min-height: 44px; border: 1px solid #d7cbb1; border-radius: 3px; background: transparent; color: var(--ink); }
.gallery-page .realisation-dialog-footer button:disabled { opacity: .35; cursor: default; }
.gallery-page .realisation-dialog-position { min-width: 60px; text-align: center; font-size: 12.1px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .gallery-page #realisations-grid { columns: 3; } }
@media (max-width: 760px) {
  .gallery-page .page-intro { padding-top: 20px; padding-bottom: 18px; }
  .gallery-page .page-intro h1 { font-size: 35px; }
  .gallery-page .page-intro > p:not(.eyebrow) { font-size: 13.2px; margin-top: 10px; }
  .gallery-page .realisations-filters { display: none; }
  .gallery-page .phototheque-tools { align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .gallery-page .phototheque-topic { display: block; flex: 1; }
  .gallery-page .phototheque-motion { flex-direction: column; align-items: flex-end; gap: 5px; font-size: 11px; }
  .gallery-page .phototheque-motion button { min-width: 76px; font-size: 12.1px; }
  .gallery-page .realisations-archives > summary { gap: 12px; }
  .gallery-page .social-band p { font-size: 20px; }
  .gallery-page .social-band .text-link { margin-top: 12px; }
  .gallery-page .realisations-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .gallery-page .realisation-dialog-header { padding: 7px 11px; gap: 10px; }
  .gallery-page .realisation-dialog-header h2 { font-size: 15px; }
  .gallery-page .realisation-dialog-body { display: block; height: auto; overflow-y: auto; overscroll-behavior: contain; }
  .gallery-page .realisation-dialog-image { height: min(47dvh,440px); padding: 10px; }
  .gallery-page .realisation-dialog-text { padding: 16px; overflow: visible; }
  .gallery-page .realisation-dialog-series { margin-bottom: 14px; }
  .gallery-page .realisation-dialog-details { margin-top: 16px; }
}
@media (max-width: 620px) { .gallery-page #realisations-grid { columns: 2; column-gap: 4px; } .gallery-page .mosaic-post { margin-bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .gallery-page .mosaic-post { animation: none !important; transform: none !important; } .gallery-page .realisations-dialog[open] { animation: none; } .gallery-page .realisation-zoom, .gallery-page .realisations-filters button { transition: none; } }
