/* ====================================
   NAVIGAZIONE / VISUALE — SOLO RESPONSIVE
   Contiene ESCLUSIVAMENTE media query.
   ==================================== */

@media (pointer: coarse) {
    .navigation-player-mode #three-canvas {
        touch-action: none;
    }

    .navigation-player-mode #player-touch-controls:not([hidden]) {
        position: fixed;
        z-index: 725;
        inset: 0;
        display: block;
        pointer-events: none;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .navigation-player-mode .player-joystick {
        position: absolute;
        display: none;
        width: 92px;
        height: 92px;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 50%;
        background: rgba(7, 25, 35, 0.38);
        box-shadow: inset 0 0 0 1px rgba(7, 25, 35, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(4px);
        transform: translate(-50%, -50%);
        pointer-events: none;
        touch-action: none;
    }

    .navigation-player-mode #player-touch-controls.is-active .player-joystick {
        display: block;
    }

    .navigation-player-mode .player-joystick::before {
        position: absolute;
        inset: 22%;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        content: "";
        pointer-events: none;
    }

    .navigation-player-mode .player-joystick-thumb {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 34px;
        height: 34px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: 50%;
        background: rgba(75, 196, 165, 0.82);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    .navigation-player-mode .player-touch-hint {
        position: fixed;
        bottom: calc(142px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        display: block;
        padding: 6px 9px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 7px;
        color: #eaf7f4;
        background: rgba(7, 25, 35, 0.78);
        font: 600 10px/1.3 Manrope, sans-serif;
        pointer-events: none;
    }
}

@media (max-width: 680px) {
    .gx-view-toggle {
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: 48px;
        height: 48px;
    }

    .gx-view-panel {
        right: 12px;
        bottom: calc(136px + env(safe-area-inset-bottom, 0px));
        min-width: 200px;
    }

    .gx-view-option {
        min-height: 48px;
    }

    .gx-phone-tab {
        left: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
        padding: 0;
        transition: none;
    }

    .gx-phone-tab:hover {
        transform: none;
    }
}

@media (max-width: 520px) {
    body:not(.gx-phone-fullscreen) .gx-phone {
        top: calc(var(--gx-menu-stack-height, 92px) + 8px);
        bottom: calc(136px + env(safe-area-inset-bottom, 0px));
        height: auto;
        max-height: none;
    }
}

@media (max-height: 620px) and (max-width: 680px) {
    .gx-view-toggle {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    body:not(.gx-phone-fullscreen) .gx-phone {
        bottom: calc(126px + env(safe-area-inset-bottom, 0px));
    }

    .navigation-player-mode .player-touch-hint {
        bottom: calc(142px + env(safe-area-inset-bottom, 0px));
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-view-toggle,
    .gx-view-option {
        transition: none;
    }
}
