.glass {
    backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    will-change: backdrop-filter, -webkit-backdrop-filter;
}

.vignette-vertical {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

#bg-video {
    filter: blur(3px);
}

.hero-title {
    line-height: 0.48;
    letter-spacing: -0.05em;
    font-weight: 900;
    margin-left: -0.05em;
}

.subtitle-word {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.subtitle-word:hover {
    transform: scale(1.05);
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.subtitle-gradient {
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-stroke {
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.9);
    color: transparent;
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.hero-word {
    display: inline-block;
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Glitch Effect for Subtitle */
@keyframes digital-glitch {
    0% {
        transform: translate(0);
        text-shadow: 0 0 0 transparent;
    }

    20% {
        transform: translate(-2px, 1px);
        text-shadow: 2px 0 red, -2px 0 blue;
    }

    40% {
        transform: translate(2px, -1px);
        text-shadow: -2px 0 red, 2px 0 blue;
    }

    60% {
        transform: translate(-1px, -1px);
        text-shadow: 1px 0 red, -1px 0 blue;
    }

    80% {
        transform: translate(1px, 1px);
        text-shadow: -1px 0 red, 1px 0 blue;
    }

    100% {
        transform: translate(0);
        text-shadow: 0 0 0 transparent;
    }
}

.subtitle-word:hover {
    animation: digital-glitch 0.2s infinite;
    color: #fff;
}

body {
    background-color: #050505;
    color: #f2f2f2;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: clip; /* clip is safer than hidden on body for some mobile browsers to prevent Y-lock */
    min-height: 100vh;
}

/* Force unlock if stuck */
body:not(.menu-open):not(.promo-open) {
    overflow-y: auto !important;
}

body.menu-open, 
body.promo-open,
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.reveal-container {
    /* overflow: hidden; -- Removed to prevent mobile scroll lock if applied to body/wrapper */
    display: inline-block;
}

.reveal-text {
    display: inline-block;
    animation: reveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    transform: translateY(100%);
}

/* Experimental motion graphics decor */
.motion-blob {
    position: fixed;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    filter: blur(80px);
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.visible {
    opacity: 1;
}

.nav-link.active .active-bg {
    display: block;
}

/* Desktop Scaling (Apply to content wrappers, not main) */
@media (min-width: 1280px) {
    .desktop-scale {
        transform: scale(0.8);
        transform-origin: top center;
    }
}

/* SPA Section Handling */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 100vh;
    padding-top: 10rem;
    padding-bottom: 5rem;
}

#section-home.active {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Mobile: Community section — now uses unified --mobile-section-start */
/* (Actual override is in the unified block at end of file) */

@keyframes slide-up {
    0% {
        transform: translateY(30px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hero Toggle Persistence */
.hero-word.filled {
    color: white;
    -webkit-text-stroke: 0px;
}

/* Fluid scaling for Hero Title to fit 1:1 and mobile screens */
#section-home .hero-title {
    font-size: clamp(3rem, 13vw, 11rem) !important;
}

.hero-word.stroked {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    pointer-events: none;
    /* Hitbox only for filled text */
}

.hero-word.stroked:hover {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
}

/* Slider Styles */
.nav-slider-container {
    position: relative;
    user-select: none;
    touch-action: none;
    max-width: 95vw;
    transition: background 0.5s ease, 
                border-color 0.5s ease,
                box-shadow 0.5s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(27px) saturate(180%) brightness(1.08);
    -webkit-backdrop-filter: blur(27px) saturate(180%) brightness(1.08);
}

@media (max-width: 768px) {
    .nav-slider-container {
        transform: scale(0.85);
    }

    .nav-item {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

.slider-selector {
    position: absolute;
    /* Ultra glassy - more translucent, less opaque */
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.75) 0%, 
        rgba(255, 255, 255, 0.45) 20%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.12) 80%,
        rgba(255, 255, 255, 0.2) 100%);
    background-size: 200% 200%;
    animation: liquid-gradient 5s ease infinite;
    /* Reduced glow - subtle depth */
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.25),
        0 0 40px rgba(255, 255, 255, 0.1),
        inset 0 0 15px rgba(255, 255, 255, 0.5),
        inset 0 -4px 12px rgba(255, 255, 255, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(250%) brightness(1.05);
    -webkit-backdrop-filter: blur(40px) saturate(250%) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Smooth premium animation - fluid motion */
    transition: 
        width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease;
    z-index: 5;
}

/* Vertical Toggle specific overrides */
/* Horizontal Drag interaction styles */
.journal-toggle-container.horizontal {
    flex-direction: row !important;
}

.journal-toggle-container.horizontal .slider-selector {
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.journal-toggle-container.horizontal .slider-selector.dragging {
    transition: none !important;
    cursor: grabbing !important;
}

.journal-toggle-btn {
    transition: all 0.4s ease;
}

.journal-toggle-btn:not(.active) {
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.4);
    color: transparent !important;
}

.journal-toggle-btn.active {
    -webkit-text-stroke: 0;
}



/* Chromatic aberration - always slightly visible, stronger on movement */
.slider-selector::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    /* RGB fringe layers */
    background: 
        linear-gradient(90deg, 
            rgba(255, 80, 80, 0.12) 0%, 
            transparent 30%, 
            transparent 70%, 
            rgba(80, 80, 255, 0.12) 100%),
        linear-gradient(180deg,
            rgba(80, 255, 80, 0.08) 0%,
            transparent 50%,
            rgba(255, 80, 255, 0.08) 100%);
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Chromatic aberration amplifies on movement */
.slider-selector.moving::before {
    opacity: 1;
    transform: translateX(3px) skewX(-1deg);
}

@keyframes liquid-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glossy highlight shimmer - subtle */
.slider-selector::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    /* Rainbow-tinted glow for chromatic depth */
    background: linear-gradient(135deg, 
        rgba(255, 150, 150, 0.2) 0%, 
        rgba(255, 255, 255, 0.3) 30%,
        rgba(150, 255, 150, 0.15) 50%,
        rgba(255, 255, 255, 0.3) 70%,
        rgba(150, 150, 255, 0.2) 100%);
    filter: blur(14px);
    opacity: 0.35;
    z-index: -1;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.nav-item span {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover span {
    color: white;
}

/* Social Links Footer */
.social-links-footer a {
    position: relative;
}

.social-links-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: white;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.social-links-footer a:hover::after {
    width: 100%;
}

/* Journal Toggle Buttons */
.journal-toggle-btn {
    cursor: pointer;
    border: none;
    background: transparent;
}

.journal-toggle-btn.active {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.15) 100%);
    color: #000;
    font-weight: 600;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.journal-toggle-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== CIRCUIT PATH ANIMATION ===== */
.circuit-path {
    stroke-dasharray: 80; /* Exact path length: 24 (stem) + 40 (horizontal) + 16 (drop) */
    stroke-dashoffset: 80; /* Start fully hidden */
    transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                stroke 0.4s ease,
                stroke-opacity 0.4s ease,
                filter 0.4s ease;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0));
    opacity: 0.3; /* Base opacity for inactive */
}

/* Active path: drawn and bright */
.circuit-path.active {
    stroke-dashoffset: 0;
    stroke: #ffffff;
    stroke-width: 1.5;
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

/* Inactive path: retracted and faint */
.circuit-path.inactive {
    stroke-dashoffset: 80;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1.5;
    opacity: 0.2;
    filter: none;
}
/* Stem div removed - handled by SVG now */

/* Content fade with delay (waits for circuit animation) */
#journal-my-content,
#journal-community-content {
    opacity: 1;
    transition: opacity 0.35s ease 0.1s; /* 0.1s delay after class change */
}

#journal-my-content.fade-out,
#journal-community-content.fade-out {
    opacity: 0;
    transition: opacity 0.15s ease; /* Quick fade out, no delay */
}

/* Bubble spring physics (enhanced to match main nav) */
#header-journal-bubble,
#mobile-journal-bubble {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Spring overshoot */
}

#mobile-journal-title {
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.journal-toggle-btn {
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                text-shadow 0.4s ease !important;
}

/* ===== Mobile Journal Toggle — ID-Based (No Inheritance) ===== */
#mobile-journal-container {
    padding: 3px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    gap: 0;
    overflow: visible;
}

#mobile-journal-bubble {
    /* Position: fill half the container */
    top: 3px;
    left: 3px;
    bottom: 3px;
    width: calc(50% - 3px);
    z-index: 1;
    /* Appearance: frosted glass pill */
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0.35) 40%,
        rgba(255, 255, 255, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    /* Animation */
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: grab;
}

#mobile-journal-bubble:active {
    cursor: grabbing;
}

/* Picked-up state: subtle lift + glow */
#mobile-journal-bubble.dragging {
    transform: scaleX(1.04) scaleY(1.08);
    box-shadow:
        0 0 18px rgba(255, 255, 255, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.45);
    cursor: grabbing;
}

/* Active label: dark on light bubble */
#mobile-journal-container .journal-toggle-btn.active {
    color: rgba(0, 0, 0, 0.85) !important;
    font-weight: 700 !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Inactive label: ghosted stroked text */
#mobile-journal-container .journal-toggle-btn:not(.active) {
    color: transparent !important;
    -webkit-text-stroke: 0.4px rgba(255, 255, 255, 0.35) !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Video Viewing Mode */
.viewing-mode main,
.viewing-mode footer {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

main,
footer {
    transition: opacity 0.5s ease;
}

@keyframes social-pulse-glow {

    0%,
    100% {
        box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.08), 0 4px 24px -1px rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }

    50% {
        box-shadow: inset 0 0 10px 2px rgba(255, 255, 255, 0.4), 0 4px 40px -1px rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }
}

