:root {
    --app-map-background: #05090e;
    --app-panel-background: #05080c;
    --camera-marker-color: #70d0ff;
    --cctv-marker-color: #ff4d5d;
    --ski-board-marker-color: #d879e8;
    --customer-marker-color: #d5a6ff;
    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 .maplibregl-canvas { outline: none; }
#map .maplibregl-ctrl-bottom-left { bottom: 14px; }
#map .maplibregl-ctrl-group { background: #09141b; }
#map .maplibregl-ctrl-group button { filter: invert(0.82); }
#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-basemap-status { top: 52px; border-color: rgba(255, 115, 125, 0.7); color: #ffaaaa; white-space: normal; text-align: center; }
.map-basemap-status[hidden] { display: none; }
.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 {
    position: relative;
    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); transition: color 150ms, opacity 150ms, filter 150ms; }
.layer-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.layer-icon svg.flock-camera-icon { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.layer-icon svg.cctv-camera-icon { stroke-width: 28; }
.ski-board-layer-icon { flex: 0 0 28px; width: 28px; height: 28px; background-color: currentColor; mask: url('/css/ski_board.png') center / contain no-repeat; }
.layer-camera { --layer-color: var(--camera-marker-color); }
.layer-opencctv { --layer-color: var(--cctv-marker-color); }
.layer-ski-board { --layer-color: var(--ski-board-marker-color); }
.layer-customer-markers { --layer-color: var(--customer-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; }
.map-renderer-switch { width: 100%; margin: 2px 0 7px; padding: 7px 9px; border: 1px solid rgba(89, 197, 207, 0.35); border-radius: 7px; background: rgba(6, 14, 20, 0.72); color: #afc3cf; font: 600 10px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; cursor: pointer; }
.map-renderer-switch:hover, .map-renderer-switch:focus-visible { border-color: var(--camera-marker-color); color: #f2ffff; outline-color: var(--camera-marker-color); }
.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"] .layer-icon { filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 10px color-mix(in srgb, var(--layer-color) 85%, transparent)); }
.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 input::-webkit-search-cancel-button { display: none; }
.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-controls .address-search-clear { display: flex; width: 28px; height: 32px; flex: none; align-items: center; justify-content: center; align-self: center; padding: 0; transform: translateY(-2px); border: 0; background: transparent; color: #fff; font: 28px/1 ui-sans-serif, system-ui, sans-serif; }
.address-search-controls .address-search-clear:hover { background: transparent; color: #fff; }
.address-search-suggestions { position: absolute; z-index: 1005; top: calc(100% + 8px); right: 0; left: 0; display: grid; max-height: min(50vh, 360px); gap: 4px; overflow-y: auto; padding: 6px; border: 1px solid rgba(72, 223, 255, 0.4); border-radius: 12px; background: rgba(5, 16, 24, 0.98); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), 0 0 18px rgba(32, 188, 232, 0.14); }
.address-search-suggestions[hidden] { display: none; }
.address-search-suggestion { min-height: 40px; padding: 8px 10px !important; border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important; color: #e8f6ff !important; font: 500 14px/1.35 Inter, ui-sans-serif, system-ui, sans-serif !important; text-align: left; }
.address-search-suggestion:hover, .address-search-suggestion.is-active { border-color: rgba(72, 223, 255, 0.42) !important; background: rgba(32, 188, 232, 0.16) !important; }
.address-search-suggestion-message { padding: 10px; color: #9aa9ba; font: 13px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; }
.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; }
.ski-board-resort-panel { width: 320px; }
.ski-board-panel-glyph { width: 24px; height: 24px; color: var(--ski-board-marker-color); }
.ski-board-panel-glyph .ski-board-layer-icon { width: 22px; height: 22px; background-color: currentColor; mask: url('/css/ski_board.png') center / contain no-repeat; }
.ski-board-resort-status { margin: 8px 0; color: #8fa7ae; font-size: 12px; }
.ski-board-resort-list { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.ski-board-resort-list button { width: 100%; padding: 12px; border: 1px solid rgba(216, 121, 232, 0.24); border-radius: 6px; background: rgba(216, 121, 232, 0.07); color: #f2e6f4; cursor: pointer; text-align: left; }
.ski-board-resort-list button:hover, .ski-board-resort-list button:focus-visible { border-color: var(--ski-board-marker-color); background: rgba(216, 121, 232, 0.16); outline: none; }
.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.is-ski-board { background: var(--ski-board-marker-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ski-board-marker-color) 22%, transparent), 0 0 18px color-mix(in srgb, var(--ski-board-marker-color) 80%, transparent); }
.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 #fff; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18), 0 0 16px rgba(255, 255, 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 #fff; border-radius: 50%; opacity: 0; animation: camera-marker-wave 2.4s ease-out infinite; }
.hover-camera-marker.is-cctv::before, .hover-camera-marker.is-cctv::after { border-color: var(--cctv-marker-color); }
.hover-camera-marker.is-cctv::before { box-shadow: 0 0 0 3px rgba(255, 63, 63, 0.18), 0 0 16px rgba(255, 63, 63, 0.8); }
.hover-camera-marker.is-ski-board::before, .hover-camera-marker.is-ski-board::after { border-color: var(--ski-board-marker-color); }
.hover-camera-marker.is-ski-board::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ski-board-marker-color) 18%, transparent), 0 0 16px color-mix(in srgb, var(--ski-board-marker-color) 80%, transparent); }
.hover-camera-connector { position: absolute; z-index: 1; left: 17px; top: -41px; width: 1px; height: 58px; overflow: visible; }
.hover-camera-connector path { fill: none; stroke: #fff; stroke-width: 1.4; stroke-dasharray: 120; stroke-dashoffset: 120; vector-effect: non-scaling-stroke; }
.hover-camera-tooltip { position: absolute; z-index: 2; top: auto; bottom: 57px; left: 17px; display: flex; width: max-content; max-width: 264px; box-sizing: border-box; flex-direction: column; align-items: center; gap: 7px; padding: 9px 13px; transform: translateX(-50%); transform-origin: center bottom; border: 1px solid rgba(255, 255, 255, 0.38); border-top: 2px solid #fff; 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-tooltip { max-width: min(360px, calc(100vw - 180px)); }
.hover-camera-stream { position: relative; display: block; width: min(320px, calc(100vw - 210px)); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #020709; }
.hover-camera-tooltip > .hover-camera-stream { max-width: none; }
.hover-camera-stream[hidden] { display: none; }
.hover-camera-stream video, .hover-camera-stream img { display: block; width: 100%; height: 100%; background: #020709; object-fit: contain; visibility: hidden; }
.hover-camera-stream img { max-height: 200px; }
.hover-camera-stream video[hidden], .hover-camera-stream img[hidden] { display: none; }
.hover-camera-stream.is-revealing video, .hover-camera-stream.is-revealing img { visibility: visible; animation: hover-media-curtain 400ms linear both; }
.hover-camera-stream.is-revealing::before, .hover-camera-stream.is-revealing::after { position: absolute; z-index: 2; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 8px #fff; content: ""; pointer-events: none; }
.hover-camera-stream.is-revealing::before { left: 50%; animation: hover-curtain-left 400ms linear both; }
.hover-camera-stream.is-revealing::after { right: 50%; animation: hover-curtain-right 400ms linear both; }
.hover-camera-stream-status { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; max-width: calc(100% - 16px); min-height: 0; align-items: center; justify-content: center; gap: 8px; padding: 4px 8px; transform: translate(-50%, -50%); border-radius: 4px; background: rgba(2, 7, 9, 0.88); color: #b6d2d6; font: 600 11px/1.3 ui-monospace, "Cascadia Code", Consolas, monospace; text-align: center; }
.hover-camera-stream-status[hidden] { display: none; }
.hover-camera-stream-status.is-error { color: #ffaaaa; }
.hover-camera-stream-spinner { width: 12px; height: 12px; flex: none; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: camera-marker-spinner 750ms linear infinite; }
.hover-camera-stream-status.is-error .hover-camera-stream-spinner { display: none; }
.hover-camera-divider { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.8); 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; }
.radius-stream-gallery[hidden] { display: none; }
.radius-stream-gallery { position: absolute; z-index: 697; inset: 0; overflow: hidden; pointer-events: none; }
.radius-stream-grid { position: absolute; inset: 0; pointer-events: none; }
.radius-stream-card { position: absolute; display: flex; min-width: 0; box-sizing: border-box; flex-direction: column; gap: 6px; padding: 7px; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; background: rgba(10,24,33,.97); color: #e8f8ff; font: 600 11px/1.3 ui-monospace,monospace; pointer-events: auto; }
.radius-stream-card[hidden] { display: none; }
.radius-stream-card.is-arriving { opacity: 0; animation: radius-card-arrive 220ms ease-out both; }
.radius-stream-card > b, .radius-stream-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radius-stream-preview { position: relative; display: flex; min-height: 0; flex: 1; align-items: center; justify-content: center; overflow: hidden; border-radius: 4px; background: #020709; }
.radius-stream-card video, .radius-stream-card img { display: block; width: 100%; height: 100%; min-height: 0; flex: 1; background: #020709; object-fit: contain; }
.radius-stream-card video:not([hidden]), .radius-stream-card img:not([hidden]) { cursor: zoom-in; }
.radius-stream-card video[hidden], .radius-stream-card img[hidden] { display: none; }
.radius-stream-card video.is-revealing, .radius-stream-card img.is-revealing { animation: hover-media-curtain 400ms linear both; }
.radius-stream-status { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; max-width: calc(100% - 16px); min-height: 0; align-items: center; justify-content: center; padding: 4px 8px; transform: translate(-50%, -50%); border-radius: 4px; background: rgba(2,7,9,.88); color: #bdced6; text-align: center; }
.radius-stream-status[hidden], .hover-camera-stream-status[hidden] { display: none; }
.radius-stream-status.is-error, .hover-camera-stream-status.is-error { color: #d5dde2; }
.radius-stream-modal { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; box-sizing: border-box; overflow: auto; margin: 0; padding: 12px; border: 1px solid rgba(255,255,255,.32); border-radius: 0; background: #071018; color: #e8f8ff; }
.radius-stream-modal::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(3px); }
.cctv-password-modal { width: min(360px, calc(100vw - 32px)); border: 1px solid #53616d; border-radius: 12px; padding: 20px; background: #101820; color: #eef5fa; }
.cctv-password-modal::backdrop { background: rgba(0,0,0,.72); }
.cctv-password-modal form { display: grid; gap: 12px; }
.cctv-password-modal h2 { margin: 0; font-size: 18px; }
.cctv-password-modal input { min-width: 0; padding: 10px; color: inherit; background: #080d12; border: 1px solid #52606c; border-radius: 6px; }
.cctv-password-modal p { min-height: 1em; margin: 0; color: #ffb8b8; }
.cctv-password-modal form > div { display: flex; justify-content: flex-end; gap: 8px; }
.radius-stream-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font: 600 14px/1.3 ui-monospace,monospace; }
.radius-stream-modal-media video, .radius-stream-modal-media img { display: block; width: 100%; height: calc(100dvh - 72px); max-height: none; border-radius: 6px; background: #020709; object-fit: contain; }
.radius-stream-modal-media video.is-revealing, .radius-stream-modal-media img.is-revealing { animation: none; clip-path: none; }
@keyframes radius-card-arrive { to { opacity: 1; } }
@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: translate(-50%, 12px) scaleY(0.04); } to { opacity: 1; transform: translate(-50%, 0) scaleY(1); } }
@keyframes hover-label-out { to { opacity: 0; transform: translate(-50%, 8px) scaleY(0.04); } }
@keyframes hover-media-curtain { from { clip-path: inset(0 50%); } to { clip-path: inset(0); } }
@keyframes hover-curtain-left { from { left: 50%; opacity: 1; } to { left: 0; opacity: 0; } }
@keyframes hover-curtain-right { from { right: 50%; opacity: 1; } to { right: 0; opacity: 0; } }
@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; }
}

/* MapitAC desktop header follows the supplied reference; keep tools in the existing DOM. */
.topbar {
    z-index: 1002;
    right: 0;
    left: 0;
    height: 68px;
    gap: 16px;
    padding: 7px 20px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 9, 14, 0.98), rgba(4, 9, 14, 0.88) 82%, transparent);
}
.brand { gap: 4px; pointer-events: auto; }
.brand-mark { display: none; }
.brand-wordmark { top: 0; width: 190px; height: 48px; }
.mobile-layer-toggle { display: none; }
.address-search {
    z-index: 1004;
    top: 10px;
    right: auto;
    bottom: auto;
    left: 236px;
    width: clamp(250px, calc(100vw - 700px), 500px);
    height: 48px;
    padding: 0 12px;
    border-color: rgba(72, 223, 255, 0.58);
    border-radius: 15px;
    background: rgba(5, 16, 24, 0.96);
    box-shadow: 0 0 22px rgba(32, 188, 232, 0.16), 0 6px 22px rgba(0, 0, 0, 0.32);
}
.address-search-controls { height: 100%; align-items: center; gap: 12px; }
.address-search-controls .address-search-submit {
    display: inline-flex;
    width: 28px;
    height: 32px;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e8f6ff;
    cursor: pointer;
}
.address-search-submit svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.address-search-controls .address-search-submit:hover { color: #48dfff; background: transparent; }
.address-search-controls input {
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #e8eef8;
    font: 600 16px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}
.address-search-controls input:focus { border: 0; box-shadow: none; }
.address-search-controls input::placeholder { color: #9aa9ba; opacity: 1; }
.address-search output { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.address-search small { display: none; }
.coordinate-radius-tool { display: none !important; }
.layer-dock {
    z-index: 1003;
    top: 10px;
    right: auto;
    left: calc(236px + clamp(250px, calc(100vw - 700px), 500px) + 16px);
    bottom: auto;
    width: auto;
    max-width: calc(100vw - 520px);
    flex-direction: row;
    align-items: center;
    gap: 9px;
    overflow: visible;
    padding: 0;
    background: transparent;
}
.layer-dock-head { display: none; }
.layer-dock .map-renderer-switch { position: fixed; z-index: 901; bottom: 14px; left: 186px; display: block; width: 188px; margin: 0; }
.layer-dock .map-label-controls { position: fixed; z-index: 901; bottom: 14px; left: 382px; display: flex; width: auto; padding: 4px 7px; border: 1px solid rgba(89, 197, 207, 0.24); border-radius: 8px; background: rgba(5, 16, 24, 0.92); }
.layer-row { width: 132px; height: 50px; min-height: 50px; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; padding: 5px 8px; border: 1px solid rgba(89, 197, 207, 0.22); border-radius: 12px; background: rgba(5, 14, 22, 0.96); box-shadow: none; }
.layer-row.layer-ski-board { width: 96px; }
.layer-icon { width: 24px; height: 24px; }
.layer-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
.layer-copy strong { order: 1; font-size: 14px; line-height: 1; }
.layer-copy > span { order: 0; color: #eaf7ff; font-size: 9px; line-height: 1; }
.layer-row kbd { display: none; }
#map .maplibregl-ctrl-bottom-left { bottom: 14px; left: auto; right: 14px; }
.map-tile-status:not(.map-basemap-status) { display: none; }
#map .maplibregl-ctrl-attrib { border: 1px solid rgba(72, 223, 255, 0.3); border-radius: 8px 0 0 0; background: rgba(5, 16, 24, 0.82); color: #cbd9e8; }
#map .maplibregl-ctrl-attrib a { color: #dcecf8; }
#map .maplibregl-ctrl-group button.maplibregl-rotation-lock { display: flex; align-items: center; justify-content: center; padding: 0; filter: none; }
#map .maplibregl-rotation-lock .maplibregl-ctrl-icon { display: grid; width: 20px; height: 20px; place-items: center; background: none; background-image: none; }
#map .maplibregl-rotation-lock svg { width: 18px; height: 18px; fill: none; stroke: #d9f5ff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
#map .maplibregl-rotation-lock[aria-pressed="true"] svg { stroke: #48dfff; filter: drop-shadow(0 0 3px rgba(72, 223, 255, 0.75)); }
#map .maplibregl-radius-toggle { display: flex; align-items: center; justify-content: center; padding: 0; filter: none; transition: background-color 160ms ease, box-shadow 160ms ease; }
#map .maplibregl-radius-toggle .maplibregl-ctrl-icon { display: grid; width: 20px; height: 20px; place-items: center; background: none; background-image: none; }
#map .maplibregl-radius-toggle svg { width: 19px; height: 19px; fill: none; stroke: #d9f5ff; stroke-width: 1.6; }
#map .maplibregl-radius-toggle svg .radius-indicator-dot { fill: #ff4d4f; stroke: none; }
#map .maplibregl-ctrl-group button.maplibregl-radius-toggle { background: #09141b !important; filter: none !important; opacity: 1 !important; }
#map .maplibregl-radius-toggle[aria-pressed="true"] { background: #09141b !important; box-shadow: none !important; }
#map .maplibregl-radius-toggle[aria-pressed="true"] svg { stroke: #fff; stroke-width: 2.4; }
#map .maplibregl-radius-toggle[aria-pressed="true"] svg > circle:first-child { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #fff); }
#map .maplibregl-ctrl-bottom-left .maplibregl-radius-control { position: absolute; right: 0; bottom: calc(100% + 10px); display: flex; flex-direction: column; align-items: center; overflow: visible; margin: 0; }
#map .maplibregl-radius-slider-wrap { position: relative; width: 29px; height: 112px; overflow: visible; border: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 0; border-radius: 4px 4px 0 0; background: #09141b; }
#map .maplibregl-radius-slider { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0; padding: 7px 0; appearance: none; writing-mode: vertical-lr; direction: rtl; background: transparent; cursor: ns-resize; }
#map .maplibregl-radius-slider::-webkit-slider-runnable-track { width: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.38); }
#map .maplibregl-radius-slider::-moz-range-track { width: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.38); }
#map .maplibregl-radius-slider::-webkit-slider-thumb { width: 26px; height: 22px; appearance: none; border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
#map .maplibregl-radius-slider::-moz-range-thumb { width: 26px; height: 22px; border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
#map .maplibregl-radius-slider-value { position: absolute; z-index: 1; left: 50%; display: grid; width: 26px; height: 22px; place-items: center; box-sizing: border-box; border: 1px solid #fff; border-radius: 50%; background: #10222d; box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); color: #fff; font: 700 8px/1 ui-monospace, monospace; text-align: center; text-shadow: 0 0 4px #000; transform: translate(-50%, -50%); pointer-events: none; }
#map .maplibregl-radius-control .maplibregl-radius-toggle { flex: none; border-radius: 0 0 4px 4px; }

@media (max-width: 900px) {
    html { touch-action: manipulation; }
    #map .maplibregl-ctrl button, #map .maplibregl-ctrl input[type="range"], #address-search-input { touch-action: manipulation; }
    input:not([type="range"]), select, textarea { font-size: 16px !important; }
    #map .maplibregl-radius-toggle[aria-pressed="true"] svg { stroke-width: 2.8; }
    #map .maplibregl-radius-toggle[aria-pressed="true"] svg > circle:first-child { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 13px #fff); }
    #map .maplibregl-radius-toggle[aria-pressed="true"] svg .radius-indicator-dot { r: 1.55px; fill: #ff1018; filter: drop-shadow(0 0 2px #ff1018) drop-shadow(0 0 5px #ff1018); }
    .device-panel { display: none !important; }
    .topbar { display: none; }
    .mobile-layer-toggle {
        position: fixed;
        z-index: 1001;
        top: 16px;
        left: 12px;
        display: inline-flex;
        width: 46px;
        height: 46px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: 1px solid rgba(72, 223, 255, 0.42);
        border-radius: 12px;
        background: rgba(5, 16, 24, 0.95);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
        color: #e8f6ff;
        font: 700 9px/1.1 Inter, ui-sans-serif, system-ui, sans-serif;
    }
    .mobile-layer-toggle > span:first-child { font: 20px/1 ui-sans-serif, system-ui, sans-serif; }
    .mobile-layer-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .address-search { top: 16px; right: 12px; left: 68px; width: auto; max-width: none; min-width: 0; height: 48px; padding: 0 10px; border-radius: 14px; }
    .address-search .floating-tool-titlebar { min-height: 0; margin: 0; }
    .address-search .floating-tool-collapse { display: none; }
    .address-search .floating-tool-expand { display: none; }
    .address-search-controls { gap: 7px; }
    .address-search-controls .address-search-submit { width: 23px; height: 28px; }
    .address-search-controls .address-search-clear { width: 24px; height: 30px; }
    .address-search-submit svg { width: 20px; height: 20px; }
    .address-search-controls input { padding: 0; font-size: 16px; }
    .layer-dock {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        width: auto;
        max-width: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
        gap: 7px;
        overflow: hidden;
        padding: 20px 14px max(18px, env(safe-area-inset-bottom));
        border: 1px solid rgba(72, 223, 255, 0.32);
        border-bottom: 0;
        border-radius: 20px 20px 0 0;
        background: rgba(5, 11, 17, 0.96);
        box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(16px);
    }
    .layer-dock::before { position: absolute; top: 7px; left: calc(50% - 22px); width: 44px; height: 4px; border-radius: 3px; background: #8293a0; content: ""; }
    .layer-dock-head { display: flex; grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; margin: 0; padding: 1px 4px 4px; border: 0; }
    .layer-dock-head b { color: #e8f6ff; font-size: 16px; text-shadow: none; }
    .layer-dock-head > span, .layer-dock-head small { display: none; }
    .layer-dock .layer-row { width: 100%; height: 54px; min-height: 54px; grid-template-columns: 28px minmax(0, 1fr); border-radius: 12px; }
    .layer-dock .layer-copy strong { font-size: 15px; }
    .layer-dock .layer-copy > span { color: #d2dee8; font-size: 10px; }
    .layer-dock .map-renderer-switch, .layer-dock .map-label-controls { display: none; }
    .layer-dock:not(.is-expanded) .layer-ski-board,
    .layer-dock:not(.is-expanded) .layer-customer-markers { display: none; }
    .layer-dock.is-expanded { max-height: min(70vh, 600px); overflow-y: auto; }
    .layer-dock.is-expanded .map-renderer-switch { display: block; grid-column: 1 / -1; margin: 3px 0; }
    .layer-dock.is-expanded .map-label-controls { display: flex; grid-column: 1 / -1; }
    .layer-dock.is-expanded .layer-ski-board,
    .layer-dock.is-expanded .layer-customer-markers { display: grid; }
    .coordinate-radius-tool { display: none !important; }
    .map-perf-hud { bottom: calc(160px + env(safe-area-inset-bottom)); }
    .map-tile-status { top: 72px; left: 12px; max-width: calc(100% - 24px); }
    #map .maplibregl-ctrl-bottom-left { bottom: calc(152px + env(safe-area-inset-bottom)); left: auto; right: 12px; }
    #map .maplibregl-ctrl-bottom-right { bottom: calc(152px + env(safe-area-inset-bottom)); }
}
