/* Canvas UX layer: theme-aware stage, readable object labels, facing pins.
   Load after theme-c.css so the dark-theme rules below win. */
:root{--cux-accent:#0a7d84;--cux-ink:#1d1d1f;--cux-pill:rgba(255,255,255,.96);--cux-pill-line:rgba(10,125,132,.32);--cux-pill-ink:#14383b;--cux-check:#fff;
  --cux-stage:#eef1f4;--cux-stripe-a:rgba(255,255,255,.55);--cux-stripe-b:rgba(10,125,132,.06);--cux-empty-ink:#4b5563}
html.tq-dark{--cux-accent:#e3c88f;--cux-ink:#f3dcaa;--cux-pill:rgba(20,24,36,.92);--cux-pill-line:rgba(227,200,143,.5);--cux-pill-ink:#f3dcaa;--cux-check:#1a1408;
  --cux-stage:#0b1220;--cux-stripe-a:rgba(255,255,255,.02);--cux-stripe-b:rgba(227,200,143,.07);--cux-empty-ink:#aeb7c7}

/* ---- Stage / viewport follow the theme; only the floor-plan image keeps its own paper ---- */
.canvas-viewport,.konva-viewport{background:var(--cux-stage)}
.konva-canvas-root canvas{background:transparent}
html.tq-dark body :is(.canvas-viewport,.konva-viewport,.canvas-stage,.board-canvas,.canvas-inner,.unified-map-stage .canvas-shell){background:var(--cux-stage)!important}
html.tq-dark body .canvas-stage{border-color:rgba(255,255,255,.08)}

/* Empty state (暂无底图): diagonal stripes on a theme-matched ground */
html body .canvas-placeholder{color:var(--cux-empty-ink);
  background:repeating-linear-gradient(135deg,var(--cux-stripe-a) 0 18px,var(--cux-stripe-b) 18px 36px),var(--cux-stage)}
html body .canvas-placeholder.error{color:#b4372a;background:repeating-linear-gradient(135deg,rgba(255,255,255,.3) 0 18px,rgba(180,74,54,.06) 18px 36px),#fff4f0}
html.tq-dark body .canvas-placeholder.error{color:#ffb4a8;background:repeating-linear-gradient(135deg,rgba(255,255,255,.02) 0 18px,rgba(255,120,100,.08) 18px 36px),#1f1416}

/* ---- Adjustment object names: one readable pill below the object ---- */
html body .adjustment-object .adjustment-object-label{font-size:12px!important;font-weight:600!important;line-height:16px!important;
  padding:2px 9px!important;border-radius:999px!important;background:var(--cux-pill)!important;color:var(--cux-pill-ink)!important;
  border:1px solid var(--cux-pill-line)!important;box-shadow:0 1px 3px rgba(0,0,0,.14);white-space:nowrap;max-width:none;
  top:calc(100% + 6px)!important;left:50%!important;pointer-events:none;z-index:7}
/* The small "原位置参照" caption duplicated the object name; it now appears on hover or focus only. */
html body .adjustment-original-reference .adjustment-reference-label{font-size:12px;line-height:16px;padding:2px 8px;border-radius:999px;
  background:var(--cux-pill);color:var(--cux-pill-ink);border:1px solid var(--cux-pill-line);opacity:0;transition:opacity .15s ease-out}
html body .adjustment-original-reference:hover .adjustment-reference-label,
html body .adjustment-original-reference:focus-visible .adjustment-reference-label,
html body .adjustment-original-reference:focus-within .adjustment-reference-label{opacity:1}
html body .adjustment-original-reference .adjustment-reference-label small{font-size:12px}


/* Drag-pan preview (konva-canvas-board.js): while a drag is in progress the DOM overlays
   follow the stage offset; the variables are removed when the camera is committed.
   `translate` composes with each overlay's own transform instead of replacing it. */
.canvas-viewport>:not(.konva-canvas-root):not(.konva-overlay):not(.mobile-loupe){translate:var(--pan-preview-x,0px) var(--pan-preview-y,0px)}
