.map-notices {
    --notice-ink: #713f12;
    --notice-surface: #fffbeb;
    --notice-border: #d6a953;
    flex: none;
}

#map-container > .map-notices {
    position: absolute;
    inset: 8px 8px auto auto;
    z-index: 6;
}

.map-notices .map-notices-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid var(--notice-border);
    border-radius: 8px;
    background: var(--notice-surface);
    color: var(--notice-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.map-notices .map-notices-trigger:hover,
.map-notices:has(> :popover-open) .map-notices-trigger {
    background: #fef3c7;
}

.map-notices .sb-icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.map-notices :is(button, summary):focus-visible {
    outline: 2px solid var(--notice-ink);
    outline-offset: 2px;
}

.map-notices-panel[popover] { display: none; }
.map-notices-panel:popover-open { display: block; }

.map-notices-panel {
    box-sizing: border-box;
    position: fixed;
    z-index: 30;
    inset: 60px 12px auto auto;
    margin: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(420px, 70dvh);
    overflow: auto;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 8px 24px rgb(15 23 42 / 16%);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.map-notices-panel h2 {
    margin: 0 0 8px;
    font: inherit;
    font-weight: 700;
}

.map-notices-panel ul {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.map-notices-panel li {
    padding: 8px 0 8px 8px;
    border-top: 1px solid #e2e8f0;
    border-inline-start: 3px solid #e2e8f0;
    white-space: pre-line;
}

.map-notices .map-notices-panel button {
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.map-notices .map-notices-panel button:hover { background: #f1f5f9; }

@media (max-width: 1080px) {
    .sm-top-actions .map-notices-trigger span { display: none; }
}

@media (max-width: 360px) {
    .sm-top:has(.map-notices) {
        gap: 6px;
        padding-inline: 8px;
    }

    .sm-top:has(.map-notices) .sm-brand {
        gap: 5px;
        font-size: 18px;
    }

    .sm-top:has(.map-notices) .sm-brand img {
        width: 30px;
        height: 30px;
    }

    .sm-top:has(.map-notices) .sm-top-actions { gap: 2px; }
}
