html, body { margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #000; color: #ddd; }

#canvas-host { position: fixed; inset: 0; }
#canvas-host canvas { display: block; width: 100%; height: 100%; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; gap: 12px; align-items: center;
  padding: 8px 12px; background: rgba(15, 15, 18, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 10;
  font-size: 13px;
}
#topbar label { opacity: 0.7; }
#topbar select, #topbar button {
  background: #1c1d22; color: #e8e8ea;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 5px 9px; border-radius: 4px;
  font: inherit; cursor: pointer;
}
#topbar select:disabled { opacity: 0.5; cursor: wait; }
#topbar button:hover { background: #26282e; }
#hint { margin-left: auto; opacity: 0.55; font-size: 11.5px; }

#status {
  position: fixed; bottom: 12px; left: 12px;
  background: rgba(15,15,18,0.78);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  z-index: 10;
  min-width: 170px;
}
#status .row { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
#status .lbl { opacity: 0.55; }

#error-box {
  position: fixed; bottom: 12px; right: 12px; max-width: 420px;
  background: #2a1414; color: #fdd; border: 1px solid #8a2828;
  border-radius: 6px; padding: 10px 12px; z-index: 20;
  font-size: 12px;
}
#error-box .err-header { font-weight: 600; margin-bottom: 4px; color: #ffb0b0; }
#error-box pre { white-space: pre-wrap; word-break: break-word; margin: 0 0 8px; font-size: 11.5px; }
#error-box button {
  background: #5a1d1d; color: #ffd; border: 1px solid #8a3838;
  border-radius: 3px; padding: 3px 8px; cursor: pointer; font: inherit;
}