.universal-arrow-container:not(.flipped) .nav-arrow-btn {
    animation: bounce-subtle 4s infinite ease-in-out;
}


.nav-arrow-btn {
    background: rgba(255, 255, 255, 0.15);
    /* Balanced opacity for visibility */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Clear border */
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    width: 60px;
    height: 60px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(22px);
    /* Subtle glass effect */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.nav-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.dropdown-svg {
    transform: scale(0.7);
}


.back-up-prompt .nav-arrow-btn:hover {
    transform: translateY(-5px) rotate(0deg);
    /* Counteract the container's rotate for hover effect if needed, but easier to just let it feel natural */
}

.arrow-path {
    stroke-dasharray: 40;
    stroke-dashoffset: 0;
    /* Ensure visible by default */
    opacity: 1;
    /* Ensure visible by default */
    stroke: rgba(255, 255, 255, 1);
    /* High brightness white */
    transition: stroke 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.visible .arrow-1 {
    animation: draw-arrow 1s ease forwards 0.2s;
}

.visible .arrow-2 {
    animation: draw-arrow 1s ease forwards 0.4s;
}

.visible .arrow-3 {
    animation: draw-arrow 1s ease forwards 0.6s;
}

@keyframes draw-arrow {
    0% {
        stroke-dashoffset: 40;
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.visible .nav-arrow-btn {
    animation: bounce-subtle 3s infinite ease-in-out;
}

@media (max-width: 768px) {
    .nav-arrow-prompt {
        display: none !important;
    }
}

/* Community Section Specifics */
.community-card {
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.community-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Community Section: Unify width across all viewports (Patreon, Connect, Activism) */
@media (min-width: 769px) {
    #section-community .portal-segment .desktop-scale > * {
        width: 100% !important;
    }
    #section-community .portal-segment .desktop-scale .animate-on-scroll > * {
        width: 100%;
    }
}

    /* Music Viewport Fit */
@media (min-width: 1024px) {
    #section-music {
        height: 100vh;
        overflow: hidden;
        padding-top: 8rem;
        padding-bottom: 2rem;
    }

    #section-music .content-wrapper {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }

    #section-music iframe {
        max-height: none !important;
    }
}

/* UNIFIED VIEWPORT - The "Gold Standard" for Layout Consistency */
@media (min-width: 769px) {
    .unified-viewport {
        min-height: 100vh !important;
        height: auto !important;
        /* Robust Framing Gutters - Ensures content never touches edges */
        padding-left: clamp(2rem, 6vw, 4rem) !important;
        padding-right: clamp(2rem, 6vw, 4rem) !important;
        padding-top: clamp(1rem, 3vh, 3rem) !important;
        padding-bottom: clamp(1rem, 2vh, 2rem) !important;
        overflow-y: visible !important; /* Prevent nested scrollbars */
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important; /* Left-aligned on desktop */
        box-sizing: border-box !important;
    }

    /* Inner Container Scaling */
    .unified-viewport .desktop-scale {
        min-height: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: 1400px !important; 
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 0 !important;
    }

    /* FIX: Ensure inactive sections are forcefully hidden, overriding the flex display above */
    .page-section.unified-viewport:not(.active) {
        display: none !important;
    }
}

/* Specific fix for Home Hero to be high but horizontally centered */
@media (min-width: 769px) {
    #home-hero-segment {
        justify-content: flex-start !important;
        padding-top: clamp(0.5rem, 1.5vh, 2rem) !important;
        padding-left: clamp(4rem, 8vw, 8rem) !important;
    }
    #home-hero-segment .desktop-scale {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        transform-origin: top center !important;
    }
}

/* MUSIC SECTION RESPONSIVE FIXES - Using Unified Viewport */
@media (min-width: 769px) {
    #home-second-page, #section-music {
        display: flex !important;
        flex-direction: column !important;
    }

    #home-second-page .desktop-scale,
    #section-music .desktop-scale {
        height: 100% !important;
    }

    /* Header scaling fix */
    #home-second-page h2 {
        flex-shrink: 0 !important;
        margin-bottom: 2vh !important;
        font-size: clamp(2rem, 5vh, 3.5rem) !important;
    }

    /* YouTube Section (Long Sets) — use CSS Grid, NOT flex */
    #youtube-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
        width: 100% !important;
        flex: 0 0 auto !important; /* Don't compete for vertical space */
    }
    
    /* YouTube Embed Containers - 16:9 from aspect-video class */
    #youtube-grid > div {
        aspect-ratio: 16/9 !important;
        height: auto !important;
        max-height: none !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Ensure iframes fill their glass container completely */
    #youtube-grid iframe {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    /* Item 3: SoundCloud / Text area spacing & SCALING CONTAINER */
    #home-second-page .space-y-6.md\:space-y-8 {
         margin-top: 2vh !important;
         flex: 2 !important; 
         min-height: 0 !important;
         display: flex !important;
         flex-direction: column !important;
         justify-content: center !important;
    }


/* REMOVED PREVIOUS PROBLEMATIC SCALING THAT CAUSED CLIPPING */
/* Replaced with vertical height constraints at end of file */



    /* Streaming Icons Row - Protect visibility */
    .store-logo-row {
        flex-shrink: 0 !important;
        margin-top: auto !important;
        padding-top: 1vh !important;
    }

    .store-logo-row img {
        height: clamp(20px, 3vh, 40px) !important; /* Slightly smaller min to avoid overflow */
        width: auto !important;
    }

    /* GRID LAYOUTS FOR TRACKS (Desktop/Tablet) */
    .track-carousel-wrapper {
        flex: 1 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    #home-second-page .track-carousel {
        display: grid !important;
        gap: clamp(0.25rem, 1vh, 1rem) !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important; 
        align-content: center !important;
    }

    /* Landscape (> 1:1) - FORCE 2x2 Grid with Anti-Clip */
    @media (min-aspect-ratio: 1/1) {
        #home-second-page .track-carousel {
            grid-template-columns: repeat(2, 1fr) !important;
            grid-template-rows: repeat(2, 1fr) !important;
            height: auto !important;
            max-height: none !important; /* No cap */
        }
        
        /* Removed height constraints to prevent YouTube clipping */
        #youtube-grid > div {
            max-height: none !important;
        }
        #home-second-page .track-card iframe {
            max-height: none !important;
            height: auto !important;
        }
        
        #home-second-page .track-card {
            max-height: none !important; 
        }
    }

    /* Portrait (< 1:1) - 2 Rows, 2 Columns with Safety Limits */
    @media (max-aspect-ratio: 1/1) {
        #home-second-page .track-carousel {
            grid-template-columns: repeat(2, 1fr) !important;
            grid-template-rows: repeat(2, 1fr) !important;
            height: auto !important; /* Allow shrinking */
            max-height: none !important; /* No height cap */
        }
        
        /* Force natural heights in this mode to avoid clipping */
        #home-second-page iframe {
            max-height: none !important;
        }
        
        #home-second-page .track-card {
            max-height: none !important; /* No height cap - let content breathe */
        }
    }

    /* Track Cards - Fit and Scale */
    .track-carousel-item {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        /* Enforce "Square-ish" appearance via grid, but allow flex to fill */
        min-height: 0 !important;
    }

    /* Spotify Embed visibility & scaling */
    .spotify-embed-mobile {
        display: block !important;
        flex: 1 !important;
        min-height: 0 !important;
        max-height: 100% !important;
        /* Ensure it scales down effectively */
        height: auto !important; 
    }
}



/* Home Section Segments */
#section-home .join-segment,
.portal-segment {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center horizontally */
    position: relative;
    overflow: visible;
    width: 100%;
}

/* Force Upcoming Shows higher up (reduce gap from previous section) */
#home-third-page.join-segment {
    justify-content: flex-start;
    padding-top: 15vh;
}

/* MOBILE: Collapse the third viewport (Shows+Telegram→Footer gap) by ~60% */
@media (max-width: 768px) {
    #home-third-page.join-segment {
        min-height: auto !important;
        height: auto !important;
        padding-top: 6vh !important;
        padding-bottom: 2vh !important;
    }
}

#home-second-page {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center content */
    align-items: center;
    /* Removed overflow-y: auto to prevent secondary scrollbar */
    overflow-x: hidden;
    box-sizing: border-box;
}

/* On mobile, reduce padding and ensure headers visible */
@media (max-width: 950px) and (max-height: 600px), (max-width: 768px) {
    #home-second-page {
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        padding-top: calc(4rem + var(--safe-area-inset-top)) !important;
        padding-bottom: calc(4rem + var(--safe-area-inset-bottom)) !important;
        overflow: visible !important;
        width: 100% !important;
        display: block !important; /* Allow natural flow */
    }
}

/* Full Stop Scroll Limit: Hide footer on Home section - DISABLED to restore footer */
/* Ensure Journal Community Content visibility on Desktop */
#journal-community-content:not(.hidden) {
    display: flex !important;
    width: 100% !important;
}
/* #section-home.active~footer {
    display: none !important;
} */

/* Universal Arrow Styles */
.universal-arrow-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    bottom: 2.5rem;
    opacity: 1;
}

.universal-arrow-container.flipped {
    bottom: auto;
    top: 15vh;
    /* Moved higher as requested */
    transform: translateX(-50%) rotate(180deg);
}

.universal-arrow-container.arrow-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Navigation Transitions */
.standard-nav,
.extended-nav {
    transition: opacity 0.3s ease;
    display: inline-flex;
}

/* Enter/Exit Animation Patterns - Simplified for smooth slider operation */
.nav-enter {
    opacity: 0;
    pointer-events: none;
}

.nav-enter-active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

