        #map-container { flex: 1; width: 100%; position: relative; z-index: 1; }
        #map { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #1a1a1a; }

        /* POPUP FIXES */
        .leaflet-popup-content-wrapper { padding: 0 !important; overflow: hidden !important; background: transparent !important; border: 1px solid #444 !important; border-radius: 8px !important; }
        .leaflet-popup-content { margin: 0 !important; width: 300px !important; max-width: 85vw !important; padding: 0 !important; }
        .leaflet-popup-tip { background: #1e1e1e !important; border: 1px solid #444 !important; }

        /* Giant thumb-friendly Close Button for Leaflet */
        .leaflet-popup-close-button {
            color: white !important; font-size: 18px !important; top: 10px !important; right: 10px !important; z-index: 50 !important;
            background: #374151 !important; border-radius: 50% !important; width: 26px !important; height: 26px !important;
            display: flex !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; border: 1px solid #555 !important;
        }

        /* EVENT CARD STYLES IN POPUP (Hardcoded backgrounds to prevent iOS Safari transparency bug) */
        .popup-event-card { position: relative; overflow: hidden; cursor: pointer; transition: all 0.2s; }
        .popup-event-card:hover { transform: scale(1.01); filter: brightness(1.1); }
        .popup-event-logo { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; flex: none; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
        .border-red-override { border-color: #dc2626 !important; }

        .pop-bg-standard { background-color: #2d2d2d !important; }
        .pop-bg-past { background-color: #252525 !important; }
        .pop-bg-promoted { background-color: #2d2516 !important; }
        .pop-bg-live { background-color: #064e3b !important; }
        .pop-bg-final { background-color: #172554 !important; }
        .pop-bg-final-past { background-color: #1e293b !important; }

        /* RIBBONS */
        .sold-out-ribbon {
            position: absolute; top: 15px; right: -35px;
            background: #dc2626; color: white;
            font-size: 10px; font-weight: 900; text-transform: uppercase;
            padding: 4px 40px; transform: rotate(45deg);
            box-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 10; pointer-events: none; letter-spacing: 1px;
        }
        .popup-sold-out-ribbon {
            position: absolute; top: 12px; right: -30px;
            background: #dc2626; color: white;
            font-size: 9px; font-weight: 900; text-transform: uppercase;
            padding: 3px 30px; transform: rotate(45deg);
            box-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 10; pointer-events: none; letter-spacing: 1px;
        }

        .final-event-ribbon {
            position: absolute; top: 15px; left: -35px;
            background: #2563eb; color: white;
            font-size: 10px; font-weight: 900; text-transform: uppercase;
            padding: 4px 40px; transform: rotate(-45deg);
            box-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 10; pointer-events: none; letter-spacing: 1px;
        }
        .popup-final-ribbon {
            position: absolute; top: 12px; left: -30px;
            background: #2563eb; color: white;
            font-size: 9px; font-weight: 900; text-transform: uppercase;
            padding: 3px 30px; transform: rotate(-45deg);
            box-shadow: 0 2px 4px rgba(0,0,0,0.5); z-index: 10; pointer-events: none; letter-spacing: 1px;
        }

        /* GREEN PULSE */
        .pulse-marker { display: flex; justify-content: center; align-items: center; }
        .presenter-squirrel-icon,
        .presenter-trigger-icon {
            align-items: center;
            background: transparent;
            border: 0;
            display: flex;
            justify-content: center;
        }
        .presenter-squirrel,
        .presenter-trigger-squirrel {
            align-items: center;
            cursor: pointer;
            display: flex;
            justify-content: center;
            line-height: 1;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        .presenter-squirrel {
            background: rgba(17, 24, 39, 0.92);
            border: 2px solid #f59e0b;
            border-radius: 50%;
            box-shadow: 0 0 14px rgba(245, 158, 11, 0.8);
            font-size: 25px;
            height: 38px;
            width: 38px;
        }
        .presenter-trigger-squirrel {
            font-size: 28px;
            height: 44px;
            opacity: 0.82;
            text-shadow: 0 0 8px #fff, 0 0 15px rgba(34, 211, 238, 0.9);
            width: 44px;
        }
        .presenter-trigger-squirrel:active { transform: scale(0.9); }
        #map[data-easter-egg-mode='squirrel'] .leaflet-tile-pane {
            filter: sepia(88%) saturate(115%) hue-rotate(345deg) brightness(82%) contrast(112%) !important;
            transition: filter 0.8s ease !important;
        }
        #map[data-easter-egg-mode='catgirl'] .leaflet-tile-pane {
            filter: sepia(100%) hue-rotate(250deg) brightness(90%) contrast(120%) !important;
            transition: filter 2s ease !important;
        }
        @media (prefers-reduced-motion: reduce) {
            #map[data-easter-egg-mode] .leaflet-tile-pane { transition: none !important; }
        }
        .pulse-ring { border: 3px solid #4ade80; background-color: #22c55e; border-radius: 50%; height: 18px; width: 18px; position: absolute; animation: pulsate 2s ease-out infinite; opacity: 1; box-shadow: 0 0 10px #22c55e; z-index: 1000; }
        @keyframes pulsate { 0% { transform: scale(0.1, 0.1); opacity: 0.0; } 50% { opacity: 1.0; } 100% { transform: scale(3.5, 3.5); opacity: 0.0; } }
        .pulse-core { width: 14px; height: 14px; background-color: #ffffff; border-radius: 50%; z-index: 1001; border: 2px solid #16a34a; }
        @keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
        .animate-pulse-green { animation: pulse-green 2s infinite; }

        /* GOLD PULSE */
        .pulse-ring-gold { border: 3px solid #fbbf24; background-color: #f59e0b; border-radius: 50%; height: 26px; width: 26px; position: absolute; animation: pulsate-gold 1.5s ease-out infinite; opacity: 1; box-shadow: 0 0 20px #f59e0b; z-index: 1010; }
        @keyframes pulsate-gold { 0% { transform: scale(0.1, 0.1); opacity: 0.0; } 50% { opacity: 1.0; } 100% { transform: scale(3.5, 3.5); opacity: 0.0; } }
        .pulse-core-gold { width: 14px; height: 14px; background-color: #fef08a; border-radius: 50%; z-index: 1011; border: 2px solid #b45309; box-shadow: 0 0 8px #f59e0b; }
        @keyframes pulse-gold { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
        .animate-pulse-gold { animation: pulse-gold 2.5s infinite; }

        /* BLUE PULSE (Final Events) */
        @keyframes pulse-blue { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }
        .animate-pulse-blue { animation: pulse-blue 2.5s infinite; border-color: #3b82f6 !important; }

        /* BLUE MAP MARKER PULSE - Size: 14px ring, 10px core */
        .pulse-ring-blue { border: 2px solid #60a5fa; background-color: #3b82f6; border-radius: 50%; height: 14px; width: 14px; position: absolute; animation: pulsate-blue 1.5s ease-out infinite; opacity: 1; box-shadow: 0 0 10px #3b82f6; z-index: 1020; }
        @keyframes pulsate-blue { 0% { transform: scale(0.1, 0.1); opacity: 0.0; } 50% { opacity: 1.0; } 100% { transform: scale(3.5, 3.5); opacity: 0.0; } }
        .pulse-core-blue { width: 10px; height: 10px; background-color: #dbeafe; border-radius: 50%; z-index: 1021; border: 2px solid #1d4ed8; box-shadow: 0 0 6px #3b82f6; }

        /* VIRTUAL LIVE PULSE */
        @keyframes pulseVirtual {
            0% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.4); border-color: rgba(6, 182, 212, 0.5); }
            50% { box-shadow: 0 0 20px rgba(6, 182, 212, 1); border-color: rgba(6, 182, 212, 1); }
            100% { box-shadow: 0 0 5px rgba(6, 182, 212, 0.4); border-color: rgba(6, 182, 212, 0.5); }
        }
        .virtual-live-pulse {
            animation: pulseVirtual 2s infinite;
            border-color: #22d3ee !important;
        }

        .custom-scrollbar::-webkit-scrollbar { width: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: #333; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

        .contest-flow-arrow { background: transparent; border: 0; pointer-events: none; }
        .contest-flow-arrow svg {
            display: block; width: 42px; height: 24px; overflow: visible;
            filter: drop-shadow(0 0 2px #111827) drop-shadow(0 0 5px #111827);
            transform-origin: center center;
        }

        #mapControlDock {
            top: 90px;
            left: 16px;
            z-index: 4000;
            width: 16rem;
            max-width: calc(100vw - 32px);
        }
        #mapControlDock > [data-local-mode-control] { pointer-events: auto; }

        @media (max-width: 640px) {
            #mapControlDock {
                align-items: flex-start;
                flex-direction: row;
                gap: 0.5rem;
                left: auto;
                max-width: calc(100vw - 76px);
                right: 12px;
                top: 12px;
                width: auto;
            }

            #mapControlDock > #contestFlowUI,
            #mapControlDock > #categoryFilterUI,
            #mapControlDock > [data-local-mode-control] {
                flex: 0 0 48px;
                width: 48px;
            }
            #mapControlDock > [data-local-mode-control] { position: relative; }
            #mapControlDock > [data-local-mode-control] > summary { height: 48px; justify-content: center; overflow: visible; padding: 0; position: relative; width: 48px; }
            #mapControlDock > [data-local-mode-control] > summary > span:first-child { font-size: 0; }
            #mapControlDock > [data-local-mode-control] > summary > span:first-child::before { content: '📍'; font-size: 20px; }
            #mapControlDock > [data-local-mode-control] > summary > span:last-child { font-size: 8px; padding: 3px 4px; position: absolute; right: -6px; top: -6px; }
            #mapControlDock > [data-local-mode-control] > form {
                background: #111827;
                border: 1px solid #4b5563;
                border-radius: 0.75rem;
                box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
                left: 50%;
                max-height: calc(100dvh - var(--local-mode-panel-top, 8rem) - 12px);
                overflow-y: auto;
                overscroll-behavior: contain;
                position: fixed;
                right: auto;
                top: var(--local-mode-panel-top, 8rem);
                transform: translateX(-50%);
                width: min(18rem, calc(100vw - 24px));
                z-index: 10020;
            }

            #mapControlDock .map-control-button {
                align-items: center;
                border-radius: 0.75rem;
                display: flex;
                height: 48px;
                justify-content: center;
                padding: 0;
                position: relative;
                width: 48px;
            }

            #mapControlDock .map-control-button > div {
                gap: 0;
            }

            #mapControlDock .map-control-label {
                clip: rect(0, 0, 0, 0);
                clip-path: inset(50%);
                height: 1px;
                overflow: hidden;
                position: absolute;
                white-space: nowrap;
                width: 1px;
            }

            #mapControlDock #virtualEventsBadge,
            #mapControlDock #contestFlowBadge,
            #mapControlDock #activeFilterBadge {
                font-size: 9px;
                line-height: 1;
                margin: 0;
                min-width: 20px;
                padding: 4px 5px;
                position: absolute;
                right: -6px;
                text-align: center;
                top: -6px;
                z-index: 2;
            }

            #mapControlDock #contestFlowIcon,
            #mapControlDock #filterIcon {
                display: none;
            }

            #mapControlDock #contestFlowMenu,
            #mapControlDock #filterMenu {
                margin-top: 0;
                position: absolute;
                top: calc(100% + 0.5rem);
                width: min(20rem, calc(100vw - 24px));
            }

            #mapControlDock #contestFlowMenu {
                right: -56px;
            }

            #mapControlDock #filterMenu {
                right: 0;
            }

            #mapControlDock .map-test-controls {
                position: absolute;
                right: 0;
                top: 56px;
                width: min(16rem, calc(100vw - 24px));
            }

            #virtualModal,
            #descModal {
                align-items: flex-start;
                padding-top: calc(4.5rem + env(safe-area-inset-top));
            }
        }

        #geolocate-btn { position: absolute; bottom: 30px; right: 30px; z-index: 999; background: #1f2937; border: 2px solid #374151; color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.5); transition: all 0.3s; }
        #geolocate-btn:hover { background: #374151; transform: scale(1.1); border-color: #6366f1; }
        #geolocate-btn.loading svg { animation: spin 1s linear infinite; }
        @keyframes spin { 100% { transform: rotate(360deg); } }
