.help-face-figure {
  margin: 24px 0;
}

.help-face-figure figcaption {
  margin-top: 10px;
  color: var(--help-muted);
  font-size: 13px;
  line-height: 1.55;
}

.help-face-board {
  padding: clamp(12px, 3vw, 24px);
  border: 1px solid #e9e1f3;
  border-radius: 18px;
  background: #f6f2fa;
  color: var(--help-ink);
  font-size: 14px;
  line-height: 1.4;
}

.help-face-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 14px;
  color: var(--help-purple);
}

.help-face-bar svg {
  flex-shrink: 0;
}

.help-face-bar span {
  margin-left: auto;
  color: var(--help-muted);
  font-size: 13px;
}

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

.help-face-card,
.help-face-match {
  padding: 8px;
  border: 1px solid #e9e1f3;
  border-radius: 12px;
  background: #fff;
}

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

.help-face-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  margin: 7px 3px 0;
}

.help-face-card-footer svg {
  color: var(--help-purple);
}

.help-face-badge,
.help-face-confirm {
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
}

.help-face-badge {
  background: #f9e9cb;
  color: #714b20;
}

.help-face-asset {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
}

.help-face-match {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: clamp(12px, 2.5vw, 20px);
}

.help-face-match > span:first-child {
  color: var(--help-muted);
  font-size: 13px;
}

.help-face-match-person,
.help-face-confirm {
  display: flex;
  align-items: center;
  gap: 7px;
}

.help-face-match-person .help-face-portrait {
  flex: 0 0 40px;
  aspect-ratio: 1;
}

.help-face-confirm {
  background: #eee5fa;
  color: #5e2ca8;
}

.help-face-confirm svg {
  flex-shrink: 0;
}

.help-face-portrait {
  --face-backdrop: #f2c898;
  --face-shadow: #e3ab7c;
  --face-hair: #34233c;
  --face-skin: #b9795a;
  --face-neck: #935638;
  --face-shirt: #467d6b;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.2;
  border-radius: 7px;
  background: radial-gradient(circle at 20% 15%, #fff6 0 8%, transparent 45%), var(--face-backdrop);
}

.help-face-portrait--unnamed {
  --face-backdrop: #d9d4f2;
  --face-shadow: #c3b9e4;
  --face-hair: #553234;
  --face-skin: #e3a381;
  --face-neck: #bc775c;
  --face-shirt: #51416c;
}

.help-face-portrait--samira.help-face-portrait--alternate {
  --face-backdrop: #eac9d9;
  --face-shadow: #c38fae;
  --face-shirt: #904669;
}

.help-face-portrait--unnamed.help-face-portrait--alternate {
  --face-backdrop: #c0dcd7;
  --face-shadow: #92bdb1;
  --face-shirt: #365e64;
}

.help-face-portrait::before {
  content: "";
  position: absolute;
  inset: 18% auto auto 8%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid #fff8;
  border-radius: 50%;
  background: var(--face-shadow);
  opacity: .54;
}

.help-face-person {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 88%;
  aspect-ratio: 1;
  transform: translateX(-50%);
}

.help-face-portrait--alternate .help-face-person {
  left: 54%;
  transform: translateX(-50%) rotate(-8deg) scale(1.05);
  transform-origin: 50% 75%;
}

.help-face-person > span,
.help-face-head > span {
  position: absolute;
  display: block;
}

.help-face-hair {
  inset: 11% 22% 15%;
  border-radius: 50% 48% 34% 32%;
  background: var(--face-hair);
  box-shadow: inset 0 3px #ffffff13;
}

.help-face-shirt {
  inset: 68% 11% -20%;
  border-radius: 47% 47% 0 0;
  background:
    linear-gradient(130deg, #ffffff25, transparent 60%),
    var(--face-shirt);
}

.help-face-shirt::before {
  content: "";
  position: absolute;
  inset: 1% 33% 77%;
  border-radius: 0 0 50% 50%;
  background: #ffffff33;
}

.help-face-neck {
  inset: 58% 39% 24%;
  border-radius: 0 0 50% 50%;
  background: var(--face-neck);
}

.help-face-head {
  inset: 22% 29% 32%;
  border-radius: 42% 43% 47% 47%;
  background:
    radial-gradient(circle at 5% 65%, #f6cf8a 0 2.3%, transparent 3%),
    radial-gradient(circle at 95% 65%, #f6cf8a 0 2.3%, transparent 3%),
    radial-gradient(circle at 22% 57%, #b76a58 0 7%, transparent 18%),
    radial-gradient(circle at 78% 57%, #b76a58 0 7%, transparent 18%),
    linear-gradient(130deg, #fff2, transparent 60%),
    var(--face-skin);
}

.help-face-features {
  inset: 0;
  background:
    radial-gradient(ellipse 5% 4% at 28% 46%, #2d2028 92%, transparent 100%),
    radial-gradient(ellipse 5% 4% at 72% 46%, #2d2028 92%, transparent 100%);
}

.help-face-features::before,
.help-face-features::after {
  content: "";
  position: absolute;
  border-radius: 0 0 50% 50%;
  background: #713f3b;
}

.help-face-features::before {
  inset: 43% 45% 38% 45%;
  opacity: .18;
  transform: skewX(-13deg);
}

.help-face-features::after {
  inset: 66% 36% 25%;
  transform: rotate(-5deg);
}

.help-face-fringe {
  inset: 15% 25% 62% 27%;
  border-radius: 54% 68% 29% 30%;
  background: linear-gradient(158deg, #ffffff1a, transparent 54%), var(--face-hair);
  transform: rotate(11deg);
  transform-origin: 15% 78%;
}

.help-face-portrait--unnamed .help-face-hair {
  inset: 11% 22% 44% 24%;
  border-radius: 47% 42% 35% 24%;
}

.help-face-portrait--unnamed .help-face-fringe {
  inset: 15% 24% 68% 26%;
  border-radius: 46% 35% 42% 38%;
  transform: rotate(-8deg);
}

.help-face-portrait--unnamed .help-face-head {
  border-radius: 38% 41% 41% 40%;
}

.help-face-glasses {
  inset: 34% 0 auto;
  height: 25%;
  background: linear-gradient(#523138, #523138) center 45% / 14% 1px no-repeat;
}

.help-face-glasses::before,
.help-face-glasses::after {
  content: "";
  position: absolute;
  top: 0;
  width: 32%;
  height: 90%;
  border: 1px solid #523138;
  border-radius: 38%;
}

.help-face-glasses::before { left: 12%; }
.help-face-glasses::after { right: 12%; }

.help-face-portrait--scene {
  --face-backdrop: #d1dbba;
  --face-shadow: #a9b590;
  --face-shirt: #596f49;
  min-height: 160px;
  aspect-ratio: 1.65;
  border-radius: 11px;
}

.help-face-portrait--scene::before {
  inset: 15% auto auto 7%;
  width: 47%;
  aspect-ratio: .75;
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}

.help-face-portrait--scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 76% 0 0;
  background: #8a977651;
}

.help-face-portrait--scene .help-face-person {
  left: 59%;
  bottom: -5%;
  width: 56%;
  max-width: 215px;
}

.help-face-detection {
  inset: 14% 24% 29%;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 0 1px #30243270;
}

@media (max-width: 540px) {
  .help-face-groups,
  .help-face-asset {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-face-crops .help-face-portrait {
    aspect-ratio: 1.45;
  }

  .help-face-crops .help-face-person {
    max-width: 132px;
  }
}