/* Simple fade-out for exiting items */
.nav-exit-active {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Visibility Utility */
.is-gone {
    display: none !important;
}

.desktop-hidden-hamburger {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-hidden-hamburger {
        display: flex !important;
    }
}

.nav-slider-container.menu-active {
    background: rgba(10, 10, 10, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* --- Mobile Redesign (Portrait Mode - Aspect Ratio ≤ 1:1) --- */
/* iOS Sequoia Control Center Style Pull-Down Menu */

@media (max-width: 768px) {
    /* Reposition header for top-right hamburger - iOS Chrome guardrail */
    /* Uses env(safe-area-inset-top) to clear Dynamic Island + browser chrome */
    /* max() with 20px fallback ensures Chrome iOS (which may report 0) still clears the URL bar */
    header {
        top: calc(max(env(safe-area-inset-top, 20px), 20px) + 0.75rem) !important;
        left: auto !important;
        right: 1rem !important;
        padding: 0 !important;
        justify-content: flex-end !important;
        z-index: 10002 !important; /* Above mobile menu and close button */
    }

    /* Morph pill into a larger circular button with chromatic aberration */
    .nav-slider-container {
        min-width: 72px !important;
        width: 72px !important;
        height: 72px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        overflow: visible;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 
            0 4px 30px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(100, 150, 255, 0.15),
            0 0 40px rgba(255, 100, 150, 0.08),
            inset 0 0 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Chromatic aberration glow on hamburger bubble - less blur, keep shine */
    .nav-slider-container::before {
        content: '';
        position: absolute;
        inset: -3px;
        border-radius: 50%;
        background: linear-gradient(135deg,
            rgba(255, 100, 100, 0.15) 0%,
            transparent 35%,
            transparent 65%,
            rgba(100, 100, 255, 0.15) 100%);
        filter: blur(2px);
        opacity: 0.9;
        z-index: -1;
        animation: pulse-glow 3s ease-in-out infinite;
    }

    /* Hide standard items and slider in mobile header */
    .standard-nav:not(#menu-hamburger), 
    .extended-nav, 
    .slider-selector {
        display: none !important;
    }

    #menu-hamburger {
        width: 100%;
        height: 100%;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    #menu-hamburger .lines-wrapper {
        transform: scale(1.75) !important;
    }

    /* Morph hamburger to back arrow on mobile logic moved to global */
    #menu-hamburger .lines-wrapper div {
        width: 1.3rem !important;
        height: 2.5px !important;
        background: rgba(255, 255, 255, 0.85) !important;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Override the desktop-specific disappearance on mobile */
    .menu-active #menu-hamburger {
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        filter: none !important;
        transition: none !important;
    }

    /* Adjust card paddings to increase content size */
    .glass.p-8, .glass.p-12 {
        padding: 1.5rem !important;
    }
    .glass.p-6 {
        padding: 1rem !important;
    }
    .glass.p-3, .glass.p-4 {
        padding: 0.75rem !important;
    }
}

/* ======================================
   iOS Sequoia Pull-Down Menu Overlay
   ====================================== */
#mobile-pulldown {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000; /* Above universal arrow (9999) and track carousel arrows (100) */
    pointer-events: none;
    overflow: hidden;
}

#mobile-pulldown .pulldown-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    
    /* Pull-down animation from top-right corner */
    transform: translateY(-100%) scale(0.9);
    transform-origin: top right;
    opacity: 0;
    
    transition: 
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* ===== INTENSE WATER-DROPLET LIQUID GLASS =====
       Massively increased displacement for dramatic refraction.
       Chrome-like specular highlights. Intense chromatic aberration. */
    
    /* Refined liquid glass with reduced blur + shadow */
    backdrop-filter: 
        blur(38px)
        brightness(1.02) 
        saturate(1.25);
    -webkit-backdrop-filter: blur(40px) saturate(140%) brightness(1.01);
    
    /* Darker shadow overlay for depth */
    background: linear-gradient(
        165deg,
        rgba(15, 20, 30, 0.55) 0%,
        rgba(10, 15, 25, 0.60) 30%,
        rgba(8, 12, 20, 0.65) 60%,
        rgba(5, 8, 15, 0.70) 100%
    );
    
    /* Deep shadow for contrast */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 50px 120px rgba(0, 0, 0, 0.7);
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}


/* Subtle Chromatic Aberration Layers */
#mobile-pulldown .pulldown-panel::before,
#mobile-pulldown .pulldown-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
}

/* Red/Magenta fringe - subtle */
#mobile-pulldown .pulldown-panel::before {
    background: linear-gradient(
        100deg,
        rgba(255, 80, 120, 0.04) 0%,
        transparent 25%,
        transparent 75%,
        rgba(80, 180, 255, 0.04) 100%
    );
    transform: translateX(-3px);
    mix-blend-mode: screen;
}

/* Blue/Cyan fringe - subtle */
#mobile-pulldown .pulldown-panel::after {
    background: linear-gradient(
        -100deg,
        rgba(80, 180, 255, 0.04) 0%,
        transparent 25%,
        transparent 75%,
        rgba(255, 80, 120, 0.04) 100%
    );
    transform: translateX(3px);
    mix-blend-mode: screen;
}

#mobile-pulldown.active .pulldown-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 20vh 2rem 4rem;
    transform: translateY(-8px);
    opacity: 0;
    /* Faster, smoother fade in */
    transition: 
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
        opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

#mobile-pulldown.active .mobile-nav-list {
    transform: translateY(0);
    opacity: 1;
}

/* Reverse: text fades out FIRST (no delay) */
#mobile-pulldown.closing .mobile-nav-list {
    transform: translateY(-10px);
    opacity: 0;
    transition: 
        transform 0.28s cubic-bezier(0.32, 0, 0.67, 0),
        opacity 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-item {
    /* Same font as LIVE IMPROVISED ELECTRONIC - Orbitron */
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.60);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.02);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mobile-nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.mobile-nav-item.active {
    color: rgba(255, 255, 255, 0.98);
    position: relative;
}

/* INTENSE Liquid Glass Chromatic Aberration Bubble */
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    inset: -10px -24px;
    border-radius: 35px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(200, 220, 255, 0.04) 30%,
        transparent 50%,
        rgba(255, 200, 220, 0.04) 70%,
        rgba(255, 255, 255, 0.06) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        /* Chromatic aberration layers */
        -3px 0 12px rgba(255, 80, 120, 0.12),
        3px 0 12px rgba(80, 120, 255, 0.12),
        0 -2px 10px rgba(120, 255, 180, 0.06),
        /* Inner glow */
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        /* Outer soft glow */
        0 0 25px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    z-index: -1;
    opacity: 1;
    transform: scale(1);
    transition: 
        all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base state for bubble - hidden but ready */
.mobile-nav-item::before {
    content: '';
    position: absolute;
    inset: -10px -24px;
    border-radius: 35px;
    background: transparent;
    opacity: 0;
    transform: scale(0.92);
    transition: 
        all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.mobile-nav-item.active::before {
    opacity: 1;
    transform: scale(1);
}

.mobile-nav-item:hover {
    color: white;
    transform: scale(1.04);
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Close button - glass pill at top */
#mobile-pulldown .close-btn {
    position: absolute;
    top: calc(max(env(safe-area-inset-top, 20px), 20px) + 0.75rem);
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001; /* Above mobile menu panel (10000) */
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(36px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-pulldown .close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}


/* Refined Hamburger Transitions */
#menu-hamburger {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu-hamburger .lines-wrapper {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu-hamburger div {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dispersal State - Refined for "organic" feel */
.menu-active #menu-hamburger {
    transform: translateX(-60px) scale(0.6);
    opacity: 0;
    pointer-events: none;
    filter: blur(8px);
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    /* Longer fade out */
}

/* Consolidated Hamburger Morph (Global) */
.menu-active #menu-hamburger .lines-wrapper div:nth-child(1) {
    transform: translateX(-4px) translateY(3px) rotate(-45deg) scaleX(0.6) !important;
    background: #fff !important;
}

.menu-active #menu-hamburger .lines-wrapper div:nth-child(2) {
    transform: translateX(2px) !important;
    background: #fff !important;
}

.menu-active #menu-hamburger .lines-wrapper div:nth-child(3) {
    transform: translateX(-4px) translateY(-3px) rotate(45deg) scaleX(0.6) !important;
    background: #fff !important;
}

/* Remove obsolete disperse effects */
.menu-active #menu-hamburger .lines-wrapper {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Promo Gallery Active — morph hamburger to back arrow (mobile only) */
@media (max-width: 768px) {
    .promo-gallery-active #menu-hamburger {
        z-index: 200 !important; /* Above the gallery overlay (z-120) */
    }
    
    .promo-gallery-active .nav-slider-container {
        z-index: 200 !important;
    }
    
    /* Smooth morph transition for lines */
    .promo-gallery-active #menu-hamburger .lines-wrapper div {
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    
    .promo-gallery-active #menu-hamburger .lines-wrapper div:nth-child(1) {
        transform: translateX(-4px) translateY(3px) rotate(-45deg) scaleX(0.6) !important;
        background: #fff !important;
    }
    
    .promo-gallery-active #menu-hamburger .lines-wrapper div:nth-child(2) {
        transform: translateX(2px) !important;
        background: #fff !important;
    }
    
    .promo-gallery-active #menu-hamburger .lines-wrapper div:nth-child(3) {
        transform: translateX(-4px) translateY(-3px) rotate(45deg) scaleX(0.6) !important;
        background: #fff !important;
    }
}

/* Staggered Entrance for Extended Nav */
.nav-slider-container.menu-active .extended-nav:nth-of-type(1) {
    transition-delay: 0.1s;
}

.nav-slider-container.menu-active .extended-nav:nth-of-type(2) {
    transition-delay: 0.15s;
}

.nav-slider-container.menu-active .extended-nav:nth-of-type(3) {
    transition-delay: 0.2s;
}

