.rollegg-debug-panel {
  --debug-accent: #78dfff;
  position: fixed !important;
  top: max(70px, calc(env(safe-area-inset-top) + 58px)) !important;
  right: auto !important;
  left: max(12px, env(safe-area-inset-left)) !important;
  z-index: 96;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  width: min(360px, calc(100vw - 24px)) !important;
  max-height: calc(100dvh - 84px) !important;
  min-height: 0;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--debug-accent) 34%, transparent) !important;
  border-radius: 14px !important;
  background: rgba(10, 27, 34, 0.95) !important;
  color: #f3fbfd !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36) !important;
  backdrop-filter: blur(14px);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.rollegg-control-surface {
  -webkit-user-select: none;
  user-select: none;
}
.rollegg-control-surface input[type="text"],
.rollegg-control-surface input[type="number"],
.rollegg-control-surface input[type="search"],
.rollegg-control-surface input[type="url"],
.rollegg-control-surface input[type="email"],
.rollegg-control-surface textarea,
.rollegg-control-surface [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
.rollegg-debug-panel.hidden { display: none !important; }
.rollegg-debug-panel > header {
  grid-row: 1;
  position: relative;
  z-index: 2;
  min-height: 42px;
  padding: 9px 11px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--debug-accent) 18%, transparent) !important;
  background: color-mix(in srgb, var(--debug-accent) 8%, transparent) !important;
}
.rollegg-debug-panel > header small { color: var(--debug-accent) !important; letter-spacing: .13em; }
.rollegg-debug-panel > header strong { color: #f7fcfd !important; font-size: 15px !important; }
.rollegg-debug-panel > .rollegg-debug-panel-scroll {
  grid-row: 2;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.settings-menu.rollegg-control-surface .settings-section {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.rollegg-debug-panel > .rollegg-debug-panel-scroll::-webkit-scrollbar { width: 9px; }
.rollegg-debug-panel > .rollegg-debug-panel-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, .025); }
.rollegg-debug-panel > .rollegg-debug-panel-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--debug-accent) 42%, transparent);
  background-clip: padding-box;
}
.rollegg-debug-panel > footer {
  grid-row: 3;
  position: relative;
  z-index: 2;
  min-height: 42px;
  padding: 8px 11px !important;
  border-top: 1px solid color-mix(in srgb, var(--debug-accent) 16%, transparent) !important;
  background: rgba(255, 255, 255, .025) !important;
}
.rollegg-debug-panel button {
  border-color: color-mix(in srgb, var(--debug-accent) 26%, transparent) !important;
  background: rgba(255, 255, 255, .075) !important;
  color: #f3fbfd !important;
}
.rollegg-debug-panel button:hover { background: rgba(255, 255, 255, .13) !important; }
.rollegg-debug-panel input[type="range"] { accent-color: var(--debug-accent); touch-action: none; }
.rollegg-debug-panel output { color: var(--debug-accent) !important; font-variant-numeric: tabular-nums; }

@media (max-width: 620px), (max-height: 560px) {
  .rollegg-debug-panel {
    top: max(54px, calc(env(safe-area-inset-top) + 48px)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    width: min(340px, calc(100vw - 16px)) !important;
    max-height: calc(100dvh - 64px) !important;
  }
}