/* 最佳表情合成 — extends style.css (the light table). */

.small { font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------- stage */

.photo { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.photo img {
  display: block;
  max-width: 100%;
  max-height: min(56vh, 560px);
  object-fit: contain;
  border: 6px solid #fff;
  box-shadow: 0 1px 2px rgba(28, 38, 49, 0.25);
  background: var(--lit);
}
.markers { position: absolute; inset: 6px; pointer-events: none; }
.marker {
  position: absolute;
  border: 2px solid color-mix(in srgb, #fff 85%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s;
}
.marker span {
  position: absolute; left: 50%; bottom: 100%;
  transform: translate(-50%, -3px);
  min-width: 22px; padding: 0 5px;
  font: 700 13px/20px var(--sans);
  text-align: center;
  color: #fff;
  background: rgba(28, 38, 49, 0.78);
  border-radius: 10px;
}
.marker.is-swapped { border-color: var(--marker); }
.marker.is-swapped span { background: var(--marker); }
.marker.is-focus { border-width: 3px; border-color: var(--focus); }
.markers.is-hidden { visibility: hidden; }

/* --------------------------------------------------------------- steps */

.steps .start { margin-top: 0; }
.file-row label { flex: none; white-space: nowrap; }
.step .check { font-size: 15px; }

.frames { display: flex; flex-wrap: wrap; gap: var(--s2); }
.frame {
  position: relative;
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 4px;
}
.frame img {
  display: block; height: 72px; width: auto; max-width: 120px; object-fit: cover;
  border: 3px solid #fff; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--rule);
}
.frame[aria-checked="true"] img { box-shadow: 0 0 0 2.5px var(--marker); }
.frame:disabled { cursor: not-allowed; opacity: 0.35; }
.frame .tag {
  position: absolute; left: 4px; top: 4px;
  font-size: 12px; line-height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(28, 38, 49, 0.78); color: #fff;
}
.frame .rec {
  display: block; margin-top: 2px;
  font-size: 12px; line-height: 16px; font-weight: 700; color: var(--marker);
}

.advanced { margin: 0; color: var(--ink-2); font-size: 15px; }
.advanced summary { cursor: pointer; padding: var(--s1) 0; }
.advanced .check { margin-top: var(--s2); color: var(--ink); }
.advanced .check input { accent-color: var(--marker); }
#reset { justify-self: start; }

.warnings { margin: var(--s4) 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 14px; }
#error { margin-top: var(--s4); }

/* --------------------------------------------------------------- people */

.people {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--s5) var(--s7);
}
@media (max-width: 860px) { .people { padding: 0 var(--s4) var(--s6); } }
.people-head { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.people-head h2 { font-size: 17px; }

.grid-scroll {
  overflow-x: auto;
  background: var(--lit);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--rule);
  -webkit-overflow-scrolling: touch;
}
.grid { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.grid th, .grid td { padding: var(--s2); text-align: center; vertical-align: top; }
.grid thead th {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.grid thead th.is-base { color: var(--marker); }
.grid tbody tr + tr td, .grid tbody tr + tr th { border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.grid th[scope="row"] {
  position: sticky; left: 0; z-index: 1;
  background: var(--lit);
  font-size: 15px; font-weight: 700;
  vertical-align: middle;
  min-width: 52px;
  cursor: default;
}
.grid td.is-base { background: color-mix(in srgb, var(--marker) 5%, transparent); }

.face {
  position: relative;
  display: grid; justify-items: center; gap: 2px;
  padding: 4px; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm);
  font: inherit; color: inherit;
}
.face:hover { background: color-mix(in srgb, var(--table) 70%, transparent); }
.face img {
  display: block; width: 80px; height: 80px; object-fit: cover;
  border-radius: 4px;
  background: var(--table);
}
.face .score { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.face .flags { font-family: var(--hand); color: var(--marker); font-size: 15px; line-height: 1.2; min-height: 1.2em; }
.face .circle { inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); }
.face[aria-pressed="true"] .circle {
  opacity: 1; stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.empty { display: grid; place-items: center; width: 88px; height: 80px; color: var(--ink-2); font-size: 13px; }

@media (max-width: 560px) {
  .grid th, .grid td { padding: var(--s1); }
  .grid th[scope="row"] { min-width: 36px; }
  .face img { width: 64px; height: 64px; }
  .empty { width: 72px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .face[aria-pressed="true"] .circle { transition: none; }
}
