:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f7fb;
}

.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.test-panel {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.start-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #1267d8;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.start-btn:disabled {
  background: #8aa2c1;
  cursor: not-allowed;
}

.status {
  min-height: 22px;
  color: #526072;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}

.countdown {
  color: #172033;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.photos-section {
  padding-top: 10px;
}

.photos-section h1 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

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

.photo-placeholder,
.photo-item {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  color: #7a8797;
  font-size: 14px;
  text-align: center;
}

.photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-video,
.capture-canvas {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-9999px, -9999px);
}

@media (max-width: 420px) {
  .page {
    padding-inline: 12px;
  }

  .photos-grid {
    gap: 10px;
  }

  .start-btn {
    font-size: 16px;
  }
}
