.ui-debug-toggle-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: auto !important;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483640;
  border: 1.5px solid #2a2a32;
  border-radius: 999px;
  background: rgba(20, 20, 23, 0.96);
  color: #a78bfa;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 12px;
  cursor: pointer;
}

.ui-debug-toggle-btn.active {
  border-color: #ff9f43;
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.15);
}

body.ui-debug-mode .ui-debug-target {
  position: relative !important;
  outline: 1px solid rgba(0, 255, 255, 0.78) !important;
  outline-offset: -1px;
}

body.ui-debug-mode .ui-debug-target::before {
  content: attr(data-ui-debug-label);
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  background: rgba(0, 255, 255, 0.96);
  color: #101015;
  border-radius: 3px 3px 0 0;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  line-height: 1.25;
  padding: 1px 4px;
  max-width: min(360px, 92vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 2147483641;
}

body.ui-debug-mode .ui-debug-target.ui-debug-hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  min-width: 42px !important;
  min-height: 22px !important;
  outline-color: #ff4757 !important;
  background: rgba(255, 71, 87, 0.14) !important;
}

body.ui-debug-mode .ui-debug-target.ui-debug-hidden::before {
  background: #ff4757;
  color: #fff;
}

body.ui-debug-mode .ui-debug-target.ui-debug-zero {
  min-width: 16px !important;
  min-height: 16px !important;
  outline-color: #ff9f43 !important;
  background: rgba(255, 159, 67, 0.12) !important;
}

body.ui-debug-mode .ui-debug-target.ui-debug-zero::before {
  background: #ff9f43;
  color: #111;
}

body .container > header {
  position: sticky;
  top: max(6px, env(safe-area-inset-top));
  z-index: 42;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 14px;
  background: rgba(13, 13, 15, 0.86);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
}

body .container > header .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
