.location-test-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1200;
  width: min(420px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  font: 13px/1.4 sans-serif;
}

.location-test-title {
  margin: 0 0 8px;
  font-size: 15px;
}

.location-test-section + .location-test-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.location-test-subtitle {
  margin: 0 0 6px;
  font-size: 13px;
}

.location-test-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-test-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.location-test-label {
  min-width: 86px;
}

.location-test-button,
.location-test-select,
.location-test-input {
  font: inherit;
}

.location-test-button {
  padding: 3px 8px;
  cursor: pointer;
}

.location-test-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.location-test-select,
.location-test-input {
  min-width: 80px;
}

.location-test-movement-grid,
.location-test-heading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.location-test-button.move,
.location-test-button.heading {
  padding: 3px 4px;
}

.location-test-status {
  margin-top: 6px;
}

.location-test-diagnostics {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.location-test-diagnostics dt {
  margin: 4px 0 0;
  font-weight: 600;
}

.location-test-diagnostics dd {
  margin: 0 0 2px;
  color: #222;
  word-break: break-word;
}

@media (max-width: 640px) {
  .location-test-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 90px;
    width: auto;
    max-height: min(56vh, 420px);
  }
}
