html.pm-tablet-debug-active {
  scroll-padding-bottom: 220px;
}

#pm-tablet-debug-panel {
  position: fixed;
  left: max(8px, env(safe-area-inset-left, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  z-index: 99999;
  max-height: min(52dvh, 420px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(7, 92, 255, 0.35);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  font: 12px/1.4 system-ui, -apple-system, Segoe UI, sans-serif;
  color: #0f172a;
}

.pm-tablet-debug-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 0;
}

.pm-tablet-debug-head strong {
  flex: 1 1 auto;
  font-size: 13px;
}

.pm-tablet-debug-head button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.pm-tablet-debug-send-status {
  margin: 6px 12px 0;
  font-size: 0.76rem;
  color: rgba(7, 92, 255, 0.9);
}

.pm-tablet-debug-note {
  margin: 6px 12px 0;
  color: rgba(15, 23, 42, 0.72);
}

.pm-tablet-debug-table {
  width: calc(100% - 24px);
  margin: 8px 12px 10px;
  border-collapse: collapse;
}

.pm-tablet-debug-table th,
.pm-tablet-debug-table td {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 5px 4px;
  vertical-align: top;
  text-align: left;
}

.pm-tablet-debug-table th {
  width: 42%;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 600;
}

.pm-tablet-debug-details {
  margin: 0 12px 12px;
}

.pm-tablet-debug-details pre {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(7, 92, 255, 0.06);
  overflow: auto;
  max-height: 160px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 900px) {
  #pm-tablet-debug-panel {
    left: auto;
    width: min(420px, calc(100vw - 24px));
  }
}
