.map-embed { position: relative; width: 100%; height: 70vh; min-height: 500px; overflow: hidden; border-radius: 8px; border: 1px solid var(--border); }
    :root {
      --bg: #0b0d10;
      --panel: #14171c;
      --panel-2: #191d24;
      --panel-3: #20252e;
      --border: #232934;
      --border-2: #2f3742;
      --text: #e7e9ee;
      --text-dim: #9aa3ae;
      --text-faint: #6b7480;
      --accent: #d4af37;
      --accent-bright: #e8c96a;
      --accent-dim: rgba(212, 175, 55, 0.14);
      --danger: #e5484d;
      --radius: 6px;
      --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      --mono: "Cascadia Mono", "Consolas", "SF Mono", monospace;
      --sidebar-width: 350px;
    }
    body.light-theme {
      --bg: #f0f2f5;
      --panel: #ffffff;
      --panel-2: #f5f6f8;
      --panel-3: #ebedf0;
      --border: #d1d5db;
      --border-2: #bcc2ca;
      --text: #1a1d21;
      --text-dim: #4b5563;
      --text-faint: #6b7280;
      --accent: #b8941f;
      --accent-bright: #9a7d18;
      --accent-dim: rgba(184, 148, 31, 0.12);
      --danger: #dc2626;
    }

    #map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; background: var(--bg); }

    /* ---- Map controls (top-left) ---- */
    .map-controls { position: absolute; top: 16px; left: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
    .map-btn {
      width: 38px; height: 38px;
      display: flex; align-items: center; justify-content: center;
      background: rgba(20, 23, 29, 0.82);
      border: 1px solid var(--border-2);
      border-radius: var(--radius);
      color: var(--text-dim);
      cursor: pointer;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      transition: color .15s ease, border-color .15s ease, background .15s ease;
    }
    .map-btn svg { width: 17px; height: 17px; }
    .map-btn:hover { color: var(--text); border-color: var(--accent); }
    .map-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

    /* ---- Map switcher (top-center) ---- */
    .map-switcher {
      position: absolute; top: 16px; left: 120px; z-index: 1000;
      display: flex; gap: 0;
      background: rgba(20, 23, 29, 0.82);
      border: 1px solid var(--border-2);
      border-radius: var(--radius);
      overflow: hidden;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .map-switcher-btn {
      padding: 8px 16px;
      background: transparent;
      border: none;
      color: var(--text-dim);
      font-size: 12px;
      font-weight: 500;
      font-family: var(--font);
      cursor: pointer;
      transition: background .15s ease, color .15s ease;
      white-space: nowrap;
    }
    .map-switcher-btn:hover { color: var(--text); background: var(--panel-3); }
    .map-switcher-btn.active { color: var(--accent); background: var(--accent-dim); }

    /* ---- Layer control (top-right, draggable) ---- */
    .layer-control {
      position: absolute; top: 16px; left: 120px; z-index: 1000;
      background: rgba(20, 23, 29, 0.82);
      border: 1px solid var(--border-2);
      border-radius: var(--radius);
      padding: 12px;
      min-width: 172px;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      cursor: grab;
      user-select: none;
    }
    .layer-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 8px; }
    .layer-group { display: flex; flex-direction: column; gap: 2px; }
    .layer-opt {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 8px; border-radius: 4px;
      cursor: pointer; color: var(--text-dim); font-size: 13px;
      transition: background .15s ease, color .15s ease;
    }
    .layer-opt:hover { background: var(--panel-3); color: var(--text); }
    .layer-opt.checked { background: var(--panel-3); color: var(--text); }
    .layer-opt input { accent-color: var(--accent); width: 14px; height: 14px; }
    .layer-divider { height: 1px; background: var(--border); margin: 8px 0; }

    /* ---- Draw control (bottom-left) ---- */
    .draw-control {
      position: absolute; left: 16px; bottom: 20px; z-index: 1000;
      background: rgba(20, 23, 29, 0.9);
      border: 1px solid var(--border-2);
      border-radius: var(--radius);
      padding: 10px;
      display: flex; flex-direction: column; gap: 8px;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .draw-row { display: flex; align-items: center; gap: 6px; }
    .draw-btn {
      width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
      background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px;
      color: var(--text-dim); cursor: pointer;
      transition: color .15s ease, border-color .15s ease, background .15s ease;
    }
    .draw-btn svg { width: 16px; height: 16px; }
    .draw-btn:hover { color: var(--text); border-color: var(--accent); }
    .draw-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
    .color-swatch {
      width: 22px; height: 22px; border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.18); cursor: pointer; flex-shrink: 0;
      transition: transform .1s ease;
    }
    .color-swatch:hover { transform: scale(1.15); }
    .color-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
    .draw-size { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); width: 30px; }
    .draw-range { width: 110px; accent-color: var(--accent); cursor: pointer; }

    /* ---- Sidebar ---- */
    .sidebar {
      position: absolute; top: 0; right: 0; bottom: 0; width: 350px;
      background: var(--panel);
      border-left: 1px solid var(--border);
      padding: 20px;
      overflow-y: auto;
      z-index: 1000;
    }
    .sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
    .brand-title { font-size: 21px; font-weight: 700; letter-spacing: 0.03em; line-height: 1; }
    .brand-title span { color: var(--accent); }
    .brand-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-faint); margin-top: 5px; }
    .brand-logo { width: 60px; height: 60px; object-fit: contain; border-radius: 50%; flex-shrink: 0; }
    .stats { display: flex; gap: 22px; }
    .stat { display: flex; flex-direction: column; align-items: flex-end; }
    .stat-value { font-size: 17px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
    .stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin-top: 5px; }

    /* ---- Tabs ---- */
    .tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
    .tab {
      padding: 8px 0 10px; background: none; border: none;
      color: var(--text-faint); font-size: 13px; font-weight: 500; font-family: var(--font);
      cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
      transition: color .15s ease, border-color .15s ease;
    }
    .tab:hover { color: var(--text-dim); }
    .tab.active { color: var(--text); border-bottom-color: var(--accent); }

    /* ---- Panels ---- */
    .panel { display: none; }
    .panel.active { display: block; }
    .form-title { font-size: 13px; font-weight: 600; margin-bottom: 14px; }

    /* Search */
    .search-wrap { position: relative; margin-bottom: 12px; }
    .search-icon {
      position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
      width: 14px; height: 14px; color: var(--text-faint); pointer-events: none;
    }
    .search-box {
      width: 100%; padding: 9px 12px 9px 33px;
      background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
      color: var(--text); font-size: 13px; font-family: var(--font);
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    .search-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

    .category-filter {
      width: 100%; padding: 8px 12px; margin-bottom: 12px;
      background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
      color: var(--text); font-size: 13px; font-family: var(--font);
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    .category-filter:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

    /* Coordinate readout */
    .coord-display {
      display: flex; justify-content: space-between; gap: 10px;
      padding: 8px 10px; margin-bottom: 12px;
      background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
      font-family: var(--mono); font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums;
    }
    .coord-display b { color: var(--text); font-weight: 500; }

    /* Blip list */
    .blip-list { max-height: calc(100vh - 265px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
    .blip-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 10px;
      background: var(--panel-2); border: 1px solid var(--border);
      border-left: 2px solid transparent; border-radius: var(--radius);
      cursor: pointer;
      transition: background .15s ease, border-color .15s ease;
    }
    .blip-item:hover { background: var(--panel-3); }
    .blip-item.selected { border-left-color: var(--accent); background: var(--panel-3); }
    .blip-icon { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .blip-info { flex: 1; min-width: 0; }
    .blip-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .blip-category { font-size: 11px; color: var(--text-faint); text-transform: capitalize; margin-top: 1px; }
    .blip-desc { font-size: 12px; color: var(--text-faint); margin-top: 3px; white-space: pre-line; line-height: 1.4; }
    .blip-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s ease; }
    .blip-item:hover .blip-actions, .blip-item:focus-within .blip-actions { opacity: 1; }

    /* ---- Detailed blip notes / meta ---- */
    .blip-popup { min-width: 200px; max-width: 320px; }
    .blip-popup .popup-title { font-weight: 700; font-size: 14px; color: #e6edf3; margin-bottom: 2px; }
    .blip-popup .popup-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
    .blip-popup .popup-desc { font-size: 12px; color: #9aa3ae; margin: 6px 0; line-height: 1.4; }
    .blip-popup .popup-coords { font-size: 11px; color: #6b7480; margin-top: 8px; border-top: 1px solid #21262d; padding-top: 6px; }
    .blip-popup .popup-notes { font-size: 12.5px; line-height: 1.5; color: #c9d1d9; margin-top: 6px; }
    .blip-popup .notes-h { font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent, #d4af37); margin: 8px 0 4px; }
    .blip-popup .notes-p { margin: 3px 0; }
    .blip-popup .notes-list { margin: 4px 0 4px 1.1em; padding: 0; }
    .blip-popup .notes-list li { margin: 2px 0; }
    .blip-popup .notes-gap { height: 4px; }
    .blip-popup code { background: #161b22; border: 1px solid #30363d; border-radius: 3px; padding: 0 4px; font-size: 11px; color: #e6edf3; }
    .blip-popup strong { color: #f0f3f6; }
    .meta-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
    .meta-chip {
      font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
      padding: 2px 7px; border-radius: 999px;
      background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.35); color: var(--accent, #d4af37);
    }
    .meta-chip.meta-easy { background: rgba(55, 214, 122, 0.12); border-color: rgba(55, 214, 122, 0.4); color: #37d67a; }
    .meta-chip.meta-med { background: rgba(255, 159, 67, 0.12); border-color: rgba(255, 159, 67, 0.4); color: #ff9f43; }
    .meta-chip.meta-hard { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.4); color: #f0767a; }
    .meta-chip.meta-pay { background: rgba(55, 214, 122, 0.1); border-color: rgba(55, 214, 122, 0.3); color: #7dffa8; }
    .meta-chip.meta-req { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); color: #7db8ff; }
    .blip-item .meta-chips { margin-top: 3px; }
    .blip-item .meta-chip { font-size: 9px; padding: 1px 5px; }

    .btn-icon {
      width: 26px; height: 26px;
      display: flex; align-items: center; justify-content: center;
      border: none; background: transparent; color: var(--text-faint);
      border-radius: 4px; cursor: pointer;
      transition: color .15s ease, background .15s ease;
    }
    .btn-icon svg { width: 14px; height: 14px; }
    .btn-icon:hover { color: var(--text); background: var(--panel-3); }
    .btn-icon.delete:hover { color: var(--danger); background: rgba(229, 72, 77, 0.14); }

    .empty-state { text-align: center; color: var(--text-faint); font-size: 13px; padding: 28px 0; }

    /* Forms */
    .form-group { margin-bottom: 12px; }
    .form-group label { display: block; margin-bottom: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
    .form-group input, .form-group select, .form-group textarea {
      width: 100%; padding: 9px 12px;
      background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
      color: var(--text); font-size: 13px; font-family: var(--font);
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
      outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim);
    }
    .form-row { display: flex; gap: 10px; }
    .form-row .form-group { flex: 1; }
    input[type="file"] { padding: 7px; color: var(--text-dim); }
    input[type="file"]::file-selector-button {
      background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 4px;
      color: var(--text); padding: 5px 10px; margin-right: 10px; cursor: pointer; font-family: var(--font); font-size: 12px;
    }
    input[type="color"] { padding: 4px; height: 40px; cursor: pointer; }

    /* Buttons */
    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%; padding: 10px 14px;
      border-radius: var(--radius); border: 1px solid transparent;
      font-size: 13px; font-weight: 500; font-family: var(--font);
      cursor: pointer;
      transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
    }
    .btn svg { width: 15px; height: 15px; }
    .btn-primary { background: var(--accent); color: #101418; }
    .btn-primary:hover { background: var(--accent-bright); }
    .btn-secondary { background: transparent; border-color: var(--border-2); color: var(--text); }
    .btn-secondary:hover { border-color: var(--text-faint); }
    .btn-danger { background: rgba(229, 72, 77, 0.1); border-color: rgba(229, 72, 77, 0.35); color: #f0767a; }
    .btn-danger:hover { background: rgba(229, 72, 77, 0.2); }
    .btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .btn-row { display: flex; gap: 10px; }
    .btn-row .btn { flex: 1; }

    /* ---- Leaflet popups + quick-add form ---- */
    .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0d1117; color: #e6edf3; border: 1px solid #30363d; }
    .leaflet-popup-content-wrapper { box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
    .leaflet-popup-content { margin: 12px 14px; line-height: 1.4; max-height: 62vh; overflow-y: auto; }
/* Belt and braces: overlay images must never participate in text flow */
.leaflet-overlay-pane img.leaflet-image-layer { position: absolute; left: 0; top: 0; }
    .leaflet-container a.leaflet-popup-close-button { color: #8a93a0; }
    .quick-form { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
    .quick-form-title { font-weight: 600; font-size: 12px; color: var(--text-faint); letter-spacing: 0.03em; }
    .quick-form input, .quick-form textarea, .quick-form select {
      width: 100%; box-sizing: border-box;
      background: #161b22; color: #e6edf3;
      border: 1px solid #30363d; border-radius: 6px;
      padding: 7px 9px; font-size: 13px; font-family: var(--font);
    }
    .quick-form input:focus, .quick-form textarea:focus, .quick-form select:focus { outline: none; border-color: var(--accent); }
    .quick-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; }
    .quick-actions .btn { padding: 7px 12px; font-size: 12px; }
    .quick-form label { display: block; margin-bottom: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
    input[type="range"] { padding: 0 !important; border: none !important; background: transparent !important; }
    .icon-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
    .icon-opt {
      display: flex; align-items: center; justify-content: center;
      height: 30px; background: #e6edf3; color: #0b0d10;
      border: 1px solid var(--border-2); border-radius: 6px;
      cursor: pointer; padding: 0;
    }
    .icon-opt:hover { border-color: var(--text); }
    .icon-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
    .icon-opt svg { width: 16px; height: 16px; }

    /* Inline "new category" */
    .cat-field { display: flex; gap: 6px; align-items: center; }
    .cat-field select { flex: 1; min-width: 0; width: auto; }
    .btn-new-cat {
      flex-shrink: 0; padding: 7px 10px; font-size: 12px; font-weight: 500;
      background: var(--accent-dim); color: var(--accent);
      border: 1px solid var(--accent); border-radius: 6px; cursor: pointer;
      transition: background .15s ease, color .15s ease;
    }
    .btn-new-cat:hover { background: var(--accent); color: #0b0d10; }
    .new-cat-form {
      display: none; flex-direction: column; gap: 6px;
      padding: 8px; background: var(--panel-3); border: 1px solid var(--border); border-radius: 8px;
    }
    .new-cat-row { display: flex; gap: 6px; align-items: center; }
    .new-cat-row input[type="text"] { flex: 1; min-width: 0; width: auto; }
    .new-cat-row input[type="color"] { width: 42px; height: 32px; padding: 2px; border: 1px solid var(--border-2); border-radius: 6px; background: none; cursor: pointer; flex-shrink: 0; }
    .new-cat-row select { flex: 1; min-width: 0; width: auto; }
    .new-cat-actions { display: flex; gap: 6px; justify-content: flex-end; }
    .new-cat-actions .btn { padding: 5px 10px; font-size: 12px; }
    .form-group .cat-field select, .form-group .new-cat-row input, .form-group .new-cat-row select {
      width: auto;
    }

    /* Categories */
    .category-list { display: flex; flex-direction: column; gap: 6px; }
    .category-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 10px;
      background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
    }
    .category-color { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
    .category-name { flex: 1; font-size: 13px; }
    .category-icon { width: 16px; height: 16px; display: flex; color: var(--text-dim); }
    .category-icon svg { width: 16px; height: 16px; }

    hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
    .import-export { display: flex; flex-direction: column; gap: 10px; }

    /* Leaflet theming */
    .leaflet-container { background: var(--bg); font-family: var(--font); }
    .leaflet-popup-content-wrapper {
      background: var(--panel-2); color: var(--text);
      border: 1px solid var(--border-2); border-radius: 8px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    }
    .leaflet-popup-content { margin: 12px 16px; line-height: 1.5; font-size: 13px; }
    .leaflet-popup-tip { background: var(--panel-2); }
    .leaflet-popup-close-button { color: var(--text-faint); }
    .leaflet-popup-close-button:hover { color: var(--text); }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: #3a4452; }

    @media (max-width: 820px) {
      .sidebar { width: 100%; }
      .layer-control { right: 16px; top: 64px; }
    }

    /* ---- Map transition animation ---- */
    .map-fade-active #map { opacity: 0; transition: opacity 0.3s ease; }
    .map-fade-active #map.map-visible { opacity: 1; }

    /* ---- Sidebar collapse ---- */
    .sidebar.collapsed { width: 0; padding: 0; overflow: hidden; border-left: none; }
    .sidebar-toggle {
      position: absolute; top: 50%; right: 350px; transform: translateY(-50%);
      z-index: 1001; width: 24px; height: 48px;
      background: rgba(20, 23, 29, 0.82); border: 1px solid var(--border-2);
      border-right: none; border-radius: var(--radius) 0 0 var(--radius);
      color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center;
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      transition: right 0.3s ease, background .15s ease;
    }
    .sidebar-toggle:hover { background: var(--panel-3); color: var(--text); }
    .sidebar-toggle svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
    .sidebar.collapsed ~ .sidebar-toggle { right: 0; }
    .sidebar.collapsed ~ .sidebar-toggle svg { transform: rotate(180deg); }
    .sidebar.collapsed ~ .theme-toggle { right: 16px !important; }
    .sidebar-transition { transition: width 0.3s ease, padding 0.3s ease; }

    /* ---- Theme toggle ---- */
    .theme-toggle {
      position: absolute; top: 16px; right: 16px; z-index: 1000;
      width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
      background: rgba(20, 23, 29, 0.82); border: 1px solid var(--border-2);
      border-radius: var(--radius); color: var(--text-dim); cursor: pointer;
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      transition: color .15s ease, border-color .15s ease, background .15s ease;
    }
    .theme-toggle svg { width: 17px; height: 17px; }
    .theme-toggle:hover { color: var(--text); border-color: var(--accent); }
    body.light-theme .theme-toggle { background: rgba(255,255,255,0.82); }
    body.light-theme .map-btn, body.light-theme .layer-control,
    body.light-theme .map-switcher { background: rgba(255,255,255,0.82); }

    /* ---- Undo / Export buttons ---- */
    .draw-extra { display: flex; gap: 4px; }

    /* ---- Blip highlight pulse ---- */
    @keyframes blip-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6); }
      50% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
    }
    .blip-highlight .blip-icon { animation: blip-pulse 1s ease 3; }

    /* ---- Mobile responsive ---- */
    @media (max-width: 768px) {
      .sidebar { width: 100%; position: fixed; z-index: 2000; }
      .sidebar.collapsed { width: 0; }
      .sidebar-toggle { display: none; }
      .theme-toggle { right: 16px; top: 16px; }
      .layer-control { left: 60px; top: 64px; min-width: 140px; }
      .map-switcher { left: 60px !important; }
      .draw-control { left: 8px; bottom: 10px; padding: 8px; }
      .draw-range { width: 80px; }
      .blip-list { max-height: calc(100vh - 200px); }
      .brand-logo { width: 44px; height: 44px; }
      .brand-title { font-size: 17px; }
      .sidebar { padding: 14px; }
    }
    @media (max-width: 480px) {
      .map-switcher { left: 10px !important; top: 56px; }
      .layer-control { left: 10px; top: 100px; }
      .theme-toggle { right: 8px; top: 56px; }
      .map-controls { top: 10px; left: 10px; }
      .draw-control { left: 4px; bottom: 6px; padding: 6px; }
    }
