
        :root {
            --primary: #2196F3;
            --primary-dark: #1976D2;
            --danger: #f44336;
            --success: #4caf50;
            --warning: #ff9800;
            --bg: #f5f7fa;
            --card-bg: #ffffff;
            --text: #333333;
            --border: #e0e0e0;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
            background: var(--bg);
            color: var(--text);
            overflow: hidden;
        }
        .app {
            display: flex;
            height: 100vh;
            height: 100dvh;
            overflow: hidden;
        }
        .sidebar {
            width: 400px;
            min-width: 320px;
            max-width: 45vw;
            background: var(--card-bg);
            border-right: 1px solid var(--border);
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
        }
        .sidebar header { margin-bottom: 16px; }
        .sidebar h1 { font-size: 20px; margin: 0; color: var(--primary-dark); }
        .sidebar h2 { font-size: 14px; margin: 4px 0 0; color: #666; font-weight: normal; }
        .panel {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 14px;
            margin-bottom: 14px;
        }
        .panel-title {
            font-size: 15px;
            font-weight: 600;
            margin: 0 0 10px;
            display: flex;
            align-items: center;
        }
        .panel-title::before {
            content: '';
            display: inline-block;
            width: 4px;
            height: 14px;
            background: var(--primary);
            margin-right: 8px;
            border-radius: 2px;
        }
        .drop-zone {
            border: 2px dashed #bdbdbd;
            border-radius: 6px;
            padding: 18px;
            text-align: center;
            color: #666;
            cursor: pointer;
            transition: 0.2s;
            background: #fafafa;
            font-size: 14px;
        }
        .drop-zone:hover, .drop-zone.dragover {
            border-color: var(--primary);
            background: #e3f2fd;
        }
        .form-group { margin-bottom: 10px; }
        .form-group label {
            display: block;
            font-size: 13px;
            margin-bottom: 4px;
            color: #555;
        }
        input[type="text"], input[type="number"], input[type="color"], input[type="file"], select, textarea {
            width: 100%;
            padding: 7px 8px;
            border: 1px solid var(--border);
            border-radius: 4px;
            font-size: 13px;
            font-family: inherit;
        }
        input[type="range"] { width: 100%; }
        input[type="checkbox"] { width: auto; margin-right: 6px; vertical-align: middle; }
        .btn {
            display: inline-block;
            padding: 7px 12px;
            border: none;
            border-radius: 4px;
            background: var(--primary);
            color: #fff;
            font-size: 13px;
            cursor: pointer;
            transition: 0.2s;
            font-family: inherit;
        }
        .btn:hover { background: var(--primary-dark); }
        .btn-block { width: 100%; margin-top: 8px; }
        .btn-secondary { background: #9e9e9e; }
        .btn-secondary:hover { background: #757575; }
        .btn-success { background: var(--success); }
        .btn-success:hover { background: #388e3c; }
        .btn-warning { background: var(--warning); }
        .btn-warning:hover { background: #f57c00; }
        .btn-sm { padding: 5px 10px; font-size: 12px; }
        .row { display: flex; gap: 8px; }
        .row > * { flex: 1; }
        .crs-warning {
            background: #fff3e0;
            border: 1px solid #ffcc80;
            color: #e65100;
            padding: 8px;
            border-radius: 4px;
            font-size: 12px;
            margin-top: 8px;
            line-height: 1.4;
        }
        .crs-warning strong { display: block; margin-bottom: 4px; }
        .status {
            padding: 10px;
            border-radius: 4px;
            font-size: 13px;
            margin-top: 10px;
            display: none;
            line-height: 1.4;
        }
        .status.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
        .status.error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
        .status.info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
        #data-preview {
            max-height: 220px;
            overflow: auto;
            margin-top: 10px;
            font-size: 12px;
            border: 1px solid var(--border);
            border-radius: 4px;
            background: #fff;
        }
        #data-preview table { width: 100%; border-collapse: collapse; }
        #data-preview th, #data-preview td { border: 1px solid var(--border); padding: 4px 6px; text-align: left; }
        #data-preview th { background: #f5f5f5; position: sticky; top: 0; }
        .map-container { flex: 1; position: relative; min-width: 0; }
        #map { height: 100%; width: 100%; background: #eef2f5; }
        .map-controls {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 1000;
            display: flex;
            gap: 6px;
        }
        .map-controls .btn { padding: 6px 10px; font-weight: bold; }
        .custom-marker svg { display: block; }
        .marker-label {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            color: #333 !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            text-shadow: 0 0 2px #fff, 0 0 3px #fff;
        }
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }
        .modal.active { display: flex; }
        .modal-content {
            background: #fff;
            border-radius: 8px;
            max-width: 460px;
            width: 90%;
            padding: 20px;
            position: relative;
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        }
        .modal-close {
            position: absolute;
            top: 8px;
            right: 12px;
            font-size: 24px;
            cursor: pointer;
            color: #999;
        }
        .modal-close:hover { color: #333; }
        .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
        .hidden { display: none !important; }
        #file-input { display: none; }
        .manual-input textarea { min-height: 70px; resize: vertical; }
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(255,255,255,0.8);
            z-index: 3000;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .loading-overlay.active { display: flex; }
        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            width: 36px;
            height: 36px;
            animation: spin 1s linear infinite;
            margin-bottom: 10px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* ===== 侧边栏折叠 / 全屏 / 响应式 ===== */
        .sidebar { transition: width .26s ease, min-width .26s ease, transform .26s ease, padding .26s ease; }
        #btn-toggle-sidebar {
            position: fixed;
            top: 10px; left: 10px;
            z-index: 1400;
            width: 36px; height: 36px;
            border-radius: 6px;
            background: rgba(255,255,255,0.96);
            border: 1px solid var(--border);
            box-shadow: 0 1px 5px rgba(0,0,0,0.18);
            cursor: pointer;
            font-size: 18px; line-height: 1;
            color: var(--primary-dark);
            display: flex; align-items: center; justify-content: center;
            padding: 0;
            transition: background .2s;
        }
        #btn-toggle-sidebar:hover { background: #e3f2fd; }
        .sidebar header { position: relative; padding-left: 48px; }
        .lang-bar { margin-top: 10px; }
        .lang-bar label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
        .lang-bar select { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; color: var(--text); }
        .export-sep { height: 1px; background: var(--border); margin: 12px 0; }
        .btn-primary { background: var(--primary); color: #fff; border: 1px solid var(--primary-dark); }
        .btn-primary:hover { background: var(--primary-dark); }
        .btn-close-sidebar {
            display: none;
            position: absolute;
            top: 0; right: 0;
            width: 32px; height: 32px;
            border: none; border-radius: 6px;
            background: transparent;
            color: #666;
            font-size: 22px; line-height: 1;
            cursor: pointer;
            align-items: center; justify-content: center;
            padding: 0;
        }
        .btn-close-sidebar:hover { background: #f0f0f0; color: #333; }
        .sidebar-backdrop { display: none; }
        .map-container:fullscreen { background: #eef2f5; }
        .map-container:-webkit-full-screen { background: #eef2f5; }
        /* 桌面折叠态：侧边栏收起为 0 宽度，地图占满 */
        .app.sidebar-collapsed .sidebar {
            width: 0 !important;
            min-width: 0 !important;
            max-width: 0 !important;
            padding-left: 0; padding-right: 0;
            border-right: none;
            overflow: hidden;
        }

        @media (max-width: 1024px) and (min-width: 769px) {
            .sidebar { width: 340px; min-width: 300px; max-width: 42vw; }
        }

        @media (max-width: 768px) {
            .app { flex-direction: row; }
            .sidebar {
                position: absolute;
                top: 0; left: 0; bottom: 0;
                width: 80%;
                max-width: 320px;
                z-index: 1200;
                box-shadow: 2px 0 14px rgba(0,0,0,0.18);
                transform: translateX(0);
                border-right: 1px solid var(--border);
            }
            .app.sidebar-collapsed .sidebar { transform: translateX(-100%); width: 80%; min-width: 0; }
            .app:not(.sidebar-collapsed) .sidebar-backdrop {
                display: block;
                position: fixed; inset: 0;
                background: rgba(0,0,0,0.4);
                z-index: 1150;
            }
            .map-container { height: 100%; }
            .sidebar { font-size: 14px; }
            .sidebar header { padding-left: 56px; }
            .btn { padding: 9px 12px; }
            input[type="text"], input[type="number"], input[type="color"], select, textarea { font-size: 16px; }
            #btn-toggle-sidebar { width: 44px; height: 44px; font-size: 22px; }
            .btn-close-sidebar { display: flex; }
            .map-controls .btn { width: 40px; height: 40px; font-size: 18px; display: flex; align-items: center; justify-content: center; padding: 0; }
            #data-preview { max-height: 150px; }
        }

        @media (max-width: 420px) {
            .sidebar { width: 100%; max-width: 100%; }
        }
    