.debug-log {
  position: fixed;
  top: auto;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  width: min(22rem, calc(100vw - 2rem));
  max-height: 40vh;
  background: #111;
  color: #f4f4f4;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: 0.4rem;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.debug-log-title {
  padding: 0.35rem 0.6rem;
  background: #fcecaf;
  color: #1f1f1f;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.debug-log-title:active {
  cursor: grabbing;
}

.debug-log-lines {
  overflow: auto;
  padding: 0.4rem 0.6rem 0.6rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.debug-log-error {
  color: #ff8a8a;
}

.debug-log-warn {
  color: #ffd56a;
}
