:root {
  color-scheme: light;
  --paper: #f7f6f0;
  --surface: #fffef9;
  --ink: #202923;
  --muted: #5b675f;
  --line: #d6d9cf;
  --deep: #253c31;
  --leaf: #dfeade;
  --peach: #efc191;
  --bad: #8c3524;
  --radius: 19px;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
}
button,
input,
select,
a {
  font: inherit;
}
button,
a.btn {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.53;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ac672f;
  outline-offset: 3px;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link:focus {
  position: fixed;
  z-index: 5;
  background: white;
  padding: 8px;
}
button {
  border: 0;
}
img {
  display: block;
}
[hidden] {
  display: none !important;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar-inner {
  max-width: 1136px;
  margin: auto;
  min-height: 78px;
  padding: 15px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -1.1px;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  border-radius: 11px;
}
.header-actions,
.actions,
.row,
.dialog-head,
.dialog-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.private-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.private-tag i {
  width: 7px;
  height: 7px;
  background: #5b805f;
  border-radius: 50%;
}
main {
  width: min(100%, 1136px);
  margin: auto;
  padding: 47px 32px 80px;
  outline: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(36px, 5.1vw, 62px);
  letter-spacing: -0.065em;
  line-height: 1.04;
  font-weight: 700;
  text-wrap: balance;
}
h2 {
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.16;
  letter-spacing: -0.045em;
  font-weight: 700;
}
h3 {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 670px;
  margin-top: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 740;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.small,
.meta {
  font-size: 13px;
  color: var(--muted);
}
.field-label {
  font-size: 14px;
  font-weight: 650;
  display: block;
  margin-bottom: 7px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}
.block {
  margin-top: 33px;
}
.source-card {
  margin-top: 24px;
  background: var(--deep);
  color: #fffef8;
  padding: 28px 32px;
  border: 0;
  position: relative;
  overflow: hidden;
}
.source-card .eyebrow,
.source-card .small {
  color: #d8e4d8;
}
.source-card h2 {
  font-size: 25px;
  letter-spacing: -0.035em;
}
.source-card .field-label {
  color: #fffef8;
}
.source-card p.small {
  margin-top: 10px;
}
.source-card form {
  margin-top: 17px;
}
.source-entry {
  display: flex;
  gap: 9px;
  align-items: stretch;
}
.input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #657165;
  pointer-events: none;
}
.input-wrap input {
  padding-left: 42px;
  width: 100%;
}
input,
select {
  border: 1px solid #b8c1b6;
  border-radius: 10px;
  background: #fffef9;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  outline: 0;
}
input::placeholder {
  color: #69746b;
}
.btn,
.quiet,
.soft,
.back-link {
  border-radius: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn {
  min-height: 46px;
  padding: 11px 18px;
  line-height: 1.2;
  font-weight: 690;
  background: var(--deep);
  color: #fffef8;
}
.btn.accent {
  color: #2a2a20;
  background: var(--peach);
}
.btn:hover:not(:disabled) {
  filter: brightness(1.08);
}
.quiet,
.soft {
  padding: 9px 13px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 625;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}
.quiet:hover,
.soft:hover {
  background: #ebede5;
}
.compact {
  min-height: 35px;
  padding: 5px 10px;
}
.back-link {
  background: none;
  padding: 0;
  color: var(--muted);
  font-weight: 625;
  font-size: 14px;
  margin-bottom: 24px;
}
.back-link:hover {
  text-decoration: underline;
}
.icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
  flex-shrink: 0;
}
.tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
  color: #36463b;
  background: #e6ebe3;
}
.tag.ready {
  color: #2b4e36;
  background: #dcebdc;
}
.tag.busy {
  color: #735321;
  background: #f8ebce;
}
.tag.failed {
  color: var(--bad);
  background: #fae1d9;
}
.tag.done {
  color: #2f5242;
  background: #dcece4;
}
.count {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.jobs {
  padding: 0;
  overflow: hidden;
}
.job-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.job-link:last-child {
  border: 0;
}
.job-link:hover {
  background: #f2f4eb;
}
.job-icon,
.blank-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #e9ede4;
  color: #47604e;
  border-radius: 10px;
}
.job-icon {
  width: 42px;
  height: 43px;
}
.job-text {
  min-width: 0;
  flex: 1;
}
.job-text h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.job-end {
  display: flex;
  align-items: center;
  gap: 12px;
}
.empty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 27px;
}
.blank-icon {
  width: 54px;
  height: 54px;
}
.empty p {
  margin-top: 4px;
}
.profile-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.profile-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: 20px;
  color: #415346;
  font-weight: 600;
}
.login {
  max-width: 480px;
  margin: 7vh auto 0;
}
.login .card {
  margin-top: 22px;
  padding: 26px;
}
.login input {
  width: 100%;
  margin-bottom: 12px;
}
.login .btn {
  width: 100%;
}
.login h1 {
  font-size: 45px;
}
.loading {
  color: var(--muted);
  padding: 20px 0;
}
.notice {
  position: fixed;
  z-index: 6;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 650px);
  padding: 13px 17px;
  border-radius: 11px;
  background: #273a2e;
  color: white;
  box-shadow: 0 5px 25px #1f2b2029;
}
.inline-error {
  margin-top: 11px;
  font-size: 14px;
  color: var(--bad);
}
.source-card .inline-error {
  color: #ffd5c3;
}
.detail-title {
  font-size: clamp(30px, 4.4vw, 49px);
  max-width: 900px;
  overflow-wrap: anywhere;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  flex-wrap: wrap;
}
.progress-panel {
  margin-top: 23px;
}
.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.percent {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
progress {
  display: block;
  width: 100%;
  height: 9px;
  background: #e2e7de;
  border: 0;
  border-radius: 20px;
  appearance: none;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #e2e7de;
}
progress::-webkit-progress-value {
  background: #627f60;
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: #627f60;
  border-radius: 20px;
}
.stage-list {
  display: flex;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  gap: 7px;
  flex-wrap: wrap;
}
.stage-list li {
  font-size: 12px;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 15px;
  border: 1px solid var(--line);
}
.stage-list li.current {
  color: #294e35;
  border-color: #9bbc9d;
  background: var(--leaf);
  font-weight: 700;
}
.stage-list li.past {
  color: #3d5f44;
  background: #ecf1e9;
}
.stack {
  display: grid;
  gap: 12px;
}
.section-note {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 14px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.person {
  padding: 17px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  column-gap: 15px;
  row-gap: 12px;
}
.person .person-detail {
  min-width: 0;
}
.person-detail h3,
.review-entry strong {
  overflow-wrap: anywhere;
}
.portrait,
.image-fallback {
  width: 76px;
  height: 76px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e7e9dd;
  color: #536550;
  font-size: 23px;
  font-weight: 690;
}
.portrait {
  border: 0;
  padding: 0;
}
.portrait img,
.sample img,
.review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-select {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.person-select label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 580;
}
.person-select select {
  margin-left: auto;
  width: min(65%, 240px);
  font-size: 15px;
  min-height: 39px;
  padding: 6px 9px;
}
.samples {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  overflow: auto;
}
.sample {
  padding: 0;
  background: #e9ede3;
  flex: 0 0 36px;
  width: 36px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.person .readonly {
  font-size: 14px;
  font-weight: 600;
  color: #3f6145;
  grid-column: 1/-1;
}
.mapping-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  margin-top: 13px;
}
.mapping-actions .small {
  max-width: 440px;
}
.player {
  display: block;
  background: #121914;
  width: 100%;
  max-height: min(65vh, 570px);
  border-radius: 11px;
  aspect-ratio: 16/9;
  object-fit: contain;
}
.player-card {
  padding: 15px;
}
.player-card .actions {
  margin: 13px 0 0;
  flex-wrap: wrap;
}
.quality-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.quality-summary > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 12px clamp(8px, 2vw, 18px);
  background: #fff;
}
.quality-summary dt {
  font-size: 12px;
  color: var(--muted);
}
.quality-summary dd {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.quality-summary .attention dd {
  color: #85531d;
}
.review-group h3 {
  font-size: 15px;
  margin: 18px 0 6px;
}
.review-wrap {
  padding: 0;
}
.review-wrap summary {
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 690;
  overflow-wrap: anywhere;
}
.review-body {
  padding: 0 18px 16px;
}
.review-entry {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  display: flex;
  gap: 12px;
}
.review-info {
  flex: 1;
  min-width: 0;
}
.review-info p {
  font-size: 14px;
}
.review-photo {
  background: #e6ebe0;
  border: 0;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  width: 68px;
  height: 48px;
  padding: 0;
  flex-shrink: 0;
}
.failed-card {
  border-color: #e5bbb0;
  background: #fff9f5;
}
.failed-card p {
  margin: 7px 0 14px;
  overflow-wrap: anywhere;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  max-width: min(95vw, 850px);
  width: max-content;
  padding: 13px;
  box-shadow: 0 8px 40px #151c1330;
}
dialog::backdrop {
  background: #101611c9;
}
.dialog-head,
.dialog-foot {
  justify-content: space-between;
  gap: 20px;
  padding: 3px 0 9px;
}
.dialog-head h2 {
  font-size: 19px;
}
#photo-image {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  margin: auto;
  border-radius: 5px;
}
.dialog-foot {
  padding: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.more {
  margin-top: 11px;
}
.muted-note {
  border-left: 3px solid #a6b8a2;
  padding-left: 12px;
  color: var(--muted);
  font-size: 14px;
}
.pending-change {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .topbar-inner {
    min-height: 66px;
    padding: 12px 18px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 33px;
    height: 33px;
  }
  .private-tag {
    display: none;
  }
  main {
    padding: 30px 17px 60px;
  }
  .source-card {
    padding: 21px;
  }
  .head-row {
    align-items: center;
  }
  .people-grid {
    grid-template-columns: 1fr;
  }
  .card:not(.jobs, .source-card, .person, .player-card, .review-wrap) {
    padding: 20px;
  }
  .job-link {
    padding: 13px 14px;
    gap: 10px;
  }
  .job-icon {
    width: 34px;
    height: 37px;
  }
  .job-end {
    gap: 4px;
  }
  .job-end .icon {
    display: none;
  }
  .job-meta {
    gap: 5px;
  }
  .source-entry {
    flex-direction: column;
  }
  .source-entry .btn {
    align-self: stretch;
  }
  .mapping-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .mapping-actions .btn {
    width: 100%;
  }
  .empty {
    gap: 12px;
  }
  .login {
    margin-top: 5vh;
  }
  .person {
    padding: 13px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 11px;
  }
  .portrait,
  .image-fallback {
    width: 68px;
    height: 68px;
  }
  .review-entry {
    gap: 8px;
  }
  .review-entry .quiet {
    font-size: 12px;
  }
  .source-card h2 {
    font-size: 22px;
  }
  .block {
    margin-top: 27px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 0.13s,
      color 0.13s;
  }
}

.mapping-editor {
  padding: 0 16px 16px;
}
.mapping-editor > h2 {
  font-size: 20px;
}

.person-flag {
  display: inline-block;
  margin: 4px 4px 0 0;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef0e9;
  color: #526054;
  font-size: 11px;
  font-weight: 630;
}
.person-flag.caution {
  color: #755221;
  background: #f6ead1;
}

.auto-continue {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 17px 0 0;
  font-size: 14px;
}
.auto-continue input { width: 18px; height: 18px; accent-color: #426351; }
.preview-switch { display: inline-flex; gap: 3px; margin-bottom: 11px; padding: 3px; border-radius: 9px; background: #eef0e9; }
.preview-switch .quiet { border: 0; background: transparent; padding: 6px 14px; }
.preview-switch .quiet[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px #273c2828; }
.preview-ranges { margin: 12px 0; padding-left: 24px; }
.preview-ranges li { margin: 6px 0; }
.preview-ranges .quiet { padding: 3px 5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.preview-actions { justify-content: space-between; }
.preview-actions .reject { color: #87402e; border-color: #dabeb3; }
