        * { margin: 0; padding: 0; box-sizing: border-box; }
        .hidden { display: none !important; }

        /* ── Marker highlight ring ── */
        .marker-highlighted {
            --hl: 37,99,235;
            border-radius: 50%;
            box-shadow: 0 0 0 4px rgba(255,255,255,0.85), 0 0 0 8px rgba(var(--hl),0.55), 0 0 16px rgba(var(--hl),0.3);
        }
        html, body {
            width: 100%;
            height: 100%;
            overflow: hidden;
            overscroll-behavior: none;
        }
        body {
            position: fixed;
            inset: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        #map {
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100vh;
        }

        /* ── Loading overlay ── */
        #loading-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.6); z-index: 2000;
            display: flex; align-items: center; justify-content: center;
            flex-direction: column; color: #fff; font-size: 16px;
        }
        .spinner {
            width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3);
            border-top-color: #fff; border-radius: 50%;
            animation: spin 0.8s linear infinite; margin-bottom: 12px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* ── Layer control panel ── */
        .layer-control {
            background: rgba(255,255,255,0.95); border-radius: 10px;
            padding: 12px 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.25);
            font-size: 13px; min-width: 200px;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        }
        .layer-control h3 {
            margin: 0; font-size: 14px; color: #333;
            cursor: pointer; user-select: none;
            display: flex; align-items: center; justify-content: space-between;
        }
        .layer-control h3 .collapse-arrow {
            font-size: 10px; color: #888; transition: transform 0.2s;
        }
        .layer-control.collapsed h3 { margin-bottom: 0; border-bottom: none; }
        .layer-control.collapsed h3 .collapse-arrow { transform: rotate(-90deg); }
        .layer-control .layer-body {
            overflow: hidden; transition: max-height 0.3s ease, opacity 0.2s ease;
            max-height: 400px; opacity: 1;
            margin-top: 8px; border-top: 1px solid #ddd; padding-top: 6px;
        }
        .layer-control.collapsed .layer-body {
            max-height: 0; opacity: 0; margin-top: 0; border-top: none; padding-top: 0;
        }
        .layer-control label {
            display: flex; align-items: center; gap: 6px;
            padding: 4px 0; cursor: pointer; color: #444;
        }
        .layer-control input[type="checkbox"] {
            width: 16px; height: 16px; accent-color: #2563eb;
        }
        .layer-section {
            margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee;
        }
        .layer-section-title {
            font-size: 11px; font-weight: 600; color: #888;
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
        }
        .layer-dot {
            width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
            border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
        }

        /* ── Observation date filter ── */
        .obs-filter {
            margin: 4px 0 2px 22px;
        }
        .obs-filter.hidden { display: none; }
        .obs-filter-presets {
            display: flex; gap: 0; border-radius: 6px; overflow: hidden;
            border: 1px solid #ddd;
        }
        .obs-filter-btn {
            padding: 3px 9px; border: none; background: #f5f5f5;
            font-size: 11px; font-weight: 500; cursor: pointer; color: #555;
            border-right: 1px solid #ddd; transition: all 0.15s;
        }
        :root {
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --safe-left: env(safe-area-inset-left, 0px);
            --safe-right: env(safe-area-inset-right, 0px);
        }

        .obs-filter-btn:last-child { border-right: none; }
        .obs-filter-btn.active { background: #2563eb; color: #fff; }
        .obs-filter-btn:hover:not(.active) { background: #e8e8e8; }
        .obs-filter-custom {
            display: flex; align-items: center; gap: 4px;
            margin-top: 4px; font-size: 11px; color: #666;
        }
        .obs-filter-custom input[type="date"] {
            font-size: 11px; padding: 2px 4px; border: 1px solid #ccc;
            border-radius: 4px; color: #333; width: 110px;
        }

        /* ── Map type buttons ── */
        .map-type-control {
            position: absolute; top: 12px; left: 60px; z-index: 1000;
            display: flex; gap: 0; border-radius: 8px; overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        }
        .map-type-btn {
            padding: 8px 12px; border: none; background: rgba(255,255,255,0.92);
            font-size: 12px; font-weight: 500; cursor: pointer; color: #555;
            border-right: 1px solid #ddd; transition: all 0.15s;
            white-space: nowrap;
        }
        .map-type-btn:last-child { border-right: none; }
        .map-type-btn.active { background: #2563eb; color: #fff; }
        .map-type-btn:hover:not(.active) { background: #e8e8e8; }

        /* ── Search bar area ── */
        .search-area {
            position: absolute; top: 50px; left: 60px; z-index: 1000;
            display: flex; flex-direction: column; align-items: stretch; gap: 4px;
        }
        .search-main-row {
            display: flex; align-items: flex-start; gap: 4px;
        }
        .search-button-row {
            display: flex; gap: 4px;
        }
        .search-button-row-wide > * {
            flex: 1 1 0;
        }
        .station-search {
            position: relative;
            display: flex;
            align-items: center;
        }
        .search-main-row .station-search {
            flex: 1 1 auto;
            min-width: 0;
        }
        .station-search-field {
            position: relative;
            flex: 1 1 auto;
        }
        .station-search-field input {
            padding: 7px 28px 7px 30px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            font-size: 16px; color: #333; width: 270px; outline: none;
        }
        .search-main-row .add-forecast-btn {
            border-radius: 8px;
        }
        .search-main-row .station-search-field input {
            border-radius: 8px;
        }
        .station-search-field input:focus { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
        .station-search-field::before {
            content: '\1F50D'; position: absolute; left: 9px; top: 8px;
            font-size: 14px; pointer-events: none;
        }
        .search-clear {
            position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
            background: none; border: none; cursor: pointer; font-size: 14px;
            color: #999; padding: 2px 4px; line-height: 1; display: none;
        }
        .search-clear:hover { color: #333; }
        .add-forecast-btn {
            width: 34px; height: 34px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            font-size: 20px; color: #2563eb; cursor: pointer; display: flex;
            align-items: center; justify-content: center; line-height: 1;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            transition: background 0.15s;
        }
        .add-forecast-btn:hover { background: #fff; }
        .add-forecast-btn.active { background: #2563eb; color: #fff; }
        .station-search-toggle,
        .mobile-actions-toggle {
            width: 34px; height: 34px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            cursor: pointer; display: none; align-items: center; justify-content: center;
            line-height: 1; font-size: 16px; color: #334155; flex-shrink: 0;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            transition: background 0.15s, color 0.15s;
        }
        .station-search-toggle:hover,
        .mobile-actions-toggle:hover {
            background: #fff;
        }
        .station-search-toggle.active,
        .mobile-actions-toggle.active {
            background: #2563eb;
            color: #fff;
        }
        .mobile-actions {
            position: relative;
        }
        .mobile-actions-panel {
            display: flex;
        }
        .import-gpx-btn {
            min-width: 40px; height: 34px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            font-size: 12px; font-weight: 700; letter-spacing: 0.2px; color: #0f766e;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            padding: 0 10px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            transition: background 0.15s, color 0.15s;
            white-space: nowrap;
        }
        .import-gpx-btn:hover { background: #fff; }
        .import-gpx-btn.active {
            background: #0f766e;
            color: #fff;
        }
        .forecast-search-popover {
            position: absolute; top: 76px; left: 0; z-index: 1001;
            background: #fff; border-radius: 10px; padding: 10px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.25); width: 260px;
        }
        .forecast-search-popover.hidden { display: none; }
        .forecast-search-popover label {
            font-size: 11px; font-weight: 600; color: #555; margin-bottom: 6px; display: block;
        }
        .forecast-search-popover input {
            width: 100%; padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px;
            font-size: 16px; outline: none;
        }
        .forecast-search-popover input:focus { border-color: #2563eb; }
        .fc-search-close {
            background: none; border: none; cursor: pointer; font-size: 18px;
            color: #999; line-height: 1; padding: 0 2px;
        }
        .fc-search-close:hover { color: #333; }
        .search-suggestions {
            position: absolute; top: 100%; left: 0; min-width: 270px; width: max-content; max-width: 320px;
            background: #fff; border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.25); max-height: 240px;
            overflow-y: auto; z-index: 1001;
        }
        .search-suggestions.hidden { display: none; }
        .fc-search-suggestions {
            position: relative; margin-top: 6px; max-height: 200px; overflow-y: auto;
            border-radius: 6px; border: 1px solid #eee;
        }
        .fc-search-suggestions.hidden { display: none; }
        .forecast-suggestion {
            padding: 8px 12px; cursor: pointer; border-top: 1px solid #f0f0f0;
        }
        .forecast-suggestion:hover, .forecast-suggestion.active { background: #eef4ff; }
        .forecast-suggestion .suggestion-name { font-size: 12px; font-weight: 600; color: #222; }
        .forecast-suggestion .suggestion-detail { font-size: 10px; color: #888; margin-top: 1px; }
        .suggestion-header {
            padding: 6px 12px 3px; font-size: 10px; font-weight: 700; color: #999;
            text-transform: uppercase; letter-spacing: 0.5px; background: #f8f8f8;
            border-top: 1px solid #eee;
        }
        .suggestion-header:first-child { border-top: none; }

        /* ── Forecast toast ── */
        .forecast-toast {
            position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
            z-index: 1500; background: rgba(0,0,0,0.8); color: #fff;
            border-radius: 8px; padding: 8px 16px; font-size: 12px;
            display: flex; align-items: center; gap: 10px; white-space: nowrap;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
            animation: toastFadeIn 0.3s ease;
        }
        .forecast-toast.hidden { display: none; }
        .forecast-toast button {
            background: none; border: none; color: #aaa; cursor: pointer;
            font-size: 16px; line-height: 1; padding: 0;
        }
        @keyframes toastFadeIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

        /* ── Forecast view toggle ── */
        .forecast-toggle {
            display: flex; gap: 0; border-radius: 6px; overflow: hidden;
            border: 1px solid #ddd; margin: 0 10px 10px;
        }
        .forecast-toggle-btn {
            flex: 1; padding: 6px 0; border: none; background: #f5f5f5;
            font-size: 12px; font-weight: 500; cursor: pointer; color: #555;
            border-right: 1px solid #ddd; transition: all 0.15s;
        }
        .forecast-toggle-btn:last-child { border-right: none; }
        .forecast-toggle-btn.active { background: #2563eb; color: #fff; }
        .forecast-toggle-btn:hover:not(.active) { background: #e8e8e8; }

        /* ── Daily forecast periods ── */
        .forecast-daily {
            display: flex; flex-direction: column; gap: 0;
        }
        .forecast-daily.hidden { display: none; }
        .forecast-hourly.hidden { display: none; }
        .forecast-period {
            display: flex; align-items: flex-start; gap: 10px;
            padding: 8px 10px; border-bottom: 1px solid #f0f0f0;
        }
        .forecast-period:last-child { border-bottom: none; }
        .forecast-period-icon {
            width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0;
            background: #f0f4ff;
        }
        .forecast-period-info { flex: 1; min-width: 0; }
        .forecast-period-name {
            font-size: 13px; font-weight: 600; color: #222;
            display: flex; align-items: center; gap: 6px;
        }
        .forecast-period-temp {
            font-size: 13px; font-weight: 700; color: #2563eb;
        }
        .forecast-period-temp.night { color: #6b7280; }
        .forecast-period-wind { font-size: 11px; color: #888; margin-top: 1px; }
        .forecast-period-summary { font-size: 11px; color: #555; margin-top: 2px; line-height: 1.3; }


        /* ── Version label ── */
        #version-label {
            position: absolute; bottom: 66px; right: 12px; z-index: 999;
            color: rgba(0,0,0,0.35); font-size: 10px; pointer-events: none;
        }
        #feedback-btn {
            position: absolute; bottom: 8px; right: 12px; z-index: 1000;
            background: rgba(255,255,255,0.85); border: 1px solid #ddd; border-radius: 6px;
            padding: 4px 10px; font-size: 11px; color: #555; cursor: pointer;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
            text-decoration: none; display: none; align-items: center; gap: 4px;
        }
        #feedback-btn:hover { background: #fff; color: #2563eb; border-color: #2563eb; }

        /* ── Station status bar ── */
        #status-bar {
            position: absolute; bottom: 8px; right: 12px; z-index: 1000;
            background: rgba(0,0,0,0.6); color: #ccc; border-radius: 6px;
            padding: 4px 10px; font-size: 11px;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
        }

        /* ── Log panel ── */
        #log-btn {
            position: absolute; bottom: 44px; right: 12px; z-index: 1000;
            background: rgba(255,255,255,0.85); border: 1px solid #ddd; border-radius: 6px;
            padding: 4px 10px; font-size: 11px; color: #555; cursor: pointer;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
            display: none; align-items: center; gap: 4px;
        }
        #log-btn:hover { background: #fff; }
        #log-btn .log-error-dot {
            width: 7px; height: 7px; border-radius: 50%; background: #e74c3c; display: none;
        }
        #log-btn.has-errors .log-error-dot { display: inline-block; }
        #log-panel {
            position: fixed; bottom: 0; left: 0; width: 100%; max-height: 40vh;
            background: #1e1e1e; color: #d4d4d4; z-index: 4000;
            transform: translateY(100%); transition: transform 0.25s ease;
            display: flex; flex-direction: column; font-family: monospace;
        }
        #log-panel.open { transform: translateY(0); }
        .log-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 12px; border-bottom: 1px solid #333; flex-shrink: 0;
        }
        .log-header h4 { margin: 0; font-size: 12px; color: #aaa; font-weight: 600; }
        .log-header-actions { display: flex; gap: 8px; }
        .log-header-actions button {
            background: none; border: 1px solid #555; border-radius: 4px; color: #aaa;
            font-size: 10px; padding: 2px 8px; cursor: pointer;
        }
        .log-header-actions button:hover { border-color: #888; color: #ddd; }
        #log-entries {
            flex: 1; overflow-y: auto; padding: 6px 12px; font-size: 11px; line-height: 1.6;
        }
        .log-entry { padding: 2px 0; border-bottom: 1px solid #2a2a2a; display: flex; gap: 8px; }
        .log-time { color: #666; flex-shrink: 0; }
        .log-msg { flex: 1; word-break: break-all; }
        .log-entry.log-error .log-msg { color: #f44747; }
        .log-entry.log-warn .log-msg { color: #cca700; }
        .log-entry.log-info .log-msg { color: #3dc9b0; }
        .log-entry.log-fetch .log-msg { color: #569cd6; }
        .log-empty { color: #666; text-align: center; padding: 20px; font-size: 12px; }

        /* ── Popup styles ── */
        .leaflet-popup-content-wrapper {
            border-radius: 10px !important;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
        }
        .leaflet-popup-content { margin: 10px 14px !important; font-size: 13px; }

        .avy-popup { min-width: 220px; }
        .avy-popup h3 { margin: 0 0 6px 0; font-size: 15px; color: #222; }
        .avy-popup .danger-badge {
            display: inline-block; padding: 3px 10px; border-radius: 4px;
            color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 6px;
        }
        .avy-popup .detail-row { color: #555; margin: 3px 0; font-size: 12px; }
        .avy-popup a { color: #2563eb; text-decoration: none; font-size: 12px; }
        .avy-popup a:hover { text-decoration: underline; }

        .station-popup { min-width: 200px; }
        .station-popup h3 { margin: 0 0 4px 0; font-size: 14px; color: #222; }
        .station-popup .station-meta { color: #888; font-size: 11px; margin-bottom: 6px; }
        .station-popup .weather-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
        }
        .station-popup .weather-item { font-size: 12px; color: #444; }
        .station-popup .weather-label { color: #888; font-size: 11px; }
        .station-popup .weather-value { font-weight: 600; font-size: 14px; }
        .station-popup .loading-data { color: #999; font-style: italic; font-size: 12px; }

        .obs-popup { min-width: 240px; max-width: 320px; }
        .obs-popup h3 { margin: 0 0 4px 0; font-size: 14px; color: #222; }
        .obs-popup .obs-meta { color: #888; font-size: 11px; margin-bottom: 6px; }
        .obs-popup .obs-description {
            font-size: 12px; color: #444; margin: 6px 0;
            max-height: 120px; overflow-y: auto;
        }
        .obs-popup a { color: #2563eb; text-decoration: none; font-size: 12px; }

        .tour-popup { min-width: 230px; max-width: 320px; }
        .tour-popup h3 { margin: 0 0 6px 0; font-size: 15px; color: #183153; }
        .tour-popup .tour-meta { color: #667085; font-size: 11px; margin-bottom: 8px; }
        .tour-popup .tour-stats {
            display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px;
            font-size: 12px; color: #344054;
        }
        .tour-popup .tour-description {
            margin-top: 8px; font-size: 12px; color: #475467; line-height: 1.45;
            white-space: pre-wrap;
        }
        .tour-popup .tour-popup-actions {
            display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px;
            padding-top: 8px; border-top: 1px solid #eef2f7;
        }
        .tour-popup a { color: #2563eb; text-decoration: none; font-size: 12px; }
        .tour-start-marker-icon {
            background: transparent;
            border: none;
        }
        .tour-start-marker {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--tour-marker-color, #0f766e);
            border: 3px solid #fff;
            box-shadow: 0 0 0 3px rgba(255,255,255,0.4), 0 3px 10px rgba(15,23,42,0.28);
            position: relative;
        }
        .tour-start-marker::after {
            content: '';
            position: absolute;
            inset: 5px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.72);
        }

        /* ── Detail panel (slide-in, resizable) ── */
        #detail-panel {
            position: fixed; top: 0; right: 0; width: 420px; min-width: 320px; max-width: 80vw;
            height: 100vh;
            background: #fff; z-index: 3000; box-shadow: -4px 0 20px rgba(0,0,0,0.25);
            transform: translateX(100%); transition: transform 0.3s ease;
            overflow-y: auto; overflow-x: hidden;
        }
        #detail-panel.open { transform: translateX(0); }
        #detail-panel.resizing { transition: none; }
        @media (max-width: 500px) {
            #detail-panel {
                top: 0;
                right: 0;
                bottom: 0;
                width: 100vw;
                min-width: 100vw;
                max-width: 100vw;
                height: 100vh;
                height: 100dvh;
                padding-top: var(--safe-top);
                padding-bottom: var(--safe-bottom);
            }
            .map-type-control { left: calc(10px + var(--safe-left)); top: calc(10px + var(--safe-top)); }
            .map-type-btn { padding: 6px 8px; font-size: 10px; }
            .search-area {
                left: calc(10px + var(--safe-left));
                top: calc(44px + var(--safe-top));
                width: max-content;
                max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 20px);
            }
            .search-main-row {
                position: relative;
                align-items: center;
                width: max-content;
            }
            .station-search-toggle,
            .mobile-actions-toggle {
                display: flex;
                width: 30px;
                height: 30px;
                font-size: 15px;
            }
            .station-search {
                flex: 0 0 auto;
                min-width: 0;
                position: static;
            }
            .station-search-field {
                display: none;
            }
            .station-search.expanded {
                flex: 0 0 auto;
            }
            .station-search.expanded .station-search-field {
                display: block;
                position: absolute;
                top: calc(100% + 8px);
                left: 0;
                right: auto;
                width: calc((100vw - var(--safe-left) - var(--safe-right)) * 0.6667);
                max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 20px);
                z-index: 1002;
            }
            .station-search.expanded .station-search-field input {
                width: 100%;
                min-width: 0;
                font-size: 16px;
            }
            .station-search.expanded .search-suggestions {
                min-width: 100%;
                width: 100%;
                max-width: none;
            }
            .mobile-actions {
                display: flex;
                justify-content: flex-start;
                width: max-content;
            }
            .mobile-actions-panel {
                display: none;
                margin-top: 4px;
                flex-direction: column;
                align-items: stretch;
                width: max-content;
                margin-left: 0;
            }
            .mobile-actions.expanded .mobile-actions-panel {
                display: flex;
            }
            .mobile-actions-panel.search-button-row-wide > * {
                flex: 0 0 auto;
            }
            .add-forecast-btn { width: 30px; height: 30px; font-size: 18px; flex-shrink: 0; }
            .import-gpx-btn { min-width: 46px; height: 30px; font-size: 11px; padding: 0 8px; }
            .forecast-search-popover {
                top: calc(100% + 8px);
                left: 0;
                right: auto;
                width: calc((100vw - var(--safe-left) - var(--safe-right)) * 0.6667);
                max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 20px);
            }
            .top-right-toolbar { top: calc(10px + var(--safe-top)); right: calc(10px + var(--safe-right)); }
            .toolbar-row { gap: 6px; }
            .auth-btn { height: 28px; padding: 4px 10px; font-size: 11px; }
            .detail-header { padding-top: calc(16px + var(--safe-top)); }
            .layer-control {
                position: fixed; bottom: calc(8px + var(--safe-bottom)); left: calc(10px + var(--safe-left)); z-index: 1001;
                min-width: auto; padding: 10px 12px; max-height: 50vh; overflow-y: auto;
            }
            #feedback-btn { bottom: calc(8px + var(--safe-bottom)); right: calc(12px + var(--safe-right)); }
            #log-btn { bottom: calc(44px + var(--safe-bottom)); right: calc(12px + var(--safe-right)); }
            #version-label { bottom: calc(66px + var(--safe-bottom)); right: calc(12px + var(--safe-right)); }
            .leaflet-control-zoom { display: none; }
            .tour-import-modal {
                width: calc(100vw - 16px);
                max-height: calc(100vh - 20px);
                padding: calc(18px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
            }
            .tour-import-grid { grid-template-columns: 1fr; }
            .tour-import-actions { flex-direction: column-reverse; }
            .tour-import-primary,
            .tour-import-secondary { width: 100%; }
        }
        .detail-resize-handle {
            position: absolute; top: 0; left: 0; width: 6px; height: 100%;
            cursor: col-resize; z-index: 10;
            background: transparent;
        }
        .detail-resize-handle:hover,
        .detail-resize-handle.active {
            background: rgba(37,99,235,0.3);
        }
        .detail-header {
            position: sticky; top: 0; background: #fff; z-index: 1;
            padding: 16px 18px 12px; border-bottom: 1px solid #eee;
        }
        .detail-header-top {
            display: flex; justify-content: space-between; align-items: flex-start;
        }
        .detail-header h2 { margin: 0; font-size: 18px; color: #111; flex: 1; outline: none; }
        .detail-header h2.editable { cursor: text; }
        .detail-header h2.editable:hover::after,
        .detail-header h2.editable:focus::after { content: ' \270E'; color: #aaa; font-size: 14px; }
        .detail-header h2.editable:focus { border-bottom: 1px solid #2563eb; }
        .detail-close-btn {
            background: none; border: none; font-size: 24px; cursor: pointer;
            color: #888; padding: 0 0 0 12px; line-height: 1;
        }
        .detail-close-btn:hover { color: #333; }
        .detail-meta { color: #888; font-size: 12px; margin-top: 2px; }
        .detail-actions {
            display: flex; align-items: center; gap: 8px; margin-top: 6px;
        }
        .detail-actions.hidden { display: none; }
        .detail-action-btn {
            padding: 4px 10px; border: 1px solid #ddd; border-radius: 4px;
            font-size: 11px; cursor: pointer; background: #f9f9f9; color: #555;
        }
        .detail-action-btn:hover { background: #eee; }
        .detail-action-btn.delete { color: #dc2626; border-color: #fca5a5; }
        .detail-action-btn.delete:hover { background: #fef2f2; }
        .detail-conditions {
            margin-top: 10px; padding-top: 8px; border-top: 1px solid #f0f0f0;
        }
        .detail-cond-row {
            display: flex; gap: 16px; flex-wrap: wrap;
        }
        .detail-cond-row + .detail-cond-row {
            margin-top: 6px; padding-top: 6px; border-top: 1px solid #f5f5f5;
        }
        .detail-cond-item { text-align: center; }
        .detail-cond-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 0.3px; }
        .detail-cond-value { font-size: 18px; font-weight: 700; color: #222; }
        .detail-cond-value.temp { color: #2563eb; }
        .detail-cond-value.secondary { font-size: 15px; font-weight: 600; }
        .tour-detail-time-row {
            display: inline-flex;
            align-items: baseline;
            gap: 8px;
        }
        .tour-detail-jump-link {
            background: none;
            border: none;
            padding: 0;
            color: #2563eb;
            font-size: 11px;
            font-weight: 500;
            text-decoration: underline;
            cursor: pointer;
        }
        .tour-detail-jump-link:hover {
            color: #1d4ed8;
        }

        .detail-charts { padding: 12px 14px 24px; }
        @media (max-width: 500px) {
            .detail-charts { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
        }
        .chart-section {
            background: #fffbe6; border: 1px solid #f0e6a0; border-radius: 10px;
            padding: 12px 10px; margin-bottom: 14px;
        }
        .chart-section-title {
            font-size: 13px; font-weight: 600; color: #444; margin-bottom: 8px;
        }
        .chart-container { position: relative; width: 100%; height: 180px; }
        .chart-container canvas { width: 100% !important; height: 100% !important; }

        .detail-loading {
            display: flex; align-items: center; justify-content: center;
            padding: 60px 0; color: #999; font-size: 14px; gap: 10px;
        }
        .detail-loading .spinner {
            width: 24px; height: 24px; border: 3px solid #ddd;
            border-top-color: #2563eb; margin-bottom: 0;
        }
        .tour-detail-section {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 14px 14px 12px;
            margin-bottom: 14px;
        }
        .tour-detail-section h3 {
            margin: 0 0 10px 0;
            font-size: 13px;
            color: #111827;
        }
        .tour-detail-description {
            font-size: 13px;
            color: #334155;
            line-height: 1.5;
            white-space: pre-wrap;
        }
        .tour-detail-muted {
            font-size: 12px;
            color: #64748b;
            margin-top: 6px;
            line-height: 1.45;
        }
        .tour-detail-loading,
        .tour-detail-empty {
            font-size: 12px;
            color: #64748b;
            line-height: 1.45;
        }
        .tour-detail-error {
            color: #b42318;
        }
        .tour-detail-error span {
            color: #64748b;
            font-size: 11px;
        }
        .tour-detail-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px 14px;
            margin-top: 10px;
        }
        .tour-snotel-row {
            margin-top: 8px;
        }
        .tour-detail-action {
            color: #2563eb;
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
        }
        .tour-detail-action-button {
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            line-height: inherit;
            color: #2563eb;
            appearance: none;
            -webkit-appearance: none;
        }
        .tour-munter-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 10px;
            margin-top: 12px;
        }
        .tour-munter-total {
            margin-top: 12px;
            font-size: 13px;
            color: #334155;
        }
        .tour-munter-total strong {
            color: #0f172a;
        }
        .tour-munter-explainer {
            margin-top: 10px;
        }
        .tour-munter-explainer summary {
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #334155;
        }
        .tour-munter-explainer[open] {
            padding-bottom: 2px;
        }
        .tour-munter-card {
            border-radius: 12px;
            padding: 12px;
            border: 1px solid #dbe4ea;
            background: #f8fafc;
        }
        .tour-munter-card.ascent {
            background: linear-gradient(180deg, #f3fbf8 0%, #eefbf5 100%);
            border-color: #c9ead9;
        }
        .tour-munter-card.descent {
            background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
            border-color: #cfdcfb;
        }
        .tour-munter-card-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #64748b;
        }
        .tour-munter-card-value {
            margin-top: 6px;
            font-size: 20px;
            font-weight: 700;
            color: #0f172a;
        }
        .tour-munter-card-meta {
            margin-top: 4px;
            font-size: 12px;
            color: #475467;
        }
        .tour-munter-card-metrics {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 10px;
            margin-top: 8px;
            font-size: 12px;
            color: #334155;
        }
        .tour-munter-segments {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 12px;
        }
        .tour-munter-segment {
            border-radius: 10px;
            border: 1px solid #e5e7eb;
            padding: 10px 12px;
            background: #fff;
            text-align: left;
        }
        .tour-munter-segment.ascent {
            border-left: 4px solid #0f766e;
        }
        .tour-munter-segment.descent {
            border-left: 4px solid #2563eb;
        }
        .tour-munter-segment.selected {
            box-shadow: 0 0 0 2px rgba(245,158,11,0.35);
            border-color: #f59e0b;
            background: #fffaf0;
        }
        .tour-munter-segment-head {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .tour-munter-segment-main {
            flex: 1 1 auto;
            border: none;
            background: transparent;
            padding: 0;
            text-align: left;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }
        .tour-munter-segment-main.editing {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .tour-munter-segment-menu {
            flex: 0 0 auto;
            border: 1px solid #d0d5dd;
            background: #fff;
            color: #475467;
            border-radius: 999px;
            padding: 3px 9px;
            font-size: 14px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
        }
        .tour-munter-segment-menu:hover {
            background: #f8fafc;
            color: #0f172a;
        }
        .tour-munter-segment:hover,
        .tour-munter-segment-main:hover {
            background: #f8fafc;
        }
        .tour-munter-segment-title {
            font-size: 13px;
            font-weight: 600;
            color: #0f172a;
        }
        .tour-munter-segment-title-input {
            flex: 1 1 auto;
            min-width: 0;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 5px 8px;
            font-size: 13px;
            font-weight: 600;
            color: #0f172a;
            background: #fff;
        }
        .tour-munter-segment-title-input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
        }
        .tour-munter-segment-duration {
            font-size: 12px;
            color: #64748b;
            white-space: nowrap;
        }
        .tour-munter-segment-stats {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 10px;
            margin-top: 6px;
            font-size: 12px;
            color: #475467;
        }
        .tour-munter-segment-rate-inline {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #475467;
        }
        .tour-munter-segment-rate-inline select {
            min-width: 74px;
            padding: 4px 8px;
            border: 1px solid #d0d5dd;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: #0f172a;
            background: #fff;
        }
        .tour-elevation-chart-container {
            height: 220px;
        }

        /* ── Top-right toolbar (auth + layers) ── */
        .top-right-toolbar {
            position: absolute; top: 12px; right: 12px; z-index: 1000;
            display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
        }
        .toolbar-row {
            display: flex; align-items: center; gap: 8px;
        }

        /* ── Auth UI ── */
        .auth-container {
            position: relative;
        }
        .auth-btn {
            background: rgba(255,255,255,0.95); border: none; border-radius: 8px;
            padding: 7px 14px; font-size: 12px; font-weight: 600; color: #333;
            cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            display: flex; align-items: center; gap: 6px; white-space: nowrap;
        }
        .auth-btn:hover { background: #fff; }
        .auth-btn .auth-avatar {
            width: 22px; height: 22px; border-radius: 50%; background: #2563eb;
            color: #fff; display: flex; align-items: center; justify-content: center;
            font-size: 11px; font-weight: 700;
        }
        .auth-user-menu {
            position: absolute; top: 100%; right: 0; margin-top: 4px;
            background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
            min-width: 160px; overflow: hidden; z-index: 1002;
        }
        .auth-user-menu.hidden { display: none; }
        .auth-user-menu-item {
            padding: 10px 14px; font-size: 12px; color: #333; cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }
        .auth-user-menu-item:last-child { border-bottom: none; }
        .auth-user-menu-item:hover { background: #f5f7ff; }
        .auth-user-menu-item.destructive { color: #e74c3c; }

        /* ── Beta access gate ── */
        .beta-gate {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); z-index: 5000;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
        }
        .beta-gate.hidden { display: none; }
        .beta-gate-msg {
            text-align: center; font-size: 15px; font-weight: 600; color: #2563eb;
            margin: -4px 0 16px;
        }
        .beta-gate-msg.hidden { display: none; }
        .beta-gate-contact {
            text-align: center; font-size: 12px; color: #555;
            margin-bottom: 14px; padding: 10px;
            background: #f0f4ff; border-radius: 8px;
        }
        .beta-gate-contact a { color: #2563eb; text-decoration: none; }
        .beta-gate-contact a:hover { text-decoration: underline; }
        .beta-gate-contact.hidden { display: none; }

        .auth-modal-backdrop {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.5); z-index: 5000;
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        }
        .auth-modal-backdrop.hidden { display: none; }
        .auth-modal {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
            background: #fff; border-radius: 14px; padding: 28px 32px;
            box-shadow: 0 8px 40px rgba(0,0,0,0.3); z-index: 5001;
            width: 340px; max-width: 90vw;
        }
        .auth-modal.hidden { display: none; }
        .auth-modal h3 { margin: 0 0 18px; font-size: 18px; color: #111; text-align: center; }
        .auth-tabs {
            display: flex; gap: 0; border-radius: 6px; overflow: hidden;
            border: 1px solid #ddd; margin-bottom: 18px;
        }
        .auth-tab {
            flex: 1; padding: 8px 0; border: none; background: #f5f5f5;
            font-size: 13px; font-weight: 600; cursor: pointer; color: #555;
            border-right: 1px solid #ddd; transition: all 0.15s;
        }
        .auth-tab:last-child { border-right: none; }
        .auth-tab.active { background: #2563eb; color: #fff; }
        .auth-tab:hover:not(.active) { background: #e8e8e8; }
        .auth-modal input[type="text"],
        .auth-modal input[type="email"],
        .auth-modal input[type="password"] {
            width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
            font-size: 13px; margin-bottom: 10px; outline: none;
            transition: border-color 0.2s;
        }
        .auth-modal input:focus { border-color: #2563eb; }
        .auth-modal .auth-submit-btn {
            width: 100%; padding: 10px; border: none; border-radius: 8px;
            background: #2563eb; color: #fff; font-size: 13px; font-weight: 600;
            cursor: pointer; transition: background 0.2s;
        }
        .auth-modal .auth-submit-btn:hover { background: #1d4ed8; }
        .auth-modal .auth-submit-btn:disabled { background: #93c5fd; cursor: not-allowed; }
        .auth-divider {
            text-align: center; color: #aaa; font-size: 12px; margin: 14px 0;
            position: relative;
        }
        .auth-divider::before, .auth-divider::after {
            content: ''; position: absolute; top: 50%; width: 40%;
            height: 1px; background: #ddd;
        }
        .auth-divider::before { left: 0; }
        .auth-divider::after { right: 0; }
        #google-signin-btn { display: flex; justify-content: center; }
        #google-signin-btn.hidden { display: none; }
        .facebook-signin-btn {
            width: 100%; margin-top: 10px; padding: 10px 12px; border: none; border-radius: 8px;
            background: #1877f2; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
            transition: background 0.2s;
        }
        .facebook-signin-btn:hover { background: #166fe5; }
        .facebook-signin-btn.hidden { display: none; }
        .auth-error {
            color: #e74c3c; font-size: 12px; text-align: center;
            margin-top: 10px; padding: 8px; background: #fef2f2;
            border-radius: 6px;
        }
        .auth-error.hidden { display: none; }
        .auth-close {
            position: absolute; top: 10px; right: 14px; background: none;
            border: none; font-size: 20px; color: #999; cursor: pointer;
            line-height: 1;
        }
        .auth-close:hover { color: #333; }

        .tour-import-backdrop {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.46); z-index: 5000;
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        }
        .tour-import-modal {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
            width: min(540px, calc(100vw - 28px)); max-height: min(90vh, 760px);
            overflow-y: auto; background: #fff; border-radius: 18px; padding: 24px 24px 20px;
            box-shadow: 0 18px 50px rgba(15,23,42,0.28); z-index: 5001;
        }
        .tour-import-modal h3 {
            margin: 0 0 8px; font-size: 20px; color: #0f172a;
        }
        .tour-import-close {
            position: absolute; top: 12px; right: 14px; background: none; border: none;
            font-size: 24px; line-height: 1; color: #98a2b3; cursor: pointer;
        }
        .tour-import-close:hover { color: #334155; }
        .tour-import-file {
            font-size: 12px; color: #475467; margin-bottom: 10px;
        }
        .tour-import-summary {
            background: linear-gradient(180deg, #f8fafc 0%, #eef6f3 100%);
            border: 1px solid #d7efe7; border-radius: 12px; padding: 12px 14px;
            color: #334155; font-size: 12px; line-height: 1.5; margin-bottom: 14px;
        }
        .tour-import-summary strong { color: #0f172a; }
        .tour-import-muted {
            color: #526071;
        }
        .tour-import-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
        }
        .tour-import-grid label,
        .tour-import-description {
            display: flex; flex-direction: column; gap: 6px;
            font-size: 12px; font-weight: 600; color: #334155;
        }
        .tour-import-description { margin-top: 12px; }
        .tour-import-grid input,
        .tour-import-description textarea {
            width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 10px;
            font-size: 13px; color: #0f172a; background: #fff; outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .tour-import-grid input:focus,
        .tour-import-description textarea:focus {
            border-color: #0f766e;
            box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
        }
        .tour-import-description textarea {
            resize: vertical; min-height: 96px;
        }
        .tour-import-publish-row {
            display: flex; align-items: center; gap: 8px; margin-top: 14px;
            font-size: 12px; color: #334155; cursor: pointer;
        }
        .tour-import-publish-row input {
            width: 16px; height: 16px; accent-color: #0f766e;
        }
        .tour-import-error {
            margin-top: 12px; padding: 10px 12px; border-radius: 10px;
            background: #fef2f2; color: #b42318; font-size: 12px;
        }
        .tour-import-actions {
            display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px;
        }
        .tour-import-primary,
        .tour-import-secondary {
            border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
            padding: 10px 14px; transition: background 0.2s, border-color 0.2s;
        }
        .tour-import-primary {
            border: none; background: #0f766e; color: #fff;
        }
        .tour-import-primary:hover { background: #115e59; }
        .tour-import-primary:disabled { background: #94a3b8; cursor: not-allowed; }
        .tour-import-secondary {
            border: 1px solid #d0d5dd; background: #fff; color: #344054;
        }
        .tour-import-secondary:hover { background: #f8fafc; }

        /* ── Favorite star ── */
        .fav-star {
            cursor: pointer; font-size: 16px; color: #ddd; transition: color 0.15s;
            user-select: none;
        }
        .fav-star:hover { color: #f59e0b; }
        .fav-star.active { color: #f59e0b; }
        .fav-filter-row {
            display: flex; align-items: center; gap: 6px;
            padding: 6px 0 2px; border-top: 1px solid #eee; margin-top: 6px;
        }
        .fav-filter-row label { font-size: 11px; color: #666; }

        /* ── Annotations list panel ── */
        #map.ann-open { margin-left: 340px; width: calc(100vw - 340px); transition: margin-left 0.3s ease, width 0.3s ease; }
        #annotations-panel {
            position: fixed; top: 0; left: 0; width: 340px; height: 100vh;
            background: #fff; z-index: 2900; box-shadow: 4px 0 20px rgba(0,0,0,0.15);
            transform: translateX(-100%); transition: transform 0.3s ease;
            display: flex; flex-direction: column;
        }
        #annotations-panel.open { transform: translateX(0); }
        .ann-header {
            padding: 14px 16px 10px; border-bottom: 1px solid #eee;
            display: flex; align-items: center; justify-content: space-between;
            gap: 12px; flex-shrink: 0;
        }
        .ann-header-main {
            display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; flex-wrap: wrap;
        }
        .ann-header h3 { margin: 0; font-size: 15px; color: #222; display: flex; align-items: center; gap: 8px; }
        .ann-count {
            background: #e5e7eb; color: #555; font-size: 11px; font-weight: 600;
            padding: 1px 7px; border-radius: 10px;
        }
        .tour-header-checkbox {
            display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475467;
            cursor: pointer; user-select: none;
        }
        .tour-header-checkbox input {
            width: 15px; height: 15px; margin: 0; accent-color: #0f766e; cursor: pointer;
        }
        .ann-close-btn {
            background: none; border: none; font-size: 22px; cursor: pointer;
            color: #888; line-height: 1; padding: 0;
        }
        .ann-close-btn:hover { color: #333; }
        .ann-filter-bar {
            display: flex; gap: 5px; padding: 8px 16px; border-bottom: 1px solid #eee;
            flex-shrink: 0; flex-wrap: wrap;
        }
        .ann-filter-pill {
            display: flex; align-items: center; gap: 4px;
            padding: 3px 9px; border-radius: 12px; font-size: 10px; font-weight: 600;
            cursor: pointer; border: 1.5px solid var(--pill-color, #ddd); background: var(--pill-bg, #fff); color: var(--pill-color, #666);
            transition: all 0.15s; user-select: none;
        }
        .ann-filter-pill:hover { opacity: 0.8; }
        .ann-filter-pill .ann-pill-dot {
            width: 7px; height: 7px; border-radius: 50%;
        }
        #annotations-list {
            flex: 1; overflow-y: auto; padding: 0;
        }
        .ann-state-group { border-bottom: 1px solid #f0f0f0; }
        .ann-state-group.collapsed .ann-type-header,
        .ann-state-group.collapsed .ann-item { display: none; }
        .ann-state-header {
            position: sticky; top: 0; z-index: 1;
            background: #f8f9fa; padding: 6px 16px;
            font-size: 11px; font-weight: 700; color: #666;
            text-transform: uppercase; letter-spacing: 0.5px;
            border-bottom: 1px solid #eee;
            cursor: pointer; display: flex; align-items: center; justify-content: space-between;
        }
        .ann-state-header::after {
            content: '\25B4'; font-size: 10px; color: #aaa; transition: transform 0.2s;
        }
        .ann-state-group.collapsed .ann-state-header::after {
            transform: rotate(180deg);
        }
        .ann-type-header {
            padding: 5px 16px 3px; font-size: 10px; font-weight: 600;
            color: #999; display: flex; align-items: center; gap: 6px;
        }
        .ann-type-dot {
            width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
        }
        .ann-item {
            padding: 6px 16px 6px 28px; cursor: pointer; font-size: 12px;
            color: #333; border-bottom: 1px solid #fafafa;
            display: flex; align-items: baseline; gap: 6px;
            transition: background 0.1s;
        }
        .ann-item:hover { background: #f0f4ff; }
        .ann-item-name { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .ann-item-meta { color: #999; font-size: 10px; flex-shrink: 0; white-space: nowrap; }
        .ann-empty {
            padding: 40px 20px; text-align: center; color: #aaa; font-size: 13px;
        }
        .ann-toggle-btn {
            min-width: 58px; height: 34px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            font-size: 12px; font-weight: 700; color: #1e40af; cursor: pointer; display: flex;
            align-items: center; justify-content: center; line-height: 1;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            transition: background 0.15s, color 0.15s;
            padding: 0 10px; white-space: nowrap;
        }
        .ann-toggle-btn:hover { background: #fff; }
        .ann-toggle-btn.active { background: #2563eb; color: #fff; }
        .tour-list-btn {
            min-width: 54px; height: 34px; border: none; border-radius: 8px;
            background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
            font-size: 12px; font-weight: 700; color: #14532d; cursor: pointer;
            display: flex; align-items: center; justify-content: center; line-height: 1;
            padding: 0 10px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            transition: background 0.15s, color 0.15s;
            white-space: nowrap;
        }
        .tour-list-btn:hover { background: #fff; }
        .tour-list-btn.active { background: #166534; color: #fff; }
        .ann-filter-bar.hidden { display: none; }
        .tour-section + .tour-section {
            border-top: 1px solid #e5e7eb;
        }
        .tour-section {
            background: #fff;
        }
        .tour-list {
            display: flex; flex-direction: column;
        }
        .tour-list-intro {
            padding: 12px 16px; border-bottom: 1px solid #eef2f7;
        }
        .tour-list-intro-toggle {
            width: 100%; border: none; text-align: left; cursor: pointer;
            display: flex; flex-direction: column; position: relative;
        }
        .tour-list-intro-toggle::after {
            content: '\25B8'; position: absolute; right: 16px; top: 16px;
            font-size: 15px; color: #64748b; transition: transform 0.2s;
            transform: rotate(90deg);
        }
        .tour-list-intro-toggle.collapsed::after {
            transform: rotate(0deg);
        }
        .tour-list-intro-title {
            font-size: 13px; font-weight: 700; color: #0f172a;
        }
        .tour-list-intro-meta {
            margin-top: 4px; font-size: 11px; color: #64748b;
        }
        .tour-section > .tour-list-intro-toggle {
            background: #f8fafc; border-bottom-color: #dbe4ee; border-bottom: none;
            flex: 1;
        }
        .tour-subsection > .tour-list-intro-toggle {
            background: #fff; border-bottom-color: #eef2f7;
        }
        .tour-section > .tour-list-collection-body {
            padding: 0 0 8px;
        }
        .tour-subsection {
            margin-left: 0;
            border-left: none;
        }
        .tour-subsection + .tour-subsection {
            margin-top: 8px;
        }
        .tour-list-collection-body.hidden {
            display: none;
        }
        .tour-list-group {
            margin-left: 16px;
            border-bottom: 1px solid #eef2f7;
        }
        .tour-list-group-title {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 16px; background: #fff; border-bottom: 1px solid #eef2f7;
            font-size: 11px; font-weight: 700; color: #334155;
            width: 100%; border: none; cursor: pointer; text-align: left;
        }
        .tour-list-group-title span {
            min-width: 0; flex: 1;
        }
        .tour-list-group-title::after {
            content: '\25B8';
            font-size: 13px; color: #64748b; transition: transform 0.2s;
            margin-left: 10px;
            transform: rotate(90deg);
        }
        .tour-list-group-items {
            display: flex; flex-direction: column;
        }
        .tour-list-group.collapsed .tour-list-group-items {
            display: none;
        }
        .tour-list-group.collapsed .tour-list-group-title::after {
            transform: rotate(0deg);
        }
        .tour-list-controls {
            display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid #eef2f7;
            background: #fff;
        }
        .tour-section-empty {
            padding: 14px 16px; color: #667085; font-size: 12px;
        }
        .tour-section-credit {
            padding: 0 16px 0; font-size: 11px; color: #667085;
        }
        .tour-section-credit a {
            color: #9a3412; font-weight: 700; text-decoration: none;
        }
        .tour-section-credit a:hover {
            text-decoration: underline;
        }
        .tour-list-control-btn {
            border: none; border-radius: 999px; padding: 6px 11px;
            font-size: 11px; font-weight: 700; cursor: pointer;
            background: #e2e8f0; color: #334155; transition: background 0.15s, color 0.15s;
        }
        .tour-list-control-btn:hover {
            background: #cbd5e1;
        }
        .tour-list-control-btn.active {
            background: #0f766e; color: #fff;
        }
        .tour-list-item {
            padding: 10px 16px 11px; border-bottom: 1px solid #eef2f7; cursor: pointer;
            transition: background 0.15s, box-shadow 0.15s;
        }
        .tour-list-item:hover { background: #f7fbfa; }
        .tour-list-item.selected {
            background: #eff6ff;
            box-shadow: inset 3px 0 0 #1d4ed8;
        }
        .tour-list-item.selected .tour-list-title {
            color: #1e3a8a;
        }
        .tour-list-item.selected .tour-list-meta,
        .tour-list-item.selected .tour-list-stats {
            color: #1d4ed8;
        }
        .tour-list-row {
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
        }
        .tour-list-heading {
            display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
        }
        .tour-list-visibility {
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; cursor: pointer;
        }
        .tour-list-visibility-input {
            margin: 0; width: 15px; height: 15px; cursor: pointer;
            accent-color: #0f766e;
        }
        .tour-list-title {
            font-size: 13px; font-weight: 700; color: #102a43; min-width: 0;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .tour-list-meta {
            margin-top: 5px; font-size: 11px; color: #667085;
        }
        .tour-list-stats {
            margin-top: 5px; font-size: 11px; color: #475467;
        }
        @media (max-width: 500px) {
            #map.ann-open { margin-left: 0; width: 100vw; }
            #annotations-panel {
                top: auto; bottom: 0; left: 0; width: 100%; height: 40vh;
                border-radius: 14px 14px 0 0;
                transform: translateY(100%);
                box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
            }
            #annotations-panel.open { transform: translateY(0); }
            .ann-toggle-btn { min-width: 62px; height: 30px; font-size: 11px; padding: 0 8px; }
            .tour-list-btn { min-width: 58px; height: 30px; font-size: 11px; padding: 0 8px; }
        }
