/* =====================================================================
   PREVIEW TAILWIND CLEAN CSS — VERSION STABLE
   Remplace entièrement dashboard/css/preview-tailwind.css

   Objectifs gardés :
   - preview plein écran Marzipano
   - transition A/B cinéma stable
   - zoom/pinch mobile stable
   - header/footer sans bandes noires
   - header/footer sans shadow agressif
   - hotspots stables : aucun transform sur le parent Marzipano
   - business hotspots avec loader blanc premium autour du PNG
   - navigation hotspots PNG simples
===================================================================== */

/* =====================================================================
   1) RESET + VARIABLES
===================================================================== */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
}

* {
    box-sizing: border-box;
}

:root {
    --preview-bg-950: #020617;
    --preview-bg-900: #081426;
    --preview-bg-850: #0a1d35;
    --preview-bg-800: #0b2240;

    --preview-white: #ffffff;
    --preview-text-soft: #d7e3f1;
    --preview-text-muted: #9db0c7;

    --preview-cyan-100: #cffafe;
    --preview-cyan-200: #a5f3fc;
    --preview-cyan-300: #67e8f9;
    --preview-cyan-400: #22d3ee;
    --preview-blue-400: #60a5fa;

    --preview-border-white: rgba(255, 255, 255, 0.88);
    --preview-border-soft: rgba(255, 255, 255, 0.38);
    --preview-glass-clear: rgba(0, 0, 0, 0.035);
    --preview-glass-soft: rgba(255, 255, 255, 0.055);
    --preview-glass-panel: rgba(2, 6, 23, 0.72);

    --brand-z: 90;
    --chrome-z: 88;
    --panel-z: 92;
    --info-z: 96;
    --intro-z: 110;
}

body {
    min-height: 100dvh;
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.12), transparent 28%),
        linear-gradient(180deg, var(--preview-bg-950) 0%, var(--preview-bg-900) 46%, var(--preview-bg-800) 100%);
    color: var(--preview-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.hidden {
    display: none !important;
}

.preview-page-shell {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
    background: #020617;
}

@supports (-webkit-touch-callout: none) {
    html,
    body,
    .preview-page-shell,
    #previewViewer,
    .preview-viewer {
        min-height: -webkit-fill-available;
    }
}

/* =====================================================================
   2) VIEWER + MARZIPANO LAYERS
===================================================================== */
#previewViewer,
.preview-viewer {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100svh !important;
    overflow: hidden !important;
    isolation: isolate !important;
    background: #02070d !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
    perspective: 1200px !important;
}

#previewViewer canvas,
.preview-viewer canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Voile permanent supprimé pour éviter les bandes noires haut/bas. */
#previewViewer::after,
.preview-viewer::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    background: transparent !important;
}

/* Voile visible seulement pendant transition cinéma. */
#previewViewer::before,
.preview-viewer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at center, transparent 36%, rgba(0, 0, 0, 0.20) 76%, rgba(0, 0, 0, 0.36) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.16));
    transition: opacity 360ms ease;
}

#previewViewer.is-cinematic-transition::before,
#previewViewer.transitioning::before,
.preview-viewer.is-cinematic-transition::before,
.preview-viewer.transitioning::before {
    opacity: 1 !important;
}

#previewLayerA,
#previewLayerB,
.preview-layer,
.marzipano-layer {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(1.035);
    transform-origin: center center !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform, opacity, filter !important;
    filter: blur(0) brightness(1) saturate(1);
    transition:
        opacity 760ms ease,
        transform 820ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 760ms ease;
    touch-action: none !important;
    -ms-touch-action: none !important;
}

#previewMountA,
#previewMountB,
.preview-mount,
.marzipano-mount {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
}

.preview-layer.active-layer,
.marzipano-layer.active-layer {
    opacity: 1 !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(0) brightness(1) saturate(1) !important;
}

.preview-layer.standby-layer,
.marzipano-layer.standby-layer {
    opacity: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    transform: translate3d(0, 0, 0) scale(1.035) !important;
    filter: blur(0) brightness(1) saturate(1) !important;
}

.preview-viewer.is-cinematic-transition .preview-layer,
.preview-viewer.transitioning .preview-layer {
    transition: none !important;
}

.preview-layer.layer-outgoing,
.preview-viewer.is-cinematic-transition .layer-outgoing,
.preview-viewer.transitioning .layer-outgoing {
    z-index: 2 !important;
    pointer-events: none !important;
    animation: previewPanoOutgoingCinematic 860ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.preview-layer.layer-incoming,
.preview-viewer.is-cinematic-transition .layer-incoming,
.preview-viewer.transitioning .layer-incoming {
    z-index: 3 !important;
    pointer-events: auto !important;
    animation: previewPanoIncomingCinematic 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.preview-viewer.is-opening .active-layer {
    animation: previewPanoInitialReveal 920ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes previewPanoOutgoingCinematic {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        filter: blur(0) brightness(1) saturate(1);
    }
    45% {
        transform: translate3d(0, 0, 0) scale(1.08);
        opacity: 0.78;
        filter: blur(0.45px) brightness(0.96) saturate(1.01);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.16);
        opacity: 0;
        filter: blur(1.8px) brightness(0.88) saturate(0.96);
    }
}

@keyframes previewPanoIncomingCinematic {
    0% {
        transform: translate3d(0, 0, 0) scale(1.12);
        opacity: 0;
        filter: blur(2.2px) brightness(0.88) saturate(0.96);
    }
    55% {
        transform: translate3d(0, 0, 0) scale(1.04);
        opacity: 0.78;
        filter: blur(0.55px) brightness(0.97) saturate(1.01);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        filter: blur(0) brightness(1) saturate(1);
    }
}

@keyframes previewPanoInitialReveal {
    0% {
        transform: translate3d(0, 0, 0) scale(1.08);
        opacity: 0.70;
        filter: blur(1.2px) brightness(0.92);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        filter: blur(0) brightness(1);
    }
}

/* =====================================================================
   3) SUPPRESSION DES BANDES NOIRES TOP/BOTTOM DU HTML
===================================================================== */
#previewViewer > .pointer-events-none.absolute.inset-x-0.top-0,
#previewViewer > .pointer-events-none.absolute.inset-x-0.bottom-0,
.preview-viewer > .pointer-events-none.absolute.inset-x-0.top-0,
.preview-viewer > .pointer-events-none.absolute.inset-x-0.bottom-0 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: transparent !important;
    pointer-events: none !important;
}

/* =====================================================================
   4) INTRO OVERLAY
===================================================================== */
.preview-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: var(--intro-z) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 16%, rgba(34, 211, 238, 0.20), transparent 30%),
        radial-gradient(circle at 86% 88%, rgba(96, 165, 250, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(8, 20, 38, 0.90));
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: opacity 0.9s ease, visibility 0.9s ease, transform 0.9s ease;
}

.preview-intro-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    pointer-events: none;
}

.preview-intro-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    pointer-events: none;
}

.preview-intro-glow-a {
    width: 280px;
    height: 280px;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(103, 232, 249, 0.16);
}

.preview-intro-glow-b {
    width: 320px;
    height: 320px;
    right: 8%;
    bottom: 10%;
    background: rgba(96, 165, 250, 0.13);
}

.preview-intro-card {
    position: relative;
    width: min(92vw, 460px);
    padding: 28px 24px 22px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    text-align: center;
    overflow: hidden;
}

.preview-intro-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.16), transparent 45%);
    pointer-events: none;
}

.preview-intro-logo-wrap,
.preview-intro-text,
.preview-intro-loader {
    position: relative;
    z-index: 1;
}

.preview-intro-logo-wrap {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.preview-intro-logo {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.preview-intro-logo-fallback {
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 950;
    color: #d9f8ff;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.24), rgba(96, 165, 250, 0.22));
}

.preview-intro-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-weight: 950;
    color: rgba(186, 245, 255, 0.92);
}

.preview-intro-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.preview-intro-subtitle {
    margin: 10px 0 0;
    color: var(--preview-text-soft);
    font-size: 14px;
    font-weight: 700;
}

.preview-intro-loader {
    margin-top: 22px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.preview-intro-loader-bar {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--preview-cyan-200), var(--preview-cyan-300), var(--preview-blue-400));
    animation: previewLoaderMove 1.3s ease-in-out infinite;
}

@keyframes previewLoaderMove {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

/* =====================================================================
   5) HEADER / BRAND — SANS BANDE NOIRE, SANS SHADOW LOURD
===================================================================== */
#brandOverlay,
.brand-overlay-wrap {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: var(--brand-z) !important;
    width: auto !important;
    max-width: calc(100vw - 18px) !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    pointer-events: none !important;
}

.brand-overlay-chip,
.brand-overlay-chip-centered,
.brand-header-chip {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    min-height: 44px !important;
    width: auto !important;
    max-width: min(520px, calc(100vw - 18px)) !important;
    padding: 5px 14px 5px 6px !important;
    border-radius: 999px !important;
    border: 1.25px solid rgba(255, 255, 255, 0.88) !important;
    background: rgba(0, 0, 0, 0.035) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.brand-overlay-chip::before,
.brand-overlay-chip::after,
.brand-header-chip::before,
.brand-header-chip::after {
    content: none !important;
    display: none !important;
}

.brand-logo-frame {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 auto !important;
    width: 33px !important;
    height: 33px !important;
    min-width: 33px !important;
    min-height: 33px !important;
    border-radius: 999px !important;
    border: 1.1px solid rgba(255, 255, 255, 0.90) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    overflow: hidden !important;
    box-shadow: none !important;
    filter: none !important;
}

.brand-logo-frame img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 2px !important;
    margin: 0 !important;
    opacity: 1 !important;
    filter: none !important;
    image-rendering: auto !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.brand-logo-fallback {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

.brand-overlay-chip .min-w-0,
.brand-header-chip .min-w-0 {
    min-width: 0 !important;
    text-align: left !important;
}

.brand-kicker {
    display: none !important;
}

.brand-company-name {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
    font-weight: 950 !important;
    letter-spacing: -0.02em !important;
    max-width: 310px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: left !important;
    text-shadow: none !important;
    filter: none !important;
}

#previewSceneTitle,
.preview-scene-title-chip,
.scene-title-chip,
.viewer-scene-title,
.preview-top-actions,
.top-right-actions,
.top-floating-actions {
    display: none !important;
}

/* =====================================================================
   6) FOOTER / DOCK — SANS BANDE NOIRE, SANS SHADOW LOURD
===================================================================== */
#previewControlDock,
.viewer-bottom-chrome {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    transform: translateX(-50%) !important;
    z-index: var(--chrome-z) !important;
    width: min(760px, calc(100vw - 12px)) !important;
    max-width: calc(100vw - 12px) !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    pointer-events: none !important;
}

.viewer-bottom-chrome-inner,
#previewControlDock > .viewer-bottom-chrome-inner {
    width: 100%;
    display: flex;
    justify-content: center;
}

.viewer-bottom-chrome-card,
#previewControlDock .viewer-bottom-chrome-card,
#previewControlDock .dock-scroll {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px !important;
    border: 1.25px solid rgba(255, 255, 255, 0.78) !important;
    background: rgba(0, 0, 0, 0.035) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 7px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
    pointer-events: auto !important;
}

#previewControlDock .dock-scroll::-webkit-scrollbar,
.dock-scroll::-webkit-scrollbar {
    display: none !important;
}

.dock-row,
#previewControlDock .dock-row {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    position: relative;
}

.dock-divider,
#previewControlDock .dock-divider {
    width: 1px !important;
    height: 28px !important;
    margin: 0 1px !important;
    background: rgba(255, 255, 255, 0.42) !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}

.control-btn,
#previewControlDock .control-btn,
#previewControlDock .scene-stack-toggle-inline,
.scene-stack-toggle-inline {
    position: relative !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease !important;
    flex-shrink: 0 !important;
}

#previewControlDock .scene-stack-toggle-inline,
.scene-stack-toggle-inline {
    width: 56px !important;
    min-width: 56px !important;
    perspective: 900px;
    overflow: hidden;
}

#previewControlDock .control-btn:hover,
#previewControlDock .scene-stack-toggle-inline:hover,
#previewControlDock .control-btn.active,
#previewControlDock .scene-stack-toggle-inline.open,
.control-btn:hover,
.scene-stack-toggle-inline:hover,
.control-btn.active,
.scene-stack-toggle-inline.open {
    background: rgba(255, 255, 255, 0.10) !important;
    border-color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

#previewControlDock .control-btn:active,
#previewControlDock .scene-stack-toggle-inline:active,
.control-btn:active,
.scene-stack-toggle-inline:active {
    transform: translateY(0) scale(0.97) !important;
}

.control-btn .label,
.control-btn .btn-label {
    display: none !important;
}

.control-btn svg,
.control-btn i,
.control-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.scene-stack-mini-preview,
#previewControlDock .scene-stack-mini-preview {
    position: relative;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
    transform-style: preserve-3d;
}

.scene-stack-mini-card,
#previewControlDock .scene-stack-mini-card {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.scene-stack-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-stack-mini-card:nth-child(1) {
    transform: translate3d(0, 0, 18px) rotate(0deg);
    z-index: 3;
}

.scene-stack-mini-card:nth-child(2) {
    transform: translate3d(4px, 4px, 8px) rotate(6deg);
    z-index: 2;
}

.scene-stack-mini-card:nth-child(3) {
    transform: translate3d(8px, 8px, 0) rotate(11deg);
    z-index: 1;
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(1) {
    transform: translate3d(-8px, -11px, 24px) rotate(-12deg);
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(2) {
    transform: translate3d(6px, 1px, 12px) rotate(4deg);
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(3) {
    transform: translate3d(15px, 12px, 0) rotate(15deg);
}

.scene-stack-badge,
#previewControlDock .scene-stack-badge {
    position: absolute;
    right: 2px !important;
    top: 2px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

/* =====================================================================
   7) SCENE STACK PANEL
===================================================================== */
.scene-stack-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.scene-stack-panel,
#previewSceneRail {
    position: absolute !important;
    left: 0 !important;
    bottom: calc(100% + 10px) !important;
    width: min(92vw, 330px) !important;
    max-height: min(58vh, 480px) !important;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: var(--panel-z) !important;
}

.scene-stack-panel.open,
#previewSceneRail.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scene-stack-panel-inner,
#previewSceneRail .scene-stack-panel-inner {
    max-height: min(58vh, 480px) !important;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 24px !important;
    border: 1.25px solid rgba(255, 255, 255, 0.84) !important;
    background: rgba(0, 0, 0, 0.14) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28) !important;
    padding: 12px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.scene-stack-panel-inner::-webkit-scrollbar {
    width: 8px;
}

.scene-stack-panel-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.scene-stack-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scene-card,
#previewSceneRail .scene-card {
    position: relative;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.38) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #ffffff;
    cursor: pointer;
    padding: 9px !important;
    text-align: left;
    overflow: hidden;
    opacity: 0;
    transform: translateY(22px) scale(0.97);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, opacity 0.28s ease;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.scene-stack-panel.open .scene-card,
#previewSceneRail.open .scene-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: calc(var(--stagger, 0) * 45ms);
}

.scene-card:hover {
    border-color: rgba(255, 255, 255, 0.72) !important;
    background: rgba(255, 255, 255, 0.075) !important;
    transform: translateY(-2px);
}

.scene-card.active,
#previewSceneRail .scene-card.active {
    border-color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.scene-thumb {
    position: relative;
    width: 88px !important;
    height: 66px !important;
    overflow: hidden;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.08);
}

.scene-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--preview-text-soft);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.scene-body {
    min-width: 0;
    align-self: center;
}

.scene-title {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: -0.02em;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scene-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--preview-text-soft);
    font-size: 11px;
    font-weight: 700;
}

.scene-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(165, 243, 252, 0.9);
    box-shadow: 0 0 12px rgba(165, 243, 252, 0.65);
}

/* =====================================================================
   8) HOTSPOTS — STABLE MARZIPANO + BUSINESS LOADER
===================================================================== */
/* IMPORTANT : Marzipano positionne le parent .preview-hotspot avec transform inline.
   Donc on ne met jamais transform:none/scale/translate sur ce parent. */
.preview-hotspot,
.preview-hotspot:hover,
.preview-hotspot:active,
.preview-hotspot:focus {
    position: relative;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    filter: none !important;
    color: transparent !important;
    text-shadow: none !important;
    will-change: auto !important;
    touch-action: none !important;
    contain: layout style !important;
}

.preview-hotspot::before,
.preview-hotspot::after,
.preview-hotspot:hover::before,
.preview-hotspot:hover::after {
    content: none !important;
    display: none !important;
}

.preview-hotspot .hotspot-grow-wrap {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: var(--hotspot-base-transform, none) !important;
    transform-origin: center center !important;
    will-change: transform, opacity !important;
    pointer-events: none !important;
}

.preview-hotspot .hotspot-label-text,
.preview-hotspot .hotspot-title,
.preview-hotspot .hotspot-name,
.preview-hotspot .hotspot-caption,
.preview-hotspot .hotspot-tooltip,
.preview-hotspot .hotspot-text,
.preview-hotspot .label,
.preview-hotspot .title,
.preview-hotspot span:not(.hotspot-grow-wrap) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    pointer-events: none !important;
}

/* Business hotspots : fonctionne avec la classe premium OU les classes kind business. */
.preview-hotspot.hotspot-business-premium .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-product .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-info .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-ad .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-cta .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-cart .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-whatsapp .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-phone .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-website .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-email .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-custom .hotspot-grow-wrap,
.preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap {
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1.35px solid rgba(255, 255, 255, 0.92) !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.26),
        0 0 0 4px rgba(255, 255, 255, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: premiumHotspotSoftPulse 2.85s ease-in-out infinite !important;
    animation-delay: var(--hotspot-loader-delay, var(--hotspot-grow-delay, 0ms)) !important;
}

/* Anneau blanc discret. */
.preview-hotspot.hotspot-business-premium .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-product .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-info .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-ad .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-cta .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-cart .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-whatsapp .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-phone .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-website .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-email .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-custom .hotspot-grow-wrap::before,
.preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap::before {
    content: "" !important;
    position: absolute !important;
    inset: -5px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* Loader blanc tournant. */
.preview-hotspot.hotspot-business-premium .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-product .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-info .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-ad .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-cta .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-cart .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-whatsapp .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-phone .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-website .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-email .hotspot-grow-wrap::after,
.preview-hotspot.hotspot-kind-custom .hotspot-grow-wrap::after,
.preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap::after {
    content: "" !important;
    position: absolute !important;
    inset: -8px !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background:
        conic-gradient(
            from 0deg,
            rgba(255, 255, 255, 0) 0deg,
            rgba(255, 255, 255, 0) 92deg,
            rgba(255, 255, 255, 0.30) 138deg,
            rgba(255, 255, 255, 1) 178deg,
            rgba(255, 255, 255, 0.34) 218deg,
            rgba(255, 255, 255, 0) 278deg,
            rgba(255, 255, 255, 0) 360deg
        ) !important;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0) !important;
    mask-composite: exclude !important;
    filter:
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.55))
        drop-shadow(0 0 14px rgba(255, 255, 255, 0.22)) !important;
    opacity: 0.96 !important;
    pointer-events: none !important;
    animation: premiumHotspotWhiteLoaderSpin 1.05s linear infinite !important;
    animation-delay: var(--hotspot-loader-delay, var(--hotspot-grow-delay, 0ms)) !important;
}

