/* xyz-page.css — property page overrides.
   Tokens live on html:has(body.page-xyz) so html + body share one surface.
   Dark mode only reassigns tokens; shared selectors pick them up. */
:root {
    --font-sans: var(--cc-font-sans);
    --font-serif: var(--cc-font-serif);
    --cc-accent: var(--cc-color-primary-muted);
    --cc-heading: var(--cc-color-primary-muted);
}

html:has(body.page-xyz) {
    --cc-dark-bg: #1f3344;
    --cc-dark-surface: #243f56;
    --cc-dark-card: #2b4358;
    --cc-dark-chip: #334d64;
    --cc-dark-text: #eef3f8;
    --hero-card-surface: #b4c3cf;
    --hero-card-border: #95a8b6;
    --hero-card-width: min(340px, 30vw);
    --site-header-band-height: 56px;

    --page-surface: #f3f6f8;
    --gallery-gutter-surface: #e3eaf0;
    --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.22 0 0 0 0 0.28 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --hero-bg: var(--page-surface);
    --hero-surface: var(--page-surface);
    --light-gray: var(--page-surface);
    --background-color: var(--page-surface);
    --xyz-content-inline-start: calc(clamp(64px, 7.5vw, 100px) + 8px);

    --xyz-text: #1e2f3c;
    --xyz-heading: #1a3348;
    --xyz-muted: #3a4f5e;
    --xyz-inline-details: #5a6570;
    --xyz-link: #315b78;
    --xyz-link-hover: #1a3348;
    --xyz-quote: #2a3744;
    --xyz-guest-quote: #435966;
    --xyz-nav: #1a3348;
    --xyz-border: rgba(36, 55, 70, 0.14);
    --xyz-border-strong: rgba(36, 55, 70, 0.22);
    --xyz-card: rgba(255, 255, 255, 0.45);
    --xyz-card-border: rgba(36, 55, 70, 0.14);
    --xyz-platform-bg: #ffffff;
    --xyz-faq-toggle: rgba(36, 55, 70, 0.62);
    --xyz-contact-label: #435966;
    --xyz-contact-link: #1a3348;
    --xyz-contact-hover: #0f2435;
    --xyz-contact-sub: #3a4f5e;
    --xyz-review-name: #1e2f3c;
    --xyz-review-body: #1e2f3c;
    --xyz-platform-text: #315b78;
    --text-color: var(--xyz-heading);

    background-color: var(--page-surface);
    background-image: var(--paper-grain);
    background-size: 160px 160px;
    background-repeat: repeat;
}

body.page-xyz {
    background-color: var(--page-surface);
    background-image: var(--paper-grain);
    background-size: 160px 160px;
    background-repeat: repeat;
    color: var(--xyz-heading);
}

body.page-xyz::before,
body.page-xyz::after {
    display: none;
}

body.page-xyz #main-content,
body.page-xyz .house-detail-container,
body.page-xyz .below-hero-surface,
body.page-xyz .site-footer {
    background-color: var(--page-surface);
    background-image: var(--paper-grain);
    background-size: 160px 160px;
    background-repeat: repeat;
}

body.page-xyz header.site-header .back-button,
body.page-xyz.nav-dark header.site-header .back-button {
    color: var(--xyz-nav);
}

body.page-xyz .hamburger-menu span,
body.page-xyz .hamburger-menu.active span,
body.page-xyz.nav-dark .hamburger-menu span,
body.page-xyz.nav-dark .hamburger-menu.active span {
    background-color: var(--xyz-nav);
}

/* ── Photo gallery — base ──────────────────────────────────────── */
/* !important: beats .gallery-widget-section background in xyz-optimized.css */
#photo-gallery {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--hero-surface) !important;
    /* Override xyz-optimized full-viewport first "page" */
    min-height: 0;
    height: auto;
    align-content: start;
}

/* Clear fixed header + a little air above the gallery. */
@media (max-width: 1199px) {
    #photo-gallery {
        align-content: start;
        padding-top: calc(
            env(safe-area-inset-top, 0px) + var(--site-header-band-height, 56px) + clamp(6px, 1.2vh, 12px)
        );
    }
}

#photo-gallery>* {
    position: relative;
    z-index: 1;
}

#photo-gallery .index-hero-frame {
    border: 0;
    background: transparent;
    padding: 0;
    overflow: visible;
    margin-left: 0;
    margin-right: auto;
}

#photo-gallery .photo-gallery-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
}

#photo-gallery .gallery-main {
    background: var(--hero-surface);
    max-height: none;
    aspect-ratio: 3 / 2;
    border-radius: 0;
    width: 100%;
}

#photo-gallery .gallery-main img {
    border-radius: 0;
}

/*
  Double-ID beats xyz-optimized; also functions as the mosaic's inline prev/next
  (cycles the main tile photo) — always visible since phones have no :hover.
*/
#photo-gallery #galPrev,
#photo-gallery #galNext {
    position: absolute;
    align-items: center;
    background: rgba(16, 24, 32, 0.5);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0;
    height: 34px;
    justify-content: center;
    line-height: 1;
    opacity: 0.82;
    padding: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background-color 0.2s ease;
    width: 34px;
    z-index: 20;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#photo-gallery #galPrev svg,
#photo-gallery #galNext svg {
    flex-shrink: 0;
    height: 16px;
    width: 16px;
}

#photo-gallery #galPrev {
    left: 16px;
    right: auto;
}

#photo-gallery #galNext {
    right: 16px;
    left: auto;
}

/* Mosaic (non-fullscreen): clip collage; arrow insets sync to main tile via JS. */
@media (min-width: 769px) {
    #photo-gallery .photo-gallery-container:not(.gallery-fullscreen) {
        overflow: hidden;
        border-radius: 16px 16px 0 0;
    }
}

#photo-gallery .photo-gallery-container:hover #galPrev,
#photo-gallery .photo-gallery-container:hover #galNext,
#photo-gallery .photo-gallery-container:focus-within #galPrev,
#photo-gallery .photo-gallery-container:focus-within #galNext {
    opacity: 1;
}

#photo-gallery #galPrev:hover,
#photo-gallery #galNext:hover,
#photo-gallery #galPrev:focus-visible,
#photo-gallery #galNext:focus-visible,
#photo-gallery #galPrev:active,
#photo-gallery #galNext:active {
    background: rgba(16, 24, 32, 0.8);
    outline: none;
}

#photo-gallery #galPrev[hidden],
#photo-gallery #galNext[hidden] {
    display: none;
}

/* Base body baseline for all breakpoints */
body {
    font-size: 16px;
    line-height: 1.6;
}

