:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #1b1f27; --muted: #5d6573; --line: #dfe2e8;
  --accent: #2f6fdb; --accent-ink: #fff; --ok: #1f9d55; --warn: #c27a00; --bad: #c93c3c;
  --floor: #fbfbfc; --grid1: #eceef2; --grid5: #d6dae1; --me: #e2483d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b2029; --ink: #e8ebf0; --muted: #9aa3b2; --line: #2c3340;
    --accent: #5b8ff0; --floor: #171b22; --grid1: #20262f; --grid5: #2d3440; --me: #ff6a5c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=number] { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 100%; }
h1 { font-size: 17px; margin: 0; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.muted { color: var(--muted); font-size: 13px; }

svg.plan { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; background: var(--bg); }
svg.plan .floor { fill: var(--floor); }
svg.plan .g1 { stroke: var(--grid1); stroke-width: calc(var(--px) * 1); }
svg.plan .g5 { stroke: var(--grid5); stroke-width: calc(var(--px) * 1); }
svg.plan .scan image { opacity: .85; }
svg.plan .scanbox { fill: transparent; stroke: #e08a2a; stroke-dasharray: .25 .15; stroke-width: calc(var(--px) * 1.5); cursor: move; }
svg.plan .origin { fill: #e08a2a; }
svg.plan .rothandle, svg.plan .sizehandle { fill: #fff; stroke: var(--accent); stroke-width: calc(var(--px) * 2); cursor: grab; }
svg.plan .stall rect { fill-opacity: .18; stroke-width: calc(var(--px) * 2); }
svg.plan .stall.sel rect { fill-opacity: .32; stroke-width: calc(var(--px) * 3.5); }
svg.plan .stall [data-drag=stall] { cursor: move; }
svg.plan .label { text-anchor: middle; dominant-baseline: central; fill: var(--ink); font-weight: 600; pointer-events: none;
  paint-order: stroke; stroke: var(--floor); stroke-width: calc(var(--px) * 3); }
svg.plan .me .halo { fill: var(--me); fill-opacity: .15; stroke: var(--me); stroke-opacity: .4; stroke-width: calc(var(--px) * 1.5); }
svg.plan .me .cone path { fill: var(--me); fill-opacity: .28; }
svg.plan .me .dot { fill: var(--me); stroke: #fff; stroke-width: calc(var(--px) * 3); }
svg.plan .me.pending .dot { fill: var(--warn); }
svg.plan .me.coarse .dot { fill: var(--warn); }
svg.plan .measure { stroke: var(--bad); stroke-width: calc(var(--px) * 2.5); }
