.gallery-dialog[open] { display: block; }
html:has(.gallery-dialog[open]) { scrollbar-gutter: auto; }
.gallery-dialog {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  overflow: hidden; overscroll-behavior: contain;
  background: #f7f5f0; color: #353831;
}
.gallery-dialog::backdrop { background: transparent; }
.gallery-pswp { --pswp-bg: #f7f5f0; --pswp-icon-color: #353831; --pswp-icon-color-secondary: #f7f5f0; --pswp-icon-stroke-color: #f7f5f0; --pswp-placeholder-bg: #ecefe7; --pswp-preloader-color: #ccd2c5; --pswp-preloader-color-secondary: #657768; --pswp-error-text-color: #353831; }
.gallery-ambience { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.gallery-pswp .pswp__bg { z-index: -2; }
.gallery-pswp .pswp__scroll-wrap { z-index: 0; }
.gallery-pswp .pswp__top-bar { padding: max(12px, env(safe-area-inset-top)) 18px 0; }
.gallery-pswp .pswp__counter { font: 11px/50px var(--sans, sans-serif); letter-spacing: .15em; color: #686f63; opacity: 1; text-shadow: none; }
.gallery-pswp .pswp__button { border-radius: 50%; opacity: .85; transition: background .2s ease, opacity .2s ease; }
.gallery-pswp .pswp__button:hover { background: #e9eee3; opacity: 1; }
.gallery-pswp .pswp__button:focus-visible,
.gallery-dialog button:focus-visible,
.gallery-overview button:focus-visible { outline: 2px solid #71806b; outline-offset: -3px; }
.gallery-pswp .pswp__button--arrow { width: 56px; height: 64px; margin-top: -32px; border-radius: 0; }
.gallery-pswp .pswp__button--arrow--prev { left: 16px; }
.gallery-pswp .pswp__button--arrow--next { right: 16px; }
.gallery-pswp .pswp__img { max-width: none; object-fit: initial; }
.gallery-caption {
  position: absolute; z-index: 10; bottom: max(26px, env(safe-area-inset-bottom)); left: 44px; right: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  pointer-events: none; color: #353831;
}
.gallery-caption-copy { min-width: 0; max-width: min(75%, 900px); position: relative; }
.gallery-caption-title { margin: 0; font: 400 clamp(18px, 2vw, 25px)/1.5 var(--serif, serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-caption-place { margin: 5px 0 0; font: 11px/1.8 var(--sans, sans-serif); letter-spacing: .04em; color: #686f63; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-live-line { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.gallery-live { display: inline-flex; pointer-events: auto; align-items: center; min-height: 32px; margin-top: 3px; padding: 3px 9px; border: 1px solid #cdd5c5; border-radius: 3px; color: #52624b; background: #f8faf4e6; font: 9px/1.4 var(--sans, sans-serif); letter-spacing: .09em; cursor: pointer; }
.gallery-live[hidden], .gallery-live-frame[hidden] { display: none; }
.gallery-live:hover, .gallery-live[aria-pressed="true"] { background: #e8eedf; border-color: #acb99d; }
.gallery-live-status { color: #686f63; font: 9px/1.5 var(--sans, sans-serif); }
.gallery-live-frame { position: absolute; top: 0; left: 0; overflow: hidden; pointer-events: none; }
.gallery-live-video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gallery-live-progress { position: absolute; height: 2px; bottom: 0; left: 0; width: 100%; background: #71806b; box-shadow: 0 0 8px #71806b30; transform: scaleX(0); transform-origin: 0 50%; transition: transform .2s linear; }
.gallery-ticket-button { pointer-events: auto; flex-shrink: 0; min-height: 46px; padding: 0 18px; border: 1px solid #ccd2c5; border-radius: 3px; color: #353831; background: #faf8f3e6; font: 11px var(--sans, sans-serif); letter-spacing: .08em; transition: background .2s ease, border-color .2s ease; }
.gallery-ticket-button:hover { background: #ecefe7; border-color: #a4af9d; }
.gallery-hint { position: absolute; left: 50%; top: max(30px, calc(env(safe-area-inset-top) + 18px)); transform: translateX(-50%); color: #686f63; font: 10px var(--sans, sans-serif); letter-spacing: .08em; pointer-events: none; }
.gallery-pagination { position: absolute; z-index: 12; left: 50%; top: max(72px, calc(env(safe-area-inset-top) + 62px)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 36px); padding: 7px 10px 7px 16px; border: 1px solid #d8ddd1; border-radius: 8px; background: #faf8f3f5; color: #686f63; font: 11px/1.6 var(--sans, sans-serif); }
.gallery-pagination[hidden], .gallery-page-button[hidden] { display: none; }
.gallery-page-status { min-width: 0; }
.gallery-page-button { flex-shrink: 0; min-height: 38px; padding: 0 12px; border: 1px solid #c7d1be; border-radius: 4px; background: #eef2e7; color: #42503b; font: inherit; cursor: pointer; }
.gallery-page-button:hover { background: #e2e9d9; }
.gallery-loading { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; padding: 40px; text-align: center; }
.gallery-loading-status, .gallery-slide-status { color: #686f63; font: 12px/2 var(--sans, sans-serif); }
.gallery-loading-close { position: absolute; z-index: 2; right: 24px; top: max(18px, env(safe-area-inset-top)); min-width: 72px; min-height: 48px; color: #353831; font-size: 12px; }
.gallery-slide-status { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; text-align: center; }
@media (max-width: 639px) {
  .gallery-pswp .pswp__top-bar { padding-right: 9px; padding-left: 9px; }
  .gallery-caption { left: 22px; right: 22px; bottom: max(23px, env(safe-area-inset-bottom)); gap: 16px; }
  .gallery-caption-copy { max-width: calc(100% - 122px); }
  .gallery-caption-title { font-size: 19px; }
  .gallery-caption-place { font-size: 10px; }
  .gallery-live-line { gap: 5px; }
  .gallery-live-status { max-width: 100px; font-size: 8px; }
  .gallery-ticket-button { padding: 0 13px; }
  .gallery-hint { top: auto; bottom: max(118px, calc(env(safe-area-inset-bottom) + 96px)); font-size: 9px; white-space: nowrap; }
  .gallery-pagination { top: max(67px, calc(env(safe-area-inset-top) + 57px)); gap: 9px; padding-left: 12px; font-size: 10px; }
  .gallery-page-button { min-height: 44px; padding: 0 10px; }
  .gallery-pswp .pswp__button--arrow { width: 44px; background: #faf8f3e6; }
  .gallery-pswp .pswp__button--arrow--prev { left: 0; }
  .gallery-pswp .pswp__button--arrow--next { right: 0; }
}
@media (max-height: 500px) and (min-width: 640px) {
  .gallery-caption { bottom: 15px; left: 30px; right: 30px; }
  .gallery-caption-title { font-size: 18px; }
  .gallery-live { position: absolute; left: 0; bottom: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-dialog *, .gallery-dialog *::before, .gallery-dialog *::after { transition: none !important; animation: none !important; }
}
.gallery-location-estimate { margin-top:4px; font:11px/1.7 var(--sans,sans-serif); color:#746952; pointer-events:auto; }
.gallery-location-estimate>summary { cursor:pointer; min-height:24px; padding:3px 0; box-sizing:border-box; }
.gallery-location-estimate>p { margin:4px 0 0; max-height:96px; overflow:auto; overflow-wrap:anywhere; }
.gallery-location-estimate>summary:focus-visible { outline:1px solid currentColor; outline-offset:3px; }

/* Keep the photograph still while the supporting interface gently recedes. */
.gallery-pswp .pswp__top-bar > :not(.pswp__button--close),
.gallery-pswp .pswp__button--arrow,
.gallery-caption, .gallery-hint { transition: opacity .36s ease; }
.gallery-dialog.is-immersed .pswp__top-bar > :not(.pswp__button--close),
.gallery-dialog.is-immersed .pswp__button--arrow,
.gallery-dialog.is-immersed .gallery-caption,
.gallery-dialog.is-immersed .gallery-hint { opacity: 0; pointer-events: none; }
.gallery-dialog.is-immersed .gallery-caption * { pointer-events: none; }
.gallery-dialog.is-immersed .pswp__button--close { opacity: .36; }
.gallery-dialog.is-immersed .pswp__button--close:hover,
.gallery-dialog.is-immersed .pswp__button--close:focus-visible { opacity: 1; }
.gallery-pswp .gallery-counter-button {
  width: auto; min-width: 92px; height: 48px; margin: 0; padding: 0 14px;
  border: 1px solid #ccd2c5; border-radius: 24px; background: #faf8f3e6;
  color: #353831; font-size: 12px; line-height: 46px; cursor: pointer;
}
.gallery-counter-button::after { content: ' ⊞'; margin-left: 7px; color: #686f63; font-size: 16px; }
.gallery-caption-place { font-size: 12px; }
.gallery-live { min-height: 36px; font-size: 10px; }
.gallery-live-status { font-size: 10px; }
.gallery-dialog.has-ticket-panel .gallery-pswp { width: calc(100% - min(460px, 42vw)); }
.gallery-dialog.has-ticket-panel .gallery-caption { left: 28px; right: 28px; }
.gallery-dialog.has-ticket-panel .gallery-hint { display: none; }

.gallery-overview[open] { display: flex; }
.gallery-overview {
  position: fixed; inset: 0; width: min(960px, calc(100% - 72px)); height: min(760px, calc(100% - 72px));
  max-width: none; max-height: none; margin: auto; padding: 30px 32px 26px;
  flex-direction: column; gap: 18px; box-sizing: border-box; overflow: hidden;
  border: 1px solid #d1d8ca; border-radius: 12px; background: #faf8f3f5; color: #353831;
  box-shadow: 0 30px 120px #515b4029;
}
.gallery-overview::backdrop { background: #e1e5dbbd; backdrop-filter: blur(8px); }
.gallery-overview-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-shrink: 0; }
.gallery-overview-eyebrow { margin: 0 0 7px; font: 10px/1.5 var(--sans, sans-serif); letter-spacing: .25em; color: #686f63; }
.gallery-overview-header h2 { margin: 0; font: 400 28px/1.4 var(--serif, serif); }
.gallery-overview-close { min-height: 44px; padding: 0 14px; border: 1px solid #ccd2c5; border-radius: 24px; background: transparent; color: #353831; font: 12px var(--sans, sans-serif); white-space: nowrap; cursor: pointer; }
.gallery-overview-close:hover { background: #ecefe7; border-color: #a4af9d; }
.gallery-overview-status { margin: 0; min-height: 20px; font: 12px/1.7 var(--sans, sans-serif); color: #686f63; }
.gallery-overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); align-content: start; gap: 20px 12px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 5px; scrollbar-color: #9ea994 transparent; }
.gallery-overview-photo { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: transparent; color: #353831; text-align: left; cursor: pointer; }
.gallery-overview-photo img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; background: #ecefe7; outline: 1px solid #d8ddd1; outline-offset: 0; transition: outline-color .2s ease, opacity .2s ease; }
.gallery-overview-photo:hover img { outline-color: #75866a; }
.gallery-overview-photo[aria-current="true"] img { outline: 2px solid #75866a; outline-offset: 3px; }
.gallery-overview-number { position: absolute; left: 7px; top: 7px; min-width: 24px; padding: 2px 5px; border-radius: 3px; background: #faf8f3ed; color: #353831; font: 10px/1.6 var(--sans, sans-serif); }
.gallery-overview-title { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-top: 9px; font: 11px/1.6 var(--sans, sans-serif); }
.gallery-overview-more { flex-shrink: 0; align-self: center; min-height: 44px; padding: 0 24px; border: 1px solid #bdc9b1; border-radius: 24px; color: #45573b; background: #edf2e5; font: 12px var(--sans, sans-serif); cursor: pointer; }
.gallery-overview-more:hover { background: #e2e9d9; border-color: #a4b196; }
.gallery-overview-more[hidden] { display: none; }
.gallery-overview-more:disabled { opacity: .5; cursor: wait; }
@media (max-width: 760px) {
  .gallery-dialog.has-ticket-panel .gallery-pswp { width: 100%; height: 36svh; }
  .gallery-dialog.has-ticket-panel .gallery-caption,
  .gallery-dialog.has-ticket-panel .gallery-pagination { display: none; }
  .gallery-overview { width: calc(100% - 24px); height: calc(100% - 40px); height: calc(100dvh - 40px); padding: 24px 16px 20px; gap: 15px; }
  .gallery-overview-header h2 { font-size: 23px; }
  .gallery-overview-close { padding: 0 11px; font-size: 11px; }
  .gallery-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .gallery-overview-title { font-size: 10px; }
}
@media (max-width: 639px) {
  .gallery-caption-place { font-size: 12px; }
  .gallery-live { min-height: 44px; }
  .gallery-live-status { font-size: 10px; }
  .gallery-pswp .pswp__button--arrow { top: auto; bottom: max(144px, calc(env(safe-area-inset-bottom) + 132px)); height: 44px; width: 44px; margin: 0; border: 1px solid #ccd2c5; border-radius: 50%; background: #faf8f3de; opacity: .58; }
  .gallery-pswp .pswp__button--arrow--prev { left: 18px; }
  .gallery-pswp .pswp__button--arrow--next { right: 18px; }
  .gallery-pswp .pswp__button--arrow .pswp__icn { width: 28px; height: 28px; top: 7px; left: 7px; }
  .gallery-dialog.has-ticket-panel .pswp__button--arrow { display: none; }
  .gallery-hint { font-size: 10px; }
}
