.map-management-layout { display:grid; grid-template-columns:320px minmax(0,1fr); gap:20px; align-items:start; }
.map-management-list, .map-management-detail { min-width:0; border-radius:14px; background:var(--surface); overflow:hidden; }
.map-management-layout h2 { margin:0; font-size:15px; font-weight:600; }
.map-management-list > .panel-head { padding:18px; }
.map-management-list > .panel-body { padding:16px 12px; }
.map-management-filter { margin:0 6px 18px; }
.map-management-filter label, .map-scan-control-card label { display:grid; gap:8px; color:var(--muted); font-size:12px; }
.map-management-cards { display:grid; gap:6px; }
.map-management-card { display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; width:100%; padding:8px; text-align:left; border:1px solid transparent; border-radius:10px; background:transparent; color:inherit; line-height:1.35; transition:background .16s, border-color .16s; }
.map-management-card:hover { background:var(--panel-soft); }
.map-management-card.active { border-color:rgba(34,211,238,.32); background:rgba(34,211,238,.07); }
.map-management-card:focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.map-management-card-image { width:72px; height:56px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:7px; background:var(--surface-soft); color:var(--muted); font-size:10px; }
.map-management-card-image img { width:100%; height:100%; object-fit:contain; }
.map-management-card-copy { display:flex; flex-direction:column; justify-content:center; gap:6px; min-width:0; }
.map-management-card-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12.5px; font-weight:600; }
.map-management-tags { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.map-management-tag { display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; width:auto; min-height:20px; padding:2px 6px; border:1px solid var(--line); border-radius:5px; font-size:10px; font-weight:500; line-height:1.2; white-space:nowrap; color:var(--muted); background:var(--panel-soft); }
.map-management-tag.model { color:#9ec9e8; border-color:rgba(115,176,221,.2); background:rgba(115,176,221,.08); }
.map-management-tag.ready { color:#63d9b2; border-color:rgba(16,185,129,.2); background:rgba(16,185,129,.08); }
.map-management-tag.draft { color:#e5bc79; border-color:rgba(245,158,11,.2); background:rgba(245,158,11,.07); }
.map-management-tag.failed { color:var(--bad); border-color:rgba(249,115,91,.25); background:rgba(249,115,91,.08); }
.map-management-tag.live { color:var(--cyan); border-color:rgba(34,211,238,.25); background:rgba(34,211,238,.08); }
.map-management-tag.live::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.map-management-detail { container-type:inline-size; }
.map-management-detail > .map-management-detail-head { padding:22px 24px; gap:16px; flex-wrap:wrap; }
.map-management-detail-head > div:first-child { min-width:0; flex:1; }
.map-management-detail-head h1 { margin:0; font-size:21px; font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
.map-management-rename-icon { margin-left:8px; vertical-align:middle; color:var(--muted); opacity:.72; transition:color .16s, opacity .16s, background .16s; }
.map-management-rename-icon:hover:not(:disabled), .map-management-rename-icon:focus-visible { color:var(--cyan); opacity:1; }
.map-management-detail-head p { margin:6px 0 0; line-height:1.6; }
.map-management-detail > .panel-body { padding:22px; }
.map-scan-workspace { display:grid; grid-template-columns:minmax(0,1fr) 248px; gap:18px; align-items:start; }
.map-scan-live-card, .map-scan-control-card { min-width:0; border:1px solid var(--line); border-radius:11px; background:transparent; overflow:hidden; }
.map-scan-live-card > .panel-head { padding:16px 18px; gap:12px; }
.map-scan-live-card .muted { margin-top:5px; }
.map-scan-canvas-wrap { position:relative; padding:12px; background:rgba(0,0,0,.12); }
.map-scan-canvas-wrap canvas { display:block; width:100%; height:auto; aspect-ratio:3/2; border-radius:7px; background:#101c27; }
.map-scan-canvas-wrap img { display:block; width:100%; max-height:480px; object-fit:contain; border-radius:7px; background:#cdd3d8; margin-top:12px; }
.map-scan-canvas-wrap img[hidden] { display:none; }
.map-scan-live-card.is-idle canvas, .map-scan-placeholder { display:none; }
.map-scan-live-card.is-idle .map-scan-placeholder { min-height:320px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; text-align:center; color:var(--muted); font-size:12px; line-height:1.7; }
.map-scan-placeholder strong { color:var(--text); font-size:14px; font-weight:500; }
.map-scan-live-card.is-idle:has(img:not([hidden])) .map-scan-placeholder { display:none; }
.map-scan-live-card.is-idle img { margin-top:0; min-height:320px; }
.map-scan-control-card { display:grid; align-content:start; gap:18px; padding:20px; background:var(--panel-soft); }
.map-scan-control-card h2 { margin:0 0 2px; font-size:14px; }
.map-scan-control-card input, .map-scan-control-card select { min-width:0; min-height:40px; background-color:var(--surface); }
.map-scan-control-actions { display:flex; gap:8px; padding-top:2px; }
.map-scan-control-actions button { width:100%; min-height:40px; }
.map-scan-facts { display:grid; gap:12px; margin:0; padding-top:16px; border-top:1px solid var(--line); font-size:12px; }
.map-scan-facts div { display:flex; justify-content:space-between; align-items:baseline; gap:14px; }
.map-scan-facts dt { color:var(--muted); flex-shrink:0; }
.map-scan-facts dd { margin:0; text-align:right; color:var(--text); overflow-wrap:anywhere; }
.map-scan-help { margin:0; padding-top:16px; border-top:1px solid var(--line); font-size:11px; line-height:1.85; }
.map-management-empty { padding:28px 14px; color:var(--muted); text-align:center; font-size:12px; line-height:1.8; }
.map-management-welcome { min-height:440px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:32px; text-align:center; }
.map-management-empty-icon { display:grid; place-items:center; width:48px; height:48px; margin-bottom:8px; border:1px solid var(--line); border-radius:12px; background:var(--panel-soft); color:#9ec9e8; font-size:28px; }
.map-management-welcome h2 { margin:12px 0 0; }
.map-management-welcome p { margin:10px 0 0; color:var(--muted); font-size:13px; line-height:1.8; }
[data-account-annotations] { margin-top:26px; padding-top:24px; border-top:1px solid var(--line); }
.map-annotations-heading { margin-bottom:18px; }
.map-annotations-heading p { margin:8px 0 0; font-size:12px; line-height:1.8; }
.map-annotation-section { border:1px solid var(--line); border-radius:9px; padding:14px; margin-top:12px; background:rgba(255,255,255,.015); }
.map-annotation-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.map-annotation-section-head h3 { margin:0; font-size:13px; font-weight:500; }
[data-account-annotations] fieldset { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; min-width:0; border:0; border-top:1px solid var(--line); padding:16px 0 0; margin:14px 0 0; }
[data-account-annotations] label { display:grid; gap:6px; min-width:0; font-size:11px; }
[data-account-annotations] input, [data-account-annotations] select { width:100%; min-width:0; background-color:var(--surface); }
[data-account-annotations] [data-account-remove] { justify-self:start; color:var(--bad); border-color:transparent; background:transparent; padding:0 2px; min-height:28px; font-size:12px; }
.map-annotations-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-top:20px; font-size:12px; }
.map-annotations-footer button { min-height:38px; }
.scene-map-binding-panel { margin:14px 0; }
.scene-map-model-tabs { display:flex; align-items:flex-end; gap:4px; min-width:0; margin:14px 0 -1px; position:relative; z-index:2; }
.scene-map-model-tab { flex:0 0 auto; min-width:104px; display:grid; gap:4px; justify-items:start; align-content:center; min-height:54px; padding:8px 13px 9px; border:1px solid var(--line); border-bottom-color:transparent; border-radius:8px 8px 0 0; background:rgba(255,255,255,.03); color:var(--text); text-align:left; transition:color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.scene-map-model-tab:hover:not(:disabled) { border-color:rgba(34,211,238,.5); border-bottom-color:transparent; background:rgba(34,211,238,.08); transform:translateY(-1px); }
.scene-map-model-tab.active { border-color:rgba(34,211,238,.72); border-bottom-color:var(--panel); background:var(--panel); box-shadow:0 -2px 0 rgba(34,211,238,.16); }
.scene-map-model-tab span { overflow:hidden; max-width:100%; text-overflow:ellipsis; white-space:nowrap; color:var(--cyan); font-size:13px; font-weight:700; }
.scene-map-model-tab small { overflow:hidden; max-width:100%; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.scene-map-model-content-panel { position:relative; z-index:1; margin:0 0 14px; border-radius:0 10px 10px 10px; }
.scene-map-unbound-panel { margin:0 0 14px; }
.scene-map-unbound-content { display:grid; gap:14px; max-width:640px; }
.scene-map-unbound-content label { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.scene-map-unbound-content select { width:100%; }
.scene-map-binding-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.scene-map-binding-grid label { display:grid; gap:5px; color:var(--muted); font-size:12px; }
.scene-map-binding-grid small { color:var(--muted); }
.scene-map-model-cards { grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); }
.scene-map-model-card { display:grid; gap:12px; padding:15px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.02); }
.scene-map-model-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.scene-map-model-card-head > div { display:grid; gap:5px; min-width:0; }
.scene-map-model-card-head strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scene-map-model-label { color:var(--cyan); font-size:12px; font-weight:700; }
.scene-map-binding-status { padding:3px 8px; border-radius:999px; font-size:11px; white-space:nowrap; border:1px solid var(--line); }
.scene-map-binding-status.online { color:var(--good); border-color:rgba(94,234,212,.35); background:rgba(94,234,212,.08); }
.scene-map-binding-status.warning { color:var(--warn); border-color:rgba(251,191,36,.35); background:rgba(251,191,36,.08); }
.scene-map-binding-status.offline { color:var(--muted); }
.scene-map-model-card-meta { display:flex; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:11px; }
.scene-map-model-picker { display:grid; gap:5px; color:var(--muted); font-size:11px; }
.scene-map-model-actions { display:flex; justify-content:flex-end; min-height:30px; }
@container (max-width:680px) {
  .map-scan-workspace { grid-template-columns:1fr; }
  .map-scan-control-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .map-scan-control-card h2, .map-scan-help, .map-scan-facts { grid-column:1 / -1; }
  .map-scan-control-actions { align-self:end; }
}
@media (max-width:1000px) {
  .map-management-layout { grid-template-columns:280px minmax(0,1fr); gap:14px; }
  .map-management-detail > .panel-body { padding:16px; }
}
@media (max-width:760px) {
  .map-management-layout { grid-template-columns:1fr; }
  .map-management-cards { max-height:300px; overflow-y:auto; }
  .map-management-detail > .map-management-detail-head { padding:18px; }
  .map-management-detail-head h1 { font-size:19px; }
  .map-scan-live-card.is-idle .map-scan-placeholder, .map-scan-live-card.is-idle img { min-height:240px; }
  [data-account-annotations] fieldset { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .scene-map-binding-grid { grid-template-columns:1fr; }
  .scene-map-model-tabs { overflow-x:auto; padding-bottom:1px; }
  .scene-map-model-tab { min-width:96px; }
}
@media (prefers-reduced-motion:reduce) {
  .map-management-card { transition:none; }
}

/* Account map workspace: persistent list, map canvas, and annotation inspector. */
.map-management-layout { grid-template-columns:280px minmax(0,1fr); gap:18px; }
[data-map-detail-host] { min-width:0; }
.map-management-detail { position:relative; min-height:480px; }
.map-detail-content > .panel-body { padding:18px; }
.map-detail-content > .map-management-detail-head { padding:20px; flex-wrap:wrap; }
.map-detail-content > .map-management-detail-head h1 { flex:1 1 140px; }
.map-detail-actions, .map-scan-toolbar-actions, .map-scan-toolbar-info { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.map-scan-workspace { grid-template-columns:minmax(0,1fr) 320px; }
.map-workspace-main { min-width:0; }
.map-loading-mask { position:absolute; inset:0; z-index:8; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:14px; min-height:240px; background:rgba(10,22,30,.78); backdrop-filter:blur(3px); font-size:13px; }
.map-loading-mask[hidden] { display:none; }
.map-loading-spinner { width:26px; height:26px; border:2px solid var(--line); border-top-color:var(--cyan); border-radius:50%; animation:map-loading-spin .7s linear infinite; }
@keyframes map-loading-spin { to { transform:rotate(360deg); } }
.map-load-error { padding:12px; color:var(--bad); font-size:12px; line-height:1.7; }
.map-load-error:empty { display:none; }
.map-load-error button { margin-left:10px; }
.map-scan-toolbar { display:grid; gap:12px; padding:14px; margin-bottom:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel-soft); font-size:12px; }
.map-scan-toolbar-info { column-gap:14px; line-height:1.7; }
.map-scan-toolbar [data-map-scan-reason]:empty { display:none; }
.map-annotations-sidebar { align-self:start; position:sticky; top:84px; max-height:calc(100vh - 110px); display:flex; min-width:0; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--panel-soft); overflow:auto; }
.map-annotations-sidebar > p { line-height:1.8; font-size:12px; }
.map-annotations-sidebar:has(> h2) { display:block; }
.map-annotations-sidebar [data-account-annotations] { width:100%; min-width:0; margin:0; padding:0; border:0; }
.map-annotation-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:16px 0; padding-bottom:8px; }
.map-annotation-tabs button { flex:1; padding:0 5px; border:0; background:transparent; font-size:12px; }
.map-annotation-tabs button[aria-selected=true] { background:rgba(34,211,238,.1); color:var(--cyan); }
.map-annotation-tabs small { color:var(--muted); font-size:10px; }
[data-account-annotations] fieldset.map-annotation-body { display:block; border:0; margin:0; padding:0; min-width:0; }
.map-annotation-list { display:grid; gap:5px; max-height:170px; overflow:auto; margin-bottom:10px; }
.map-annotation-list button { justify-content:flex-start; text-align:left; min-width:0; overflow-wrap:anywhere; line-height:1.4; padding:8px; border-color:transparent; background:transparent; }
.map-annotation-list button.active { background:rgba(34,211,238,.07); border-color:rgba(34,211,238,.25); }
.map-annotation-editor fieldset { grid-template-columns:repeat(2,minmax(0,1fr)); }
.map-annotation-editor [data-account-point] label:nth-child(-n+3), .map-annotation-editor [data-account-route] label, .map-annotation-editor [data-account-restriction] label:nth-child(-n+2) { grid-column:1/-1; }
.map-annotation-empty { font-size:12px; line-height:1.8; padding:12px 0; }
.map-annotations-sidebar .map-annotations-footer { position:sticky; bottom:-16px; display:grid; background:var(--surface-soft); padding:14px 0; gap:10px; margin-top:14px; }
.map-scan-dialog { width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; }
.map-scan-dialog-form, .map-scan-dialog-form fieldset { display:grid; gap:18px; }
.map-scan-dialog-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.map-scan-dialog-form p { margin:0; font-size:12px; line-height:1.7; }
.map-teleop-panel { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); margin-bottom:12px; }
.map-teleop-panel[hidden] { display:none; }
.map-teleop-panel strong { font-size:13px; }
.map-teleop-panel p { font-size:12px; max-width:220px; line-height:1.6; }
.map-teleop-pad { display:grid; grid-template-columns:repeat(3,76px); gap:6px; }
.map-teleop-pad button { min-height:42px; padding:0 8px; white-space:nowrap; touch-action:none; user-select:none; }
.map-teleop-pad button:first-child, .map-teleop-pad button:last-child { grid-column:2; }
.map-teleop-pad button[data-map-drive=forward] { grid-area:1 / 2; }
.map-teleop-pad button[data-map-drive=left] { grid-area:2 / 1; }
.map-teleop-pad button[data-map-drive=stop] { grid-area:2 / 2; }
.map-teleop-pad button[data-map-drive=right] { grid-area:2 / 3; }
.map-teleop-pad button[data-map-drive=back] { grid-area:3 / 2; }
.map-teleop-pad button.active { background:rgba(34,211,238,.22); border-color:var(--cyan); }
.map-teleop-pad button[data-map-drive=stop] { color:var(--bad); }
@container (max-width:760px) {
  .map-scan-workspace { grid-template-columns:1fr; }
  .map-annotations-sidebar { position:static; max-height:none; }
}
@media (max-width:760px) {
  .map-management-layout { grid-template-columns:1fr; }
  .map-detail-actions { width:100%; justify-content:space-between; }
  .map-detail-content > .map-management-detail-head h1 { flex-basis:100%; }
  .map-teleop-panel { justify-content:center; }
}
@media (prefers-reduced-motion:reduce) { .map-loading-spinner { animation:none; } }

/* Canvas editing keeps the image and metric overlays in one transformed plane. */
.map-more { position:relative; font-size:12px; }
.map-more summary { cursor:pointer; padding:8px; border:1px solid var(--line); border-radius:6px; }
.map-more > button { position:absolute; right:0; top:100%; z-index:9; white-space:nowrap; background:var(--panel); }
.account-map-tools { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:10px; border-bottom:1px solid var(--line); }
.account-map-tool-group { display:flex; align-items:center; flex-wrap:wrap; gap:4px; font-size:11px; color:var(--muted); }
.account-map-tools button, .map-editor-hint button { font-size:11px; min-height:30px; padding:0 8px; }
.account-map-tools button.active { color:var(--cyan); background:rgba(34,211,238,.12); border-color:var(--cyan); }
.account-map-tools [data-map-edit-tools] { padding:4px 6px; border:1px solid rgba(34,211,238,.35); border-radius:7px; background:rgba(34,211,238,.06); }
.account-map-tools [data-map-edit-tools][hidden], .account-map-tools [data-map-view-tools][hidden] { display:none; }
.account-map-tools [data-map-edit-save] { color:#052e2b; background:#6ee7b7; border-color:#6ee7b7; }
.account-map-tools [data-map-edit-abort] { color:#fecaca; border-color:rgba(248,113,113,.55); }
.account-map-rotation-label { color:var(--muted); margin-left:4px; }
.account-map-rotation-input { display:inline-flex; align-items:center; gap:2px; color:var(--muted); }
.account-map-rotation-input input { width:58px; min-height:28px; padding:0 5px; font-size:11px; }
.map-editor-hint { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:9px 12px; color:var(--muted); font-size:11px; min-height:36px; }
.map-editor-hint [hidden] { display:none; }
.account-map-container { padding:0; }
.account-map-viewport { position:relative; height:460px; overflow:hidden; touch-action:none; user-select:none; outline-offset:-2px; background:#15232c; cursor:grab; }
.account-map-viewport:active { cursor:grabbing; }
.account-map-viewport[data-map-tool=presentation] { cursor:crosshair; }
.account-map-view-switch { position:absolute; z-index:6; top:10px; left:10px; display:flex; gap:2px; padding:3px; border:1px solid rgba(255,255,255,.2); border-radius:7px; background:rgba(15,31,40,.88); box-shadow:0 3px 12px rgba(0,0,0,.2); }
.account-map-view-switch button { min-height:28px; padding:0 9px; border:1px solid transparent; border-radius:5px; color:#c5d5dc; background:transparent; font-size:11px; }
.account-map-view-switch button.active { color:#fff; border-color:var(--cyan); background:rgba(34,211,238,.2); }
.account-map-presentation-status { color:var(--muted); }
.account-map-presentation-status[data-state=editing] { color:#fbbf24; font-weight:600; }
.account-map-presentation-status[data-state=ready] { color:#6ee7b7; font-weight:600; }
[data-account-map-stage] { position:absolute; left:0; top:0; transform-origin:0 0; }
.map-scan-live-card .account-map-container [data-map-scan-image] { display:block; width:100%; height:100%; min-height:0; max-height:none; margin:0; border-radius:0; object-fit:fill; pointer-events:none; }
.map-scan-live-card .account-map-container [data-map-scan-image][hidden] { display:none; }
[data-map-edit-overlay] { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.account-map-viewport[data-map-tool=presentation] .map-presentation-handle { cursor:move; pointer-events:all; }
.account-map-viewport[data-map-view-mode=navigation] .map-presentation-mask { display:none; }
.account-map-container [data-account-presentation-image] { position:absolute; max-width:none; margin:0; pointer-events:none; image-rendering:auto; }
.account-map-container [data-account-presentation-image][hidden] { display:none; }
.account-map-viewport[data-map-view-mode=navigation] .map-presentation-boundary,
.account-map-viewport[data-map-view-mode=navigation] .map-presentation-handle,
.account-map-viewport[data-map-view-mode=navigation] .map-presentation-index { display:none; }
.map-object { stroke:#50d5e8; stroke-width:2; fill:rgba(34,211,238,.1); cursor:pointer; }
.map-object *, .map-object, .map-edit-handle, .map-route-pending { vector-effect:non-scaling-stroke; }
.map-object[data-map-object=points] circle { fill:#173f4d; }
.map-object[data-map-object=points] path { fill:none; stroke-width:2; }
.map-object text { stroke:#172e3b; stroke-width:3; stroke-linejoin:round; fill:#f4fbfd; paint-order:stroke; pointer-events:none; }
.map-object[data-map-object=virtual_restrictions] { stroke:#fa8790; fill:rgba(240,90,100,.17); }
.map-object[data-map-object=routes] { fill:none; stroke-width:4; }
.map-object[data-map-object=narrow_passages] { stroke:#fbbf24; stroke-width:4; fill:none; }
.map-object.selected { stroke:#fde68a; }
.map-edit-handle { fill:#fde68a !important; stroke:#15232c; stroke-width:2; cursor:crosshair; }
.map-route-pending { stroke:#fde68a; stroke-width:3; stroke-dasharray:6 4; fill:none; pointer-events:none; }
.map-annotation-editor .map-field-wide, .map-route-order { grid-column:1/-1; margin:0; font-size:11px; line-height:1.7; }
.map-route-order { padding-left:20px; }
.map-route-order li { padding:6px 0; }
.map-route-order button { min-height:26px; font-size:10px; padding:0 7px; margin:4px 3px 0 0; }
.map-annotation-editor [data-account-point] label:nth-child(3) { grid-column:auto; }
.map-usage-list { padding-left:20px; font-size:13px; }
.map-usage-list li { margin:12px 0; }
.map-usage-list span { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
@media(max-width:760px) { .account-map-viewport { height:340px; } }

/* Scan driving sidebar replaces annotations only for the active session. */
.map-driving-sidebar { display:grid; align-content:start; gap:14px; min-width:0; }
.map-driving-card { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface-soft); padding:14px; }
.map-driving-card header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.map-driving-card h2 { font-size:13px; margin:0; }
.map-driving-card header > div { display:flex; gap:4px; }
.map-driving-card button { padding:4px 7px; min-height:28px; font-size:11px; }
.map-driving-card p { font-size:11px; line-height:1.7; margin:10px 0 0; }
.map-camera-stage { aspect-ratio:16/9; background:#101c27; border-radius:8px; overflow:hidden; display:flex; }
.map-camera-stage video { width:100%; height:100%; object-fit:contain; }
.map-camera-stage video.is-stale { opacity:.2; }
.map-driving-card [data-map-scan-canvas] { display:block; width:100%; height:auto; border-radius:8px; }
.map-driving-card [data-map-scan-canvas].is-stale { opacity:.25; }
.map-driving-sensors { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.map-driving-sensors p { margin-top:0; }
.map-ultrasonic-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:8px; }
.map-ultrasonic-grid > div { display:grid; gap:5px; padding:5px; border-radius:7px; background:rgba(34,211,238,.07); }
.map-ultrasonic-grid span, .map-ultrasonic-grid small { font-size:10px; color:var(--muted); font-weight:400; }
.map-ultrasonic-grid strong { font-size:12px; font-variant-numeric:tabular-nums; }
.map-ultrasonic-grid .is-stale { opacity:.45; }
.map-ultrasonic-grid .is-near { color:var(--bad); background:rgba(240,90,100,.12); }
.map-scan-controls:has(.map-teleop-panel) { border:1px solid var(--line); border-radius:12px; background:var(--panel-soft); margin-bottom:12px; overflow:hidden; }
.map-scan-controls:has(.map-teleop-panel) .map-scan-toolbar { border:0; border-radius:0; margin:0; }
.map-scan-controls .map-teleop-panel { border:0; border-top:1px solid var(--line); border-radius:0; margin:0; }
.map-scan-controls .map-teleop-panel p { max-width:340px; margin:6px 0 0; }
.map-scan-controls .map-teleop-pad { grid-template-columns:repeat(3,minmax(60px,76px)); }
.map-scan-controls .map-teleop-pad button { min-height:36px; }
.map-teleop-speeds { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.map-teleop-speeds label { display:grid; gap:4px; color:var(--muted); font-size:10px; }
.map-teleop-speeds select { min-width:112px; min-height:28px; padding:3px 6px; font-size:11px; }
.map-erase-preview { fill:rgba(248,113,113,.28); stroke:#fb7185; stroke-width:2; stroke-dasharray:6 4; pointer-events:none; }
.map-driving-card.is-expanded { position:fixed; inset:6vh 10vw; z-index:150; background:var(--panel); display:flex; flex-direction:column; box-shadow:0 0 0 100vmax rgba(0,0,0,.65); }
.map-driving-card.is-expanded .map-camera-stage { min-height:0; flex:1; }
.map-scan-readiness { padding:12px; background:var(--surface-soft); border:1px solid var(--line); border-radius:9px; display:grid; gap:8px; }
