.people {
  border-top: 1px solid var(--line);
  padding: 42px 0 72px;
}
.people-intro {
  max-width: 700px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: -8px 0 24px;
}
.people-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
.people-list {
  display: grid;
  gap: 12px;
}
.person-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  padding: 18px 20px;
}
.person-card h3 {
  font:
    400 22px Georgia,
    serif;
  margin: 0 0 5px;
}
.person-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.person-card .scan-action-help {
  max-width: 540px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.4;
}
.person-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.model-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 22px 0 0;
}
.seed-dialog,
.candidates-dialog {
  width: min(1000px, calc(100% - 28px));
  max-height: 90vh;
  border: 0;
  border-radius: 20px;
  padding: 25px;
  background: var(--card);
  color: var(--ink);
}
.seed-dialog::backdrop,
.candidates-dialog::backdrop {
  background: rgba(25, 28, 25, 0.68);
}
.seed-photo-list,
.candidate-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-height: 55vh;
  overflow: auto;
}
.seed-photo,
.candidate-photo {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #e7e2d6;
  cursor: pointer;
}
.seed-photo img,
.candidate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.candidate-photo img {
  object-fit: contain;
}
.candidate-photo.selected {
  border-color: var(--sage);
  box-shadow: 0 0 0 2px #fff inset;
}
.candidate-photo.selected::after {
  content: "✓";
  position: absolute;
  right: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-weight: 800;
}
.candidate-card {
  position: relative;
  display: grid;
  gap: 5px;
}
.candidate-card .candidate-photo {
  width: 100%;
}
.same-age-button {
  border: 0;
  background: transparent;
  color: var(--sage);
  font: 650 11px/1.2 inherit;
  padding: 5px;
  cursor: pointer;
}
.stage-filter {
  display: flex;
  align-items: center;
  gap: 7px;
}
.stage-filter select,
.profile-form input {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 9px;
  font: inherit;
}
.profile-form {
  display: grid;
  gap: 16px;
}
.profile-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}
.profile-form .primary {
  justify-self: start;
}
.same-age-groups {
  display: grid;
  gap: 24px;
  max-height: 68vh;
  overflow: auto;
}
.same-age-groups h3 {
  font:
    400 22px Georgia,
    serif;
  margin: 0 0 9px;
}
.same-age-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}
.same-age-photo {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #e7e2d6;
  cursor: pointer;
}
.same-age-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.same-age-photo span {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 6px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  font-size: 11px;
}
.face-canvas {
  position: relative;
  width: min(720px, 100%);
  margin: auto;
  background: #1d1d1b;
  border-radius: 12px;
  overflow: hidden;
}
.face-canvas img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  display: block;
}
.face-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.face-box {
  fill: rgba(232, 177, 143, 0.12);
  stroke: #fff;
  stroke-width: 0.006;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.face-box:hover,
.face-box.selected {
  fill: rgba(232, 177, 143, 0.32);
  stroke: var(--peach);
  stroke-width: 0.012;
}
.seed-form {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: center;
  margin-top: 18px;
}
.seed-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  width: min(360px, 60%);
}
.seed-form input {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 11px;
  font: inherit;
}
.candidate-photo svg,
.seed-photo svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.candidate-face {
  fill: transparent;
  stroke: #fff;
  stroke-width: 0.012;
  vector-effect: non-scaling-stroke;
}
.candidate-toolbar,
.candidate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0;
  font-size: 13px;
  color: var(--muted);
}
.candidate-actions {
  justify-content: flex-end;
}
.scan-progress {
  height: 7px;
  background: #e4e0d6;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
}
.scan-progress span {
  display: block;
  height: 100%;
  background: var(--sage);
  transition: width 0.2s;
}
.photo-open {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.photo-open:disabled {
  opacity: 1;
  cursor: default;
}
@media (max-width: 800px) {
  .seed-photo-list,
  .candidate-list {
    grid-template-columns: repeat(4, 1fr);
  }
  .person-card {
    grid-template-columns: 1fr;
  }
  .person-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .same-age-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 520px) {
  .seed-photo-list,
  .candidate-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .seed-form {
    align-items: stretch;
    flex-direction: column;
  }
  .seed-form label {
    width: 100%;
  }
  .candidate-actions {
    flex-wrap: wrap;
  }
  .candidate-actions .primary {
    width: 100%;
  }
  .same-age-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .candidate-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .people .section-heading {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }
  .people .section-heading .person-actions {
    width: 100%;
  }
  .people .section-heading .primary {
    margin-left: auto;
  }
  .seed-dialog,
  .candidates-dialog {
    width: 100%;
    max-height: 100dvh;
    height: auto;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    padding: 18px;
  }
  .candidate-list {
    max-height: 58dvh;
  }
}