.nav-slider-container.menu-active .extended-nav:nth-of-type(4) {
    transition-delay: 0.25s;
}

.nav-slider-container.menu-active .extended-nav:nth-of-type(5) {
    transition-delay: 0.3s;
}



/* Press-Kit Grid */
.press-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .press-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.press-item {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px; /* Creates the tiny frame */
}

.press-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.6rem; /* Match the frame vibe */
    transition: transform 0.5s ease;
}

.press-item:hover img {
    transform: scale(1.1);
}

.press-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.press-item:hover .press-overlay {
    opacity: 1;
}

.press-expand-btn {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.press-expand-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Bio Section */
.bio-toggle {
    cursor: pointer;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.bio-toggle.active {
    filter: grayscale(0);
    transform: scale(1.2);
}

/* Bio Length Toggle */
.bio-length-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
}

.bio-length-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.bio-length-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Expandable Sections */
.booking-expandable-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease,
                padding 0.3s ease;
}

.booking-expandable-content:not(.hidden) {
    padding-top: 0.75rem;
}

/* Copy Button */
.copy-btn {
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Booking Header Toggle */
.booking-expand-header {
    cursor: pointer;
    transition: all 0.3s ease;
}

.booking-expand-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Carousel Arrow Styles */
.carousel-arrow {
    backdrop-filter: blur(36px) saturate(180%);
    -webkit-backdrop-filter: blur(36px) saturate(180%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:focus,
.carousel-arrow:focus-visible {
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-arrow .arrow-path {
    stroke: rgba(255, 255, 255, 0.6);
    transition: stroke 0.3s ease;
}

.carousel-arrow:hover .arrow-path {
    stroke: rgba(255, 255, 255, 1);
}

@media (max-width: 768px) {
    .carousel-arrow {
        padding: 0.5rem;
    }

    .carousel-arrow svg {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 769px) {
    .carousel-arrow {
        padding: 0.75rem;
    }

    .carousel-arrow svg {
        width: 28px;
        height: 28px;
    }
}

/* Carousel Item Sizing - 3 visible items, prominent center ones */
.carousel-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    /* Default state is VISIBLE - JS adds item-outer class to grey out non-center items */
    transform: scale(1.1);
    opacity: 1;
    filter: none;
    padding: 6px; /* Tiny frame */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.carousel-item img,
.carousel-item video {
    border-radius: 6px;
}

.carousel-item.item-outer {
    transform: scale(0.9);
    opacity: 0.2;
    filter: grayscale(80%) blur(2px);
}

.carousel-item.item-center {
    transform: scale(1.1);
    opacity: 1;
    filter: none;
    z-index: 5;
}

.carousel-item.item-center:hover {
    transform: scale(1.22);
    box-shadow: 0 0 40px 10px rgba(255, 255, 255, 0.3),
        0 0 70px 20px rgba(100, 150, 255, 0.2),
        inset 0 0 25px rgba(255, 255, 255, 0.15);
    --shimmer-speed: 2s;
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
    z-index: 20;
}

.carousel-item.item-center::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}

.carousel-item.item-center:hover::after {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Main preview image container */
#main-preview-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-preview-container img,
#main-preview-container video {
    transition: opacity 0.4s ease;
}

/* ARTE Preview Container */
.arte-preview-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Video mode: 1:1 aspect ratio (square), narrower with space on sides — matches Humnava */
.arte-preview-container.video-mode {
    aspect-ratio: 1/1 !important;
    width: 70% !important;
    margin-left: auto;
    margin-right: auto;
}

.arte-preview-container img,
.arte-preview-container video {
    transition: opacity 0.4s ease;
}

/* ARTE Carousel wrapper - shrinks when video is selected */
.arte-carousel-wrapper {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease;
}

.arte-carousel-wrapper.shrink {
    transform: scale(0.85);
    transform-origin: center top;
}

/* Active ARTE carousel item highlight */
.arte-carousel-item.active {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Aufgetischt Preview Container */
#aufgetischt-preview-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#aufgetischt-preview-container img,
#aufgetischt-preview-container video {
    transition: opacity 0.4s ease;
}

/* Kunsthalle Preview Container */
#kunsthalle-preview-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#kunsthalle-preview-container img,
#kunsthalle-preview-container video {
    transition: opacity 0.4s ease;
}

/* Video-mode: glass class removed by JS, minimal styling needed */
[id$="-preview-container"].video-mode {
    overflow: hidden;
    border-radius: 1rem;
}

/* Merch Card Styles */
.merch-card {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.merch-card img {
    border-radius: 1.25rem;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.group:hover .merch-card img {
    transform: scale(1.05);
}

/* Humnava Section - Expandable Instagram Grid */
.humnava-reels-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s ease,
                padding 0.4s ease;
    opacity: 0;
    padding: 0;
}

.humnava-reels-container.expanded {
    max-height: 4000px;
    opacity: 1;
    padding-top: 1.5rem;
}

.humnava-reels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .humnava-reels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .humnava-reels-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.humnava-reel-item {
    aspect-ratio: 9 / 16;
    min-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.humnava-reel-item blockquote {
    margin: 0 !important;
    max-width: 100% !important;
    min-width: unset !important;
    width: 100% !important;
}

.humnava-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    width: 100%;
}

.humnava-expand-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.humnava-expand-btn.expanded {
    border-style: solid;
}

.humnava-expand-btn svg {
    transition: transform 0.3s ease;
}

.humnava-expand-btn.expanded svg {
    transform: rotate(180deg);
}

/* Swipe Indicators for Track Carousel - Circular "Touch" style */
.swipe-indicator {
    position: absolute;
    bottom: 2.22rem; 
    width: 2.5rem; 
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    display: none; /* Only mobile */
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
        animation: swipe-hint 2s infinite ease-in-out;
    }
}

.swipe-indicator-left {
    left: 0.75rem;
}

.swipe-indicator-right {
    right: 0.75rem;
}

@keyframes swipe-hint {
    0%, 75%, 100% {
        opacity: 0;
        transform: scale(0.6);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    85% {
        opacity: 0.4;
        transform: scale(1);
        box-shadow: 0 0 15px 2px rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.15);
    }
    90% {
        opacity: 0.2;
        transform: scale(1.1);
    }
}

/* Humnava Preview Container */
.humnava-preview-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Video mode: 1:1 aspect ratio (square), narrower with space on sides */
.humnava-preview-container.video-mode {
    aspect-ratio: 1/1 !important;
    width: 70% !important;
    margin-left: auto;
    margin-right: auto;
}

.humnava-preview-container img,
.humnava-preview-container video {
    transition: opacity 0.4s ease;
}

/* Carousel wrapper - shrinks significantly when video is selected */
.humnava-carousel-wrapper {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease;
}

.humnava-carousel-wrapper.shrink {
    transform: scale(0.85);
    transform-origin: center top;
}

/* Active carousel item highlight */
.humnava-carousel-item.active {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* ===========================================
   MOBILE LAYOUT REFINEMENTS
   =========================================== */

/* Hide audio toggle button globally */
#global-audio-toggle {
    display: none !important;
}

/* Portrait mode (y > x): hide scroll arrow completely */
/* @media (max-aspect-ratio: 1/1) Removed
    .universal-arrow-container {
        display: none !important;
    }
*/

/* Mobile phone media query */
@media (max-width: 768px) {
    
    /* Hero section padding - Min 16px, up to 4vw */
    .join-segment,
    .content-wrapper,
    .desktop-scale,
    main {
        padding-left: clamp(16px, 4vw, 24px) !important;
        padding-right: clamp(16px, 4vw, 24px) !important;
    }
    
    /* LIVE IMPROVISED ELECTRONIC - centered, one row, smaller */
    .subtitle-gradient {
        display: flex;
        justify-content: center;
        gap: 0.5em;
        font-size: 0.5rem !important;
        letter-spacing: 0.2em !important;
        text-align: center;
        white-space: nowrap;
    }
    
    /* GRAY CONTRAST - left-aligned (Linksbündig) like desktop */
    .hero-title {
        width: 100% !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }
    
    .hero-word {
        text-align: left !important;
        width: 100% !important;
    }
    
    .hero-container {
        width: 100%;
    }
    
    /* Guerilla text - 20% smaller with left border */
    .font-body.italic {
        font-size: 0.9rem !important;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 0.75rem;
        margin-top: 0.5rem;
        display: inline-block;
    }
    

    
    /* Hero text - ensure not clipped */
    .hero-title {
        font-size: 3.2rem !important;
    }
    
    /* Hamburger lines - 25% bigger, proportional to 72px bubble */
    #menu-hamburger .lines-wrapper {
        transform: scale(1.75) !important;
    }
    
    #menu-hamburger .lines-wrapper div {
        width: 1.3rem !important;
        height: 2.5px !important;
        background: rgba(255, 255, 255, 0.85) !important;
    }

    /* Mobile menu text 30% bigger */
    .mobile-nav-item {
        font-size: 2.35rem !important;
    }

}

/* Ensure main content has proper padding at all sizes */
@media (max-width: 768px) {
    main {
        padding-left: 4vw;
        padding-right: 4vw;
    }
    
    .page-section {
        padding-left: 0;
        padding-right: 0;
    }

    /* Start portal segments from top on mobile but with some breathing room */
    .portal-segment {
        justify-content: flex-start !important;
        padding-top: 3.5rem; /* Increased from 1rem to move lower */
    }
}

/* Desktop-only content: hidden on mobile (1:1 aspect ratio or smaller) */
.desktop-only-content {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only-content {
        display: none !important;
    }
}

/* Store Logo Row */
.store-logo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding-top: 0.75rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.streaming-expand-btn {
    display: none;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .store-logo-row {
        max-height: none;
        opacity: 1;
        padding-top: 0; /* Minimized padding to lift icons */
        margin-top: -1rem !important; /* Force override of space-y-3 with strong lift */
        margin-left: auto;
        margin-right: auto;
        width: auto;
        max-width: 180px; /* Standard: Fits 4 items (36*4 + gaps) */
        gap: 0.3rem; 
        box-sizing: border-box;
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }

    .store-logo-row.store-logo-row-narrow {
        max-width: 140px; /* Narrow: Fits 3 items (36*3 + gaps) */
    }
    
    .store-logo-row::-webkit-scrollbar {
        display: none;
    }

    .streaming-expand-btn {
        display: none !important;
    }
}

.store-logo-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.store-logo-row a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.store-logo-row img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

/* Track Carousel Wrapper */
.track-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
}