/* Small laptop overrides */
@media (min-width: 1024px) and (max-width: 1366px) {
    .hero-inline-row {
        gap: 8px;
    }
}

/* Non-phone: tuck gallery toward the left edge (with arrows). */
@media (min-width: 769px) {
    #photo-gallery {
        justify-content: start;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    #photo-gallery {
        padding-left: clamp(20px, 4vw, 34px);
        padding-right: clamp(20px, 4vw, 34px);
    }

    .description-content p,
    .location-description p,
    .faq-answer p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

.hero-inline-row {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-inline-details {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--xyz-inline-details);
    letter-spacing: 0.015em;
    margin: 0;
    flex: 0 0 auto;
}

.description-title-meta {
    display: none;
}

/* Retired hero chrome (markup may remain). */
.hero-card-footer,
.hero-badges {
    display: none;
}

/* Name / subtitle / tags: phone uses .hero-phone-title; ≥769px uses desktop title. */
.hero-desktop-title,
.hero-desktop-subtitle,
.hero-tags,
.hero-rating-line {
    display: none;
}

/* Tablet + desktop: title sits under the header; spare height falls below. */
@media (min-width: 769px) {
    #photo-gallery {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        min-height: 100dvh;
        height: auto;
        box-sizing: border-box;
        padding-bottom: clamp(24px, 4vh, 48px);
    }

    #photo-gallery .index-hero-frame {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    #photo-gallery .photo-gallery-container {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        height: auto;
        width: 100%;
    }

    #photo-gallery .hero-mosaic {
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        max-height: min(72vh, 720px);
        aspect-ratio: 16 / 10;
    }

    #photo-gallery .hero-mosaic-caption {
        padding: 0 0 clamp(10px, 1.4vw, 16px);
    }
}

.hero-guest-quote {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 1.15vw, 1rem);
    line-height: 1.55;
    color: var(--xyz-guest-quote);
    font-style: italic;
    max-width: 42ch;
    margin: 8px 0 0;
}

#photo-gallery .hero-title-card .hero-inline-details {
    margin: 0;
}

#photo-gallery .hero-title-card .hero-guest-quote:not([hidden]) {
    display: block;
}

.hero-inline-row .hero-reserve-btn {
    margin-left: clamp(28px, 4.5vw, 72px);
}

#photo-gallery .hero-reserve-btn {
    display: none;
}

#photo-gallery .hero-title-card {
    margin-top: 0;
    position: relative;
    z-index: calc(var(--z-gallery-nav, 5) + 1);
}

/* Phone card title is shown only in the ≤768px block below. */
#photo-gallery .hero-title-card .hero-phone-title {
    display: none;
}

.hero-phone-title-row {
    display: none;
}

.hero-phone-title,
.hero-desktop-title {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

#photo-gallery .hero-title-card .hero-phone-title,
#photo-gallery .hero-title-card .hero-desktop-title {
    color: var(--xyz-heading);
}

.house-detail-container {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.house-detail-container h2,
.house-detail-container h3 {
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--cc-heading);
}

.house-detail-container h2 {
    font-size: clamp(1.02rem, 1.18vw, 1.2rem);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(200, 215, 230, 0.35);
}

.house-detail-container h3 {
    font-size: 0.92rem;
}

/* About — same surface and padding rhythm as Amenities / other house sections */
#description.description-section {
    padding-top: 0;
    padding-bottom: 0;
    display: block;
    align-items: stretch;
    background-color: var(--light-gray);
}

#description.description-section .section-content {
    display: block;
    padding-top: 0;
    padding-bottom: 0;
}

#description .description-content {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    max-width: none;
    width: 100%;
}

#description .description-content > p:first-of-type {
    margin-top: 0;
}

#description .description-content > p .description-property-name {
    font-family: var(--font-serif);
    font-size: 1.14em;
    font-weight: 500;
    letter-spacing: 0;
    color: inherit;
}

.description-content p,
.location-description p,
.location-description,
.faq-answer p,
.amenities-grid,
.amenity-item,
.contact-link,
.contact-sub {
    font-family: var(--font-sans);
    color: var(--xyz-text);
    font-size: 0.9375rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
    margin-top: 0;
}

.faq-question {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    padding: 12px 4px;
    color: var(--xyz-heading);
    font-weight: 500;
}

.faq-answer,
.faq-answer p {
    font-weight: 400;
}

/* Same specificity as xyz-optimized.css; later source order wins. */
#additional-services .faq-question::before {
    color: #60a5fa;
}

/* Amenity list — tighter vertical rhythm than xyz-optimized bundle */
#amenities .amenities-grid,
#amenities .amenities-grid-expanded {
    row-gap: 5px;
    column-gap: 26px;
}

#amenities .amenity-item,
#amenities .amenities-grid-expanded .amenity-item {
    padding: 0;
    line-height: 1.28;
}

/* Section spacing — tighter, consistent */
.house-section {
    padding: 28px 0;
}

#amenities-location-section {
    padding-top: 8px;
    padding-bottom: 0;
}

.gallery-widget-section {
    padding: 0;
}

.page-layout {
    margin-top: 0;
    padding-top: 0;
}
.page-layout__content {
    margin-top: 0;
    padding-top: 0;
}

body.page-xyz .page-layout__content > .hero-inline-details {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    font-family: var(--font-sans);
    font-size: clamp(0.8125rem, 1.05vw, 0.9375rem);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.015em;
    color: var(--xyz-inline-details);
}

/* Reviews — body text slightly smaller & darker than house copy */
.reviews-section .review-content p {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: var(--xyz-review-body);
    font-weight: 400;
}

body.page-xyz .reviews-hero-quote {
    flex: 0 0 100%;
    width: 100%;
    order: 3;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: normal;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--xyz-quote);
    text-align: left;
    text-shadow: none;
    quotes: none;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
    text-wrap: pretty;
    align-self: flex-start;
    justify-self: start;
}

body.page-xyz .reviews-hero-quote.reviews-hero-quote--short {
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
}

body.page-xyz .reviews-hero-quote.reviews-hero-quote--medium {
    font-size: clamp(1.35rem, 2.8vw, 1.95rem);
}

body.page-xyz .reviews-hero-quote.reviews-hero-quote--long {
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
}

body.page-xyz .reviews-hero-quote.reviews-hero-quote--xlong {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.4;
}

body.page-xyz .reviews-summary {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 0 8px;
    margin-bottom: 20px;
    text-align: left;
}

body.page-xyz .reviews-summary .rating-overview {
    order: 1;
}

body.page-xyz .reviews-summary .review-platforms {
    order: 2;
}

.rating-number {
    font-family: var(--font-serif);
    font-size: clamp(52px, 5.5vw, 58px);
    font-weight: 500;
    color: var(--xyz-heading);
}

