* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    /* Strict no scroll */
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Mobile viewport fix */
    position: fixed;
    /* Prevent rubber banding */
    top: 0;
    left: 0;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    overscroll-behavior: none;
    touch-action: none;
    /* Disable default touch actions to prevent native scroll */
}

.app-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    container-type: size;
}

#canvasVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Utility para ocultar videos pero permitir carga */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.hover-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 60%;
    cursor: pointer;
    z-index: 100;
    /* Ensure it's above video but below UI overlays if needed */
    /* Add touch-action for mobile tap responsiveness */
    touch-action: manipulation;
}

.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background-color: transparent;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Fondo negro global para cubrir la carga */
.loading-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Overlay blanco para transición final */
.white-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 9990;
    /* Debajo del loader (10000) y backdrop (9999) */
    transition: opacity 1.5s ease-in-out;
    /* Transición lenta y suave */
    pointer-events: none;
}

.loading-bar-wrapper {
    width: 200px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    transition: width 0.15s ease-out;
}

.name-overlay {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 1px;
    z-index: 15;
    pointer-events: none;
    opacity: 0.9;
    mix-blend-mode: overlay;
}

/* ========== LIQUID GLASS TOOLTIP ========== */

.liquidGlass-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: fit-content;
    /* Ajustar al contenido */
}

.liquidGlass-wrapper,
.liquidGlass-wrapper>div {
    border-radius: 12px;
}

.liquidGlass-effect {
    position: absolute;
    z-index: 0;
    inset: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    filter: url(#glass-distortion);
    overflow: hidden;
    isolation: isolate;
    border-radius: 12px;
}

.liquidGlass-tint {
    z-index: 1;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Oscuro en lugar de gris claro */
    border-radius: 12px;
}

.liquidGlass-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: 12px;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.4),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.2);
}

.liquidGlass-content {
    position: relative;
    z-index: 3;
    color: white;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
}

/* Tooltip cursor follower */
.tooltip-cursor {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translate(0, -20px) scale(0.8);
    /* Ancla fija arriba */
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.tooltip-cursor.visible {
    opacity: 1;
    transform: translate(0, -20px) scale(1);
    pointer-events: auto;
    /* Permitir clicks cuando está visible */
}

/* Header del tooltip (estado colapsado) */
.tooltip-header {
    cursor: pointer;
    text-align: left;
}

/* Menú desplegable (oculto por defecto) */
.tooltip-menu {
    max-height: 0;
    max-width: 0;
    /* Colapsar ancho también */
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5),
        max-width 0.3s ease-out,
        /* Transición de ancho */
        opacity 0.25s ease-out,
        margin-top 0.3s ease-out;
    margin-top: 0;
}

/* Estado expandido */
.tooltip-cursor.expanded .tooltip-menu {
    max-height: 200px;
    max-width: 200px;
    /* Permitir que se ensanche */
    opacity: 1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.tooltip-cursor.expanded {
    transform: translate(0, -20px) scale(1);
}

/* Items del menú */
.tooltip-item {
    padding: 5px 0;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity 0.2s ease-out,
        transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.8),
        color 0.15s ease;
    white-space: nowrap;
}

