/**
 * F7 shell debug — phone QA only. Shown with ?debugShell=1 or 5-tap arm zone.
 */

#f7-debug-arm {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  z-index: 10050;
  opacity: 0;
  pointer-events: none;
  touch-action: manipulation;
}

body.f7-shell-debug-on #f7-debug-arm {
  opacity: 0.02;
}

#f7-shell-debug-panel {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 8px));
  left: 8px;
  right: 8px;
  max-height: 42vh;
  z-index: 10060;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 8, 14, 0.94);
  border: 1px solid rgba(255, 106, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}

body.f7-shell-debug-on #f7-shell-debug-panel {
  display: flex;
}

#f7-shell-debug-panel .f7dbg-title {
  font-size: 12px;
  font-weight: 700;
  color: #ff8c3c;
  letter-spacing: 0.02em;
}

#f7-shell-debug-panel .f7dbg-status {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: center;
}

#f7-shell-debug-panel .f7dbg-status.pass {
  background: rgba(40, 160, 80, 0.25);
  color: #6ee7a0;
}

#f7-shell-debug-panel .f7dbg-status.fail {
  background: rgba(200, 50, 50, 0.28);
  color: #ff8a8a;
}

#f7-shell-debug-panel .f7dbg-status.idle {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
}

#f7-shell-debug-panel .f7dbg-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 26vh;
  white-space: pre-wrap;
  word-break: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.78);
}

#f7-shell-debug-panel .f7dbg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#f7-shell-debug-panel .f7dbg-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

#f7-shell-debug-panel .f7dbg-btn:active {
  background: rgba(255, 106, 0, 0.22);
}

#f7-shell-debug-panel .f7dbg-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
}
