/* Sidebar surfaces and spacing share one scale across both web builds. */
/* One quiet surface keeps map tools readable without six separate cards. */
#floating-controls {
    --tools-surface: rgba(15, 23, 42, .97);
    --tools-ink: #cbd5e1;
    --tools-rule: rgba(148, 163, 184, .2);
    --tools-hover: #1e293b;
    --tools-selected: #1e3a5f;
    --tools-blue: #93c5fd;
    padding: 5px;
    gap: 2px !important;
    align-self: flex-start;
    border: 1px solid var(--tools-rule);
    border-radius: 18px;
    background: var(--tools-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
[data-theme='light'] #floating-controls {
    --tools-surface: rgba(255, 255, 255, .97);
    --tools-ink: #475569;
    --tools-rule: #e2e8f0;
    --tools-hover: #f1f5f9;
    --tools-selected: #eff6ff;
    --tools-blue: #2563eb;
}
#floating-controls .float-btn {
    width: 44px !important; height: 44px !important; min-width: 44px; min-height: 44px;
    border-radius: 12px !important; border: 0 !important;
    color: var(--tools-ink); background: transparent !important;
    box-shadow: none !important; backdrop-filter: none; transform: none !important;
    transition: none; animation: none;
}
#floating-controls .float-btn i { font-size: 16px; }
#map-tools-options { display: flex; flex-direction: column; gap: 2px; }
#map-tools-options[hidden] { display: none !important; }
#floating-controls #map-tools-toggle { color: var(--tools-blue); }
#floating-controls #map-tools-toggle[aria-expanded="true"] { border-top: 1px solid var(--tools-rule) !important; border-radius: 0 0 12px 12px !important; }
#floating-controls .float-btn:hover { color: var(--tools-blue); background: var(--tools-hover) !important; }
#floating-controls .float-btn:focus-visible { outline: 2px solid var(--tools-blue); outline-offset: -2px; }
#floating-controls .float-btn:active { background: var(--tools-selected) !important; }
#floating-controls #gps-btn.active,
#floating-controls #saved-places-btn.has-places {
    color: var(--tools-blue); background: var(--tools-selected) !important;
}
#floating-controls #gps-btn.loading { color: var(--tools-blue); outline: 1px dashed var(--tools-blue); outline-offset: -5px; }
#floating-controls #weather-info-btn { margin-top: 8px; }
#floating-controls #weather-info-btn::before {
    content: ''; position: absolute; top: -5px; left: 8px; right: 8px;
    height: 1px; background: var(--tools-rule);
}
body:has(#saved-places-modal[style*='display: flex']) #floating-controls #saved-places-btn,
body:has(#settings-modal[style*='display: flex']) #floating-controls #settings-btn,
body:has(#weather-modal.open) #floating-controls #weather-info-btn {
    color: var(--tools-blue); background: var(--tools-selected) !important;
}
#floating-controls #alert-bell-btn.text-blue-500 { color: var(--tools-blue); }
#floating-controls #alert-bell-btn.text-red-500 { color: #ef4444; }
#floating-controls #alert-bell-btn.has-warning { color: #d97706; }
#floating-controls #alert-bell-btn.has-danger { color: #ef4444; }
#floating-controls #alert-bell-btn.has-safe { color: #10b981; }
#floating-controls #alert-bell-dot { width: 8px; height: 8px; top: 8px; right: 8px; border-color: var(--tools-surface); }
@media (hover: hover) {
    #floating-controls .float-btn:hover::after, #floating-controls .float-btn:focus-visible::after {
        content: attr(aria-label); position: absolute; right: calc(100% + 12px);
        padding: 7px 10px; border: 1px solid var(--tools-rule); border-radius: 8px;
        background: var(--tools-surface); color: var(--tools-ink);
        font-size: 12px; line-height: 18px; white-space: nowrap; pointer-events: none;
    }
}
#sidebar {
    --sidebar-surface: rgba(15, 23, 42, .97);
    --sidebar-inset: #172033;
    --sidebar-border: rgba(148, 163, 184, .16);
    --sidebar-rule: rgba(148, 163, 184, .10);
    --sidebar-ink: #f1f5f9;
    --sidebar-muted: #94a3b8;
    --sidebar-blue: #93c5fd;
    --sidebar-selected: rgba(59, 130, 246, .12);
    width: 280px;
    max-width: 280px;
    gap: 10px;
}
[data-theme='light'] #sidebar {
    --sidebar-surface: rgba(255, 255, 255, .97);
    --sidebar-inset: #f8fafc;
    --sidebar-border: #e2e8f0;
    --sidebar-rule: #f1f5f9;
    --sidebar-ink: #1e293b;
    --sidebar-muted: #64748b;
    --sidebar-blue: #2563eb;
    --sidebar-selected: #eff6ff;
}
#sidebar .app-panel {
    background: var(--sidebar-surface);
    border: 1px solid var(--sidebar-border);
    border-radius: 18px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