.preview-hotspot:not(.hotspot-kind-navigate) img,
.preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap img {
    position: relative !important;
    z-index: 2 !important;
    display: block !important;
    width: 76% !important;
    height: 76% !important;
    max-width: 76% !important;
    max-height: 76% !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    image-rendering: auto !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    filter:
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.34))
        drop-shadow(0 10px 18px rgba(0, 0, 0, 0.20)) !important;
}

.preview-hotspot:not(.hotspot-kind-navigate):hover .hotspot-grow-wrap,
.preview-hotspot:not(.hotspot-kind-navigate):active .hotspot-grow-wrap {
    background: rgba(255, 255, 255, 0.065) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.32),
        0 0 0 5px rgba(255, 255, 255, 0.060),
        inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.preview-hotspot:not(.hotspot-kind-navigate):hover img,
.preview-hotspot:not(.hotspot-kind-navigate):active img {
    transform: translateZ(0) scale(1.035) !important;
}

/* Navigation hotspots : PNG simple, aucune pastille, aucun loader. */
.preview-hotspot.hotspot-kind-navigate,
.preview-hotspot.hotspot-kind-navigate .hotspot-grow-wrap,
.preview-hotspot.hotspot-kind-navigate.variant-label,
.preview-hotspot.hotspot-kind-navigate.variant-floor,
.preview-hotspot.hotspot-kind-navigate.variant-flat {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.preview-hotspot.hotspot-kind-navigate .hotspot-grow-wrap::before,
.preview-hotspot.hotspot-kind-navigate .hotspot-grow-wrap::after {
    content: none !important;
    display: none !important;
}

.preview-hotspot.hotspot-kind-navigate img,
.preview-hotspot.hotspot-kind-navigate .hotspot-grow-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0.98 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter:
        drop-shadow(0 3px 5px rgba(0, 0, 0, 0.34))
        drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22)) !important;
}

@keyframes premiumHotspotWhiteLoaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes premiumHotspotSoftPulse {
    0%, 100% {
        transform: var(--hotspot-base-transform, none) scale(1);
        opacity: 1;
    }
    50% {
        transform: var(--hotspot-base-transform, none) scale(1.035);
        opacity: 0.97;
    }
}

/* =====================================================================
   9) INFO PANEL / AD PRODUCT PANEL
===================================================================== */
.info-backdrop,
#previewInfoBackdrop {
    background: rgba(2, 6, 23, 0.20) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.info-backdrop.open,
#previewInfoBackdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.info-panel,
#previewInfoPanel {
    z-index: var(--info-z) !important;
    border-radius: 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.66)) !important;
    backdrop-filter: blur(22px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(155%) !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.30) !important;
    color: #ffffff !important;
    transform: translateX(115%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.info-panel.open,
#previewInfoPanel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.info-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

.info-media-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--preview-text-soft);
    font-size: 14px;
    font-weight: 800;
}

/* Le panneau info garde son scroll vertical. */
#previewInfoPanel,
#previewInfoPanel * {
    touch-action: pan-y !important;
}

/* =====================================================================
   10) LOADING SCENE OVERLAY
===================================================================== */
.preview-scene-loading-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 4 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    background: transparent !important;
    transition: opacity 220ms ease, visibility 220ms ease !important;
}

.preview-scene-loading-overlay.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.preview-scene-loading-image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1) !important;
}

.preview-scene-loading-image.hidden {
    display: none !important;
}

.preview-scene-loading-shade,
.preview-scene-loading-chip,
.preview-scene-loading-dot {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.preview-viewer.transitioning .preview-scene-loading-overlay,
.preview-viewer.is-cinematic-transition .preview-scene-loading-overlay,
.preview-viewer.mobile-cinematic-running .preview-scene-loading-overlay {
    opacity: 0 !important;
    display: none !important;
}

/* =====================================================================
   11) TOAST + UI HIDE MODE
===================================================================== */
#previewToast {
    z-index: 95 !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(15, 23, 42, 0.70) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26) !important;
}

.toast-show {
    opacity: 1 !important;
    transform: translate(-50%, -8px) !important;
}

[data-ui="chrome"] {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.ui-hidden [data-ui="chrome"] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

/* Les contrôles gardent leurs clics normaux. */
#previewControlDock,
#previewControlDock *,
#previewSceneRail,
#previewSceneRail *,
[data-ui="chrome"],
[data-ui="chrome"] * {
    touch-action: manipulation !important;
}

/* Nettoyage shadows Tailwind éventuelles dans header/footer. */
#previewControlDock .shadow-premium,
#previewControlDock .shadow-glow,
#previewControlDock .shadow-soft,
#brandOverlay .shadow-premium,
#brandOverlay .shadow-glow,
#brandOverlay .shadow-soft,
#brandOverlay,
#previewControlDock {
    box-shadow: none !important;
}

/* Pas de flou global sur la UI. */
.brand-overlay-chip *,
#previewControlDock * {
    filter: none;
}

/* Remettre les ombres PNG hotspots après le reset UI. */
.preview-hotspot:not(.hotspot-kind-navigate) img,
.preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap img {
    filter:
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.34))
        drop-shadow(0 10px 18px rgba(0, 0, 0, 0.20)) !important;
}

.preview-hotspot.hotspot-kind-navigate img,
.preview-hotspot.hotspot-kind-navigate .hotspot-grow-wrap img {
    filter:
        drop-shadow(0 3px 5px rgba(0, 0, 0, 0.34))
        drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22)) !important;
}

/* =====================================================================
   12) RESPONSIVE TABLET / MOBILE
===================================================================== */
@media (max-width: 1024px) {
    #brandOverlay,
    .brand-overlay-wrap {
        top: calc(env(safe-area-inset-top, 0px) + 9px) !important;
    }

    #previewControlDock,
    .viewer-bottom-chrome {
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
    }

    .scene-stack-panel,
    #previewSceneRail {
        width: min(92vw, 330px) !important;
    }
}

@media (max-width: 768px) {
    html,
    body,
    .preview-page-shell,
    #previewViewer,
    .preview-viewer {
        touch-action: none !important;
        -ms-touch-action: none !important;
    }

    .preview-intro-card {
        padding: 24px 18px 18px;
        border-radius: 26px;
    }

    .preview-intro-logo {
        width: 70px;
        height: 70px;
    }

    #brandOverlay,
    .brand-overlay-wrap {
        top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 14px) !important;
    }

    .brand-overlay-chip,
    .brand-overlay-chip-centered,
    .brand-header-chip {
        max-width: min(270px, calc(100vw - 14px)) !important;
        min-height: 41px !important;
        padding: 5px 11px 5px 6px !important;
        gap: 8px !important;
    }

    .brand-logo-frame {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }

    .brand-company-name {
        max-width: 190px !important;
        font-size: 12px !important;
    }

    #previewControlDock,
    .viewer-bottom-chrome {
        width: calc(100vw - 10px) !important;
        max-width: calc(100vw - 10px) !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 7px) !important;
    }

    #previewControlDock .dock-scroll,
    .viewer-bottom-chrome-card {
        border-radius: 21px !important;
        padding: 6px !important;
    }

    #previewControlDock .dock-row,
    .dock-row {
        gap: 6px !important;
    }

    #previewControlDock .control-btn,
    .control-btn {
        width: 39px !important;
        min-width: 39px !important;
        height: 39px !important;
        border-radius: 14px !important;
        font-size: 16px !important;
    }

    #previewControlDock .scene-stack-toggle-inline,
    .scene-stack-toggle-inline {
        width: 53px !important;
        min-width: 53px !important;
        height: 39px !important;
        border-radius: 14px !important;
    }

    #previewControlDock .scene-stack-mini-preview,
    .scene-stack-mini-preview {
        width: 25px !important;
        height: 25px !important;
    }

    #previewControlDock .dock-divider,
    .dock-divider {
        height: 23px !important;
    }

    #previewSceneRail.scene-stack-panel,
    .scene-stack-panel {
        left: 0 !important;
        bottom: calc(100% + 8px) !important;
        width: min(92vw, 330px) !important;
        max-height: min(52vh, 400px) !important;
    }

    .scene-stack-panel-inner,
    #previewSceneRail .scene-stack-panel-inner {
        max-height: min(52vh, 400px) !important;
        border-radius: 24px !important;
        padding: 12px !important;
    }

    .scene-card,
    #previewSceneRail .scene-card {
        grid-template-columns: 88px minmax(0, 1fr) !important;
        gap: 10px !important;
        border-radius: 18px !important;
        padding: 9px !important;
    }

    .scene-thumb {
        width: 88px !important;
        height: 66px !important;
        border-radius: 15px !important;
    }

    .scene-title {
        font-size: 14px !important;
    }

    .scene-subtitle {
        font-size: 11px !important;
    }

    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap {
        border-width: 1.2px !important;
        box-shadow:
            0 8px 18px rgba(0, 0, 0, 0.26),
            0 0 0 3px rgba(255, 255, 255, 0.040),
            inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
    }

    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap::before {
        inset: -4px !important;
    }

    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap::after {
        inset: -7px !important;
        padding: 1.8px !important;
        animation-duration: 1.15s !important;
    }

    .preview-hotspot:not(.hotspot-kind-navigate) img,
    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap img {
        width: 78% !important;
        height: 78% !important;
        max-width: 78% !important;
        max-height: 78% !important;
    }

    .preview-layer.layer-outgoing,
    .preview-viewer.is-cinematic-transition .layer-outgoing,
    .preview-viewer.transitioning .layer-outgoing {
        animation-duration: 620ms !important;
    }

    .preview-layer.layer-incoming,
    .preview-viewer.is-cinematic-transition .layer-incoming,
    .preview-viewer.transitioning .layer-incoming {
        animation-duration: 660ms !important;
    }

    #previewInfoPanel,
    .info-panel {
        right: 10px !important;
        left: 10px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
        width: auto !important;
        max-width: none !important;
        border-radius: 24px !important;
        transform: translateY(120%) !important;
    }

    #previewInfoPanel.open,
    .info-panel.open {
        transform: translateY(0) !important;
    }

    #previewToast {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
    }
}

@media (max-width: 480px) {
    .brand-overlay-chip,
    .brand-overlay-chip-centered,
    .brand-header-chip {
        max-width: min(235px, calc(100vw - 12px)) !important;
    }

    .brand-company-name {
        max-width: 155px !important;
        font-size: 11.5px !important;
    }

    #previewControlDock .control-btn,
    .control-btn {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        border-radius: 13px !important;
        font-size: 15px !important;
    }

    #previewControlDock .scene-stack-toggle-inline,
    .scene-stack-toggle-inline {
        width: 52px !important;
        min-width: 52px !important;
        height: 38px !important;
        border-radius: 13px !important;
    }

    .scene-card,
    #previewSceneRail .scene-card {
        grid-template-columns: 82px minmax(0, 1fr) !important;
    }

    .scene-thumb {
        width: 82px !important;
        height: 62px !important;
    }

    #previewInfoPanel,
    .info-panel {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 68px) !important;
    }

    #previewToast {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
    }
}

/* =====================================================================
   13) ACCESSIBILITÉ / REDUCED MOTION
===================================================================== */
@media (prefers-reduced-motion: reduce) {
    .preview-layer,
    .preview-layer.layer-outgoing,
    .preview-layer.layer-incoming,
    .preview-viewer.is-opening .active-layer {
        animation: none !important;
        transition: opacity 180ms ease !important;
        transform: translate3d(0, 0, 0) scale(1) !important;
        filter: none !important;
    }

    #previewViewer::before,
    .preview-viewer::before {
        transition: none !important;
        opacity: 0 !important;
    }

    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap,
    .preview-hotspot:not(.hotspot-kind-navigate) .hotspot-grow-wrap::after {
        animation: none !important;
    }
}

/* =====================================================================
   FINAL OVERRIDE — PREVIEW BUILDER-LIKE CINEMATIC CLEAN
   À garder tout à la fin de preview-tailwind.css
   Objectif : même déplacement que le Builder, sans barre/voile noir
   après la transition et sans overlay tunnel.
===================================================================== */
#previewViewer,
.preview-viewer {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
    background: #020617 !important;
}

#previewViewer.is-cinematic-transition::before,
#previewViewer.transitioning::before,
#previewViewer.is-walk-transition::before,
#previewViewer.is-cinematic-transition::after,
#previewViewer.transitioning::after,
#previewViewer.is-walk-transition::after,
.preview-viewer.is-cinematic-transition::before,
.preview-viewer.transitioning::before,
.preview-viewer.is-walk-transition::before,
.preview-viewer.is-cinematic-transition::after,
.preview-viewer.transitioning::after,
.preview-viewer.is-walk-transition::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    background: transparent !important;
    animation: none !important;
}

.preview-walk-overlay,
#previewWalkOverlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    animation: none !important;
}

#previewLayerA,
#previewLayerB,
.preview-layer {
    position: absolute !important;
    inset: 0 !important;
    transform-origin: center center !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform, opacity, filter !important;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0) brightness(1) saturate(1);
}

#previewMountA,
#previewMountB,
.preview-mount {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
}

.preview-layer.active-layer {
    opacity: 1 !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(0) brightness(1) saturate(1) !important;
}

.preview-layer.standby-layer {
    opacity: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(0) brightness(1) saturate(1) !important;
}

.preview-viewer.is-cinematic-transition .preview-layer,
.preview-viewer.transitioning .preview-layer,
#previewViewer.is-cinematic-transition .preview-layer,
#previewViewer.transitioning .preview-layer {
    transition: none !important;
}

.preview-layer.layer-outgoing,
.preview-viewer.is-cinematic-transition .layer-outgoing,
.preview-viewer.transitioning .layer-outgoing,
#previewViewer.is-cinematic-transition .layer-outgoing,
#previewViewer.transitioning .layer-outgoing {
    z-index: 2 !important;
    pointer-events: none !important;
    animation: previewBuilderOutgoingClean 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.preview-layer.layer-incoming,
.preview-viewer.is-cinematic-transition .layer-incoming,
.preview-viewer.transitioning .layer-incoming,
#previewViewer.is-cinematic-transition .layer-incoming,
#previewViewer.transitioning .layer-incoming {
    z-index: 3 !important;
    pointer-events: auto !important;
    animation: previewBuilderIncomingClean 1150ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.preview-layer.layer-incoming::after,
.preview-viewer.is-cinematic-transition .layer-incoming::after,
.preview-viewer.transitioning .layer-incoming::after,
#previewViewer.is-cinematic-transition .layer-incoming::after,
#previewViewer.transitioning .layer-incoming::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    background: transparent !important;
    animation: none !important;
}

@keyframes previewBuilderOutgoingClean {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        filter: blur(0px) brightness(1) saturate(1);
    }
    32% {
        transform: translate3d(0, 0, 0) scale(1.10);
        opacity: 1;
        filter: blur(0.15px) brightness(1) saturate(1);
    }
    52% {
        transform: translate3d(0, 0, 0) scale(1.16);
        opacity: 0.92;
        filter: blur(0.65px) brightness(1) saturate(1);
    }
    72% {
        transform: translate3d(0, 0, 0) scale(1.20);
        opacity: 0.62;
        filter: blur(1.4px) brightness(1) saturate(1);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.24);
        opacity: 0;
        filter: blur(2.4px) brightness(1) saturate(1);
    }
}

@keyframes previewBuilderIncomingClean {
    0% {
        transform: translate3d(0, 0, 0) scale(1.18);
        opacity: 0;
        filter: blur(3px) brightness(1) saturate(1);
    }
    25% {
        transform: translate3d(0, 0, 0) scale(1.15);
        opacity: 0.16;
        filter: blur(2.5px) brightness(1) saturate(1);
    }
    48% {
        transform: translate3d(0, 0, 0) scale(1.10);
        opacity: 0.48;
        filter: blur(1.7px) brightness(1) saturate(1);
    }
    68% {
        transform: translate3d(0, 0, 0) scale(1.06);
        opacity: 0.78;
        filter: blur(0.8px) brightness(1) saturate(1);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        filter: blur(0px) brightness(1) saturate(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .preview-layer.layer-outgoing,
    .preview-layer.layer-incoming {
        animation: none !important;
        transform: translate3d(0, 0, 0) scale(1) !important;
        filter: none !important;
    }
}
/* =====================================================================
   HOTSPOT INFO PANEL — MODAL 3D FLIP PREMIUM
   À ajouter À LA FIN de dashboard/css/preview-tailwind.css
   Devant : image seulement. Derrière : description hotspot.
===================================================================== */

#previewInfoBackdrop.info-backdrop {
    z-index: 93 !important;
    background:
        radial-gradient(circle at 50% 45%, rgba(103, 232, 249, 0.10), transparent 30%),
        rgba(2, 6, 23, 0.28) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

#previewInfoBackdrop.info-backdrop.open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#previewInfoPanel.hotspot-info-panel-3d,
.info-panel.hotspot-info-panel-3d {
    z-index: 98 !important;
    width: min(430px, calc(100vw - 28px)) !important;
    height: min(640px, calc(100dvh - 142px)) !important;
    max-height: calc(100dvh - 142px) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    perspective: 1500px !important;
    transform: translateX(118%) scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.26s ease !important;
    touch-action: manipulation !important;
}

#previewInfoPanel.hotspot-info-panel-3d.open,
.info-panel.hotspot-info-panel-3d.open {
    transform: translateX(0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.hotspot-info-3d-shell {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1500px;
    -webkit-perspective: 1500px;
}

.hotspot-info-3d-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: rotateY(0deg) translateZ(0);
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

#previewInfoPanel.is-flipped .hotspot-info-3d-card {
    transform: rotateY(180deg) translateZ(0);
}

.hotspot-info-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 30px;
    border: 1.25px solid rgba(255, 255, 255, 0.22);
    background: rgba(2, 6, 23, 0.88);
    color: #ffffff;
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.hotspot-info-front {
    justify-content: flex-end;
    background:
        radial-gradient(circle at 50% 20%, rgba(103, 232, 249, 0.18), transparent 32%),
        #020617;
}

.hotspot-info-back {
    transform: rotateY(180deg) translateZ(0);
    background:
        radial-gradient(circle at 16% 8%, rgba(103, 232, 249, 0.18), transparent 34%),
        radial-gradient(circle at 95% 88%, rgba(96, 165, 250, 0.16), transparent 30%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.hotspot-info-front-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(103, 232, 249, 0.16), transparent 34%),
        linear-gradient(135deg, #020617, #0f172a);
}

.hotspot-info-front-media img,
.hotspot-info-front-media .info-media-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: scale(1.012) translateZ(0) !important;
    filter: saturate(1.08) contrast(1.04) brightness(0.96) !important;
    cursor: zoom-in;
}

.hotspot-info-front-media .info-media-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hotspot-info-front-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.10) 0%, transparent 32%, rgba(2, 6, 23, 0.72) 100%),
        radial-gradient(circle at center, transparent 45%, rgba(2, 6, 23, 0.35) 100%);
}