.track-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
}

.track-carousel-arrow:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.track-carousel-arrow-left { left: -24px; }
.track-carousel-arrow-right { right: -24px; }

/* Desktop Arrows visible only on md+ */
@media (max-width: 768px) {
    .track-carousel-arrow { display: none !important; }
}

/* Track Carousel - Now Flex on all devices for the sliding logic */
.track-carousel {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    will-change: transform;
}

.track-card {
    max-height: none !important;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Desktop: fully visible in 2×2 grid, no dimming */
    opacity: 1;
    filter: none;
    transform: none;
    pointer-events: auto;
}

/* Mobile carousel: dimming, active/neighbor states */
@media (max-width: 768px) {
    .track-card {
        flex: 0 0 72vw !important;
        width: 72vw !important;
        max-width: 72vw !important;
        margin: 0 1vw !important;
        opacity: 0.15;
        filter: blur(4px) grayscale(1);
        transform: scale(0.85);
        pointer-events: none;
    }
    
    .track-card.track-active {
        opacity: 1;
        filter: blur(0) grayscale(0);
        transform: scale(1);
        z-index: 10;
        pointer-events: auto;
    }
    
    .track-card.neighbor {
        opacity: 0.45;
        filter: blur(1px) grayscale(1);
        transform: scale(0.92);
        z-index: 5;
        pointer-events: auto;
        cursor: pointer;
    }
}


/* Mobile: Horizontal swipe carousel with looping */
@media (max-width: 768px) {
    .track-carousel-wrapper {
        width: 100vw !important;
        /* Use negative margins to pull out of the parent's padding (4vw or safe area) */
        margin-left: calc(-1 * var(--safe-area-inset-left, 4vw)) !important;
        margin-right: calc(-1 * var(--safe-area-inset-right, 4vw)) !important;
        padding: 0 !important;
        overflow-x: hidden !important; /* Only hide horizontal to prevent body scroll */
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        /* Ensure no horizontal scroll on the body */
    /* Fixed: Ensure carousel is above background sections */
        max-width: 100vw;
        z-index: 20 !important; 
    }

    /* Mobile Embed Scaler (.spotify-embed-mobile matches public/index.html) */
    /* Mobile Embed Scaler (.spotify-embed-mobile matches public/index.html) */
    .spotify-embed-mobile {
        width: 114% !important; /* Zoom reduced by another 7% (114%) */
        height: 100% !important; /* Fit container exactly (Prevent frame scroll) */
        border: none;
        display: block;
        max-width: none !important; /* Allow overflow width */
        margin: 0 0 12px -14% !important; /* Pull Left to Align Right Edge (100 - 114 = -14) */
        box-sizing: border-box !important;
        min-width: 0 !important;
    }
    
    .track-carousel {
        display: flex;
        flex-direction: row;
        gap: 0; 
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        padding: 0 !important;
        width: max-content;
        overflow: visible !important;
    }

    /* Track carousel arrows: hidden on mobile (desktop-only) */
    
    .track-card {
        flex: 0 0 72vw !important;
        width: 72vw !important;
        max-width: 72vw !important;
        aspect-ratio: 1/1 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        margin: 0 1vw !important;
    }

    /* Track Titles (100% Bigger: 10px -> 20px) */
    .track-card h3 {
        font-size: 20px !important;
        line-height: 1.2 !important;
        white-space: normal !important; /* Allow wrapping if needed for large text */
        height: auto !important;
    }

    /* Subtitle Size (Live / Production) -> 12px */
    .track-ver {
        font-size: 12px !important;
        vertical-align: middle;
        opacity: 0.8;
    }
    
    /* In landscape specifically, cards might need to be shorter or wider differently */
    @media (orientation: landscape) {
        .track-card {
            flex: 0 0 45vh !important; /* In landscape, base it on height to keep square */
            width: 45vh !important;
            max-width: 45vh !important;
            margin: 0 1vh !important;
        }
    }
    
    /* Headers should wrap naturally by default */
    h2, h3 {
        white-space: normal;
        max-width: 100%;
        overflow: visible;
        text-overflow: clip;
    }

    /* Active/neighbor states handled in earlier mobile block above */
    
    /* Larger Spotify embed on mobile: Uses global rule, just ensure margin */
    .spotify-embed-mobile {
        /* Derived from global rule: flex: 1 */
        margin-bottom: 0.5rem;
    }
}

/* Carousel centering: JS handles centering via translateX, no CSS padding needed */
@media (max-width: 768px) {
    .track-carousel {
        padding: 0 !important;
        gap: 0 !important;
    }
}

/* Problem Zone C: Tablet "Dead Zone" ~751px-850px (Portrait/Narrow Tablet) */
/* Moved to END to ensure Cascade Win */
@media (min-width: 769px) and (max-width: 850px) {
    #home-second-page .desktop-scale {
        transform: scale(0.9) !important; /* Slight zoom out */
        height: 110% !important;
        /* Restore general gutters: Remove width/margin expansion */
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: -5% !important;
        justify-content: flex-start !important; /* Pack to top */
        gap: 0.5rem !important;
    }

    /* 1. Youtube Compression - FORCE GRID 3-COL */
    #youtube-grid {
        display: grid !important; 
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: 1fr !important;
        gap: 0.25rem !important; /* Tighter gap */
        margin-bottom: 0.5rem !important;
        align-items: center !important;
        width: 100% !important; 
        overflow: hidden !important;
        flex: 0 0 auto !important;
    }

    #youtube-grid > div {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    #home-second-page iframe {
        max-height: none !important; /* Removed clamp */
        width: 100% !important;
        height: 100% !important;
    }
    
    /* 2. Compact 2x2 Song Grid */
    #home-second-page .track-carousel {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important; /* Tight gap */
        /* Override generic rules */
        max-height: none !important; 
        height: auto !important;
        width: 100% !important;
    }

    #home-second-page .track-carousel-arrow {
        display: none !important; /* Hide arrows in grid mode */
    }

    #home-second-page .track-carousel-wrapper {
        width: 100% !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #home-second-page .track-card {
        max-height: none !important; /* Limit card height */
        flex: none !important;
        width: auto !important;
        margin: 0 !important;
    }

    /* Shrink Headers to save space */
    #home-second-page h2 {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Hide the "Streaming" subheader if space is critical, or make small */
    #home-second-page h3 {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Container adjustment */
    #home-second-page .space-y-6.md\:space-y-8 {
        flex: 1 !important;
        margin-top: 0 !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
    }
}

/* FIX: Hero Title "Too High" Adjustment & Gap Fix for ALL Desktop layouts */
/* Range: Start from 630px and apply globally */
@media (min-width: 769px) {
    #section-home .desktop-scale {
        /* Nudge cluster down even further for 16:9 */
        padding-top: 30vh !important; 
        
        /* FIX: Group content tightly in the center */
        justify-content: center !important; 
        align-content: center !important;
        gap: 2rem !important; 
    }

    /* Force children to drop all spacing/growing behavior */
    #section-home .desktop-scale > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        flex: 0 0 auto !important; 
    }
}

/* MUSIC SECTION OPTIMIZATIONS: Anti-Clip Guardrails for 2x2 Grid */
@media (min-width: 769px) {
    #home-second-page .desktop-scale {
        justify-content: center !important;
        align-items: stretch !important;
        gap: 1.5rem !important; /* Increased gap for breathing room */
        padding-top: 0 !important; 
    }

    /* Music section text — left-aligned on desktop */
    #home-second-page .desktop-scale h2,
    #home-second-page .desktop-scale h3,
    #home-second-page .desktop-scale p {
        text-align: left !important;
    }

    #home-second-page .desktop-scale .flex-row {
        justify-content: center !important;
    }

    #home-second-page a.glass.p-6.md\:p-8 {
        padding: 0.5rem 1rem !important;
        margin-bottom: 0.5rem !important;
        margin-top: 0 !important;
    }

    #home-second-page a.glass.p-6.md\:p-8 h3 {
        font-size: 1rem !important;
    }

    /* Tighter YouTube grid */
    #youtube-grid {
        margin-bottom: 0.25rem !important;
        gap: 0.5rem !important;
    }

    #youtube-grid iframe,
    #youtube-grid > div {
        max-height: none !important;
    }

    /* Tighter track cards */
    #home-second-page .track-card {
        padding: 0.5rem !important;
        max-height: none !important; /* Allow internal override to work */
    }

    /* Scale down significantly for portrait/narrow viewports */
    #home-second-page .desktop-scale {
        transform: scale(0.75);
        transform-origin: top center;
    }
    
    /* Hide SoundCloud box entirely to save space */
    #home-second-page a.glass.p-6.md\\:p-8 {
        display: none !important;
    }
}

/* ============================================
   STREAMING TRACK CARDS - DESKTOP 2×2 GRID
   (Carousel is mobile-only, desktop = grid)
   ============================================ */