.reviewer-name {
    font-size: 0.935rem;
}

.review-date {
    font-size: 12px;
}

/* Contact section — compact phone + email only (no inquiry form) */
#contact.contact-section {
    padding-top: 8px;
    padding-bottom: 48px;
    margin-bottom: 0;
}

#contact .section-content > h2 {
    margin-bottom: 18px;
}

#contact .contact-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 0;
    max-width: 560px;
}

#contact .contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#contact .contact-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--xyz-contact-label);
}

#contact .contact-link,
#contact .contact-sub {
    font-family: var(--font-serif);
}

#contact .contact-phone-link {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Beats xyz-optimized.css .contact-link { font-size: … !important }. */
#contact .contact-link {
    color: var(--xyz-contact-link);
    font-weight: 500;
    font-size: 1.05rem !important;
    text-decoration: none;
    line-height: 1.35;
}

#contact .contact-link:hover {
    color: var(--xyz-contact-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#contact .contact-sub {
    color: var(--xyz-contact-sub);
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.4;
}

#contact .contact-mobile-reserve {
    display: none;
}

@media (min-width: 768px) {
    #contact .contact-card {
        flex-direction: row;
        gap: 48px;
        align-items: flex-start;
    }

    #contact .contact-item {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Review platform links */
.platform-link {
    font-size: 0.85rem;
    padding: 10px 16px;
}

/* Airbnb mark on dynamic review cards (images/logo/airbnb.png) */
.review-source-airbnb-logo {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Review show more — italic underline style, standard grey */
.reviews-section .view-all-reviews,
.reviews-section #showMoreReviews {
    background: none;
    border: none;
    color: var(--xyz-link);
    text-decoration: underline;
    font-style: italic;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 5px 10px;
    box-shadow: none;
    cursor: pointer;
    border-radius: 0;
}

.reviews-section .view-all-reviews:hover,
.reviews-section #showMoreReviews:hover {
    color: var(--xyz-link-hover);
    text-decoration: none;
    background: none;
}

/* Sidebar price note */
.sidebar-price-note {
    font-size: 11px;
}

.hero-reserve-btn {
    background: #587b9f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 24px;
    min-height: 44px;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}

.hero-reserve-btn:hover {
    background: #6286aa;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.hero-reserve-btn:active {
    background: #587b9f;
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-reserve-btn:focus-visible {
    outline: 2px solid rgba(74, 111, 138, 0.85);
    outline-offset: 2px;
    box-shadow: none;
}

@media (min-width: 769px) {
    .hero-reserve-btn {
        font-size: clamp(0.82rem, 1.05vw, 0.9rem);
        padding: 10px 20px;
        min-height: 40px;
    }
}

/* Location Show More/Less matches The house Read More style */
#locationReadMore,
#locationReadLess {
    background: none;
    color: var(--xyz-link);
    border: none;
    text-decoration: underline;
    font-style: italic;
    font-weight: 500;
    padding: 5px 10px;
    width: fit-content;
    box-shadow: none;
    cursor: pointer;
    display: block;
    margin: 15px auto 0;
    font-size: 0.9rem;
}

#locationReadMore:hover,
#locationReadLess:hover {
    color: var(--xyz-link-hover);
    text-decoration: none;
}

/* Area photos carousel — one image + arrows (above the map) */
.location-area-gallery {
    margin: 0 0 18px;
    width: 100%;
}

.location-area-gallery__frame {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 2px 12px rgba(15, 35, 55, 0.12);
    border: 0;
    background: #eef2f6;
}

.location-area-gallery__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 768px) {
    .location-area-gallery__frame {
        aspect-ratio: 16 / 9;
    }
}

.location-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(15, 35, 55, 0.18);
    color: #1f3344;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
}

.location-gallery-nav:hover {
    background: #fff;
    color: #0f2435;
}

.location-gallery-nav:focus-visible {
    outline: 2px solid #4a6f8a;
    outline-offset: 2px;
}

.location-gallery-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.location-gallery-nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

.location-gallery-nav--prev {
    left: max(8px, env(safe-area-inset-left, 0px));
}

.location-gallery-nav--next {
    right: max(8px, env(safe-area-inset-right, 0px));
}

.location-gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(15, 30, 45, 0.55);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
}

/* Map loads only after "Show More"; first block inside expanded area */
#location-more .location-map-wrap {
    margin: 0 0 18px;
}

/*
  Fullscreen gallery — selectors MUST NOT require #photo-gallery.
  Entering fullscreen re-parents .photo-gallery-container onto document.body, so any
  #photo-gallery .gallery-fullscreen rule stops matching and the UI breaks.
*/
.photo-gallery-container.gallery-fullscreen .hero-mosaic,
html.gallery-is-fullscreen #photo-gallery .hero-mosaic-caption,
html.gallery-is-fullscreen #photo-gallery .hero-title-card {
    display: none !important;
}

.photo-gallery-container.gallery-fullscreen .gallery-main {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
    flex: 1 1 auto !important;
}

/* Prefer dynamic viewport height on mobile browsers (address bar). */
.photo-gallery-container.gallery-fullscreen {
    height: 100dvh !important;
    max-height: 100dvh !important;
}

.photo-gallery-container.gallery-fullscreen > #galPrev,
.photo-gallery-container.gallery-fullscreen > #galNext,
.photo-gallery-container.gallery-fullscreen .gallery-counter,
.photo-gallery-container.gallery-fullscreen .gallery-fullscreen-btn {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    z-index: 40;
}

/*
  !important here: the base #photo-gallery #galPrev/#galNext rule (2 ID selectors)
  otherwise outranks these class-only selectors regardless of order, since ID count
  always wins over class count in CSS specificity.
*/
.photo-gallery-container.gallery-fullscreen .gallery-nav.gallery-nav--prev {
    left: max(16px, env(safe-area-inset-left, 0px)) !important;
    right: auto !important;
}

.photo-gallery-container.gallery-fullscreen .gallery-nav.gallery-nav--next {
    right: max(16px, env(safe-area-inset-right, 0px)) !important;
    left: auto !important;
}

.photo-gallery-container.gallery-fullscreen .gallery-nav.gallery-nav--prev,
.photo-gallery-container.gallery-fullscreen .gallery-nav.gallery-nav--next {
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
}

