/* OLOtour — Frontend Viewer CSS */

/* ═══════════════════════════════════════════════════════
   Navigation hotspot premium styles
   ═══════════════════════════════════════════════════════ */
.vtour-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    transition: transform 180ms ease, filter 180ms ease;
}
.vtour-nav:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75)) brightness(1.1);
}
.vtour-nav:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 4px;
    border-radius: 50%;
}

/* 1. Chain */
.vtour-nav-chain .ch { opacity: 0.25; animation: navChainFlow 1.5s ease-in-out infinite; }
.vtour-nav-chain .ch1 { animation-delay: 0s; }
.vtour-nav-chain .ch2 { animation-delay: 0.25s; }
.vtour-nav-chain .ch3 { animation-delay: 0.5s; }
@keyframes navChainFlow {
    0%, 100% { opacity: 0.25; transform: translateX(-2px); }
    50% { opacity: 1; transform: translateX(0); }
}

/* 2. Footprints */
.vtour-nav-foot { position: relative; }
.vtour-nav-foot .fp { position: absolute; opacity: 0; }
.vtour-nav-foot .fp1 { top: 15%; left: 10%; animation: navFoot 2.4s ease-in-out infinite; animation-delay: 0s; }
.vtour-nav-foot .fp2 { top: 45%; right: 10%; animation: navFootRight 2.4s ease-in-out infinite; animation-delay: 1.2s; transform: scaleX(-1); }
@keyframes navFoot {
    0% { opacity: 0; transform: translateY(8px) scale(0.85); }
    25%, 60% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-4px) scale(1); }
}
@keyframes navFootRight {
    0% { opacity: 0; transform: scaleX(-1) translateY(8px) scale(0.85); }
    25%, 60% { opacity: 1; transform: scaleX(-1) translateY(0) scale(1); }
    100% { opacity: 0; transform: scaleX(-1) translateY(-4px) scale(1); }
}

/* 3. Portal */
.vtour-nav-portal .portal-ring { transform-origin: 40px 40px; animation: navPortalSpin 6s linear infinite; }
@keyframes navPortalSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.vtour-nav-portal .portal-arrow { transform-origin: 40px 40px; animation: navPortalPulse 2s ease-in-out infinite; }
@keyframes navPortalPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* 4. Chevron pulse */
.vtour-nav-chevronp .cp { opacity: 0; transform-origin: 30px 30px; animation: navChevronPulse 1.8s ease-out infinite; }
.vtour-nav-chevronp .cp1 { animation-delay: 0s; }
.vtour-nav-chevronp .cp2 { animation-delay: 0.6s; }
.vtour-nav-chevronp .cp3 { animation-delay: 1.2s; }
@keyframes navChevronPulse {
    0% { opacity: 0; transform: scale(0.4); }
    50% { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
}

/* 5. Beam */
.vtour-nav-beam { flex-direction: column; gap: 0; }
.vtour-nav-beam .beam-column {
    flex: 1;
    width: 40%;
    background: linear-gradient(to top, currentColor 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black, transparent);
    mask-image: linear-gradient(to top, black, transparent);
    animation: navBeamWave 2s ease-in-out infinite;
    filter: blur(0.5px);
}
@keyframes navBeamWave {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.05); }
}
.vtour-nav-beam .beam-arrow { margin-top: -8px; filter: drop-shadow(0 0 4px currentColor); }

/* 6. Neon */
.vtour-nav-neon .neon-arrow {
    filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor);
    animation: navNeonPulse 1.8s ease-in-out infinite;
}
@keyframes navNeonPulse {
    0%, 100% { filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor); }
    50% { filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 12px currentColor) drop-shadow(0 0 24px currentColor) drop-shadow(0 0 36px currentColor); }
}

/* 7. Ripple */
.vtour-nav-ripple { position: relative; }
.vtour-nav-ripple .rp {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: navRipple 2.4s ease-out infinite;
}
.vtour-nav-ripple .rp1 { animation-delay: 0s; }
.vtour-nav-ripple .rp2 { animation-delay: 0.8s; }
.vtour-nav-ripple .rp3 { animation-delay: 1.6s; }
@keyframes navRipple {
    0% { opacity: 0.8; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(1.5); }
}
.vtour-nav-ripple .rp-arrow { position: relative; z-index: 1; filter: drop-shadow(0 0 4px rgba(0,0,0,0.5)); }

