@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

        body {
            font-family: 'Inter', sans-serif;
            background-color: #f8fafc;
            /* slate-50 */
            color: #0f172a;
            margin: 0;
            overflow: hidden;
        }

        /* Active Notch Reverse Corner Radii - Fixed with Radial Gradients */
        .active-notch::before {
            content: "";
            position: absolute;
            right: 0;
            bottom: 100%;
            width: 24px;
            height: 24px;
            background: radial-gradient(circle at top left, transparent 23.5px, #f8fafc 24px);
            pointer-events: none;
        }

        .active-notch::after {
            content: "";
            position: absolute;
            right: 0;
            top: 100%;
            width: 24px;
            height: 24px;
            background: radial-gradient(circle at bottom left, transparent 23.5px, #f8fafc 24px);
            pointer-events: none;
        }

        /* Inactive Item Spotlight Glow (Wine complementary glow from ds.html) */
        .flashlight-btn {
            position: relative;
            overflow: hidden;
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .flashlight-btn::after {
            content: "";
            position: absolute;
            inset: -1px;
            background: radial-gradient(100px circle at var(--mouse-x, 0) var(--mouse-y, 0),
                    rgba(148, 37, 48, 0.35),
                    /* Intensified Wine complementary glow */
                    transparent 50%);
            opacity: 0;
            transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
            border-radius: inherit;
            z-index: 0;
        }

        .flashlight-btn>* {
            position: relative;
            z-index: 10;
        }

        .flashlight-btn:hover::after {
            opacity: 1;
        }

        /* Floating Sidebar Ambient Life */
        @keyframes float-sidebar {

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

            50% {
                transform: translateY(-8px);
            }
        }

        /* Nav Load Stagger Animation (Sync with ds.html) */
        .nav-load {
            opacity: 0;
            transform: translateX(-40px);
            filter: blur(4px);
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .nav-load.loaded {
            opacity: 1;
            transform: translateX(0);
            filter: blur(0);
        }

        /* Button Entry Stagger (Reveal pattern from ds.html: translateY(2rem)) */
        .nav-item {
            opacity: 0;
            transform: translateY(2rem);
            transition: all 1.0s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .loaded .nav-item {
            opacity: 1;
            transform: translateY(0);
        }

        /* Pulse slow for active item icon */
        .pulse-icon {
            animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes pulse-slow {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.85;
                transform: scale(1.05);
            }
        }

        /* AIBI Hover Float & Glow */
        @keyframes aibi-levitate {

            0%,
            100% {
                transform: translateY(0px);
                filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
            }

            50% {
                transform: translateY(-4px);
                filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8));
            }
        }

        .aibi-levitate {
            animation: aibi-levitate 3.5s ease-in-out infinite;
        }

        /* AIBI Tooltip Entry (ds.html DNA) */
        .aibi-tooltip-entry {
            transform-origin: left center;
            transform: translateX(-30px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
        }

        .group:hover .aibi-tooltip-entry {
            transform: translateX(0);
            opacity: 1;
        }

        /* Lettering Mask Reveal (ds.html DNA) */
        .tooltip-text-wrapper {
            overflow: hidden;
            display: inline-block;
            vertical-align: bottom;
        }

        .tooltip-text-content {
            transform: translateY(110%);
            opacity: 0;
            transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
            display: block;
        }

        .group:hover .tooltip-text-content {
            transform: translateY(0);
            opacity: 1;
        }

        /* Main Content Reveal Animations */
        .reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        .delay-100 {
            transition-delay: 100ms;
        }

        .delay-200 {
            transition-delay: 200ms;
        }

        .delay-300 {
            transition-delay: 300ms;
        }

        .delay-400 {
            transition-delay: 400ms;
        }

/* Responsive layout overrides */
        * {
            min-width: 0;
        }

        html.map-gesture-lock,
        body.map-gesture-lock {
            overflow: hidden !important;
            overscroll-behavior: none !important;
        }

        #ranking-container,
        #ranking-regiao-container {
            overscroll-behavior: contain;
        }

        @media (min-width: 901px) and (max-width: 1180px) {
            body > nav {
                left: 16px !important;
                top: 16px !important;
                bottom: 16px !important;
                width: 96px !important;
            }

            body > main {
                padding-left: 136px !important;
                padding-right: 24px !important;
            }
        }

        @media (max-width: 900px) {
            html,
            body {
                height: auto !important;
                min-height: 100%;
                overflow-x: hidden;
            }

            body {
                display: block !important;
                padding-bottom: 96px;
            }

            body > nav {
                left: 0 !important;
                right: 0 !important;
                top: auto !important;
                bottom: 0 !important;
                width: 100% !important;
                height: 78px !important;
                border-radius: 24px 24px 0 0 !important;
                flex-direction: row !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 10px !important;
                padding: 8px 12px !important;
                animation: none !important;
            }

            body > nav > div:first-child,
            body > nav > div:nth-child(2),
            body > nav > div:last-child,
            .aibi-tooltip-entry {
                display: none !important;
            }

            body > nav > div:nth-child(3) {
                flex: 0 1 auto !important;
                width: auto !important;
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 8px !important;
            }

            body > nav .nav-item {
                width: auto !important;
                justify-content: center !important;
            }

            body > nav a,
            body > nav .active-notch {
                width: 54px !important;
                height: 54px !important;
                border-radius: 18px !important;
                transform: none !important;
            }

            body > nav a:hover,
            body > nav .active-notch:hover {
                width: 54px !important;
                transform: none !important;
            }

            .active-notch::before,
            .active-notch::after {
                display: none !important;
            }

            body > main {
                height: auto !important;
                min-height: 100vh;
                padding: 24px 16px 108px !important;
                overflow: visible !important;
            }

            body > main header {
                margin-bottom: 24px !important;
            }

            body > main header h1 {
                font-size: clamp(1.7rem, 8vw, 2.4rem) !important;
                line-height: 1.05 !important;
                overflow-wrap: anywhere;
            }

            body > main header h2 {
                font-size: 1rem !important;
                line-height: 1.4 !important;
            }

            body > main h3 {
                overflow-wrap: anywhere;
            }

            body > main .grid {
                height: auto !important;
                min-height: 0 !important;
            }

            [class*="h-[calc"] {
                height: auto !important;
                min-height: 0 !important;
            }

            [class*="h-[700px]"],
            [class*="h-[300px]"] {
                height: auto !important;
                min-height: 320px !important;
            }

            #mapa-uf {
                height: 55vh !important;
                min-height: 340px !important;
                overscroll-behavior: contain;
                touch-action: none !important;
            }

            #mapa-uf .leaflet-container,
            #mapa-uf .leaflet-pane,
            #mapa-uf .leaflet-map-pane {
                overscroll-behavior: contain;
                touch-action: none !important;
            }

            #ranking-container {
                max-height: 360px;
                min-height: 240px;
            }

            #ranking-regiao-container {
                max-height: 260px;
            }

            .ft-table-wrapper {
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
            }

            .ft-table {
                min-width: 760px;
            }
        }

        @media (max-width: 480px) {
            body {
                padding-bottom: 88px;
            }

            body > nav {
                height: 70px !important;
                padding: 8px !important;
                gap: 6px !important;
            }

            body > nav > div:nth-child(3) {
                gap: 6px !important;
            }

            body > nav a,
            body > nav .active-notch,
            body > nav a:hover,
            body > nav .active-notch:hover {
                width: 46px !important;
                height: 46px !important;
                border-radius: 16px !important;
            }

            body > nav svg,
            body > nav iconify-icon {
                width: 24px !important;
                height: 24px !important;
                font-size: 24px !important;
            }

            body > main {
                padding: 18px 12px 96px !important;
            }

            [class*="h-[700px]"],
            [class*="h-[300px]"] {
                min-height: 280px !important;
            }

            #mapa-uf {
                min-height: 300px !important;
            }
        }