/* Phones: first screen = gallery + title + persons line; scroll for the rest. */
@media (max-width: 768px) {
    body.page-xyz {
        --site-header-band-height: 48px;
    }

    #photo-gallery {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        box-sizing: border-box;
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--site-header-band-height) + 4px);
        height: auto;
        min-height: 0;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    #photo-gallery > .index-hero-frame {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #photo-gallery .index-hero-frame {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        border: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        overflow: hidden;
        box-shadow: none;
    }

    #photo-gallery .photo-gallery-container {
        position: relative;
        flex: 0 0 auto;
        min-height: 0;
        max-width: none;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }

    #photo-gallery .gallery-main {
        position: relative;
        flex: 1 1 auto;
        aspect-ratio: unset;
        width: 100%;
        height: auto;
        min-height: 220px;
        max-height: none;
        border-radius: 0;
        overflow: hidden;
    }

    #photo-gallery .gallery-main img {
        object-position: center 35%;
        border-radius: inherit;
        transition: none;
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    #photo-gallery .gallery-main::after {
        display: none;
    }

    #photo-gallery .hero-mosaic-caption {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }

    #photo-gallery .hero-mosaic-caption .hero-desktop-title {
        font-size: clamp(1.05rem, 4.2vw, 1.2rem);
    }

    /* Mosaic arrows off on phones — tap the collage to open fullscreen. */
    #photo-gallery .photo-gallery-container:not(.gallery-fullscreen) #galPrev,
    #photo-gallery .photo-gallery-container:not(.gallery-fullscreen) #galNext {
        display: none !important;
    }

    #photo-gallery::after {
        display: none;
    }

    /* Phone fullscreen chrome (no #photo-gallery — container is on body). */
    .photo-gallery-container.gallery-fullscreen #galPrev.gallery-nav--prev,
    .photo-gallery-container.gallery-fullscreen #galNext.gallery-nav--next {
        background: rgba(16, 24, 32, 0.28) !important;
        border: 1px solid rgba(255, 255, 255, 0.35) !important;
        display: inline-flex !important;
        height: 36px !important;
        opacity: 0.85;
        width: 36px !important;
        z-index: 40 !important;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .photo-gallery-container.gallery-fullscreen #galPrev.gallery-nav--prev {
        left: max(8px, env(safe-area-inset-left, 0px)) !important;
    }

    .photo-gallery-container.gallery-fullscreen #galNext.gallery-nav--next {
        right: max(8px, env(safe-area-inset-right, 0px)) !important;
    }

    .photo-gallery-container.gallery-fullscreen #galPrev.gallery-nav--prev svg,
    .photo-gallery-container.gallery-fullscreen #galNext.gallery-nav--next svg {
        height: 16px !important;
        opacity: 0.95;
        width: 16px !important;
    }

    .photo-gallery-container.gallery-fullscreen #galPrev:active,
    .photo-gallery-container.gallery-fullscreen #galNext:active,
    .photo-gallery-container.gallery-fullscreen #galPrev:focus-visible,
    .photo-gallery-container.gallery-fullscreen #galNext:focus-visible {
        background: rgba(16, 24, 32, 0.48) !important;
        opacity: 1;
    }

    .photo-gallery-container.gallery-fullscreen .gallery-counter {
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        left: max(10px, env(safe-area-inset-left, 0px));
        padding: 5px 10px;
        font-size: 12px;
        background: rgba(15, 30, 45, 0.62);
        z-index: 40;
        pointer-events: auto;
    }

    .photo-gallery-container.gallery-fullscreen .gallery-fullscreen-btn {
        width: 44px;
        height: 44px;
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        background: rgba(15, 30, 45, 0.48);
        border: 1px solid rgba(255, 255, 255, 0.45);
        z-index: 40;
        pointer-events: auto;
    }

    .photo-gallery-container.gallery-fullscreen .gallery-fullscreen-btn svg {
        width: 18px;
        height: 18px;
    }

    .photo-gallery-container.gallery-fullscreen .gallery-close {
        top: max(12px, env(safe-area-inset-top, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        z-index: 40;
    }

    #photo-gallery .hero-guest-quote {
        font-size: 0.92rem;
        line-height: 1.55;
        color: #1a1a1a;
        max-width: none;
    }

    #description.description-section {
        padding-top: 0;
        padding-bottom: 0;
    }

    #description .description-content > p:first-of-type {
        scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .description-content p,
    .location-description p {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    /* Clearance for the fixed book button. */
    .house-detail-container {
        scroll-padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    /* Match hero title card inset so copy lines up with the name */
    body.page-xyz .page-layout__content .section-content,
    body.page-xyz .page-layout__content .faq-two-column .section-content {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    /*
      Phone "Select Dates" — mirror index.html hero date widget
      (white bar + pill field + yellow search control).
    */
    body.page-xyz .mobile-floating-dates-btn.mobile-floating-dates-btn--home {
        --home-widget-control-height-sm: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        width: min(calc(100vw - 32px), 420px);
        min-width: 0;
        min-height: 0;
        padding: 7px 9px;
        border-radius: 20px;
        border: 1px solid rgba(31, 51, 68, 0.1);
        background: #ffffff;
        background-image: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        color: #444444;
        font-weight: 400;
        letter-spacing: 0.01em;
        box-shadow: 0 6px 18px rgba(15, 35, 55, 0.12);
    }

    body.page-xyz .mobile-floating-dates-btn--property.mobile-floating-dates-btn--home {
        --home-widget-control-height-sm: 44px;
        gap: 3px;
        padding: 8px 9px;
        align-items: stretch;
        width: min(calc(100vw - 24px), 440px);
    }

    body.page-xyz .mobile-floating-dates-btn--home .mobile-floating-dates-btn__field {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        flex: 1 1 auto;
        min-width: 0;
        height: auto;
        min-height: var(--home-widget-control-height-sm);
        padding: 6px 12px;
        border: 1px solid #e0e0e0;
        border-radius: 999px;
        background-color: #ffffff;
        box-sizing: border-box;
    }

    body.page-xyz .mobile-floating-dates-btn--property .mobile-floating-dates-btn__field {
        background-image: none;
        padding: 7px 14px;
    }

    body.page-xyz .mobile-floating-dates-btn--property .mobile-floating-dates-btn__dates {
        font-size: 14px;
    }

    body.page-xyz .mobile-floating-dates-btn--property .mobile-floating-dates-btn__price {
        font-size: 13px;
    }

    body.page-xyz .mobile-floating-dates-btn--home:not(.mobile-floating-dates-btn--property) .mobile-floating-dates-btn__field {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        height: var(--home-widget-control-height-sm);
        padding: 0 34px 0 12px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
        background-repeat: no-repeat;
        background-position: calc(100% - 12px) center;
        background-size: 14px;
    }

    body.page-xyz .mobile-floating-dates-btn__dates,
    body.page-xyz .mobile-floating-dates-btn--home .mobile-floating-dates-btn__label {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        color: #3a424c;
        font-family: var(--cc-font-sans, Inter, sans-serif);
        font-size: 13px;
        font-weight: 400;
        letter-spacing: 0.01em;
        line-height: 1.2;
        text-align: left;
    }

    body.page-xyz .mobile-floating-dates-btn--home:not(.mobile-floating-dates-btn--property) .mobile-floating-dates-btn__label {
        text-align: center;
    }

    body.page-xyz .mobile-floating-dates-btn--property:not(.has-dates-selected) .mobile-floating-dates-btn__field {
        align-items: center;
    }

    body.page-xyz .mobile-floating-dates-btn--property:not(.has-dates-selected) .mobile-floating-dates-btn__dates {
        color: #c9a0e0;
        font-style: italic;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 2px;
        text-align: center;
    }

    body.page-xyz .mobile-floating-dates-btn__price {
        display: block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #5da87d;
        font-family: var(--cc-font-sans, Inter, sans-serif);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        text-align: left;
    }

    body.page-xyz .mobile-floating-dates-btn__price[hidden] {
        display: none;
    }

    body.page-xyz .mobile-floating-dates-btn--home .mobile-floating-dates-btn__action,
    body.page-xyz .mobile-floating-dates-btn--home .mobile-floating-dates-btn__search {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: var(--home-widget-control-height-sm);
        height: var(--home-widget-control-height-sm);
        padding: 0 16px;
        border: 1px solid rgba(31, 51, 68, 0.12);
        border-radius: 999px;
        background: #ffcc00;
        background-image: none;
        box-shadow: 0 2px 6px rgba(15, 35, 55, 0.1);
        font-family: var(--cc-font-sans, Inter, sans-serif);
        font-size: 13px;
        font-weight: 600;
        color: #333;
        letter-spacing: 0.02em;
        line-height: 1;
    }

    body.page-xyz .mobile-floating-dates-btn--property .mobile-floating-dates-btn__action {
        min-width: 88px;
        padding: 0 28px;
        align-self: stretch;
        height: auto;
        min-height: var(--home-widget-control-height-sm);
        font-size: 15px;
    }

    body.page-xyz .mobile-floating-dates-btn--property .mobile-floating-dates-btn__action[hidden] {
        display: none;
    }

    body.page-xyz .mobile-floating-dates-btn--home:not(.mobile-floating-dates-btn--property) .mobile-floating-dates-btn__search {
        width: var(--home-widget-control-height-sm);
        min-width: var(--home-widget-control-height-sm);
        padding: 0;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 14px;
    }

    body.page-xyz .mobile-floating-dates-btn--home:hover,
    body.page-xyz .mobile-floating-dates-btn--home:focus-visible {
        background: #ffffff;
        background-image: none;
        border-color: rgba(31, 51, 68, 0.14);
        box-shadow: 0 8px 22px rgba(15, 35, 55, 0.14);
    }

    body.page-xyz .mobile-floating-dates-btn--home:focus-visible {
        outline: none;
        box-shadow:
            0 0 0 3px rgba(255, 204, 0, 0.45),
            0 6px 18px rgba(15, 35, 55, 0.12);
    }

    body.page-xyz .mobile-floating-dates-btn--home:active {
        transform: translateX(-50%) scale(0.99);
        background: #ffffff;
        background-image: none;
        box-shadow: 0 3px 10px rgba(15, 35, 55, 0.1);
    }

    body.page-xyz .mobile-floating-dates-btn--home:active .mobile-floating-dates-btn__action,
    body.page-xyz .mobile-floating-dates-btn--home:active .mobile-floating-dates-btn__search {
        background-color: #f5c400;
    }

    body.page-xyz .mobile-floating-dates-btn--home:hover .mobile-floating-dates-btn__field,
    body.page-xyz .mobile-floating-dates-btn--home:focus-visible .mobile-floating-dates-btn__field {
        border-color: #ccc;
        background-color: #fafafa;
    }

    /* Phone calendar sheet: match floating widget (lilac pick dates / yellow checkout) */
    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn {
        width: 100%;
        margin-top: 16px;
        padding: 12px 18px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.02em;
        line-height: 1.2;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
        filter: none;
    }

    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn.sidebar-book-btn--pick-dates:disabled {
        background: transparent;
        border: none;
        color: #c9a0e0;
        font-style: italic;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 2px;
        opacity: 1;
        cursor: default;
    }

    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn.sidebar-book-btn--quote-pending:disabled {
        background: transparent;
        border: none;
        color: #737373;
        font-style: normal;
        font-weight: 500;
        text-decoration: none;
        opacity: 1;
        cursor: default;
    }

    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn[data-checkout-ready="true"] {
        background: #ffcc00;
        border: 1px solid rgba(31, 51, 68, 0.12);
        color: #333;
        font-style: normal;
        font-weight: 600;
        text-decoration: none;
        box-shadow: 0 2px 6px rgba(15, 35, 55, 0.1);
    }

    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn[data-checkout-ready="true"]:active {
        background: #f5c400;
        transform: none;
        filter: none;
    }

    body.page-xyz .sidebar-calendar-widget .sidebar-book-btn[data-checkout-ready="true"]:hover {
        background: #ffcc00;
        filter: none;
        transform: none;
        box-shadow: 0 2px 6px rgba(15, 35, 55, 0.1);
    }

    /* Reserve sheet: force the booking calendar on-screen above the dimmer */
    body.page-xyz.reserve-spotlight-active .page-layout__sidebar {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 2100 !important;
        background: transparent !important;
        pointer-events: auto !important;
    }

    body.page-xyz.reserve-spotlight-active .sidebar-calendar-widget {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: none !important;
        max-height: min(90dvh, 720px) !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        background-color: #ffffff !important;
        box-shadow: 0 -8px 32px rgba(15, 35, 55, 0.18) !important;
        padding: 18px 16px max(16px, env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        z-index: 2101 !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-sizing: border-box !important;
    }

    body.page-xyz.reserve-spotlight-active .sidebar-calendar-widget .flatpickr-calendar {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        box-shadow: none !important;
    }

    /* .house-detail-container h2/h3 sizing at this breakpoint is already set (identical
       values, higher specificity) by site-mobile-refine.css, which loads after this file. */
}

@media (min-width: 769px) and (max-width: 1024px) {
    #photo-gallery {
        align-items: flex-start;
        padding-left: clamp(20px, 4vw, 34px);
        padding-right: clamp(20px, 4vw, 34px);
        box-sizing: border-box;
    }

    #photo-gallery .hero-mosaic-caption,
    #photo-gallery .index-hero-frame {
        width: min(100%, 820px);
        max-width: 100%;
        margin-left: 0;
        margin-right: auto;
    }

    #photo-gallery .index-hero-frame {
        align-self: flex-start;
    }

    /* Slightly smaller collage so title + gallery feel balanced on tablet. */
    #photo-gallery .hero-mosaic {
        max-height: min(62vh, 600px);
        aspect-ratio: 16 / 10;
    }

    #photo-gallery .hero-mosaic-caption {
        padding-bottom: clamp(14px, 2.2vw, 20px);
    }

    .page-layout {
        flex-direction: column;
        gap: 28px;
        padding: 0 clamp(20px, 4vw, 34px) 24px;
    }

    .page-layout__content {
        max-width: 100%;
        width: 100%;
    }

    .page-layout__sidebar {
        display: block;
        width: min(100%, 620px);
        margin: 0 auto;
    }

    .sidebar-calendar-widget {
        position: relative;
        top: auto;
        padding: 18px 18px 16px;
    }

    .sidebar-calendar-widget .flatpickr-calendar {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-calendar-widget .flatpickr-days,
    .sidebar-calendar-widget .flatpickr-innerContainer,
    .sidebar-calendar-widget .flatpickr-rContainer {
        width: 100%;
        max-width: 100%;
    }

    .sidebar-calendar-widget .dayContainer {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        justify-content: space-between;
    }

    .sidebar-calendar-widget .flatpickr-day {
        width: calc((100% - 12px) / 7);
        max-width: none;
        margin: 0 0 2px;
    }

    .hero-inline-row {
        flex-wrap: wrap;
        row-gap: 10px;
    }
}

