:root {
  color-scheme: light;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f6fb;
  color: #12263a;
}

.container {
  width: min(980px, 92vw);
  margin: 24px auto 48px;
}

h1 {
  margin-bottom: 8px;
}

.subtitle {
  margin-top: 0;
  color: #4f6173;
}

.panel {
  background: #fff;
  border: 1px solid #deebf7;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.plate-frame {
  border: 3px solid #0f3d8f;
  border-radius: 10px;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 8px;
  background: #fff;
}

canvas {
  max-width: 100%;
  border-radius: 8px;
}

button {
  border: none;
  background: #2563eb;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.target-count-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.target-count-row label {
  font-size: 14px;
  color: #334e68;
}

.target-count-row input {
  width: 70px;
  padding: 7px 8px;
  border: 1px solid #b9cbe0;
  border-radius: 8px;
  font-size: 14px;
  color: #12263a;
  background: #fff;
}

#batchBtn {
  background: #0f766e;
}

#qaBtn {
  background: #7c3aed;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  margin: 10px 0 0;
  color: #4f6173;
  font-size: 14px;
}

.status.pass {
  color: #0f766e;
  font-weight: 600;
}

.status.fail {
  color: #b91c1c;
  font-weight: 600;
}

.credit {
  margin: 18px 0 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #1f3550;
  letter-spacing: 0.2px;
}

#logList {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.result p {
  margin: 8px 0;
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.diag-card {
  border: 1px solid #dbe7f4;
  border-radius: 10px;
  padding: 10px;
  background: #fafcff;
}

.diag-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.diag-candidates {
  margin: 0 0 8px;
  font-size: 12px;
  color: #3b4f64;
}

.diag-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.diag-images figure {
  margin: 0;
  border: 1px solid #dbe7f4;
  border-radius: 6px;
  padding: 4px;
  background: #fff;
}

.diag-images img {
  width: 100%;
  image-rendering: pixelated;
  display: block;
}

.diag-images figcaption {
  margin-top: 3px;
  font-size: 11px;
  color: #4f6173;
}