.hotspot-info-front-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(30px);
    opacity: 0.8;
}

.hotspot-info-front-glow-a {
    width: 150px;
    height: 150px;
    top: 18px;
    left: 22px;
    background: rgba(103, 232, 249, 0.16);
}

.hotspot-info-front-glow-b {
    width: 160px;
    height: 160px;
    right: -32px;
    bottom: 16px;
    background: rgba(96, 165, 250, 0.16);
}

.hotspot-info-close,
.hotspot-info-back-btn,
.hotspot-info-flip-btn {
    border: 1px solid rgba(255, 255, 255, 0.20);
    background: rgba(2, 6, 23, 0.48);
    color: #ffffff;
    backdrop-filter: blur(12px) saturate(145%);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hotspot-info-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 6;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 950;
}

.hotspot-info-front-bottom {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
}

.hotspot-info-badge {
    min-width: 0;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 12px;
    color: #dffbff;
    background: rgba(2, 6, 23, 0.52);
    border: 1px solid rgba(103, 232, 249, 0.22);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hotspot-info-flip-btn {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    padding: 0 15px;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hotspot-info-flip-btn strong {
    font-size: 16px;
    line-height: 1;
}

.hotspot-info-back-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
}

.hotspot-info-back-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 950;
}

.hotspot-info-back-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    padding: 0 18px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    touch-action: pan-y !important;
}

.hotspot-info-back-content::-webkit-scrollbar {
    width: 7px;
}

.hotspot-info-back-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.hotspot-info-kicker {
    margin: 4px 0 10px;
    color: #67e8f9;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.hotspot-info-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.hotspot-info-description {
    margin: 14px 0 0;
    color: rgba(226, 232, 240, 0.86);
    font-size: 14px;
    line-height: 1.72;
    font-weight: 680;
}

.hotspot-info-meta-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hotspot-info-meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 12px;
    font-weight: 900;
}

.hotspot-info-actions {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hotspot-info-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 0 15px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 950;
    transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.hotspot-info-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.hotspot-info-action-primary {
    color: #06111f;
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.16);
}

.hotspot-info-action-whatsapp {
    color: #052e16;
    background: linear-gradient(135deg, #4ade80, #10b981);
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.16);
}

.hotspot-info-action-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#previewInfoPanel .hidden {
    display: none !important;
}

/* Mobile: garde l'animation 3D, puis stabilise la face visible pour éviter le flou GPU. */
@media (max-width: 768px) {
    #previewInfoPanel.hotspot-info-panel-3d,
    .info-panel.hotspot-info-panel-3d {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important;
        width: auto !important;
        height: min(560px, calc(100dvh - 120px)) !important;
        max-height: calc(100dvh - 120px) !important;
        transform: translateY(116%) scale(0.98) !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.open,
    .info-panel.hotspot-info-panel-3d.open {
        transform: translateY(0) scale(1) !important;
    }

    .hotspot-info-face {
        border-radius: 25px;
    }

    .hotspot-info-title {
        font-size: clamp(22px, 7vw, 30px);
    }

    .hotspot-info-description {
        font-size: 13.5px;
        line-height: 1.62;
    }

    .hotspot-info-actions {
        gap: 8px;
    }

    .hotspot-info-action {
        flex: 1 1 auto;
        min-height: 42px;
        padding: 0 12px;
        font-size: 12px;
    }

    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-3d-card {
        transform: none !important;
    }

    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-front {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
    }

    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-back {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-3d-card {
        transform: none !important;
    }

    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-front {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-back {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
    }
}


/* =====================================================================
   FINAL OVERRIDE — HOTSPOT 3D MODAL IMAGE CLAIRE + MOBILE FLIP STABLE
   À garder tout à la fin de dashboard/css/preview-tailwind.css
===================================================================== */
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-vignette,
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-glow,
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-glow-a,
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-glow-b {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-media {
    inset: 0 !important;
    background: #020617 !important;
    overflow: hidden !important;
}

#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-media img,
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-media .info-media-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    image-rendering: auto !important;
    background: #020617 !important;
}

#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-bottom {
    padding: 12px !important;
    background: transparent !important;
    pointer-events: none !important;
}

#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-front-bottom .hotspot-info-badge {
    display: none !important;
}

#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-flip-btn,
#previewInfoPanel.hotspot-info-panel-3d .hotspot-info-close {
    pointer-events: auto !important;
    background: rgba(2, 6, 23, 0.58) !important;
    border-color: rgba(255,255,255,.30) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#previewInfoPanel.hotspot-info-panel-3d.flip-animating .hotspot-info-3d-card {
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform !important;
}

#previewInfoPanel.hotspot-info-panel-3d.flip-settled .hotspot-info-3d-card {
    will-change: auto !important;
}

@media (max-width: 768px) {
    #previewInfoPanel.hotspot-info-panel-3d,
    .info-panel.hotspot-info-panel-3d {
        height: min(570px, calc(100dvh - 118px)) !important;
        max-height: calc(100dvh - 118px) !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-animating .hotspot-info-3d-card {
        transform-style: preserve-3d !important;
        -webkit-transform-style: preserve-3d !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-animating.is-flipped .hotspot-info-3d-card {
        transform: rotateY(180deg) translate3d(0,0,0) !important;
        -webkit-transform: rotateY(180deg) translate3d(0,0,0) !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-animating:not(.is-flipped) .hotspot-info-3d-card {
        transform: rotateY(0deg) translate3d(0,0,0) !important;
        -webkit-transform: rotateY(0deg) translate3d(0,0,0) !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-settled .hotspot-info-3d-card {
        transform: none !important;
        -webkit-transform: none !important;
        transform-style: flat !important;
        -webkit-transform-style: flat !important;
        transition: none !important;
        filter: none !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-settled.is-flipped .hotspot-info-front {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-settled.is-flipped .hotspot-info-back {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-settled:not(.is-flipped) .hotspot-info-front {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.flip-settled:not(.is-flipped) .hotspot-info-back {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
}


/* =====================================================================
   FINAL OVERRIDE — HOTSPOT MODAL IMAGE-ONLY FRONT + CLEAN JUSTIFIED BACK
   Objectif :
   - Face avant = image claire, sans voile, sans glow, sans filtre.
   - Face arrière = texte lisible, justifié, avec bon interligne.
   - Mobile = vraie rotation 3D puis stabilisation nette, sans double rotation.
===================================================================== */

#previewInfoPanel.hotspot-info-panel-3d,
.info-panel.hotspot-info-panel-3d {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    perspective: 1600px !important;
    -webkit-perspective: 1600px !important;
}

#previewInfoPanel .hotspot-info-3d-shell {
    overflow: visible !important;
    perspective: 1600px !important;
    -webkit-perspective: 1600px !important;
}

#previewInfoPanel .hotspot-info-3d-card {
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    transition: transform 720ms cubic-bezier(.22, 1, .36, 1) !important;
    will-change: transform;
}

#previewInfoPanel.flip-animating .hotspot-info-3d-card {
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    will-change: transform !important;
}

#previewInfoPanel.is-flipped.flip-animating .hotspot-info-3d-card,
#previewInfoPanel.is-flipped:not(.flip-settled) .hotspot-info-3d-card {
    transform: rotateY(180deg) translate3d(0,0,0) !important;
    -webkit-transform: rotateY(180deg) translate3d(0,0,0) !important;
}

#previewInfoPanel:not(.is-flipped).flip-animating .hotspot-info-3d-card,
#previewInfoPanel:not(.is-flipped):not(.flip-settled) .hotspot-info-3d-card {
    transform: rotateY(0deg) translate3d(0,0,0) !important;
    -webkit-transform: rotateY(0deg) translate3d(0,0,0) !important;
}

#previewInfoPanel .hotspot-info-face {
    border-radius: 30px !important;
    overflow: hidden !important;
    border: 1.15px solid rgba(255,255,255,.18) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.46) !important;
}

/* Face avant : seulement image claire dans un vrai cadre modal. */
#previewInfoPanel .hotspot-info-front {
    background: #020617 !important;
    justify-content: flex-end !important;
}

#previewInfoPanel .hotspot-info-front-vignette,
#previewInfoPanel .hotspot-info-front-glow,
#previewInfoPanel .hotspot-info-front-glow-a,
#previewInfoPanel .hotspot-info-front-glow-b,
#previewInfoPanel .hotspot-info-back-bg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#previewInfoPanel .hotspot-info-front-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #020617 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#previewInfoPanel .hotspot-info-front-media img,
#previewInfoPanel .hotspot-info-front-media .info-media-image,
#previewInfoPanel .hotspot-info-front-media .info-media-image-zoomable {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    image-rendering: auto !important;
    background: #020617 !important;
    cursor: zoom-in !important;
}

#previewInfoPanel .hotspot-info-front-media .info-media-empty {
    width: 100% !important;
    height: 100% !important;
    display: grid !important;
    place-items: center !important;
    color: rgba(255,255,255,.72) !important;
    background: linear-gradient(145deg, #020617, #0f172a) !important;
}

/* Badge masqué : la face avant doit rester visuellement image-only. */
#previewInfoPanel #previewInfoBadge,
#previewInfoPanel .hotspot-info-badge {
    display: none !important;
}

#previewInfoPanel .hotspot-info-front-bottom {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 6 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding: 14px !important;
    pointer-events: none !important;
    background: linear-gradient(to top, rgba(2,6,23,.30), rgba(2,6,23,0)) !important;
}

#previewInfoPanel .hotspot-info-flip-btn,
#previewInfoPanel .hotspot-info-close,
#previewInfoPanel .hotspot-info-back-btn {
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(2,6,23,.48) !important;
    border: 1px solid rgba(255,255,255,.32) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.26) !important;
    color: #fff !important;
}

#previewInfoPanel .hotspot-info-flip-btn {
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    letter-spacing: .14em !important;
}

#previewInfoPanel .hotspot-info-close {
    width: 40px !important;
    height: 40px !important;
    right: 12px !important;
    top: 12px !important;
}

/* Face arrière : texte propre, lisible, justifié. */
#previewInfoPanel .hotspot-info-back {
    background:
        radial-gradient(circle at 16% 10%, rgba(103,232,249,.14), transparent 32%),
        radial-gradient(circle at 92% 92%, rgba(96,165,250,.12), transparent 28%),
        linear-gradient(145deg, rgba(15,23,42,.98), rgba(2,6,23,.99)) !important;
}

#previewInfoPanel .hotspot-info-back-content {
    padding: 0 22px 22px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-padding-bottom: 24px !important;
}

#previewInfoPanel .hotspot-info-kicker {
    margin: 4px 0 12px !important;
    color: #67e8f9 !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    font-weight: 950 !important;
    letter-spacing: .22em !important;
}

#previewInfoPanel .hotspot-info-title {
    margin: 0 !important;
    font-size: clamp(24px, 4vw, 34px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.045em !important;
    color: #fff !important;
}

#previewInfoPanel .hotspot-info-description {
    margin: 18px 0 0 !important;
    color: rgba(226,232,240,.90) !important;
    font-size: 14.5px !important;
    line-height: 1.86 !important;
    font-weight: 620 !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    letter-spacing: .006em !important;
    word-spacing: .05em !important;
    white-space: pre-line !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
}

#previewInfoPanel .hotspot-info-meta-row {
    margin-top: 18px !important;
    gap: 9px !important;
}

#previewInfoPanel .hotspot-info-actions {
    margin-top: auto !important;
    padding-top: 20px !important;
    gap: 10px !important;
}

#previewInfoPanel .hotspot-info-action {
    min-height: 44px !important;
    border-radius: 15px !important;
}

@media (max-width: 768px) {
    #previewInfoPanel.hotspot-info-panel-3d,
    .info-panel.hotspot-info-panel-3d {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important;
        width: auto !important;
        height: min(580px, calc(100dvh - 118px)) !important;
        max-height: calc(100dvh - 118px) !important;
        transform: translateY(116%) scale(.985) !important;
        perspective: 1250px !important;
        -webkit-perspective: 1250px !important;
    }

    #previewInfoPanel.hotspot-info-panel-3d.open,
    .info-panel.hotspot-info-panel-3d.open {
        transform: translateY(0) scale(1) !important;
    }

    #previewInfoPanel .hotspot-info-face {
        border-radius: 24px !important;
    }

    #previewInfoPanel .hotspot-info-3d-card {
        transition: transform 680ms cubic-bezier(.22, 1, .36, 1) !important;
    }

    /* Pendant l'animation mobile : vraie rotation 3D. */
    #previewInfoPanel.flip-animating .hotspot-info-front {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate3d(0,0,.01px) !important;
        -webkit-transform: translate3d(0,0,.01px) !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }

    #previewInfoPanel.flip-animating .hotspot-info-back {
        opacity: 1 !important;
        visibility: visible !important;
        transform: rotateY(180deg) translate3d(0,0,.01px) !important;
        -webkit-transform: rotateY(180deg) translate3d(0,0,.01px) !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }

    /* Après l'animation : face visible remise à plat pour éviter le flou et la deuxième rotation. */
    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-3d-card,
    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-3d-card {
        transform: none !important;
        -webkit-transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }

    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-front {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    #previewInfoPanel.flip-settled.is-flipped .hotspot-info-back {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
    }

    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-front {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
    }

    #previewInfoPanel.flip-settled:not(.is-flipped) .hotspot-info-back {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    #previewInfoPanel .hotspot-info-back-content {
        padding: 0 18px 18px !important;
    }

    #previewInfoPanel .hotspot-info-title {
        font-size: clamp(22px, 7vw, 30px) !important;
        line-height: 1.08 !important;
    }

    #previewInfoPanel .hotspot-info-description {
        margin-top: 16px !important;
        font-size: 13.6px !important;
        line-height: 1.78 !important;
        text-align: justify !important;
        word-spacing: .045em !important;
    }

    #previewInfoPanel .hotspot-info-actions {
        gap: 8px !important;
        padding-top: 18px !important;
    }

    #previewInfoPanel .hotspot-info-action {
        flex: 1 1 auto !important;
        min-height: 42px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }
}

/* =====================================================================
   FINAL OVERRIDE — HOTSPOT MODAL FRONT = IMAGE ONLY FULL 3D
   Objectif : aucune barre en haut/bas, aucun bouton sur la face image.
   L'utilisateur tape l'image pour tourner vers les détails.
===================================================================== */
#previewInfoPanel.hotspot-info-panel-3d,
.info-panel.hotspot-info-panel-3d {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#previewInfoPanel .hotspot-info-3d-shell {
    overflow: visible !important;
    perspective: 1500px !important;
    -webkit-perspective: 1500px !important;
}

#previewInfoPanel .hotspot-info-3d-card {
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
}

/* La face image devient une vraie carte 3D propre, remplie uniquement par l'image. */
#previewInfoPanel .hotspot-info-front {
    padding: 0 !important;
    background: #020617 !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow:
        0 34px 95px rgba(0,0,0,.54),
        0 0 0 1px rgba(255,255,255,.18),
        inset 0 1px 0 rgba(255,255,255,.12) !important;
}

/* Image full modal : pas de marge top/bottom, pas de voile, pas de filtre. */
#previewInfoPanel .hotspot-info-front-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    background: #020617 !important;
}

#previewInfoPanel .hotspot-info-front-media img,
#previewInfoPanel .hotspot-info-front-media .info-media-image,
#previewInfoPanel .hotspot-info-front-media .info-media-image-zoomable {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    image-rendering: auto !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    pointer-events: none !important;
    cursor: pointer !important;
}

/* On enlève totalement les éléments au-dessus de l'image sur la face avant. */
#previewInfoPanel .hotspot-info-front-vignette,
#previewInfoPanel .hotspot-info-front-glow,
#previewInfoPanel .hotspot-info-front-glow-a,
#previewInfoPanel .hotspot-info-front-glow-b,
#previewInfoPanel .hotspot-info-front-bottom,
#previewInfoPanel .hotspot-info-front .hotspot-info-close,
#previewInfoPanel .hotspot-info-front .hotspot-info-badge,
#previewInfoPanel .hotspot-info-front .hotspot-info-flip-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Si aucune image n'est disponible, on garde un placeholder plein écran propre. */
#previewInfoPanel .hotspot-info-front-media .info-media-empty {
    position: absolute !important;
    inset: 0 !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    background:
        radial-gradient(circle at 50% 24%, rgba(103,232,249,.14), transparent 34%),
        linear-gradient(145deg, #020617, #0f172a) !important;
    color: rgba(255,255,255,.74) !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
}

/* Face arrière : texte confortable, justifié, lisible. */
#previewInfoPanel .hotspot-info-back-content {
    padding: 2px 24px 24px !important;
}

#previewInfoPanel .hotspot-info-description {
    text-align: justify !important;
    text-justify: inter-word !important;
    line-height: 1.92 !important;
    letter-spacing: .007em !important;
    word-spacing: .06em !important;
    white-space: pre-line !important;
    color: rgba(226,232,240,.92) !important;
}

/* Mobile : l'image reste pleine carte et la face visible est stabilisée nette. */
@media (max-width: 768px) {
    #previewInfoPanel.hotspot-info-panel-3d,
    .info-panel.hotspot-info-panel-3d {
        left: 8px !important;
        right: 8px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important;
        width: auto !important;
        height: min(560px, calc(100dvh - 118px)) !important;
        max-height: calc(100dvh - 118px) !important;
    }

    #previewInfoPanel .hotspot-info-front,
    #previewInfoPanel .hotspot-info-face {
        border-radius: 24px !important;
    }

    #previewInfoPanel .hotspot-info-front-media img,
    #previewInfoPanel .hotspot-info-front-media .info-media-image {
        object-fit: cover !important;
        object-position: center center !important;
    }

    #previewInfoPanel .hotspot-info-back-content {
        padding: 0 18px 18px !important;
    }

    #previewInfoPanel .hotspot-info-description {
        line-height: 1.82 !important;
        font-size: 13.6px !important;
        word-spacing: .045em !important;
    }
}


