/* SALPION 통합 CCTV 관제 플랫폼 — navy/blue visual theme (reference: Pic.png, 2026-11-09).
   Presentation only: no element is hidden that carries real state, and no control is added
   for a feature that does not work (no snapshot/record/location buttons). */
[data-minimal-vms=true]{
  --sp-bg:#071125;--sp-bg2:#0a1631;--sp-panel:#0c1a37;--sp-panel2:#10213f;--sp-raise:#132649;
  --sp-line:#1d3260;--sp-line2:#2a4478;--sp-ink:#e9effc;--sp-muted:#8fa3c8;--sp-dim:#6f84ab;
  --sp-blue:#2f7bff;--sp-blue2:#1b56e0;--sp-green:#2fd27a;--sp-red:#ef4444;--sp-amber:#f3b13c;--sp-violet:#7c6cf2;
  --vms-bg:var(--sp-bg);--vms-panel:var(--sp-bg2);--vms-line:var(--sp-line);
  --ink:var(--sp-ink);--muted:var(--sp-muted);--line:var(--sp-line);--panel:var(--sp-panel);--blue:var(--sp-blue);--accent:var(--sp-blue);
  color-scheme:dark
}
[data-minimal-vms=true] body{background:radial-gradient(1200px 600px at 0 100%,#0f2a6b33,transparent 60%),linear-gradient(180deg,#081429,#060e20);color:var(--sp-ink)}

/* Navigation rail: icon + short name side by side, glowing blue current page. */
[data-minimal-vms=true] #vms-nav{background:linear-gradient(180deg,#0b1834,#071126);border-right:1px solid var(--sp-line)}
[data-minimal-vms=true] #vms-nav .vms-brand{min-height:52px;margin-bottom:18px}
[data-minimal-vms=true] #vms-nav .vms-mark{background:linear-gradient(135deg,#3d8bff,#1b56e0);box-shadow:0 0 14px #2f7bff66}
[data-minimal-vms=true] #vms-nav .vms-brand-word{font-size:22px;font-weight:800;letter-spacing:.02em;color:#fff}
[data-minimal-vms=true] #vms-nav button{color:#b9c8e6;border-radius:10px}
[data-minimal-vms=true] #vms-nav button:hover{background:#132649;color:#fff}
[data-minimal-vms=true] #vms-nav button[aria-current=page]{background:linear-gradient(135deg,#2f7bff,#1b56e0);color:#fff;box-shadow:inset 0 0 0 1px #5b97ff,0 8px 22px #1b56e055}
@media(min-width:851px){
  /* Compact menu: text-only (icons removed 2026-11-12), so 96px is enough for the short names. */
  [data-minimal-vms=true].vms-nav-compact{--vms-nav:96px}
  [data-minimal-vms=true].vms-nav-compact #vms-nav{padding:14px 6px}
  [data-minimal-vms=true].vms-nav-compact #vms-nav button{flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;min-height:42px;padding:0 8px}
  [data-minimal-vms=true].vms-nav-compact #vms-nav .vms-brand{justify-content:center;gap:0;padding:0 2px}
  [data-minimal-vms=true].vms-nav-compact #vms-nav .vms-mark{width:30px;height:30px;font-size:16px}
  [data-minimal-vms=true].vms-nav-compact #vms-nav .vms-short-label{font-size:14px;font-weight:600}
  [data-minimal-vms=true].vms-nav-compact #vms-nav .vms-nav-count{position:static;margin-left:auto}
}
[data-minimal-vms=true] #vms-nav .vms-brand-word{display:none}

/* Header: product title, organization/site chips, outlined actions. */
[data-minimal-vms=true] .workspace-header{height:60px;min-height:60px;padding:0 20px;gap:14px;background:linear-gradient(90deg,#0b1834,#0a1631 40%,#0b1a3a);border-bottom:1px solid var(--sp-line)}
[data-minimal-vms=true] .workspace-brand{font-size:16px;font-weight:700;letter-spacing:0;color:#dfe8fb;padding-right:16px;border-right:1px solid var(--sp-line2);white-space:nowrap}
[data-minimal-vms=true] .facility-picker{gap:10px}
[data-minimal-vms=true] .scope-label{padding:3px 9px;border-radius:6px;font-size:12px;font-weight:700;color:#fff}
[data-minimal-vms=true] .scope-organization .scope-label{background:#3a2f86}
[data-minimal-vms=true] .scope-site .scope-label{background:#17468f}
[data-minimal-vms=true] .scope-segment b{font-size:15px;color:#fff}
[data-minimal-vms=true] .scope-icon{stroke:#9fb5df}
[data-minimal-vms=true] .workspace-header #page-label{color:var(--sp-muted);font-weight:500}
[data-minimal-vms=true] .workspace-header .header-right{gap:10px}
[data-minimal-vms=true] .workspace-header .header-right>button,[data-minimal-vms=true] .workspace-header .header-right>#actor{min-height:38px;padding:0 14px;border:1px solid var(--sp-line2);border-radius:8px;background:#0e1d3d;color:#dfe8fb;font-size:13px;display:inline-flex;align-items:center;gap:6px}
[data-minimal-vms=true] .workspace-header .salpion-mode-open{border-color:#3d7bff!important;background:#11264f!important;color:#fff!important;font-weight:700}
[data-minimal-vms=true] .workspace-header #mode{border-color:#8a6a22!important;background:#2a2312!important;color:var(--sp-amber)!important;font-weight:700}
[data-minimal-vms=true] .workspace-header #mode:not(.demo){border-color:#1f6b45!important;background:#0f2a1f!important;color:#7be3a8!important}
[data-minimal-vms=true] #workspace-alert-count,[data-minimal-vms=true] #workspace-unread-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:5px;background:#d93a3a;color:#fff;font-size:12px}

/* Wall toolbar: rounded dark buttons, blue for the active split. */
[data-minimal-vms=true] [data-workspace=control] .video-wall{padding:14px 18px 14px;gap:14px}
[data-minimal-vms=true] .wall-toolbar{gap:10px!important}
[data-minimal-vms=true] .wall-toolbar button,[data-minimal-vms=true] .wall-toolbar select{min-height:40px!important;padding:0 16px!important;border:1px solid var(--sp-line2)!important;border-radius:8px!important;background:#0e1d3d!important;color:#dfe8fb!important;font-size:14px!important}
[data-minimal-vms=true] .wall-toolbar .view-modes{display:inline-flex;gap:0;border:1px solid var(--sp-line2);border-radius:8px;overflow:hidden}
[data-minimal-vms=true] .wall-toolbar .view-modes button{border:0!important;border-radius:0!important;min-width:50px;border-right:1px solid var(--sp-line2)!important}
[data-minimal-vms=true] .wall-toolbar .view-modes button:last-child{border-right:0!important}
[data-minimal-vms=true] .wall-toolbar button[aria-pressed=true]{background:linear-gradient(135deg,#2f7bff,#1b56e0)!important;border-color:#4d8dff!important;color:#fff!important;font-weight:700}
[data-minimal-vms=true] .wall-toolbar #operator-layout{width:150px}

/* Camera cards: header with name + real playback state, video with LIVE badge only when frames arrive. */
[data-minimal-vms=true] [data-workspace=control] .wall-grid{gap:16px!important}
[data-minimal-vms=true] .wall-slot{border:1px solid var(--sp-line2)!important;border-radius:12px!important;background:var(--sp-panel)!important;box-shadow:0 10px 30px #00000040}
/* Focused tile: a red frame that stands out on the dark wall (reference: 클릭 = 포커스). */
[data-minimal-vms=true] .wall-slot:has(.camera-selected){outline:0!important;box-shadow:0 0 18px #ff2e4d55;z-index:2}
/* Drawn as an overlay above the picture: a playing <video> is its own layer and would hide an outline. */
[data-minimal-vms=true] .wall-slot:has(.camera-selected)::after{content:"";position:absolute;inset:0;border:3px solid #ff2e4d;border-radius:inherit;pointer-events:none;z-index:30}
[data-minimal-vms=true] .wall-slot .camera-card.camera-selected{box-shadow:none}
[data-minimal-vms=true] [data-workspace=control] .wall-slot>.slot-heading{height:46px!important;min-height:46px!important;padding:0 120px 0 14px!important;background:linear-gradient(180deg,#132649,#10213f)!important;border-bottom:1px solid var(--sp-line2);font-size:16px!important;font-weight:700;color:#fff!important;justify-content:flex-start!important;gap:10px}
[data-minimal-vms=true] .wall-slot>.slot-heading>span:first-child{display:inline-flex!important;align-items:center;gap:8px;flex:0 1 auto!important;padding-right:0!important}
[data-minimal-vms=true] .wall-slot>.slot-heading .slot-camera-icon{flex:none;width:20px;height:20px;fill:none;stroke:#b9c8e6;stroke-width:1.6}
[data-minimal-vms=true] .wall-slot:has(.camera-selected)>.slot-heading::after{position:absolute;right:96px;margin:0}
[data-minimal-vms=true] .slot-heading .stream-state{flex:none;display:inline-flex;align-items:center;gap:7px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap;border:1px solid transparent}
[data-minimal-vms=true] .slot-heading .stream-state::before{content:"";flex:none;width:8px;height:8px;box-sizing:border-box}
/* One status per card, four stages that differ in color AND shape. */
[data-minimal-vms=true] .stream-state[data-stage=live]{background:#103a26;color:#3ddc84;border-color:#1f6b45}
[data-minimal-vms=true] .stream-state[data-stage=live]::before{border-radius:50%;background:currentColor}
[data-minimal-vms=true] .stream-state[data-stage=retry]{background:#132c55;color:#8fbaff;border-color:#2c5aa8}
[data-minimal-vms=true] .stream-state[data-stage=retry]::before{width:10px;height:10px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:salpion-retry 1s linear infinite}
[data-minimal-vms=true] .stream-state[data-stage=error]{background:#431a1f;color:#ff8f96;border-color:#8a2f38}
[data-minimal-vms=true] .stream-state[data-stage=error]::before{width:10px;height:9px;background:currentColor;clip-path:polygon(50% 0,100% 100%,0 100%)}
[data-minimal-vms=true] .stream-state[data-stage=pending]{background:transparent;color:#a9b8d3;border-color:#3a4d73}
[data-minimal-vms=true] .stream-state[data-stage=pending]::before{width:9px;height:9px;border-radius:50%;border:1.5px dashed currentColor}
@keyframes salpion-retry{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){[data-minimal-vms=true] .stream-state[data-stage=retry]::before{animation:none}}
[data-minimal-vms=true] .slot-actions{position:absolute;top:0;right:8px;height:46px;display:flex;align-items:center;gap:2px;z-index:7}
[data-minimal-vms=true] .slot-actions button{width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#c9d6f0;font-size:18px;padding:0}
[data-minimal-vms=true] .slot-actions button:hover{background:#1b3160;color:#fff}
[data-minimal-vms=true] .slot-actions svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
[data-minimal-vms=true] .slot-actions [aria-pressed=true] svg{fill:#f3c53c;stroke:#f3c53c}
[data-minimal-vms=true] .media-surface[data-live=true][data-stream-state=connected][data-stream-verified=yes]::before{content:"LIVE";position:absolute;top:14px;left:14px;z-index:6;padding:4px 10px 4px 22px;border-radius:7px;background:#e23b3b;color:#fff;font-size:13px;font-weight:800;letter-spacing:.03em;box-shadow:0 4px 12px #0007;
  background-image:radial-gradient(circle at 11px 50%,#fff 0 3.5px,transparent 4px)}
[data-minimal-vms=true] .media-surface[data-source-provenance=REPLAY_LIVE_SIMULATION][data-live=true][data-stream-state=connected][data-stream-verified=yes]::before{content:"시뮬레이션 · 실제 CCTV 아님"!important;background:#685018;background-image:none;font-size:11px;padding-left:10px}
[data-minimal-vms=true] .wall-grid .media-bottom{display:none}
[data-minimal-vms=true] .media-controls{right:12px!important;bottom:12px!important;left:auto!important;top:auto!important;display:flex;gap:2px;padding:4px;border-radius:10px;background:#0a1530d9;border:1px solid var(--sp-line2)}
[data-minimal-vms=true] .media-controls button{width:38px;height:34px;border:0;border-radius:7px;background:transparent;color:#e3ebfb;font-size:16px}
[data-minimal-vms=true] .media-controls button:hover{background:#1b3160}

/* Empty position: a quiet card that says what to do. */
[data-minimal-vms=true] .empty-wall-slot{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;height:100%;border:0;background:transparent;color:var(--sp-muted)}
[data-minimal-vms=true] .empty-wall-slot .slot-plus{width:58px;height:58px;display:grid;place-items:center;border:2px dashed #6f84ab;border-radius:10px;color:#dfe8fb;font-size:30px;font-weight:300}
[data-minimal-vms=true] .empty-wall-slot b{font-size:18px;color:#fff}
[data-minimal-vms=true] .empty-wall-slot small{font-size:14px;color:var(--sp-muted)}

/* Camera list panel and bottom bars share the navy surface. */
[data-minimal-vms=true] [data-workspace=control] .camera-tree{background:var(--sp-bg2)!important;border-right:1px solid var(--sp-line)!important}
[data-minimal-vms=true] .tree-camera.selected{background:#16305f!important;box-shadow:inset 3px 0 #3d86ff!important}
[data-minimal-vms=true] .wall-pagination{min-height:44px!important;padding:0 14px;border:1px solid var(--sp-line2);border-radius:10px;background:var(--sp-panel);display:flex;align-items:center;justify-content:center;gap:16px}
[data-minimal-vms=true] .wall-pagination button{min-height:32px;padding:0 14px;border:1px solid var(--sp-line2);border-radius:8px;background:#0e1d3d;color:#c9d6f0}
[data-minimal-vms=true] .monitor-events{border-top:1px solid var(--sp-line2)!important;background:var(--sp-bg2)!important}
[data-minimal-vms=true] .monitor-events .event-dock-bar button{min-height:34px;padding:0 14px;border:1px solid var(--sp-line2);border-radius:8px;background:#0e1d3d;color:#e3ebfb}

/* Fit the taller header: the control screen fills the viewport exactly (no page scroll). */
[data-minimal-vms=true] [data-workspace=control] #content{height:calc(100dvh - 60px)!important}
[data-minimal-vms=true] #vms-nav .vms-brand-word{background:none;padding:0;border:0}
[data-minimal-vms=true] .workspace-header .header-right>*{white-space:nowrap}
/* The blue outline marks the selected camera; the old text tag would collide with the header actions. */
[data-minimal-vms=true] .wall-slot:has(.camera-selected)>.slot-heading::after{display:none!important}
[data-minimal-vms=true] .empty-wall-slot small{display:block!important}
/* An empty filler cell is exactly one card high: header + 16:9 picture (keeps the grid still between pages). */
[data-minimal-vms=true] .wall-slot-filler::before{height:var(--vms-meta,46px)!important}
/* Dense walls (16 and more): the header floats over the top of the picture instead of taking its height. */
[data-minimal-vms=true] [data-workspace=control] :is(.wall-16,.wall-25,.wall-36,.wall-64)>.wall-slot>.slot-heading{position:absolute!important;top:0;left:0;right:0;z-index:7;height:28px!important;min-height:28px!important;font-size:12px!important;padding:0 64px 0 8px!important;gap:6px;border-bottom:0!important;background:linear-gradient(180deg,#081429ee,#08142900)!important}
[data-minimal-vms=true] :is(.wall-16,.wall-25,.wall-36,.wall-64) .slot-heading .stream-state{padding:1px 6px;font-size:10px}
[data-minimal-vms=true] :is(.wall-16,.wall-25,.wall-36,.wall-64) .slot-heading .slot-camera-icon{display:none}
[data-minimal-vms=true] :is(.wall-16,.wall-25,.wall-36,.wall-64) .slot-actions{height:28px;right:4px}
[data-minimal-vms=true] :is(.wall-16,.wall-25,.wall-36,.wall-64) .slot-actions button{width:24px;height:24px}
[data-minimal-vms=true] :is(.wall-16,.wall-25,.wall-36,.wall-64) .slot-actions svg{width:15px;height:15px}
[data-minimal-vms=true] :is(.wall-25,.wall-36,.wall-64) .slot-heading .stream-state{display:none}
/* Auto-fit sizes tiles from the space left after the chrome: taller header, toolbar and pager than before. */
[data-minimal-vms=true] [data-workspace=control] .control-room{--vms-overhead:212px}
/* With the recent-events bar open below the wall, its height is chrome too. Rows are separated by the
   grid gap (16px), so each row gets (space - gaps) / rows; otherwise 3+ rows overflow and the wall scrolls. */
[data-minimal-vms=true] [data-workspace=control] .control-room:has(.monitor-events){--vms-overhead:calc(206px + var(--event-dock-height,0px))}
[data-minimal-vms=true] [data-workspace=control] .vms-auto-fit .wall-grid{max-width:calc(((100dvh - var(--vms-overhead,150px) - (var(--vms-rows) - 1) * 16px) / var(--vms-rows) - var(--vms-meta)) * 1.777778 * var(--vms-cols) + (var(--vms-cols) - 1) * 16px)}
[data-minimal-vms=true] [data-workspace=control] .combined-control{--vms-overhead:252px}
/* Narrower screens: drop the product title first, then tighten the header; never scroll sideways. */
@media(max-width:1440px){[data-minimal-vms=true] .workspace-brand{display:none!important}}
@media(max-width:1100px){
  [data-minimal-vms=true] .workspace-header{padding:0 12px;gap:8px}
  [data-minimal-vms=true] .workspace-header .header-right{gap:6px;min-width:0}
  [data-minimal-vms=true] .workspace-header .header-right>button,[data-minimal-vms=true] .workspace-header .header-right>#actor{min-height:34px;padding:0 9px;font-size:12px}
  [data-minimal-vms=true] .workspace-header #actor{display:none!important}
}
@media(max-width:650px){
  /* Same single-row 44px header as before on phones; the wall keeps the rest of the screen. */
  [data-minimal-vms=true] .workspace-header{height:44px;min-height:44px;padding:0 8px}
  [data-minimal-vms=true] [data-workspace=control] #content{height:calc(100dvh - 44px)!important}
  [data-minimal-vms=true] .wall-toolbar button,[data-minimal-vms=true] .wall-toolbar select{min-height:34px!important;padding:0 10px!important;font-size:13px!important}
}
/* The middle of the header yields first when space runs out (no sideways page scroll). */
[data-minimal-vms=true] .workspace-header .facility-picker{min-width:0;flex:0 1 auto;overflow:hidden}
[data-minimal-vms=true] .workspace-header .scope-segment{min-width:0}
[data-minimal-vms=true] .workspace-header .scope-segment b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:651px){[data-minimal-vms=true] .workspace-header .header-right{flex:0 0 auto}}

/* Header: no product-area switcher here; the road view needs no TEST badge (its state is on each card). */
[data-minimal-vms=true][data-cctv-view=road] .workspace-header #mode{display:none!important}
/* Fullscreen lives in one place per camera: the card header button. */
[data-minimal-vms=true] .wall-slot .media-controls [data-media-action=fullscreen]{display:none!important}
/* The LIVE badge already says the picture is live; no second source label on live tiles. */
[data-minimal-vms=true] .camera-card:has(.media-surface[data-live=true]) [data-part=source]{display:none}
/* Facility / road switch and the camera-list button in the wall toolbar. */
[data-minimal-vms=true] .wall-toolbar .cctv-scope{display:inline-flex;border:1px solid var(--sp-line2);border-radius:8px;overflow:hidden;margin-right:6px}
[data-minimal-vms=true] .wall-toolbar .cctv-scope button{border:0!important;border-radius:0!important;min-width:96px;font-weight:700}
[data-minimal-vms=true] .wall-toolbar .cctv-scope button+button{border-left:1px solid var(--sp-line2)!important}
[data-minimal-vms=true] .wall-toolbar .cctv-scope button{display:inline-flex;align-items:center;gap:6px}
[data-minimal-vms=true] .wall-toolbar .cctv-scope .cctv-scope-close{font-size:11px;opacity:.8}
[data-minimal-vms=true] .wall-toolbar [data-vms-list]{display:inline-flex;align-items:center;gap:8px}
[data-minimal-vms=true] .wall-toolbar [data-vms-list] svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
[data-minimal-vms=true] .wall-toolbar [data-vms-list][aria-expanded=true]{border-color:#4d8dff!important;color:#fff!important}
/* The road console's internal viewer name means nothing to an operator. */
[data-minimal-vms=true][data-cctv-view=road] .workspace-header #actor{display:none!important}
/* Empty positions stay quiet: a faint '+' until pointed at, so a saved large split is not a wall of notices. */
[data-minimal-vms=true] .empty-wall-slot b,[data-minimal-vms=true] .empty-wall-slot small{display:none!important}
[data-minimal-vms=true] .empty-wall-slot .slot-plus{width:40px;height:40px;font-size:22px;border-width:1.5px;opacity:.35}
[data-minimal-vms=true] .wall-slot:hover .empty-wall-slot .slot-plus,[data-minimal-vms=true] .empty-wall-slot:focus-visible .slot-plus{opacity:1}
[data-minimal-vms=true] .wall-slot:hover .empty-wall-slot b,[data-minimal-vms=true] .empty-wall-slot:focus-visible b{display:block!important;font-size:15px}
[data-minimal-vms=true] .wall-slot:has(.empty-wall-slot){background:#0a1630!important;border-style:dashed!important;box-shadow:none}
/* Phones/tablets open the list from the camera button in the event dock; keep the toolbar to two rows. */
@media(max-width:1100px){[data-minimal-vms=true] .wall-toolbar [data-vms-list]{display:none!important}}
@media(max-width:650px){
  [data-minimal-vms=true] .wall-toolbar{gap:6px!important}
  [data-minimal-vms=true] .wall-toolbar .cctv-scope{margin-right:0}
  [data-minimal-vms=true] .wall-toolbar .cctv-scope button{min-width:0;padding:0 8px!important;font-size:12px!important}
  [data-minimal-vms=true] .wall-toolbar .view-modes button{min-width:30px;padding:0 7px!important}
  [data-minimal-vms=true] .wall-toolbar [data-vms-auto]{padding:0 8px!important}
}
@media(max-width:650px){
  [data-minimal-vms=true] [data-workspace=control] .video-wall{padding:8px 6px!important;gap:8px!important}
  [data-minimal-vms=true] .wall-toolbar .cctv-scope button{padding:0 7px!important}
}
@media(max-width:650px){
  /* Phones: the site name keeps a readable width; the page label gives way. */
  [data-minimal-vms=true] .workspace-header #page-label{display:none!important}
  [data-minimal-vms=true] .workspace-header .scope-site b{min-width:3.5em;max-width:7.5em}
}
/* The header's generic 'span{display:block}' rule must not flatten the status shape. */
[data-minimal-vms=true] .wall-slot>.slot-heading>.stream-state{display:inline-flex!important;align-items:center;padding-right:10px!important;flex:none!important}
[data-minimal-vms=true] .wall-slot>.slot-heading>.stream-state::before{display:block}
/* ---- 지도 관제 (road view): one map, one small live preview ---- */
[data-minimal-vms=true] .wall-toolbar .road-mode{display:inline-flex;border:1px solid var(--sp-line2);border-radius:8px;overflow:hidden;margin-right:6px}
[data-minimal-vms=true] .wall-toolbar .road-mode button{border:0!important;border-radius:0!important;min-width:88px;font-weight:700}
[data-minimal-vms=true] .wall-toolbar .road-mode button+button{border-left:1px solid var(--sp-line2)!important}
[data-minimal-vms=true] .video-wall:has(#road-map-slot) .wall-toolbar>:not(.road-mode):not([data-vms-list]){display:none!important}
[data-minimal-vms=true] .video-wall:has(#road-map-slot) .wall-status{display:none}
[data-minimal-vms=true] #road-map-slot{position:relative;flex:1 1 auto;min-height:calc(100dvh - 210px);border:1px solid var(--sp-line2);border-radius:10px;overflow:hidden;background:#0d1b33}
[data-minimal-vms=true] .road-map-canvas{position:absolute;inset:0}
[data-minimal-vms=true] .road-map-legend{position:absolute;left:12px;bottom:12px;z-index:2;display:flex;gap:6px;flex-wrap:wrap;padding:6px 8px;border-radius:8px;background:#0b1730e6;font-size:12px;color:#c9d6ee}
[data-minimal-vms=true] .road-map-legend span::before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:-1px;background:#94a3b8}
[data-minimal-vms=true] .road-map-legend [data-stage=live]::before{background:#22c55e}
[data-minimal-vms=true] .road-map-legend [data-stage=retry]::before{background:#3b82f6}
[data-minimal-vms=true] .road-map-legend [data-stage=error]::before{background:#ef4444;border-radius:0;clip-path:polygon(50% 0,100% 100%,0 100%)}
[data-minimal-vms=true] .road-map-legend [data-stage=pending]::before{background:transparent;border:1.5px dashed #94a3b8}
[data-minimal-vms=true] .road-map-note{position:absolute;left:12px;top:12px;z-index:2;margin:0;padding:5px 9px;border-radius:7px;background:#0b1730e6;color:#c9d6ee;font-size:12px}
[data-minimal-vms=true] #road-map-slot[data-tiles=fallback]::after,[data-minimal-vms=true] #road-map-slot[data-tiles=unavailable]::after{content:"지도 배경을 불러오지 못했습니다 · 위치 표시만 제공";position:absolute;right:12px;bottom:12px;z-index:2;padding:5px 9px;border-radius:7px;background:#431a1f;color:#ffb4b9;font-size:12px}
.road-map-popup .maplibregl-popup-content{padding:0;background:#0f1d36;color:#e5edf9;border:1px solid #2b4370;border-radius:10px;width:min(320px,calc(100vw - 48px));overflow:hidden;box-shadow:0 12px 30px #0009}
.road-map-popup .maplibregl-popup-close-button{color:#e5edf9;font-size:20px;width:30px;height:30px;z-index:3}
.road-map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-top-color:#0f1d36}
.road-map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip{border-bottom-color:#0f1d36}
.road-map-card header{display:grid;gap:2px;padding:10px 36px 8px 12px}
.road-map-card header b{font-size:15px}.road-map-card header small{color:#9fb3d6;font-size:12px}
.road-map-video{position:relative;aspect-ratio:16/9;background:#000}
.road-map-video video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.road-map-video[data-live=true]::before{content:"LIVE";position:absolute;top:8px;left:8px;z-index:2;padding:2px 8px;border-radius:5px;background:#e23b3b;color:#fff;font-size:11px;font-weight:800} .road-map-video[data-source-provenance=REPLAY_LIVE_SIMULATION][data-live=true]::before{content:"시뮬레이션 · 실제 CCTV 아님";background:#685018}
.road-map-card dl{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0;padding:8px 12px}
.road-map-card dt{font-size:11px;color:#8ea4c8}.road-map-card dd{margin:2px 0 0;font-size:12px;font-weight:600}
.road-map-card .stream-state{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid;border-radius:999px;font-size:11px;white-space:nowrap}
.road-map-actions{display:flex;justify-content:flex-end;gap:6px;padding:0 12px 12px}
.road-map-actions button{padding:6px 10px;border-radius:7px;border:1px solid #2b4370;background:#13264a;color:#e5edf9;font-weight:700;cursor:pointer}
.road-map-actions button.primary{background:linear-gradient(135deg,#2f7bff,#1b56e0);border-color:#4d8dff}
@media(max-width:650px){[data-minimal-vms=true] #road-map-slot{min-height:calc(100dvh - 190px)}[data-minimal-vms=true] .road-map-note{display:none}}
.road-map-card .stream-state::before{content:"";flex:none;width:8px;height:8px;box-sizing:border-box}
@media(max-width:650px){[data-minimal-vms=true] #road-map-slot:has(.maplibregl-popup) .road-map-legend{display:none}}

/* ---- 도로 관제 page (road view): mockup "SALPION CCTV 관제 화면 개선안" ---- */
/* Header: the page title replaces the product title and the org/site breadcrumb on the road page. */
[data-minimal-vms=true] .road-page-title{display:none}
[data-minimal-vms=true][data-cctv-view=road] .road-page-title{display:block;margin:0 0 0 4px;font-size:19px;font-weight:800;color:#f2f6ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}
[data-minimal-vms=true][data-cctv-view=road] .workspace-header .workspace-brand,[data-minimal-vms=true][data-cctv-view=road] .workspace-header .facility-picker,[data-minimal-vms=true][data-cctv-view=road] .workspace-header #page-label{display:none!important}
/* Left menu: one flat list; the 분야 선택 popup at the top switches 시설/도로/연안 etc. (2026-11-11). */
/* Toolbar: one row. */
@media(min-width:1101px){[data-minimal-vms=true][data-cctv-view=road] .wall-toolbar{flex-wrap:nowrap!important;align-items:center;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
 [data-minimal-vms=true][data-cctv-view=road] .wall-toolbar>*{flex:none}
 [data-minimal-vms=true][data-cctv-view=road] .wall-toolbar:has(.vms-tools-popover:not([hidden])){flex-wrap:wrap!important;overflow:visible}}
[data-minimal-vms=true][data-cctv-view=road] .wall-toolbar [data-vms-more]{min-width:40px;font-size:18px;line-height:1}
/* Region buttons with counts on top of the camera list (3 per row). */
[data-minimal-vms=true][data-cctv-view=road] .busan-tree .road-regions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:10px 12px 4px}
[data-minimal-vms=true][data-cctv-view=road] .busan-tree .road-regions button{padding:6px 4px;border:1px solid var(--sp-line2);border-radius:7px;background:#12223f;color:#dbe6fb;font-weight:700;white-space:nowrap;cursor:pointer}
[data-minimal-vms=true][data-cctv-view=road] .busan-tree .road-regions button b{margin-left:3px;font-weight:600;opacity:.8}
[data-minimal-vms=true][data-cctv-view=road] .busan-tree .road-regions button[aria-pressed=true]{background:linear-gradient(135deg,#2f7bff,#1b56e0);border-color:#4d8dff;color:#fff}
/* The list carries the same status (shape + colour) as the card header. */
[data-minimal-vms=true] .busan-tree .stream-state{display:inline-flex!important;align-items:center;gap:5px;width:max-content;margin-top:3px;padding:1px 7px;border:1px solid;border-radius:999px;font-size:11px}
[data-minimal-vms=true] .busan-tree .stream-state::before{content:"";flex:none;width:8px;height:8px;box-sizing:border-box}
/* 재연결 중: amber half ring (mockup), still spinning; reduced motion keeps it still. */
[data-minimal-vms=true] .stream-state[data-stage=retry]{background:#3a2a0c!important;color:#ffb547!important;border-color:#8a6420!important}
/* Open-list button only while the camera list is folded. */
[data-minimal-vms=true][data-cctv-view=road] .wall-toolbar [data-vms-list][aria-expanded=true]{display:none!important}
/* Page step stays in its own row under the wall (operator preference). */
/* The '최근 사건' bar stays on the road page as on the facility page (operator preference, 2026-11-10). */
/* One status per tile: the header pill. No separate LIVE overlay or footer label on wall tiles. */
[data-minimal-vms=true][data-cctv-view=road] .wall-slot .media-surface::before{content:none!important}
[data-minimal-vms=true][data-cctv-view=road] .wall-slot [data-media-label]{display:none!important}
@media(max-width:650px){
 /* Dense road wall on a phone: number + status dot only in the tile header (no overlapping icons). */
 [data-minimal-vms=true][data-cctv-view=road] .vms-auto-fit:is([data-visible-cameras="10"],[data-visible-cameras="11"],[data-visible-cameras="12"],[data-visible-cameras="13"],[data-visible-cameras="14"],[data-visible-cameras="15"],[data-visible-cameras="16"]) .slot-actions,[data-minimal-vms=true][data-cctv-view=road] .wall-grid.wall-16 .slot-actions{display:none!important}
 [data-minimal-vms=true][data-cctv-view=road] .vms-auto-fit:is([data-visible-cameras="10"],[data-visible-cameras="11"],[data-visible-cameras="12"],[data-visible-cameras="13"],[data-visible-cameras="14"],[data-visible-cameras="15"],[data-visible-cameras="16"]) .slot-heading .stream-state,[data-minimal-vms=true][data-cctv-view=road] .wall-grid.wall-16 .slot-heading .stream-state{font-size:0!important;padding:3px!important;gap:0!important;border:0!important;background:transparent!important}
 [data-minimal-vms=true][data-cctv-view=road] .road-page-title{font-size:15px}
}

/* Extra tools (⋯): open in flow under the toolbar as before (operator preference, 2026-11-11), with a short
   slide-in when they appear. The class is set only on the press that opens them, so re-renders never replay it. */
@keyframes vms-tools-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
[data-minimal-vms=true] .vms-tools-popover.vms-tools-enter{animation:vms-tools-in .22s cubic-bezier(.2,.8,.2,1) both}
@media(prefers-reduced-motion:reduce){[data-minimal-vms=true] .vms-tools-popover.vms-tools-enter{animation:none}}

/* Toolbar selects (순환, 저장된 배치): room for the value, left-aligned, one CSS-drawn chevron (no image, any CSP) instead
   of the cramped native arrow; the label matches the toolbar text size. */
[data-minimal-vms=true] #video-wall .wall-toolbar .wall-tools label{gap:8px;font-size:13px;color:#9fb0d0;white-space:nowrap}
[data-minimal-vms=true] #video-wall .wall-toolbar .wall-tools select{width:auto!important;min-width:96px}
[data-minimal-vms=true] #video-wall .wall-toolbar select{padding:0 34px 0 14px!important;text-align:left;cursor:pointer;
  -webkit-appearance:none;appearance:none;
  background:linear-gradient(45deg,transparent 50%,#9fb0d0 50%) no-repeat calc(100% - 19px) 50%/6px 6px,
    linear-gradient(135deg,#9fb0d0 50%,transparent 50%) no-repeat calc(100% - 13px) 50%/6px 6px,#0e1d3d!important}
[data-minimal-vms=true] #video-wall .wall-toolbar select:hover{border-color:#4d8dff!important}
[data-minimal-vms=true] #video-wall .wall-toolbar select option{background:#0e1d3d;color:#dfe8fb}

/* Extra tools row (in flow): it takes the full toolbar width and wraps, so it never runs off to the right and never
   gives the wall a horizontal scrollbar; the groups start at the left (FIT ... 64), and the server-preset controls
   open inside the row under their summary instead of floating over the FIT row. */
[data-minimal-vms=true] .wall-toolbar>.vms-tools-popover{flex:0 0 100%!important;max-width:100%;min-width:0;box-sizing:border-box;justify-content:flex-start;align-items:center;gap:8px 10px}
[data-minimal-vms=true] .wall-toolbar .vms-tools-popover>.fit-controls,[data-minimal-vms=true] .wall-toolbar .vms-tools-popover>.wall-tools,[data-minimal-vms=true] .wall-toolbar .vms-tools-popover>.vms-extra-layouts{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0!important;flex:0 1 auto;min-width:0}
[data-minimal-vms=true] .wall-toolbar .vms-tools-popover>.legacy-layouts{flex:0 0 100%;width:auto;margin:0!important}
[data-minimal-vms=true] .wall-toolbar .vms-tools-popover>.legacy-layouts>.operator-wall-controls{position:static;width:auto;max-width:100%;box-sizing:border-box;margin:8px 0 2px;display:flex;flex-wrap:wrap;gap:8px;box-shadow:none;border:1px solid var(--sp-line2,#2a3c63);border-radius:10px;padding:10px}

/* '저장된 배치' appears only once at least one layout has been saved (operator preference, 2026-11-11):
   with no saved layout its list holds the placeholder alone. Reacts by itself when a layout is saved or removed. */
[data-minimal-vms=true] #operator-layout:not(:has(option:not([value=""]))){display:none!important}