.tooltip-cursor.expanded .tooltip-item {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation para items */
.tooltip-cursor.expanded .tooltip-item:nth-child(1) {
    transition-delay: 0.05s;
}

.tooltip-cursor.expanded .tooltip-item:nth-child(2) {
    transition-delay: 0.1s;
}

.tooltip-cursor.expanded .tooltip-item:nth-child(3) {
    transition-delay: 0.15s;
}

.tooltip-cursor.expanded .tooltip-item:nth-child(4) {
    transition-delay: 0.2s;
}

.tooltip-item:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Separador visual */
.tooltip-menu {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ========== GALLERY MODAL ========== */

.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200;
    /* Encima de todo */
    background: rgba(0, 0, 0, 0.2);
    /* Fondo sutil */
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.visible {
    display: flex;
    opacity: 1;
}

.gallery-content-wrapper {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Botón Cerrar Flotante */
.close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    z-index: 210;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.1);
}

.close-btn .liquidGlass-content {
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenedor Galería */
.gallery-container {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    /* Fix bordes rectos en contenido interno */
}

.gallery-inner {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#galleryTitle {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    /* Más pequeño */
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

/* Botón Cerrar Integrado */
.close-btn-integrated {
    position: absolute;
    top: 25px;
    right: 30px;
    z-index: 210;
    cursor: pointer;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    font-weight: 300;
    line-height: 1;
}

.close-btn-integrated:hover {
    color: white;
    transform: scale(1.1);
}

/* Navegación Interna (Tabs) */
.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    /* Fallback desktop */
}

.nav-tab {
    padding: 10px 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    /* BOUNCY APPLE TRANSITION */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: scale(1.05);
}

.nav-tab:active {
    transform: scale(0.92);
    /* Bouncy press effect */
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.08);
    /* Active pop-up */
}

/* Grilla Responsiva */
/* Grilla Responsiva (JS Masonry Container) */
.gallery-grid {
    display: flex;
    gap: 20px;
    overflow-y: auto;
    padding: 20px;
    flex: 1;
    width: 100%;
    align-items: flex-start;
    /* Masonry alignment */
}

.gallery-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 0;
    /* Fix flex overflow */
}

@media (max-width: 1000px) {
    /* JS manejará número de columnas, CSS solo ajusta visibilidad si fuera necesario, 
       pero JS regenara. Aquí solo aseguramos responsividad básica si JS falla o para gaps */
}

/* Items de Galería */
.gallery-item {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
    display: block;
    /* margin-bottom eliminado, gap lo maneja flex column */
}