@media (min-width: 769px) {
    /* Track carousel wrapper */
    #home-second-page .track-carousel-wrapper {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    /* Track carousel: 2×2 GRID on desktop */
    #home-second-page .track-carousel {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 900px !important;
        max-height: none !important; 
        height: auto !important;
        padding: 20px 0 !important;
        transform: none !important; /* Override any JS transform */
        margin: 0 auto !important; /* Center grid horizontally */
    }

    /* Track cards: fill grid cells naturally */
    #home-second-page .track-card {
        max-width: none !important;
        max-height: none !important; 
        height: auto !important;
        overflow: hidden !important; 
        width: 100% !important;
    }

    /* Spotify embed: fixed height for full player visibility */
    #home-second-page .track-card .spotify-embed-mobile {
        height: 352px !important;
        flex: 0 0 352px !important;
    }
    
    /* Also override iframe max-heights */
    #home-second-page .track-card iframe {
        max-height: none !important;
    }

    /* Hide carousel arrows on desktop (no carousel) */
    #home-second-page .track-carousel-arrow {
        display: none !important;
    }
}

/* Extra-wide viewports (1600px+) */
/* Extra-wide viewports: grid cards scale naturally, no override needed */


/* ============================================
   FINAL FIX: MUSIC SECTION HEIGHT OVERRIDE
   Remove 100vh constraint, allow natural height
   ============================================ */
@media (min-width: 769px) {
    #home-second-page.unified-viewport {
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: visible !important;
        justify-content: center !important;
    }
    
    /* Reset scale to more readable value */
    #home-second-page .desktop-scale {
        transform: scale(0.92) !important;
        transform-origin: center center !important;
        align-items: stretch !important;
    }
    #home-third-page .desktop-scale {
        transform: scale(0.92) !important;
        transform-origin: top center !important;
    }
}



/* Journal Circuit Lines consolidated in header section */

/* Ensure no clipping for the circuit lines that extend upwards */
#section-journal,
#section-journal .max-w-5xl,
#section-journal .relative {
    overflow: visible !important;
}

/* ============================================
   JOURNAL DESKTOP: Match Community/Patreon gutter & bigger boxes
   ============================================ */
@media (min-width: 769px) {
    /* Give Journal the same horizontal gutters as Community's unified-viewport */
    #section-journal {
        padding-left: clamp(2rem, 6vw, 4rem) !important;
        padding-right: clamp(2rem, 6vw, 4rem) !important;
    }

    /* Remove excess empty space below last journal event on desktop */
    #section-journal.page-section.active {
        min-height: auto !important;
        padding-bottom: 2rem !important;
    }

    /* Widen the Journal content container to match Community's inner max-width */
    #section-journal > .max-w-5xl,
    #section-journal .desktop-scale.max-w-5xl {
        max-width: 1400px !important;
    }

    /* Make all Journal event glass boxes bigger: more padding */
    #section-journal .glass.rounded-3xl {
        padding: 2rem !important;
    }

    /* Increase spacing between event cards */
    #journal-my-content:not(.hidden),
    #journal-community-content:not(.hidden) {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
    }
    #journal-my-content > *,
    #journal-community-content > * {
        margin-top: 0 !important;
    }

    /* Increase the image/text split to give more room to images */
    #section-journal .glass.rounded-3xl .flex.flex-col.md\:flex-row {
        gap: 2rem !important;
    }

    /* Make event titles bigger */
    #section-journal .font-display.text-2xl.md\:text-4xl {
        font-size: 2.75rem !important;
    }

    /* Give more breathing room to text content inside event cards */
    #section-journal .glass.rounded-3xl .space-y-4 {
        gap: 1rem;
    }
}

/* ============================================
   BOOKING DESKTOP: Match Community/Journal gutter & width
   ============================================ */
@media (min-width: 769px) {
    /* Give Booking the same horizontal gutters as Community's unified-viewport */
    #section-booking {
        padding-left: clamp(2rem, 6vw, 4rem) !important;
        padding-right: clamp(2rem, 6vw, 4rem) !important;
    }

    /* Widen the Booking content container to match Community/Journal inner max-width */
    #section-booking > .max-w-5xl {
        max-width: 1400px !important;
    }
}

#journal-lines {
    overflow: visible !important;
    z-index: 0; /* Behind content but check layering */
}

/* ============================================
   BERLINER ZEITUNG NEWSPAPER MODAL
   ============================================ */

/* Mobile: show CTA overlay because no hover */
@media (hover: none) {
    #newspaper-cta-overlay { 
        opacity: 1 !important; 
    }
}

/* Newspaper typography */
/* Base state: use standard site font for everything */
.newspaper-typography {
    font-family: 'Space Grotesk', sans-serif !important;
}

.newspaper-typography p {
    color: rgba(255, 255, 255, 0.72) !important;
    font-weight: 300 !important;
    line-height: 1.8 !important;
    font-size: 0.98rem !important;
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Explicitly ensure desktop event box text matches Humnava/Kunsthalle */
#newspaper-desktop-teaser, 
#newspaper-desktop-more {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Only on MOBILE pop-up: use newspaper-like serif font for the whole panel */
@media (max-width: 768px) {
    #newspaper-modal-panel,
    #newspaper-modal-title,
    #newspaper-modal-subtitle, 
    #newspaper-modal-byline,
    .newspaper-typography,
    .newspaper-typography p {
        font-family: ui-serif, Georgia, "Times New Roman", Times, serif !important;
        white-space: normal !important;
    }
}





@media (min-width: 768px) {
    .newspaper-typography p { 
        font-size: 1.05rem; 
    }
}

/* Language button active state aligned with your toggle styles */
.newspaper-lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: rgba(0, 0, 0, 0.95);
    mix-blend-mode: screen;
}

/* Newspaper Modal — Simple Fade In / Out */
.paper-enter #newspaper-modal-panel {
    animation: newspaperFadeIn 400ms ease-out both;
}

.paper-exit #newspaper-modal-panel {
    animation: newspaperFadeOut 300ms ease-in both;
}

@keyframes newspaperFadeIn {
    0%   { opacity: 0; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes newspaperFadeOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.97); }
}

/* Crease overlay — hidden (no fold animation) */
#newspaper-modal-panel::before {
    content: "";
    display: none;
}

/* CRITICAL: Hide the ENTIRE header when newspaper modal is open */
body.newspaper-modal-open header,
body.newspaper-modal-open #menu-hamburger,
body.newspaper-modal-open .nav-slider-container {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* Prevent selecting UI bits in modal header */
#newspaper-modal .sticky { 
    user-select: none; 
}

/* Patreon wrapper: glass effect ONLY on mobile where it's the visible card container.
   On desktop, the wrapper must have ZERO glass/backdrop properties to avoid
   creating an isolation boundary that kills children's backdrop-filter. */
.patreon-wrapper-mobile {
    /* Desktop: completely transparent, no stacking context */
    background: transparent;
    border: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    /* Mobile: apply full glass effect to the wrapper */
    .patreon-wrapper-mobile {
        backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
        -webkit-backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
        background: rgba(255, 255, 255, 0.10);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    }
}

.patreon-tier-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.patreon-tier-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.patreon-tier-highlighted {
    background: linear-gradient(135deg, rgba(0, 145, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%) !important;
    border: 1px solid rgba(0, 145, 255, 0.4) !important;
    box-shadow: 0 0 40px rgba(0, 145, 255, 0.15);
}

.patreon-tier-highlighted:hover {
    border-color: rgba(0, 145, 255, 0.6) !important;
    box-shadow: 0 0 50px rgba(0, 145, 255, 0.25);
}

@media (max-width: 768px) {
    .patreon-tier-card {
        padding: 1.5rem !important;
        border-radius: 1.5rem !important;
    }
    /* Compact mobile text */
    .patreon-tier-card p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
}

/* ===== BOOKING SECTION - NATIVE DETAILS/SUMMARY STYLING ===== */
/* Remove default marker/arrow */
.booking-expandables details summary::-webkit-details-marker,
details.glass summary::-webkit-details-marker,
details.group summary::-webkit-details-marker {
    display: none;
}

.booking-expandables details summary::marker,
details.glass summary::marker,
details.group summary::marker {
    display: none;
    content: '';
}

/* Smooth open/close animation for content */
.booking-expandables details[open] > div,
details.glass[open] > div,
details.group[open] > div {
    animation: detailsSlideDown 0.3s ease-out forwards;
}

@keyframes detailsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bio toggles styling */
.bio-length-btn.active {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.15) 100%);
    color: #000 !important;
    font-weight: 600;
}

.bio-toggle {
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.bio-toggle.active {
    opacity: 1;
}

.bio-toggle:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Bio text display control */
.bio-text {
    transition: opacity 0.3s ease;
}


/* ===========================================
   BOOKING: CONTACT FORM
   =========================================== */

/* Input focus glow */
.booking-input:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08),
                0 0 20px rgba(255, 255, 255, 0.04);
}

/* Shake animation for wrong verification */
@keyframes bookingShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}

.booking-input-shake {
    animation: bookingShake 0.5s ease-out;
    border-color: rgba(248, 113, 113, 0.5) !important;
}

/* Confirmation fade-in */
#booking-confirmation {
    animation: bookingFadeIn 0.5s ease-out;
}

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

/* Submit button hover glow */
#booking-submit-btn:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

/* ===========================================
   BOOKING: JOURNAL HIGHLIGHTS CAROUSEL
   =========================================== */

/* Outer container — clips the overflow, positions arrows */
.highlights-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 1rem 0 0.5rem;
}

/* The sliding track — a flex row, never wraps */
.highlights-carousel-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: center;
    width: max-content;
    padding: 1rem 0;
}