/* =====================================================================
   FINAL OVERRIDE — PREVIEW HOTSPOT MODAL IMAGE FULL PORTRAIT COVER
   Objectif :
   - Forcer l'image à prendre toute la taille portrait du modal.
   - Si l'image est paysage : elle remplit le modal et se recadre proprement.
   - Supprimer les bandes/fonds noirs visibles autour de l'image.
   - Garder le dos du modal lisible et justifié.
   À garder tout à la fin de dashboard/css/preview-tailwind.css
===================================================================== */

/* Le modal garde une taille portrait stable */
#previewInfoPanel.hotspot-info-panel-3d,
.info-panel.hotspot-info-panel-3d {
    width: min(430px, calc(100vw - 22px)) !important;
    height: min(660px, calc(100dvh - 126px)) !important;
    max-height: calc(100dvh - 126px) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
}

/* Toute la structure 3D doit occuper 100% du modal */
#previewInfoPanel .hotspot-info-3d-shell,
#previewInfoPanel .hotspot-info-3d-card,
#previewInfoPanel .hotspot-info-face,
#previewInfoPanel .hotspot-info-front,
#previewInfoPanel .hotspot-info-front-media,
#previewInfoPanel #previewInfoMedia {
    width: 100% !important;
    height: 100% !important;
}

/* Face avant = cadre portrait image-only */
#previewInfoPanel .hotspot-info-front {
    position: absolute !important;
    inset: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    background: transparent !important;
    cursor: pointer !important;
    box-shadow:
        0 34px 95px rgba(0,0,0,.54),
        0 0 0 1px rgba(255,255,255,.18),
        inset 0 1px 0 rgba(255,255,255,.12) !important;
}

/* Conteneur image sans fond noir */
#previewInfoPanel .hotspot-info-front-media,
#previewInfoPanel #previewInfoMedia {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: inherit !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Si le JS injecte un wrapper/picture autour de l'image, il doit remplir aussi */
#previewInfoPanel .hotspot-info-front-media > *,
#previewInfoPanel #previewInfoMedia > *,
#previewInfoPanel .hotspot-info-front-media picture,
#previewInfoPanel #previewInfoMedia picture,
#previewInfoPanel .hotspot-info-front-media figure,
#previewInfoPanel #previewInfoMedia figure,
#previewInfoPanel .hotspot-info-front-media div:not(.info-media-empty),
#previewInfoPanel #previewInfoMedia div:not(.info-media-empty) {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Image paysage ou portrait : toujours cover, donc aucune bande noire */
#previewInfoPanel .hotspot-info-front-media img,
#previewInfoPanel #previewInfoMedia img,
#previewInfoPanel .hotspot-info-front-media .info-media-image,
#previewInfoPanel #previewInfoMedia .info-media-image,
#previewInfoPanel .hotspot-info-front-media .info-media-image-zoomable,
#previewInfoPanel #previewInfoMedia .info-media-image-zoomable,
#previewInfoPanel .hotspot-info-front-media picture img,
#previewInfoPanel #previewInfoMedia picture img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: transparent !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    image-rendering: auto !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    pointer-events: none !important;
}

/* Retirer totalement tout ce qui peut assombrir ou ajouter une barre sur la face image */
#previewInfoPanel .hotspot-info-front-vignette,
#previewInfoPanel .hotspot-info-front-glow,
#previewInfoPanel .hotspot-info-front-glow-a,
#previewInfoPanel .hotspot-info-front-glow-b,
#previewInfoPanel .hotspot-info-front-bottom,
#previewInfoPanel .hotspot-info-front .hotspot-info-close,
#previewInfoPanel .hotspot-info-front .hotspot-info-badge,
#previewInfoPanel .hotspot-info-front .hotspot-info-flip-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Placeholder seulement si aucune image */
#previewInfoPanel .hotspot-info-front-media .info-media-empty,
#previewInfoPanel #previewInfoMedia .info-media-empty {
    position: absolute !important;
    inset: 0 !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit !important;
    background:
        radial-gradient(circle at 50% 24%, rgba(103,232,249,.14), transparent 34%),
        linear-gradient(145deg, #020617, #0f172a) !important;
    color: rgba(255,255,255,.74) !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
}

/* Dos : garder le texte propre */
#previewInfoPanel .hotspot-info-back-content {
    padding: 2px 24px 24px !important;
}

#previewInfoPanel .hotspot-info-description {
    text-align: justify !important;
    text-justify: inter-word !important;
    line-height: 1.92 !important;
    letter-spacing: .007em !important;
    word-spacing: .06em !important;
    white-space: pre-line !important;
    color: rgba(226,232,240,.92) !important;
}

/* Mobile : portrait plus haut, image toujours cover */
@media (max-width: 768px) {
    #previewInfoPanel.hotspot-info-panel-3d,
    .info-panel.hotspot-info-panel-3d {
        left: 8px !important;
        right: 8px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important;
        width: auto !important;
        height: min(590px, calc(100dvh - 112px)) !important;
        max-height: calc(100dvh - 112px) !important;
    }

    #previewInfoPanel .hotspot-info-front,
    #previewInfoPanel .hotspot-info-face {
        border-radius: 24px !important;
    }

    #previewInfoPanel .hotspot-info-front-media img,
    #previewInfoPanel #previewInfoMedia img,
    #previewInfoPanel .hotspot-info-front-media .info-media-image,
    #previewInfoPanel #previewInfoMedia .info-media-image,
    #previewInfoPanel .hotspot-info-front-media .info-media-image-zoomable,
    #previewInfoPanel #previewInfoMedia .info-media-image-zoomable {
        object-fit: cover !important;
        object-position: center center !important;
    }

    #previewInfoPanel .hotspot-info-back-content {
        padding: 0 18px 18px !important;
    }

    #previewInfoPanel .hotspot-info-description {
        line-height: 1.82 !important;
        font-size: 13.6px !important;
        word-spacing: .045em !important;
    }
}



/* =====================================================================
   PROGRESSIVE 360 LOADING — LIGHT PREVIEW → COMPATIBLE → HD
   À conserver à la toute fin du fichier.
===================================================================== */

.preview-scene-loading-overlay.is-progressive-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5 !important;
    background: #020617 !important;
}

.preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-image {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1.018) !important;
    filter: blur(0.8px) saturate(0.96) brightness(0.92) !important;
    transition:
        opacity 260ms ease,
        filter 420ms ease,
        transform 900ms cubic-bezier(.22, 1, .36, 1) !important;
}

.preview-scene-loading-overlay.is-progressive-visible::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.12));
}

.preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-chip {
    position: absolute !important;
    left: 50% !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 86px) !important;
    z-index: 3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    border-radius: 999px !important;
    background: rgba(2, 6, 23, 0.42) !important;
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-dot {
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .52) !important;
    animation: previewProgressiveDot 1.25s ease-out infinite !important;
}

@keyframes previewProgressiveDot {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, .48);
    }
    70% {
        opacity: .76;
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/*
   Remplacement silencieux de qualité.
   Ce fondu est volontairement plus court et plus discret que la navigation A/B.
*/
.preview-layer.quality-upgrade-incoming {
    z-index: 4 !important;
    pointer-events: auto !important;
    opacity: 0 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: none !important;
    transition: opacity 240ms ease !important;
}

.preview-layer.quality-upgrade-incoming.quality-upgrade-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(0) brightness(1) saturate(1) !important;
}

.preview-layer.quality-upgrade-outgoing {
    z-index: 3 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: none !important;
}

/* Ne jamais appliquer la grande animation cinéma lors d'une simple montée en qualité. */
#previewViewer:not(.transitioning) .preview-layer.quality-upgrade-incoming,
.preview-viewer:not(.transitioning) .preview-layer.quality-upgrade-incoming {
    animation: none !important;
}

body.preview-has-loaded .preview-intro-overlay.is-hidden + * {
    visibility: visible;
}

@media (max-width: 768px) {
    .preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-chip {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
        min-height: 32px !important;
        padding: 0 11px !important;
        font-size: 9.5px !important;
    }

    .preview-layer.quality-upgrade-incoming {
        transition: opacity 220ms ease !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-image,
    .preview-layer.quality-upgrade-incoming {
        transform: none !important;
        filter: none !important;
        animation: none !important;
        transition: opacity 160ms ease !important;
    }

    .preview-scene-loading-overlay.is-progressive-visible .preview-scene-loading-dot {
        animation: none !important;
    }
}


/* =====================================================================
   PDF / VIDEO / FLOOR — FINAL
===================================================================== */
.preview-media-modal{position:fixed;inset:0;z-index:140;display:flex;align-items:center;justify-content:center;padding:18px;opacity:0;visibility:hidden;pointer-events:none;transition:.25s ease}.preview-media-modal.open{opacity:1;visibility:visible;pointer-events:auto}.preview-media-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.82);backdrop-filter:blur(12px)}.preview-media-card{position:relative;width:min(1080px,96vw);height:min(760px,90dvh);display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;border-radius:28px;border:1px solid rgba(255,255,255,.2);background:#020617;box-shadow:0 35px 100px rgba(0,0,0,.55)}.preview-media-card header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.1)}.preview-media-card header span{font-size:10px;font-weight:950;letter-spacing:.2em;color:#67e8f9}.preview-media-card h3{margin:4px 0 0;font-size:20px}.preview-media-card header button{width:42px;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:white}.preview-media-body{min-height:0;background:#000;display:grid;place-items:center}.preview-pdf-frame,.preview-video-frame,.preview-video-player{width:100%;height:100%;border:0;object-fit:contain}.preview-media-card footer{display:flex;gap:10px;justify-content:flex-end;padding:12px 16px;border-top:1px solid rgba(255,255,255,.1)}.preview-media-card footer a{padding:10px 15px;border-radius:999px;background:#fff;color:#07111f;text-decoration:none;font-weight:900}.preview-media-empty{color:#cbd5e1;font-weight:900}.preview-hotspot.hotspot-type-pdf .hotspot-grow-wrap:after,.preview-hotspot.hotspot-type-video .hotspot-grow-wrap:after{content:""!important}.preview-hotspot.hotspot-type-floor .hotspot-grow-wrap{border-radius:18px!important;padding:7px!important;background:rgba(2,6,23,.62)!important}.preview-floor-navigator{position:fixed;right:14px;top:50%;z-index:70;display:none;flex-direction:column;gap:7px;transform:translateY(-50%)}.preview-floor-navigator.has-floors{display:flex}.preview-floor-navigator button{display:flex;align-items:center;gap:8px;min-width:108px;padding:8px 10px;border-radius:16px;border:1px solid rgba(255,255,255,.65);background:rgba(2,6,23,.48);color:white;text-align:left}.preview-floor-navigator button span{display:grid;place-items:center;width:28px;height:28px;border-radius:10px;background:white;color:#0f172a;font-weight:950}.preview-floor-navigator button strong{font-size:11px}.preview-floor-transition{position:absolute;left:50%;top:20%;z-index:120;display:flex;flex-direction:column;align-items:center;gap:5px;padding:14px 20px;border-radius:20px;border:1px solid rgba(255,255,255,.5);background:rgba(2,6,23,.62);opacity:0;transform:translate(-50%,-12px) scale(.94);transition:.35s ease}.preview-floor-transition.show{opacity:1;transform:translate(-50%,0) scale(1)}.preview-floor-transition strong{font-size:18px}.preview-floor-transition span{font-size:11px;color:#cbd5e1}@media(max-width:768px){.preview-media-modal{padding:8px}.preview-media-card{width:100%;height:calc(100dvh - 16px);border-radius:22px}.preview-floor-navigator{right:8px;top:auto;bottom:78px;transform:none}.preview-floor-navigator button{min-width:0;width:48px;height:48px;padding:7px}.preview-floor-navigator button strong{display:none}.preview-floor-navigator button span{width:32px;height:32px}.preview-media-card footer{justify-content:stretch}.preview-media-card footer a{flex:1;text-align:center}}


/* =====================================================================
   ADVANCED HOTSPOTS FINAL — FLOOR CARD, WALL VIDEO, INTERACTIVE DOOR
===================================================================== */
.preview-floor-navigator{display:none!important}
.preview-floor-card-hotspot{width:310px!important;height:auto!important;pointer-events:auto!important;transform-origin:center bottom!important}
.preview-floor-card{overflow:hidden;border-radius:22px;border:1px solid rgba(255,255,255,.72);background:rgba(2,6,23,.76);box-shadow:0 24px 70px rgba(0,0,0,.42);backdrop-filter:blur(12px);color:#fff}
.preview-floor-card-head{display:flex;align-items:center;gap:11px;padding:13px 14px;border-bottom:1px solid rgba(255,255,255,.12);background:linear-gradient(135deg,rgba(103,232,249,.14),rgba(96,165,250,.08))}
.preview-floor-card-head>span{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:#fff;color:#0f172a;font-size:20px}.preview-floor-card-head div{min-width:0}.preview-floor-card-head small{display:block;font-size:8px;font-weight:950;letter-spacing:.18em;color:#67e8f9}.preview-floor-card-head strong{display:block;margin-top:3px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-floor-card-list{display:grid;max-height:240px;overflow:auto;padding:8px}.preview-floor-card-list button{display:grid;grid-template-columns:36px 1fr 18px;align-items:center;gap:9px;width:100%;padding:9px;border:0;border-radius:14px;background:transparent;color:#fff;text-align:left;cursor:pointer}.preview-floor-card-list button:hover{background:rgba(255,255,255,.1)}.preview-floor-card-list button>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(255,255,255,.94);color:#0f172a;font-weight:950}.preview-floor-card-list button div{min-width:0}.preview-floor-card-list button strong{display:block;font-size:12px}.preview-floor-card-list button small{display:block;margin-top:2px;color:#cbd5e1;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-floor-card-list button b{font-size:16px}
.floor-dock-wrap{position:relative;display:inline-flex}.floor-dock-panel{position:absolute;left:50%;bottom:calc(100% + 12px);width:280px;max-height:330px;overflow:auto;padding:8px;border-radius:20px;border:1px solid rgba(255,255,255,.72);background:rgba(2,6,23,.86);box-shadow:0 24px 70px rgba(0,0,0,.45);opacity:0;visibility:hidden;transform:translate(-50%,12px) scale(.96);transition:.24s ease}.floor-dock-panel.open{opacity:1;visibility:visible;transform:translate(-50%,0) scale(1)}.floor-dock-panel button{display:grid;grid-template-columns:38px 1fr;gap:9px;align-items:center;width:100%;padding:9px;border:0;border-radius:13px;background:transparent;color:#fff;text-align:left}.floor-dock-panel button:hover{background:rgba(255,255,255,.09)}.floor-dock-panel button>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#fff;color:#0f172a;font-weight:950}.floor-dock-panel strong{display:block;font-size:12px}.floor-dock-panel small{display:block;margin-top:2px;color:#cbd5e1;font-size:9px}
.preview-wall-video-hotspot{pointer-events:auto!important;overflow:visible!important;background:transparent!important}.preview-wall-video-frame{position:absolute;inset:0;overflow:hidden;border-radius:8px;border:2px solid rgba(255,255,255,.72);background:#000;box-shadow:0 12px 35px rgba(0,0,0,.45),0 0 0 5px rgba(0,0,0,.22)}.preview-wall-video-frame iframe,.preview-wall-video-frame video{display:block;width:100%;height:100%;border:0;object-fit:cover}.preview-wall-video-frame button{position:absolute;right:7px;bottom:7px;width:30px;height:30px;border-radius:999px;border:1px solid rgba(255,255,255,.7);background:rgba(2,6,23,.66);color:#fff;opacity:.2;transition:.2s}.preview-wall-video-frame:hover button{opacity:1}
.preview-door-hotspot{pointer-events:auto!important;perspective:900px!important;background:transparent!important}.preview-door-outline{position:absolute;inset:0;border:2px dashed rgba(255,255,255,.8);border-radius:8px;background:rgba(103,232,249,.035);box-shadow:0 0 0 3px rgba(255,255,255,.06),inset 0 0 35px rgba(103,232,249,.08)}.preview-door-panel{position:absolute;inset:3px;border:1px solid rgba(255,255,255,.24);border-radius:5px;background:linear-gradient(135deg,rgba(255,255,255,.07),rgba(255,255,255,.015));transform-origin:left center;transition:transform 820ms cubic-bezier(.22,1,.36,1),opacity 500ms ease}.door-open-right .preview-door-panel{transform-origin:right center}.door-open-center .preview-door-panel{transform-origin:center center}.preview-door-handle{position:absolute;right:10px;top:50%;width:8px;height:8px;border-radius:999px;background:#fff;box-shadow:0 0 12px rgba(255,255,255,.8)}.door-open-right .preview-door-handle{right:auto;left:10px}.preview-door-label{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);padding:7px 11px;border-radius:999px;background:rgba(2,6,23,.68);border:1px solid rgba(255,255,255,.65);color:#fff;font-size:10px;font-weight:950;white-space:nowrap;opacity:.88}.preview-door-hotspot:hover .preview-door-outline{border-style:solid;background:rgba(103,232,249,.07)}.preview-door-hotspot.is-opening .preview-door-panel{transform:rotateY(-82deg);opacity:.55}.preview-door-hotspot.door-open-right.is-opening .preview-door-panel{transform:rotateY(82deg)}.preview-door-hotspot.door-open-center.is-opening .preview-door-panel{transform:translateZ(-180px) scale(.75);opacity:0}.preview-door-hotspot.is-opening .preview-door-label{opacity:0}
@media(max-width:768px){.preview-floor-card-hotspot{width:260px!important;transform:scale(.9)!important}.floor-dock-panel{left:auto;right:-12px;transform:translateY(12px) scale(.96)}.floor-dock-panel.open{transform:translateY(0) scale(1)}.preview-wall-video-hotspot{max-width:72vw!important;max-height:42vw!important}}


/* =====================================================================
   FINAL FIX — PDF MOBILE + FLOOR CARD COLLAPSIBLE
===================================================================== */
.preview-media-card footer {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    background: rgba(2, 6, 23, .96);
}
.preview-media-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important;
    border-radius: 14px !important;
    font-weight: 950;
}
.preview-media-action-primary { background: #fff !important; color: #07111f !important; }
.preview-media-action-secondary { background: rgba(255,255,255,.08) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.18); }
.preview-pdf-mobile-shell {
    width: min(420px, calc(100% - 28px));
    margin: auto;
    padding: 28px 20px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(15,23,42,.96), rgba(2,6,23,.98));
    color: #fff;
    text-align: center;
}
.preview-pdf-mobile-icon {
    width: 72px;
    height: 88px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 14px 14px 18px 18px;
    background: linear-gradient(145deg, #ef4444, #b91c1c);
    box-shadow: 0 18px 44px rgba(185,28,28,.28);
    font-size: 18px;
    font-weight: 1000;
    letter-spacing: .08em;
}
.preview-pdf-mobile-shell strong { display:block; font-size:19px; line-height:1.2; }
.preview-pdf-mobile-shell p { margin:10px 0 20px; color:#cbd5e1; font-size:13px; line-height:1.6; }
.preview-pdf-mobile-open {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 14px;
    background: #fff;
    color: #07111f;
    text-decoration: none;
    font-weight: 950;
}
.preview-floor-card-head {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.preview-floor-card-chevron {
    margin-left: auto;
    font-size: 17px;
    transition: transform .25s ease;
}
.preview-floor-card-list {
    max-height: 240px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .32s cubic-bezier(.22,1,.36,1), opacity .2s ease, transform .28s ease, padding .28s ease;
}
.preview-floor-card.is-collapsed .preview-floor-card-list {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    transform: translateY(-8px);
    overflow: hidden;
}
.preview-floor-card.is-collapsed .preview-floor-card-chevron { transform: rotate(180deg); }

@media (max-width: 768px) {
    .preview-media-modal { padding: 0 !important; }
    .preview-media-card {
        width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border: 0 !important;
        border-radius: 0 !important;
        grid-template-rows: auto minmax(0,1fr) auto !important;
    }
    .preview-media-card header {
        padding-top: max(12px, env(safe-area-inset-top)) !important;
    }
    .preview-media-body {
        min-height: 0 !important;
        overflow: auto !important;
        padding: 16px 0 !important;
    }
    .preview-pdf-frame { min-height: 100% !important; }
    .preview-media-card footer {
        position: sticky !important;
        bottom: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 8px !important;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
        background: rgba(2,6,23,.98) !important;
    }
    .preview-media-card footer:empty { display:none !important; }
    .preview-media-card footer a { width:100%; text-align:center; }
    .preview-floor-card-hotspot { width: 250px !important; }
    .preview-floor-card.is-collapsed { width: 220px; }
}


/* =====================================================================
   FINAL — INTRODUCTION SIMPLE + LECTEUR PDF INTÉGRÉ
===================================================================== */
.preview-viewer.is-opening .preview-layer.quality-upgrade-incoming,
#previewViewer.is-opening .preview-layer.quality-upgrade-incoming {
    display: none !important;
}

.preview-pdf-reader {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #e5e7eb;
}

.preview-pdf-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    background: #fff;
    opacity: 0;
    transition: opacity 180ms ease;
}

.preview-pdf-reader.is-ready .preview-pdf-frame {
    opacity: 1;
}

.preview-pdf-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #334155;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    transition: opacity 180ms ease, visibility 180ms ease;
    pointer-events: none;
}

.preview-pdf-reader.is-ready .preview-pdf-loading {
    opacity: 0;
    visibility: hidden;
}

.preview-pdf-loading span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid rgba(15, 23, 42, .16);
    border-top-color: #0f172a;
    animation: previewPdfSpin .8s linear infinite;
}

.preview-pdf-loading strong {
    font-size: 12px;
    font-weight: 900;
}

@keyframes previewPdfSpin {
    to { transform: rotate(360deg); }
}

.preview-media-card footer button.preview-media-action {
    appearance: none;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 768px) {
    .preview-media-card {
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        grid-template-rows: auto minmax(0, 1fr) auto !important;
    }

    .preview-media-body {
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .preview-pdf-reader,
    .preview-pdf-frame {
        height: 100% !important;
        min-height: 0 !important;
    }

    .preview-media-card footer {
        position: relative !important;
        z-index: 5 !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px !important;
        padding: 9px 8px calc(9px + env(safe-area-inset-bottom)) !important;
        background: rgba(2, 6, 23, .98) !important;
    }

    .preview-media-card footer .preview-media-action {
        min-width: 0 !important;
        padding: 10px 8px !important;
        font-size: 11px !important;
        text-align: center !important;
        white-space: nowrap;
    }
}


/* =====================================================================
   FINAL FIX — PDF.JS IN-DIALOG + MOBILE PANORAMA TOUCH
===================================================================== */
.preview-media-modal[inert] {
    pointer-events: none !important;
}

.preview-media-body {
    overflow: hidden !important;
}

.preview-pdf-reader {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #d9dee7;
    touch-action: pan-x pan-y pinch-zoom !important;
}

.preview-pdf-pages {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px;
}

.preview-pdf-page {
    display: flex;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .22);
}

.preview-pdf-page canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.preview-pdf-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    color: #fff;
    background: #020617;
    z-index: 2;
}

.preview-pdf-reader.is-ready .preview-pdf-loading {
    display: none;
}

.preview-pdf-fallback {
    max-width: 520px;
    padding: 28px;
    text-align: center;
    color: #e2e8f0;
}

.preview-pdf-fallback strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

.preview-pdf-fallback p {
    color: #94a3b8;
    line-height: 1.6;
}

.preview-pdf-fallback a {
    display: inline-flex;
    margin-top: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    color: #020617;
    background: #fff;
    font-weight: 900;
    text-decoration: none;
}

#previewViewer,
.preview-viewer,
#previewLayerA,
#previewLayerB,
.preview-layer,
#previewMountA,
#previewMountB,
.preview-mount {
    touch-action: none !important;
}

.preview-media-modal,
.preview-media-modal * {
    touch-action: manipulation;
}

.preview-pdf-reader,
.preview-pdf-reader * {
    touch-action: pan-x pan-y pinch-zoom !important;
}

@media (max-width: 768px) {
    .preview-media-card {
        height: 100dvh !important;
        width: 100vw !important;
        border-radius: 0 !important;
    }

    .preview-media-card footer {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding:
            10px
            max(10px, env(safe-area-inset-right))
            calc(10px + env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left)) !important;
        background: rgba(2, 6, 23, .96);
    }

    .preview-media-action {
        min-width: 0;
        text-align: center;
        padding: 10px 8px !important;
        font-size: 11px;
    }

    .preview-pdf-pages {
        gap: 12px;
        padding: 10px 8px 24px;
    }
}

/* =====================================================================
   FINAL FIX — PDF MOBILE PHYSIQUE, RENDU PROGRESSIF ET MÉMOIRE STABLE
===================================================================== */
.preview-pdf-reader {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #dce2ea !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y pinch-zoom !important;
}

.preview-pdf-pages {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px !important;
}

.preview-pdf-page {
    position: relative !important;
    flex: 0 0 auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18) !important;
}