#sidebar .sidebar-header-panel {
    padding: 10px !important;
    gap: 4px;
}
.sidebar-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding-right: 48px; min-height: 56px; }
.sidebar-brand .brand-logo { width: 100%; max-width: 232px; height: auto; max-height: none; object-fit: contain; object-position: left; }
.logo-dark-img { display: block; mix-blend-mode: screen; }
.logo-light-img { display: none; mix-blend-mode: multiply; }
[data-theme='light'] .logo-dark-img { display: none !important; }
[data-theme='light'] .logo-light-img { display: block !important; }
#sidebar .sidebar-header-panel button.sidebar-hide-btn {
    top: 10px !important; right: 8px !important; width: 44px !important; height: 44px !important;
    padding: 0 !important; border-radius: 8px !important; opacity: 1 !important;
    color: var(--sidebar-muted) !important; background: var(--sidebar-inset) !important;
    border: 1px solid var(--sidebar-border) !important; box-shadow: none !important;
}
#sidebar .sidebar-header-panel button.sidebar-hide-btn:hover {
    color: var(--sidebar-blue) !important; border-color: var(--sidebar-blue) !important;
    box-shadow: none !important; transform: none !important;
}
.sidebar-clock {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 10px; margin: 2px 0;
    border: 1px solid var(--sidebar-border); border-radius: 12px;
    background: var(--sidebar-inset); color: var(--sidebar-muted);
}
.sidebar-clock-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sidebar-clock-symbol { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--sidebar-selected); color: var(--sidebar-blue); font-size: 13px; }
.sidebar-clock-face { display: flex; flex-direction: column; min-width: 0; }
#sidebar #current-timezone-label { font-size: 9px; line-height: 14px; white-space: nowrap; }
#sidebar #current-time { font-size: 24px !important; line-height: 28px; font-weight: 700; color: var(--sidebar-ink); font-variant-numeric: tabular-nums; }
.sidebar-calendar { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; border-left: 1px solid var(--sidebar-border); padding-left: 12px; min-width: 0; }
.sidebar-calendar-heading { display: flex; align-items: center; gap: 5px; font-size: 10px; line-height: 14px; white-space: nowrap; }
.sidebar-calendar-heading i { color: var(--sidebar-blue); font-size: 10px; }
#sidebar #current-date { margin: 0; white-space: nowrap; font-size: 13px !important; line-height: 18px; font-weight: 600; color: var(--sidebar-ink) !important; font-variant-numeric: tabular-nums; }
#sidebar .sidebar-navigation { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); padding: 4px; gap: 4px; border-radius: 12px; background: var(--sidebar-inset); border: 1px solid var(--sidebar-border); }
#sidebar .sidebar-navigation .tab-pill {
    min-height: 34px; padding: 6px 8px !important; border-radius: 8px;
    font-size: 12px !important; gap: 7px; color: var(--sidebar-muted); background: transparent; min-width: 0; white-space: nowrap;
    box-shadow: none; border: 1px solid transparent; transition: none;
}
#sidebar .sidebar-navigation .tab-pill.active {
    background: var(--sidebar-surface) !important; color: var(--sidebar-blue) !important;
    border-color: var(--sidebar-border); box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
