/* ============================================================
   SureLife Care and Services — Interactive Virtual Branch Tour
   Cylindrical Panorama Viewer (Light & Dark Theme Studio Aware)
   ============================================================ */

.lp-tour {
    position: relative;
    background: var(--bg-secondary, var(--bg-dark-secondary, #062318));
    overflow: hidden;
}

.lp-tour .section-divider {
    margin: 0 auto 1.25rem;
}

/* ── Branch Selector Pill Bar ── */
.lp-tour-branches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.lp-tour-branch-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--card-border, rgba(101, 163, 13, 0.28));
    background: var(--bg-card, rgba(6, 32, 22, 0.85));
    color: var(--text-body, #cbd5e1);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.lp-tour-branch-pill:hover {
    border-color: var(--accent-primary, #65a30d);
    background: var(--bg-card-hover, rgba(18, 72, 53, 0.9));
    color: var(--text-heading, #ffffff);
    transform: translateY(-1px);
}

.lp-tour-branch-pill.is-active {
    background: var(--nav-btn-bg, linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%));
    border-color: var(--btn-primary-bg, var(--accent-primary, #65a30d));
    color: var(--nav-btn-text, #ffffff);
    box-shadow: 0 8px 22px -6px rgba(15, 23, 42, 0.32);
}

.lp-tour-branch-loc {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.82;
}

.lp-tour-branch-soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.45);
}

html[data-theme-mode="light"] .lp-tour-branch-soon {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* ── Searchable Branch Dropdown (Auto-active when 5+ branches) ── */
.lp-tour-branch-dropdown {
    position: relative;
    max-width: 100%;
}

.lp-tour-branch-drop-trigger {
    max-width: min(92vw, 340px);
}

.lp-tour-branch-drop-trigger svg,
.lp-tour-branch-drop-trigger .lp-tour-drop-chevron,
.lp-tour-branch-drop-trigger .lp-tour-branch-count {
    flex-shrink: 0;
}

#lpTourBranchDropLabel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-tour-branch-count {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--nav-btn-text, #ffffff);
}

.lp-tour-drop-chevron {
    transition: transform 0.2s ease;
}

.lp-tour-branch-dropdown.is-open .lp-tour-drop-chevron {
    transform: rotate(180deg);
}

.lp-tour-branch-drop-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: min(340px, 90vw);
    border-radius: 1rem;
    background: var(--bg-card, #0d3828);
    border: 1.5px solid var(--hero-badge-border, var(--card-border, rgba(101, 163, 13, 0.35)));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    z-index: 650;
    display: none;
    overflow: hidden;
}

.lp-tour-branch-dropdown.is-open .lp-tour-branch-drop-menu {
    display: block;
}

html[data-theme-mode="light"] .lp-tour-branch-drop-menu {
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
}

.lp-tour-branch-search-wrap {
    padding: 0.65rem;
    border-bottom: 1px solid var(--card-border, rgba(101, 163, 13, 0.2));
}

.lp-tour-branch-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid var(--card-border, rgba(148, 163, 184, 0.3));
    background: var(--bg-secondary, rgba(15, 41, 32, 0.85));
    color: var(--text-heading, #f8fafc);
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
}

.lp-tour-branch-search:focus {
    border-color: var(--accent-primary, #65a30d);
}

.lp-tour-branch-options {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lp-tour-branch-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-heading, #e2e8f0);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lp-tour-branch-option:hover {
    background: var(--bg-card-hover, rgba(101, 163, 13, 0.12));
}

.lp-tour-branch-option.is-active {
    background: var(--hero-badge-bg, rgba(101, 163, 13, 0.14));
    border-color: var(--hero-badge-border, var(--accent-primary, #65a30d));
}

.lp-tour-branch-opt-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.lp-tour-branch-opt-name {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-tour-branch-opt-loc {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-tour-branch-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    white-space: nowrap;
    background: var(--hero-badge-bg, rgba(101, 163, 13, 0.14));
    color: var(--hero-badge-text, var(--accent-primary, #65a30d));
    border: 1px solid var(--hero-badge-border, rgba(101, 163, 13, 0.35));
    flex-shrink: 0;
}

.lp-tour-branch-option .lp-tour-branch-live,
.lp-tour-branch-option .lp-tour-branch-soon {
    min-width: 4.9rem;
    text-align: center;
}

.lp-tour-shell {
    position: relative;
    border-radius: 1.25rem;
    border: 1.5px solid var(--card-border, rgba(101, 163, 13, 0.24));
    background: var(--bg-card, #0d3828);
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme-mode="light"] .lp-tour {
    background: linear-gradient(180deg, var(--bg-base, #f8fafc) 0%, var(--bg-secondary, #eef2f6) 100%);
}

html[data-theme-mode="light"] .lp-tour-shell {
    box-shadow: 0 24px 54px -20px rgba(15, 23, 42, 0.16);
}

/* ── Mode Switcher & Interactive Branch Map Fly-In ── */
.lp-tour-mode-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem;
    border-radius: 999px;
    background: var(--bg-card, rgba(6, 32, 22, 0.88));
    border: 1.5px solid var(--card-border, rgba(101, 163, 13, 0.28));
    gap: 0.2rem;
}

.lp-tour-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lp-tour-mode-btn:hover {
    color: var(--text-heading, #f8fafc);
}

.lp-tour-mode-btn.is-active {
    background: var(--nav-btn-bg, linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%));
    color: var(--nav-btn-text, #ffffff);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.24);
}

.lp-tour-map-stage {
    position: relative;
    width: 100%;
    height: clamp(380px, 58vh, 560px);
    background: #04140e;
    overflow: hidden;
    display: none;
}

.lp-tour-shell.is-map-mode .lp-tour-map-stage {
    display: block;
}

.lp-tour-shell.is-map-mode .lp-tour-pano-wrap {
    display: none;
}

.lp-tour-pano-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.lp-tour-map-canvas {
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.45s ease, opacity 0.4s ease;
}

.lp-tour-map-stage.is-diving .lp-tour-map-canvas {
    transform: scale(1.32);
    filter: blur(5px);
    opacity: 0.12;
}

.lp-tour-map-hud {
    position: absolute;
    top: 0.95rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(4, 20, 14, 0.84);
    border: 1.5px solid var(--hero-badge-border, rgba(163, 230, 53, 0.5));
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    max-width: calc(100% - 2rem);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.lp-tour-map-hud-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--accent-primary, #65a30d);
    box-shadow: 0 0 10px var(--accent-primary, #65a30d);
    flex-shrink: 0;
}

.lp-tour-map-actions {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 510;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.lp-tour-map-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1.5px solid var(--hero-badge-border, rgba(163, 230, 53, 0.5));
    background: rgba(4, 20, 14, 0.86);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.lp-tour-map-action-btn:hover,
.lp-tour-map-action-btn.is-active {
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
    border-color: var(--btn-primary-hover, #ffffff);
    transform: translateY(-1px);
}

.lp-tour-map-style-toggle {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    z-index: 510;
}

.lp-tour-map-canvas .maplibregl-ctrl-group {
    background: rgba(4, 20, 14, 0.86);
    border: 1.5px solid var(--hero-badge-border, rgba(163, 230, 53, 0.45));
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.lp-tour-map-canvas .maplibregl-ctrl-group button {
    width: 32px;
    height: 32px;
}

.lp-tour-map-canvas .maplibregl-ctrl-group button + button {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.lp-tour-map-canvas .maplibregl-ctrl-icon {
    filter: invert(1) brightness(1.15);
}

.lp-tour-map-canvas .maplibregl-marker {
    z-index: 5;
}

.lp-tour-map-canvas .maplibregl-marker:hover {
    z-index: 1200 !important;
}

/* Light Mode frosted-white map controls matching the bright Liberty vector map */
html[data-theme-mode="light"] .lp-tour-map-stage {
    background: #e2e8f0;
}

html[data-theme-mode="light"] .lp-tour-map-hud {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    border-color: var(--card-border, rgba(101, 163, 13, 0.3));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

html[data-theme-mode="light"] .lp-tour-map-action-btn {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    border-color: var(--card-border, rgba(101, 163, 13, 0.3));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

html[data-theme-mode="light"] .lp-tour-map-action-btn:hover {
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
    border-color: var(--btn-primary-bg, #65a30d);
}

html[data-theme-mode="light"] .lp-tour-map-canvas .maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--card-border, rgba(101, 163, 13, 0.28));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

html[data-theme-mode="light"] .lp-tour-map-canvas .maplibregl-ctrl-group button + button {
    border-top-color: rgba(15, 23, 42, 0.1);
}

html[data-theme-mode="light"] .lp-tour-map-canvas .maplibregl-ctrl-icon {
    filter: none;
}

.lp-tour-map-action-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.lp-map-user-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #3b82f6;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.35), 0 4px 12px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
}

@media (max-width: 640px) {
    .lp-tour-map-hud {
        top: 0.65rem;
        left: 3.35rem;
        right: 0.65rem;
        transform: none;
        max-width: none;
        padding: 0.36rem 0.72rem;
        font-size: 0.68rem;
    }

    .lp-tour-map-actions {
        top: auto;
        bottom: 0.75rem;
        right: 0.65rem;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.35rem;
    }

    .lp-tour-map-style-toggle {
        left: 0.65rem;
        bottom: 0.75rem;
    }

    .lp-tour-map-action-btn {
        padding: 0.38rem 0.68rem;
        font-size: 0.7rem;
    }
}

/* ── Custom Pulsing SureLife Branch Pin on MapLibre Map ── */
.lp-map-pin-wrap {
    width: 0;
    height: 0;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.lp-map-pin-anchor {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: var(--btn-primary-bg, #65a30d);
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.32), 0 4px 12px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.18s ease;
}

.lp-map-pin-wrap:hover .lp-map-pin-anchor {
    transform: translate(-50%, -50%) scale(1.22);
}

/* ── Zoom-Responsive Dot Mode (zoom <= 12: dots only, label pops on hover) ── */
.lp-tour-map-canvas.is-zoomed-out .lp-map-pin {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 10px)) scale(0.92);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lp-tour-map-canvas.is-zoomed-out .lp-map-pin-wrap:hover {
    z-index: 1200 !important;
}

.lp-tour-map-canvas.is-zoomed-out .lp-map-pin-wrap:hover .lp-map-pin {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, calc(-100% - 18px)) scale(1);
}

.lp-map-pin-anchor::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    border: 2.5px solid var(--accent-primary, #a3e635);
    animation: lpTourPulse 1.8s ease-out infinite;
}

.lp-map-pin {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.46rem 0.95rem;
    border-radius: 999px;
    background: rgba(6, 32, 22, 0.94);
    border: 2px solid var(--accent-primary, #a3e635);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.52);
    transform: translate(-50%, calc(-100% - 16px));
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lp-map-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--accent-primary, #a3e635);
}

.lp-map-pin:hover {
    transform: translate(-50%, calc(-100% - 20px)) scale(1.05);
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
    border-color: #ffffff;
}

.lp-map-pin:hover .lp-map-pin-sub {
    color: var(--btn-primary-text, #ffffff);
    opacity: 0.88;
}

.lp-map-pin:hover::after {
    border-top-color: #ffffff;
}

.lp-map-pin-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent-mint, #bbf7d0);
    margin-left: 0.15rem;
}

.lp-map-pin--soon {
    background: rgba(30, 41, 59, 0.94);
    border-color: #fbbf24;
}

.lp-map-pin--soon::after {
    border-top-color: #fbbf24;
}

.lp-map-pin--soon:hover {
    background: #b45309;
    border-color: #ffffff;
}

.lp-map-pin--soon .lp-map-pin-sub {
    color: #fde68a;
}

.lp-map-pin-anchor--soon {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35), 0 4px 12px rgba(0, 0, 0, 0.55);
}

.lp-map-pin-anchor--soon::after {
    border-color: rgba(251, 191, 36, 0.85);
}

/* ── Top HUD Bar ── */
.lp-tour-topbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--card-border, rgba(101, 163, 13, 0.18));
    background: var(--bg-card, rgba(6, 32, 22, 0.92));
}

.lp-tour-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 0;
    min-width: 0;
}

.lp-tour-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--hero-badge-bg, rgba(101, 163, 13, 0.14));
    color: var(--hero-badge-text, var(--accent-primary, #65a30d));
    border: 1px solid var(--hero-badge-border, rgba(101, 163, 13, 0.35));
    flex-shrink: 0;
}

.lp-tour-scene-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.lp-tour-scene-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-heading, #f8fafc);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-tour-scene-desc {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Control Buttons ── */
.lp-tour-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.lp-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.15rem;
    padding: 0 0.72rem;
    border-radius: 0.65rem;
    border: 1px solid var(--card-border, rgba(148, 163, 184, 0.28));
    background: var(--bg-secondary, rgba(15, 41, 32, 0.85));
    color: var(--text-heading, #e2e8f0);
    font-size: 0.76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.lp-tour-btn:hover {
    background: var(--hero-badge-bg, rgba(101, 163, 13, 0.14));
    border-color: var(--accent-primary, #65a30d);
    color: var(--hero-badge-text, var(--text-heading, #ffffff));
}

.lp-tour-btn:active {
    transform: scale(0.96);
}

.lp-tour-btn[aria-pressed="true"] {
    background: var(--btn-primary-bg, #65a30d);
    border-color: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
}

.lp-tour-btn-icon {
    width: 2.15rem;
    padding: 0;
}

.lp-tour-btn-mapback {
    display: none;
}

.lp-tour-shell:fullscreen .lp-tour-btn-mapback,
.lp-tour-shell.is-fullscreen .lp-tour-btn-mapback {
    display: inline-flex;
}

/* ── Interactive Panorama Viewport ── */
.lp-tour-viewport {
    position: relative;
    width: 100%;
    height: clamp(320px, 52vh, 520px);
    background: #04140e;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    outline: none;
}

.lp-tour-viewport:focus-visible {
    box-shadow: inset 0 0 0 2px var(--accent-primary, #65a30d);
}

.lp-tour-viewport.is-dragging {
    cursor: grabbing;
}

.lp-tour-camera {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: scale(1);
    filter: blur(0px);
    opacity: 1;
    will-change: transform, filter, opacity;
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), filter 0.32s ease, opacity 0.28s ease;
}

.lp-tour-camera.is-travel-out {
    transform: scale(1.38);
    filter: blur(4px);
    opacity: 0.08;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.28s ease, opacity 0.26s ease;
}

.lp-tour-camera.is-travel-out-soft {
    transform: scale(1.1);
    filter: blur(2px);
    opacity: 0.14;
    transition: transform 0.22s ease-out, filter 0.22s ease, opacity 0.2s ease;
}

.lp-tour-camera.is-travel-in-prep {
    transform: scale(1.12);
    filter: blur(2px);
    opacity: 0.12;
    transition: none !important;
}

.lp-tour-stage {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    will-change: transform;
    transform-origin: 0 50%;
    opacity: 1;
    transition: opacity 0.28s ease;
}

.lp-tour-stage.is-switching {
    opacity: 0.15;
}

.lp-tour-tile {
    position: relative;
    height: 100%;
    flex: 0 0 auto;
}

.lp-tour-image {
    display: block;
    height: 100%;
    width: 100%;
    max-width: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* ── Loading Overlay ── */
.lp-tour-loader {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: rgba(4, 20, 14, 0.78);
    backdrop-filter: blur(4px);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lp-tour-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lp-tour-spinner {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 3px solid var(--hero-badge-border, rgba(163, 230, 53, 0.25));
    border-top-color: var(--accent-primary, #65a30d);
    animation: lpTourSpin 0.8s linear infinite;
}

@keyframes lpTourSpin {
    to { transform: rotate(360deg); }
}

/* ── Walk-Through Hotspot Pins ── */
.lp-tour-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lp-tour-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem 0.42rem 0.5rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    background: rgba(6, 46, 32, 0.86);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    z-index: 6;
}

.lp-tour-hotspot:hover,
.lp-tour-hotspot:focus-visible {
    transform: translate(-50%, -50%) scale(1.06);
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
    border-color: #ffffff;
    outline: none;
}

.lp-tour-hotspot-dot {
    position: relative;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-tour-hotspot-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 2px solid var(--accent-primary, #a3e635);
    animation: lpTourPulse 2s ease-out infinite;
}

@keyframes lpTourPulse {
    0% { transform: scale(0.88); opacity: 0.95; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ── Floating Viewport Helpers ── */
.lp-tour-drag-hint {
    position: absolute;
    top: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.36rem 0.85rem;
    border-radius: 999px;
    background: rgba(4, 20, 14, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 600;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.lp-tour-drag-hint.is-faded {
    opacity: 0;
}

/* ── Horizontal Pan Minimap Track ── */
.lp-tour-pan-track {
    position: absolute;
    left: 50%;
    bottom: 0.85rem;
    transform: translateX(-50%);
    z-index: 10;
    width: min(220px, 52%);
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    pointer-events: none;
}

.lp-tour-pan-thumb {
    height: 100%;
    width: 28%;
    border-radius: 999px;
    background: var(--nav-btn-bg, linear-gradient(90deg, #65a30d, #4d7c0f));
    transform: translateX(0);
    will-change: transform, width;
}

/* ── Scene Filmstrip Switcher ── */
.lp-tour-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.9rem 1.25rem 1.1rem;
    background: var(--bg-secondary, rgba(6, 32, 22, 0.94));
    border-top: 1px solid var(--card-border, rgba(101, 163, 13, 0.18));
}

.lp-tour-thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid var(--card-border, transparent);
    background: var(--bg-card, rgba(15, 41, 32, 0.7));
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-tour-thumb:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary, #65a30d);
}

.lp-tour-thumb.is-active {
    border-color: var(--accent-primary, #65a30d);
    box-shadow: 0 0 0 2px var(--hero-badge-bg, rgba(101, 163, 13, 0.28));
}

.lp-tour-thumb-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #04140e;
}

.lp-tour-thumb-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.lp-tour-thumb:hover .lp-tour-thumb-media img {
    transform: scale(1.06);
}

.lp-tour-thumb-num {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    background: rgba(4, 20, 14, 0.8);
    color: var(--accent-primary, #a3e635);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.lp-tour-thumb.is-active .lp-tour-thumb-num {
    background: var(--btn-primary-bg, #65a30d);
    color: var(--btn-primary-text, #ffffff);
}

.lp-tour-thumb-label {
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-heading, #e2e8f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-tour-thumb.is-active .lp-tour-thumb-label {
    color: var(--hero-badge-text, var(--accent-primary, #65a30d));
}

/* ── Fullscreen Mode (Native & Mobile/iOS CSS Fallback — no vendor pseudo-classes in shared lists) ── */
.lp-tour-shell:fullscreen,
.lp-tour-shell.is-fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    z-index: 2147483000;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    background: #04140e;
    transform: none !important;
    filter: none !important;
}

.lp-tour-shell:fullscreen .lp-tour-pano-wrap,
.lp-tour-shell.is-fullscreen .lp-tour-pano-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.lp-tour-shell:fullscreen .lp-tour-map-stage,
.lp-tour-shell.is-fullscreen .lp-tour-map-stage {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.lp-tour-shell:fullscreen .lp-tour-topbar,
.lp-tour-shell.is-fullscreen .lp-tour-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(4, 20, 14, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: max(0.65rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.lp-tour-shell:fullscreen .lp-tour-scene-title,
.lp-tour-shell.is-fullscreen .lp-tour-scene-title {
    color: #f8fafc;
}

.lp-tour-shell:fullscreen .lp-tour-scene-desc,
.lp-tour-shell.is-fullscreen .lp-tour-scene-desc {
    color: #cbd5e1;
}

.lp-tour-shell:fullscreen .lp-tour-btn:not([aria-pressed="true"]),
.lp-tour-shell.is-fullscreen .lp-tour-btn:not([aria-pressed="true"]) {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

.lp-tour-shell:fullscreen .lp-tour-viewport,
.lp-tour-shell.is-fullscreen .lp-tour-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.lp-tour-shell:fullscreen .lp-tour-drag-hint,
.lp-tour-shell.is-fullscreen .lp-tour-drag-hint {
    top: 4.8rem;
}

.lp-tour-shell:fullscreen .lp-tour-pan-track,
.lp-tour-shell.is-fullscreen .lp-tour-pan-track {
    bottom: 0.75rem;
    z-index: 20;
    transition: bottom 0.28s ease, opacity 0.28s ease;
}

.lp-tour-shell:fullscreen:not(.is-fs-ui-hidden) .lp-tour-pan-track,
.lp-tour-shell.is-fullscreen:not(.is-fs-ui-hidden) .lp-tour-pan-track {
    opacity: 0;
}

.lp-tour-shell:fullscreen .lp-tour-strip,
.lp-tour-shell.is-fullscreen .lp-tour-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(4, 20, 14, 0.74);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.lp-tour-shell:fullscreen .lp-tour-thumb,
.lp-tour-shell.is-fullscreen .lp-tour-thumb {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(255, 255, 255, 0.16);
}

.lp-tour-shell:fullscreen .lp-tour-thumb-label,
.lp-tour-shell.is-fullscreen .lp-tour-thumb-label {
    color: #f1f5f9;
}

.lp-tour-shell:fullscreen .lp-tour-thumb.is-active,
.lp-tour-shell.is-fullscreen .lp-tour-thumb.is-active {
    border-color: var(--accent-primary, #a3e635);
}

.lp-tour-shell.is-fs-ui-hidden .lp-tour-topbar {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.lp-tour-shell.is-fs-ui-hidden .lp-tour-strip {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

/* ── Responsive Adjustments (Any Screen Dimension: Mobile Portrait, Landscape, Tablet, Desktop) ── */
@media (max-width: 900px) {
    .lp-tour-strip {
        grid-template-columns: repeat(5, minmax(132px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 0.75rem 0.9rem 0.9rem;
    }
}

@media (max-width: 640px) {
    .lp-tour-topbar {
        flex-wrap: wrap;
        padding: 0.65rem 0.85rem;
        gap: 0.55rem;
    }

    .lp-tour-meta {
        flex: 1 1 100%;
    }

    .lp-tour-scene-desc {
        display: none;
    }

    .lp-tour-btn-label {
        display: none;
    }

    .lp-tour-viewport {
        height: clamp(260px, 50dvh, 420px);
    }

    .lp-tour-map-stage {
        height: clamp(320px, 56dvh, 480px);
    }

    .lp-tour-hotspot {
        font-size: 0.7rem;
        padding: 0.34rem 0.7rem 0.34rem 0.4rem;
    }

    .lp-tour-strip {
        grid-template-columns: repeat(5, minmax(112px, 1fr));
        gap: 0.5rem;
        padding: 0.6rem 0.75rem 0.75rem;
    }

    .lp-tour-thumb-label {
        font-size: 0.68rem;
        padding: 0.35rem 0.45rem;
    }
}

/* Compact chrome in fullscreen on short/landscape mobile viewports */
@media (max-height: 540px) {
    .lp-tour-shell:fullscreen .lp-tour-topbar,
    .lp-tour-shell.is-fullscreen .lp-tour-topbar {
        padding: 0.45rem max(0.85rem, env(safe-area-inset-right)) 0.45rem max(0.85rem, env(safe-area-inset-left));
    }

    .lp-tour-shell:fullscreen .lp-tour-scene-desc,
    .lp-tour-shell.is-fullscreen .lp-tour-scene-desc {
        display: none;
    }

    .lp-tour-shell:fullscreen .lp-tour-strip,
    .lp-tour-shell.is-fullscreen .lp-tour-strip {
        padding: 0.4rem max(0.75rem, env(safe-area-inset-right)) max(0.45rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
        gap: 0.45rem;
    }

    .lp-tour-shell:fullscreen .lp-tour-thumb-media,
    .lp-tour-shell.is-fullscreen .lp-tour-thumb-media {
        display: none;
    }

    .lp-tour-shell:fullscreen .lp-tour-thumb-label,
    .lp-tour-shell.is-fullscreen .lp-tour-thumb-label {
        padding: 0.38rem 0.6rem;
        text-align: center;
    }
}