/*
  Desktop: wide collage centered in first viewport; calendar sits in page-layout below.
*/
@media (min-width: 1024px) {
    #photo-gallery {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        max-width: 1340px;
        min-height: 100dvh;
        height: auto;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
        padding-left: var(--xyz-content-inline-start);
        padding-right: clamp(48px, 6vw, 88px);
        position: relative;
        padding-top: calc(
            env(safe-area-inset-top, 0px) + var(--site-header-band-height, 56px) + clamp(8px, 1.5vh, 16px)
        );
        padding-bottom: clamp(32px, 5vh, 56px);
    }

    /* Left edge matches .page-layout__content below; wider than text column for a larger hero image. */
    #photo-gallery .hero-mosaic-caption,
    #photo-gallery .index-hero-frame {
        width: min(100%, 920px);
        max-width: 100%;
        margin-left: 0;
        margin-right: auto;
    }

    #photo-gallery .index-hero-frame {
        flex: 0 0 auto;
        height: auto;
        max-height: none;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-self: flex-start;
    }

    #photo-gallery .photo-gallery-container {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: none;
        min-height: 0;
        margin: 0;
        align-self: stretch;
    }

    #photo-gallery .hero-mosaic {
        flex: 0 0 auto;
        height: auto;
        max-height: min(66vh, 620px);
        aspect-ratio: 16 / 10;
    }

    #photo-gallery .gallery-main {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: unset;
        height: auto;
        max-height: none;
        min-height: 0;
        margin: 0;
        align-self: stretch;
    }

    #photo-gallery .gallery-main img {
        display: block;
        height: 100%;
        min-height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center center;
    }

    #photo-gallery .hero-title-card {
        width: 100%;
        max-width: none;
        flex: 0 0 auto;
        box-sizing: border-box;
    }
}
/* Gallery surface: xyz-optimized paints .gallery-widget-section with !important. */
body.page-xyz #photo-gallery.gallery-widget-section {
    background-color: var(--page-surface) !important;
    background-image: var(--paper-grain) !important;
    background-size: 160px 160px !important;
    background-repeat: repeat !important;
    box-shadow: none;
    clip-path: none;
}