/* 8. Bounce */
.vtour-nav-bounce .bounce-arrow { transform-origin: 25px 44px; animation: navBounceArrow 1.4s ease-in-out infinite; }
@keyframes navBounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.vtour-nav-bounce .bounce-shadow { transform-origin: center; animation: navBounceShadow 1.4s ease-in-out infinite; }
@keyframes navBounceShadow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(0.6); opacity: 0.15; }
}

/* 9. Particles */
.vtour-nav-particles .pt { opacity: 0; animation: navParticle 1.6s ease-out infinite; }
@keyframes navParticle {
    0% { opacity: 0; transform: translateX(-5px); }
    30% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(8px); }
}

/* 10. Wayfinding */
.vtour-nav-way {
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex; align-items: center;
    gap: 8px; white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.2px;
    animation: navWayBreath 2.5s ease-in-out infinite;
}
.vtour-nav-way .way-arrow { animation: navWayArrow 1.5s ease-in-out infinite; }
@keyframes navWayArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes navWayBreath {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .vtour-nav *, .vtour-nav { animation: none !important; }
    .vtour-nav:hover { transform: none; }
}

/* Accessibility: focus indicator for hotspot markers */
.vtour-hs-marker:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    .vtour-hs-pulse,
    .vtour-hs-bounce {
        animation: none !important;
    }
}

/* Custom properties per personalizzazione tema */
.olotour-container {
    --vtour-popover-bg: rgba(8, 14, 24, 0.5);
    --vtour-popover-border: rgba(255, 255, 255, 0.12);
    --vtour-popover-text: #e7edf6;
    --vtour-btn-primary: #16b9a6;
    --vtour-btn-primary-hover: #2dd4bf;
    --vtour-close-hover: rgba(220,38,38,0.8);

    position: relative;
    overflow: hidden;
    /* Raggio della CORNICE esterna del tour: pochi px, discreto. Gli elementi
       interni (popover, bottoni, pill) mantengono i loro raggi propri. */
    border-radius: 8px;
    background: #0b1320;
}

/* Title bar — nome tour/ambiente in alto */
.olotour-title-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    padding: 10px 16px 28px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 70%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Marker z-index sopra navbar PSV */
.olotour-container .psv-markers {
    z-index: 20 !important;
}
.olotour-container .psv-navbar {
    z-index: 15 !important;
    background: transparent !important;
    border-top: 1px solid rgba(255,255,255,0.12) !important;
    justify-content: center !important;
}

/* Nasconde caption dalla navbar (il nome scena va in alto a destra) */
.olotour-container .psv-caption {
    display: none !important;
}
/* Nasconde description button (collegato a caption) */
.olotour-container .psv-description-button {
    display: none !important;
}

/* Nasconde barra avanzamento video 360 */
.olotour-container .psv-video-progressbar {
    display: none !important;
}

/* Nasconde slider zoom (solo bottoni +/−) */
.olotour-container .psv-zoom-range {
    display: none !important;
}

/* Icone navbar: colore bianco, tratto sottile */
.olotour-container .psv-button {
    color: rgba(255,255,255,0.85) !important;
}
.olotour-container .psv-button:hover {
    color: #2dd4bf !important;
}
.olotour-container .psv-button-svg {
    stroke-width: 1 !important;
}

/* Scene name label — centrato sotto il titolo tour */
.olotour-scene-name {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    z-index: 25;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.3px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Mappa: posiziona in basso a sinistra, dentro la navbar */
.olotour-container .psv-map {
    bottom: -2px !important;
    left: 8px !important;
    z-index: 20 !important;
}
.olotour-container .psv-map--collapsed,
.olotour-container .psv-map--collapsed > *,
.olotour-container .psv-map--collapsed .psv-map__container,
.olotour-container .psv-map--collapsed .psv-map__overlay {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.olotour-container .psv-map--collapsed {
    opacity: 0.85;
}
.olotour-container .psv-map--collapsed:hover {
    opacity: 1;
}

/* Fix mappa massimizzata: deve stare sopra a tutto per ricevere i click */
.olotour-container .psv-map--maximized {
    z-index: 50 !important;
}
.olotour-container .psv-map--maximized .psv-map__container {
    z-index: 0 !important;
}
.olotour-container .psv-map--maximized canvas {
    pointer-events: auto !important;
}

/* Hotspot marker animations — colore via CSS variable dal JS */
@keyframes vtour-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--hs-pulse-color, rgba(255,255,255,0.4)); }
    50% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes vtour-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.vtour-hs-pulse { animation: vtour-pulse 2s infinite; }