/* === DESKTOP: 3 visible, center enlarged === */
.highlight-snippet-card {
    flex: 0 0 352px;
    width: 352px;
    min-width: 300px;
    max-width: 418px;
    flex-shrink: 0;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.65s ease,
                filter 0.65s ease,
                box-shadow 0.65s ease;
    opacity: 0;
    transform: scale(0.85);
    filter: grayscale(60%) blur(1px);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.highlight-snippet-card.active {
    opacity: 1;
    transform: scale(1.12);
    filter: none;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(255,255,255,0.06);
}

/* Tiered dimming for desktop carousel effect */
.highlight-snippet-card.neighbor-1 {
    opacity: 0.7;
    transform: scale(0.95);
    filter: grayscale(30%) blur(0px);
    z-index: 5;
}

/* Fade out neighbor-2 gracefully — only 3 cards visible */
.highlight-snippet-card.neighbor-2 {
    opacity: 0.15;
    transform: scale(0.85);
    filter: grayscale(70%) blur(1.5px);
    z-index: 1;
    pointer-events: none;
}

/* Ensure cards outside active/neighbors are hidden on desktop to keep frame clean */
/* Note: using opacity:0 only — visibility:hidden snaps and causes abrupt clipping */
@media (min-width: 769px) {
    .highlight-snippet-card:not(.active):not(.neighbor-1):not(.neighbor-2) {
        opacity: 0;
        pointer-events: none;
    }
}

/* === MOBILE: 1 card, like SONGS carousel === */
@media (max-width: 768px) {
    .highlights-carousel-container {
        width: 100vw;
        margin-left: calc(-1 * var(--safe-area-inset-left, 4vw));
        margin-right: calc(-1 * var(--safe-area-inset-right, 4vw));
        left: 50%;
        transform: translateX(-50%);
        position: relative;
        max-width: 100vw;
        overflow: hidden;
        padding: 0.5rem 0 0.5rem;
    }

    .highlights-carousel-track {
        gap: 0;
        padding: 0.5rem 0;
    }

    .highlight-snippet-card {
        flex: 0 0 75vw !important;
        width: 75vw !important;
        min-width: unset !important;
        max-width: none !important;
        margin: 0 2vw;
        opacity: 1 !important;
        transform: scale(1) !important;
        filter: none !important;
    }
    
    .highlight-snippet-card.active {
        box-shadow: none;
    }
}

/* === Card Image — fills entire card as background === */
.snippet-card-image {
    width: 100%;
    height: 0;
    padding-bottom: 62.5%; /* 10/16 = 0.625 = 62.5% — Safari-safe aspect ratio */
    overflow: hidden;
    position: relative;
}

.snippet-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.highlight-snippet-card:hover .snippet-card-image img {
    transform: scale(1.08);
}

/* === Overlay — sits at bottom of image with gradient scrim === */
.snippet-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 1rem 0.8rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 5;
}

/* Link icons row — sits above title */
.snippet-overlay-links {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

/* Title */
.snippet-overlay-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    line-height: 1.3;
}

/* Summary text */
.snippet-overlay-summary {
    font-size: 0.65rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.snippet-link-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
}

.snippet-link-icon:hover {
    background: rgba(255,255,255,0.35);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.4);
}

.snippet-read-more {
    width: 100%;
    padding: 0.45rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.35rem;
}

.snippet-read-more:hover {
    background: white;
    color: black;
    transform: translateY(-1px);
}

/* === Navigation Arrows === */
.highlights-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
}

.highlights-arrow:focus,
.highlights-arrow:focus-visible {
    outline: none;
}

.highlights-arrow:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.highlights-arrow-left { left: 0.5rem; }
.highlights-arrow-right { right: 0.5rem; }

/* Mobile: arrows visible below the carousel */
@media (max-width: 768px) {
    .highlights-arrows-mobile {
        display: none !important;
    }
    .highlights-arrows-desktop {
        display: none;
    }
}

@media (min-width: 769px) {
    .highlights-arrows-mobile {
        display: none;
    }
    .highlights-arrows-desktop .highlights-arrow {
        display: flex;
        width: 66px;
        height: 66px;
    }
    .highlights-arrows-desktop .highlights-arrow svg,
    .highlights-arrows-desktop .highlights-arrow i {
        width: 36px;
        height: 36px;
    }
}

/* === Deep-link glow animation === */
@keyframes highlight-glow-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); border-color: rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.8); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); border-color: rgba(255, 255, 255, 0.1); }
}

.highlight-glow {
    animation: highlight-glow-pulse 2s ease-out;
}

/* =============================================
   MOBILE JOURNAL INSTAGRAM-STYLE CAROUSEL
   ============================================= */

@media (max-width: 768px) {

    /* Hide the mini thumbnail carousel on mobile */
    .arte-carousel-wrapper,
    .humnava-carousel-wrapper,
    .aufgetischt-carousel-wrapper,
    .kunsthalle-carousel-wrapper,
    .rtp-carousel-wrapper {
        display: none !important;
    }

    /* Main preview becomes full-width swipeable container */
    .mobile-journal-carousel {
        width: 100% !important;
        aspect-ratio: 4/3;
        border-radius: 1rem;
        overflow: hidden;
        position: relative;
        margin-bottom: 0.75rem;
        touch-action: pan-y;
        -webkit-user-select: none;
        user-select: none;
    }

    .mobile-journal-carousel .mjc-track {
        display: flex;
        height: 100%;
        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: transform;
    }

    .mobile-journal-carousel .mjc-track.dragging {
        transition: none !important;
    }

    .mobile-journal-carousel .mjc-slide {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .mobile-journal-carousel .mjc-slide img,
    .mobile-journal-carousel .mjc-slide video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-journal-carousel .mjc-slide iframe {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

    /* Page indicator — top right (1/7) */
    .mjc-page-indicator {
        position: absolute;
        top: 0.6rem;
        right: 0.6rem;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        color: rgba(255, 255, 255, 0.9);
        font-family: 'Orbitron', 'SF Mono', monospace;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        padding: 0.25rem 0.55rem;
        border-radius: 999px;
        z-index: 10;
        pointer-events: none;
    }

    /* Instagram-style dot container */
    .mjc-dots {
        position: absolute;
        bottom: 0.6rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        z-index: 10;
        pointer-events: none;
        height: 16px;
    }

    /* Individual dot */
    .mjc-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.35);
        margin: 0 2.5px;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        flex-shrink: 0;
    }

    /* Active dot — glowing white */
    .mjc-dot.active {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.5);
        width: 7px;
        height: 7px;
    }

    /* Dot size scaling for Instagram effect */
    .mjc-dot.size-medium {
        width: 5px;
        height: 5px;
        opacity: 0.55;
    }

    .mjc-dot.size-small {
        width: 3.5px;
        height: 3.5px;
        opacity: 0.3;
    }

    .mjc-dot.size-tiny {
        width: 2.5px;
        height: 2.5px;
        opacity: 0.15;
    }

    .mjc-dot.hidden-dot {
        width: 0;
        height: 0;
        margin: 0;
        opacity: 0;
    }
}

/* Promo Gallery Styles */
#promo-gallery-overlay {
    display: none;
    opacity: 0;
    transform: scale(1.02);
    transition:
        opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        backdrop-filter 0.6s ease;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#promo-gallery-overlay.flex {
    display: flex;
}

#promo-gallery-overlay.active {
    opacity: 1;
    transform: scale(1);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
}

/* Closing state — smooth exit */
#promo-gallery-overlay.closing {
    opacity: 0;
    transform: scale(0.97);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition:
        opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.5s cubic-bezier(0.32, 0, 0.67, 0),
        backdrop-filter 0.5s ease;
}

.gallery-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card img {
    cursor: zoom-in;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover img {
    transform: scale(1.02);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#gallery-scrollspace {
    scroll-behavior: smooth;
}

.gallery-card .glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(26px);
}

/* ============================================
   RBB REEL: Mobile Tall Aspect (9:14)
   ============================================ */
@media (max-width: 768px) {
    .rbb-reel-container {
        aspect-ratio: 9 / 14 !important;
    }
}

/* ============================================================
   GLOBAL MOBILE SCROLL LOCK REMEDY (CASCADE PRIORITY)
   Force vertical scrolling unless specific modal classes exist.
   ============================================================ */
html, body {
    /* Ensure height is not clamped to a fixed value */
    height: auto !important;
    min-height: 100% !important;
}

body {
    /* Explicitly allow vertical scrolling by default */
    overflow-y: auto !important;
    /* Smooth elastic scrolling for iOS */
    -webkit-overflow-scrolling: touch !important;
}

/* Only lock when these specific functional classes are present */
body.menu-open,
body.promo-open,
body.modal-open,
body.antigravity-scroll-lock {
    overflow-y: hidden !important;
}

/* Prevent horizontal overflow strictly but allow vertical flow */
html {
    overflow-x: hidden !important;
}

/* ============================================
   MOBILE: Center all journal event text content
   ============================================ */
@media (max-width: 768px) {
    /* Center the text side of journal event cards on mobile */
    [id^="journal-event-"] > div > div:last-child {
        text-align: center !important;
        align-items: center !important;
    }
    
    /* Center meta tags row */
    [id^="journal-event-"] .flex.items-center.gap-3 {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    /* Center all buttons within journal events */
    [id^="journal-event-"] button[id$="-read-more-btn"],
    [id^="journal-event-"] button[id$="-read-more-btn-en"],
    [id^="journal-event-"] button[id$="-read-more-btn-de"] {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Center "Read more" in booking snippet cards */
    .snippet-card-overlay {
        align-items: center !important;
        text-align: center !important;
    }
}

/* ============================================
   PARTNERED WITH — Logo Strip
   ============================================ */
.partnered-with-section {
    padding: 0.5rem 0;
    margin-top: 1.5rem !important;   /* Balanced gap above (carousel) */
    margin-bottom: 0 !important;     /* space-y-8 on next sibling provides 2rem below — this equalizes */
}

.partner-logo {
    filter: brightness(0) invert(1);
    opacity: 0.55;
    transition: filter 0.4s ease, transform 0.3s ease, opacity 0.4s ease;
    flex-shrink: 0;
}

.partner-logo:hover {
    opacity: 1;
    filter: brightness(0) invert(1)
            drop-shadow(0 0 4px rgba(255, 255, 255, 0.56))
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.28))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
    transform: scale(1.05);
}

