.debug-pill {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #1A1A18;
  background: #FAFAF7;
  color: #1A1A18;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.debug-pill:active {
  transform: scale(0.96);
}

.debug-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d33;
  animation: debug-pulse 1.6s ease-in-out infinite;
}

@keyframes debug-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.debug-panel {
  position: fixed;
  bottom: 50px;
  left: 12px;
  z-index: 9999;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 70px);
  background: #FAFAF7;
  border: 1px solid #1A1A18;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  color: #1A1A18;
}

.debug-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #1A1A18;
}

.debug-panel-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.debug-panel-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #1A1A18;
  padding: 0 4px;
}

.debug-panel-meta {
  padding: 8px 14px;
  font-size: 10px;
  opacity: 0.65;
  border-bottom: 1px dashed #1A1A18;
  word-break: break-all;
}

.debug-panel-list {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
}

.debug-event {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(26,26,24,0.1);
}

.debug-event-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 4px;
}

.debug-event-type {
  font-weight: 600;
}

.debug-event-time {
  opacity: 0.6;
}

.debug-event-payload {
  margin: 0;
  padding: 6px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: rgba(26,26,24,0.04);
  border-radius: 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
}

.debug-empty {
  padding: 20px 14px;
  text-align: center;
  opacity: 0.5;
  font-size: 11px;
}
