html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            font-family: 'Lato', 'Noto Sans JP', sans-serif;
                        background-color: #fce4ec; /* Fallback */
            touch-action: none; /* Prevent browser default pinch zoom */
        }

        #map-container {
            width: 100vw;
            height: 100dvh;
            position: relative;
        }

        /* The Dreamy Fluid Background */
        #background-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }

        /* The SVG Island Overlay */
        svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
                        /* Allow clicks to pass through empty sky/ocean to the canvas if needed */
            pointer-events: auto; /* Catch pan/zoom events */
            cursor: grab;
        }
        svg:active {
            cursor: grabbing;
        }

        /* --- INTERACTIVE REGION STYLES --- */
        .region {
            pointer-events: auto; /* Re-enable pointer events for the island parts */
            cursor: pointer;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
            transform-origin: center center;
            transform-box: fill-box;
        }

        .region:hover {
            transform: scale(1.02);
            filter: brightness(1.08) drop-shadow(0 15px 25px rgba(100, 50, 150, 0.15));
        }

        /* --- DYNAMIC ANIMATIONS --- */
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-12px); }
            100% { transform: translateY(0px); }
        }
        .mendako-float {
            animation: float 5s ease-in-out infinite;
        }

        @keyframes sway {
            0%, 100% { transform: rotate(-2deg); }
            50% { transform: rotate(2deg); }
        }
        .sway-base {
            transform-origin: center bottom;
            transform-box: fill-box;
            animation: sway 5s ease-in-out infinite;
        }
        .sway-base-fast {
            transform-origin: center bottom;
            transform-box: fill-box;
            animation: sway 2.5s ease-in-out infinite;
        }

        @keyframes breathe {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.03); }
        }
        .breathe-center {
            transform-origin: center center;
            transform-box: fill-box;
            animation: breathe 4s ease-in-out infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .spin-center {
            transform-origin: center center;
            transform-box: fill-box;
            animation: spin 15s linear infinite;
        }

        @keyframes pulse-opacity {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1.0; }
        }
        .pulse-light {
            animation: pulse-opacity 2s ease-in-out infinite;
        }

        /* --- SNOW ANIMATION --- */
        @keyframes snow-fall {
            0% { transform: translateY(-20px) translateX(0px); opacity: 0; }
            20% { opacity: 1; }
            80% { opacity: 1; }
            100% { transform: translateY(80px) translateX(15px); opacity: 0; }
        }
        .snow-flake {
            animation: snow-fall 4s linear infinite;
            fill: #ffffff;
        }
        .snow-fast { animation-duration: 3s; }
        .snow-slow { animation-duration: 5s; }
        .snow-d1 { animation-delay: 0.5s; }
        .snow-d2 { animation-delay: 1.5s; }
        .snow-d3 { animation-delay: 2.5s; }

        /* --- TOOLTIP --- */
        #tooltip {
            position: absolute;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            padding: 1.5rem;
            border-radius: 1rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            pointer-events: none;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.3s ease, transform 0.3s ease;
            max-width: 320px;
            z-index: 100;
        }

        #tooltip.visible {
            opacity: 1;
            transform: translateY(0);
        }

        #tooltip-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 0.5rem;
            font-family: 'Noto Sans JP', sans-serif;
        }

        #tooltip-desc {
            font-size: 0.9rem;
            line-height: 1.5;
            color: #4a5568;
            font-weight: 300;
        }

        .hud-overlay {
            position: absolute;
            top: 2rem;
            left: 2rem;
            pointer-events: none;
            z-index: 50;
        }

        /* --- DEBUG PANEL --- */
        #debug-wrapper {
            position: absolute;
            top: 0;
            right: 0;
            height: 100dvh;
            width: 360px;
            pointer-events: none;
            z-index: 90;
            display: flex;
            justify-content: flex-end;
            overflow: hidden;
        }

        #debug-column {
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border-left: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: -5px 0 25px rgba(0,0,0,0.05);
            padding: 2rem;
            overflow-y: auto;
            width: 100%;
            transform: translateX(100%);
            transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: auto;
        }

        #debug-wrapper.debug-visible #debug-column {
            transform: translateX(0);
        }

        #toggle-debug {
            position: fixed;
            top: 1.5rem;
            right: 1.5rem;
            z-index: 100;
            background: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            color: #4a5568;
            transition: all 0.3s ease;
            pointer-events: auto;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #toggle-debug:hover {
            background: rgba(255, 255, 255, 0.9);
            transform: scale(1.05);
        }
        #toggle-debug svg, #back-button svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        /* Sliders */
        input[type=range] { -webkit-appearance: none; background: transparent; }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; height: 16px; width: 16px;
            border-radius: 50%; background: #b388ff; cursor: pointer;
            margin-top: -6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        input[type=range]::-webkit-slider-runnable-track {
            width: 100%; height: 4px; cursor: pointer;
            background: rgba(0,0,0,0.1); border-radius: 2px;
        }

                @media (max-width: 768px) {
            #debug-wrapper { width: 85%; max-width: 320px; }
            /* Hide description on very small screens to save space */
            #tooltip-desc { font-size: 0.8rem; }
            .hud-overlay h1 { font-size: 1.5rem; }
            .hud-overlay { top: 1rem; left: 1rem; }
            #tooltip { max-width: 250px; }
        }
