/* ===== 英雄区域内容样式 ===== */
/* 背景样式已统一移至ui-components.css */

.hero-section {
    --hero-photo-collapsed-height: 400px;
    /* View changes are atomic; only the photo itself fades in. */
    transition: none;
}

/* 导航栏的通用容器底部留白不应扩展英雄区与筛选栏的间距。 */
.hero-section > .container {
    margin-bottom: 0;
    padding-inline: 20px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    position: relative;
    top: 0;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #DC143C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 440px);
    gap: 16px;
    margin: 0 auto;
}

.hero-actions > .btn {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 12px 20px;
    font-size: 16px;
    line-height: 1.2;
    white-space: normal;
    align-self: stretch;
}

/* The loader reveals the complete hero as soon as its resources are ready. */

/* 普通页面共用同一移动端布局；首页视频使用自己的 hero-buttons。 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .hero-content p {
        font-size: 0.8rem;
        line-height: 1.5;
        min-height: 3em;
        margin-bottom: 1rem;
    }

    .hero-actions {
        gap: 12px;
    }

    .hero-actions > .btn {
        min-height: 48px;
        padding: 12px 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

}

/* ===== Booking photographs: one surface from original image into details ===== */
.hero-section.hero-photo-mode {
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    min-height: 0;
    height: auto;
    background: var(--sm-surface, #1a1a1a);
    box-shadow: none;
    transition: none;
    overflow-anchor: none;
    isolation: isolate;
}

.hero-section.hero-photo-mode > .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin-bottom: 0;
}

.hero-section.hero-photo-mode::before,
.hero-section.hero-photo-mode::after { display: none; }

.hero-photo-viewer {
    width: 100%;
    height: var(--hero-photo-height, calc(var(--sm-hero-height) + var(--sm-detail-hero-extra)));
    overflow: hidden;
    position: relative;
    transition: none;
}

.hero-photo-viewer.has-ready-photo { transition: height 360ms cubic-bezier(.22,.8,.2,1); }
.hero-photo-viewer.has-ready-photo.is-sheet-dragging { transition:none; }

.hero-booking-photo-viewer,
.hero-booking-photo-viewer .photo-main,
.hero-booking-photo-viewer .photo-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-booking-photo-viewer .photo-main {
    border-radius: 0;
    box-shadow: none;
    background: var(--sm-surface, #1a1a1a);
    overflow: hidden;
}

.hero-booking-photo-viewer .photo-container {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* The fade belongs to the image surface, not the clickable arrow or thumbnail row. */
.hero-booking-photo-viewer .photo-container::after { content:''; position:absolute; inset:auto 0 0; height:var(--sm-hero-edge-height); pointer-events:none; z-index:2; }

.hero-booking-photo-viewer .photo-loading {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--sm-photo-placeholder, url('/assets/images/content-placeholder.svg')) center / cover;
    filter: blur(16px);
    transform: scale(1.04);
}

.hero-booking-photo-viewer .photo-loading .sm-skeleton-shape { display: none; }

.hero-booking-photo-viewer .main-photo {
    display: block;
    position: absolute;
    /* Keep the original ratio; the clipping window opens around its center. */
    top: var(--hero-photo-image-top, 0px);
    left: calc(50% - var(--hero-photo-image-width, 100%) / 2);
    width: var(--hero-photo-image-width, 100%);
    height: var(--hero-photo-image-height, 100%);
    object-fit: cover;
    object-position: center;
    opacity: 0;
}

/* Panoramas settle their crop with the same motion as the opening frame. */
.hero-photo-viewer.has-ready-photo:not(.is-sheet-dragging) .main-photo { transition:height 360ms cubic-bezier(.22,.8,.2,1),width 360ms cubic-bezier(.22,.8,.2,1),left 360ms cubic-bezier(.22,.8,.2,1),top 360ms cubic-bezier(.22,.8,.2,1); }
@media(prefers-reduced-motion:reduce) { .hero-photo-viewer.has-ready-photo:not(.is-sheet-dragging) .main-photo { transition:none; } }
.hero-booking-photo-viewer .main-photo.is-ready { opacity: 1; }
.hero-booking-photo-viewer .photo-main[data-expanded="true"] .main-photo { object-fit: cover; }
.hero-booking-photo-viewer .photo-main[data-expandable="true"] .main-photo { cursor: zoom-in; }
.hero-booking-photo-viewer .photo-main[data-expandable="true"][data-expanded="true"] .main-photo { cursor: zoom-out; }
.hero-booking-photo-viewer .photo-expand-btn,
.hero-booking-photo-viewer .photo-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #f5f6f7;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    z-index: 4;
    transition: opacity 180ms ease;
}

