.md3-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1002;
    box-sizing: border-box;
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 4px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--md-sys-elevation-2);
}

.md3-topbar__title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.md3-topbar__title .material-symbols-outlined {
    flex: none;
    font-size: 24px;
    color: var(--md-sys-color-primary);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.md3-topbar__title span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(15px, 4.2vw, 22px);
    font-weight: 500;
    line-height: 28px;
}

.md3-topbar__actions {
    flex: none;
    display: flex;
    align-items: center;
}

.md3-icon-toggle {
    position: relative;
    flex: none;
    width: 40px;
    height: 40px;
    margin: 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 200ms var(--md-sys-motion-standard), color 200ms var(--md-sys-motion-standard);
}

.md3-icon-toggle::before {
    content: '';
    position: absolute;
    inset: -4px;
}

.md3-icon-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity 150ms var(--md-sys-motion-standard);
}

.md3-icon-toggle:hover::after { opacity: 0.08; }
.md3-icon-toggle:active::after { opacity: 0.12; }

.md3-icon-toggle:focus-visible {
    outline: 3px solid var(--md-sys-color-secondary);
    outline-offset: 1px;
}

.md3-icon-toggle .material-symbols-outlined {
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.md3-icon-toggle[aria-pressed="true"] {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.md3-icon-toggle[aria-pressed="true"] .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

#bo_gmap .leaflet-top {
    margin-top: calc(64px + env(safe-area-inset-top));
}

#bo_gmap.wx-hide-lightning .leaflet-strokes-pane,
#bo_gmap.wx-hide-lightning .leaflet-circles-pane {
    display: none;
}

.wx-popup__text {
    font-size: 14px;
    line-height: 20px;
}

.wx-popup__provider {
    margin-top: 6px;
    color: #5f6368;
    font-size: 13px;
    line-height: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .md3-icon-toggle,
    .md3-icon-toggle::after {
        transition: none;
    }
}