body.page-xyz #photo-gallery .index-hero-frame,
body.page-xyz #photo-gallery .photo-gallery-container {
    background-color: var(--page-surface);
    background-image: var(--paper-grain);
    background-size: 160px 160px;
    background-repeat: repeat;
}

body.page-xyz #photo-gallery .gallery-main {
    background-color: var(--page-surface);
    background-image: none;
}

@media (min-width: 769px) {
    body.page-xyz #photo-gallery.gallery-widget-section {
        background-color: var(--gallery-gutter-surface) !important;
    }

    body.page-xyz #photo-gallery .index-hero-frame,
    body.page-xyz #photo-gallery .photo-gallery-container,
    body.page-xyz #photo-gallery .gallery-main {
        background-color: var(--gallery-gutter-surface);
    }
}

body.page-xyz .sidebar-calendar-widget {
    background-color: #ffffff;
}

/* Body copy inherits --xyz-text; sections that use --light-gray pick up --page-surface. */
body.page-xyz .house-detail-container,
body.page-xyz .house-detail-container p,
body.page-xyz .house-detail-container li,
body.page-xyz .house-detail-container .faq-question,
body.page-xyz .house-detail-container .amenity-item,
body.page-xyz .house-detail-container .rating-overview .rating-count,
body.page-xyz .house-detail-container .rating-overview .category-name,
body.page-xyz .house-detail-container .rating-overview .category-score {
    color: var(--xyz-text);
}

body.page-xyz .house-detail-container h2:not(.hero-desktop-title),
body.page-xyz .house-detail-container h3 {
    color: var(--xyz-heading);
    border-bottom-color: var(--xyz-border-strong);
}

body.page-xyz .page-layout a,
body.page-xyz .reviews-section .view-all-reviews,
body.page-xyz .reviews-section #showMoreReviews,
body.page-xyz #locationReadMore,
body.page-xyz #locationReadLess {
    color: var(--xyz-link);
}

body.page-xyz .reviews-section .view-all-reviews:hover,
body.page-xyz .reviews-section #showMoreReviews:hover,
body.page-xyz #locationReadMore:hover,
body.page-xyz #locationReadLess:hover {
    color: var(--xyz-link-hover);
}

/* :not(.hero-mosaic-caption) kept for legacy; mosaic caption now sits above the gallery. */
body.page-xyz #photo-gallery .hero-title-card:not(.hero-mosaic-caption) {
    background: transparent;
    color: var(--xyz-heading);
}

body.page-xyz #photo-gallery .hero-title-card .hero-phone-title,
body.page-xyz #photo-gallery .hero-title-card .hero-desktop-title,
body.page-xyz #photo-gallery .hero-rating-line,
body.page-xyz .rating-number {
    color: var(--xyz-heading);
}

body.page-xyz #photo-gallery .hero-title-card .hero-inline-details,
body.page-xyz .page-layout__content > .hero-inline-details {
    color: var(--xyz-inline-details);
}

body.page-xyz #photo-gallery .hero-desktop-subtitle {
    color: var(--xyz-muted);
}

