/* Centered photo with crisp previews and fine page edges. */
.visual.photo-book { overflow: visible; }
.photo-book .photo-viewport { visibility: hidden; pointer-events: none; }
.visual.photo-book::after { display: none !important; }
.photo-accordion { position: absolute; inset: 0; padding: 0; isolation: isolate; overflow: hidden; background: #222222; }
.photo-accordion .photo-page { position: absolute; top: 0; min-width: 0; height: 100%; padding: 0; border: 0; overflow: hidden; background: #222222; cursor: pointer; transition: none; }
.photo-accordion .photo-page.is-open { cursor: zoom-in; z-index: 1; }
.visual.photo-book .photo-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center !important; border-radius: 0; transform: none !important; animation: none !important; transition: none !important; }
.visual.photo-book .photo-page .photo-page-image { filter: none !important; width: var(--photo-canvas-width) !important; left: 50% !important; right: auto; object-fit: contain !important; transform: translateX(-50%) !important; }
.visual.photo-book .photo-page.is-open .photo-page-image { object-fit: contain !important; filter: none !important; }
.visual.photo-book .photo-page .photo-page-backdrop { display: none !important; }
.photo-page::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 72%,#0005); pointer-events: none; }
.photo-page:focus-visible { outline: 1px solid #ffffffa0; outline-offset: -2px; }
.visual.photo-book .photo-top { z-index: 8; max-width: calc(100% - 88px); font-size: 9px; }
.visual.photo-book .photo-caption { z-index: 7; pointer-events: none; color: #fff; text-shadow: 0 1px 6px #0008; }
.visual.photo-book .photo-expand { z-index: 9; }
.photo-book .house-photo-count { background: #f2f0e9ed; }
.photo-accordion.single-page .photo-page:not(.is-open) { visibility: hidden; pointer-events: none; }
.visual.photo-book .main-photo-full .photo-page.is-open .photo-page-image { object-fit: cover !important; }
.photo-accordion.photo-book-leaving { z-index: 4; pointer-events: none; }
.photo-book-leaving * { pointer-events: none !important; }
/* The existing navigation is the only arrow control, on both mobile and desktop. */
.visual.photo-book .house-photo-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ffffff90; background: #22222299; color: #fff; font-size: 19px; line-height: 1; display: grid; place-items: center; box-shadow: 0 2px 12px #0002; transition: background .2s, border-color .2s; }
.visual.photo-book .house-photo-arrow.previous { left: 14px; }
.visual.photo-book .house-photo-arrow.next { right: 14px; }
.visual.photo-book .house-photo-arrow:hover { background: #222222cc; border-color: #fff; }
@media(max-width:760px) {
  .visual.photo-book .photo-top { padding: 7px 8px; font-size: 7px; letter-spacing: .1em; }
  .visual.photo-book .house-photo-arrow { width: 32px; height: 32px; font-size: 17px; }
  .visual.photo-book .house-photo-arrow.previous { left: 7px; }
  .visual.photo-book .house-photo-arrow.next { right: 7px; }
}
@media(prefers-reduced-motion:reduce) { .photo-accordion .photo-page { transition: none; } }

/* A one-pixel light seam, never a colored gap. */
.photo-page + .photo-page { border-left: 1px solid #222222; box-sizing: border-box; }
.photo-book-leaving .photo-page { transition: none !important; }
.visual.photo-book .photo-expand { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid #ffffff90; background: #22222299; color: #fff; font-size: 22px; line-height: 1; box-shadow: 0 2px 12px #0002; transition: background .2s, border-color .2s; }
.visual.photo-book .photo-expand:hover { background: #222222cc; border-color: #fff; }
.visual.photo-book .photo-top, .visual.photo-book .photo-caption, .photo-book .house-photo-count { background: #22222299; color: #fff !important; border: 1px solid #ffffff50; backdrop-filter: none; box-shadow: 0 2px 12px #0002; text-shadow: 0 1px 3px #0004; }
.visual.photo-book .photo-caption { width: fit-content; padding: 7px 10px; }
@media(max-width:760px) { .visual.photo-book .photo-expand { width: 32px; height: 32px; font-size: 20px; } }

/* Shared neutral controls in the gallery and native full-screen dialog. */
#photoViewer .viewer-prev, #photoViewer .viewer-next { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid #ffffff90; background: #22222299; color: #fff; font-size: 19px; line-height: 1; display: grid; place-items: center; box-shadow: 0 2px 12px #0002; top: calc(50% - 18px); transition: background .2s, border-color .2s; }
#photoViewer .viewer-prev { left: 14px; }
#photoViewer .viewer-next { right: 14px; }
#photoViewer .viewer-prev:hover, #photoViewer .viewer-next:hover { background: #222222cc; border-color: #fff; }
#photoViewer .viewer-prev[hidden], #photoViewer .viewer-next[hidden] { display: none; }
@media(max-width:760px) {
  #photoViewer .viewer-prev, #photoViewer .viewer-next { width: 32px; height: 32px; font-size: 17px; top: calc(50% - 16px); }
  #photoViewer .viewer-prev { left: 7px; }
  #photoViewer .viewer-next { right: 7px; }
}


/* One spacing grid, measured from the upper-left label. */
#photoViewer .viewer-prev { left: 22px; }
#photoViewer .viewer-next { right: 22px; }
@media(max-width:760px) {
  #photoViewer .viewer-prev { left: 13px; }
  #photoViewer .viewer-next { right: 13px; }
}
.visual.photo-book .photo-top,
.visual.photo-book .photo-caption,
.photo-book .house-photo-count,
#photoViewer .viewer-count { border: 0; }
.visual.photo-book .photo-expand,
.visual.photo-book .house-photo-arrow,
#photoViewer .viewer-prev,
#photoViewer .viewer-next { border: 0; border-radius: 0; }
.visual.photo-book { --photo-edge: 22px; --photo-label-height: 36px; }
.visual.photo-book .photo-top,
.visual.photo-book .photo-caption,
.visual.photo-book .house-photo-count {
  box-sizing: border-box;
  height: var(--photo-label-height);
  padding: 0 12px;
  display: block;
  line-height: calc(var(--photo-label-height) - 2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visual.photo-book .photo-top { top: var(--photo-edge); left: var(--photo-edge); }
.visual.photo-book .photo-caption { left: var(--photo-edge); bottom: var(--photo-edge); }
.visual.photo-book .house-photo-count { right: var(--photo-edge); bottom: var(--photo-edge); }
.visual.photo-book .photo-expand { top: var(--photo-edge); right: var(--photo-edge); }
.visual.photo-book .house-photo-arrow.previous { left: var(--photo-edge); }
.visual.photo-book .house-photo-arrow.next { right: var(--photo-edge); }
@media(max-width:760px) {
  .visual.photo-book { --photo-edge: 13px; --photo-label-height: 32px; }
  .visual.photo-book .photo-top,
  .visual.photo-book .photo-caption,
  .visual.photo-book .house-photo-count { padding: 0 9px; }
}

/* Keep text and counters centered in the same gallery labels. */
.visual.photo-book :is(.photo-top, .photo-caption, .house-photo-count, .photo-num, .photo-home-label) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  width: max-content;
  height: var(--photo-label-height);
  padding: 0 var(--photo-label-padding, 12px);
  background: #22222299;
  color: #fff !important;
  font: 500 var(--photo-label-font, 9px)/1 'Gotham Pro', sans-serif !important;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.visual.photo-book .photo-num small { font: inherit; opacity: 1; }
.visual.photo-book :is(.photo-num, .photo-home-bottom) { right: var(--photo-edge); bottom: var(--photo-edge); }
.visual.photo-book .photo-home-top { right: var(--photo-edge); top: var(--photo-edge); }
.visual.photo-book .photo-home-label { position: absolute; z-index: 8; pointer-events: none; }
.visual.photo-book .photo-home-label,
.visual.photo-book.house-photos-active .photo-num,
#main[data-scene] #expandPhoto,
.main[data-scene="0"] .visual.photo-book :is(.photo-num, .house-photo-count) { display: none; }
.main[data-scene="0"] .visual.photo-book .photo-home-label:not(.photo-houses-top, .photo-tub-top, .photo-pool-top, .photo-location-top),
.main[data-scene="1"] .visual.photo-book .photo-houses-top,
.main[data-scene="2"] .visual.photo-book .photo-tub-top,
.main[data-scene="3"] .visual.photo-book .photo-pool-top,
.main[data-scene="4"] .visual.photo-book .photo-location-top { display: inline-flex; }
@media (max-width: 760px) {
  .visual.photo-book { --photo-label-font: 8px; --photo-label-padding: 9px; }
  .visual.photo-book :is(.photo-top, .photo-caption, .house-photo-count, .photo-num, .photo-home-label) { letter-spacing: .1em; }
}

@media (max-width: 760px) {
  #main[data-scene] .info { justify-content: flex-start; padding-top: 8px; }
  #main[data-scene] .title-composition, #main[data-scene="1"] .info:has(#housePicker.show) .title-composition { margin-top: 0; }
}
@media (hover: none) and (pointer: coarse) {
  .tub-picker .tub-choice:not(.active):hover { transform: none; border-color: #d5d9d0 !important; }
  .tub-picker .tub-choice:focus:not(:focus-visible) { outline: none; }
}
