:root {
    --app-map-background: #05090e;
    --app-panel-background: #05080c;
    --camera-marker-color: #70d0ff;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--app-map-background);
    color: #e8eef8;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    position: absolute;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    top: 0;
    right: 156px;
    left: 0;
    height: 100px;
    padding: 12px 26px;
    background: linear-gradient(180deg, rgba(4, 9, 14, 0.96), rgba(4, 9, 14, 0.74) 72%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 72px; height: 72px; flex: none; background: linear-gradient(145deg, var(--camera-marker-color), var(--app-panel-background)); -webkit-mask: url("/logo.png") center / contain no-repeat; mask: url("/logo.png") center / contain no-repeat; }
.brand-wordmark { position: relative; top: -9px; width: 180px; height: 56px; flex: none; background: color-mix(in srgb, var(--camera-marker-color) 82%, white); -webkit-mask: url("/logo_text.png") center 45% / 100% auto no-repeat; mask: url("/logo_text.png") center 45% / 100% auto no-repeat; }
.map-shell { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--app-map-background); }
#map .labels-tiles { filter: brightness(1.18) saturate(0.75); }
#map::after {
    position: absolute;
    z-index: 550;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(75, 179, 197, 0.1) 0 1px, transparent 1px 104px),
        repeating-linear-gradient(90deg, rgba(75, 179, 197, 0.08) 0 1px, transparent 1px 104px),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 4px);
    content: "";
    pointer-events: none;
}
.map-tile-status {
    position: absolute;
    z-index: 1100;
    top: 14px;
    left: 50%;
    max-width: calc(100% - 32px);
    transform: translateX(-50%);
    overflow: hidden;
    padding: 7px 12px;
    border: 1px solid rgba(166, 197, 226, 0.28);
    border-radius: 14px;
    background: rgba(6, 11, 20, 0.92);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    color: #cdd8ea;
    font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}