body.page-xyz #photo-gallery .hero-title-card .hero-guest-quote {
    color: var(--xyz-guest-quote);
}

body.page-xyz #photo-gallery .hero-title-card:not(.hero-mosaic-caption) .hero-desktop-title {
    border-bottom-color: rgba(36, 55, 70, 0.18);
}

body.page-xyz #photo-gallery .hero-tag--family { color: #2f8f5b; }
body.page-xyz #photo-gallery .hero-tag--work,
body.page-xyz #photo-gallery .hero-tag--winter { color: #2f80ed; }

body.page-xyz .rating-breakdown,
body.page-xyz [data-rating-categories],
body.page-xyz .after-hero-divider {
    display: none;
}

body.page-xyz #reviews .review-card {
    background: var(--xyz-card);
    border: 1px solid var(--xyz-card-border);
}

body.page-xyz #reviews .reviewer-name {
    color: var(--xyz-review-name);
}

body.page-xyz #reviews .review-date,
body.page-xyz #reviews .review-content p {
    color: var(--xyz-review-body);
}

body.page-xyz #reviews .platform-link {
    background: var(--xyz-platform-bg);
    border-color: var(--xyz-card-border);
    color: var(--xyz-platform-text);
}

body.page-xyz .faq-item {
    border-bottom-color: var(--xyz-border);
}

body.page-xyz .faq-toggle {
    color: var(--xyz-faq-toggle);
}

body.page-xyz .below-hero-surface {
    width: 100%;
}

body.page-xyz .below-hero-surface .page-layout {
    margin-top: 0;
}

body.page-xyz .below-hero-surface .contact-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

/* One left edge: title, details, description, amenities */
@media (min-width: 1024px) {
    body.page-xyz .below-hero-surface .page-layout {
        max-width: 1340px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
        padding-left: var(--xyz-content-inline-start);
    }

    body.page-xyz .below-hero-surface .page-layout__content .section-content,
    body.page-xyz .below-hero-surface .page-layout__content .faq-two-column .section-content {
        padding-left: 0;
        padding-right: 0;
    }

    body.page-xyz .below-hero-surface .description-content,
    body.page-xyz .below-hero-surface #description .description-content,
    body.page-xyz .below-hero-surface .amenities-grid,
    body.page-xyz .below-hero-surface .amenities-grid-expanded {
        margin-left: 0;
        padding-left: 0;
    }
}

@media (min-width: 1920px) {
    body.page-xyz {
        --xyz-content-inline-start: clamp(72px, 5vw, 104px);
    }

    body.page-xyz #photo-gallery {
        padding-left: var(--xyz-content-inline-start);
    }
}

body.page-xyz .below-hero-surface .page-layout.page-layout--centered {
    justify-content: center;
    gap: 0;
}

body.page-xyz .below-hero-surface .page-layout.page-layout--centered .page-layout__content {
    flex: 0 1 760px;
    max-width: 760px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1920px) {
    body.page-xyz .below-hero-surface .page-layout.page-layout--centered .page-layout__content {
        flex-basis: min(820px, 48vw);
        max-width: min(820px, 48vw);
    }
}

/* Desktop: calendar below gallery, sticky beside page content */
@media (min-width: 1025px) {
    body.page-xyz {
        --xyz-sidebar-width: 360px;
        --xyz-sidebar-gap: 48px;
        --xyz-sidebar-top: calc(env(safe-area-inset-top, 0px) + var(--site-header-band-height, 80px) + 12px);
    }

    body.page-xyz .below-hero-surface .page-layout {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--xyz-sidebar-gap);
        padding-right: clamp(48px, 6vw, 88px);
        box-sizing: border-box;
    }

    body.page-xyz .below-hero-surface .page-layout__content {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 760px;
    }

    body.page-xyz .page-layout__sidebar {
        display: block;
        position: sticky;
        top: var(--xyz-sidebar-top);
        width: var(--xyz-sidebar-width);
        max-width: var(--xyz-sidebar-width);
        margin: 0;
        flex: 0 0 var(--xyz-sidebar-width);
        z-index: 900;
        background: transparent;
    }

    body.page-xyz .sidebar-calendar-widget {
        position: relative;
        top: auto;
        max-height: calc(100dvh - var(--xyz-sidebar-top) - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    body.page-xyz .sidebar-calendar-widget::-webkit-scrollbar {
        display: none;
    }

    /* Spotlight overlay is z-index 2000 — keep booking card above the dimmer. */
    body.page-xyz.reserve-spotlight-active .page-layout__sidebar {
        display: block;
        position: sticky;
        top: var(--xyz-sidebar-top);
        z-index: 2100;
        background: transparent;
    }

    body.page-xyz.reserve-spotlight-active .sidebar-calendar-widget {
        position: relative;
        top: auto;
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - var(--xyz-sidebar-top) - 16px);
        margin: 0;
        border-radius: 16px;
        background-color: #ffffff;
        box-shadow: 0 16px 40px rgba(15, 35, 55, 0.22);
        z-index: 2101;
    }
}

/* Phone/tablet sheet: also stay above the dim overlay */
@media (max-width: 1024px) {
    body.page-xyz.reserve-spotlight-active .page-layout__sidebar {
        z-index: 2100;
    }

    body.page-xyz.reserve-spotlight-active .sidebar-calendar-widget {
        z-index: 2101;
        background-color: #ffffff;
    }
}

/* Dark mode: reassign tokens on html so body + descendants inherit. */
html.theme-dark:has(body.page-xyz) {
    --page-surface: #1f3344;
    --paper-grain: none;
    --hero-bg: #1f3344;
    --hero-surface: #1f3344;
    --light-gray: #1f3344;
    --background-color: #1f3344;
    --cc-dark-bg: #1f3344;
    --cc-dark-card: #2b4358;
    --cc-dark-chip: #334d64;

    --xyz-text: rgba(238, 243, 248, 0.95);
    --xyz-heading: #f4f7fb;
    --xyz-muted: rgba(214, 226, 238, 0.94);
    --xyz-inline-details: rgba(238, 243, 248, 0.95);
    --xyz-link: #b8d4ec;
    --xyz-link-hover: #f4f7fb;
    --xyz-quote: #f4f7fb;
    --xyz-guest-quote: rgba(214, 226, 238, 0.94);
    --xyz-nav: rgba(255, 255, 255, 0.92);
    --xyz-border: rgba(200, 215, 230, 0.22);
    --xyz-border-strong: rgba(200, 215, 230, 0.28);
    --xyz-card: #2b4358;
    --xyz-card-border: rgba(196, 212, 228, 0.18);
    --xyz-platform-bg: #334d64;
    --xyz-faq-toggle: rgba(214, 226, 238, 0.72);
    --xyz-contact-label: rgba(214, 226, 238, 0.82);
    --xyz-contact-link: #f4f7fb;
    --xyz-contact-hover: #ffffff;
    --xyz-contact-sub: rgba(214, 226, 238, 0.86);
    --xyz-review-name: #eef3f8;
    --xyz-review-body: rgba(244, 249, 255, 0.92);
    --xyz-platform-text: #dce8f3;
    --text-color: #eef3f8;

    background-color: var(--page-surface);
    background-image: none;
}