.hero-booking-photo-viewer .photo-expand-btn[hidden] { display: none; }
.hero-booking-photo-viewer .photo-expand-btn {
    bottom: 0;
    left: calc(50% - 44px);
    width: 88px;
    touch-action: none;
}

.hero-booking-photo-viewer .photo-expand-btn:hover,
.hero-booking-photo-viewer .photo-nav:hover {
    opacity: .75;
}

.hero-booking-photo-viewer .photo-expand-btn:focus-visible,
.hero-booking-photo-viewer .photo-nav:focus-visible,
.hero-booking-photo-viewer .photo-thumbnail:focus-visible {
    outline: 2px solid #f5f6f7;
    outline-offset: 3px;
}

.hero-booking-photo-viewer .photo-expand-btn svg,
.hero-booking-photo-viewer .photo-nav svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.8));
}

.hero-booking-photo-viewer .photo-expand-btn svg {
    transition: transform 280ms cubic-bezier(.22,.68,0,1);
}

.hero-booking-photo-viewer .photo-main[data-expanded="true"] .photo-expand-btn svg {
    transform: rotate(180deg);
}

.hero-booking-photo-viewer .photo-nav {
    /* Center the hit target inside the portion between navbar and sheet. */
    top: calc((100% + var(--hero-photo-top-inset, 0px) - var(--sm-hero-edge-height, 0px) - 44px) / 2);
}
.hero-booking-photo-viewer .photo-nav.prev { left: 12px; }
.hero-booking-photo-viewer .photo-nav.next { right: 12px; }

.hero-booking-photo-viewer .photo-counter {
    position: absolute;
    top: calc(var(--sm-navbar-bottom, 96px) + 14px);
    left: 50%;
    transform: translateX(-50%);
    color: #f5f6f7;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
    pointer-events: none;
    z-index: 4;
}
.hero-photo-viewer.compact-photo .photo-thumbnails-overlay { display: none; }
.hero-photo-viewer.compact-photo .photo-counter { top: 0; }

.hero-booking-photo-viewer .photo-thumbnails-overlay {
    position: absolute;
    top: calc(var(--hero-photo-sheet-edge, 100%) - var(--sm-shape-inset, 12px));
    bottom: auto;
    /* Both 44px arrow targets keep a dedicated lane even in shallow frames. */
    right: auto;
    left: 50%;
    transform: translate(-50%, -100%);
    width: max-content;
    max-width: calc(100% - 124px);
    z-index: 4;
}

.hero-booking-photo-viewer .photo-thumbnails {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px;
    margin: -4px;
}
.hero-booking-photo-viewer .photo-thumbnails::-webkit-scrollbar { display: none; }

.hero-booking-photo-viewer .photo-thumbnail {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    opacity: .5;
    transition: opacity 180ms ease;
}

.hero-booking-photo-viewer .photo-thumbnail.active {
    opacity: 1;
}

.hero-booking-photo-viewer .photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-section { --hero-photo-collapsed-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-photo-viewer,
    .hero-photo-viewer.has-ready-photo,
    .hero-booking-photo-viewer .photo-expand-btn,
    .hero-booking-photo-viewer .photo-expand-btn svg,
    .hero-booking-photo-viewer .photo-nav,
    .hero-booking-photo-viewer .photo-thumbnail { transition: none; }
}

/* Licensed local photography belongs to ordinary page heroes only. */
body:not(.index-page) .hero-section:not(.hero-photo-mode) {
    background-color: var(--sm-surface, #1a1a1a);
    background-image: var(--hero-background-photo);
    background-position: var(--hero-background-position, center);
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 0;
    box-shadow: none;
    isolation: isolate;
}
body:not(.index-page) .hero-section:not(.hero-photo-mode)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Keep the photograph's natural light; readability is local to the copy. */
    background: linear-gradient(180deg, rgba(12,14,18,.06), rgba(12,14,18,.10) 76%, rgba(12,14,18,.18));
    pointer-events: none;
}


/* The page begins with one rounded sheet edge below the photograph. */
body:not(.index-page) .hero-section:not(.hero-photo-mode)::after {
    content: '';
    display: block;
    position: absolute;
    inset: auto 0 0;
    height: var(--sm-hero-edge-height);
    background: var(--sm-surface);
    border-radius: var(--sm-sheet-radius,32px) var(--sm-sheet-radius,32px) 0 0;
    box-shadow: none;
    filter: none;
    transform: none;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}
