.debug-window {
    position: fixed;
    top: 80px;
    right: 1rem;
    width: min(420px, calc(100vw - 2rem));
    height: 320px;
    min-height: 160px;
    z-index: 1080;
}
.debug-window {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  width: 420px;
  height: 320px;
  min-width: 260px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  color: #eee;
  border: 1px solid #555;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  resize: both;          /* native resize handle (bottom-right) */
  overflow: hidden;
}

.debug-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #333;
  cursor: move;
  user-select: none;
  flex: 0 0 auto;
}

.debug-window-actions button {
  margin-left: 4px;
}

.debug-window-body {
  flex: 1 1 auto;
  overflow: auto;        /* scrollable log */
  padding: 8px;
  font: 12px/1.4 monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.dbg-log {
  color: #ddd;
}

.dbg-info {
  color: #4fc3f7;          /* light blue */
}

.dbg-warn {
  color: #ffb74d;          /* amber */
  font-weight: 600;
}

.dbg-error {
  color: #ef5350;          /* red */
  font-weight: 700;
}
