.csc-debug-only {
  display: none !important;
}

.wiat-debug-active .csc-debug-only {
  display: block !important;
}

#cscDebugToggle {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 9999998;
  background: #1e40af;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  border: 0;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 0 8px 0 0;
  font-family: monospace;
  letter-spacing: .02em;
  box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}

#cscDebugPanel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999997;
  background: #0f172a;
  color: #e2e8f0;
  font-family: monospace;
  font-size: 11px;
  height: 50vh;
  overflow-y: auto;
  padding: 8px 12px 40px;
  border-top: 3px solid #3b82f6;
  transform: translateY(100%);
  transition: transform .2s ease;
}

#cscDebugPanel.csc-dbg-open {
  transform: translateY(0);
}

.csc-dbg-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 8px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 6px;
  position: sticky;
  top: 0;
  background: #0f172a;
  z-index: 1;
}

.csc-dbg-toolbar span {
  color: #60a5fa;
  font-weight: bold;
  font-size: 12px;
}

.csc-dbg-actions {
  display: flex;
  gap: 6px;
}

.csc-dbg-clear,
.csc-dbg-copy {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: monospace;
  font-size: 10px;
}

.csc-dbg-clear:hover,
.csc-dbg-copy:hover {
  background: #334155;
}

.csc-dbg-row {
  border-bottom: 1px solid #1e293b;
  padding: 5px 0;
  line-height: 1.6;
}

.csc-dbg-time {
  color: #475569;
  margin-right: 6px;
}

.csc-dbg-tag {
  color: #60a5fa;
  font-weight: bold;
  margin-right: 4px;
}

.csc-dbg-ok { color: #4ade80; }
.csc-dbg-err { color: #f87171; }
.csc-dbg-warn { color: #fbbf24; }
.csc-dbg-info { color: #94a3b8; }

.csc-dbg-pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: #c4b5fd;
  font-size: 10px;
  max-height: 200px;
  overflow: auto;
  background: #1e293b;
  padding: 4px 6px;
  border-radius: 4px;
}