#sidebar .sidebar-navigation .tab-pill:hover { color: var(--sidebar-ink); }
#sidebar .sidebar-navigation i { font-size: 12px; }
#sidebar .sidebar-content-panel { padding: 0 !important; }
#sidebar #tab-stations { gap: 12px; padding: 14px !important; }
#sidebar .station-picker-options { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 12px; }
#sidebar[data-sidebar-view='stations'][data-station-picker='collapsed'] .sidebar-content-panel { flex: 0 1 auto; }
#sidebar[data-station-picker='collapsed'] #tab-stations { height: auto; }
#sidebar .station-picker-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; flex-shrink: 0; width: 100%; text-align: left; color: var(--sidebar-ink); }
#sidebar .station-picker-toggle > i:first-child { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; color: var(--sidebar-blue); background: var(--sidebar-selected); }
#sidebar .station-picker-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#sidebar .station-picker-summary > span { color: var(--sidebar-muted); font-size: 10px; }
#sidebar #station-picker-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sidebar #station-picker-action { margin-left: auto; color: var(--sidebar-muted); font-size: 10px; white-space: nowrap; }
#sidebar .station-picker-chevron { color: var(--sidebar-muted); font-size: 10px; }
#sidebar .station-picker-toggle[aria-expanded='true'] .station-picker-chevron { transform: rotate(180deg); }
.sidebar-search {
    background: var(--sidebar-inset); border: 1px solid var(--sidebar-border);
    border-radius: 10px; min-height: 40px; padding: 7px 10px; display: flex; gap: 8px; align-items: center;
}
.sidebar-search:focus-within { border-color: var(--sidebar-blue); }
#sidebar #station-search { color: var(--sidebar-ink); font-size: 13px; min-width: 0; }
#sidebar #station-search::placeholder { color: var(--sidebar-muted); }
#sidebar .composite-section-title { display: flex; align-items: center; gap: 7px; color: var(--sidebar-muted); font-size: 12px; line-height: 18px; font-weight: 500; padding: 0 2px; }
#sidebar .composite-section-title i { color: var(--sidebar-muted); font-size: 12px; }
#sidebar .comp-time-slot {
    min-height: 42px; padding: 9px 11px !important; font-size: 12px !important;
    border-radius: 11px; background: var(--sidebar-inset); color: var(--sidebar-ink);
    border: 1px solid var(--sidebar-border); box-shadow: none;
}
#sidebar .comp-time-slot[aria-pressed='true'] { background: var(--sidebar-selected); color: var(--sidebar-blue); border-color: var(--sidebar-blue); }
#sidebar .comp-time-slot:hover { border-color: var(--sidebar-blue); }
#sidebar .composite-live-badge { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 9px; color: inherit; font-variant-numeric: tabular-nums; }
#sidebar .composite-live-badge::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
#sidebar #station-list { border-top: 1px solid var(--sidebar-rule); padding-top: 2px; }
#sidebar .station-item {
    min-height: 58px; margin: 0 !important; padding: 10px 6px 10px 8px !important; gap: 10px !important;
    border: 1px solid transparent; border-bottom-color: var(--sidebar-rule); border-left-width: 2px;
    border-radius: 10px; background: transparent; box-shadow: none; transform: none; animation: none; transition: none;
}
#sidebar .station-item:last-child { border-bottom-color: transparent; }
#sidebar .station-item:hover { background: var(--sidebar-inset); transform: none; box-shadow: none; }
#sidebar .station-item.active { border-color: var(--sidebar-border); border-left-color: var(--sidebar-blue); background: var(--sidebar-selected); box-shadow: none; }
#sidebar .station-item:focus-visible, #sidebar .tab-pill:focus-visible { outline: 2px solid var(--sidebar-blue); outline-offset: -2px; }
#sidebar .station-icon > div { width: 32px; height: 32px; border-radius: 10px; }
#sidebar .station-title { color: var(--sidebar-ink); font-size: 12px !important; font-weight: 600; line-height: 20px; }
#sidebar .station-time { color: var(--sidebar-muted); font-size: 11px !important; line-height: 16px; font-variant-numeric: tabular-nums; }
#sidebar .station-status {
    display: inline-flex; align-items: center; gap: 5px; font-size: 10px !important; font-weight: 500;
    text-transform: none; padding: 0 !important; border: 0; border-radius: 0; background: transparent;
}
#sidebar .station-status::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
#sidebar .station-status.online { color: #6ee7b7; }
#sidebar .station-status.standby { color: #fcd34d; }
#sidebar .station-status.offline { color: #fca5a5; }
[data-theme='light'] #sidebar .station-status.online { color: #047857; }
[data-theme='light'] #sidebar .station-status.standby { color: #92400e; }
[data-theme='light'] #sidebar .station-status.offline { color: #b91c1c; }
#sidebar .drag-handle { width: 20px; padding: 4px; opacity: 0; transition: none; }
#sidebar .station-item:hover .drag-handle, #sidebar .station-item:focus-within .drag-handle { opacity: .55; }
@media (pointer: coarse) { #sidebar .drag-handle { opacity: .4; } }
@media (max-width: 768px) {
    #sidebar { width: min(280px, calc(100vw - 96px)) !important; max-width: min(280px, calc(100vw - 96px)) !important; gap: 10px; }
    #sidebar .sidebar-header-panel { padding: 10px !important; gap: 4px; }
    #sidebar .sidebar-brand { min-height: 52px; }
    #sidebar .sidebar-clock { padding: 7px 8px; }
    #sidebar #current-time { font-size: 22px !important; line-height: 26px; }
    #sidebar .sidebar-calendar { padding-left: 8px; }
    #sidebar #tab-stations { padding: 10px !important; gap: 8px; height: auto; flex: 1; min-height: 0; }
    #sidebar .station-picker-options { gap: 8px; }
    #sidebar[data-sidebar-view='stations'][data-station-picker='expanded'] .sidebar-content-panel {
        flex: 0 1 auto;
        height: min(calc(100dvh - 324px), 560px);
        min-height: 0;
    }
    #sidebar .station-item { min-height: 52px; padding: 7px 4px 7px 6px !important; gap: 8px !important; }
    #sidebar .station-results-scroll { overscroll-behavior: contain; }
    #sidebar .sidebar-analysis-link { padding: 8px 12px; min-height: 48px; }
}