/* Items de Galería */
.gallery-item {
    position: relative;
    width: 100%;
    /* Altura automática */
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
    display: inline-block;
    /* Vital para Masonry */
    margin-bottom: 20px;
    break-inside: avoid;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.gallery-media {
    width: 100%;
    height: auto;
    /* Altura natural */
    display: block;
    transition: opacity 0.3s ease;
}

/* Overlay de información en hover */
.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover .item-info {
    opacity: 1;
    transform: translateY(0);
}

/* Audio active indicator */
.gallery-item.audio-active::after {
    content: '🔊 Audio On';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: sans-serif;
    backdrop-filter: blur(5px);
    z-index: 20;
    pointer-events: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.item-title {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    /* Regular weight */
    margin-bottom: 6px;
    color: white;
    text-transform: none;
    /* Asegurar no mayúsculas */
}

.item-desc {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    opacity: 0.8;
    color: #ddd;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botones de Contacto (Liquid Glass Style) */
/* Botones de Contacto (Liquid Glass Style) */
/* Botones de Contacto (Liquid Glass Style) */
.contact-buttons-wrapper {
    position: absolute;
    bottom: 30px;
    right: 30px;
    left: auto;
    transform: none;
    display: flex;
    gap: 8px;
    z-index: 100;
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.contact-buttons-wrapper.visible {
    opacity: 1;
    pointer-events: auto;
}

.contact-buttons-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    transition: none;
    /* Instant hide */
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    /* Extremadamente sutil */
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    text-decoration: none;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    /* Letra tiny */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-pill:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-pill svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Mejora de Name Overlay (Estilo Original Subtil) */
/* Mejora de Name Overlay (Estilo Original Subtil) */
.name-overlay {
    text-shadow: none;
    filter: none;
    opacity: 0.15;
    /* 15% inicial */
    color: black;
    /* Negro inicial */
    font-weight: 300;
    mix-blend-mode: normal;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.5s ease;
    cursor: default;
}

.name-overlay.active {
    opacity: 0.5;
    /* 50% en hover general */
    color: white;
    /* Blanco en hover */
}

/* Fix Borde Modal (Aplicar a hijos directos) */
.gallery-container {
    overflow: hidden !important;
    border-radius: 20px !important;
    mask-image: -webkit-radial-gradient(white, black);
    /* Force GPU clip logic */
}

.gallery-container .liquidGlass-tint,
.gallery-container .liquidGlass-effect,
.gallery-container .liquidGlass-shine {
    border-radius: 20px !important;
}

/* Scrollbar personalizado */
.gallery-grid::-webkit-scrollbar {
    width: 6px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Hide mobile elements on desktop */
.mobile-only {
    display: none !important;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Ensure hoverZone is tappable on mobile */
@media (max-width: 768px) {
    .hover-zone {
        z-index: 150 !important;
        /* Revert to relative sizing, centered */
    }
}

@media (max-width: 768px) {

    /* Fusion Background Logic */
    body.mobile-dark-mode {
        background-color: #000000;
        transition: background-color 0s ease;
        /* No transition going IN to black */
    }

    body {
        background-color: #ffffff;
        transition: background-color 0.5s ease-in-out !important;
        /* Force smooth fade out */
        overflow: hidden;
        display: block !important;
    }

    .app-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        background: transparent !important;
        z-index: 1;
        overflow: hidden;
        box-shadow: none !important;
        transform: none !important;
        /* CRITICAL: Remove base CSS translate */
    }

    #canvasVideo {
        display: none !important;
    }

    /* Dark background for mobile */
    body {
        background: #000 !important;
    }

    .app-container {
        background: #000 !important;
    }

    /* Static background image for mobile - centered and slightly larger */
    /* Static background image for mobile - centered and slightly larger with MASK */
    .app-container::before {
        content: '';
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -55%);
        width: 95vw;
        height: auto;
        aspect-ratio: 2134 / 1440;
        background: url('assets/mobile-bg.jpg') center center / contain no-repeat;
        z-index: 1;
        pointer-events: none;
        /* Mask to fade edges into background - applied ONLY to image */
        -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
        mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
    }

    /* REMOVED global fusion overlay to prevent "foggy" look on whole page */
    .mobile-fusion-overlay {
        display: none !important;
    }

    /* Loop positions - LOWERED ARC */
    /* Moved down by ~15-20% to sit closer to the image subject */

    /* 1. Far Left */
    #loopVideo1.loop-video-mobile {
        top: 32%;
        left: 4%;
        width: 20vw;
        height: 20vw;
        z-index: 4 !important;
        pointer-events: none !important;
    }

    /* 2. Mid Left */
    #loopVideo5.loop-video-mobile {
        top: 26%;
        left: 24%;
        width: 20vw;
        height: 20vw;
        z-index: 3 !important;
        pointer-events: none !important;
    }

    /* 3. Center Left-ish (Highest point) */
    #loopVideo3.loop-video-mobile {
        top: 22%;
        left: 44%;
        width: 22vw;
        height: 22vw;
        z-index: 5 !important;
        pointer-events: none !important;
    }

    /* 4. Center Right-ish (Highest point) */
    #loopVideo4.loop-video-mobile {
        top: 26%;
        right: 30%;
        width: 20vw;
        height: 20vw;
        z-index: 5 !important;
        pointer-events: none !important;
    }

    /* 5. Mid Right */
    #loopVideo6.loop-video-mobile {
        top: 32%;
        right: 12%;
        width: 20vw;
        height: 20vw;
        z-index: 3 !important;
        pointer-events: none !important;
    }

    /* 6. Far Right */
    #loopVideo2.loop-video-mobile {
        top: 42%;
        right: -2%;
        width: 22vw;
        height: 22vw;
        z-index: 4 !important;
        pointer-events: none !important;
    }

    /* Mobile Bottom Menu - Full Width & Bottom Stuck */
    .mobile-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        z-index: 9999;
        display: flex !important;
        flex-direction: column;
        padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
        background: linear-gradient(to top, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.8) 70%, transparent 100%);
        gap: 12px;
        pointer-events: auto;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 16px 0;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 12px;
        color: white;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: background 0.2s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-item:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.15);
    }

    /* Force hide play button on loops */
    .loop-video-mobile::-webkit-media-controls {
        display: none !important;
        -webkit-appearance: none;
    }

    .loop-video-mobile::-webkit-media-controls-start-playback-button {
        display: none !important;
        -webkit-appearance: none;
    }

    .loop-video-mobile::-webkit-media-controls-play-button {
        display: none !important;
    }

    /* Mobile Only Utility */
    .mobile-only {
        display: flex !important;
    }

    /* Hide name overlay on mobile */
    .name-overlay {
        display: none !important;
    }

    /* Hide contact buttons on mobile */
    .contact-buttons-wrapper {
        display: none !important;
    }

    /* Interaction Hint (Liquid Glass) */
    .interaction-hint {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        z-index: 300;
        pointer-events: none;
        opacity: 0;
        display: none;
        /* OPTIMIZACIÓN: Ocultar para evitar carga de GPU */
    }

    .interaction-hint.visible {
        display: flex;
        /* Mostrar solo cuando es necesario */
        animation: hintEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards,
            hintPulse 2s ease-in-out 0.5s infinite;
    }

    .interaction-hint.hiding {
        animation: hintExit 0.4s ease-out forwards;
    }

    .interaction-hint .liquidGlass-content {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.05);
    }

    @keyframes hintEnter {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.8);
        }

        100% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    @keyframes hintPulse {

        0%,
        100% {
            transform: translate(-50%, -50%) scale(1);
            opacity: 0.85;
        }

        50% {
            transform: translate(-50%, -50%) scale(1.03);
            opacity: 1;
        }
    }

    @keyframes hintExit {
        0% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        100% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.8) translateY(10px);
        }
    }

    /* UI Layer Adjustments */
    .name-overlay {
        font-size: 1rem;
        top: 6% !important;
        text-align: center;
        width: 100%;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 200;
        letter-spacing: 0.1em;
    }

    .contact-buttons-wrapper {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: max-content;
        left: auto;
    }

    .contact-pill {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Gallery Modal optimizations */
    .gallery-content-wrapper {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .gallery-container {
        border-radius: 0 !important;
        /* Full screen feel */
    }

    .gallery-inner {
        padding: 50px 20px 20px 20px;
        /* Top padding for close btn */
    }

    .close-btn-integrated {
        top: 15px;
        right: 15px;
        font-size: 2.5rem;
        /* Larger touch target */
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    #galleryTitle {
        font-size: 1.2rem;
        margin-top: 20px;
    }

    .gallery-nav {
        gap: 10px;
        flex-wrap: nowrap;
        /* No more wrapping */
        overflow-x: auto;
        justify-content: flex-start;
        padding: 5px 20px 15px 20px;
        width: 100vw;
        margin-left: -20px;
        /* Counter inner padding */
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .gallery-nav::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome, Safari and Opera */
    }

    .nav-tab {
        padding: 12px 22px;
        font-size: 0.85rem;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.08);
        /* Slightly more visible */
    }

    .nav-tab.active {
        transform: scale(1.05);
    }

    /* Grid is handled by JS but ensure 1 col via CSS just in case */
    .gallery-grid {
        flex-direction: column;
        padding: 10px;
    }

    .gallery-col {
        width: 100%;
    }

    .gallery-item {
        margin-bottom: 15px;
    }

    /* Tooltip Mobile: Position at BOTTOM */
    .tooltip-cursor {
        display: none;
        position: fixed !important;
        bottom: 30px !important;
        /* At the bottom */
        top: auto !important;
        /* Override default top */
        left: 50% !important;
        transform: translateX(-50%) !important;
        /* Only X center */
        width: auto !important;
        min-width: 200px;
        max-width: 90vw;
        z-index: 9999;
    }

    .tooltip-cursor.visible,
    .tooltip-cursor.expanded {
        display: flex !important;
        opacity: 1 !important;
        flex-direction: column;
        align-items: center;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
        border-radius: 12px;
        pointer-events: auto !important;
        padding: 5px;
    }

    /* Force expansion visualization on mobile */
    .tooltip-cursor.visible .tooltip-menu {
        max-height: 300px;
        max-width: 100%;
        opacity: 1;
        margin-top: 5px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .tooltip-cursor.visible .tooltip-item {
        opacity: 1;
        transform: translateY(0);
        font-size: 0.95rem;
        padding: 8px 0;
        text-align: center;
    }

    .tooltip-header {
        font-size: 1rem;
        margin-bottom: 5px;
        text-align: center;
        opacity: 0.9;
        padding-top: 5px;
    }
}

/* Mobile Loop Canvases (Yoyo Fix) */
.loop-canvas {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
    will-change: opacity, transform;
}

.loop-canvas.active {
    opacity: 1;
    transform: scale(1);
}

.visually-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}