* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1d24; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #f3f1ec; }
#scene { position: fixed; inset: 0; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.bot-label { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 10px; background: rgba(20, 22, 30, 0.72); border: 1px solid rgba(255,255,255,0.15); font-size: 11px; white-space: nowrap; user-select: none; transition: transform .15s; }
.bot-label:hover, .bot-label.selected { transform: scale(1.12); background: rgba(40, 44, 60, 0.92); }
.bot-label .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.working { background: #3ddc84; box-shadow: 0 0 6px #3ddc84; }
.dot.idle { background: #ffb547; box-shadow: 0 0 6px #ffb547; }
.zone-label { pointer-events: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); text-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; }
#hud { position: fixed; top: 12px; left: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(20, 22, 30, 0.78); border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(6px); min-width: 190px; z-index: 5; }
#hud h1 { margin: 0 0 4px; font-size: 18px; }
#clock { font-variant-numeric: tabular-nums; font-size: 14px; opacity: .9; }
#clock small { opacity: .65; }
#counts { margin-top: 8px; display: flex; gap: 12px; font-size: 13px; }
#counts span { display: flex; align-items: center; gap: 5px; }
#panel { position: fixed; top: 12px; right: 12px; width: 300px; max-width: calc(100vw - 24px); padding: 16px; border-radius: 12px; background: rgba(20, 22, 30, 0.9); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(6px); z-index: 6; transform: translateX(120%); transition: transform .25s ease; }
#panel.open { transform: translateX(0); }
#panel .swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
#panel h2 { margin: 0 0 6px; font-size: 18px; padding-right: 26px; }
#panel .zone { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-bottom: 10px; }
#panel p { margin: 0 0 10px; line-height: 1.45; font-size: 14px; }
#panel .status { font-size: 13px; display: flex; align-items: center; gap: 6px; }
#panel button { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; opacity: .7; }
#footer { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: .75; background: rgba(20,22,30,.6); padding: 4px 10px; border-radius: 8px; text-align: center; width: max-content; max-width: calc(100vw - 16px); z-index: 5; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 16px; opacity: .8; z-index: 10; pointer-events: none; }
@media (max-width: 600px) {
  #hud { padding: 8px 10px; min-width: 0; }
  #hud h1 { font-size: 15px; }
  #panel { top: auto; bottom: 36px; right: 12px; left: 12px; width: auto; transform: translateY(calc(100% + 80px)); }
  #panel.open { transform: translateY(0); }
  .bot-label { font-size: 9px; padding: 1px 5px; }
  .zone-label { font-size: 10px; }
}
