:root {
  --bg: #f4f6f8; --panel: #fbfcfd; --line: #dde2e8; --ink: #26313c; --muted: #6b7885; --accent: #2f6fb2; --accent-soft: #dcebf8;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { display: flex; flex-direction: column; font-size: 13px; }

.topbar { height: 40px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand .mark { width: 14px; height: 14px; border-radius: 3px; background: linear-gradient(135deg, var(--accent) 50%, #8fb6dc 50%); }
.brand .sep { color: #b3bcc6; }
.brand span:last-child { color: var(--muted); }
.project { color: var(--muted); }

.app { flex: 1; display: flex; min-height: 0; }
.panel { width: 272px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.panel section { padding: 14px 16px 6px; }
.panel h2 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sites, .layers { list-style: none; margin: 0; padding: 0; }
.site { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.site.active { border-color: #a9c8e6; background: var(--accent-soft); }
.site small { display: block; color: var(--muted); margin-top: 2px; }
.pin { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff inset; border: 2px solid var(--accent); flex: none; }
.search { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; }
.layer-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 5px; }
.layer-row:hover { background: #eef2f6; }
.layer-row .lname { flex: 1; }
.layer-row .lmeta { color: var(--muted); font-size: 11px; }
.layer-row.off .lname, .layer-row.off .swatch { opacity: .4; }
.layer-row.missing .lname { color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.eye-btn { border: 0; background: none; padding: 2px; color: var(--accent); cursor: pointer; display: flex; border-radius: 4px; }
.eye-btn:hover { background: var(--accent-soft); }
.eye-btn[aria-pressed="false"] { color: #a6b0ba; }
.eye .slash { display: none; }
.eye-btn[aria-pressed="false"] .slash { display: inline; }
.panel-foot { margin-top: auto; padding: 12px 16px; font-size: 11px; line-height: 1.4; color: var(--muted); border-top: 1px solid var(--line); }

/* viewport */
.viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #eef1f4; touch-action: none; user-select: none; }
.viewport canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.statusbar { position: absolute; left: 12px; bottom: 10px; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.85); border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.gl-error { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }

/* navigation cluster, top-right */
.cluster { position: absolute; right: 14px; top: 12px; width: 124px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.viewcube { position: relative; width: 124px; height: 124px; }
.vc-stage { position: absolute; inset: 0; perspective: 420px; }
.vc-cube { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.vc-cube > div { position: absolute; backface-visibility: hidden; cursor: pointer; transition: background-color .12s; }
.vc-face { background: #f7f9fb; border: 1px solid #a8b4c0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; letter-spacing: .05em; color: #3b4753; }
.vc-edge { background: #e3e8ee; border: 1px solid #b5bfca; }
.vc-corner { background: #d5dce4; border: 1px solid #b0bac5; border-radius: 3px; }
.vc-cube > div:hover { background: #bcd8f2; border-color: var(--accent); }
.vc-home { position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.92); border-radius: 6px; color: #4b5967; cursor: pointer; padding: 0; }
.vc-home:hover { color: var(--accent); border-color: #a9c8e6; }

.compass { width: 104px; height: 104px; margin-top: -4px; cursor: grab; border-radius: 50%; }
.compass.active { cursor: grabbing; }
.compass-svg { width: 100%; height: 100%; overflow: visible; }
.compass-ring { fill: rgba(255,255,255,.88); stroke: #b3bdc8; stroke-width: 1; }
.compass-inner { fill: #f6f8fa; stroke: #d5dbe2; stroke-width: 1; }
.compass .tick { stroke: #a1acb8; stroke-width: .8; }
.compass .tick.major { stroke: #5c6a78; stroke-width: 1.4; }
.compass .dir { font-size: 11px; font-weight: 600; fill: #55626f; font-family: inherit; }
.compass .dir.north { fill: #c0392b; }
.compass-pointer { fill: var(--accent); }
.compass:hover .compass-ring { stroke: var(--accent); }

.navbar { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; }
.navbar button { width: 32px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: #4b5967; border-radius: 5px; cursor: pointer; }
.navbar button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.navbar button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.navbar button:disabled { opacity: .35; cursor: default; }

/* ---- I1: overlays, selection box, card, technical details ---- */
.overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.overlay [hidden] { display: none; }
.contour-labels, .pins { position: absolute; inset: 0; }
.contour-label { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; font: 600 10.5px/1 inherit; font-family: inherit; color: #234a9a; background: rgba(255,255,255,.88); border: 1px solid #b6c6e6; border-radius: 9px; padding: 3px 7px; white-space: nowrap; }
.contour-label i { font-style: italic; font-weight: 500; margin-left: 5px; color: #b4570c; font-size: 9.5px; }
.contour-label.inferred { color: #a0510a; border: 1px dashed #e0a15e; background: rgba(255,247,238,.92); }
.contour-label.faded, .geo-marker.faded { visibility: hidden; }
.contour-label:hover { border-color: var(--accent); z-index: 3; }

.geo-marker { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; cursor: pointer; }
.pin-dot { position: absolute; left: -7px; top: -19px; width: 14px; height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #2f8f5a; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(20,35,50,.45); }
.geo-marker.review .pin-dot { background: #d98a1c; }
.geo-marker.corner .pin-dot { background: #c43d3d; border-radius: 2px; transform: rotate(45deg); top: -17px; width: 11px; height: 11px; left: -5px; }
.pin-badge { display: none; position: absolute; left: 9px; top: -24px; white-space: nowrap; font-size: 9.5px; font-weight: 600; color: #8a5200; background: #fff4de; border: 1px solid #e8c37d; border-radius: 8px; padding: 2px 6px; }
.near .geo-marker.review .pin-badge { display: block; }
.pin-tip { display: none; position: absolute; left: 12px; bottom: 6px; z-index: 5; min-width: 150px; padding: 7px 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 4px 14px rgba(20,35,50,.2); font-size: 11.5px; line-height: 1.45; }
.pin-tip b, .pin-tip span, .pin-tip em { display: block; }
.pin-tip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.pin-tip em { font-style: normal; font-weight: 600; margin-top: 2px; }
.pin-tip em.good { color: #2b7a4b; } .pin-tip em.warn { color: #9a6208; }
.geo-marker:hover { z-index: 6; }
.geo-marker:hover .pin-tip { display: block; }

.selbox { position: absolute; border: 2px solid #f2c200; border-radius: 3px; box-shadow: 0 0 0 1px rgba(90,70,0,.35), 0 0 10px rgba(242,194,0,.55); background: rgba(242,194,0,.04); pointer-events: none; }

.card { position: absolute; top: 12px; right: 152px; z-index: 4; width: 308px; max-height: calc(100% - 24px); overflow: auto; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20,35,50,.18); padding: 14px 16px 14px; user-select: text; }
.card[hidden] { display: none; }
.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.card-top .kind { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); flex: 1; }
.card-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.card-x:hover { color: var(--ink); background: #eef2f6; }
.card-title { margin: 0; font-size: 21px; line-height: 1.18; font-weight: 650; letter-spacing: -.01em; }
.card-sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.chip { display: inline-block; font-size: 10.5px; font-weight: 650; letter-spacing: .02em; padding: 2px 8px; border-radius: 9px; border: 1px solid; }
.chip.good { color: #2b7a4b; background: #eaf6ef; border-color: #b8dcc6; }
.chip.warn { color: #8a5200; background: #fff4de; border-color: #e8c37d; }
.card .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 0; font-size: 13px; }
.card .facts dt { color: var(--muted); }
.card .facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card .facts dd.good { color: #2b7a4b; font-weight: 600; } .card .facts dd.warn { color: #8a5200; font-weight: 600; }
.card-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

#tech summary { cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 0 6px; }
.tech-body { font-size: 11.5px; color: var(--ink); padding-bottom: 8px; }
.tech-body h3 { margin: 8px 0 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tech-body table { border-collapse: collapse; width: 100%; }
.tech-body td { padding: 2px 0; vertical-align: top; border-bottom: 1px solid #edf0f3; }
.tech-body td:first-child { color: var(--muted); padding-right: 8px; width: 42%; }
.tech-body td:last-child { overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; }
.tech-body a { color: var(--accent); }
.tech-empty { color: var(--muted); }

.cluster, .statusbar { z-index: 5; }

/* sites list + search */
.site { cursor: default; }
.site .thumb { width: 88px; height: 64px; flex: none; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: #e9eee4; }
.site .thumb svg { display: block; }
.site-info { display: flex; flex-direction: column; min-width: 0; }
.site-info small { margin-top: 1px; }
.stage { margin-top: 5px; align-self: flex-start; padding: 1px 7px; border-radius: 9px; background: #fff; border: 1px solid #a9c8e6; color: var(--accent); font-size: 10.5px; }
.sites { display: flex; flex-direction: column; gap: 6px; }
.site.add { border-style: dashed; background: none; color: var(--muted); opacity: .8; }
.site.add .plus { width: 20px; text-align: center; font-size: 18px; line-height: 1; }
.site.add small { display: inline; margin-left: 4px; }
.searchbox { position: relative; }
.searchbox .mag { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search { padding-left: 29px; }
.search:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search-meta { margin: 8px 2px 4px; font-size: 11px; color: var(--muted); }
.results { list-style: none; margin: 0 0 6px; padding: 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.results[hidden], .search-meta[hidden] { display: none; }
.result { display: flex; gap: 8px; align-items: center; padding: 6px 8px; cursor: pointer; border-bottom: 1px solid #eef1f4; }
.result:last-child { border-bottom: 0; }
.result:hover, .result.kbd { background: #eef2f6; }
.result.picked { background: var(--accent-soft); }
.rtext { display: flex; flex-direction: column; min-width: 0; }
.rtext b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtext small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rkind { flex: none; width: 42px; text-align: center; padding: 1px 0; border-radius: 4px; font-size: 10px; font-weight: 600; letter-spacing: .03em; background: #eef1f4; color: #55626f; }
.rkind.house { background: #f3e8dc; color: #8a6440; } .rkind.road { background: #e6e9ed; color: #4f5964; } .rkind.tree { background: #e0eddd; color: #3f6d3a; }

/* ---- I6: site detail labels, vertical exaggeration, smart ruler ---- */
.vexag { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.vexag input { flex: 1; accent-color: var(--accent); }
.vexag output { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.site-labels { position: absolute; inset: 0; pointer-events: none; }
.line-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 7px; border-radius: 4px; background: rgba(255,255,255,.93); border: 1.5px solid; box-shadow: 0 1px 4px rgba(20,35,50,.22); }
.line-label.property { color: #a85600; border-color: #ff8a00; }
.line-label.easement { color: #a0176f; border-color: #d9399a; }
.line-label.setback { color: #5a28b0; border-color: #7b3fe4; border-style: dashed; }
.street-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11px; font-weight: 650; letter-spacing: .04em; color: #3b4651; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; transform-origin: 50% 50%; }
.line-label.faded, .street-label.faded { visibility: hidden; }
.measure-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.measure-svg .halo { stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.measure-svg .core { stroke: #16222e; stroke-width: 2; }
.measure-svg .live .core { stroke-dasharray: 6 4; }
.measure-svg .dot { fill: #16222e; stroke: #fff; stroke-width: 1.5; }
.measure-svg .rightangle { fill: none; stroke: #c2188f; stroke-width: 1.6; }
.measure-svg .axisline { stroke: #7a8794; stroke-width: 1; stroke-dasharray: 2 4; }
.measure-svg .mlabel { font: 700 12px -apple-system, "Segoe UI", sans-serif; fill: #16222e; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.measure-svg .snaplabel { font: 600 11px -apple-system, "Segoe UI", sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3.5px; }
body[data-tool="ruler"] .viewport { cursor: crosshair; }
.ruler-panel { position: absolute; left: 12px; bottom: 34px; z-index: 4; width: 286px; max-height: calc(100% - 140px); overflow: auto; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20,35,50,.18); padding: 10px 12px 12px; }
.ruler-panel[hidden] { display: none; }
.rp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rp-head b { flex: 1; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
kbd { font: 600 10.5px inherit; font-family: inherit; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); }
.snaps { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.snaps button, .rp-actions button { font: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.snaps button[aria-pressed="true"] { background: var(--accent-soft); border-color: #a9c8e6; color: #1d4f85; font-weight: 600; }
.rp-hint { margin: 8px 0 6px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.measure-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; background: #f3f6fa; border-radius: 8px; }
.measure-result[hidden], .record-compare[hidden] { display: none; }
.mr-ft { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.mr-m { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mr-sub { flex-basis: 100%; font-size: 11px; color: var(--muted); }
.record-compare { margin-top: 6px; padding: 7px 10px; border: 1px solid #f0c987; background: #fff8ea; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.record-compare small { color: var(--muted); } .record-compare .ok { color: #2b7a4b; font-weight: 700; } .record-compare .warn { color: #9a6208; font-weight: 700; }
.measure-list { list-style: none; margin: 8px 0 0; padding: 0; }
.measure-list li { display: grid; grid-template-columns: 20px 1fr auto; gap: 0 8px; align-items: baseline; padding: 4px 2px; border-top: 1px solid var(--line); }
.measure-list .m-no { color: var(--muted); font-size: 11px; } .measure-list .m-len { font-weight: 650; font-variant-numeric: tabular-nums; }
.measure-list small { grid-column: 2; color: var(--muted); } .measure-list button { grid-row: 1 / span 2; grid-column: 3; border: 0; background: none; font-size: 17px; color: var(--muted); cursor: pointer; border-radius: 4px; }
.measure-list button:hover { color: #b3261e; background: #fbeceb; }
.rp-actions { display: flex; gap: 6px; margin-top: 8px; }
.navbar button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

/* download */
.dl-scope { font-weight: 600; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-formats { display: flex; gap: 14px; margin-bottom: 8px; }
.dl-formats label, .dl-opt { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.dl-opt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.dl-opt[hidden] { display: none; }
.dl-btn { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.dl-btn:hover:not(:disabled) { background: #265c96; }
.dl-btn:disabled { opacity: .5; cursor: default; }
.dl-status { margin: 6px 0 8px; min-height: 14px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.dl-status[data-state="error"] { color: #b3261e; }

/* ---- I5: walk / street / car views, vantage points, wall finishes ---- */
.vp-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.vp-modes button, .vp-compare { font: inherit; font-size: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.vp-modes button:hover, .vp-compare:hover:not(:disabled) { border-color: #a9c8e6; background: var(--accent-soft); }
.vp-compare { width: 100%; margin-top: 6px; }
.vp-compare:disabled { opacity: .5; cursor: default; }
.vp-compare[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.vp-hint { margin: 8px 0 4px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.vantages { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-height: 220px; overflow-y: auto; }
.vantage-empty { padding: 8px 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.vantage { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #eef1f4; }
.vantage:last-child { border-bottom: 0; }
.v-go { border: 0; background: #eef2f6; color: #3b4753; border-radius: 4px; padding: 3px 6px; font: 600 10px inherit; font-family: inherit; letter-spacing: .03em; cursor: pointer; }
.v-go:hover { background: var(--accent); color: #fff; }
.vantage[data-mode="walk"] .v-go, .vantage[data-mode="street"] .v-go { background: #e0eddd; color: #3f6d3a; } .vantage[data-mode="car"] .v-go { background: #e6e9ed; }
.v-name { min-width: 0; border: 1px solid transparent; border-radius: 4px; padding: 3px 5px; font: inherit; font-size: 12px; background: transparent; }
.v-name:hover { border-color: var(--line); } .v-name:focus { border-color: var(--accent); background: #fff; outline: 0; }
.v-ab { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.v-ab button { border: 0; background: #fff; width: 22px; height: 20px; font: 600 10.5px inherit; font-family: inherit; color: var(--muted); cursor: pointer; }
.v-ab button + button { border-left: 1px solid var(--line); }
.v-ab button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.v-x { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; border-radius: 4px; padding: 0 3px; }
.v-x:hover { color: #b3261e; background: #fbeceb; }

.mode-hud { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 4px 14px rgba(20,35,50,.14); white-space: nowrap; }
.mode-hud[hidden] { display: none; }
.mode-chip { font-weight: 600; color: var(--ink); }
.parcel-status { padding: 2px 9px; border-radius: 9px; border: 1px solid; font-size: 11.5px; font-weight: 650; }
.parcel-status[data-inside="true"] { color: #a85600; background: #fff3e5; border-color: #ff8a00; }
.parcel-status[data-inside="false"] { color: #4f5964; background: #eef1f4; border-color: #c9d1d9; }
.car-speed { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 48px; text-align: right; }
.car-speed[hidden] { display: none; }
.mode-exit { font: inherit; font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.mode-exit:hover { border-color: var(--accent); color: var(--accent); }
.crosshair { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(38,49,60,.75); box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; } .crosshair::after { top: 6px; left: 0; height: 2px; width: 14px; }
.crosshair[hidden] { display: none; }
body[data-pointer-lock="1"] .viewport { cursor: none; }
body[data-mode] .viewcube, body[data-mode] [data-action="ruler-toggle"] { pointer-events: none; opacity: .45; }
body[data-mode] .vexag { opacity: .5; }

.mode-help { position: absolute; left: 12px; top: 12px; z-index: 5; width: 300px; max-height: calc(100% - 60px); overflow: auto; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20,35,50,.16); padding: 10px 14px 12px; }
.mode-help[hidden] { display: none; }
.mh-head { display: flex; align-items: center; margin-bottom: 6px; }
.mh-head b { flex: 1; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mh-keys { display: grid; grid-template-columns: minmax(74px, auto) 1fr; gap: 6px 10px; margin: 0; font-size: 12px; line-height: 1.4; }
.mh-keys dt { color: var(--muted); display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; }
.mh-keys dd { margin: 0; }
body[data-mode] .mode-help { top: 56px; }

.compare-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: none; }
body[data-compare="1"] .compare-labels { display: block; }
.compare-labels span { position: absolute; bottom: 14px; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.92); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; }
.compare-labels .cl-a { left: 14px; } .compare-labels .cl-b { left: calc(50% + 14px); }
body[data-compare="1"] .viewport::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #fff; z-index: 3; box-shadow: 0 0 0 1px rgba(20,35,50,.25); }
body[data-compare="1"] .overlay, body[data-compare="1"] .mode-hud { visibility: hidden; }

.picker { position: absolute; top: 12px; right: 472px; z-index: 4; width: 282px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20,35,50,.18); padding: 12px 14px; user-select: none; }
.picker[hidden] { display: none; }
.mp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.mp-head b { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.mp-wall { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.mp-row.colours { grid-template-columns: repeat(8, 1fr); }
.mp-finish { display: flex; align-items: center; gap: 7px; font: inherit; font-size: 11.5px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.mp-finish:hover { border-color: #a9c8e6; } .mp-finish[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.mp-thumb { width: 22px; height: 22px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.12); background: #e9e2d6; }
.mp-thumb.siding { background: repeating-linear-gradient(180deg, #f3efe7 0 3px, #cfc8bb 3px 4.5px); }
.mp-thumb.stucco { background: radial-gradient(circle at 30% 30%, #f1eadb 0 1px, transparent 1.5px) 0 0/4px 4px, #e6dcc5; }
.mp-thumb.brick { background: repeating-linear-gradient(180deg, #a2634a 0 4px, #d9d2c8 4px 5px); }
.mp-thumb.painted-wood { background: repeating-linear-gradient(90deg, #a6b59a 0 3px, #8ea184 3px 4px); }
.mp-colour { aspect-ratio: 1; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); background: var(--c); cursor: pointer; padding: 0; }
.mp-colour[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.mp-scope { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 11.5px; color: var(--muted); }
.mp-scope span { margin-right: 4px; }
.mp-scope button, .mp-actions button { font: inherit; font-size: 11.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.mp-scope button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.mp-actions { display: flex; gap: 6px; }
.mp-note { margin-top: 8px; font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.card-actions { margin-top: 10px; }
.card-actions button { font: inherit; font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.card-actions button:hover { border-color: var(--accent); color: var(--accent); }
body[data-mode] .contour-labels, body[data-mode] .pins, body[data-mode] .site-labels { display: none; }
