:root { --ink: #1f2428; --muted: #5b646c; --panel: rgba(255,255,255,0.88); --line: rgba(0,0,0,0.1); --accent: #c9603f; }
body.bp { --ink: #e8f4ff; --muted: #9cc3ea; --panel: rgba(8,44,90,0.82); --line: rgba(200,230,255,0.25); --accent: #8fd3ff; }
body.eve:not(.bp) { --ink: #f1ece4; --muted: #b8b2c6; --panel: rgba(24,28,48,0.82); --line: rgba(255,255,255,0.14); --accent: #ffb870; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dfe7ee; font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--ink); }
#stage, #stage canvas { position: fixed; inset: 0; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; padding: 3px 7px; border-radius: 3px; background: rgba(255,255,255,0.92); color: #1f2428; box-shadow: 0 1px 3px rgba(0,0,0,0.18); }
.lbl.zone { font-weight: 700; font-size: 13px; background: #1f2428; color: #fff; }
.lbl.key { background: var(--accent); color: #fff; font-weight: 600; }
.lbl.room { background: rgba(31,36,40,0.82); color: #fff; font-size: 11px; }
.lbl.ctx { background: rgba(255,255,255,0.6); color: #555; font-style: italic; }
body.bp .lbl { background: transparent; color: #e8f4ff; box-shadow: none; border: 1px solid rgba(232,244,255,0.6); font-family: "Courier New", monospace; text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; }
body.bp .lbl.zone { background: rgba(232,244,255,0.12); }
.panel { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; backdrop-filter: blur(6px); }
#title { top: 16px; left: 16px; max-width: 380px; }
#title .eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#title h1 { margin: 2px 0 4px; font-size: 24px; letter-spacing: -0.01em; }
#title .sub { font-size: 13px; color: var(--muted); line-height: 1.35; }
#controls { left: 16px; bottom: 44px; max-width: 560px; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.k { width: 46px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.views { padding-left: 52px; } .views .k { margin-left: -52px; }
button { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 5px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
body.bp button.on { color: #082c5a; }
#side { top: 16px; right: 16px; width: 270px; font-size: 12.5px; }
#stats div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
#stats div:first-child { border: 0; font-size: 13.5px; padding-bottom: 6px; }
#stats span { color: var(--muted); }
.legend { margin-top: 10px; }
.legend div { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--muted); }
.legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
#north { position: fixed; right: 26px; bottom: 56px; width: 46px; height: 46px; color: var(--ink); }
#stamp { position: fixed; left: 0; right: 0; bottom: 0; padding: 7px 16px; font-size: 11.5px; letter-spacing: 0.03em; background: #1f2428; color: #fff; text-align: center; }
body.bp #stamp { background: #e8f4ff; color: #0a3466; font-family: "Courier New", monospace; font-weight: 700; }
body.no-ui .panel, body.no-ui #north { display: none; }
@media (max-width: 760px) {
  #side { display: none; }
  #title { right: 16px; max-width: none; }
  #controls { right: 16px; max-width: none; bottom: 52px; }
  #stamp { font-size: 10px; }
}