html.theme-dark body.page-xyz {
    background-color: var(--page-surface);
    background-image: none;
    color: var(--text-color);
}

html.theme-dark body.page-xyz .hamburger-menu span,
html.theme-dark body.page-xyz .hamburger-menu.active span,
html.theme-dark body.page-xyz.nav-dark .hamburger-menu span,
html.theme-dark body.page-xyz.nav-dark .hamburger-menu.active span {
    background-color: #ffffff;
}

html.theme-dark body.page-xyz #photo-gallery .hero-title-card:not(.hero-mosaic-caption) .hero-desktop-title,
html.theme-dark body.page-xyz #photo-gallery .hero-title-card .hero-phone-title {
    border-bottom-color: rgba(200, 215, 230, 0.28);
}

/* Booking widget stays light on navy */
html.theme-dark body.page-xyz .sidebar-calendar-widget {
    background-color: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

/* ── Collage gallery (large left + two stacked right) — phone + desktop ── */
#photo-gallery .photo-gallery-container {
    position: relative;
}

#photo-gallery .hero-mosaic {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 280px;
    height: 100%;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: #d7dde3;
}

#photo-gallery .hero-mosaic[hidden] {
    display: none;
}

#photo-gallery .hero-mosaic__item {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: #d7dde3;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#photo-gallery .hero-mosaic__item--main {
    grid-column: 1;
    grid-row: 1 / span 2;
}

#photo-gallery .hero-mosaic__item--top {
    grid-column: 2;
    grid-row: 1;
}

#photo-gallery .hero-mosaic__item--bottom {
    grid-column: 2;
    grid-row: 2;
}

/* Tablet + laptop: true 1:1 right tiles; column width follows row height. */
@media (min-width: 769px) {
    #photo-gallery .hero-mosaic {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #photo-gallery .hero-mosaic__item--top,
    #photo-gallery .hero-mosaic__item--bottom {
        aspect-ratio: 1 / 1;
        height: 100%;
        width: auto;
        min-height: 0;
    }
}

#photo-gallery .hero-mosaic__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #d7dde3;
    transition: filter 0.2s ease;
}

#photo-gallery .hero-mosaic__item:hover img {
    filter: brightness(0.92);
}

#photo-gallery .hero-mosaic__item:focus-visible {
    outline: 2px solid #21c9ee;
    outline-offset: 2px;
    z-index: 1;
}

#photo-gallery .hero-mosaic__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 30, 45, 0.48);
    color: #fff;
    font-family: var(--font-sans, Inter, sans-serif);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
}

#photo-gallery .hero-mosaic__more[hidden] {
    display: none;
}

/*
  Title above the gallery; persons/bedrooms line sits above the description.
*/
#photo-gallery .hero-mosaic-caption {
    display: block;
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 clamp(12px, 1.6vw, 18px);
    box-sizing: border-box;
    pointer-events: none;
    border: 0;
    background: none;
    box-shadow: none;
    text-shadow: none;
    text-align: left;
}

#photo-gallery .hero-mosaic-caption .hero-phone-title-row,
#photo-gallery .hero-mosaic-caption .hero-phone-title,
#photo-gallery .hero-mosaic-caption .hero-desktop-subtitle,
#photo-gallery .hero-mosaic-caption .hero-tags,
#photo-gallery .hero-mosaic-caption .hero-guest-quote,
#photo-gallery .hero-mosaic-caption .hero-inline-row,
#photo-gallery .hero-mosaic-caption .hero-card-footer,
#photo-gallery .hero-mosaic-caption .hero-reserve-btn {
    display: none;
}

#photo-gallery .hero-mosaic-caption .hero-desktop-title {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--xyz-heading);
    text-shadow: none;
    box-shadow: none;
}

#photo-gallery .hero-mosaic-caption .hero-inline-details {
    display: none;
}

/* Single-image carousel chrome only in fullscreen. #galPrev/#galNext stay visible —
   they double as the mosaic's inline prev/next (see initHeroMosaicArrows). These apply
   while :not(.gallery-fullscreen), i.e. before the container is re-parented, so no
   reparenting ambiguity here. */
#photo-gallery .photo-gallery-container:not(.gallery-fullscreen) .gallery-counter,
#photo-gallery .photo-gallery-container:not(.gallery-fullscreen) .gallery-fullscreen-btn {
    display: none;
}

#photo-gallery .photo-gallery-container:not(.gallery-fullscreen) .gallery-main {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    flex: none;
}

html.theme-dark body.page-xyz #photo-gallery .hero-mosaic {
    background: #1a2a38;
}

@media (max-width: 768px) {
    /* Gallery first, then title. */
    #photo-gallery > .index-hero-frame {
        order: 1;
    }

    #photo-gallery > .hero-mosaic-caption {
        order: 2;
        /* Must follow the base .hero-mosaic-caption rule so horizontal inset wins */
        width: 100%;
        max-width: none;
        padding: 12px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
        box-sizing: border-box;
    }

    body.page-xyz .page-layout__content > .hero-inline-details {
        margin: 0 0 8px;
        padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
        font-size: clamp(0.8125rem, 3.4vw, 0.9375rem);
    }

    #photo-gallery .hero-mosaic-caption .hero-desktop-title {
        margin: 0;
        padding: 0 0 8px;
        border: 0;
        border-bottom: 1px solid rgba(200, 215, 230, 0.55);
        width: 100%;
        box-sizing: border-box;
    }

    /* Keep body copy on the same inset as the title / house line */
    body.page-xyz .page-layout__content .section-content,
    body.page-xyz .page-layout__content .faq-two-column .section-content,
    body.page-xyz .below-hero-surface .description-section .section-content,
    body.page-xyz .below-hero-surface .reviews-section .section-content {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    /* Full-bleed collage; 3px gap between tiles. */
    #photo-gallery .hero-mosaic {
        flex: 0 0 auto;
        gap: 3px;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: min(46svh, 340px);
        aspect-ratio: 4 / 3;
        border-radius: 16px 16px 0 0;
    }

    #photo-gallery .hero-mosaic__more {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
}
