:root {
  --topbar-height: 64px;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-muted: #f8f9f8;
  --ink: #17211f;
  --ink-soft: #52615e;
  --line: #d9dfdc;
  --line-strong: #bdc8c3;
  --accent: #17695f;
  --accent-strong: #0d5149;
  --accent-soft: #e4f1ee;
  --blue: #315f92;
  --blue-soft: #e8f0f8;
  --warning: #936118;
  --warning-soft: #fff3d9;
  --danger: #a13f38;
  --danger-soft: #fbe8e5;
  --success: #287346;
  --success-soft: #e4f2e9;
  --shadow: 0 10px 30px rgba(18, 38, 33, 0.08);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

html.modal-open,
body.modal-open {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 95, 146, 0.24);
  outline-offset: 1px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  padding: 10px clamp(16px, 3vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #14211e;
  color: #f7fbfa;
  border-bottom: 1px solid #2c3c38;
}

.brand,
.runtime-status,
.toolbar,
.view-tabs,
.panel-heading,
.pane-heading,
.detail-title-row,
.detail-meta,
.form-actions,
.release-actions,
.candidate-line {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 11px;
}

.brand-mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #6ea99f;
  color: #bde1da;
  font-weight: 800;
}

.brand > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.brand span:last-child {
  color: #aebdb9;
  font-size: 12px;
  line-height: 1.25;
}

.runtime-status {
  justify-content: flex-end;
  gap: 9px;
  color: #c9d5d2;
  white-space: nowrap;
}

.auth-user-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 8px;
  border-left: 1px solid #40504c;
}

.auth-user-controls[hidden] {
  display: none;
}

.auth-user-name {
  max-width: 160px;
  overflow: hidden;
  color: #f3f8f7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-text-button {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #52645f;
  border-radius: 4px;
  color: #dce8e5;
  background: #21312d;
}

.topbar-text-button:hover {
  border-color: #8cb8ae;
  color: #ffffff;
  background: #293d38;
}

.auth-screen {
  min-height: calc(100vh - var(--topbar-height));
  padding: 48px 20px;
  display: grid;
  place-items: start center;
  background: var(--bg);
}

.auth-screen[hidden] {
  display: none;
}

.login-panel {
  width: min(100%, 420px);
  margin-top: clamp(16px, 8vh, 88px);
  padding: 26px;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 4px;
}

.login-heading > div {
  min-width: 0;
}

.login-heading .brand-mark {
  color: var(--accent);
  border-color: var(--accent);
}

.login-heading h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.3;
}

.login-field {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 650;
}

.login-field input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-actions .primary-button {
  min-width: 96px;
}

.mfa-enrollment-grid {
  display: grid;
  gap: 14px;
}

.mfa-secret-block,
.mfa-recovery-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
}

.mfa-secret-value,
.mfa-provisioning-uri,
.mfa-recovery-codes {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--accent-strong);
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  user-select: all;
}

.mfa-confirm-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto 1fr;
  align-items: center;
  gap: 10px;
}