/* Desktop: single horizontal row, no wrapping */
@media (min-width: 769px) {
    .partner-logos-row {
        flex-wrap: nowrap !important;
        justify-content: center;
        align-items: center;
    }
}

/* On mobile: 3 logos row 1, 4 logos row 2 */
@media (max-width: 768px) {
    .partnered-with-section .partner-logos-row {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr);
        gap: 0.75rem 0.55rem !important;
        padding: 0 1rem !important;
        justify-items: center;
        align-items: center;
    }
    /* Row 1: 3 logos, each span 4 of 12 columns */
    .partner-logos-row > :nth-child(1),
    .partner-logos-row > :nth-child(2),
    .partner-logos-row > :nth-child(3) {
        grid-column: span 4;
    }
    /* Row 2: 4 logos, each span 3 of 12 columns */
    .partner-logos-row > :nth-child(4),
    .partner-logos-row > :nth-child(5),
    .partner-logos-row > :nth-child(6),
    .partner-logos-row > :nth-child(7) {
        grid-column: span 3;
    }
}

/* ===== Phase 2: Desktop Spacing Reduction ===== */
@media (min-width: 769px) {
    /* Music section: vertically centered, minimal padding */
    #home-second-page {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        justify-content: center !important;
    }

    /* Upcoming Shows: reduce vertical gap */
    #home-third-page.join-segment {
        padding-top: 6vh !important;
    }

    /* Community: ALL viewports share same layout (Patreon + Connect + Activism) */
    .page-section#section-community .portal-segment {
        padding-top: clamp(1rem, 3vh, 2rem) !important;
        justify-content: flex-start !important;
        min-height: auto !important;
    }
    /* Force children to stretch to full container width */
    #section-community .portal-segment .desktop-scale {
        align-items: stretch !important;
    }
}

/* ===== Phase 2: Mobile — Center EVERYTHING, Sections Start Higher ===== */
@media (max-width: 768px) {
    /* 
       NUCLEAR APPROACH: Center ALL headings and text blocks on mobile.
       Only exception: the hero title "GRAY CONTRAST" itself.
    */
    h1, h2, h3, h4 {
        text-align: center !important;
    }

    /* Also center span-based headers and labels */
    .font-display {
        text-align: center !important;
    }

    /* Override all text-left containers on mobile */
    .text-left,
    [class*="text-left"] {
        text-align: center !important;
    }

    /* Override items-start flex containers on mobile */
    .items-start {
        align-items: center !important;
    }

    /* Center section header containers (not ARTE/functional flex rows) */
    .page-section .border-b.border-white\/5,
    .page-section > .max-w-5xl > .space-y-16 > .flex.justify-between,
    .page-section > .unified-viewport > .max-w-5xl > .flex.justify-between {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    /* Preserve HOME hero left alignment specifically */
    #home-hero-segment h1,
    #home-hero-segment .hero-title,
    #home-hero-segment .items-start {
        text-align: left !important;
        align-items: flex-start !important;
    }
    #home-hero-segment .font-display {
        text-align: left !important;
    }

    /* Force center on paragraphs in sections (not hero bio) */
    .unified-viewport p,
    .desktop-scale p {
        text-align: center !important;
    }
    #home-hero-segment p {
        text-align: left !important;
    }

    /* Hero section: start higher on mobile, but clear the hamburger + safe area */
    #home-hero-segment {
        justify-content: flex-start !important;
        padding-top: calc(max(env(safe-area-inset-top, 20px), 20px) + 5rem) !important;
    }

    /* Journal header spacing */
    #section-journal .font-display.text-3xl,
    #section-journal .font-display.text-2xl {
        margin-bottom: 1.5rem !important;
    }

    /* Journal section — now uses unified --mobile-section-start */
    /* (Actual override is in the unified block at end of file) */
    #section-journal .desktop-scale {
        padding-top: 0.5rem !important;
    }

    /* ALL sections start higher on mobile (except home hero) */
    .page-section:not(#section-home) .unified-viewport:first-child {
        padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)) !important;
    }

    /* Home sub-sections (Music, Shows, etc.) also need less top padding */
    #home-second-page,
    #home-third-page,
    .join-segment {
        padding-top: 2rem !important;
    }

    /* Hamburger vertical nav: higher positioning */
    .mobile-nav-list {
        justify-content: flex-start !important;
        padding-top: 24vh !important;
        padding-bottom: 2.5rem !important;
        gap: 2rem !important;
    }

    /* Telegram Hub cards: center content on mobile */
    .glass.p-4.rounded-2xl.flex.flex-col.items-start {
        align-items: center !important;
        text-align: center !important;
    }

    /* Patreon tier prices (€/month) — center on mobile */
    .patreon-tier-card .space-y-2 {
        text-align: center !important;
    }
    .patreon-tier-card .font-mono {
        text-align: center !important;
    }
    .patreon-tier-card .space-y-3 {
        text-align: center !important;
    }

    /* Telegram Hub header row — center icon + title on mobile */
    .lg\\:col-span-2 > .flex.flex-col > .flex.items-center.gap-3 {
        justify-content: center !important;
        width: 100% !important;
    }

    /* "Connect • Exchange • Meet" subtitle — center, remove left padding */
    .lg\\:col-span-2 > .flex.flex-col > span {
        text-align: center !important;
        padding-left: 0 !important;
        width: 100% !important;
        display: block !important;
    }

    /* ARTE: Keep EN/DE buttons on right side, don't force center on functional rows */
    #section-journal .flex.items-center.justify-between {
        justify-content: space-between !important;
    }

    /* Booking: Keep details/summary/tech-rider content left-aligned */
    #section-booking details,
    #section-booking details summary,
    #section-booking details span,
    #section-booking details p,
    #section-booking .flex.items-center.justify-between {
        text-align: left !important;
        justify-content: space-between !important;
    }
}

/* ===== Loading Overlay Spinner ===== */
#loading-overlay {
    pointer-events: all;
}
#loading-overlay.dismiss {
    opacity: 0 !important;
    pointer-events: none;
}

.loading-spinner-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.4), transparent 70%);
    animation: spinner-rotate 1.2s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner-core {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: spinner-pulse 2s ease-in-out infinite;
}

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

@keyframes spinner-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ===== Press Kit Rotating Glow (Border Edge Only) ===== */
details.glass.presskit-glow {
    position: relative;
    overflow: visible;
}

details.glass.presskit-glow::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 1.5rem;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        transparent 0%,
        rgba(255,255,255,0.5) 10%,
        rgba(200,180,255,0.9) 20%,
        transparent 35%,
        rgba(180,220,255,0.7) 55%,
        transparent 70%,
        rgba(255,200,150,0.5) 85%,
        transparent 100%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: presskit-spin 4s linear infinite;
    /* Hollow out the center to make it border-only */
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 3px;
}

/* Show glow on hover or scroll-in */
details.glass.presskit-glow:hover::before,
details.glass.presskit-glow.glow-active::before {
    opacity: 1;
}

/* HIDE glow when section is unfolded/open */
details.glass.presskit-glow[open]::before {
    opacity: 0 !important;
}

@keyframes presskit-spin {
    to { --glow-angle: 360deg; }
}

@property --glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@media (prefers-reduced-motion: reduce) {
    details.glass.presskit-glow::before {
        animation: none;
    }
}

/* Mobile Booking: tighten spacing (padding-top now uses unified --mobile-section-start) */
@media (max-width: 768px) {
    #section-booking > .max-w-5xl {
        gap: 0.5rem !important;
    }
}

/* ===================================================================
   UNIFIED MOBILE SECTION START — Hamburger South Edge Alignment
   Header: top: 1rem, Bubble: 72px → south edge = calc(1rem + 72px)
   All non-Home sections start at EXACTLY this Y-position on mobile.
   =================================================================== */
:root {
    /* Safe-area header top + 72px bubble + breathing gap */
    --mobile-section-start: calc(max(env(safe-area-inset-top, 20px), 20px) + 0.75rem + 72px + 0.5rem);
}

@media (max-width: 768px) {
    /* Section-level padding — same for all four */
    #section-journal.page-section.active,
    #section-booking.page-section.active,
    #section-merch.page-section.active,
    #section-community.page-section.active {
        padding-top: var(--mobile-section-start) !important;
    }

    /* Booking: add a smidge more space so it's not too tight */
    #section-booking.page-section.active {
        padding-top: calc(var(--mobile-section-start) + 0.25rem) !important;
    }

    /* Booking: halve gap between BOOKING title and "I'm a Berlin..." text */
    #section-booking > .max-w-5xl > * + * {
        margin-top: 1rem !important; /* was 2rem from space-y-8 */
    }

    /* NEUTRALIZE inner container padding that stacks on Community & Journal.
       The section-level padding above is the ONLY source of top offset now. */

    /* Community: .portal-segment adds 3.5rem (line ~2069), .unified-viewport adds 1.5rem (line ~3598) */
    #section-community .portal-segment.unified-viewport:first-child {
        padding-top: 0 !important;
    }

    /* Journal: .unified-viewport adds 1.5rem (line ~3598), .desktop-scale adds 0.5rem (line ~3593) */
    #section-journal .unified-viewport:first-child {
        padding-top: 0 !important;
    }
    #section-journal .desktop-scale {
        padding-top: 0 !important;
    }
}