/* ===== Map Bubble System (Custom divIcon) ===== */
        .map-bubble-wrapper {
            background: none !important;
            border: none !important;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .map-bubble {
            width: var(--size);
            height: var(--size);
            border-radius: 50%;
            background: var(--bubble-bg);
            box-shadow: 0 0 16px var(--bubble-glow), inset 0 1px 2px rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            opacity: 0;
            transform: scale(0);
            animation: bubble-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
            cursor: pointer;
        }

        .map-bubble:hover {
            transform: scale(1.15) !important;
            box-shadow: 0 0 28px var(--bubble-glow), inset 0 1px 3px rgba(255, 255, 255, 0.3);
        }

        @keyframes bubble-pop {
            0% {
                opacity: 0;
                transform: scale(0);
            }

            60% {
                opacity: 1;
                transform: scale(1.15);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        .map-bubble-ping {
            position: absolute;
            inset: -3px;
            border-radius: 50%;
            opacity: 0.3;
            animation: ping-ring 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
        }

        @keyframes ping-ring {
            0% {
                transform: scale(1);
                opacity: 0.35;
            }

            75%,
            100% {
                transform: scale(1.6);
                opacity: 0;
            }
        }

        .map-bubble-label {
            font-family: 'Inter', sans-serif;
            font-size: 9px;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.9);
            letter-spacing: 0.5px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
            pointer-events: none;
        }

        /* ===== Leaflet Tooltip - Premium Glassmorphism ===== */
        .leaflet-tooltip-custom {
            background: rgba(30, 24, 44, 0.92) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 14px !important;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
            padding: 0 !important;
            backdrop-filter: blur(12px) !important;
            -webkit-backdrop-filter: blur(12px) !important;
        }

        .leaflet-tooltip-custom::before {
            border-top-color: rgba(30, 24, 44, 0.92) !important;
        }

        .tt-inner {
            display: flex;
            flex-direction: column;
            padding: 10px 14px;
            gap: 2px;
            font-family: 'Inter', sans-serif;
        }

        .tt-uf {
            font-size: 15px;
            font-weight: 800;
            color: #f8fafc;
            letter-spacing: 1px;
        }

        .tt-val {
            font-size: 13px;
            font-weight: 600;
            color: #c084fc;
            letter-spacing: 0.3px;
        }

        .tt-label {
            font-size: 9px;
            font-weight: 500;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-top: 1px;
        }

        /* ===== Custom Scrollbar (Mac/Premium Style) ===== */
        .custom-scrollbar::-webkit-scrollbar {
            width: 6px;
        }

        .custom-scrollbar::-webkit-scrollbar-track {
            background: transparent;
            margin-top: 4px;
            margin-bottom: 4px;
        }

        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        .custom-scrollbar:hover::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
        }

        /* ===== Remove all default Leaflet chrome ===== */
        .leaflet-control-zoom {
            display: none !important;
        }

        .leaflet-control-attribution {
            display: none !important;
        }
