.sse-viewer .sse-annotations > .sse-annotation {
    --sse-annotation-bkg: rgba(29, 16, 13, .82);
    color: #fff0e4;
    border: 1px solid #ff95578c;
    border-left: 3px solid #ff9959;
    border-radius: 2px 11px 2px 8px;
    background:
        repeating-linear-gradient(0deg, #ff95530a 0 1px, transparent 1px 5px),
        linear-gradient(115deg, #2b150bd4, #140d12bd 85%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 16px #ff793643, inset 0 0 14px #ff79361a;
    font: 13px/1.5 ui-monospace, monospace;
}

.sse-viewer .sse-annotations > .sse-annotation > .sse-annotation-title {
    color: #ffc29b;
    font: 700 14px/1.35 ui-monospace, monospace;
    letter-spacing: .04em;
    text-shadow: 0 0 9px #ff8b4ba8;
}

.sse-viewer .sse-annotations > .sse-annotation > .sse-annotation-text {
    padding-top: 5px;
    border-top: 1px solid #ff975448;
    white-space: pre-wrap;
}

.sse-viewer.poi-area-selected .sse-annotations > .sse-annotation.sse-visible {
    top: auto;
    left: max(12px, env(safe-area-inset-left));
    bottom: calc(76px + env(safe-area-inset-bottom));
    transform: none !important;
}

.sse-viewer.poi-area-selected .sse-annotation.sse-visible::before { display: none; }

@media (max-width: 600px) {
    .sse-viewer.poi-area-selected .sse-annotations > .sse-annotation.sse-visible {
        max-width: min(260px, calc(50% - 16px));
    }
}

.sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot {
    color: #ffc29a;
    border-color: #ff9959;
    background: #1f1009cf;
    box-shadow: 0 0 9px #ff8a4750;
    font-family: ui-monospace, monospace;
    opacity: .72;
    animation: teules-marker-dim 850ms ease-out 3s forwards;
}

@keyframes teules-marker-dim {
    to { opacity: .32; }
}

.sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot.sse-occluded,
.sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot.sse-occluded.sse-active {
    opacity: .18;
    animation: none;
}

.sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot.sse-active {
    color: #1b0b03;
    border-color: #ffad77;
    background: #ffad77;
}

.sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot:focus-visible {
    animation: none;
    opacity: 1;
    outline: 2px solid #ffcaab;
    outline-offset: 2px;
}

@media (hover: hover) {
    .sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot:hover {
        animation: none;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sse-viewer .sse-annotations > .sse-annotation-hotspots > .sse-annotation-hotspot {
        animation-duration: 0s;
        transition-duration: 0s;
    }
}

.sse-viewer .incidents-hud {
    position: absolute;
    z-index: 3;
    top: max(66px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    width: min(290px, calc(100% - 28px));
    border: 1px solid #ff92548c;
    border-radius: 2px 13px 2px 10px;
    background:
        repeating-linear-gradient(0deg, #ff955307 0 1px, transparent 1px 5px),
        linear-gradient(115deg, #271208c2, #130c10a8 70%, #31170aad);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    box-shadow: 0 0 16px #ff79364a, inset 0 0 18px #ff79361c;
    color: #fff0e4;
    font: 14px/1.4 ui-monospace, monospace;
}

.sse-viewer .incidents-hud button {
    display: flex;
    box-sizing: border-box;
    align-items: baseline;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    color: inherit;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
    -webkit-tap-highlight-color: #ff995944;
    font: inherit;
}

.sse-viewer .incidents-hud .incidents-heading {
    align-items: center;
    justify-content: space-between;
    border-left-color: #ff9959;
    border-top-right-radius: 12px;
    background: linear-gradient(90deg, #ff86432c, transparent 80%);
    color: #ffc29b;
    text-shadow: 0 0 11px #ff8b4bc9;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.sse-viewer .incidents-heading::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.sse-viewer .incidents-heading[aria-expanded="false"]::after { transform: rotate(-45deg); }
.sse-viewer .incidents-hud ol {
    list-style: none;
    max-height: min(35vh, 310px);
    overflow: auto;
    border-top: 1px solid #ff975470;
    border-bottom-left-radius: 9px;
    scrollbar-color: #b5683e #140a0866;
}
.sse-viewer .incidents-hud ol,
.sse-viewer .incidents-hud ol * { touch-action: pan-y; }
.sse-viewer .incidents-hud li + li { border-top: 1px solid #ff97542a; }
.sse-viewer .incidents-number { color: #ffc09ab3; flex: none; }
.sse-viewer .incidents-hud li button:hover { background: #ff925232; }
.sse-viewer .incidents-hud button[aria-current="true"] {
    background: linear-gradient(90deg, #ff7b404f, #ff925217);
    color: #ffd5b8;
    border-left-color: #ffac75;
    box-shadow: inset 0 0 12px #ff7b4030;
    text-shadow: 0 0 8px #ff854fa0;
    font-weight: 700;
}

@media (max-width: 600px) {
    .sse-viewer .incidents-hud { width: min(238px, calc(100% - 28px)); font-size: 13px; }
}

.sse-viewer .poi-editor {
    position: absolute;
    z-index: 5;
    top: max(72px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: min(350px, calc(100% - 24px));
    max-height: calc(100% - 146px);
    overflow: auto;
    box-sizing: border-box;
    padding: 14px;
    color: #e4f2f5;
    border: 1px solid #6cdbe38a;
    border-radius: 5px;
    background: #0a1720f5;
    box-shadow: 0 8px 25px #0006;
    font: 14px/1.45 system-ui, sans-serif;
}

.sse-viewer .poi-editor, .sse-viewer .poi-editor * {
    touch-action: pan-y;
    user-select: auto;
    -webkit-user-select: auto;
}

.sse-viewer .poi-editor h1 {
    font: 700 17px/1.3 ui-monospace, monospace;
    color: #96f9f5;
}

.sse-viewer .poi-editor label {
    display: grid;
    gap: 3px;
    margin: 8px 0;
}

.sse-viewer .poi-editor input,
.sse-viewer .poi-editor textarea,
.sse-viewer .poi-editor select {
    box-sizing: border-box;
    width: 100%;
    min-height: 35px;
    padding: 7px;
    color: inherit;
    border: 1px solid #60828b;
    border-radius: 3px;
    background: #061019;
    font: 16px/1.4 system-ui, sans-serif;
}

.sse-viewer .poi-editor button,
.sse-viewer .poi-pick button,
.sse-viewer .poi-toggle {
    min-height: 35px;
    margin: 3px 5px 3px 0;
    padding: 5px 9px;
    color: #b0fff8;
    border: 1px solid #577780;
    border-radius: 3px;
    background: #13252e;
    cursor: pointer;
    font: 600 13px system-ui, sans-serif;
}

.sse-viewer .poi-toggle {
    position: absolute;
    z-index: 5;
    top: max(15px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    margin-right: 0;
}

.sse-viewer .poi-editor button:disabled { opacity: .45; cursor: default; }
.sse-viewer .poi-editor button[data-action="publish"] { background: #96f9f5; color: #08181a; }
.sse-viewer .poi-editor p { margin: 8px 0 0; }
.sse-viewer .poi-editor a { color: #96f9f5; }
.sse-viewer .poi-editor output { display: block; margin-top: 8px; min-height: 1.5em; }
.sse-viewer .poi-editor output[data-error="true"] { color: #ffb7a5; }

.sse-viewer .poi-pick {
    position: absolute;
    z-index: 6;
    inset: 0;
    cursor: crosshair;
}

.sse-viewer .poi-zone {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sse-viewer .poi-area-preview {
    position: absolute;
    box-sizing: border-box;
    min-width: 5px;
    min-height: 5px;
    border: 1px dashed #ffb782;
    background: #ff6d251d;
    box-shadow: 0 0 13px #ff794570;
    pointer-events: none;
}

.sse-viewer .poi-pick p {
    width: fit-content;
    max-width: calc(100% - 32px);
    margin: max(68px, env(safe-area-inset-top)) auto 0;
    padding: 6px 12px;
    border: 1px solid #6cdbe3;
    border-radius: 4px;
    color: #ecffff;
    background: #0a1720f5;
    font: 14px/1.4 system-ui, sans-serif;
}