.vtour-hs-bounce { animation: vtour-bounce 1s infinite; }

.vtour-hs-marker {
    transition: transform 0.2s;
}
.vtour-hs-marker:hover {
    transform: scale(1.15);
}

/* ── Stili marker: glass / beacon / pill ──────────────────────────
   Il markup e tutto lo stile statico stanno in src/config/marker-view.js, che
   è la sorgente unica per builder, viewer e scene 3D. Qui restano solo le
   @keyframes e gli :hover, che inline non si possono esprimere.
   ⚠ Blocco DUPLICATO in src/style.css (il builder inietta il proprio CSS dal
   bundle JS e non vede questo file): ogni modifica va replicata lì. */

/* Glass — anello categoria interno, anello pulsante esterno, etichetta sotto */
.vtour-ms-glass .vtour-ms-cat {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 2px solid var(--vtour-ms-c, #3b82f6);
    pointer-events: none;
}
.vtour-ms-glass .vtour-ms-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--vtour-ms-c, #3b82f6);
    pointer-events: none;
    animation: vtour-ms-ring 2.4s ease-out infinite;
}
.vtour-ms-glass .vtour-ms-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
@keyframes vtour-ms-ring {
    from { transform: scale(0.85); opacity: 0.85; }
    to   { transform: scale(1.5);  opacity: 0; }
}
.vtour-ms-glass:hover { transform: scale(1.12); }

/* Beacon — nucleo pieno + doppio anello pulsante sfasato */
.vtour-ms-beacon .vtour-ms-core {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--vtour-ms-c, #3b82f6);
    border: 2.5px solid var(--vtour-ms-edge, #fff);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.vtour-ms-beacon .vtour-ms-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--vtour-ms-c, #3b82f6);
    pointer-events: none;
    animation: vtour-ms-pulse 2.2s ease-out infinite;
}
.vtour-ms-beacon .vtour-ms-pulse-2 { animation-delay: 1.1s; }
@keyframes vtour-ms-pulse {
    from { transform: scale(1); opacity: 0.5; }
    to   { transform: scale(2); opacity: 0; }
}
/* L'ingrandimento va sul nucleo, non sul contenitore: quello porta il tilt
   prospettico inline, che lo scriverebbe sopra. */
.vtour-ms-beacon:hover .vtour-ms-core { transform: scale(1.18); }

/* Pill — disco icona nel colore categoria */
.vtour-ms-pill .vtour-ms-pdisc {
    border-radius: 50%;
    background: var(--vtour-ms-c, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vtour-ms-pill:hover { transform: scale(1.05); }

/* Visitato — il punto è già stato aperto: resta com'è (icona e colore del suo
   tipo, per poterci tornare), ma smette di chiamare. L'attenuazione la mette il
   markup (marker-view.js); qui si fermano gli anelli. */
.vtour-ms-visited .vtour-ms-ring,
.vtour-ms-visited .vtour-ms-pulse {
    opacity: 0;
    animation: none;
}

/* ── Marker a terra: pad / chevron / ring ─────────────────────────
   Accompagnano rispettivamente Glass, Beacon e Pill. Il markup sta in
   src/config/marker-view.js; lo stile "classic" resta l'ellisse SVG di sempre
   e non passa di qui. ⚠ Blocco DUPLICATO in src/style.css. */

/* Pad — disco ellittico in vetro appoggiato a terra */
.vtour-fs-pad {
    position: relative;
    box-sizing: border-box;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.26);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chevron — doppio gallone disteso sul pavimento */
.vtour-fs-chevron {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
}
.vtour-fs-chevron .vtour-fs-chev {
    display: flex;
    line-height: 0;
    pointer-events: none;
}
.vtour-fs-chevron .vtour-fs-chev-2 { opacity: 0.6; }
.vtour-fs-chevron:hover { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)) brightness(1.15); }

/* Ring — anello luminoso con alone pulsante */
.vtour-fs-ring {
    position: relative;
    box-sizing: border-box;
    border-radius: 50%;
    border: 3px solid var(--vtour-ms-c, #3fa23f);
    box-shadow: 0 0 16px var(--vtour-ms-glow, rgba(63, 162, 63, 0.6)),
                inset 0 0 16px var(--vtour-ms-glow, rgba(63, 162, 63, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}
.vtour-fs-ring .vtour-fs-halo {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--vtour-ms-c, #3fa23f);
    pointer-events: none;
    animation: vtour-ms-ring 2.4s ease-out infinite;
}

/* Freccia coricata a terra, comune a pad e ring */
.vtour-fs-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    pointer-events: none;
}

/* Selezione nel builder */
.vtour-fs-active {
    outline: 2.5px dashed #f59e0b;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .vtour-ms-ring,
    .vtour-ms-pulse,
    .vtour-fs-halo {
        animation: none !important;
        opacity: 0.35;
    }
}

/* Info popover */
.olotour-popover {
    position: absolute;
    z-index: 100;
    background: var(--vtour-popover-bg);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--vtour-popover-border);
    border-radius: 16px;
    max-width: 360px;
    min-width: 260px;
    overflow: hidden;
    color: var(--vtour-popover-text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.olotour-popover-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: background 0.2s;
}
.olotour-popover-close:hover {
    background: var(--vtour-close-hover);
}

.olotour-popover-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--vtour-btn-primary);
    color: #06231f !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
}
.olotour-popover-btn:hover {
    background: var(--vtour-btn-primary-hover);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

/* Info popover — layout media moderno (scrim foto, overline accento, CTA) */
.olotour-popover--media { min-width: 260px; max-width: 340px; }
.olotour-pop-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #26313f;
}
.olotour-pop-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.olotour-pop-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 24, 37, 0) 45%, rgba(16, 24, 37, 0.92) 100%);
    pointer-events: none;
}
.olotour-pop-body { padding: 14px 18px 18px; }
.olotour-pop-over {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.olotour-pop-content { font-size: 14px; line-height: 1.55; opacity: 0.92; }
.olotour-pop-content > :first-child { margin-top: 0; }
.olotour-pop-content h1,
.olotour-pop-content h2 { font-size: 20px; font-weight: 600; margin: 0 0 8px; line-height: 1.2; }
.olotour-pop-content h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.olotour-pop-content p { margin: 0 0 8px; }
.olotour-pop-content p:last-child { margin-bottom: 0; }
.olotour-popover--media .olotour-popover-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
}