.map-tile-status[data-state="loading"] { border-color: rgba(245, 166, 35, 0.6); color: #f5c46d; }
.map-tile-status[data-state="loaded"] { border-color: rgba(62, 207, 142, 0.45); color: #8de0b6; }
.map-tile-status .map-tile-protocol { margin-left: 5px; }
.map-tile-status .map-tile-protocol[data-http2="true"] { color: #3ecf8e; }
.map-tile-status .map-tile-protocol[data-http2="false"] { color: #ff737d; }
.layer-dock {
    position: fixed;
    z-index: 900;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: 156px;
    flex-direction: column;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 6px 8px;
    background: var(--app-panel-background);
    color: #e8eef8;
    font: 16px/1.2 ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}
.layer-dock-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; padding: 4px 6px 9px; border-bottom: 1px solid rgba(11, 211, 211, 0.22); }
.layer-dock-head b { display: flex; align-items: center; gap: 7px; margin-bottom: 1px; color: #0bd3d3; font: 700 13.5px/1.15 Inter, ui-sans-serif, system-ui, sans-serif; text-shadow: 0 0 10px rgba(11, 211, 211, 0.4); white-space: nowrap; }
.layer-dock-head svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(11, 211, 211, 0.6)); }
.layer-dock-head > span { overflow: hidden; color: #6f8a90; font: 500 10.5px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.layer-dock-head small { color: #7a8e98; font: 8.5px/1.35 Inter, ui-sans-serif, system-ui, sans-serif; }
.map-label-controls { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 30px; padding: 0 4px 2px; }
.ctrlbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 3px 6px; border: 1px solid rgba(89, 197, 207, 0.2); border-radius: 7px; background: rgba(6, 14, 20, 0.58); color: #afc3cf; font: 13px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.ctrlbtn.active { border-color: #0bd3d3; color: #f2ffff; background: rgba(11, 211, 211, 0.13); }
.ctrlbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.ctrl-opacity { writing-mode: horizontal-tb; direction: ltr; appearance: auto; width: 72px; height: 30px; margin: 0 2px; accent-color: #0bd3d3; }
.ctrl-opacity:disabled { opacity: 0.4; }
.layer-row {
    display: grid;
    width: 100%;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    height: 42px;
    min-height: 42px;
    padding: 0 8px 0 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    transition: background 120ms, border-color 120ms, box-shadow 120ms, transform 100ms;
}
.layer-row:not(:disabled) { cursor: pointer; }
.layer-row:not(:disabled):hover { border-color: rgba(78, 205, 217, 0.3); background: rgba(11, 211, 211, 0.08); }
.layer-row:not(:disabled):active { transform: scale(0.97); }
.layer-row:focus-visible { outline: 2px solid #dbe9ff; outline-offset: 2px; }
.layer-row:disabled { cursor: not-allowed; opacity: 0.42; }
.layer-icon { display: inline-flex; position: relative; width: 24px; height: 24px; align-items: center; justify-content: center; background: transparent; color: var(--layer-color); filter: drop-shadow(0 0 3px currentColor); transition: color 150ms, opacity 150ms; }
.layer-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.layer-camera { --layer-color: var(--camera-marker-color); }
.layer-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.layer-copy strong { color: #eafeff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.layer-copy > span { margin-top: 1px; overflow: hidden; color: #6f8a90; font: 400 9.5px/1.12 Inter, ui-sans-serif, system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.layer-copy small { display: none; }
.layer-row kbd { position: absolute; top: 50%; right: 5px; display: inline-flex; height: 16px; min-width: 16px; align-items: center; justify-content: center; padding: 0 3px; transform: translateY(-50%); border: 1px solid rgba(111, 138, 144, 0.45); border-radius: 4px; color: #6f8a90; font: 700 9px/1 ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; opacity: 0.55; transition: opacity 120ms, color 120ms, border-color 120ms; }
.layer-row:hover kbd, .layer-row[aria-pressed="true"] kbd { border-color: color-mix(in srgb, var(--layer-color) 60%, transparent); color: #eafeff; opacity: 1; }
.layer-row:disabled .layer-icon { color: #53666d; filter: none; opacity: 0.75; }
.layer-row:disabled .layer-copy strong, .layer-row:disabled .layer-copy > span { color: #53666d; }
.layer-camera[aria-pressed="true"] { border-color: var(--layer-color); background: color-mix(in srgb, var(--layer-color) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--layer-color) 45%, transparent), 0 0 12px color-mix(in srgb, var(--layer-color) 30%, transparent); }
.layer-camera[aria-pressed="true"]::before { position: absolute; top: 4px; bottom: 4px; left: -6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--layer-color); box-shadow: 0 0 8px var(--layer-color); content: ""; }
.layer-camera.is-off { opacity: 0.55; }
.leaflet-top.leaflet-left { top: auto; bottom: 14px; }
.leaflet-control-zoom a { border-color: rgba(89, 197, 207, 0.24) !important; background: #09141b !important; color: #bad1d7 !important; }
.leaflet-control-zoom a:hover { background: #132b35 !important; color: #22cbd0 !important; }
.address-search { position: fixed; z-index: 950; top: 88px; left: 14px; width: min(380px, calc(100vw - 190px)); padding: 10px 12px 8px; border: 1px solid rgba(72, 223, 255, 0.42); border-radius: 10px; background: rgba(5, 16, 24, 0.92); box-shadow: 0 0 24px rgba(32, 188, 232, 0.18), 0 8px 28px rgba(0, 0, 0, 0.35); color: #daf8ff; backdrop-filter: blur(12px); }
.floating-tool-titlebar { display: flex; min-height: 14px; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; cursor: grab; touch-action: none; user-select: none; }
.floating-tool-titlebar:active, .is-dragging .floating-tool-titlebar { cursor: grabbing; }
.floating-tool-titlebar:focus-visible { outline: 1px solid var(--camera-marker-color); outline-offset: 3px; border-radius: 3px; }
.floating-tool-title { color: #70d9ed; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.floating-tool-collapse, .floating-tool-expand { display: inline-flex; flex: none; align-items: center; justify-content: center; padding: 2px 6px; border: 1px solid rgba(72, 223, 255, 0.36); border-radius: 5px; background: rgba(32, 188, 232, 0.1); color: #b8efff; cursor: pointer; }
.floating-tool-collapse { width: 22px; height: 20px; padding: 0; font: 16px/1 ui-sans-serif, system-ui, sans-serif; }
.floating-tool-collapse > span { display: block; transform: translateY(-1px); }
.floating-tool-expand { display: none; border: 0; background: transparent; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.floating-tool-collapse:hover, .floating-tool-expand:hover { background: rgba(32, 188, 232, 0.28); color: #fff; }
.floating-tool-collapse:focus-visible, .floating-tool-expand:focus-visible { outline: 2px solid #dffaff; outline-offset: 2px; }
.floating-tool-body { display: block; }
.address-search.is-collapsed, .coordinate-radius-tool.is-collapsed { width: max-content; min-width: 0; padding: 4px 8px; }
.is-collapsed .floating-tool-titlebar { margin: 0; cursor: pointer; }
.is-collapsed .floating-tool-title, .is-collapsed .floating-tool-collapse, .is-collapsed .floating-tool-body { display: none; }
.is-collapsed .floating-tool-expand { display: inline-flex; }
.address-search label { display: block; margin-bottom: 6px; color: #70d9ed; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.address-search-controls { display: flex; gap: 6px; }
.address-search-controls input { min-width: 0; flex: 1; padding: 7px 9px; border: 1px solid rgba(130, 194, 210, 0.28); border-radius: 6px; outline: none; background: rgba(2, 9, 14, 0.88); color: #e8fbff; font: 12px/1.2 ui-sans-serif, system-ui, sans-serif; }
.address-search-controls input:focus { border-color: #48dfff; box-shadow: 0 0 0 2px rgba(72, 223, 255, 0.16); }
.address-search-controls input[aria-invalid="true"] { border-color: #ff737d; }
.address-search-controls button { padding: 0 12px; border: 1px solid rgba(72, 223, 255, 0.55); border-radius: 6px; background: rgba(32, 188, 232, 0.18); color: #dffaff; font: 650 11px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.address-search-controls button:hover { background: rgba(32, 188, 232, 0.32); }
.address-search-controls button:focus-visible { outline: 2px solid #dffaff; outline-offset: 2px; }
.address-search-controls button:disabled { cursor: wait; opacity: 0.65; }
.address-search output { display: block; min-height: 12px; margin-top: 6px; color: #83aeb9; font: 10px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; }
.address-search output[data-state="error"] { color: #ff9298; }
.address-search output[data-state="success"] { color: #8de0b6; }
.address-search small { display: block; margin-top: 4px; color: #607d86; font: 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.coordinate-radius-tool { position: fixed; z-index: 950; bottom: 14px; left: 70px; width: min(390px, calc(100vw - 250px)); padding: 10px 12px 8px; border: 1px solid rgba(72, 223, 255, 0.42); border-radius: 10px; background: rgba(5, 16, 24, 0.9); box-shadow: 0 0 24px rgba(32, 188, 232, 0.18), 0 8px 28px rgba(0, 0, 0, 0.35); color: #daf8ff; backdrop-filter: blur(12px); }
.coordinate-radius-tool label { display: block; margin-bottom: 6px; color: #70d9ed; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.coordinate-radius-controls { display: flex; gap: 6px; }
.coordinate-radius-controls input { min-width: 0; flex: 1; padding: 7px 9px; border: 1px solid rgba(130, 194, 210, 0.28); border-radius: 6px; outline: none; background: rgba(2, 9, 14, 0.88); color: #e8fbff; font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.coordinate-radius-controls input:focus { border-color: #48dfff; box-shadow: 0 0 0 2px rgba(72, 223, 255, 0.16); }
.coordinate-radius-controls input[aria-invalid="true"] { border-color: #ff737d; }
.coordinate-radius-controls button { padding: 0 12px; border: 1px solid rgba(72, 223, 255, 0.55); border-radius: 6px; background: rgba(32, 188, 232, 0.18); color: #dffaff; font: 650 11px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.coordinate-radius-controls button:hover { background: rgba(32, 188, 232, 0.32); }
.coordinate-radius-controls button:focus-visible { outline: 2px solid #dffaff; outline-offset: 2px; }
.coordinate-radius-settings { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #83aeb9; font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.coordinate-radius-settings input { width: 72px; padding: 4px 6px; border: 1px solid rgba(130, 194, 210, 0.28); border-radius: 5px; background: rgba(2, 9, 14, 0.88); color: #e8fbff; font: inherit; }
.coordinate-radius-settings input:focus { border-color: #48dfff; outline: 2px solid rgba(72, 223, 255, 0.16); }
.coordinate-radius-settings input[aria-invalid="true"] { border-color: #ff737d; }
.coordinate-radius-settings output { min-height: 12px; margin-left: auto; color: #83aeb9; }
.coordinate-zoom-setting { display: grid; grid-template-columns: auto auto minmax(60px, 1fr) auto 48px; align-items: center; gap: 6px; margin-top: 7px; color: #83aeb9; font: 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.coordinate-zoom-setting label { margin: 0; color: #70d9ed; letter-spacing: 0.02em; text-transform: none; white-space: nowrap; }
.coordinate-zoom-setting input[type="range"] { width: 100%; margin: 0; accent-color: #48dfff; cursor: ew-resize; }
.coordinate-zoom-setting input[type="number"] { width: 48px; padding: 4px; border: 1px solid rgba(130, 194, 210, 0.28); border-radius: 5px; background: rgba(2, 9, 14, 0.88); color: #e8fbff; font: inherit; }
.coordinate-zoom-setting input[type="number"]:focus { border-color: #48dfff; outline: 2px solid rgba(72, 223, 255, 0.16); }
.coordinate-zoom-setting input[aria-invalid="true"] { border-color: #ff737d; }
.coordinate-radius-circle { filter: drop-shadow(0 0 7px rgba(72, 223, 255, 0.7)); }
.map-perf-hud {
    position: absolute;
    z-index: 700;
    bottom: 14px;
    left: 14px;
    width: 208px;
    padding: 12px 14px 11px;
    border: 1px solid rgba(166, 197, 226, 0.28);
    border-radius: 9px;
    background: rgba(11, 20, 34, 0.91);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    color: #e8eef8;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    backdrop-filter: blur(9px);
    display: none;
}
.map-perf-heading { display: flex; align-items: center; justify-content: space-between; color: #9aabc1; font-size: 9px; font-weight: 700; letter-spacing: 0.13em; }
.map-perf-live { display: inline-flex; align-items: center; gap: 5px; color: #80d9b0; font-size: 8px; letter-spacing: 0.1em; }
.map-perf-live i { width: 6px; height: 6px; border-radius: 50%; background: #61d99f; box-shadow: 0 0 8px rgba(97, 217, 159, 0.75); }
.map-perf-primary { display: flex; align-items: baseline; gap: 8px; margin: 3px 0 5px; }
.map-perf-primary strong { color: #f4f8ff; font-size: 35px; font-weight: 650; line-height: 1.1; }
.map-perf-primary span { color: #aebbd0; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }
.map-perf-fps-bar { height: 7px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.map-perf-fps-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: #61d99f; transition: width 0.2s, background 0.2s; }
.map-perf-sparkline { display: block; width: 100%; height: 40px; margin: 8px 0; border-radius: 4px; background: #080e18; }
.map-perf-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding-top: 8px; border-top: 1px solid rgba(166, 197, 226, 0.16); }
.map-perf-metrics div { display: flex; flex-direction: column; gap: 3px; }
.map-perf-metrics span { color: #8293aa; font-size: 8px; font-weight: 700; letter-spacing: 0.12em; }
.map-perf-metrics strong { color: #dce7f5; font-size: 11px; font-weight: 600; }
.map-perf-diagnosis { margin-top: 9px; padding: 6px 8px; border: 1px solid rgba(166, 197, 226, 0.16); border-radius: 5px; background: rgba(255, 255, 255, 0.05); color: #dce7f5; font-size: 9px; line-height: 1.4; }
.setup-message { max-width: 560px; margin: 12vh auto; padding: 28px; color: #d9e4f2; }
.setup-message h1 { margin: 0 0 12px; font-size: 22px; }
.setup-message p { color: #aebbd0; line-height: 1.6; }
.setup-message code { color: #80d9ed; }
.hotreload-error-banner {
    position: fixed;
    z-index: 2000;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 12px 18px;
    border-top: 1px solid #ffb4b4;
    background: #9f1d2d;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.3);
    color: #fff;
    font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
}

.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 10px !important; }
.device-panel {
    position: fixed;
    z-index: 1050;
    top: 0;
    bottom: 0;
    left: 0;
    width: 380px;
    max-width: 92vw;
    padding: 18px;
    border-right: 1px solid rgba(89, 197, 207, 0.24);
    background: rgba(6, 12, 17, 0.96);
    color: #cfe9ec;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 220ms ease, opacity 220ms ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.device-panel.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.device-panel-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.device-panel-glyph { display: inline-flex; flex: none; width: 18px; height: 22px; align-items: center; color: #0bd3d3; }
.device-panel-glyph svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.device-panel h2 { flex: 1; min-width: 0; margin: 0; color: #eafeff; font: 700 16px/1.25 ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; letter-spacing: 1px; overflow-wrap: anywhere; }
.device-panel-close { display: inline-flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center; margin: -5px -5px 0 0; padding: 6px; border: 0; background: none; color: #6f8a90; cursor: pointer; line-height: 1; }
.device-panel-close:hover { color: #0bd3d3; }
.device-panel-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.device-panel-meta { margin-top: 14px; color: #cfe9ec; font-size: 12px; }
.device-panel-meta > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(111, 138, 144, 0.35); }
.device-panel-meta span { flex: none; color: #6f8a90; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.device-panel-meta b { min-width: 0; color: #eafeff; font-size: 12px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.device-panel::-webkit-scrollbar { width: 10px; }
.device-panel::-webkit-scrollbar-track { background: transparent; }
.device-panel::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 6px; background: rgba(11, 211, 211, 0.28); background-clip: padding-box; }
.selected-camera-marker { position: absolute; z-index: 700; width: 30px; height: 30px; margin: 0; border: 2px solid #d9f4ff; border-radius: 50%; background: #168fe1; box-shadow: 0 0 0 4px rgba(65, 184, 255, 0.22), 0 0 18px rgba(65, 184, 255, 0.8); transform: translate(-50%, -50%); pointer-events: none; }
.selected-camera-marker[hidden] { display: none; }
.selected-camera-marker svg { position: absolute; inset: 5px; width: 16px; height: 16px; fill: #fff; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.selected-camera-marker::after { content: ""; position: absolute; inset: -3px; border: 1.5px solid var(--camera-marker-color); border-radius: 50%; opacity: 0; pointer-events: none; }
.selected-camera-marker.is-pulsing::after { animation: camera-marker-click-pulse 900ms ease-out both; }
.hover-camera-marker { position: absolute; z-index: 699; width: 34px; height: 34px; transform: translate(-50%, -50%); pointer-events: none; }
.hover-camera-marker[hidden] { display: none; }
.hover-camera-marker::before { content: ""; position: absolute; z-index: 2; inset: 0; border: 2px solid #168fff; border-radius: 50%; box-shadow: 0 0 0 3px rgba(22, 143, 255, 0.18), 0 0 16px rgba(22, 143, 255, 0.8); animation: camera-marker-breathe 2.4s ease-in-out infinite; }
.hover-camera-marker::after { content: ""; position: absolute; z-index: 1; inset: -4px; border: 1.5px solid #168fff; border-radius: 50%; opacity: 0; animation: camera-marker-wave 2.4s ease-out infinite; }
.hover-camera-connector { position: absolute; z-index: 1; left: 17px; top: -41px; width: 100px; height: 58px; overflow: visible; }
.hover-camera-connector path { fill: none; stroke: #12d5d5; stroke-width: 1.4; stroke-dasharray: 120; stroke-dashoffset: 120; vector-effect: non-scaling-stroke; }
.hover-camera-tooltip { position: absolute; z-index: 2; top: -82px; left: 117px; display: flex; width: max-content; max-width: 264px; box-sizing: border-box; flex-direction: column; align-items: center; gap: 7px; padding: 9px 13px; transform-origin: left center; border: 1px solid rgba(18, 213, 213, 0.38); border-top: 2px solid #12d5d5; border-radius: 6px; background: rgba(5, 15, 21, 0.94); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); color: #d8f5f5; font: 600 12px/1.3 ui-monospace, "Cascadia Code", Consolas, monospace; text-align: center; }
.hover-camera-tooltip > span:not(.hover-camera-divider) { max-width: 236px; overflow-wrap: anywhere; }
.hover-camera-divider { width: 100%; height: 1px; background: rgba(18, 213, 213, 0.75); transform: scaleX(0); transform-origin: left; }
.hover-camera-divider[hidden] { display: none; }
.hover-camera-marker.is-revealing .hover-camera-tooltip { animation: hover-label-in 220ms ease-out 220ms both; }
.hover-camera-marker.is-revealing .hover-camera-connector path { animation: hover-connector-in 220ms ease-out both; }
.hover-camera-marker.is-revealing .hover-camera-divider { animation: hover-divider-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) 440ms both; }
.hover-camera-marker.is-revealing #hover-camera-address,
.hover-camera-marker.is-revealing #hover-camera-state { animation: hover-copy-in 180ms ease-out 740ms both; }
.hover-camera-marker.is-leaving::before { animation: hover-marker-out 180ms ease-in both; }
.hover-camera-marker.is-leaving::after { animation: hover-marker-out 180ms ease-in both; }
.hover-camera-marker.is-leaving .hover-camera-connector path { animation: hover-connector-out 140ms ease-in both; }
.hover-camera-marker.is-leaving .hover-camera-tooltip { animation: hover-label-out 180ms ease-in both; }
.hover-camera-marker:not(.has-label) .hover-camera-connector,
.hover-camera-marker:not(.has-label) .hover-camera-tooltip { display: none; }
.hover-camera-spinner { position: absolute; z-index: 4; top: 50%; left: 50%; display: none; width: 22px; height: 22px; margin: -13px 0 0 -13px; border: 2px solid rgba(18, 213, 213, 0.2); border-top-color: #12d5d5; border-right-color: #12d5d5; border-radius: 50%; background: rgba(5, 15, 21, 0.9); box-shadow: 0 0 12px rgba(18, 213, 213, 0.7); animation: camera-marker-spinner 750ms linear infinite; }
.hover-camera-marker.is-loading .hover-camera-spinner { display: block; }
.hover-camera-marker.is-loading .hover-camera-connector,
.hover-camera-marker.is-loading .hover-camera-tooltip { display: none; }
@keyframes camera-marker-breathe { 0%, 100% { opacity: 0.95; } 50% { opacity: 0.6; } }
@keyframes camera-marker-wave { 0% { transform: scale(0.85); opacity: 0.85; } 70%, 100% { transform: scale(2.05); opacity: 0; } }
@keyframes camera-marker-click-pulse { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(2.05); opacity: 0; } }
@keyframes camera-marker-spinner { to { transform: rotate(360deg); } }
@keyframes hover-label-in { from { opacity: 0; transform: translateX(-12px) scaleX(0.88); } to { opacity: 1; transform: translateX(0) scaleX(1); } }
@keyframes hover-label-out { to { opacity: 0; transform: translateX(-10px) scaleX(0.82); } }
@keyframes hover-connector-in { to { stroke-dashoffset: 0; } }
@keyframes hover-connector-out { to { stroke-dashoffset: 120; opacity: 0; } }
@keyframes hover-divider-in { 0% { transform: scaleX(0); } 48% { transform: scaleX(1); } 70% { transform: scaleX(0.72); } 100% { transform: scaleX(1); } }
@keyframes hover-copy-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hover-marker-out { to { transform: scale(0.7); opacity: 0; } }

@media (min-width: 1022px) {
    .address-search { top: auto; bottom: 14px; left: 472px; width: min(380px, calc(100vw - 642px)); }
}

@media (max-width: 560px) {
    .topbar { right: 190px; height: 72px; gap: 10px; padding: 8px 10px; }
    .brand-mark { width: 56px; height: 56px; }
    .brand > span:not(.brand-mark) { display: none; }
    .layer-dock { top: 0; right: 0; bottom: 0; width: 190px; padding: 12px 8px; }
    .device-panel { width: min(380px, calc(100vw - 24px)); }
    .map-perf-hud { bottom: 10px; left: 10px; width: 174px; padding: 9px 10px; }
    .map-perf-primary strong { font-size: 30px; }
    .map-tile-status { top: 10px; max-width: calc(100% - 200px); left: 12px; transform: none; font-size: 9px; }
    .address-search { top: 72px; left: 10px; width: calc(100vw - 214px); padding: 8px; }
    .address-search-controls input { font-size: 10px; }
    .coordinate-radius-tool { bottom: 10px; left: 58px; width: min(390px, calc(100vw - 258px)); padding: 8px; }
    .coordinate-radius-controls input { font-size: 10px; }
    .coordinate-radius-settings input { width: 60px; }
    .coordinate-zoom-setting { grid-template-columns: auto auto minmax(40px, 1fr) auto 44px; gap: 4px; font-size: 8px; }
    .coordinate-zoom-setting input[type="number"] { width: 44px; }
}