.mfa-confirm-row input {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

.account-dialog {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
}

.account-create-panel,
.account-list-panel {
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.account-create-panel {
  margin-bottom: 14px;
}

.account-create-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-create-form .form-actions {
  grid-column: 1 / -1;
}

.account-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(150px, 1fr) minmax(130px, .75fr) minmax(120px, .65fr) minmax(250px, 1.65fr);
  align-items: end;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.account-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-identity strong,
.account-identity span,
.account-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span,
.account-identity small {
  color: var(--ink-soft);
  font-size: 11px;
}

.account-row-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .account-create-form,
  .account-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-identity,
  .account-row-actions {
    grid-column: 1 / -1;
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa6a3;
}

.status-dot.ok {
  background: #62bf83;
}

.status-dot.error {
  background: #e7786f;
}

.status-dot.pending {
  background: #e2bd62;
}

.contract-label {
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid #50605c;
  color: #9fb0ac;
  font-size: 12px;
}

.local-only-label {
  padding: 3px 7px;
  border: 1px solid #5e746e;
  border-radius: 3px;
  color: #cce0db;
  font-size: 11px;
  font-weight: 700;
}

.workspace {
  width: min(1600px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.workspace-sticky-header {
  position: sticky;
  top: var(--topbar-height);
  z-index: 20;
  box-shadow: 0 5px 14px rgba(18, 38, 33, 0.06);
}

.toolbar {
  min-height: 62px;
  padding: 10px 20px;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.toolbar-actions[hidden] {
  display: none;
}

.queue-heading-actions button[hidden] {
  display: none !important;
}

.workflow-bar {
  min-height: 84px;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.workflow-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workflow-copy .eyebrow {
  margin-bottom: 0;
}

.workflow-copy strong,
.workflow-copy span {
  overflow-wrap: anywhere;
}

.workflow-copy strong {
  font-size: 15px;
}

.workflow-copy > span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.workflow-steps {
  min-width: 470px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  list-style: none;
}

.workflow-steps li {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #77837f;
  font-size: 11px;
}

.workflow-steps li + li::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  border-top: 1px solid var(--line-strong);
  z-index: 0;
}

.workflow-steps b {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 11px;
}

.workflow-steps .done,
.workflow-steps .current {
  color: var(--accent-strong);
  font-weight: 700;
}

.workflow-steps .done b {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workflow-steps .current b {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.view-tabs {
  align-self: stretch;
  gap: 4px;
}

.tab-button {
  min-width: 112px;
  min-height: 40px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-soft);
}

.tab-button b {
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #edf0ef;
  color: #495653;
  font-size: 11px;
}

.tab-button.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.tab-button.active b {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 650;
}

.primary-button,
.secondary-button,
.danger-button {
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #efc7c2;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border-color: currentColor;
  font-size: 18px;
}

.topbar .icon-button {
  border-color: #51615d;
  color: #d8e0de;
}

.process-panel {
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--line-strong);
  background: #f7faf9;
}

.process-panel[hidden] {
  display: none;
}

.reference-summary {
  min-height: 40px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
}

.reference-summary strong {
  color: var(--ink);
}

.reference-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reference-form {
  min-width: 0;
  padding-right: 22px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(240px, 1.2fr);
  gap: 10px 16px;
  align-items: end;
}

.reference-form + .reference-form {
  padding-right: 0;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.reference-form > div,
.reference-form .inline-result {
  grid-column: 1 / -1;
}

.reference-form h2 {
  margin-bottom: 3px;
  font-size: 14px;
}

.reference-form p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.reference-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #34413e;
  font-size: 11px;
  font-weight: 700;
}

.reference-form input[type="file"] {
  min-width: 0;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.reference-panel > .action-note {
  margin: 14px 0 0;
}

.panel-heading,
.pane-heading,
.detail-title-row {
  justify-content: space-between;
  gap: 14px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-lede {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.panel-heading h1,
.pane-heading h2,
.detail-title-row h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.35;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.venue-basic-information {
  padding: 9px 0 10px;
}

.venue-basic-information .section-heading {
  margin-bottom: 6px;
}

.venue-basic-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  border-top: 1px solid var(--line);
}

.venue-basic-grid > div {
  min-width: 0;
  padding: 6px 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}

.venue-basic-grid dt {
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.venue-basic-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-basic-grid dd code {
  color: var(--accent-strong);
  font-size: 11px;
}

.venue-aliases-input {
  width: min(100%, 320px);
  min-width: 0;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.venue-basic-grid dd:has(.venue-aliases-input) {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: visible;
  white-space: normal;
}

.compact-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

#trashButton.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.intake-form {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.4fr);
  gap: 16px 22px;
}

.intake-form label,
.approval-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #34413e;
  font-size: 12px;
  font-weight: 650;
}

.intake-form label span,
.approval-form label span {
  line-height: 1.35;
}

.intake-form em {
  color: var(--ink-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

input,
select {
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  min-height: 82px;
  padding: 9px 10px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  min-height: 38px;
  gap: 12px;
}

.file-picker {
  min-height: 112px;
  padding: 18px;
  grid-row: span 2;
  align-content: center;
  grid-template-columns: 42px minmax(0, 1fr);
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
}

.file-picker:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 22px;
}

.file-picker-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-picker-copy strong,
.file-picker-copy small {
  overflow-wrap: anywhere;
}

.file-picker-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.file-picker-copy small {
  color: var(--ink-soft);
  font-weight: 400;
}

.form-block {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-block legend {
  margin-bottom: 7px;
  color: #34413e;
  font-size: 12px;
  font-weight: 650;
}

.form-block legend em {
  margin-left: 6px;
}

.action-note,
.panel-help,
.plain-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.intake-form > .action-note {
  grid-column: 1 / -1;
  margin-top: -8px;
}

.segmented-control,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.segmented-control label,
.checkbox-group label {
  display: inline-flex;
  cursor: pointer;
}

.segmented-control input,
.checkbox-group input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span,
.checkbox-group span {
  min-height: 36px;
  padding: 8px 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-soft);
}

.segmented-control input:checked + span,
.checkbox-group input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.segmented-control input:focus-visible + span,
.checkbox-group input:focus-visible + span {
  outline: 3px solid rgba(49, 95, 146, 0.24);
}

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

.intake-fields[hidden] {
  display: none;
}

.wide-field {
  grid-column: 1 / -1;
}

.inline-result {
  min-width: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.inline-result.success {
  color: var(--success);
}

.inline-result.error {
  color: var(--danger);
}

.content-grid {
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: calc(100vh - 126px);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
}

.queue-pane {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
}

.pane-heading {
  min-height: 72px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.pane-heading h2 {
  font-size: 16px;
}

.muted-label {
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.queue-controls {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.42fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.queue-controls label {
  min-width: 0;
}

.queue-controls input,
.queue-controls select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.collection-batch-toolbar {
  padding: 9px 12px 11px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.collection-batch-toolbar[hidden] {
  display: none;
}

.collection-selection-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collection-selection-heading > span {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.collection-selection-shortcuts {
  flex: 0 0 auto;
  display: flex;
  gap: 5px;
}

.collection-selection-shortcuts button,
.collection-batch-actions button {
  min-height: 29px;
  padding: 5px 8px;
  font-size: 10px;
}

.collection-selection-shortcuts button {
  min-height: 25px;
  padding: 3px 7px;
}

.collection-batch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.collection-batch-actions .collection-recollect-button {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.collection-batch-actions .collection-recollect-button:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

@media (min-width: 701px) {
  .collection-batch-toolbar:not([hidden]) ~ .queue-list {
    max-height: calc(100vh - 315px);
  }
}

.queue-list {
  min-height: 240px;
  max-height: calc(100vh - 198px);
  overflow-y: auto;
}

.queue-item {
  width: 100%;
  min-height: 102px;
  padding: 15px 17px;
  display: grid;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.queue-item:hover {
  background: var(--surface);
}

.queue-item.selected {
  border-left-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.candidate-line {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.candidate-line strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.queue-meta,
.mono-line,
.queue-next {
  color: var(--ink-soft);
  font-size: 11px;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.mono-line,
.mono {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.mono-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-next {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.status-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.pass,
.status-badge.collected,
.status-badge.approved,
.status-badge.applied {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.warn,
.status-badge.completed_with_failures,
.status-badge.interrupted,
.status-badge.delivery_unknown {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge.fail,
.status-badge.failed,
.status-badge.rejected,
.status-badge.invalid,
.status-badge.timed_out,
.status-badge.blocked,
.status-badge.superseded {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge.pending,
.status-badge.queued,
.status-badge.running,
.status-badge.sending,
.status-badge.in_flight {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-badge.ready_for_review,
.status-badge.released,
.status-badge.completed,
.status-badge.frozen {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-badge.cancelled,
.status-badge.not_collected,
.status-badge.archived {
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.metric-grid {
  margin: 12px 0 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.metric-grid > div {
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.metric-grid > div + div {
  border-left: 1px solid var(--line);
}

.metric-grid span,
.usage-table span,
.usage-table small,
.workbench-row small,
.gap-list span,
.gap-list small {
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-grid strong {
  font-size: 20px;
}

.seed-list {
  display: grid;
  gap: 10px;
}

.seed-card {
  padding: 12px 14px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(14, 29, 25, 0.02);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.seed-card:hover {
  border-color: #bfd8d0;
  box-shadow: 0 4px 18px rgba(18, 38, 33, 0.05);
}

.seed-card.collected-seed {
  background: #f5f7f6;
}

.seed-card.collected-seed strong,
.seed-card.collected-seed .seed-card-meta,
.seed-card.collected-seed .seed-chip,
.seed-card.collected-seed .seed-card-subline {
  color: #77827f;
}

.seed-card-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.seed-card-top {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.seed-card-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.seed-card-title {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.seed-card-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.seed-card-name-row strong {
  font-size: 15px;
}

.seed-card-meta {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.seed-card-body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.seed-text-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.queue-record {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  min-height: 94px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.queue-record:has(.queue-item.selected) {
  z-index: 2;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.queue-record:has(.queue-item.selected) .queue-item.selected {
  background: transparent;
  box-shadow: none;
}

.queue-record.collection-record-collected {
  grid-template-columns: minmax(0, 1fr) 238px;
}

.queue-record.collection-batch-selectable {
  grid-template-columns: 38px minmax(0, 1fr) 238px;
}

.queue-collection-selector {
  width: 38px;
  height: 94px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
  cursor: pointer;
}

.queue-collection-selector input {
  appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  display: grid;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  cursor: pointer;
}

.queue-collection-selector input::before {
  content: "✓";
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform: scale(0);
}

.queue-collection-selector input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.queue-collection-selector input:checked::before {
  transform: scale(1);
}

.queue-collection-selector input:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.queue-record.collection-batch-marked {
  background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface));
}

.queue-record.collection-batch-marked .queue-collection-selector {
  background: var(--accent-soft);
}

.queue-record:has(.queue-operation-menu[open]) {
  z-index: 20;
}

.queue-record .queue-item {
  height: 94px;
  min-height: 94px;
  padding: 12px 14px;
  gap: 7px;
  border-bottom: 0;
}

.queue-place-record .candidate-line strong,
.queue-place-record .queue-meta span,
.queue-place-record .queue-next {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-place-record .queue-meta {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.queue-record-side {
  position: relative;
  min-width: 0;
  height: 94px;
  padding: 11px 10px 10px 6px;
  display: grid;
  align-content: start;
  gap: 9px;
}

.queue-record-status {
  min-width: 0;
  min-height: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.queue-record-status > .queue-status-row {
  width: 100%;
}

.queue-record-status > .status-badge {
  width: 100%;
  justify-content: center;
}

.collection-status-row .status-badge {
  min-height: 22px;
}

.queue-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  justify-content: stretch;
  overflow: visible;
  white-space: nowrap;
}

.collection-status-badge {
  min-width: 0;
  width: 100%;
  gap: 3px;
  padding: 3px 5px;
  justify-content: center;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-status-badge b {
  font-size: 11px;
  line-height: 1;
}

.collection-record-collected {
  background: color-mix(in srgb, var(--surface-muted) 38%, var(--surface));
}

.collection-status-badge.collected {
  background: #e9f2ee;
  color: #2f6f5d;
}

.collection-status-badge.completed {
  background: var(--blue-soft);
  color: var(--blue);
}

.collection-status-badge.pass {
  background: var(--success-soft);
  color: var(--success);
}

.collection-status-badge.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.collection-status-badge.pending {
  background: var(--blue-soft);
  color: var(--blue);
}

.collection-status-badge.not_collected,
.collection-status-badge.not_started {
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.queue-operation-menu {
  position: relative;
}

.queue-operation-menu summary {
  min-height: 31px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.queue-operation-menu summary::-webkit-details-marker {
  display: none;
}

.queue-operation-menu summary::before {
  content: "›";
  color: var(--accent-strong);
  font-size: 17px;
  line-height: 1;
  transition: transform 120ms ease;
}

.queue-operation-menu[open] summary::before {
  transform: rotate(90deg);
}

.queue-operation-menu summary span {
  margin-right: auto;
}

.queue-operation-menu summary small {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 10px;
}

.queue-operation-menu[open] summary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 6px 6px 0 0;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.queue-operation-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 30;
  width: 100%;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: var(--surface-muted);
  box-shadow: 0 10px 26px rgba(13, 32, 27, 0.16);
}

.queue-operation-panel button {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
  white-space: nowrap;
}

.queue-operation-panel > :only-child {
  grid-column: 1 / -1;
}

.queue-operation-panel button:disabled {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 1;
}

.queue-operation-panel .queue-action-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.queue-operation-panel .queue-action-primary:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.queue-operation-panel .queue-action-accent {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.queue-operation-panel .queue-action-accent:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.queue-operation-panel .queue-action-info {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  background: var(--blue-soft);
  color: var(--blue);
}

.queue-operation-panel .queue-action-info:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 38%, transparent);
}

.queue-operation-panel .queue-action-neutral {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.queue-operation-panel .queue-action-neutral:hover:not(:disabled) {
  border-color: var(--ink-soft);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-soft) 30%, transparent);
}

.queue-operation-panel .queue-action-danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.queue-operation-panel .queue-action-danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 32%, transparent);
}

.queue-operation-panel .collection-submit-review {
  grid-column: 1 / -1;
}

.seed-warning-text {
  color: #94691f;
  font-weight: 700;
}

.seed-card-subline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.seed-card-subline span:last-child {
  overflow-wrap: anywhere;
}

.seed-card-actions {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.seed-card-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.seed-operation {
  min-width: 0;
  min-height: 32px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  white-space: normal;
}

.seed-operation span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.seed-check-control {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
}

.seed-check-control input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  display: grid;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
}

.seed-check-control input[type="checkbox"]::before {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transform: scale(0);
}

.seed-check-control input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.seed-check-control input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.seed-action-icon {
  width: 32px;
  min-width: 32px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.latest-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #a5cbbb;
  border-radius: 3px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 10px;
  font-weight: 750;
}

.seed-toolbar {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.batch-preview-list {
  max-height: 260px;
  margin: 12px 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.batch-preview-list > div {
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
}

.batch-preview-list > div:first-child {
  border-top: 0;
}

.batch-preview-list span {
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal-backdrop {
  width: 100%;
  height: 100%;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(20, 33, 30, 0.42);
}

.modal-dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(18, 38, 33, 0.22);
}

/* 批量采集需要稳定的大面积结果区；外层只负责承载弹窗，地点列表单独滚动。 */
.batch-collection-dialog {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.batch-collection-dialog > .modal-heading {
  flex: 0 0 auto;
}

.batch-collection-dialog > .action-confirm-panel {
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
}

.batch-collection-dialog #bulkCityVenueCollectionResult {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.batch-collection-dialog .collection-batch-progress {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.batch-collection-dialog .collection-batch-items {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-heading h3 {
  margin: 0;
  font-size: 17px;
}

.modal-heading .eyebrow {
  margin-bottom: 5px;
}

.action-confirm-panel small {
  color: var(--ink-soft);
}

.ai-json-preview {
  max-height: 65vh;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line-color, #d9dee8);
  border-radius: 10px;
  background: var(--surface-muted, #f6f8fb);
  color: var(--text-primary, #243047);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.seed-batch-actions,
.queue-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.queue-heading-actions {
  max-width: 190px;
}

.discovery-task-status.queued,
.discovery-task-status.running {
  background: var(--blue-soft);
  color: var(--blue);
}

.discovery-task-status.failed,
.discovery-task-status.timed_out {
  background: var(--danger-soft);
  color: var(--danger);
}

.discovery-task-status.interrupted {
  background: var(--warning-soft);
  color: var(--warning);
}

.discovery-task-status.completed {
  background: var(--blue-soft);
  color: var(--blue);
}

.discovery-start-form {
  display: grid;
  gap: 14px;
}

.discovery-start-form > label,
.discovery-form-grid > label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

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

.toggle-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.toggle-field small {
  grid-column: 1 / -1;
}

.confirmation-check {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e0bf77;
  background: var(--warning-soft);
  color: var(--warning);
}

.confirmation-check[hidden] {
  display: none;
}

.confirmation-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.task-detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.task-detail-list > div {
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.task-detail-list dt {
  color: var(--ink-soft);
  font-size: 11px;
}

.task-detail-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.discovery-task-metrics strong {
  font-size: 14px;
}

.warn-text {
  color: #94691f;
}

.seed-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.seed-select input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-width: 13px;
  margin: 0;
  accent-color: var(--accent);
}

.danger-ghost-button {
  border: 1px solid #e5b8b2;
  background: transparent;
  color: #8b3d36;
}

.seed-action-button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.seed-action-button:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.seed-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.seed-action-button-primary {
  border-color: #aed2c4;
  background: #eff8f4;
  color: var(--accent-strong);
}

.seed-action-button-muted {
  border-color: #e4c36c;
  background: #fff7df;
  color: #856414;
}

.seed-action-button-danger {
  border-color: #e5b8b2;
  background: #fff5f2;
  color: #8b3d36;
}

.seed-footnote {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.workbench-head {
  background: #eef2f0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-cloud > span {
  padding: 5px 9px;
  border: 1px solid #a9cfc6;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
}

.gap-list,
.usage-table {
  display: grid;
  gap: 8px;
}

.gap-list > div {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(240px, 1.2fr) minmax(150px, 0.55fr);
  gap: 10px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

.usage-table {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.usage-table > div {
  min-width: 0;
  min-height: 82px;
  padding: 11px 12px;
  display: grid;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.usage-table strong,
.usage-table small {
  overflow-wrap: anywhere;
}

.execution-timing-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}

.execution-timing-heading,
.collection-batch-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.execution-timing-heading > div {
  display: grid;
  gap: 3px;
}

.execution-timing-heading span,
.collection-batch-summary span {
  color: var(--muted);
  font-size: 12px;
}

.execution-timing-heading > strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.execution-timing-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.execution-timing-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.execution-timing-list > div:last-child {
  border-bottom: 0;
}

.execution-timing-list span {
  color: var(--muted);
  font-size: 12px;
}

.execution-timing-list strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.collection-batch-progress {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.collection-batch-summary {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.collection-batch-current {
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
}

.collection-batch-items {
  display: grid;
  gap: 6px;
  max-height: 330px;
  overflow: auto;
  padding-right: 3px;
}

.collection-batch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
}

.collection-batch-item-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-batch-item strong {
  color: var(--primary-dark);
  font-size: 12px;
  white-space: nowrap;
}

.collection-batch-item small {
  grid-column: 1 / -1;
  color: var(--danger);
  overflow-wrap: anywhere;
}

.collection-batch-item-running {
  border-color: #8fc5b7;
  background: #f0f8f5;
}

.collection-batch-item-failed {
  border-color: #e2b8ad;
  background: #fff5f2;
}

.collection-batch-item-cancelled {
  border-color: #c7cbd1;
  background: #f4f5f6;
}

.collection-batch-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed currentColor;
}

.human-report {
  max-height: 520px;
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: #2d3936;
  font: 12px/1.7 "Segoe UI", "Microsoft YaHei UI", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.action-confirm-panel {
  margin: 16px 0;
  padding: 14px;
  display: grid;
  gap: 13px;
  border: 1px solid #9ec8be;
  border-left: 4px solid var(--accent);
  background: #f3f9f7;
}

.action-confirm-panel h3,
.action-confirm-panel p {
  margin: 0;
}

.action-confirm-panel p {
  margin-top: 4px;
  color: var(--ink-soft);
}

.danger-panel {
  border-color: #efc7c2;
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.collection-budget {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.collection-budget span {
  min-height: 58px;
  padding: 9px 11px;
  display: grid;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.collection-budget span + span {
  border-left: 1px solid var(--line);
}

.collection-budget strong {
  color: var(--ink);
  font-size: 14px;
}

.report-markdown {
  margin-top: 8px;
  color: #2d3936;
  font-size: 12px;
  line-height: 1.5;
}

.report-markdown h1,
.report-markdown h2,
.report-markdown h3,
.report-markdown h4 {
  margin: 13px 0 6px;
  font-size: 14px;
}

.report-markdown h1 {
  margin-top: 0;
  font-size: 17px;
}

.report-markdown p,
.report-markdown ul {
  margin: 4px 0;
}

.report-table-wrap {
  margin: 6px 0 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.report-markdown table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
}

.report-markdown th,
.report-markdown td {
  padding: 5px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compact-report-table table {
  min-width: 0;
  table-layout: fixed;
}

.compact-report-table th:first-child,
.compact-report-table td:first-child {
  width: 30%;
}

.report-markdown th {
  background: #eef2f0;
  color: var(--ink-soft);
  font-size: 10px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.detail-pane {
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  background: var(--surface);
  overflow: hidden;
}

.empty-state,
.loading-state,
.error-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 17px;
}

.empty-state p,
.error-state p {
  margin-bottom: 0;
}

.empty-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 800;
}

.detail-title-row {
  align-items: flex-start;
  margin-bottom: 12px;
}

.detail-title-row h2 {
  min-width: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.detail-meta {
  margin-bottom: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-meta span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.review-guidance {
  margin: 10px 0 0;
  padding: 9px 11px;
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  color: #284b70;
}

.review-guidance strong,
.review-guidance span {
  overflow-wrap: anywhere;
}

.review-guidance span {
  font-size: 12px;
  line-height: 1.55;
}

.review-guidance.success {
  border-left-color: var(--success);
  background: var(--success-soft);
  color: #225d3a;
}

.review-guidance.warning {
  border-left-color: var(--warning);
  background: var(--warning-soft);
  color: #765018;
}

.review-guidance.danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: #7d332e;
}

.detail-section {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin-bottom: 8px;
  font-size: 13px;
}

.compact-detail-section {
  padding: 10px 0;
}

.compact-detail-section .task-detail-list {
  gap: 5px 14px;
}

.compact-detail-section .task-detail-list > div {
  padding: 5px 0;
}

/* 采集详情信息量最大，单独收紧间距，避免影响人工审核等其他详情页。 */
.collection-detail-view {
  display: grid;
  gap: 0;
}

.collection-detail-view .detail-title-row {
  margin-bottom: 6px;
}

.collection-detail-view .detail-title-row h2 {
  font-size: 20px;
}

.collection-detail-view .detail-meta {
  margin-bottom: 8px;
  gap: 5px 14px;
}

.collection-detail-view #runActionPanel .result-band {
  margin-top: 8px;
  padding: 9px 12px;
}

.collection-detail-view > .detail-section {
  padding: 9px 0;
}

.collection-detail-view .section-heading {
  margin-bottom: 7px;
}

.collection-detail-view .usage-table {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.collection-detail-view .usage-table > div {
  min-height: 68px;
  padding: 9px 10px;
}

.collection-detail-view .execution-timing-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
}

.collection-detail-view .execution-timing-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin-top: 7px;
}

.collection-detail-view .execution-timing-list > div {
  padding: 6px 0;
}

.collection-detail-view .venue-main-review,
.collection-detail-view .review-collection-section,
.collection-detail-view .review-quality-section {
  gap: 7px;
}

.collection-detail-view .venue-review-groups {
  gap: 8px;
}

.collection-detail-view .venue-review-group h4,
.collection-detail-view .review-collection-card-heading {
  padding: 7px 10px;
}

.collection-detail-view .venue-review-fields,
.collection-detail-view .review-collection-fields {
  padding: 2px 10px 6px;
}

.collection-detail-view .venue-review-fields > div,
.collection-detail-view .review-collection-field {
  padding: 6px 0;
}

.collection-detail-view .venue-review-fields dt,
.collection-detail-view .review-collection-field dt {
  margin-bottom: 2px;
}

.collection-detail-view .review-collection-list {
  gap: 6px;
}

.review-collection-details {
  min-width: 0;
}

.review-collection-details > summary {
  cursor: pointer;
  padding: 8px 10px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  list-style-position: outside;
}

.review-collection-details > summary::marker {
  color: var(--accent-strong);
}

.review-collection-details > summary .muted-label {
  float: right;
  margin-top: 1px;
}

.review-collection-details[open] > summary {
  margin-bottom: 7px;
  border-left-color: var(--accent);
}

.collection-detail-view .review-guidance {
  padding: 9px 12px;
}

.registry-source-card {
  margin-top: 2px;
}

.section-heading,
.comparison-summary,
.evidence-heading,
.verification-summary {
  display: flex;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-heading h3 {
  margin-bottom: 0;
}

.section-heading > div {
  min-width: 0;
}

.section-step {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-summary {
  min-height: 38px;
  padding: 8px 10px;
  flex-wrap: wrap;
  gap: 6px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 11px;
}

.comparison-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.metric-ok {
  color: var(--success);
}

.metric-warning {
  color: var(--warning);
}

.metric-danger {
  color: var(--danger);
}

.comparison-table {
  max-width: 100%;
  border: 1px solid var(--line);
  overflow: hidden;
}

.comparison-header,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.78fr) minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1.25fr);
}

.comparison-header {
  min-height: 34px;
  align-items: center;
  background: #eef2f0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.comparison-header span,
.comparison-cell {
  min-width: 0;
  padding: 9px 10px;
  overflow-wrap: anywhere;
}

.comparison-header span + span,
.comparison-cell + .comparison-cell {
  border-left: 1px solid var(--line);
}

.comparison-row {
  border-top: 1px solid var(--line);
}

.comparison-row:nth-child(odd) {
  background: #fbfcfb;
}

.comparison-cell {
  min-height: 92px;
  align-content: start;
  display: grid;
  gap: 7px;
  line-height: 1.45;
}

.cell-label {
  display: none;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-cell strong {
  font-size: 13px;
}

.field-cell code,
.evidence-entry code {
  color: var(--ink-soft);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.field-technical,
.snapshot-technical {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.field-technical summary,
.snapshot-technical summary {
  cursor: pointer;
  width: fit-content;
}

.field-technical[open] summary,
.snapshot-technical[open] summary {
  margin-bottom: 5px;
}

.field-technical code,
.snapshot-technical code {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.change-badge,
.evidence-state {
  width: fit-content;
  min-height: 20px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.change-badge.create,
.change-badge.set,
.change-badge.replace {
  background: var(--blue-soft);
  color: var(--blue);
}

.change-badge.set_unknown_before,
.change-badge.hide {
  background: var(--warning-soft);
  color: var(--warning);
}

.change-badge.clear,
.change-badge.remove {
  background: var(--danger-soft);
  color: var(--danger);
}

.change-badge.unchanged {
  background: #edf0ef;
  color: var(--ink-soft);
}

.plain-value {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.value-chips span {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 11px;
}

.structured-items {
  display: grid;
  gap: 8px;
}

.structured-item {
  min-width: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
  border-left: 2px solid var(--line-strong);
  background: var(--surface-muted);
}

.structured-item > strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.object-value {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.object-value > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(76px, 0.45fr) minmax(0, 1fr);
  gap: 8px;
}

.object-value dt {
  color: var(--ink-soft);
  font-size: 10px;
}

.object-value dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.value-note {
  color: var(--ink-soft);
  font-size: 11px;
}

.value-note.warning {
  color: var(--warning);
}

.value-note.danger {
  color: var(--danger);
}

.cell-json {
  max-width: 100%;
  max-height: 180px;
  margin: 0;
  padding: 7px 8px;
  overflow: auto;
  border: 1px solid #e0e5e3;
  background: #f7f9f8;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.evidence-cell {
  gap: 6px;
}

.evidence-state.missing,
.evidence-state.invalid {
  background: var(--danger-soft);
  color: var(--danger);
}

.evidence-entry {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.evidence-entry + .evidence-entry {
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
}

.evidence-entry strong {
  font-size: 11px;
}

.evidence-entry p,
.evidence-entry blockquote {
  margin: 0;
}

.evidence-entry blockquote {
  max-height: 7.2em;
  padding-left: 8px;
  overflow: auto;
  border-left: 2px solid var(--accent);
  color: #33433f;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.evidence-heading {
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.source-conflict {
  padding: 9px 10px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: #71302b;
}

.conflict-values {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 9px;
  align-items: start;
}

.conflict-values > span:nth-child(1),
.conflict-values > span:nth-child(3) {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.conflict-values .plain-value,
.conflict-values .cell-json {
  min-width: 0;
}

.evidence-history {
  min-width: 0;
  margin-top: 5px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.evidence-history summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.evidence-history[open] summary {
  margin-bottom: 8px;
}

.evidence-history .evidence-entry {
  padding: 7px 0;
}

.verification-summary {
  min-height: 32px;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--ink-soft);
  font-size: 11px;
}

.check-list {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-list span {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
}

.issue-list {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 11px;
}

.issue-list.error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.issue-list ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.raw-review-data summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.technical-section {
  color: var(--ink-soft);
}

.technical-identifiers {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(90px, 0.22fr) minmax(0, 1fr);
  gap: 7px 12px;
  align-items: start;
  font-size: 11px;
}

.technical-identifiers span {
  color: var(--ink-soft);
}

.technical-identifiers code {
  min-width: 0;
  color: #34413e;
  font-family: Consolas, "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}

.raw-review-block {
  margin-top: 14px;
}

.raw-review-block h4 {
  margin: 0 0 7px;
  font-size: 11px;
}

.comparison-empty {
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
}

.json-view {
  max-width: 100%;
  max-height: 340px;
  margin: 0;
  padding: 13px 14px;
  overflow: auto;
  border: 1px solid #dce2df;
  border-radius: 4px;
  background: #f7f9f8;
  color: #26332f;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.json-node,
.json-entry {
  min-width: 0;
}

.json-node > summary {
  position: relative;
  display: block;
  min-height: 20px;
  padding-left: 14px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.json-node > summary::-webkit-details-marker {
  display: none;
}

.json-node > summary::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #6e8178;
  transform-origin: 2px 4px;
  transition: transform 100ms ease;
}

.json-node[open] > summary::before {
  transform: rotate(90deg);
}

.json-node-body {
  margin-left: 14px;
}

.json-close {
  display: block;
  min-height: 20px;
  padding-left: 14px;
  color: #52625b;
}

.json-entry {
  display: block;
  min-height: 20px;
  padding-left: 14px;
  white-space: pre-wrap;
}

.json-key,
.json-preview-key {
  color: #1f5f99;
  overflow-wrap: anywhere;
}

.json-punctuation,
.json-bracket,
.json-close,
.json-preview-container,
.json-empty {
  color: #52625b;
}

.json-leaf {
  overflow-wrap: anywhere;
}

.json-string {
  color: #087f5b;
}

.json-number {
  color: #1c00cf;
}

.json-boolean,
.json-null {
  color: #881391;
}

.json-preview {
  margin-left: 4px;
  color: #66766f;
}

.field-source-launcher {
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.field-source-launcher:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.field-source-launcher > span:first-child {
  display: grid;
  gap: 4px;
}

.field-source-launcher strong {
  font-size: 14px;
}

.field-source-launcher small,
.field-source-launcher-count {
  color: var(--ink-soft);
  font-size: 11px;
}

.field-source-launcher-action {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.modal-dialog.field-source-modal-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.field-source-modal-root .modal-backdrop {
  padding: 0;
  place-items: stretch;
  background: var(--surface);
}

.field-source-modal-heading {
  position: relative;
  z-index: 5;
  min-height: 70px;
  margin: 0;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.field-source-modal-heading > div {
  display: grid;
  gap: 2px;
}

.field-source-modal-heading span {
  color: var(--ink-soft);
  font-size: 11px;
}

.field-source-modal-body {
  height: calc(100dvh - 70px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.field-source-modal-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 9px 18px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 11px;
}

.field-source-legend {
  position: relative;
  padding-left: 14px;
}

.field-source-legend::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  transform: translateY(-50%);
}

.field-source-legend-used::before {
  background: #e7f4ea;
  border-color: #9fc9aa;
}

.field-source-legend-supporting::before {
  background: #fff6d9;
  border-color: #d9c47b;
}

.field-source-legend-retained::before {
  background: var(--surface);
}

.field-source-modal-summary strong {
  color: var(--ink);
}

.field-source-tabs {
  position: relative;
  z-index: 4;
  min-height: 48px;
  padding: 7px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.field-source-tab {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.field-source-tab small {
  min-width: 22px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface);
  text-align: center;
}

.field-source-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.field-source-panels,
.field-source-group-panel {
  min-height: 0;
  height: 100%;
}

.field-source-panels {
  overflow: hidden;
}

.field-source-group-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.field-source-group-panel[hidden] {
  display: none;
}

.field-source-group-heading {
  min-height: 48px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.field-source-group-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.field-source-group-heading h4 {
  margin: 0;
  font-size: 14px;
}

.field-source-group-heading code,
.field-source-group-heading > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.field-source-table-scroll,
.unused-source-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--surface-muted);
}

.field-source-table-scroll {
  padding: 12px 12px 28px;
  scroll-padding: 12px 12px 28px;
}

.field-source-audit-table {
  width: 100%;
  min-width: 1400px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.field-source-audit-header,
.field-source-audit-row {
  display: grid;
  grid-template-columns: 220px 240px 220px 320px minmax(400px, 1fr);
}

.field-source-audit-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.field-source-audit-header > span,
.field-source-audit-row > div {
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.field-source-audit-header > span:last-child,
.field-source-audit-row > div:last-child {
  border-right: 0;
}

.field-source-audit-row {
  border-bottom: 1px solid var(--line);
  align-items: stretch;
  font-size: 11px;
}

.field-source-audit-header {
  border-bottom: 1px solid var(--line);
}

.field-source-audit-row:last-child {
  border-bottom: 0;
}

.field-source-audit-row {
  background: var(--surface);
}

.field-source-audit-row:nth-child(even) {
  background: var(--surface-muted);
}

/* 数组对象按索引保持同色，相邻对象使用更明确的白灰交替。 */
.field-source-audit-row.field-source-object-even {
  background: var(--surface);
}

.field-source-audit-row.field-source-object-odd {
  background: color-mix(in srgb, var(--surface-muted) 92%, var(--line));
}

.field-source-path-cell code,
.field-source-origin-path code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-path-cell {
  display: grid;
  align-content: start;
  gap: 4px;
}

.field-source-path-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-path-cell code {
  color: var(--ink-soft);
  font-size: 10px;
}

.field-source-final-value pre,
.field-source-origin-value pre {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1px 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #125f49;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-value-translation {
  overflow: hidden;
  margin-bottom: 2px;
  color: #125f49;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-evidence {
  display: grid;
  align-content: start;
  gap: 5px;
}

.field-source-origin-paths,
.field-source-origin-values {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}

.field-source-origin-values {
  align-self: stretch;
}

.field-source-origin-value {
  min-width: 0;
}

.field-source-empty {
  min-width: 0;
  padding: 1px 0;
  overflow: hidden;
  color: var(--ink-soft);
  line-height: 1.45;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-origin-paths,
.field-source-origin-values,
.field-source-evidence,
.field-source-final-value,
.field-source-meta,
.field-source-path-cell {
  align-items: start;
}

.field-source-origin-path {
  min-height: 0;
  padding: 1px 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  line-height: 1.45;
}

.field-source-meta {
  display: grid;
  align-content: start;
  gap: 0;
  color: var(--ink-soft);
}

.field-source-meta-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-bottom: 5px;
  line-height: 1.45;
}

.field-source-meta-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-processing {
  padding-top: 5px;
  padding-bottom: 0;
  border-top: 1px dashed var(--line);
}

.field-source-meta-label {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.source-type {
  color: var(--blue);
  font-weight: 800;
}

.field-source-note {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 3px 1px 0;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.field-source-note span {
  flex: 0 0 auto;
  margin-right: 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.field-source-note p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-source-copyable {
  cursor: pointer;
}

.field-source-copyable:focus-visible {
  outline: 2px solid rgba(49, 95, 146, 0.34);
  outline-offset: 1px;
}

.field-source-copy-panel {
  position: fixed;
  z-index: 12;
  inset: 50% auto auto 50%;
  width: min(760px, calc(100vw - 48px));
  max-height: min(640px, calc(100dvh - 48px));
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(18, 38, 33, 0.3);
  transform: translate(-50%, -50%);
}

.field-source-copy-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-source-copy-panel textarea {
  width: 100%;
  min-height: 220px;
  max-height: calc(100dvh - 190px);
  padding: 10px;
  resize: vertical;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

:root[data-theme="dark"] .field-source-final-value pre,
:root[data-theme="dark"] .field-source-origin-value pre,
:root[data-theme="dark"] .field-source-value-translation {
  color: #78cbb2;
}

.unused-source-list {
  padding: 12px 16px;
}

.unused-source-row {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.unused-source-row + .unused-source-row {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .field-source-launcher {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .field-source-modal-body {
    height: calc(100dvh - 70px);
  }

  .field-source-modal-summary {
    flex-wrap: wrap;
    gap: 6px 14px;
  }
}

.json-node[open] > summary > .json-preview,
.json-node[open] > summary > .json-collapsed-close {
  display: none;
}

.approval-form {
  display: grid;
  gap: 12px;
}

.approval-intro {
  display: grid;
  gap: 3px;
}

.approval-intro span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.approval-form .primary-button {
  justify-self: start;
}

.release-actions {
  margin-top: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.release-actions label {
  min-width: 190px;
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 11px;
}

.result-band {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  color: #284b70;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.result-band.error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.result-band.warning {
  border-left-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}

.snapshot-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.snapshot-viewer {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.snapshot-viewer[hidden] {
  display: none;
}

.snapshot-heading {
  min-height: 48px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.snapshot-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.snapshot-heading strong,
.snapshot-heading span {
  overflow-wrap: anywhere;
}

.snapshot-heading span {
  color: var(--ink-soft);
  font-size: 10px;
}

.snapshot-viewer pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #2d3936;
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.snapshot-technical {
  padding: 8px 11px;
  border-top: 1px solid var(--line);
}

.snapshot-technical span {
  display: block;
  margin-top: 4px;
}

.revision-form {
  display: grid;
  gap: 14px;
}

.revision-panel,
.secondary-details,
.additional-fields {
  min-width: 0;
}

.revision-panel > summary,
.secondary-details > summary,
.additional-fields > summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.revision-panel > summary {
  font-size: 13px;
}

.revision-panel > .panel-help {
  margin: 8px 0 14px;
}

.additional-fields {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.additional-fields > summary {
  color: var(--blue);
  font-size: 11px;
}

.additional-fields[open] > summary {
  margin-bottom: 9px;
}

.secondary-details[open] > summary {
  margin-bottom: 10px;
}

.revision-form > label,
.return-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #34413e;
  font-size: 12px;
  font-weight: 650;
}

.revision-grid {
  display: grid;
  gap: 7px;
}

.revision-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(120px, 0.45fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: start;
}

.revision-enable {
  min-height: 38px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  cursor: pointer;
}

.revision-enable input {
  width: 16px;
  height: 16px;
  min-height: 0;
}

.revision-row textarea {
  min-height: 38px;
  height: 38px;
}

.return-form {
  margin-top: 18px;
  padding-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(0, 0.5fr);
  gap: 10px;
  align-items: end;
  border-top: 1px dashed var(--line-strong);
}

.history-list {
  display: grid;
  gap: 6px;
}

.history-item {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.history-item:hover,
.history-item.latest {
  border-color: var(--accent);
}

.history-item > span:last-of-type {
  display: flex;
  gap: 5px;
}

.history-item small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.download-button {
  width: fit-content;
  min-height: 38px;
  margin: 5px 0 13px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.download-button:hover {
  background: var(--accent-strong);
}

.dev-tools {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-muted);
}

.dev-tools summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.empty-list {
  min-height: 260px;
  padding: 30px 20px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 14px;
  border-radius: 5px;
  background: #17211f;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .workflow-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .workflow-steps {
    width: 100%;
    min-width: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .metric-grid > div:nth-child(4) {
    border-left: 0;
  }

  .usage-table {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .collection-detail-view .usage-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-detail-view .execution-timing-list {
    grid-template-columns: 1fr;
  }

  .collection-batch-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .collection-batch-item strong {
    grid-column: 2;
    grid-row: 1;
  }

  .gap-list > div {
    grid-template-columns: 1fr;
  }

  .intake-form {
    grid-template-columns: 1fr;
  }

  .reference-grid,
  .reference-form {
    grid-template-columns: 1fr;
  }

  .reference-form + .reference-form {
    margin-top: 18px;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .file-picker {
    grid-row: auto;
  }

  .intake-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: minmax(270px, 1fr) minmax(0, 2fr);
  }

  .queue-record,
  .queue-record.collection-record-collected {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .queue-record.collection-batch-selectable {
    grid-template-columns: 36px minmax(0, 1fr) 190px;
  }

  .queue-collection-selector {
    width: 36px;
  }
}

@media (max-width: 1100px) {
  .comparison-header {
    display: none;
  }

  .comparison-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-cell:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .comparison-cell:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .cell-label {
    display: block;
  }
}

@media (max-width: 700px) {
  .seed-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .seed-toolbar .form-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .seed-card {
    padding: 11px 12px 12px;
    grid-template-columns: 1fr;
  }

  .seed-card-top {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .seed-card-index {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .seed-card-actions {
    padding-left: 0;
    border-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .seed-card-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seed-select {
    justify-content: flex-start;
  }

  .modal-backdrop {
    padding: 10px;
    place-items: end center;
  }

  .modal-dialog {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .runtime-status {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .workflow-bar {
    padding: 13px 16px 15px;
  }

  .view-tabs {
    width: 100%;
  }

  .workflow-steps {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
  }

  .workflow-steps li {
    font-size: 10px;
  }

  .metric-grid,
  .usage-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid > div:nth-child(odd) {
    border-left: 0;
  }

  .tab-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .intake-fields,
  .revision-row,
  .return-form {
    grid-template-columns: 1fr;
  }

  .return-form .inline-result {
    grid-column: 1;
  }

  .content-grid {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .queue-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .queue-list {
    max-height: 360px;
  }

  .queue-record,
  .queue-record.collection-record-collected {
    grid-template-columns: minmax(0, 1fr) 238px;
  }

  .queue-record.collection-batch-selectable {
    grid-template-columns: 38px minmax(0, 1fr) 238px;
  }

  .queue-collection-selector {
    width: 38px;
  }

  .detail-pane {
    min-height: 420px;
    padding: 22px 16px 34px;
  }

  .detail-title-row {
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
    justify-content: space-between;
  }

  .collection-budget {
    grid-template-columns: 1fr;
  }

  .collection-budget span + span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .technical-identifiers,
  .object-value > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-cell + .comparison-cell {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .release-actions,
  .release-actions label,
  .release-actions button,
  .approval-form .primary-button {
    width: 100%;
  }

  .download-button {
    width: 100%;
  }

  .badge-row {
    justify-content: flex-start;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .topbar,
  .toolbar,
  .process-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .contract-label {
    margin-left: 0;
  }

  .pane-heading {
    padding-left: 14px;
    padding-right: 14px;
  }

  .queue-controls {
    grid-template-columns: 1fr;
  }

  .queue-item {
    padding-left: 13px;
    padding-right: 13px;
  }

  .queue-record,
  .queue-record.collection-record-collected {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .queue-record.collection-batch-selectable {
    grid-template-columns: 34px minmax(0, 1fr) 190px;
  }

  .queue-collection-selector {
    width: 34px;
  }

  .queue-record-side {
    padding-right: 7px;
  }

  .collection-status-badge {
    padding-left: 3px;
    padding-right: 3px;
    font-size: 8px;
  }

  .queue-operation-panel {
    grid-template-columns: 1fr;
  }

  .queue-operation-panel .collection-submit-review,
  .queue-operation-panel > :only-child {
    grid-column: 1;
  }

  .seed-card-name-row {
    align-items: flex-start;
  }

  .seed-chip-row {
    gap: 5px;
  }

  .seed-chip {
    max-width: 100%;
  }

  .seed-card-subline {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* 暗色主题只切换语义色，布局和交互状态保持一致，避免主题切换造成页面跳动。 */
:root[data-theme="dark"] {
  --bg: #101615;
  --surface: #18211f;
  --surface-muted: #202b28;
  --ink: #e7efec;
  --ink-soft: #aabbb5;
  --line: #34423e;
  --line-strong: #52635d;
  --accent: #63c2af;
  --accent-strong: #8bd7c7;
  --accent-soft: #1e403a;
  --blue: #8fb8e8;
  --blue-soft: #20384f;
  --warning: #edc36b;
  --warning-soft: #423719;
  --danger: #f08b80;
  --danger-soft: #482624;
  --success: #7ad39a;
  --success-soft: #1e3d2b;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .workspace,
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .detail-pane,
:root[data-theme="dark"] .queue-pane,
:root[data-theme="dark"] .queue-item,
:root[data-theme="dark"] .seed-card,
:root[data-theme="dark"] .modal-dialog,
:root[data-theme="dark"] .report-markdown table,
:root[data-theme="dark"] .collection-budget {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .workflow-bar,
:root[data-theme="dark"] .comparison-header,
:root[data-theme="dark"] .report-markdown th,
:root[data-theme="dark"] .seed-chip,
:root[data-theme="dark"] .seed-check-control,
:root[data-theme="dark"] .batch-preview-list,
:root[data-theme="dark"] .human-report,
:root[data-theme="dark"] .usage-table > div,
:root[data-theme="dark"] .object-value,
:root[data-theme="dark"] .technical-identifiers {
  background: var(--surface-muted);
  color: var(--ink);
}

:root[data-theme="dark"] .queue-item:hover,
:root[data-theme="dark"] .seed-card:hover {
  background: #24312d;
}

:root[data-theme="dark"] .queue-item.selected,
:root[data-theme="dark"] .queue-record:has(.queue-item.selected) {
  background: #1d342e;
  box-shadow: inset 0 0 0 2px var(--accent);
}

:root[data-theme="dark"] .queue-record:has(.queue-item.selected) .queue-item.selected {
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .seed-card.collected-seed {
  background: #1d2624;
}

:root[data-theme="dark"] .seed-card.collected-seed strong,
:root[data-theme="dark"] .seed-card.collected-seed .seed-card-meta,
:root[data-theme="dark"] .seed-card.collected-seed .seed-chip,
:root[data-theme="dark"] .seed-card.collected-seed .seed-card-subline {
  color: #849590;
}

:root[data-theme="dark"] .action-confirm-panel,
:root[data-theme="dark"] .review-guidance {
  background: var(--accent-soft);
  color: var(--ink);
}

:root[data-theme="dark"] .review-guidance.warning,
:root[data-theme="dark"] .seed-action-button-muted {
  background: var(--warning-soft);
  color: var(--warning);
}

:root[data-theme="dark"] .review-guidance.danger,
:root[data-theme="dark"] .danger-panel,
:root[data-theme="dark"] .seed-action-button-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

:root[data-theme="dark"] .review-guidance.success,
:root[data-theme="dark"] .seed-action-button-primary,
:root[data-theme="dark"] .seed-chip.ok {
  background: var(--success-soft);
  color: var(--success);
}

:root[data-theme="dark"] .primary-button {
  background: #2b786b;
  color: #f1fffb;
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .seed-action-button {
  border-color: var(--line-strong);
  background: #25322f;
  color: var(--ink);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line-strong);
  background: #141c1a;
  color: var(--ink);
}

:root[data-theme="dark"] .report-markdown,
:root[data-theme="dark"] .human-report {
  color: var(--ink);
}

:root[data-theme="dark"] .toggle-field,
:root[data-theme="dark"] .task-detail-list,
:root[data-theme="dark"] .confirmation-check {
  background: var(--surface-muted);
}

@media (max-width: 700px) {
  .discovery-form-grid,
  .task-detail-list {
    grid-template-columns: 1fr;
  }

  .seed-batch-actions,
  .queue-heading-actions {
    justify-content: flex-start;
  }

}
/* 城市上下文和阶段列表：认可地点、采集、审核、发布必须在同一城市上下文中查看。 */
.city-context-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 5px 6px 5px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.city-context-control[hidden] {
  display: none !important;
}

.city-context-control select {
  min-width: 132px;
  height: 34px;
  padding: 4px 30px 4px 10px;
  border-color: var(--line-strong);
  background-color: var(--surface);
}

.city-context-control .primary-button {
  min-height: 34px;
  white-space: nowrap;
}

.discovery-kind-tabs {
  margin: 0 0 12px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.discovery-kind-tabs[hidden] {
  display: none !important;
}

.discovery-kind-tabs button {
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.discovery-kind-tabs button.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 1px 4px rgba(12, 31, 26, .08);
}

.approved-seed {
  opacity: .62;
  background: color-mix(in srgb, var(--panel) 82%, var(--muted) 18%);
}

.approved-badge {
  background: var(--muted);
  color: var(--panel);
}

.registry-approval-dialog {
  width: min(680px, calc(100vw - 32px));
}

.manual-venue-search-dialog {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.manual-venue-search-dialog .modal-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.manual-venue-search-dialog .modal-heading > div > span {
  color: var(--ink-soft);
  font-size: 12px;
}

.manual-venue-search-panel {
  display: grid;
  gap: 10px;
}

.manual-venue-search-form {
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.manual-venue-search-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.manual-venue-search-form input {
  width: 100%;
}

.manual-venue-search-hint {
  min-height: 22px;
  padding: 5px 8px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1.5;
}

.manual-venue-search-results {
  max-height: min(58vh, 560px);
  padding: 1px 5px 1px 1px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.manual-venue-search-results .empty-list {
  min-height: 150px;
}

.manual-venue-search-result {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.manual-venue-search-result:hover {
  border-color: var(--line-strong);
  box-shadow: 0 3px 10px rgba(18, 38, 33, .06);
}

.manual-venue-search-result.already-recognized {
  background: var(--surface-muted);
}

.manual-venue-search-result-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.manual-venue-search-result-title,
.manual-venue-search-result-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.manual-venue-search-result-title strong {
  overflow-wrap: anywhere;
}

.manual-venue-search-result-meta span {
  padding-right: 7px;
  color: var(--ink-soft);
  border-right: 1px solid var(--line);
  font-size: 11px;
}

.manual-venue-search-result-meta span:last-child {
  padding-right: 0;
  border-right: 0;
}

.manual-venue-search-result p,
.manual-venue-search-result small {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.manual-venue-search-result small {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.manual-venue-recognized {
  padding: 2px 6px;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.manual-venue-search-more {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.manual-venue-search-more[hidden] {
  display: none;
}

.manual-venue-approval-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 20px;
  overflow: auto;
  background: var(--surface);
}

.manual-venue-approval-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.manual-venue-approval-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.manual-venue-approval-heading h4 {
  margin: 0;
  font-size: 16px;
}

.manual-venue-approval-heading span {
  color: var(--ink-soft);
  line-height: 1.45;
}

.registry-approval-panel {
  display: grid;
  gap: 16px;
}

.registry-identity-editor {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.registry-identity-editor label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.registry-identity-editor input,
.registry-identity-editor textarea {
  width: 100%;
}

.registry-identity-editor textarea {
  min-height: 76px;
  resize: vertical;
}

.registry-identity-editor > small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  line-height: 1.45;
}

@media (max-width: 700px) {
  .manual-venue-search-form,
  .manual-venue-search-result,
  .registry-identity-editor {
    grid-template-columns: 1fr;
  }

  .registry-identity-editor > small {
    grid-column: auto;
  }

  .manual-venue-search-form > button,
  .manual-venue-search-result > button {
    width: 100%;
  }
}

.approval-candidate-summary {
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--accent);
  background: var(--surface-muted);
}

.approval-candidate-summary span,
.similar-venue-item span,
.similar-venue-item small {
  color: var(--ink-soft);
  line-height: 1.45;
}

.similar-venue-item .similar-venue-covered {
  align-self: center;
  color: var(--success);
  font-weight: 700;
  white-space: nowrap;
}

.similar-venue-warning {
  display: grid;
  gap: 8px;
}

.similar-venue-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.similar-venue-title span {
  color: var(--ink-soft);
  font-size: 12px;
}

.similar-venue-item {
  padding: 10px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.similar-venue-item > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.similar-venue-item span,
.similar-venue-item small {
  overflow-wrap: anywhere;
}

.approval-clear-tip {
  padding: 10px 12px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
}

.registry-approval-actions {
  padding-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.candidate-detail-panel {
  display: grid;
  gap: 16px;
}

.candidate-detail-summary {
  padding: 11px 13px;
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--accent);
  background: var(--surface-muted);
}

.candidate-detail-summary span,
.candidate-detail-fields small,
.candidate-detail-source span,
.candidate-detail-source small {
  color: var(--ink-soft);
  line-height: 1.45;
}

.candidate-detail-fields {
  display: grid;
  gap: 10px;
}

.candidate-detail-fields > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.candidate-detail-fields span,
.candidate-detail-source span,
.candidate-detail-source small {
  overflow-wrap: anywhere;
}

.candidate-detail-conflicts {
  padding: 10px 12px;
  background: var(--warning-soft);
  color: var(--warning-strong);
}

.candidate-detail-conflicts ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.candidate-detail-sources {
  display: grid;
  gap: 7px;
}

.candidate-detail-source {
  padding: 9px 10px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.stage-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-soft);
}

.stage-pill {
  max-width: 100%;
  padding: 6px 9px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.review-json-editor {
  width: 100%;
  min-height: 340px;
  max-height: 58vh;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.venue-main-review {
  display: grid;
  gap: 10px;
}

.venue-review-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.venue-review-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.venue-review-group h4 {
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  font-size: 12px;
}

.venue-review-fields {
  margin: 0;
  padding: 4px 12px 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.venue-review-fields > div {
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.venue-review-fields > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.venue-review-fields > .venue-review-field-wide {
  grid-column: 1 / -1;
}

.venue-review-fields > .venue-review-field-wide:nth-last-child(2) {
  border-bottom: 1px solid var(--line);
}

.venue-review-fields dt {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 10px;
}

.venue-review-fields dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.venue-review-fields dd.venue-review-missing {
  color: var(--ink-soft);
}

.review-collection-section {
  display: grid;
  gap: 10px;
}

.review-collection-list {
  display: grid;
  gap: 8px;
}

.review-collection-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.review-collection-card-heading {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  font-size: 12px;
}

.review-collection-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 4px 12px 8px;
  column-gap: 18px;
}

.review-collection-field {
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.review-collection-field dt {
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.review-collection-field dd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.review-collection-field-compact dd {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-collection-field-compact dd > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-collection-translation {
  color: var(--ink-soft);
  font-size: 11px;
}

.review-collection-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}

.review-collection-value code {
  color: var(--ink);
  font-size: 12px;
}

.review-collection-facilities .review-collection-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
}

.review-collection-facilities .review-collection-field {
  border-bottom: 0;
}

.review-collection-facilities .review-collection-field-facility_code dd,
.review-collection-tag_definitions .review-collection-field-name dd,
.review-collection-content_sections .review-collection-field-section_code dd {
  color: var(--success);
  font-weight: 650;
}

.review-collection-facilities .review-collection-field-facility_code .review-collection-translation,
.review-collection-tag_definitions .review-collection-field-name .review-collection-translation,
.review-collection-content_sections .review-collection-field-section_code .review-collection-translation {
  color: inherit;
}

.review-collection-tag_definitions .review-collection-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.8fr);
}

.review-collection-tag_definitions .review-collection-field-description {
  grid-column: 1 / -1;
}

.review-collection-content_sections .review-collection-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-collection-public_channels .review-collection-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-collection-content_sections .review-collection-field-body_markdown,
.review-collection-public_channels .review-collection-field-channel_value {
  grid-column: 1 / -1;
}

.review-collection-public_channels .review-collection-field-label dd {
  color: var(--success);
  font-weight: 650;
}

.review-quality-section {
  display: grid;
  gap: 10px;
}

.review-quality-section .review-guidance {
  margin-top: 0;
}

.review-quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.review-quality-group {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: var(--surface-muted);
}

.review-quality-group + .review-quality-group {
  border-left: 1px solid var(--line);
}

.review-quality-group > strong {
  font-size: 12px;
}

.review-quality-group > span,
.review-quality-group li {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.review-quality-group ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 700px) {
  .city-context-control {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .city-context-control select {
    flex: 1;
    min-width: 0;
  }

  .similar-venue-item {
    grid-template-columns: 1fr;
  }

  .review-quality-grid {
    grid-template-columns: 1fr;
  }

  .venue-review-groups,
  .venue-review-fields {
    grid-template-columns: 1fr;
  }

  .collection-detail-view .venue-review-groups,
  .collection-detail-view .venue-review-fields,
  .collection-detail-view .review-collection-fields {
    grid-template-columns: 1fr;
  }

  .venue-review-fields > div,
  .venue-review-fields > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .venue-review-fields > div:last-child {
    border-bottom: 0;
  }

  .review-collection-fields {
    grid-template-columns: 1fr;
  }

  .review-quality-group + .review-quality-group {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