/* Overlay */
.olotour-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

/* Loading */
.olotour-container .psv-loader {
    background: rgba(0,0,0,0.8) !important;
}

/* Tooltip style override — trasparente di default, stile via custom-tip */
.olotour-container .psv-tooltip {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 4px 8px !important;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.7) !important;
}

.olotour-container .psv-tooltip-arrow {
    display: none !important;
}

/* Custom tooltip: rende il wrapper PSV trasparente */
.olotour-container .psv-tooltip:has(.vtour-custom-tip) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.olotour-container .psv-tooltip:has(.vtour-custom-tip) .psv-tooltip-arrow {
    display: none !important;
}

/* Floor markers (ellisse SVG — disco a pavimento per hotspot scene) */
.vtour-floor-marker {
    cursor: pointer;
    transition: transform 0.2s;
}
.vtour-floor-marker:hover {
    transform: scale(1.1);
}

/* Audio button nella navbar PSV */
.olotour-audio-btn {
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.olotour-audio-btn:hover {
    opacity: 1;
}

/* Audio popup (volume + stop) */
.vtour-audio-popup {
    position: absolute;
    bottom: 46px;
    right: 50px;
    z-index: 40;
    animation: vtour-popup-in 0.15s ease-out;
}
@keyframes vtour-popup-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vtour-ap-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(8, 14, 24, 0.5);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.vtour-ap-stop {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.vtour-ap-stop:hover {
    background: rgba(255,255,255,0.25);
}
.vtour-ap-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
    outline: none;
    cursor: pointer;
}
.vtour-ap-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2dd4bf;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.vtour-ap-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2dd4bf;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.vtour-ap-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-width: 32px;
    text-align: right;
    user-select: none;
}