#sidebar-station-warning { color: #fca5a5; font-size: 11px; line-height: 1.5; }
[data-theme='light'] #sidebar-station-warning { color: #b91c1c; }
.radar-data-notice { position: fixed; top: 16px; left: 332px; right: 76px; margin: 0 auto;
    max-width: 480px; display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px;
    border: 1px solid rgba(245, 158, 11, .45); border-radius: 12px; z-index: 25;
    background: rgba(30, 41, 59, .96); color: #fde68a; box-shadow: 0 3px 14px rgba(0, 0, 0, .12); pointer-events: none; }
.radar-data-notice i { margin-top: 3px; }
.radar-data-notice strong { display: block; font-size: 13px; line-height: 1.5; }
.radar-data-notice span { display: block; font-size: 11px; line-height: 1.6; margin-top: 2px; }
.radar-data-notice[hidden], #sidebar-station-warning[hidden] { display: none; }
[data-theme='light'] .radar-data-notice { background: rgba(255, 251, 235, .97); color: #92400e; }
.radar-analysis-unavailable { padding: 20px 12px; color: #fcd34d; font-size: 13px; line-height: 1.7; text-align: center; }
[data-theme='light'] .radar-analysis-unavailable { color: #92400e; }
.neutral-text { color: #94a3b8; }
@media (max-width: 768px) {
    .radar-data-notice { top: 8px; left: 60px; right: 60px; padding: 9px 10px; }
    /* The header carries the same warning while the mobile sidebar is open. */
    body:has(#sidebar.sidebar-visible) .radar-data-notice { visibility: hidden; }
}

body.has-radar-data-notice #rain-alert-box { top: calc(var(--radar-notice-bottom, 100px) + 8px); }

.timeline-image-status[data-phase='stale'] { color: #ef4444; }

/* Network mode stays compact until rain analysis is explicitly opened. */
#sidebar .sidebar-navigation .tab-pill { min-height: 44px; }
#sidebar[data-sidebar-view='composite'] .sidebar-content-panel { flex: 0 1 auto; }
#sidebar .sidebar-help { color: var(--sidebar-muted); font-size: 11px; line-height: 1.65; margin: 0; text-wrap: pretty; }
#sidebar .sidebar-secondary-button, #sidebar .sidebar-analysis-link, #sidebar .sidebar-back-button { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--sidebar-ink); font-size: 12px; text-align: left; }
#sidebar .sidebar-secondary-button { padding: 10px 12px; border: 1px solid var(--sidebar-border); border-radius: 10px; background: var(--sidebar-inset); }
#sidebar .sidebar-secondary-button > i:last-child, #sidebar .sidebar-analysis-link > i:last-child { margin-left: auto; font-size: 10px; color: var(--sidebar-muted); }
#sidebar .sidebar-analysis-link { flex-shrink: 0; padding: 12px 16px; border-top: 1px solid var(--sidebar-border); color: var(--sidebar-blue); font-weight: 600; }
#sidebar[data-sidebar-view='composite'] .sidebar-analysis-link { min-height: 56px; border-top: 0; }
#sidebar .sidebar-analysis-link > i:first-child { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--sidebar-selected); }
#sidebar .sidebar-analysis-link:disabled { color: var(--sidebar-muted); cursor: not-allowed; font-weight: 400; }
#sidebar .sidebar-analysis-link:disabled > i:first-child { background: var(--sidebar-inset); }
#sidebar .sidebar-analysis-link:disabled:hover { background: transparent; }
#sidebar #station-analysis-hint { flex-shrink: 0; padding: 0 16px 12px; }
#sidebar #tab-tracker { padding: 14px !important; gap: 12px; }
#sidebar .sidebar-analysis-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#sidebar .sidebar-analysis-heading { display: flex; min-width: 0; align-items: center; gap: 6px; }
#sidebar #selected-station-name { margin: 0; flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.55; color: var(--sidebar-ink); white-space: normal; overflow-wrap: anywhere; text-wrap: pretty; }
#sidebar #sidebar-analysis-back { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; margin-left: -8px; border-radius: 12px; color: var(--sidebar-muted); }
#sidebar #sidebar-analysis-back:hover { color: var(--sidebar-blue); background: var(--sidebar-selected); }
#sidebar .sidebar-analysis-toolbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
#sidebar .sidebar-analysis-time { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--sidebar-muted); }
#sidebar .sidebar-analysis-time > i { font-size: 11px; opacity: .8; }
#sidebar #radar-timestamp { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--sidebar-muted); font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; }
#sidebar .sidebar-analysis-tools { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
#sidebar .sidebar-analysis-tools button { min-height: 44px !important; height: 44px !important; min-width: 44px; box-shadow: none; }
#sidebar #tab-tracker .sidebar-analysis-tools #btnPast { width: auto !important; min-width: 44px !important; flex-shrink: 0; padding: 0 10px; gap: 5px; font-size: 11px; border-radius: 12px; color: var(--sidebar-muted); background: var(--sidebar-inset); }
#sidebar #btnPast:hover { color: var(--sidebar-blue); background: var(--sidebar-selected); }
#sidebar #tab-tracker .sidebar-analysis-tools #btnPast.active { color: var(--sidebar-blue); background: var(--sidebar-selected); box-shadow: inset 0 0 0 1px var(--sidebar-blue); }
#sidebar #radar-comparison-note { margin: 0; color: var(--sidebar-muted); font-size: 10px; line-height: 1.6; font-variant-numeric: tabular-nums; text-wrap: pretty; }
#sidebar .sidebar-analysis-tools #btnPlay { min-width: 66px; padding: 0 12px !important; border-radius: 12px; }
#sidebar #tab-tracker .analysis-card { animation: none; transition: box-shadow .15s ease; }
#sidebar .sidebar-secondary-button:hover, #sidebar .sidebar-analysis-link:hover { background: var(--sidebar-selected); }
#sidebar .province-filter { display: flex; gap: 8px; align-items: center; color: var(--sidebar-muted); padding: 0 10px; border: 1px solid var(--sidebar-border); border-radius: 10px; background: var(--sidebar-inset); }
#sidebar #station-province { width: 100%; min-width: 0; min-height: 44px; color: var(--sidebar-ink); background: transparent; font-size: 12px; border: 0; }
#sidebar #station-province option { color: var(--sidebar-ink); background: var(--sidebar-surface); }
#sidebar .station-results-scroll { min-height: 0; scrollbar-width: thin; }
#sidebar .station-results-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 0 2px 10px; color: var(--sidebar-ink); font-size: 12px; font-weight: 600; }
#sidebar #station-results-count { color: var(--sidebar-muted); font-size: 11px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
#sidebar #station-coverage-note { padding: 0 2px 8px; }
#sidebar #province-search-results { padding-bottom: 12px; }
#sidebar .province-result { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 8px 12px; margin-top: 6px; background: var(--sidebar-selected); border: 1px solid var(--sidebar-border); border-radius: 10px; color: var(--sidebar-blue); font-size: 13px; text-align: left; }
#sidebar .province-result::after { content: '›'; margin-left: auto; }
#sidebar #station-results-empty { padding: 16px 4px; }
#sidebar button:focus-visible, #sidebar select:focus-visible { outline: 2px solid var(--sidebar-blue); outline-offset: -2px; }
#sidebar [hidden] { display: none !important; }
@media (max-width: 768px) {
    #sidebar #station-search { font-size: 13px; line-height: 20px; }
    #sidebar .sidebar-search > i { font-size: 14px; }
    #sidebar #station-province { min-height: 40px; font-size: 11px; }
    #sidebar .station-item { min-height: 48px; }
    #sidebar .station-time { font-size: 10px !important; }
    #sidebar .station-results-heading { font-size: 11px; }
}
@media (max-width: 360px) {
    #sidebar #btnPast > span { display: none; }
    #sidebar #tab-tracker .sidebar-analysis-tools #btnPast { width: 44px !important; padding: 0; }
    #sidebar .sidebar-navigation .tab-pill { padding: 6px 4px !important; font-size: 11px !important; gap: 4px; }
    #sidebar .sidebar-navigation [data-tab='composite'] > i { display: none; }
}
@media (prefers-reduced-motion: reduce) { #sidebar .tab-content { transition: none; } }

/* Desktop rail: only the visible cards and controls should receive input. */
@media (min-width: 769px) {
    #sidebar { pointer-events: none; }
    #sidebar > * { pointer-events: auto; }
}

/* Weather-layer navigation needs an explicit affordance and a real tap row. */
.feature-menu { margin: 2px 1px 0; font-size: 12px; color: var(--sidebar-muted); }
.feature-menu summary {
    display: flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 8px; border-radius: 10px;
    cursor: pointer; list-style: none;
}
.feature-menu summary::-webkit-details-marker { display: none; }
.feature-menu summary:hover { background: var(--sidebar-selected); color: var(--sidebar-ink); }
.feature-menu-chevron { margin-left: auto; font-size: 10px; color: var(--sidebar-muted); transition: transform .2s ease; }
.feature-menu[open] .feature-menu-chevron { transform: rotate(180deg); }
.feature-menu a {
    display: flex; align-items: center; min-height: 44px;
    padding: 8px 8px 8px 34px; border-radius: 10px;
    color: var(--sidebar-ink); font-size: 12px; text-decoration: none;
}
.feature-menu a:hover { background: var(--sidebar-selected); color: var(--sidebar-blue); }

/* Mobile: remove the tallest parts of the plate while keeping the brand and clock legible. */
@media (max-width: 768px) {
    #sidebar .sidebar-header-panel { padding: 8px !important; gap: 3px; }
    #sidebar .sidebar-brand { min-height: 36px; padding-right: 44px; }
    #sidebar .sidebar-brand .brand-logo { max-width: 168px; max-height: 40px; }
    #sidebar .sidebar-clock { padding: 4px 8px; margin: 0; gap: 6px; }
    #sidebar .sidebar-clock-symbol { width: 24px; height: 24px; font-size: 11px; }
    #sidebar .sidebar-clock-main { gap: 6px; }
    #sidebar #current-timezone-label { font-size: 8px; line-height: 11px; }
    #sidebar #current-time { font-size: 20px !important; line-height: 23px; }
    #sidebar #current-date { font-size: 11px !important; line-height: 14px; }
    #sidebar .sidebar-calendar { gap: 2px; padding-left: 8px; }
    #sidebar .sidebar-calendar-heading { font-size: 8px; line-height: 11px; }
    #sidebar .sidebar-navigation { padding: 3px; gap: 3px; }
    #sidebar .sidebar-navigation .tab-pill { min-height: 40px; padding: 5px 6px !important; }
    #sidebar .feature-menu { margin-top: 0; }
    #sidebar .feature-menu summary { min-height: 40px; }

    /* Analysis is unavailable until a station is selected; don't spend list height on it. */
    #sidebar #tab-btn-tracker:disabled { display: none !important; }
    #sidebar:has(#tab-btn-tracker:disabled) #station-analysis-hint { display: none !important; }

    /* The drawer owns the lower-left map corner; timeline actions would sit over it. */
    body:has(#sidebar.sidebar-visible) #timeline-actions { display: none !important; }
}

/* The station list kept only the height the fixed sidebar header left over:
   0 px on an iPhone SE, 64 px on an iPhone 13, 134 px on a 1366x768 laptop
   (2026-11-19). The panel keeps room for about four stations (search, filter,
   analysis link and hint take ~227 px, ~207 px on narrow screens); on a
   shorter screen the sidebar itself scrolls. */
#sidebar[data-sidebar-view='stations'][data-station-picker='expanded'] #radar-sidebar-content {
    min-height: 460px;
}
@media (max-width: 768px) {
    #sidebar[data-sidebar-view='stations'][data-station-picker='expanded'] #radar-sidebar-content {
        min-height: 440px;
    }
}