.preview-pdf-page-placeholder {
    width: min(100%, 820px) !important;
    aspect-ratio: 0.707 / 1 !important;
    background: linear-gradient(110deg, #f8fafc 20%, #e2e8f0 38%, #f8fafc 56%) !important;
    background-size: 240% 100% !important;
    animation: previewPdfPageSkeleton 1.25s linear infinite !important;
}

.preview-pdf-page-placeholder-label,
.preview-pdf-page-error {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.preview-pdf-canvas {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
}

.preview-pdf-loading small {
    color: #94a3b8 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.preview-pdf-reader.is-ready > .preview-pdf-loading {
    display: none !important;
}

@keyframes previewPdfPageSkeleton {
    to { background-position-x: -240%; }
}

@media (max-width: 768px) {
    .preview-media-body {
        display: block !important;
        min-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .preview-pdf-pages {
        gap: 8px !important;
        padding: 7px 6px 20px !important;
    }

    .preview-pdf-page {
        width: 100% !important;
        min-height: 150px !important;
        border-radius: 5px !important;
    }

    .preview-pdf-page-placeholder {
        width: 100% !important;
    }
}

/* =====================================================================
   FINAL MOBILE FIX — SAMSUNG PDF + STABLE FLOOR NAVIGATION
===================================================================== */
@media (max-width: 768px), (pointer: coarse) {
    /* The panorama-attached floor card is hidden on physical mobile.
       Floor navigation remains available from the control dock. */
    .preview-floor-card-hotspot {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .floor-dock-wrap {
        position: static !important;
    }

    .floor-dock-panel {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(42dvh, 340px) !important;
        overflow-y: auto !important;
        transform: translate3d(0, 18px, 0) scale(.98) !important;
        transform-origin: bottom center !important;
        border-radius: 22px !important;
        z-index: 125 !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    .floor-dock-panel.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate3d(0, 0, 0) scale(1) !important;
    }

    .floor-dock-panel button {
        min-height: 54px !important;
        grid-template-columns: 40px minmax(0, 1fr) !important;
        padding: 8px 10px !important;
    }

    .floor-dock-panel strong {
        font-size: 13px !important;
    }

    .floor-dock-panel small {
        font-size: 10px !important;
        white-space: normal !important;
        line-height: 1.35 !important;
    }

    .preview-pdf-reader {
        contain: layout paint !important;
    }

    .preview-pdf-canvas {
        image-rendering: auto !important;
        transform: translateZ(0) !important;
        backface-visibility: hidden !important;
    }

    .preview-pdf-page {
        box-shadow: 0 4px 14px rgba(15, 23, 42, .16) !important;
    }
}


/* =====================================================================
   FINAL ANGULAR SURFACE FIX — FLOOR / DOOR / WALL VIDEO
   Keeps traced surfaces proportional to the panorama while zooming.
===================================================================== */
.preview-surface-hotspot {
    overflow: visible !important;
    transform-origin: center center !important;
}

.preview-surface-hotspot > .preview-surface-scale-wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: scale(var(--surface-perspective-scale, 1)) !important;
    transform-origin: center center !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

.preview-floor-card-hotspot {
    height: auto !important;
    min-height: 1px !important;
    pointer-events: auto !important;
}

.preview-floor-card-hotspot > .preview-surface-scale-wrap {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    transform-origin: center bottom !important;
}

.preview-wall-video-hotspot > .preview-surface-scale-wrap,
.preview-door-hotspot > .preview-surface-scale-wrap {
    pointer-events: auto !important;
}

.preview-wall-video-frame,
.preview-door-outline {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px), (pointer: coarse) {
    /* Keep the floor card in the panorama at its saved yaw/pitch. */
    .preview-floor-card-hotspot {
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: min(270px, 76vw) !important;
        max-width: 76vw !important;
        transform: none !important;
    }

    .preview-floor-card {
        border-radius: 18px !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .preview-floor-card-head {
        padding: 10px 11px !important;
    }

    .preview-floor-card-list {
        max-height: 190px !important;
    }

    /* The dock remains as an optional second access, not the primary position. */
    .floor-dock-panel {
        max-height: min(38dvh, 300px) !important;
    }
}

/* =====================================================================
   FINAL PREMIUM FLOOR HOTSPOT — DOOR-LIKE PERSPECTIVE BEHAVIOUR
   Compact marker anchored to yaw/pitch; the floor card opens only on click.
===================================================================== */
.preview-floor-card-hotspot {
    display: none !important;
}

.preview-floor-portal-hotspot {
    overflow: visible !important;
    pointer-events: auto !important;
    transform-origin: center center !important;
}

.preview-floor-portal-hotspot > .preview-surface-scale-wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    transform: scale(var(--surface-perspective-scale, 1)) !important;
    transform-origin: center center !important;
    pointer-events: auto !important;
}

.preview-floor-portal-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 30% 22%, rgba(103,232,249,.28), transparent 36%),
        linear-gradient(145deg, rgba(3,12,28,.94), rgba(10,38,66,.88));
    box-shadow:
        0 18px 42px rgba(0,0,0,.38),
        0 0 0 1px rgba(255,255,255,.82),
        inset 0 1px 0 rgba(255,255,255,.20);
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.preview-floor-portal-trigger:hover,
.preview-floor-portal-hotspot.is-open .preview-floor-portal-trigger {
    transform: translateY(-2px);
    box-shadow:
        0 24px 52px rgba(0,0,0,.44),
        0 0 0 1px rgba(255,255,255,1),
        0 0 26px rgba(34,211,238,.24),
        inset 0 1px 0 rgba(255,255,255,.24);
}

.preview-floor-portal-trigger:active {
    transform: scale(.97);
}

.preview-floor-portal-ring {
    position: absolute;
    inset: 7px;
    border-radius: 19px;
    border: 1px solid rgba(255,255,255,.24);
    pointer-events: none;
}

.preview-floor-portal-ring::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid transparent;
    border-top-color: rgba(255,255,255,.92);
    border-right-color: rgba(103,232,249,.72);
    animation: previewFloorPortalSpin 3.2s linear infinite;
}

.preview-floor-portal-icon {
    position: relative;
    width: 34%;
    height: 34%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    gap: 3px;
}

.preview-floor-portal-icon i {
    display: block;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.24);
}
.preview-floor-portal-icon i:nth-child(2) { width: 78%; }
.preview-floor-portal-icon i:nth-child(3) { width: 56%; }

.preview-floor-portal-direction {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #082032;
    background: rgba(255,255,255,.94);
    font-size: 13px;
    font-weight: 950;
}

.preview-floor-portal-trigger > strong {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    overflow: hidden;
    color: rgba(255,255,255,.96);
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-floor-portal-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    width: min(310px, 78vw);
    max-height: min(430px, 58dvh);
    display: grid;
    grid-template-rows: auto minmax(0,1fr);
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.72);
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(34,211,238,.18), transparent 34%),
        linear-gradient(160deg, rgba(2,6,23,.97), rgba(8,30,52,.96));
    box-shadow: 0 28px 76px rgba(0,0,0,.52);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(.94);
    transform-origin: center bottom;
    transition: opacity .22s ease, visibility .22s ease, transform .3s cubic-bezier(.22,1,.36,1);
    z-index: 8;
}

.preview-floor-portal-hotspot.is-open .preview-floor-portal-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.preview-floor-portal-popover header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 13px 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.preview-floor-portal-popover header div { min-width: 0; }
.preview-floor-portal-popover header small {
    display: block;
    color: #67e8f9;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .18em;
}
.preview-floor-portal-popover header strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-floor-portal-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    background: rgba(255,255,255,.08);
    font-size: 19px;
    cursor: pointer;
}

.preview-floor-portal-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    scrollbar-width: thin;
    touch-action: pan-y !important;
}

.preview-floor-portal-item {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 20px;
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 9px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.preview-floor-portal-item:hover,
.preview-floor-portal-item:active {
    background: rgba(255,255,255,.09);
    transform: translateX(2px);
}

.preview-floor-portal-item > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #07111f;
    background: #fff;
    font-weight: 950;
}
.preview-floor-portal-item div { min-width: 0; }
.preview-floor-portal-item strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-floor-portal-item small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-floor-portal-item b { font-size: 16px; }