/* Share popup — bottone "Condividi questa vista" */
.vtour-share-popup {
    position: absolute;
    bottom: 46px;
    right: 12px;
    z-index: 40;
    animation: vtour-popup-in 0.15s ease-out;
}
.vtour-sp-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 240px;
    background: rgba(8, 14, 24, 0.5);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.vtour-sp-title {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.vtour-sp-url {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    word-break: break-all;
    max-height: 48px;
    overflow: hidden;
    user-select: all;
}
.vtour-sp-actions {
    display: flex;
    gap: 8px;
}
.vtour-sp-copy,
.vtour-sp-share {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 12px;
    padding: 7px 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.vtour-sp-copy:hover,
.vtour-sp-share:hover {
    background: rgba(255,255,255,0.25);
}
.vtour-sp-copy:focus-visible,
.vtour-sp-share:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}
.vtour-sp-qr {
    display: flex;
    justify-content: center;
}
.vtour-sp-qr img {
    width: 140px;
    height: 140px;
    image-rendering: pixelated;
    background: #fff;
    border-radius: 8px;
}

/* Gallery panel — sfondo solido, ridotto, bordo attivo 1px */
.olotour-container .psv-gallery {
    background: transparent !important;
    border-bottom: none !important;
    border-top: 1px solid rgba(255,255,255,0.12) !important;
}
.olotour-container .psv-gallery-container {
    padding: 8px 10px !important;
}
.olotour-container .psv-gallery-item:not(:last-child) {
    margin-right: 8px !important;
}
.olotour-container .psv-gallery-item--active::after {
    border-width: 1px !important;
    border-color: #2dd4bf !important;
}
.olotour-container .psv-gallery-item-title {
    font-size: 11px !important;
    padding: 3px 5px !important;
    height: 1.6em !important;
    line-height: 1em !important;
}

/* Variant menu — menu minimale con underline animata */
.olotour-variant-bar {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    max-width: 90%;
    background: none;
    pointer-events: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.olotour-variant-bar::-webkit-scrollbar {
    display: none;
}
.olotour-variant-pill {
    position: relative;
    padding: 4px 14px 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: color 0.25s;
    white-space: nowrap;
    pointer-events: auto;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    outline: none;
}
.olotour-variant-pill::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #2dd4bf;
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.olotour-variant-pill:hover {
    color: #fff;
}
.olotour-variant-pill.active {
    color: #fff;
}
.olotour-variant-pill.active::after {
    transform: scaleX(1);
}

/* ST02: pillole lingua nella navbar — stesso linguaggio visivo delle
   pillole varianti (testo tenue + underline animata sull'attiva) */
.olotour-container .psv-button.olotour-lang-btn {
    position: relative;
    width: auto !important;
    padding: 0 9px !important;
    color: rgba(255, 255, 255, 0.45) !important;
    cursor: pointer;
}
.olotour-container .psv-button.olotour-lang-btn .olotour-lang-code {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
}
.olotour-container .psv-button.olotour-lang-btn::after {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: #2dd4bf;
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.olotour-container .psv-button.olotour-lang-btn:hover {
    color: #fff !important;
}
.olotour-container .psv-button.olotour-lang-active {
    color: #fff !important;
}
.olotour-container .psv-button.olotour-lang-active::after {
    transform: scaleX(1);
}

/* Responsive */
@media (max-width: 768px) {
    .olotour-popover {
        max-width: 90vw;
        min-width: auto;
    }
    .olotour-variant-bar {
        bottom: 44px;
        flex-wrap: nowrap;
        max-width: 95%;
    }
    .olotour-variant-pill {
        padding: 3px 10px 5px;
        font-size: 11px;
    }
    .vtour-audio-popup {
        bottom: 44px;
        right: 8px;
        left: 8px;
        width: auto;
    }
    .vtour-ap-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    .vtour-share-popup {
        bottom: 44px;
        right: 8px;
        left: 8px;
    }
    .vtour-sp-inner {
        width: auto;
    }
}

/* Print — nasconde il tour (non renderizzabile su carta) */
@media print {
    .olotour-container {
        display: none;
    }
}

/* ── MT01 Blur-up: placeholder preview 512 prima del full-res ──
   La classe è gestita dal viewer (setBlurup): attiva mentre a schermo c'è la
   preview tiles a bassa risoluzione, rimossa allo swap col panorama full-res.
   !important: vince sull'eventuale filter inline di applyCssFilter (regolazioni
   CSS della scena) solo durante la fase placeholder. */
.olotour-container .psv-canvas {
    transition: filter 0.35s ease;
}
.olotour-container.olotour-blurup .psv-canvas {
    filter: blur(12px) !important;
}