body:not(.index-page) .hero-section:not(.hero-photo-mode) .hero-content h1 {
    color: #f4f5f7;
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 3px 14px rgba(0,0,0,.7);
}
body:not(.index-page) .hero-section:not(.hero-photo-mode) .hero-content p {
    color: #fff;
    text-shadow: 0 1px 2px #000, 0 2px 8px rgba(0,0,0,.8);
}
.booking-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/hall.webp'); --hero-background-position: center 60%; }
.events-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/serve.webp'); --hero-background-position: center 56%; }
.community-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/community.webp'); --hero-background-position: center 20%; }
.news-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/news.webp'); --hero-background-position: center 45%; }
.profile-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/racket.webp'); --hero-background-position: center 52%; }
.messages-page { --hero-background-photo: url('/_static/repair-20261126-r166/assets/hero/paddles.webp'); --hero-background-position: center 66%; }
@media (max-width: 768px) {
    .booking-page { --hero-background-position: 44% center; }
    .community-page { --hero-background-position: 32% center; }
    .events-page { --hero-background-position: 64% center; }
    .news-page { --hero-background-position: 44% center; }
    .profile-page { --hero-background-position: 70% center; }
    .messages-page { --hero-background-position: 60% center; }
}

/* The map expands the hero and pushes the list down; closing restores its original footprint. */
.booking-map-shell { position: absolute; inset: 0; z-index: 2; display: none; }
.booking-map-frame { height: 100%; overflow: hidden; position: relative; }
.booking-map-canvas { width: 100%; height: 100%; background: var(--sm-surface, #1a1a1a); }
.booking-map-frame::after { content: ''; position: absolute; inset: auto 0 0; height: var(--sm-hero-edge-height); z-index: 1; pointer-events: none; background: var(--sm-hero-edge-gradient); }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode) { padding: 0; background-image: none; background-color: var(--sm-surface, #1a1a1a); height: var(--booking-hero-height,400px); min-height: var(--booking-hero-height,400px); }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode)::before { display:none; }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode)::after { height:var(--booking-hero-edge-height,var(--sm-hero-edge-height)); border-radius:32px 32px 0 0; z-index:3; transform:translateY(var(--booking-sheet-pull,0px)); transition:transform 340ms cubic-bezier(.22,.8,.2,1); }
.booking-page .hero-section.hero-map-mode.is-map-pulling::after { transition:none; }
.hero-section.hero-map-mode:not(.hero-photo-mode) > .booking-map-shell { display: block; }
.hero-section.hero-map-mode:not(.hero-photo-mode) > .container { display: none; }
.booking-page .hero-section.hero-map-morph:not(.hero-photo-mode) { overflow:visible; transition:none; }
.booking-page .hero-section.hero-map-morph:not(.hero-photo-mode)::after { height:var(--booking-hero-edge-height,var(--sm-hero-edge-height)); border-radius:32px 32px 0 0; z-index:3; }
.hero-section.hero-map-morph:not(.hero-photo-mode) > .booking-map-shell { display:block; position:fixed; inset:0 0 auto; overflow:hidden; }
.hero-section.hero-photo-mode > .booking-map-shell { display: none; }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode) .hero-content h1 { color: var(--sm-text, #fff); -webkit-text-fill-color: currentColor; text-shadow: none; }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode) .hero-content p { color: var(--sm-text-muted, #aeb4bd); text-shadow: none; }
.booking-map-toolbar { position: absolute; z-index: 3; inset: calc(var(--sm-navbar-bottom, 96px) + 16px) 24px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none; }
.booking-map-heading, .booking-map-preview, .booking-map-results button { background: var(--sm-sticky-surface, rgba(26,26,26,.65)); backdrop-filter: var(--sm-sticky-blur, blur(20px)); -webkit-backdrop-filter: var(--sm-sticky-blur, blur(20px)); color: var(--sm-text, #fff); border: 0; box-shadow: none; }
.booking-map-heading { display: grid; gap: 5px; min-width: 0; max-width: 480px; max-height: 100%; overflow-y: auto; overflow-wrap: anywhere; overscroll-behavior: contain; scrollbar-width: thin; padding: 13px 16px; border-radius: 14px; text-align: left; pointer-events: auto; }
.booking-map-title { font-size: 15px; font-weight: 550; line-height: 1.4; }
.booking-map-status { font-size: 12px; line-height: 1.5; color: var(--sm-text-muted, #bcc3ca); }
.booking-map-actions { display: flex; flex-shrink: 0; gap: 8px; pointer-events: auto; --sm-text-muted: #17201b; --sm-text: #0d1712; }
.booking-map-actions svg { width: 21px; height: 21px; flex-shrink: 0; }
/* Status, empty and error content share one normal-flow panel. Its bounds
   follow the actual navbar and hero; long localized copy can scroll inside. */
.booking-map-message { min-width: 0; display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; white-space: normal; color: var(--sm-text, #fff); }
.booking-map-message > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.booking-map-message button { flex-shrink: 0; pointer-events: auto; }
.booking-map-preview button { background: transparent; color: inherit; border: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.booking-map-results { display: flex; position: absolute; z-index: 2; inset: auto 24px 32px; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.booking-map-results button { flex-shrink: 0; padding: 9px 14px; border-radius: 99px; font: inherit; font-size: 12px; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-map-preview { position: absolute; z-index: 3; bottom: 84px; left: 24px; right: 24px; width: fit-content; max-width: calc(100% - 48px); border-radius: 16px; padding: 16px 20px; display: flex; gap: 24px; align-items: center; text-align: left; }
.booking-map-preview > div { display: grid; gap: 5px; min-width: 0; }
.booking-map-preview strong { font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.booking-map-preview span { font-size: 12px; color: var(--sm-text-muted, #bcc3ca); overflow-wrap: anywhere; }
.booking-map-preview button { font-size: 13px; }
.booking-map-frame [hidden] { display: none; }
.booking-map-frame button:not(.btn,.sm-text-action):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 768px) {
    .booking-map-toolbar { inset-inline: 14px; top: calc(var(--sm-navbar-bottom, 72px) + 12px); bottom: 12px; }
    .booking-map-results { inset-inline: 12px; }
    .booking-map-preview { left: 14px; right: 14px; max-width: calc(100% - 28px); gap: 14px; padding: 14px; }
    .booking-map-heading { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .booking-map-shell, .booking-page .hero-section.hero-map-mode::after { transition: none; } }

.hero-actions > .btn > :is(i,.hero-button-icon) { width: 20px; height: 20px; flex: 0 0 20px; font-size: 18px; line-height: 20px; text-align: center; }
.hero-actions > .btn > .hero-button-icon { width: 24px; height: 24px; flex-basis: 24px; }
.booking-page .hero-section.hero-map-mode:not(.hero-photo-mode) .hero-actions > .btn-outline { color: var(--sm-text, #fff); }

/* Map titles are placed by the provider at their venue; the second click opens details. */
.booking-map-venue-title { display:block; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:10px 14px; border:1px solid rgba(145,160,151,.35); border-radius:99px; font:500 12px/1.5 var(--spinmatch-font-family,sans-serif); color:var(--sm-text,#fff); background:var(--sm-sticky-surface,rgba(26,30,29,.88)); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); box-shadow:0 3px 14px rgba(0,0,0,.15); cursor:pointer; transition:background 180ms ease,box-shadow 180ms ease; }
.booking-map-venue-title:hover { box-shadow:0 4px 18px rgba(0,0,0,.25); }
.booking-map-results.booking-map-accessible-results { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.booking-map-results.booking-map-accessible-results:focus-within { width:auto; height:auto; clip-path:none; }
.booking-map-preview { bottom:28px; right:auto; width:360px; max-width:calc(100% - 48px); padding:0; display:block; max-height:calc(100% - var(--sm-navbar-bottom,96px) - 120px); overflow:auto; overscroll-behavior:contain; }
.booking-map-preview .booking-map-card-grid { width:100%; margin:0; min-height:0; position:relative; }
.booking-map-preview .booking-grid .booking-card.booking-card { position:relative; width:100%; margin:0; border-radius:16px; background-color:transparent; }
.booking-map-preview .booking-grid .booking-card .booking-description { -webkit-line-clamp:3; }
.booking-map-preview .booking-card:focus-visible { outline:2px solid #b8d4c3; outline-offset:-3px; }
@media(max-width:600px) { .booking-map-preview { left:14px; max-width:calc(100% - 28px); bottom:26px; } }

.booking-map-venue-stack { display:grid; justify-items:start; gap:5px; max-height:148px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:3px; }
.booking-map-card-loading { display:grid; gap:18px; padding:22px; min-height:160px; align-content:start; }
.booking-map-card-loading::after { content:''; height:60px; border-radius:10px; background:rgba(var(--sm-ink-rgb,255,255,255),.07); }
.booking-map-preview > button { display:grid; gap:8px; width:100%; padding:22px; text-align:left; text-decoration:none; white-space:normal; }

.hero-booking-photo-viewer :is(.main-photo,.photo-container) { touch-action:pan-y; }

.hero-booking-photo-viewer .photo-drag-neighbor { position:absolute; top:var(--hero-photo-image-top,0px); left:calc(50% - var(--hero-photo-image-width,100%) / 2); width:var(--hero-photo-image-width,100%); height:var(--hero-photo-image-height,100%); object-fit:cover; object-position:center; pointer-events:none; border-radius:14px; }
.hero-booking-photo-viewer.is-dragging-photo .main-photo { cursor:grabbing!important; border-radius:14px; }
.hero-booking-photo-viewer.is-dragging-photo :is(.main-photo,.photo-drag-neighbor) { will-change:transform; }
.hero-booking-photo-viewer .photo-thumbnail { transition:opacity .24s ease, transform .3s cubic-bezier(.22,.8,.2,1), box-shadow .24s ease; }
.hero-booking-photo-viewer .photo-thumbnail.active { box-shadow:none; transform:scale(1.07); filter:brightness(1.12); }
.hero-booking-photo-viewer .photo-thumbnail:hover { transform:translateY(-2px); opacity:1; }
.hero-booking-photo-viewer .photo-thumbnail.active:hover { transform:translateY(-2px) scale(1.07); }

@media(prefers-reduced-motion:reduce) { .hero-booking-photo-viewer .photo-thumbnail { transition:none; } }

/* Keep the returning hero controls above its dissolving bottom edge on every frame. */
.hero-section.hero-map-morph:not(.hero-photo-mode) > .container { position:relative; z-index:4; }

/* Rounded page surfaces share the photo edge and keep first paint at final size. */
.hero-loading .loading-description { display:none; }
.hero-content p#hero-description { display:none; }
.booking-page :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode)) { min-height:240px; padding-top:112px; }
.booking-page .hero-section:not(.hero-photo-mode) { background-image:none!important; }
.booking-page .hero-section:not(.hero-photo-mode) > .container { position:relative; z-index:3; pointer-events:none; }
.booking-page .hero-section:not(.hero-photo-mode) #hero-actions { display:none; }
.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) { overflow:hidden; }
.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) > .booking-map-shell { display:block; opacity:1; pointer-events:none; height:var(--booking-map-viewport-height,100dvh); bottom:auto; }
.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) .booking-map-toolbar { visibility:hidden; }
.booking-page .hero-section:not(.hero-photo-mode) > .booking-map-shell .booking-map-canvas { background-color:var(--sm-field-fill); }
.booking-map-open-handle { position:absolute; inset:auto 0 0; width:100%; border:0; border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0; z-index:5; display:grid; place-items:center; cursor:grab; touch-action:none; }
.booking-map-grip,.photo-expand-grip { display:block; width:60px; height:3px; border-radius:999px; background:var(--sm-text-muted); opacity:.48; pointer-events:none; }
.booking-map-open-handle:focus-visible { outline:2px solid var(--primary-color); outline-offset:-5px; }
.hero-section:is(.hero-photo-mode,.hero-map-mode,.hero-map-morph) > .booking-map-open-handle { visibility:hidden; }
.booking-page:has(.hero-photo-mode) .booking-map-open-handle { visibility:hidden; }
.booking-map-open .booking-page-action, .booking-page:has(.hero-photo-mode) .booking-page-action, .booking-page:has(.details-parts-postbooking-content:not([hidden]):not([style*="display: none"])) .booking-page-action { display:none; }
@media(max-width:768px) { .booking-page :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode)) { min-height:210px; padding-top:92px; } }
@media(max-width:480px) { .booking-page :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode)) { min-height:190px; padding-top:82px; } }

/* Concentric geometry shared with the corresponding loading frames. */
html body.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) { min-height:320px!important; }
@media(max-width:768px) {
    html body.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) { min-height:280px!important; }
}
@media(max-width:480px) {
    html body.booking-page .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph) { min-height:250px!important; }
}
html body .hero-section::after { border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0!important; }
html body:not(.booking-page):not(.index-page) .hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph,.cw-cover-hero,.cw-space-header) { padding-bottom:calc(var(--sm-hero-edge-height) + 18px)!important; }
html body:is(.booking-page,.events-page):not(:has([data-sm-page-sheet])):has(#hero-container :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph))) .main-content:not(.booking-map-morph,.booking-map-browsing) { margin-top:calc(var(--sm-shape-inset) - 4px - var(--sm-hero-edge-height))!important; position:relative; }
html body .booking-map-open-handle { align-items:start; height:calc(var(--sm-hero-edge-height) + 36px)!important; padding:0!important; background:transparent!important; }
/* The visible grip has its own narrow hit target from first paint. The
   surrounding sheet still delegates drags without stealing filter taps. */
html body.booking-page .main-content > .booking-map-open-handle {
    inset:0 auto auto 50%; transform:translateX(-50%); width:88px; height:18px!important;
    /* The filter surface is level 100. Its transparent top padding must not
       intercept this grip after the map closes; navigation remains above it. */
    z-index:101; pointer-events:auto; min-height:0;
}
html body.booking-page .main-content > .booking-map-open-handle > .booking-map-grip { top:4px; }
html body .booking-map-open-handle::before { content:""; position:absolute; inset:auto 0 0; height:var(--sm-hero-edge-height); border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0; background:var(--sm-surface); pointer-events:none; }
html body .booking-map-grip { height:3px; position:absolute; left:50%; top:40px; transform:translateX(-50%); }
html body .hero-loading::after { content:""; display:block; position:absolute; inset:auto 0 0; height:var(--sm-hero-edge-height); border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0; background:var(--sm-surface); pointer-events:none; }
html body.booking-page .hero-loading { min-height:320px!important; }
html body.booking-page .hero-loading::before { content:""; position:absolute; left:50%; bottom:calc(var(--sm-hero-edge-height) - 7px); width:60px; height:3px; transform:translateX(-50%); border-radius:999px; background:var(--sm-text); opacity:.48; z-index:2; pointer-events:none; }
@media(max-width:768px) {
    html body.booking-page .hero-loading { min-height:280px!important; }
}
@media(max-width:480px) {
    html body.booking-page .hero-loading { min-height:250px!important; }
}
html body .hero-loading { position:relative; padding-bottom:calc(var(--sm-hero-edge-height) + 18px)!important; align-items:flex-start!important; transition:none!important; }
html body .hero-loading-content { width:min(840px,100%); max-width:100%; padding-inline:20px; gap:20px; box-sizing:border-box; }
html body .hero-loading-content::after { content:none!important; display:none!important; }
html body .hero-loading .loading-title { position:relative; flex:none; width:4em; max-width:100%; height:1.6em; font-size:3.5rem; line-height:1.6; background:none!important; }
html body .hero-loading .loading-title::before { content:""; position:absolute; inset:50% 0 auto; height:1em; transform:translateY(-50%); border-radius:8px; background:var(--sm-skeleton-fill); }
html body:not(.booking-page) .hero-loading .loading-description { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; flex:none; width:min(100%,440px); height:50px; margin:0; border-radius:0; background:none!important; }
@media(max-width:768px) {
    html body .hero-loading .loading-title { font-size:2.5rem; }
}
@media(max-width:768px) {
    html body:not(.booking-page) .hero-loading .loading-description { height:48px; gap:12px; }
}
@media(max-width:480px) {
    html body .hero-loading .loading-title { font-size:2rem; }
}
html body:not(.booking-page) .hero-loading .loading-description::before,
html body:not(.booking-page) .hero-loading .loading-description::after { content:""; display:block; min-width:0; height:100%; border-radius:999px; background:var(--sm-skeleton-fill); }
html body .hero-booking-photo-viewer .photo-container::after { min-height:var(--sm-sheet-radius); border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0!important; background:var(--sm-surface,#1a1a1a); }
html body:not(.booking-page) .hero-loading { background-image:linear-gradient(180deg,rgba(12,14,18,.06),rgba(12,14,18,.10) 76%,rgba(12,14,18,.18)),var(--hero-background-photo); background-position:var(--hero-background-position,center); background-size:cover; background-repeat:no-repeat; }

/* Keep standard page actions above the mobile dock in short landscape windows.
   The loading frame uses the same compact title and top inset. */
@media (max-width:1024px) and (max-height:360px) {
    html body:is(.profile-page,.news-page,.community-page) #hero-container :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph,.cw-cover-hero)),
    html body.training-page #training-cover { padding-top:82px; min-height:250px; }
    html body:is(.profile-page,.news-page,.community-page) #hero-container :is(.hero-loading .loading-title,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph,.cw-cover-hero) .hero-content h1),
    html body.training-page #training-cover .hero-content h1 { font-size:2rem; }
}

/* The shared grip sits above the return/action row at the sheet's curved edge. */
html body .hero-booking-photo-viewer .photo-expand-btn { bottom:calc(var(--sm-hero-edge-height) - 32px); z-index:60; color:var(--sm-text-muted); }

/* The media stays in place while the native document scrolls its content sheet.
   No transform is placed above fixed return/filter bars. */
html body:not(.index-page) #hero-container,
html body.training-page #training-cover {
    position: sticky;
    top: 0;
    z-index: 0;
}
html body:not(.training-page):not(.index-page) #main-content-container,
html body.community-page #community-loading,
html body.training-page :is(#training-workspace,#training-loading) {
    position: relative;
    z-index: auto;
    background: var(--sm-surface);
    border-radius: var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0;
}
html body.booking-page:has(.booking-map-browsing,.booking-map-morph) #main-content-container {
    background: transparent;
}
html.sm-sheet-dragging, html.sm-sheet-dragging * { user-select: none; -webkit-user-select: none; }
html body:not(.booking-map-open) #hero-container,
html body.training-page #training-cover { touch-action: pan-x pinch-zoom; }

html body [data-sm-media-sheet] { position:relative; isolation:auto; }
html body [data-sm-media-sheet] > [data-sm-stationary-media] { position:sticky!important; top:0; z-index:0; }
html body [data-sm-stationary-media]:not(:has(.article-player:not([hidden]))) { touch-action:pan-x pinch-zoom; }
/* Let an original-width portrait travel with native document scrolling.
   The sheet keeps its overlap, so its upper edge follows the actual picture. */
html body:not(.booking-map-open) #hero-container:has(.photo-main[data-tall-expanded]),
html body [data-sm-media-sheet] > [data-sm-stationary-media][data-tall-expanded] {
    position:relative!important;
}
html body:not(.booking-map-open) #hero-container:has(.photo-main[data-expanded="true"]),
html body [data-sm-media-sheet] > [data-sm-stationary-media][data-expanded="true"] {
    touch-action:pan-y pinch-zoom;
}
html body :is(.sm-return-photo-control,.sm-embedded-grip,.booking-map-open-handle,.booking-map-collapse,.main-photo) {
    -webkit-touch-callout:none;
    user-select:none;
    -webkit-user-select:none;
}
html body .sm-embedded-grip { touch-action:none; }
html body [data-sm-embedded-sheet] {
    position:relative; z-index:auto; width:100vw; box-sizing:border-box;
    margin:calc(-1 * var(--sm-media-sheet-overlap)) calc((100% - 100vw) / 2) 0;
    padding-inline:max(0px,calc((100vw - var(--sm-media-sheet-content-width)) / 2));
    background:var(--sm-surface); border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0;
}
html body [data-sm-embedded-sheet] > :first-child:not([data-sm-docked]) { margin-top:0!important; }

/* One moving surface owns both the arc and its original content inset. */
html body [data-sm-page-sheet] {
    position:relative;
    z-index:auto;
    background:var(--sm-surface)!important;
    border-radius:var(--sm-sheet-radius) var(--sm-sheet-radius) 0 0!important;
}
html body:has([data-sm-page-sheet]) #hero-container :is(.hero-section,.hero-loading)::after,
html body:has([data-sm-page-sheet]) #training-cover::after,
html body:has([data-sm-page-sheet]) .hero-booking-photo-viewer .photo-container::after,
html body:has([data-sm-page-sheet]) .booking-map-open-handle::before,
html body [data-sm-stationary-media]::after { display:none!important; }
html body [data-sm-sheet-transitioning] { overflow-anchor:none; }


/* Use the booking page’s measured resting frame for every page and its skeleton. */
:root { --sm-detail-hero-extra:24px; --sm-hero-height:320px; --sm-sheet-open-row-height:112px; --sm-sheet-safe-bottom:env(safe-area-inset-bottom,0px); }
@media (max-width:768px) { :root { --sm-hero-height:280px; } }
@media (max-width:480px) { :root { --sm-hero-height:250px; } }
html body:not(.index-page) #hero-container :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph)),
html body.training-page #training-cover,
html body .community-skeleton-hero {
    box-sizing:border-box; height:var(--sm-page-hero-height,var(--sm-hero-height)); min-height:var(--sm-page-hero-height,var(--sm-hero-height))!important;
}
html body :is(#main-content-container,#training-workspace,#training-loading,#community-loading)[data-sm-page-sheet][data-sm-sheet-with-media]:not([data-sm-embedded-sheet]) {
    display:flow-root; margin-top:calc(-1 * var(--sm-sheet-radius))!important;
}
html body #main-content-container[data-sm-page-sheet][data-sm-sheet-with-media] > :is(.main-content,.news-main,.details-booking-content,.details-content,.booking-venue-detail):not([hidden]) {
    margin-top:0!important;
}
html body [data-sm-page-sheet][data-sm-sheet-with-media]:not([data-sm-embedded-sheet],[data-sm-photo-edge]) > :is(.main-content,.news-main),
html body [data-sm-page-sheet][data-sm-sheet-with-media]:is(.community-main,#training-workspace,#training-loading),
html body.profile-page [data-sm-page-sheet][data-sm-sheet-with-media] {
    padding-top:8px;
}
html.sm-sheet-boundary,
html:has(.hero-photo-mode .photo-main[data-expandable="true"]:not([data-expanded="true"])),
html:has(.booking-page .booking-map-open-handle):not(:has(.booking-map-browsing,.hero-photo-mode,.booking-venue-detail-open)) {
    overscroll-behavior-y:contain;
}
/* A cover rendered inside an article or community retains its original actions. */
html body :is(.cw-space-header,.cw-cover-hero,.article-media)[data-expandable="true"] {
    height:var(--sm-cover-frame); min-height:0!important; box-sizing:border-box; padding-top:0; overflow:clip;
    transition:height 360ms cubic-bezier(.22,.8,.2,1);
}
html[data-public-profile] #hero-container { --sm-page-hero-height:calc(var(--sm-hero-height) + var(--sm-detail-hero-extra)); }

html body .cw-space-header.hero-section:not([data-expandable="true"]) {
    min-height:calc(var(--sm-hero-height) + var(--sm-detail-hero-extra))!important;
}
html body .cw-space-header.hero-section {
    display:block;
    padding-top:var(--sm-navbar-bottom,66px);
}
html body .cw-space-header.hero-section[data-expandable="true"] {
    padding-bottom:0!important;
}
html body .cw-space-header[data-expanded="true"] .cw-space-hero-content {
    max-height:calc(var(--sm-cover-frame) - var(--sm-navbar-bottom,66px) - var(--sm-sheet-radius));
    overflow-y:auto;
}
html body #news-container .article-media[data-expandable="true"] { height:var(--sm-cover-frame); padding-top:0; }
html body #news-container .article-media[data-expandable="true"] .article-cover { height:100%; }
html body :is(.cw-space-header,.cw-cover-hero,#news-container .article-media)[data-expandable="true"] :is(.cw-space-cover,.cw-cover-current,.sm-upload-preview img,#article-cover-image) {
    position:absolute; inset:var(--sm-cover-top) auto auto 50%; translate:-50% 0;
    width:var(--sm-cover-width); height:var(--sm-cover-height); max-width:none; max-height:none; transform:none;
    transition:width 360ms cubic-bezier(.22,.8,.2,1),height 360ms cubic-bezier(.22,.8,.2,1),top 360ms cubic-bezier(.22,.8,.2,1);
}
html body [data-sm-stationary-media].is-sheet-dragging, html body [data-sm-stationary-media].is-sheet-dragging img { transition:none!important; }
html body [data-sm-embedded-sheet]:has(> .sm-embedded-grip) { padding-top:8px; }
.sm-embedded-grip { position:absolute; z-index:56; left:50%; top:0; transform:translateX(-50%); width:88px; height:18px; padding:4px 0 0; display:grid; justify-items:center; align-content:start; background:transparent; border:0; cursor:grab; }
.sm-embedded-grip::after { content:""; width:60px; height:3px; border-radius:999px; background:var(--sm-text-muted); opacity:.65; }
html:has([data-sm-stationary-media][data-expandable="true"]:not([data-expanded="true"])) { overscroll-behavior-y:contain; }
@media(prefers-reduced-motion:reduce) { html body [data-sm-stationary-media], html body [data-sm-stationary-media] img { transition:none!important; } }

@media (max-height:400px) and (orientation:landscape) {
 :root { --sm-hero-height:190px; --sm-sheet-open-row-height:88px; }
 html body:not(.index-page) #hero-container :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph)), html body.training-page #training-cover { padding-top:calc(var(--sm-navbar-bottom,60px) + 2px); }
 html body:not(.index-page) :is(#hero-container,#training-cover) .hero-content h1 { font-size:1.45rem; margin-bottom:4px; line-height:1.2; }
 html body:not(.index-page) :is(#hero-container,#training-cover) .hero-actions > .btn { min-height:40px; padding-block:6px; }
 /* Let standard text and actions reserve their existing curved-edge padding. */
 html body:is(.profile-page,.news-page,.community-page) #hero-container :is(.hero-loading,.hero-section:not(.hero-photo-mode,.hero-map-mode,.hero-map-morph,.cw-cover-hero,.cw-space-header)), html body.training-page #training-cover { height:auto; }
 /* Keep the loading frame aligned while the existing width rules own typography. */
 html body:not(.index-page) #hero-container :where(.hero-loading) .loading-title { font-size:1.45rem; height:1.2em; line-height:1.2; }
 html body:not(.index-page):not(.booking-page) #hero-container .hero-loading-content { gap:4px; }
 html body:not(.index-page):not(.booking-page) #hero-container .hero-loading .loading-description { height:40px; }
}

html body [data-sm-photo-edge]::after {
    content:""; position:absolute; z-index:2; top:4px; left:50%; transform:translateX(-50%);
    width:60px; height:3px; border-radius:999px; background:var(--sm-text-muted);
    opacity:.48; pointer-events:none;
}

html body #main-content-container[data-sm-page-sheet][data-sm-photo-edge] { padding-top:8px!important; }
html body #main-content-container[data-sm-photo-edge] > .main-content { padding-top:0!important; }

/* Hold the destination's actual sheet for the first paint of an avatar visit. */
html[data-sheet-arrival] body.profile-page #hero-container :is(.hero-loading,.hero-section)::after { display:none!important; }
html[data-sheet-arrival] body.profile-page #main-content-container {
    margin-top:calc(-1 * var(--sm-sheet-radius))!important;
    top:calc(var(--sm-arrival-edge) - var(--sm-hero-height) + var(--sm-sheet-radius));
}
html[data-sheet-arrival][data-public-profile] body.profile-page #main-content-container {
    top:calc(var(--sm-arrival-edge) - var(--sm-hero-height) - var(--sm-detail-hero-extra) + var(--sm-sheet-radius));
}