@keyframes previewFloorPortalSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px), (pointer: coarse) {
    .preview-floor-portal-hotspot {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        max-width: none !important;
        /* Never override the inline transform used by Marzipano for yaw/pitch positioning. */
    }

    .preview-floor-portal-trigger {
        border-radius: 20px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .preview-floor-portal-popover {
        width: min(286px, 82vw);
        max-height: min(390px, 52dvh);
        border-radius: 20px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .preview-floor-portal-item {
        min-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preview-floor-portal-ring::after { animation: none !important; }
    .preview-floor-portal-popover { transition: opacity .15s ease !important; }
}


/* =====================================================================
   FINAL FLOOR VISIBILITY + ACCESSIBILITY FIX
   Never override the transform on the Marzipano hotspot root.
===================================================================== */
.preview-floor-portal-hotspot {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
}
.preview-floor-portal-hotspot[aria-hidden="true"],
.preview-layer[aria-hidden="true"] .preview-floor-portal-hotspot {
    pointer-events: none !important;
}
.preview-floor-portal-popover[aria-hidden="true"] {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.preview-floor-portal-popover[aria-hidden="false"] {
    visibility: visible !important;
}
@media (max-width: 768px), (pointer: coarse) {
    .preview-floor-portal-hotspot {
        /* Marzipano owns transform. Do not use transform:none here. */
        min-width: 76px !important;
        min-height: 76px !important;
    }
    .preview-floor-portal-popover {
        width: min(286px, calc(100vw - 24px)) !important;
        max-height: min(390px, 52dvh) !important;
    }
}

/* =====================================================================
   FLOOR HOTSPOT — PREMIUM ICON + DIRECTORY POPOVER
===================================================================== */
.preview-floor-portal-trigger {
    grid-template-rows: 1fr auto auto !important;
    padding: 12px 10px 9px !important;
}

.preview-floor-portal-icon {
    width: 44% !important;
    height: 44% !important;
    display: grid !important;
    place-items: center !important;
    margin-top: -2px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,.28));
}
.preview-floor-portal-icon img,
.preview-floor-portal-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.preview-floor-portal-icon svg,
.preview-floor-portal-heading-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.preview-floor-portal-trigger > strong {
    position: static !important;
    width: 100%;
    margin-top: 4px;
    font-size: 9px !important;
    letter-spacing: .10em !important;
}
.preview-floor-portal-trigger > small {
    display: block;
    width: 100%;
    margin-top: 3px;
    color: rgba(207,250,254,.78);
    font-size: 7px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preview-floor-portal-popover {
    width: min(360px, 84vw) !important;
    max-height: min(500px, 68dvh) !important;
    grid-template-rows: auto auto minmax(0,1fr) auto !important;
    border-radius: 28px !important;
    border-color: rgba(255,255,255,.42) !important;
    background:
        radial-gradient(circle at 15% 0%, rgba(34,211,238,.24), transparent 38%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,.20), transparent 34%),
        linear-gradient(155deg, rgba(2,6,23,.985), rgba(8,29,52,.975)) !important;
    box-shadow:
        0 36px 110px rgba(0,0,0,.60),
        0 0 0 1px rgba(255,255,255,.07) inset !important;
}
.preview-floor-portal-header {
    display: grid !important;
    grid-template-columns: 48px minmax(0,1fr) 36px;
    align-items: center !important;
    gap: 12px !important;
    padding: 15px !important;
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}
.preview-floor-portal-heading-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: #082032;
    background: linear-gradient(145deg, #ecfeff, #a5f3fc);
    box-shadow: 0 14px 30px rgba(34,211,238,.16);
}
.preview-floor-portal-heading-icon svg { width: 29px; height: 29px; }
.preview-floor-portal-heading-copy { min-width: 0; }
.preview-floor-portal-heading-copy small {
    color: #67e8f9 !important;
    font-size: 8px !important;
    letter-spacing: .20em !important;
}
.preview-floor-portal-heading-copy strong {
    margin-top: 4px !important;
    font-size: 17px !important;
    letter-spacing: -.025em;
}
.preview-floor-portal-heading-copy span {
    display: block;
    margin-top: 3px;
    color: #a9bdd2;
    font-size: 10px;
    font-weight: 750;
}
.preview-floor-portal-close {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255,255,255,.07) !important;
    transition: transform .18s ease, background .18s ease;
}
.preview-floor-portal-close:hover { transform: rotate(6deg); background: rgba(255,255,255,.14) !important; }

.preview-floor-portal-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 10px 2px;
    padding: 10px 12px;
    border-radius: 15px;
    border: 1px solid rgba(103,232,249,.14);
    background: rgba(103,232,249,.065);
}
.preview-floor-portal-current span {
    color: #9db0c7;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.preview-floor-portal-current strong {
    min-width: 0;
    overflow: hidden;
    color: #dffbff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-floor-portal-list { padding: 8px 10px 10px !important; }
.preview-floor-portal-item {
    grid-template-columns: 44px minmax(0,1fr) 34px !important;
    min-height: 64px;
    margin-bottom: 7px;
    padding: 9px 10px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}
.preview-floor-portal-item:hover,
.preview-floor-portal-item:active {
    border-color: rgba(103,232,249,.35) !important;
    background: linear-gradient(135deg, rgba(103,232,249,.12), rgba(59,130,246,.07)) !important;
    transform: translateX(3px) !important;
}
.preview-floor-level-number {
    width: 42px !important;
    height: 42px !important;
    border-radius: 15px !important;
    background: linear-gradient(145deg, #ffffff, #cffafe) !important;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.preview-floor-portal-item strong { font-size: 13px !important; }
.preview-floor-portal-item small { margin-top: 4px !important; font-size: 10px !important; color: #9db0c7 !important; }
.preview-floor-level-action {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #07111f;
    background: rgba(255,255,255,.92);
    font-size: 15px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.preview-floor-portal-footer {
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: #8195aa;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
    letter-spacing: .06em;
}

@media (max-width:768px), (pointer:coarse) {
    .preview-floor-portal-popover {
        width: min(330px, calc(100vw - 22px)) !important;
        max-height: min(470px, 62dvh) !important;
        border-radius: 24px !important;
    }
    .preview-floor-portal-header {
        grid-template-columns: 44px minmax(0,1fr) 34px;
        padding: 13px !important;
    }
    .preview-floor-portal-heading-icon { width: 44px; height: 44px; border-radius: 15px; }
    .preview-floor-portal-heading-copy strong { font-size: 15px !important; }
    .preview-floor-portal-current { margin: 8px 8px 1px; }
    .preview-floor-portal-list { padding: 7px 8px 8px !important; }
    .preview-floor-portal-item { min-height: 60px; margin-bottom: 6px; border-radius: 16px !important; }
}


/* =====================================================================
   FLOOR DIRECTORY — PREMIUM MODAL FINAL
===================================================================== */
.preview-floor-portal-popover {
    width: min(390px, calc(100vw - 28px)) !important;
    max-height: min(70dvh, 620px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 28px !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(34,211,238,.17), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,.14), transparent 35%),
        linear-gradient(155deg, rgba(15,23,42,.97), rgba(2,6,23,.985)) !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.10) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
}
.preview-floor-portal-header { padding:17px 17px 14px !important; border-bottom:1px solid rgba(255,255,255,.08); }
.preview-floor-portal-heading-icon { width:48px !important; height:48px !important; border-radius:16px !important; background:linear-gradient(145deg,rgba(34,211,238,.18),rgba(59,130,246,.16)) !important; border:1px solid rgba(103,232,249,.23) !important; box-shadow:0 12px 28px rgba(34,211,238,.08); }
.preview-floor-portal-heading-copy small { color:#67e8f9 !important; letter-spacing:.19em !important; }
.preview-floor-portal-heading-copy strong { font-size:17px !important; letter-spacing:-.025em !important; }
.preview-floor-portal-heading-copy span { color:#94a3b8 !important; }
.preview-floor-portal-current { margin:12px 14px 4px !important; padding:11px 13px !important; border-radius:15px !important; background:linear-gradient(135deg,rgba(34,211,238,.10),rgba(255,255,255,.045)) !important; border:1px solid rgba(103,232,249,.16) !important; }
.preview-floor-portal-list { padding:10px 12px 14px !important; gap:9px !important; overflow-y:auto !important; overscroll-behavior:contain; }
.preview-floor-portal-item { min-height:72px !important; padding:10px !important; border-radius:18px !important; border:1px solid rgba(148,163,184,.15) !important; background:linear-gradient(145deg,rgba(255,255,255,.065),rgba(255,255,255,.035)) !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.035); transition:transform .18s ease,border-color .18s ease,background .18s ease !important; }
.preview-floor-portal-item:hover, .preview-floor-portal-item:focus-visible { transform:translateY(-2px) !important; border-color:rgba(103,232,249,.38) !important; background:linear-gradient(145deg,rgba(34,211,238,.12),rgba(59,130,246,.08)) !important; }
.preview-floor-level-number { width:46px !important; height:46px !important; border-radius:15px !important; color:#cffafe !important; background:linear-gradient(145deg,rgba(34,211,238,.16),rgba(59,130,246,.12)) !important; border:1px solid rgba(103,232,249,.21) !important; font-size:15px !important; }
.preview-floor-portal-item div strong { font-size:14px !important; }
.preview-floor-portal-item div small { margin-top:3px !important; color:#94a3b8 !important; line-height:1.35 !important; }
.preview-floor-level-action { width:34px !important; height:34px !important; display:grid !important; place-items:center !important; border-radius:12px !important; color:#cffafe !important; background:rgba(34,211,238,.10) !important; border:1px solid rgba(103,232,249,.16) !important; }
.preview-floor-portal-footer { padding:11px 14px 14px !important; border-top:1px solid rgba(255,255,255,.07) !important; color:#94a3b8 !important; background:rgba(2,6,23,.32) !important; }
@media (max-width: 768px) {
    .preview-floor-portal-popover {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
        top: auto !important;
        width: auto !important;
        max-height: min(62dvh, 540px) !important;
        transform-origin: bottom center !important;
        border-radius: 24px !important;
        z-index: 120 !important;
    }
    .preview-floor-portal-list { max-height: min(38dvh, 360px) !important; }
}

/* =====================================================================
   FLOOR DIRECTORY — RESPONSIVE BODY PORTAL FINAL
   The trigger remains inside Marzipano. The directory is moved to body,
   so it never inherits panorama scale, clipping or perspective.
===================================================================== */
.preview-floor-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 144;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 18%, rgba(34, 211, 238, .10), transparent 32%),
        rgba(2, 6, 23, .58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity .24s ease, visibility .24s ease;
}

.preview-floor-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body > .preview-floor-portal-popover {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 145 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    width: min(470px, calc(100vw - 40px)) !important;
    max-width: 470px !important;
    max-height: min(76dvh, 680px) !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, -46%) scale(.94) !important;
    transform-origin: center center !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 30px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(34, 211, 238, .18), transparent 31%),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, .15), transparent 38%),
        linear-gradient(155deg, rgba(15, 23, 42, .985), rgba(2, 6, 23, .995)) !important;
    box-shadow:
        0 42px 120px rgba(0, 0, 0, .64),
        inset 0 1px 0 rgba(255, 255, 255, .10) !important;
    backdrop-filter: blur(24px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
    transition:
        opacity .24s ease,
        visibility .24s ease,
        transform .32s cubic-bezier(.22, 1, .36, 1) !important;
}

body > .preview-floor-portal-popover.is-open,
body > .preview-floor-portal-popover[aria-hidden="false"] {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-header {
    grid-template-columns: 54px minmax(0, 1fr) 40px !important;
    gap: 13px !important;
    padding: 18px 18px 15px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-heading-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-heading-copy small {
    font-size: 9px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-heading-copy strong {
    display: block !important;
    margin-top: 5px !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    font-size: 19px !important;
    line-height: 1.12 !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-heading-copy span {
    margin-top: 5px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-current {
    margin: 12px 15px 4px !important;
    padding: 12px 14px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-current strong {
    max-width: 62% !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: right !important;
    text-overflow: clip !important;
    line-height: 1.35 !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-list {
    display: grid !important;
    gap: 10px !important;
    min-height: 0 !important;
    max-height: min(46dvh, 430px) !important;
    padding: 11px 14px 15px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 232, 249, .28) transparent;
}

body > .preview-floor-portal-popover .preview-floor-portal-item {
    grid-template-columns: 50px minmax(0, 1fr) 38px !important;
    gap: 12px !important;
    min-height: 78px !important;
    margin: 0 !important;
    padding: 11px 12px !important;
}

body > .preview-floor-portal-popover .preview-floor-level-number {
    width: 50px !important;
    height: 50px !important;
    border-radius: 17px !important;
    font-size: 16px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-item div {
    min-width: 0 !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-item strong {
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-item small {
    display: block !important;
    margin-top: 5px !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    color: #a9b8c9 !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
}

body > .preview-floor-portal-popover .preview-floor-level-action {
    width: 36px !important;
    height: 36px !important;
}

body > .preview-floor-portal-popover .preview-floor-portal-footer {
    padding: 12px 16px 15px !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
}

/* The sphere marker remains compact and never contains the large directory. */
.preview-floor-portal-hotspot {
    overflow: visible !important;
}

.preview-floor-portal-trigger {
    min-width: 84px !important;
    min-height: 84px !important;
}

@media (max-width: 768px), (pointer: coarse) {
    .preview-floor-modal-backdrop {
        background: rgba(2, 6, 23, .50);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    body > .preview-floor-portal-popover {
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(68dvh, 590px) !important;
        border-radius: 25px !important;
        transform: translateY(28px) scale(.97) !important;
        transform-origin: bottom center !important;
    }

    body > .preview-floor-portal-popover.is-open,
    body > .preview-floor-portal-popover[aria-hidden="false"] {
        transform: translateY(0) scale(1) !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-header {
        grid-template-columns: 46px minmax(0, 1fr) 38px !important;
        gap: 10px !important;
        padding: 14px 14px 12px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-heading-icon {
        width: 46px !important;
        height: 46px !important;
        border-radius: 15px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-heading-copy strong {
        font-size: 16px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-heading-copy span {
        font-size: 10px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-current {
        margin: 8px 9px 2px !important;
        padding: 10px 11px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-list {
        max-height: min(42dvh, 390px) !important;
        gap: 8px !important;
        padding: 8px 9px 11px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-item {
        grid-template-columns: 44px minmax(0, 1fr) 34px !important;
        gap: 9px !important;
        min-height: 70px !important;
        padding: 9px 10px !important;
        border-radius: 16px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-level-number {
        width: 44px !important;
        height: 44px !important;
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-item strong {
        font-size: 14px !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-item small {
        margin-top: 3px !important;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
    }

    body > .preview-floor-portal-popover .preview-floor-portal-footer {
        padding: 10px 12px 12px !important;
    }
}

/* =====================================================================
   FLOOR DIRECTORY — VIEWER-ANCHORED PROFESSIONAL PORTAL FINAL
   The compact trigger remains in the 360 sphere. The directory is mounted
   directly under #previewViewer, so it stays inside the image while avoiding
   Marzipano perspective scaling and clipping.
===================================================================== */
#previewViewer > .preview-floor-modal-backdrop,
.preview-viewer > .preview-floor-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    z-index: 143 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(2, 6, 23, .24);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity .22s ease, visibility .22s ease;
}

#previewViewer > .preview-floor-modal-backdrop.is-open,
.preview-viewer > .preview-floor-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#previewViewer > .preview-floor-portal-popover,
.preview-viewer > .preview-floor-portal-popover {
    position: absolute !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 145 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    width: min(390px, calc(100% - 28px)) !important;
    max-width: 390px !important;
    max-height: min(72dvh, 620px) !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(0, 12px, 0) scale(.965) !important;
    transform-origin: left center !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    border-radius: 27px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(34,211,238,.20), transparent 31%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,.16), transparent 38%),
        linear-gradient(155deg, rgba(15,23,42,.97), rgba(2,6,23,.99)) !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.11) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
    transition: opacity .22s ease, visibility .22s ease, transform .30s cubic-bezier(.22,1,.36,1) !important;
}

#previewViewer > .preview-floor-portal-popover.is-open,
#previewViewer > .preview-floor-portal-popover[aria-hidden="false"],
.preview-viewer > .preview-floor-portal-popover.is-open,
.preview-viewer > .preview-floor-portal-popover[aria-hidden="false"] {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0,0,0) scale(1) !important;
}

#previewViewer > .preview-floor-portal-popover.opens-left,
.preview-viewer > .preview-floor-portal-popover.opens-left {
    transform-origin: right center !important;
}

#previewViewer > .preview-floor-portal-popover::before,
.preview-viewer > .preview-floor-portal-popover::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 16px;
    height: 16px;
    z-index: -1;
    border-left: 1px solid rgba(255,255,255,.18);
    border-bottom: 1px solid rgba(255,255,255,.18);
    background: rgba(8,18,38,.98);
    transform: translateY(-50%) rotate(45deg);
}

#previewViewer > .preview-floor-portal-popover.opens-left::before,
.preview-viewer > .preview-floor-portal-popover.opens-left::before {
    left: auto;
    right: -8px;
    transform: translateY(-50%) rotate(225deg);
}

#previewViewer > .preview-floor-portal-popover .preview-floor-portal-header,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-header {
    grid-template-columns: 52px minmax(0,1fr) 40px !important;
    gap: 12px !important;
    padding: 17px 17px 14px !important;
}

#previewViewer > .preview-floor-portal-popover .preview-floor-portal-heading-copy strong,
#previewViewer > .preview-floor-portal-popover .preview-floor-portal-heading-copy span,
#previewViewer > .preview-floor-portal-popover .preview-floor-portal-current strong,
#previewViewer > .preview-floor-portal-popover .preview-floor-portal-item strong,
#previewViewer > .preview-floor-portal-popover .preview-floor-portal-item small,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-heading-copy strong,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-heading-copy span,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-current strong,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-item strong,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-item small {
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
}

#previewViewer > .preview-floor-portal-popover .preview-floor-portal-list,
.preview-viewer > .preview-floor-portal-popover .preview-floor-portal-list {
    min-height: 0 !important;
    max-height: min(43dvh, 390px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y !important;
}

@media (max-width: 768px), (pointer: coarse) {
    #previewViewer > .preview-floor-modal-backdrop,
    .preview-viewer > .preview-floor-modal-backdrop {
        background: rgba(2,6,23,.20);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    #previewViewer > .preview-floor-portal-popover,
    .preview-viewer > .preview-floor-portal-popover {
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(61dvh, 540px) !important;
        border-radius: 24px !important;
        transform: translate3d(0,24px,0) scale(.975) !important;
        transform-origin: bottom center !important;
    }

    #previewViewer > .preview-floor-portal-popover.is-open,
    #previewViewer > .preview-floor-portal-popover[aria-hidden="false"],
    .preview-viewer > .preview-floor-portal-popover.is-open,
    .preview-viewer > .preview-floor-portal-popover[aria-hidden="false"] {
        transform: translate3d(0,0,0) scale(1) !important;
    }

    #previewViewer > .preview-floor-portal-popover::before,
    .preview-viewer > .preview-floor-portal-popover::before {
        display: none !important;
    }

    #previewViewer > .preview-floor-portal-popover .preview-floor-portal-header,
    .preview-viewer > .preview-floor-portal-popover .preview-floor-portal-header {
        grid-template-columns: 46px minmax(0,1fr) 38px !important;
        gap: 10px !important;
        padding: 14px 14px 12px !important;
    }

    #previewViewer > .preview-floor-portal-popover .preview-floor-portal-list,
    .preview-viewer > .preview-floor-portal-popover .preview-floor-portal-list {
        max-height: min(36dvh, 350px) !important;
        padding: 8px 9px 11px !important;
    }
}

/* =====================================================================
   FRIENDLY PUBLIC ERROR STATES — no technical exception is shown to guests
===================================================================== */
.preview-friendly-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(560px, 92%);
    margin: auto;
    padding: 34px 28px;
    border: 1px solid rgba(103, 232, 249, .22);
    border-radius: 24px;
    background: radial-gradient(circle at top, rgba(8, 145, 178, .13), rgba(2, 6, 23, .96) 58%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

.preview-error-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #07111f;
    background: #67e8f9;
    font-size: 22px;
    font-weight: 950;
    box-shadow: 0 12px 34px rgba(34, 211, 238, .22);
}

.preview-friendly-error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.preview-error-reference {
    margin-top: 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.preview-pdf-native-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    background: #0f172a;
}

.preview-pdf-native-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #e2e8f0;
    background: rgba(2, 6, 23, .96);
}

.preview-pdf-native-note .preview-error-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 15px;
}

.preview-pdf-native-note div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-pdf-native-note strong {
    font-size: 13px;
}

.preview-pdf-native-note small {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.4;
}

.preview-pdf-native-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.preview-pdf-page-error {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 180px;
    padding: 24px;
    text-align: center;
}

.preview-pdf-page-error small {
    color: #94a3b8;
    font-size: 9px;
    letter-spacing: .04em;
}

@media (max-width: 768px) {
    .preview-friendly-error {
        width: calc(100% - 24px);
        padding: 28px 18px;
        border-radius: 20px;
    }

    .preview-friendly-error-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Advanced exact-object selection before computer-vision inspection */
.preview-vision-selector{position:absolute;inset:0;z-index:2147482500;overflow:hidden;touch-action:none;user-select:none;isolation:isolate}.preview-vision-selector-shade{position:absolute;inset:0;background:rgba(2,6,23,.40);backdrop-filter:blur(1.5px)}.preview-vision-selector-guide{position:absolute;z-index:3;top:max(16px,env(safe-area-inset-top));left:50%;width:min(520px,calc(100% - 32px));transform:translateX(-50%);display:flex;flex-direction:column;gap:3px;padding:12px 16px;border:1px solid rgba(103,232,249,.35);border-radius:16px;background:rgba(2,6,23,.82);box-shadow:0 14px 45px rgba(0,0,0,.3);color:#fff;text-align:center;pointer-events:none}.preview-vision-selector-guide strong{font-size:14px;font-weight:850}.preview-vision-selector-guide span{font-size:12px;color:#cbd5e1}.preview-vision-selection-box{position:absolute;z-index:4;left:0;top:0;min-width:72px;min-height:72px;border:2px solid #67e8f9;border-radius:18px;background:rgba(6,182,212,.055);box-shadow:0 0 0 9999px rgba(2,6,23,.28),0 0 0 5px rgba(34,211,238,.14),0 0 34px rgba(34,211,238,.42);cursor:move;touch-action:none;outline:none}.preview-vision-selection-box:focus{box-shadow:0 0 0 9999px rgba(2,6,23,.28),0 0 0 6px rgba(34,211,238,.22),0 0 38px rgba(34,211,238,.52)}.preview-vision-selection-grid{position:absolute;inset:0;border-radius:15px;background:linear-gradient(90deg,transparent 33%,rgba(255,255,255,.22) 33%,rgba(255,255,255,.22) 33.6%,transparent 33.6%,transparent 66%,rgba(255,255,255,.22) 66%,rgba(255,255,255,.22) 66.6%,transparent 66.6%),linear-gradient(0deg,transparent 33%,rgba(255,255,255,.22) 33%,rgba(255,255,255,.22) 33.6%,transparent 33.6%,transparent 66%,rgba(255,255,255,.22) 66%,rgba(255,255,255,.22) 66.6%,transparent 66.6%);pointer-events:none}.preview-vision-selection-reticle{position:absolute;left:50%;top:50%;width:28px;height:28px;transform:translate(-50%,-50%);border:1.5px solid rgba(255,255,255,.92);border-radius:50%;box-shadow:0 0 12px rgba(2,6,23,.8);pointer-events:none}.preview-vision-selection-reticle:before,.preview-vision-selection-reticle:after{content:"";position:absolute;background:#fff;box-shadow:0 0 5px #020617}.preview-vision-selection-reticle:before{left:50%;top:-8px;width:1px;height:42px}.preview-vision-selection-reticle:after{top:50%;left:-8px;width:42px;height:1px}.preview-vision-resize-handle{position:absolute;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:#ecfeff;box-shadow:0 3px 16px rgba(2,6,23,.58);touch-action:none}.preview-vision-resize-handle.nw{left:-14px;top:-14px;cursor:nwse-resize}.preview-vision-resize-handle.ne{right:-14px;top:-14px;cursor:nesw-resize}.preview-vision-resize-handle.sw{left:-14px;bottom:-14px;cursor:nesw-resize}.preview-vision-resize-handle.se{right:-14px;bottom:-14px;cursor:nwse-resize}.preview-vision-selector-actions{position:absolute;z-index:5;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:10px;width:min(480px,calc(100% - 28px));padding:10px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(2,6,23,.86);box-shadow:0 18px 55px rgba(0,0,0,.4)}.preview-vision-selector-actions button{flex:1;min-height:48px;border:1px solid rgba(148,163,184,.3);border-radius:13px;background:rgba(255,255,255,.06);color:#f8fafc;font-weight:800;cursor:pointer}.preview-vision-selector-actions button.primary{border:0;background:linear-gradient(135deg,#22d3ee,#0891b2);color:#03131a}.preview-vision-selector-actions button:focus-visible{outline:3px solid rgba(103,232,249,.5);outline-offset:2px}@media(max-width:640px){.preview-vision-selector-guide{top:max(10px,env(safe-area-inset-top));padding:10px 12px}.preview-vision-selector-guide span{font-size:11px}.preview-vision-selector-actions{bottom:max(10px,env(safe-area-inset-bottom));gap:8px}.preview-vision-selector-actions button{min-height:46px;font-size:13px}}

/* ========================================================================== */
/* Twinscopes preview controls + exact-capture selector v13                    */
/* ========================================================================== */
.ts-preview-icon{display:inline-block;width:20px;height:20px;flex:0 0 auto;background:currentColor;vertical-align:middle;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
.ts-preview-icon--back,.ts-preview-icon--previous{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E")}
.ts-preview-icon--next{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}
.ts-preview-icon--zoom-in{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E")}
.ts-preview-icon--zoom-out{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4M8 11h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4M8 11h6'/%3E%3C/svg%3E")}
.ts-preview-icon--target,.ts-preview-icon--focus{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E")}
.ts-preview-icon--rotate{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.34 5.66'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.34 5.66'/%3E%3Cpath d='M20 4v7h-7'/%3E%3C/svg%3E")}
.ts-preview-icon--shop{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 12H7L6 8Z'/%3E%3Cpath d='M9 9V6a3 3 0 0 1 6 0v3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 12H7L6 8Z'/%3E%3Cpath d='M9 9V6a3 3 0 0 1 6 0v3'/%3E%3C/svg%3E")}
.ts-preview-icon--calendar{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18M8 14h3M13 14h3M8 17h3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18M8 14h3M13 14h3M8 17h3'/%3E%3C/svg%3E")}
.ts-preview-icon--share{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 10.5 6.8-4M8.6 13.5l6.8 4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 10.5 6.8-4M8.6 13.5l6.8 4'/%3E%3C/svg%3E")}
.ts-preview-icon--fullscreen{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3H3v5M16 3h5v5M8 21H3v-5M16 21h5v-5'/%3E%3C/svg%3E")}
.ts-preview-icon--eye{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E")}
.ts-preview-icon--close{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E")}
.ts-preview-icon--scan{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3H4a1 1 0 0 0-1 1v4M16 3h4a1 1 0 0 1 1 1v4M8 21H4a1 1 0 0 1-1-1v-4M16 21h4a1 1 0 0 0 1-1v-4M7 12h10M12 7v10'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3H4a1 1 0 0 0-1 1v4M16 3h4a1 1 0 0 1 1 1v4M8 21H4a1 1 0 0 1-1-1v-4M16 21h4a1 1 0 0 0 1-1v-4M7 12h10M12 7v10'/%3E%3C/svg%3E")}
.control-btn .ts-preview-icon{width:19px;height:19px}.preview-top-left-back .ts-preview-icon{width:25px;height:25px}.preview-tour-stat-badge-icon.ts-preview-icon{width:15px!important;height:15px!important}
.control-btn{font-size:0!important}.control-btn:hover .ts-preview-icon,.control-btn.is-active .ts-preview-icon{transform:scale(1.06)}
.preview-vision-selector{position:fixed!important;inset:0!important;padding-bottom:calc(110px + env(safe-area-inset-bottom))!important;background:transparent!important}
.preview-vision-selector-guide{top:max(18px,calc(env(safe-area-inset-top) + 10px))!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;width:min(590px,calc(100% - 30px))!important;padding:11px 14px!important;text-align:left!important;border-radius:20px!important;background:linear-gradient(145deg,rgba(2,6,23,.94),rgba(15,23,42,.91))!important;border:1px solid rgba(103,232,249,.30)!important;box-shadow:0 22px 65px rgba(0,0,0,.44),0 0 0 1px rgba(255,255,255,.035) inset!important;backdrop-filter:blur(18px) saturate(140%)!important}
.preview-vision-brand-mark{display:grid!important;place-items:center!important;width:44px!important;height:44px!important;flex:0 0 44px!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(34,211,238,.19),rgba(249,115,22,.12))!important;border:1px solid rgba(103,232,249,.24)!important;overflow:hidden!important}.preview-vision-brand-mark img{display:block;width:36px;height:36px;object-fit:contain}.preview-vision-selector-guide-copy{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0}.preview-vision-selector-guide-copy strong{font-size:14px!important;letter-spacing:-.01em}.preview-vision-selector-guide-copy>span{font-size:12px!important;color:#cbd5e1!important;line-height:1.35!important}
.preview-vision-selection-box{border:2px solid #22d3ee!important;border-radius:18px!important;background:rgba(6,182,212,.035)!important;box-shadow:0 0 0 9999px rgba(2,6,23,.42),0 0 0 5px rgba(34,211,238,.15),0 0 44px rgba(34,211,238,.42)!important}.preview-vision-selection-box:before{content:"";position:absolute;inset:-2px;border-radius:18px;pointer-events:none;background:linear-gradient(90deg,#22d3ee 0 18%,transparent 18% 82%,#22d3ee 82% 100%) top/100% 2px no-repeat,linear-gradient(90deg,#22d3ee 0 18%,transparent 18% 82%,#22d3ee 82% 100%) bottom/100% 2px no-repeat,linear-gradient(0deg,#22d3ee 0 18%,transparent 18% 82%,#22d3ee 82% 100%) left/2px 100% no-repeat,linear-gradient(0deg,#22d3ee 0 18%,transparent 18% 82%,#22d3ee 82% 100%) right/2px 100% no-repeat}.preview-vision-selection-label{position:absolute;left:10px;top:10px;padding:5px 8px;border-radius:999px;background:rgba(2,6,23,.82);border:1px solid rgba(103,232,249,.30);color:#cffafe;font-size:9px;font-weight:900;letter-spacing:.11em;pointer-events:none}.preview-vision-resize-handle{width:30px!important;height:30px!important;background:#ecfeff!important;border:5px solid #0891b2!important;box-shadow:0 5px 20px rgba(2,6,23,.62)!important}
.preview-vision-selector-actions{position:fixed!important;left:50%!important;right:auto!important;bottom:max(20px,calc(env(safe-area-inset-bottom) + 16px))!important;transform:translateX(-50%)!important;z-index:2147483646!important;display:grid!important;grid-template-columns:minmax(130px,.78fr) minmax(190px,1.22fr)!important;gap:10px!important;width:min(540px,calc(100vw - 28px))!important;padding:10px!important;border-radius:22px!important;background:linear-gradient(145deg,rgba(2,6,23,.96),rgba(15,23,42,.94))!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:0 24px 80px rgba(0,0,0,.54),0 0 0 1px rgba(255,255,255,.035) inset!important;backdrop-filter:blur(22px) saturate(145%)!important}
.preview-vision-selector-actions .preview-vision-selection-action{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;min-height:52px!important;border-radius:15px!important;font-size:13px!important;font-weight:900!important;letter-spacing:.01em!important;transition:transform .17s ease,filter .17s ease,border-color .17s ease!important}.preview-vision-selector-actions .preview-vision-selection-action.secondary{background:rgba(255,255,255,.055)!important;border:1px solid rgba(148,163,184,.27)!important;color:#e2e8f0!important}.preview-vision-selector-actions .preview-vision-selection-action.primary{background:linear-gradient(135deg,#67e8f9 0%,#06b6d4 55%,#0891b2 100%)!important;border:1px solid rgba(207,250,254,.35)!important;color:#03202a!important;box-shadow:0 12px 30px rgba(6,182,212,.28)!important}.preview-vision-selector-actions button:hover:not(:disabled){transform:translateY(-1px)!important;filter:brightness(1.07)}.preview-vision-selector-actions button:disabled{cursor:wait!important;opacity:.72!important}.preview-vision-selector.is-capturing .preview-vision-selection-box{animation:previewExactCapturePulse 1s ease-in-out infinite}.preview-vision-selector.is-capturing .ts-preview-icon--scan{animation:previewExactCaptureSpin .8s linear infinite}
@keyframes previewExactCapturePulse{50%{box-shadow:0 0 0 9999px rgba(2,6,23,.48),0 0 0 8px rgba(34,211,238,.20),0 0 60px rgba(34,211,238,.6)}}@keyframes previewExactCaptureSpin{to{transform:rotate(360deg)}}
@media(max-width:640px){.preview-vision-selector-guide{top:max(10px,calc(env(safe-area-inset-top) + 8px))!important;width:calc(100% - 20px)!important;padding:9px 11px!important;border-radius:17px!important}.preview-vision-brand-mark{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:12px!important}.preview-vision-brand-mark img{width:31px;height:31px}.preview-vision-selector-guide-copy strong{font-size:13px!important}.preview-vision-selector-guide-copy>span{font-size:10.5px!important}.preview-vision-selector-actions{bottom:max(10px,calc(env(safe-area-inset-bottom) + 8px))!important;width:calc(100vw - 18px)!important;grid-template-columns:.78fr 1.22fr!important;padding:8px!important;border-radius:18px!important}.preview-vision-selector-actions .preview-vision-selection-action{min-height:50px!important;font-size:12px!important;gap:7px!important}.preview-vision-selector-actions .ts-preview-icon{width:18px;height:18px}.preview-vision-selection-label{font-size:8px;padding:4px 6px}.preview-vision-resize-handle{width:27px!important;height:27px!important}}
@media(max-width:380px){.preview-vision-selector-actions{grid-template-columns:1fr!important}.preview-vision-selector-actions .preview-vision-selection-action{min-height:44px!important}.preview-vision-selector{padding-bottom:calc(130px + env(safe-area-inset-bottom))!important}}

/* ========================================================================== */
/* Twinscopes Preview Intelligence + Responsive Selection + SEO UI v14        */
/* ========================================================================== */
.ts-preview-icon--info {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E");
}

/* The visible title is now the tour title; the smaller line names the owner. */
.brand-kicker {
    display: block !important;
    margin: 0 0 2px !important;
    max-width: 280px !important;
    overflow: hidden !important;
    color: rgba(207, 250, 254, .76) !important;
    font-size: 8px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: .12em !important;
    text-overflow: ellipsis !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.brand-company-name {
    max-width: 330px !important;
}

/* Small, crawlable tour-information disclosure. It stays out of the panorama
   until requested while keeping meaningful server-rendered content in the DOM. */
.preview-tour-details {
    position: fixed !important;
    z-index: 97 !important;
    top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
    left: max(14px, env(safe-area-inset-left, 0px)) !important;
    width: 46px !important;
    color: #f8fafc !important;
}

.preview-tour-details[open] {
    width: min(390px, calc(100vw - 28px)) !important;
}

.preview-tour-details > summary {
    display: inline-flex !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, .68) !important;
    border-radius: 999px !important;
    background: rgba(2, 6, 23, .40) !important;
    color: #fff !important;
    cursor: pointer !important;
    list-style: none !important;
    box-shadow: 0 12px 38px rgba(0, 0, 0, .22) !important;
    backdrop-filter: blur(12px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(135%) !important;
}

.preview-tour-details > summary::-webkit-details-marker {
    display: none !important;
}

.preview-tour-details > summary .ts-preview-icon {
    width: 21px !important;
    height: 21px !important;
}

.preview-tour-details[open] > summary {
    border-color: rgba(103, 232, 249, .82) !important;
    background: rgba(8, 145, 178, .84) !important;
}

.preview-tour-details article {
    margin-top: 8px !important;
    max-height: min(60dvh, 520px) !important;
    overflow: auto !important;
    padding: 20px !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, rgba(2, 6, 23, .96), rgba(15, 23, 42, .93)) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48) !important;
    backdrop-filter: blur(22px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
}

.preview-tour-details-kicker {
    margin: 0 0 8px !important;
    color: #67e8f9 !important;
    font-size: 9px !important;
    font-weight: 950 !important;
    letter-spacing: .18em !important;
}

.preview-tour-details h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(20px, 3vw, 29px) !important;
    font-weight: 950 !important;
    line-height: 1.08 !important;
    letter-spacing: -.03em !important;
}

.preview-tour-details article > p:not(.preview-tour-details-kicker) {
    margin: 11px 0 16px !important;
    color: #cbd5e1 !important;
    font-size: 13px !important;
    line-height: 1.62 !important;
}

.preview-tour-details dl {
    display: grid !important;
    gap: 8px !important;
    margin: 0 !important;
}

.preview-tour-details dl > div {
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(148, 163, 184, .13) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.preview-tour-details dt {
    color: #94a3b8 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

.preview-tour-details dd {
    min-width: 0 !important;
    margin: 0 !important;
    overflow-wrap: anywhere !important;
    color: #f8fafc !important;
    font-size: 12px !important;
    font-weight: 760 !important;
}

.preview-tour-details article > a {
    display: inline-flex !important;
    min-height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 14px !important;
    padding: 0 15px !important;
    border-radius: 13px !important;
    color: #03202a !important;
    background: linear-gradient(135deg, #67e8f9, #22d3ee) !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    text-decoration: none !important;
}

/* Keep the normal dock touch-friendly and scrollable rather than shrinking
   controls into unreadable circles. */
#previewControlDock .dock-scroll {
    scroll-padding-inline: 14px !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

#previewControlDock .dock-row > button,
#previewControlDock .dock-row > .dock-divider {
    scroll-snap-align: center !important;
}

@media (max-width: 1120px) and (min-width: 769px) {
    #previewControlDock {
        width: min(720px, calc(100vw - 18px)) !important;
    }
    #previewControlDock .dock-row {
        gap: 5px !important;
    }
    #previewControlDock .control-btn {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        border-radius: 14px !important;
    }
    #previewControlDock .scene-stack-toggle-inline {
        width: 54px !important;
        min-width: 54px !important;
        height: 40px !important;
    }
}

/* While framing an object, only the selection workflow remains interactive.
   This prevents the Analyze/Cancel bar from colliding with the panorama dock,
   AI launcher, scene rail, statistics, or other chrome. */
html.vision-selection-active,
body.vision-selection-active {
    overflow: hidden !important;
}

body.vision-selection-active #previewControlDock,
body.vision-selection-active #previewSceneRail,
body.vision-selection-active #brandOverlay,
body.vision-selection-active #previewTopRightStats,
body.vision-selection-active #previewBackBtn,
body.vision-selection-active #previewTourDetails,
body.vision-selection-active .tour-ai-launcher,
body.vision-selection-active .tour-ai-nudge,
body.vision-selection-active .tour-ai-panel,
body.vision-selection-active .tour-ai-vision-sheet,
body.vision-selection-active .tour-ai-vision-backdrop {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(16px) !important;
}

.preview-vision-selector {
    contain: layout paint style !important;
}

.preview-vision-selector-actions {
    bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 14px)) !important;
    max-height: calc(100dvh - 24px) !important;
}

.preview-vision-selector-actions .preview-vision-selection-action {
    min-width: 0 !important;
    white-space: nowrap !important;
}

.preview-vision-selector-status {
    position: absolute !important;
    left: 50% !important;
    bottom: calc(100% + 8px) !important;
    width: max-content !important;
    max-width: calc(100vw - 28px) !important;
    transform: translateX(-50%) !important;
    padding: 7px 11px !important;
    border: 1px solid rgba(103, 232, 249, .22) !important;
    border-radius: 999px !important;
    color: #cffafe !important;
    background: rgba(2, 6, 23, .90) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .18s ease !important;
}

.preview-vision-selector.is-capturing .preview-vision-selector-status {
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .preview-tour-details {
        top: calc(env(safe-area-inset-top, 0px) + 58px) !important;
        left: max(10px, env(safe-area-inset-left, 0px)) !important;
    }
    .preview-tour-details[open] {
        width: min(360px, calc(100vw - 20px)) !important;
    }
    .preview-tour-details > summary {
        width: 41px !important;
        height: 41px !important;
    }
    .preview-tour-details article {
        max-height: min(64dvh, 500px) !important;
        padding: 17px !important;
        border-radius: 21px !important;
    }

    #previewControlDock .control-btn,
    #previewControlDock .scene-stack-toggle-inline {
        min-height: 44px !important;
        height: 44px !important;
    }
    #previewControlDock .control-btn {
        width: 44px !important;
        min-width: 44px !important;
    }
    #previewControlDock .scene-stack-toggle-inline {
        width: 58px !important;
        min-width: 58px !important;
    }

    .preview-vision-selector-actions {
        width: calc(100vw - 20px) !important;
        grid-template-columns: minmax(104px, .78fr) minmax(150px, 1.22fr) !important;
        gap: 8px !important;
        padding: 8px !important;
    }
    .preview-vision-selector-actions .preview-vision-selection-action {
        min-height: 52px !important;
        padding-inline: 9px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 430px) {
    .brand-overlay-chip,
    .brand-overlay-chip-centered,
    .brand-header-chip {
        max-width: min(246px, calc(100vw - 112px)) !important;
    }
    .brand-kicker {
        max-width: 170px !important;
        font-size: 7px !important;
    }
    .brand-company-name {
        max-width: 174px !important;
        font-size: 11px !important;
    }
    .preview-vision-selector-actions {
        grid-template-columns: 1fr 1.35fr !important;
    }
    .preview-vision-selector-actions .preview-vision-selection-action span:last-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Short landscape screens need a compact guide and a horizontal action bar. */
@media (max-height: 620px) and (orientation: landscape) {
    .preview-vision-selector-guide {
        top: max(8px, env(safe-area-inset-top, 0px)) !important;
        left: max(10px, env(safe-area-inset-left, 0px)) !important;
        width: min(430px, calc(100vw - 20px)) !important;
        transform: none !important;
        padding: 8px 10px !important;
    }
    .preview-vision-brand-mark {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }
    .preview-vision-brand-mark img {
        width: 28px !important;
        height: 28px !important;
    }
    .preview-vision-selector-guide-copy strong {
        font-size: 12px !important;
    }
    .preview-vision-selector-guide-copy > span {
        font-size: 10px !important;
    }
    .preview-vision-selector-actions {
        right: max(10px, env(safe-area-inset-right, 0px)) !important;
        left: auto !important;
        bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
        width: min(420px, calc(100vw - 20px)) !important;
        transform: none !important;
        grid-template-columns: .8fr 1.2fr !important;
        padding: 7px !important;
    }
    .preview-vision-selector-actions .preview-vision-selection-action {
        min-height: 44px !important;
    }
}

@media (max-width: 360px) {
    .preview-vision-selector-actions {
        grid-template-columns: 1fr !important;
    }
    .preview-vision-selector-actions .preview-vision-selection-action {
        min-height: 44px !important;
    }
}

/* Preview intelligence v14.1 — guarantee that the exact-selection workflow
   owns the viewport and never collides with the normal tour dock. */
body.vision-selection-active [data-ui="chrome"],
body.vision-selection-active #previewControlDock,
body.vision-selection-active #previewSceneRail,
body.vision-selection-active .scene-stack-panel,
body.vision-selection-active .tour-ai-launcher,
body.vision-selection-active .tour-ai-nudge,
body.vision-selection-active .tour-ai-panel,
body.vision-selection-active .tour-ai-vision-sheet,
body.vision-selection-active .tour-ai-vision-backdrop {
    display: none !important;
}

body.vision-selection-active .preview-vision-selector {
    display: block !important;
    z-index: 2147483645 !important;
}

.preview-vision-selector-actions {
    isolation: isolate !important;
    pointer-events: auto !important;
}

.preview-vision-selector-actions button {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

@media (max-height: 500px) and (orientation: landscape) {
    .preview-vision-selector-guide-copy > span {
        display: none !important;
    }
    .preview-vision-selector-guide {
        width: min(330px, calc(100vw - 20px)) !important;
    }
    .preview-vision-selector-actions {
        width: min(350px, calc(100vw - 20px)) !important;
    }
}


/* ========================================================================== */
/* Twinscopes Preview SVG Controls + Docked Tour Information v15              */
/* ========================================================================== */
.ts-icon-sprite {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.ts-control-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    overflow: visible !important;
    color: currentColor !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
    pointer-events: none !important;
    transition: transform .17s ease, opacity .17s ease !important;
}

.ts-control-icon--lg {
    width: 25px !important;
    height: 25px !important;
    flex-basis: 25px !important;
}

.control-btn .ts-control-icon,
.preview-top-left-back .ts-control-icon,
.preview-tour-stat-badge .ts-control-icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.control-btn:hover .ts-control-icon,
.control-btn.active .ts-control-icon,
.control-btn.is-active .ts-control-icon,
.preview-tour-details[open] > summary .ts-control-icon {
    transform: scale(1.07) !important;
}

.preview-tour-stat-badge-icon.ts-control-icon {
    width: 15px !important;
    height: 15px !important;
    flex-basis: 15px !important;
}

/* Tour information now belongs to the same command dock as the other tools. */
.preview-tour-details.preview-tour-details--dock {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    color: #f8fafc !important;
}

.preview-tour-details.preview-tour-details--dock[open] {
    width: 42px !important;
}

.preview-tour-details.preview-tour-details--dock > summary {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255,255,255,.65) !important;
    background: rgba(255,255,255,.055) !important;
    color: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.preview-tour-details.preview-tour-details--dock[open] > summary {
    border-color: rgba(103,232,249,.92) !important;
    background: rgba(8,145,178,.78) !important;
}

.preview-tour-details.preview-tour-details--dock > article {
    position: fixed !important;
    z-index: 2147481200 !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(max(78px, env(safe-area-inset-bottom, 0px) + 72px)) !important;
    width: min(420px, calc(100vw - 24px)) !important;
    max-height: min(62dvh, 540px) !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    overscroll-behavior: contain !important;
}

.preview-tour-details.preview-tour-details--dock > article::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 16px;
    height: 16px;
    transform: translateX(-50%) rotate(45deg);
    border-right: 1px solid rgba(148,163,184,.20);
    border-bottom: 1px solid rgba(148,163,184,.20);
    background: rgba(15,23,42,.96);
}

@media (max-width: 768px) {
    .preview-tour-details.preview-tour-details--dock,
    .preview-tour-details.preview-tour-details--dock[open],
    .preview-tour-details.preview-tour-details--dock > summary {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
    }

    .preview-tour-details.preview-tour-details--dock > article {
        bottom: calc(max(72px, env(safe-area-inset-bottom, 0px) + 66px)) !important;
        width: calc(100vw - 18px) !important;
        max-height: min(66dvh, 520px) !important;
        padding: 17px !important;
        border-radius: 21px !important;
    }
}

/* =====================================================================
   TOUR INFORMATION MODAL V16 — POLISHED, JUSTIFIED, RESPONSIVE
   - Same premium modal language as the other preview dialogs.
   - Readable hierarchy, justified desktop copy, mobile-safe typography.
   - Sticky footer, compact facts, proper close action and backdrop.
===================================================================== */

.preview-tour-details.preview-tour-details--dock[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147481100;
    background:
        radial-gradient(circle at 50% 76%, rgba(34, 211, 238, .10), transparent 34%),
        rgba(2, 6, 23, .64);
    backdrop-filter: blur(12px) saturate(125%);
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    animation: previewTourInfoBackdropIn .22s ease both;
}

@keyframes previewTourInfoBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal {
    position: fixed !important;
    z-index: 2147481200 !important;
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    width: min(560px, calc(100vw - 28px)) !important;
    max-width: 560px !important;
    max-height: min(78dvh, 720px) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(34, 211, 238, .13), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(14, 116, 144, .12), transparent 38%),
        linear-gradient(145deg, rgba(15, 23, 42, .985), rgba(2, 6, 23, .99)) !important;
    color: #f8fafc !important;
    box-shadow:
        0 42px 120px rgba(0, 0, 0, .64),
        0 0 0 1px rgba(255, 255, 255, .035) inset,
        0 1px 0 rgba(255, 255, 255, .12) inset !important;
    isolation: isolate;
    animation: previewTourInfoModalIn .34s cubic-bezier(.22, 1, .36, 1) both;
    overscroll-behavior: contain !important;
}

.preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal::after {
    display: none !important;
    content: none !important;
}

@keyframes previewTourInfoModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 18px)) scale(.965);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.preview-tour-details-header {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0));
}

.preview-tour-details-brand {
    position: relative;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #cffafe;
    border: 1px solid rgba(103, 232, 249, .34);
    background:
        radial-gradient(circle at 30% 20%, rgba(103, 232, 249, .22), transparent 44%),
        rgba(8, 145, 178, .12);
    box-shadow:
        0 16px 38px rgba(8, 145, 178, .18),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    overflow: hidden;
}

.preview-tour-details-brand .ts-control-icon {
    position: relative;
    z-index: 2;
    width: 23px !important;
    height: 23px !important;
    stroke-width: 1.8;
}

.preview-tour-details-brand-ring {
    position: absolute;
    inset: 7px;
    border-radius: 14px;
    border: 1px dashed rgba(103, 232, 249, .22);
    animation: previewTourInfoRing 12s linear infinite;
}

@keyframes previewTourInfoRing {
    to { transform: rotate(360deg); }
}

.preview-tour-details-heading {
    min-width: 0;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-kicker {
    margin: 0 0 5px !important;
    color: #67e8f9 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    font-weight: 950 !important;
    letter-spacing: .19em !important;
    text-transform: uppercase !important;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-heading h2 {
    margin: 0 !important;
    max-width: 100%;
    overflow: hidden;
    color: #ffffff !important;
    font-size: clamp(21px, 3vw, 28px) !important;
    line-height: 1.12 !important;
    font-weight: 930 !important;
    letter-spacing: -.035em !important;
    text-overflow: ellipsis;
}

.preview-tour-details-organization {
    margin: 6px 0 0 !important;
    overflow: hidden;
    color: rgba(203, 213, 225, .82) !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    font-weight: 720 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.preview-tour-details-close {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .055);
    color: #f8fafc;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.preview-tour-details-close:hover {
    transform: translateY(-1px);
    border-color: rgba(103, 232, 249, .42);
    background: rgba(8, 145, 178, .18);
}

.preview-tour-details-close .ts-control-icon {
    width: 19px !important;
    height: 19px !important;
}

.preview-tour-details-body {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 232, 249, .30) transparent;
    -webkit-overflow-scrolling: touch;
}

.preview-tour-details-body::-webkit-scrollbar {
    width: 7px;
}

.preview-tour-details-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(103, 232, 249, .24);
}

.preview-tour-details-summary {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.preview-tour-details-section-label {
    display: block;
    margin: 0 0 10px;
    color: #a5f3fc;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-description {
    margin: 0 !important;
    color: rgba(226, 232, 240, .93) !important;
    font-size: 14px !important;
    line-height: 1.82 !important;
    font-weight: 540 !important;
    letter-spacing: .003em !important;
    word-spacing: .025em !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: auto;
    -webkit-hyphens: auto;
    white-space: pre-line;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-facts {
    margin: 16px 0 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-facts > div {
    min-width: 0;
    min-height: 76px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 13px 14px !important;
    border-radius: 17px !important;
    border: 1px solid rgba(148, 163, 184, .13) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .022)) !important;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-facts dt {
    margin: 0 !important;
    color: rgba(148, 163, 184, .92) !important;
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-facts dd {
    margin: 0 !important;
    overflow-wrap: anywhere;
    color: #f8fafc !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    font-weight: 780 !important;
    text-align: left !important;
}

.preview-tour-details-footer {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(148, 163, 184, .14);
    background: rgba(2, 6, 23, .60);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.preview-tour-details-footer > span {
    color: rgba(148, 163, 184, .90);
    font-size: 11.5px;
    line-height: 1.4;
    font-weight: 690;
}

.preview-tour-details.preview-tour-details--dock .preview-tour-details-footer > a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 15px !important;
    border: 1px solid rgba(103, 232, 249, .30) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #22d3ee, #0891b2) !important;
    color: #042f3e !important;
    box-shadow: 0 12px 28px rgba(8, 145, 178, .24) !important;
    text-decoration: none !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 920 !important;
    white-space: nowrap;
}

.preview-tour-details-footer > a .ts-control-icon {
    width: 16px !important;
    height: 16px !important;
}

@media (max-width: 640px) {
    .preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal {
        top: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: min(88dvh, 760px) !important;
        transform: none !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        border-left: 0 !important;
        border-radius: 26px 26px 0 0 !important;
        animation-name: previewTourInfoSheetIn !important;
    }

    @keyframes previewTourInfoSheetIn {
        from { opacity: 0; transform: translateY(34px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .preview-tour-details-header {
        grid-template-columns: 46px minmax(0, 1fr) 40px;
        gap: 11px;
        padding: 16px 15px 14px;
    }

    .preview-tour-details-brand {
        width: 46px;
        height: 46px;
        border-radius: 16px;
    }

    .preview-tour-details-close {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .preview-tour-details.preview-tour-details--dock .preview-tour-details-heading h2 {
        font-size: 20px !important;
    }

    .preview-tour-details-body {
        padding: 15px;
    }

    .preview-tour-details-summary {
        padding: 15px;
        border-radius: 18px;
    }

    .preview-tour-details.preview-tour-details--dock .preview-tour-details-description {
        font-size: 13.5px !important;
        line-height: 1.72 !important;
        text-align: left !important;
        text-justify: auto !important;
        word-spacing: normal !important;
    }

    .preview-tour-details.preview-tour-details--dock .preview-tour-details-facts {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .preview-tour-details.preview-tour-details--dock .preview-tour-details-facts > div {
        min-height: 0;
        padding: 11px 13px !important;
    }

    .preview-tour-details-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .preview-tour-details-footer > span {
        text-align: center;
    }

    .preview-tour-details.preview-tour-details--dock .preview-tour-details-footer > a {
        width: 100%;
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preview-tour-details.preview-tour-details--dock[open]::before,
    .preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal,
    .preview-tour-details-brand-ring {
        animation: none !important;
    }
}

/* =====================================================================
   MOBILE TOUR INFORMATION POSITIONING V17
   - Pins the information sheet to the real mobile viewport.
   - Resets the desktop left:50% rule that previously pushed half the sheet
     outside narrow screens.
   - Prevents the assistant nudge from competing with an open modal.
===================================================================== */
body.preview-tour-info-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

@media (max-width: 640px) {
    .preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal {
        inset: auto 0 0 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        max-height: calc(100dvh - max(8px, env(safe-area-inset-top, 0px))) !important;
        transform: none !important;
        margin: 0 !important;
        border-radius: 26px 26px 0 0 !important;
    }

    .preview-tour-details.preview-tour-details--dock[open]::before {
        inset: 0 !important;
    }

    .preview-tour-details-header,
    .preview-tour-details-body,
    .preview-tour-details-footer {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .preview-tour-details-heading,
    .preview-tour-details-summary,
    .preview-tour-details-description,
    .preview-tour-details-facts,
    .preview-tour-details-facts > div,
    .preview-tour-details-facts dd {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .preview-tour-details-body {
        overscroll-behavior: contain !important;
        padding-bottom: 18px !important;
    }

    .preview-tour-details-footer {
        padding-bottom: max(14px, calc(12px + env(safe-area-inset-bottom, 0px))) !important;
    }
}

@media (max-width: 640px) and (max-height: 620px) {
    .preview-tour-details.preview-tour-details--dock > article.preview-tour-details-modal {
        max-height: calc(100dvh - 4px) !important;
        border-radius: 22px 22px 0 0 !important;
    }

    .preview-tour-details-header {
        padding-top: 12px !important;
        padding-bottom: 11px !important;
    }

    .preview-tour-details-body {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .preview-tour-details-summary {
        padding: 13px !important;
    }
}

/* The contextual AI nudge remains available, but it does not overlap a modal. */
body.preview-tour-info-open .tour-ai-nudge {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) scale(.98) !important;
}


/* =====================================================================
   CENTERED TOUR INFORMATION MODAL V18
   - Uses a body-level portal so transformed preview controls cannot shift
     the modal away from the real viewport centre.
   - Keeps the same centered dialog pattern on desktop, tablet and mobile.
   - Respects dynamic viewport units and device safe areas.
===================================================================== */
.preview-tour-details.preview-tour-details--dock[open]::before {
    content: none !important;
    display: none !important;
}

body.preview-tour-info-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147481100;
    background:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .11), transparent 36%),
        rgba(2, 6, 23, .70);
    backdrop-filter: blur(13px) saturate(128%);
    -webkit-backdrop-filter: blur(13px) saturate(128%);
    animation: previewTourInfoBackdropIn .22s ease both;
}

.preview-tour-details-modal.preview-tour-details-modal--portal {
    position: fixed !important;
    inset: 50% auto auto 50% !important;
    z-index: 2147481200 !important;
    width: min(560px, calc(100vw - 28px)) !important;
    max-width: 560px !important;
    max-height: min(82dvh, 720px) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    transform: translate(-50%, -50%) !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    border-radius: 30px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(34, 211, 238, .13), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(14, 116, 144, .12), transparent 38%),
        linear-gradient(145deg, rgba(15, 23, 42, .985), rgba(2, 6, 23, .99)) !important;
    color: #f8fafc !important;
    box-shadow:
        0 42px 120px rgba(0, 0, 0, .64),
        0 0 0 1px rgba(255, 255, 255, .035) inset,
        0 1px 0 rgba(255, 255, 255, .12) inset !important;
    isolation: isolate;
    overscroll-behavior: contain !important;
    animation: previewTourInfoModalPortalIn .34s cubic-bezier(.22, 1, .36, 1) both !important;
}

.preview-tour-details-modal.preview-tour-details-modal--portal::after {
    content: none !important;
    display: none !important;
}

@keyframes previewTourInfoModalPortalIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 18px)) scale(.965);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 640px) {
    .preview-tour-details-modal.preview-tour-details-modal--portal {
        inset: 50% auto auto 50% !important;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        bottom: auto !important;
        width: calc(100vw - 20px) !important;
        max-width: 520px !important;
        max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px))) !important;
        transform: translate(-50%, -50%) !important;
        border: 1px solid rgba(148, 163, 184, .22) !important;
        border-radius: 24px !important;
        animation-name: previewTourInfoModalPortalIn !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-header {
        padding-top: max(15px, env(safe-area-inset-top, 0px)) !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-footer {
        padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 380px) {
    .preview-tour-details-modal.preview-tour-details-modal--portal {
        width: calc(100vw - 14px) !important;
        max-height: calc(100dvh - 14px) !important;
        border-radius: 21px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-header {
        grid-template-columns: 42px minmax(0, 1fr) 38px !important;
        gap: 9px !important;
        padding: 13px 12px 12px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-brand {
        width: 42px !important;
        height: 42px !important;
        border-radius: 14px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-close {
        width: 38px !important;
        height: 38px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-body {
        padding: 12px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-summary {
        padding: 13px !important;
    }
}

@media (max-height: 560px) {
    .preview-tour-details-modal.preview-tour-details-modal--portal {
        max-height: calc(100dvh - 14px) !important;
        border-radius: 22px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-header {
        padding-top: 11px !important;
        padding-bottom: 10px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-body {
        padding-top: 11px !important;
        padding-bottom: 11px !important;
    }

    .preview-tour-details-modal.preview-tour-details-modal--portal .preview-tour-details-footer {
        min-height: 58px !important;
        padding-top: 10px !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.preview-tour-info-open::before,
    .preview-tour-details-modal.preview-tour-details-modal--portal {
        animation: none !important;
    }
}
