/* Brand theme: only the map tile pane is filtered, never markers or routes. */
.theme-switch { margin-left: auto; width: 42px; height: 25px; padding: 3px; border-radius: 20px; background: #9AAFB3; flex: none; transition: background .18s; }
.theme-switch::after { content: ''; display: block; width: 19px; height: 19px; border-radius: 50%; background: #FDFDFB; transition: transform .18s; }
[aria-checked="true"] .theme-switch { background: #19808C; }
[aria-checked="true"] .theme-switch::after { transform: translateX(17px); }
.profile-note { margin-top: 12px !important; font-size: 12px !important; line-height: 1.5; color: var(--muted); }
.profile-note button { border: 0; padding: 0; color: var(--green); background: none; text-decoration: underline; cursor: pointer; }
html[data-theme="dark"] {
    color-scheme: dark;
    --green: #19808C; --green-hover: #218F9B; --green-dark: #FFFFFF;
    --warm: #162A32; --page: #101F25; --surface: #203941; --surface-accent: #28454F;
    --ink: #EDF5F5; --muted: #C8CDCF; --line: #35515B; --input: #52717C;
    --paper: #101F25; --white: #162A32; --mint: #203941;
    --success-soft: #1C3940; --danger-soft: #422B34; --danger-dark: #F1ACB5;
    --unknown-soft: #2B3A42; --unknown-dark: #C1CED2;
    --shadow: 0 8px 30px rgba(0,0,0,.25);
    background: #101F25;
}
html[data-theme="dark"] #map { background: #14242B; }
html[data-theme="dark"] #map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.8) contrast(.88) saturate(.2); }
html[data-theme="dark"] :is(.topbar, .brand, .search, .header-icon, .site-menu, .page-topbar, .site-footer, .card, .report-dialog, .sheet, .community-picker, .search-results) {
    color: var(--ink); background: var(--warm); border-color: var(--line);
}
html[data-theme="dark"] :is(.brand, .menu-toggle, .search-toggle, .round-button, .install-action, .report-trigger, .language-selector, .social-links a, .site-menu nav a, .site-menu h2, .site-menu-head button, .footer-nav a, .footer-brand, .page-brand, .page-menu-toggle) { color: #FFFFFF; }
html[data-theme="dark"] .site-menu nav a:hover { background: #203941; }
html[data-theme="dark"] .site-menu-head button { background: #203941; }
html[data-theme="dark"] :is(.menu-legal, .footer-meta, .native-app-settings h2, .language-selector span) { color: #C8CDCF; }
html[data-theme="dark"] :is(.site-share-button, .community-add-button, .consent-settings-button, .language-selector select) { color: #FFFFFF; background: transparent; border-color: var(--line); }
html[data-theme="dark"] .search input { color: var(--ink); }
html[data-theme="dark"] :is(.report-dialog input, .report-dialog select, .language-selector select) { color: var(--ink); background: #101F25; border-color: var(--input); }
html[data-theme="dark"] :is(.search-result, .report-dialog p, .field-help, .optional-label, .hero-copy, .card p, .site-footer p) { color: var(--muted); }
html[data-theme="dark"] .search-result:hover { background: var(--surface); }
html[data-theme="dark"] .search-result { background: var(--warm); }
html[data-theme="dark"] :is(.toast, .location-hint, .location-tooltip) { background: #203941; color: #EDF5F5; border: 1px solid #52717C; }
html[data-theme="dark"] .topbar .brand, html[data-theme="dark"] .topbar .header-icon { background: transparent; }
html[data-theme="dark"] .leaflet-control-zoom a { color: #FFFFFF !important; background: #162A32 !important; border-color: #35515B !important; }
html[data-theme="dark"] #map .leaflet-control-attribution { color: #EDF5F5; background: rgba(16,31,37,.96) !important; }
html[data-theme="dark"] :is(.consent-banner, .consent-dialog, .consent-panel) { color: #EDF5F5; background: #162A32; border-color: #35515B; }
html[data-theme="dark"] :is(.consent-banner p, .consent-dialog p, .consent-panel p) { color: #C8CDCF; }
html[data-theme="dark"] :is(.consent-banner a, .consent-dialog a, .profile-note button) { color: #FFFFFF; }
html[data-theme="dark"] :is(.author-preview, .community-summary, .place-hours) { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] :is(.sheet-actions .secondary, .community-picker .secondary, .community-choice .secondary) { color: #FFFFFF; border-color: #52717C; }
html[data-theme="dark"] :is(.brand-drop, .social-links img, .location-icon) { filter: brightness(0) invert(1); }
@media (prefers-reduced-motion: reduce) { .theme-switch, .theme-switch::after { transition: none; } }

html[data-theme="dark"] .language-selector select { background: transparent; color: #fff; }
html[data-theme="dark"] .language-selector option { background: #162A32; color: #fff; }
html[data-theme="dark"] .site-menu .community-add-button { background: #19808C; color: #fff; border: 1px solid #19808C; }
html[data-theme="dark"] .site-menu .community-add-button:hover { background: #218F9B; }
html[data-theme="dark"] :is(.nearby-item, .nearby-item.unknown) { background: #162A32; color: #fff; border-color: #35515B; }
html[data-theme="dark"] .nearby-details strong { color: #fff; }
html[data-theme="dark"] .menu-character { color: #fff; }
html[data-theme="dark"] .search-icon { border-color: #fff; }
html[data-theme="dark"] .search-icon::after { background: #fff; }
