:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #ded8cf;
  --border: #ded8cf;
  --text: #1f2933;
  --accent: #25635b;
  --green: var(--accent);
  --accent-2: #8f5b2f;
  --danger: #b42318;
  --soft: #eef3f1;
  --shadow: 0 14px 40px rgba(31, 41, 51, 0.08);
}

/* 三才五格严格姓名池：组合依据可解释化 */
.name-pool-metrics.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.name-pool-surname-basis,
.name-pool-formula-basis,
.name-pool-explanation-groups {
  margin-top: 18px;
  border: 1px solid #e6dcc8;
  border-radius: 16px;
  background: #fffdf8;
  padding: 16px;
}

.name-pool-surname-basis > strong,
.name-pool-explanation-groups > header small,
.name-pool-formula-basis header small {
  color: #8b6a34;
  font-size: 12px;
  letter-spacing: .08em;
}

.name-pool-surname-basis > div,
.name-pool-formula-symbols,
.name-pool-formula-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.name-pool-surname-basis > div > span,
.name-pool-formula-symbols > span,
.name-pool-formula-grid > span {
  display: grid;
  gap: 3px;
  min-width: 132px;
  border-radius: 12px;
  background: #f7f1e6;
  padding: 10px 12px;
}

.name-pool-surname-basis b {
  font-size: 24px;
}

.name-pool-surname-basis em,
.name-pool-surname-basis small {
  font-style: normal;
  color: #655d50;
}

.name-pool-formula-basis header,
.name-pool-explanation-groups > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.name-pool-formula-basis header strong,
.name-pool-explanation-groups h3 {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.name-pool-formula-basis header p,
.name-pool-explanation-groups header p {
  margin: 0;
  color: #6c655b;
  max-width: 620px;
}

.name-pool-formula-grid code,
.name-pool-grid-proof code {
  color: #7b3f22;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}

.name-pool-group-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.name-pool-group-card {
  border: 1px solid #e4d7c1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.name-pool-group-card > summary {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1.5fr) minmax(190px, 1fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  padding: 14px;
  list-style: none;
}

.name-pool-group-card > summary::-webkit-details-marker {
  display: none;
}

.name-pool-group-card[open] > summary {
  background: #f8f1e4;
  border-bottom: 1px solid #e4d7c1;
}

.name-pool-group-number {
  color: #8b5a24;
  font-weight: 800;
}

.name-pool-group-structure,
.name-pool-group-result {
  display: grid;
  gap: 4px;
}

.name-pool-group-structure small,
.name-pool-group-result em,
.name-pool-group-toggle {
  color: #6e665b;
  font-style: normal;
  font-size: 12px;
}

.name-pool-group-result b {
  color: #376c45;
}

.name-pool-group-body {
  padding: 16px;
}

.name-pool-grid-proof {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.name-pool-grid-proof article {
  border: 1px solid #dce7dc;
  border-radius: 12px;
  background: #f7fbf6;
  padding: 12px;
}

.name-pool-grid-proof article header,
.name-pool-grid-proof article p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.name-pool-grid-proof article header b {
  color: #2d7542;
}

.name-pool-grid-proof article small {
  color: #686157;
}

.name-pool-sancai-proof,
.name-pool-group-count-proof {
  margin-top: 12px;
  border-radius: 12px;
  background: #f5efe4;
  padding: 12px 14px;
}

.name-pool-sancai-proof > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.name-pool-sancai-proof strong {
  font-size: 20px;
}

.name-pool-sancai-proof b {
  color: #2d7542;
}

.name-pool-sancai-proof p,
.name-pool-sancai-proof span,
.name-pool-group-count-proof span,
.name-pool-group-count-proof small {
  display: block;
  margin: 6px 0 0;
  color: #5f584f;
}

.name-pool-group-character-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.name-pool-group-character-columns > :only-child {
  grid-column: 1 / -1;
}

.name-pool-character-list {
  border: 1px solid #e6dfd3;
  border-radius: 12px;
  padding: 12px;
}

.name-pool-character-list > summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.name-pool-character-list summary span {
  display: grid;
  gap: 2px;
}

.name-pool-character-list summary em,
.name-pool-character-list summary small {
  color: #71685d;
  font-style: normal;
  font-size: 12px;
}

.name-pool-character-search {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.name-pool-character-search input {
  width: 120px;
}

.name-pool-character-search span {
  color: #746d63;
  font-size: 12px;
}

.name-pool-character-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.name-pool-character-chips > span {
  display: grid;
  min-width: 48px;
  border-radius: 9px;
  background: #f4f0e8;
  padding: 7px 8px;
  text-align: center;
}

.name-pool-character-chips > span[hidden],
.name-pool-character-empty[hidden] {
  display: none !important;
}

.name-pool-character-chips b {
  font-size: 18px;
}

.name-pool-character-chips small {
  color: #756d63;
}

.name-pool-version-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.name-pool-version-list > article > div:first-child {
  display: grid;
  gap: 3px;
}

.name-pool-history-explanation {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.name-pool-history-explanation > summary {
  cursor: pointer;
  font-weight: 700;
}

.strict-stroke-pair-filter {
  border-color: #d9c69f;
  background: #fffaf0;
}

.strict-stroke-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.strict-stroke-pair-row label {
  display: grid;
  gap: 6px;
}

.strict-name-proof-summary {
  display: grid;
  gap: 5px;
  border: 1px solid #dfd1b8;
  border-radius: 7px;
  background: #fffaf0;
  color: #5e4b31;
  padding: 7px 8px;
  text-align: left;
}

.strict-name-proof-tags,
.strict-name-state-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.strict-name-proof-tags span {
  border-radius: 999px;
  background: #eee5d4;
  color: #6d542e;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}

.strict-name-proof-summary small {
  display: block;
  min-width: 0;
  color: #625744;
  font-size: 10px;
  line-height: 1.35;
  white-space: normal;
}

.strict-name-proof-summary small b {
  margin-right: 4px;
  color: #7a5b27;
}

.strict-name-state-badges {
  justify-content: center;
}

.strict-name-risk {
  border-radius: 999px;
  background: #fff0d8;
  color: #905b18;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}

.strict-name-proof-elements {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.strict-name-proof-modal {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.strict-name-proof-modal .name-detail-head > div:first-child {
  min-width: 0;
}

.strict-name-proof-elements span {
  display: grid;
  gap: 3px;
  border-radius: 10px;
  background: #f5efe4;
  padding: 10px 14px;
}

.strict-name-proof-elements b {
  font-size: 22px;
}

@media (max-width: 980px) {
  .name-pool-metrics.five,
  .name-pool-grid-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .name-pool-group-card > summary {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .name-pool-group-result,
  .name-pool-group-toggle {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .name-pool-metrics.five,
  .name-pool-grid-proof,
  .name-pool-group-character-columns,
  .strict-stroke-pair-row {
    grid-template-columns: 1fr;
  }

  .name-pool-formula-basis header,
  .name-pool-explanation-groups > header,
  .name-pool-character-search {
    display: grid;
  }

  .name-pool-group-card > summary {
    grid-template-columns: 1fr;
  }

  .name-pool-group-result,
  .name-pool-group-toggle {
    grid-column: 1;
  }

  .name-pool-version-list > article {
    grid-template-columns: 1fr;
  }

  .strict-name-proof-backdrop {
    padding: 12px;
  }

  .strict-name-proof-modal .name-detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 14px;
  }

  .strict-name-proof-modal .name-detail-head h2 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .strict-name-proof-elements {
    flex-wrap: wrap;
  }
}

/* 规则管理：AI指令与本地算法共用的一屏工作台 */
.managed-rule-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.rule-category-switch{display:flex;gap:8px}.managed-rule-workbench{display:grid;grid-template-columns:300px minmax(0,1fr);gap:12px;height:calc(100vh - 245px);min-height:560px}.managed-rule-list,.managed-rule-editor{border:1px solid var(--border);background:#fff;border-radius:12px;overflow:auto}.managed-rule-list{padding:8px}.managed-rule-list-item{width:100%;display:grid;grid-template-columns:1fr auto;text-align:left;gap:3px 8px;padding:11px 12px;margin:0 0 6px;background:#f7faf8;color:var(--text);border:1px solid #dce8e2}.managed-rule-list-item span{grid-column:1/-1;color:#718078;font-size:12px}.managed-rule-list-item strong{font-size:14px}.managed-rule-list-item small{font-size:11px;color:#75827c}.managed-rule-list-item.active{background:#eaf7f1;border-color:#237266;box-shadow:inset 3px 0 #237266}.managed-rule-editor{padding:18px 20px}.managed-rule-head{display:flex;justify-content:space-between;gap:20px;padding-bottom:14px;border-bottom:1px solid var(--border)}.managed-rule-head span{font-size:12px;color:#a2712e}.managed-rule-head h2{margin:4px 0 6px}.managed-rule-head p{margin:0;color:var(--muted)}.rule-version-badge{white-space:nowrap;align-self:flex-start;padding:7px 12px;border-radius:999px;background:#eef7f3;color:#256b60}.managed-rule-fields{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:12px;margin:18px 0}.managed-rule-text{grid-column:1/-1}.managed-rule-text textarea{min-height:230px;line-height:1.7}.managed-rule-number small{display:block;margin-top:5px;color:#7a857f}.managed-rule-locked{padding:12px 14px;border-radius:9px;background:#f8f3e9;color:#765727}.managed-rule-savebar{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:9px;margin-top:14px}.managed-rule-impact{margin:10px 0;color:#97632b;font-size:13px}.managed-rule-history{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.managed-rule-history>div{display:grid;grid-template-columns:55px 1fr auto;gap:10px;padding:8px 0;border-bottom:1px solid #edf0ee}.managed-rule-history time{color:#7a857f;font-size:12px}@media(max-width:1000px){.managed-rule-workbench{grid-template-columns:230px minmax(0,1fr)}.managed-rule-fields{grid-template-columns:repeat(2,minmax(140px,1fr))}}@media(max-width:720px){.managed-rule-workbench{display:block;height:auto}.managed-rule-list{max-height:240px;margin-bottom:10px}.managed-rule-fields{grid-template-columns:1fr}.managed-rule-savebar{grid-template-columns:1fr}.managed-rule-toolbar{align-items:flex-start}.rule-category-switch{flex-wrap:wrap}}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, color 0.18s ease;
}

button:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 6px 16px rgba(37, 99, 91, 0.16);
}

button:active:not(:disabled),
button.button-clicked:not(:disabled) {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 0 0 3px rgba(37, 99, 91, 0.16);
}

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

button.warning {
  background: var(--danger);
  border-color: var(--danger);
}

button.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

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

.pdf-generate-button.loading {
  background: #1a1a2e;
  border-color: #1a1a2e;
  opacity: 1;
}

.mini-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

.report-actions {
  align-items: center;
  flex-wrap: wrap;
}

.report-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 6px;
  font-weight: 700;
}

.report-status.working {
  background: #fff7e6;
  color: #8b6914;
  border: 1px solid #ead7a8;
}

.report-status.done {
  background: #eef8f2;
  color: #2d6a4f;
  border: 1px solid #b8d8c5;
}

.report-selection-summary {
  margin-top: 8px;
}

.delivery-name-selection-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin: 8px 0 12px;
  padding: 12px;
  border: 2px solid #d9b96f;
  border-radius: 10px;
  background: #fffaf0;
}

.delivery-name-selection-toolbar.ready {
  border-color: #69ad90;
  background: #eef9f3;
}

.delivery-name-selection-toolbar > div:first-child strong,
.delivery-name-selection-toolbar > div:first-child span,
.delivery-name-selection-count strong,
.delivery-name-selection-count span {
  display: block;
}

.delivery-name-selection-toolbar > div:first-child strong {
  color: #255f4e;
  font-size: 15px;
}

.delivery-name-selection-toolbar > div:first-child span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-name-selection-count {
  min-width: 74px;
  text-align: center;
}

.delivery-name-selection-count strong {
  color: #256b55;
  font-size: 22px;
}

.delivery-name-selection-count span {
  color: var(--muted);
  font-size: 11px;
}

.external-candidate-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(520px, 1.7fr);
  align-items: center;
  gap: 18px;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid #b8d8c8;
  border-radius: 9px;
  background: #f3faf6;
}

.external-candidate-copy strong,
.external-candidate-copy span {
  display: block;
}

.external-candidate-copy strong {
  color: #235f4d;
  font-size: 15px;
}

.external-candidate-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.external-candidate-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: flex-end;
  gap: 8px;
}

.external-candidate-fields label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.external-candidate-fields textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  line-height: 1.5;
}

.external-candidate-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 12px;
}

.external-result-block {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.external-result-block strong,
.external-result-block span {
  display: block;
}

.external-result-block strong {
  font-size: 12px;
}

.external-result-block span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.external-result-block.added {
  border-color: #9bd2b8;
  background: #effaf4;
}

.external-result-block.duplicate,
.external-result-block.repeated {
  border-color: #e5cf9c;
  background: #fff9eb;
}

.external-result-block.invalid {
  border-color: #e5b5ae;
  background: #fff3f1;
}

.candidate-source-label {
  display: inline-block;
  max-width: 220px;
  color: #315f50;
  font-size: 12px;
  line-height: 1.45;
}

.homophone-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  border: 1px solid #b8d8c8;
  border-radius: 9px;
  background: #eef8f3;
  padding: 10px 12px;
}

.homophone-batch-toolbar.working {
  border-color: #dec58f;
  background: #fff8e9;
}

.homophone-batch-copy strong,
.homophone-batch-copy span {
  display: block;
}

.homophone-batch-copy strong {
  color: #235f4d;
  font-size: 14px;
}

.homophone-batch-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.homophone-batch-actions {
  flex: none;
  justify-content: flex-end;
  gap: 7px;
}

.homophone-batch-actions button {
  white-space: nowrap;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.maintenance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.maintenance-toolbar {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
}

.all-char-toolbar {
  grid-template-columns: 180px minmax(520px, 1.4fr) minmax(260px, 0.8fr) auto;
}

.all-char-filters {
  min-width: 500px;
}

.filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-field {
  max-width: 140px;
}

.maintenance-add {
  align-items: center;
  max-width: 560px;
}

.maintenance-add input {
  max-width: 160px;
}

.bulk-add-box {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf7;
}

.bulk-add-box textarea {
  min-height: 86px;
}

.maintenance-table input {
  min-width: 72px;
}

.maintenance-table td:last-child {
  min-width: 330px;
}

.maintenance-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.all-char-table th:first-child,
.all-char-table td:first-child {
  width: 64px;
  text-align: center;
}

.all-char-table td:last-child {
  min-width: 120px;
}

.pinyin-text {
  display: block;
  font-weight: 800;
  color: #1a5276;
}

.pinyin-plain {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.pinyin-source {
  display: inline-block;
  margin-top: 4px;
  border-radius: 999px;
  background: #edf6fb;
  color: #52616c;
  padding: 1px 7px;
  font-size: 11px;
}

.table-check {
  width: auto;
  min-width: 0;
}

.all-char-glyph {
  font-size: 24px;
  font-weight: 800;
  font-family: "Songti SC", "Noto Serif SC", serif;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f6f1;
  padding: 2px 9px;
  color: #38424a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-tag.unassigned {
  border-color: #d8b15f;
  background: #fff7df;
  color: #8b6914;
}

.mini-tag.danger {
  border-color: #e6b7af;
  background: #fff0ee;
  color: #c0392b;
}

.element-金 {
  border-color: #ead39a;
  background: #fff6db;
  color: #9b7410;
}

.element-木 {
  border-color: #b8d8c8;
  background: #edf8f1;
  color: #2d6a4f;
}

.element-水 {
  border-color: #b7d2e2;
  background: #edf6fb;
  color: #1a5276;
}

.element-火 {
  border-color: #e6b7af;
  background: #fff0ee;
  color: #c0392b;
}

.element-土 {
  border-color: #dbc69e;
  background: #fbf3e6;
  color: #8b6914;
}

.batch-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 220px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.batch-actions {
  justify-content: flex-end;
}

.assignment-modal {
  width: min(960px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid #cddbd6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.22);
  padding: 24px;
}

.assignment-body {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.risk-check {
  align-self: end;
  min-height: 41px;
}

.deleted-row td {
  background: #f8f1ef;
  color: #8a4b43;
}

.deleted-row input {
  color: #8a4b43;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #1f2933;
  color: #fff;
  padding: 22px;
  overflow: auto;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
}

.user-line {
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 18px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  text-align: left;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.nav button.active {
  background: #fff;
  color: var(--ink);
}

.main {
  padding: 26px;
  overflow: auto;
  min-width: 0;
  height: 100vh;
}

.main.screen-main {
  overflow: hidden;
  box-sizing: border-box;
  padding: 12px 24px;
}

.main.with-project-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.project-context-slot {
  flex: none;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.project-context-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.main.screen-main.with-project-context .project-context-content {
  overflow: hidden;
}

.project-context-content > .screen-page {
  height: 100%;
}

/* 从交付管理返回补资料时，提示栏占用独立行，工作台使用剩余高度。 */
.project-context-content.has-delivery-return {
  display: flex;
  flex-direction: column;
}

.project-context-content.has-delivery-return > .delivery-return-banner,
.project-context-content.has-delivery-return > .notice,
.project-context-content.has-delivery-return > .name-pool-identity {
  flex: 0 0 auto;
}

.project-context-content.has-delivery-return > :last-child {
  min-height: 0;
}

.project-context-content.has-delivery-return > .screen-page {
  height: auto;
}

.screen-page {
  height: 100%;
  min-height: 0;
  display: grid;
  gap: 8px;
}

.global-search-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.global-search-mode-tabs,
.global-name-compare-tabs {
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
}

.global-search-mode-tabs button,
.global-name-compare-tabs button {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.global-search-mode-tabs button.active,
.global-name-compare-tabs button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.global-name-compare-tabs em {
  margin-left: 3px;
  font-style: normal;
  opacity: .76;
}

.global-character-workspace,
.global-name-compare-workspace {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.global-character-workspace { grid-template-rows: auto minmax(0, 1fr); }
.global-name-compare-workspace { grid-template-rows: auto minmax(0, 1fr); }

.global-search-toolbar {
  display: grid;
  grid-template-columns: 172px auto auto minmax(260px, 1fr);
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
}

.global-search-toolbar .field { margin: 0; }
.global-search-toolbar .field label { font-size: 12px; }
.global-search-toolbar button { min-height: 34px; padding: 6px 11px; white-space: nowrap; }
.global-search-hint { margin: 0 0 7px; line-height: 1.45; font-size: 12px; }

.global-pinyin-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
}

.global-pinyin-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 245px) minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.global-pinyin-toolbar .field { margin: 0; }
.global-pinyin-toolbar .field label { font-size: 12px; }
.global-pinyin-toolbar button { min-height: 34px; padding: 6px 10px; white-space: nowrap; }

.global-pinyin-filters {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
}

.global-pinyin-filters > span { margin-right: 1px; font-size: 12px; }
.global-pinyin-filter { min-width: 34px; }
.global-pinyin-filter.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.global-pinyin-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.global-pinyin-result-head > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 10px;
}

.global-pinyin-result-head strong { color: var(--ink); font-size: 15px; }
.global-pinyin-result-head span { color: var(--muted); font-size: 12px; }

.global-pinyin-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  align-content: stretch;
  gap: 6px;
}

.global-pinyin-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid #c7e4d9;
  border-radius: 5px;
  background: #f6fcf8;
  box-shadow: none;
  color: var(--ink);
}

.global-pinyin-card:hover,
.global-pinyin-card:focus-visible {
  border-color: #247364;
  background: #ecf8f2;
  transform: none;
}

.global-pinyin-card strong { font-size: 18px; line-height: 1.05; }
.global-pinyin-card span,
.global-pinyin-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-pinyin-card small { color: #5d746d; font-size: 9px; }
.pinyin-empty { grid-column: 1 / -1; grid-row: 1 / -1; }

.global-name-compare-form {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.global-name-compare-form-head {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(320px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.global-name-compare-form .record-picker,
.global-name-compare-form .field { margin: 0; }

.global-name-compare-form .field label,
.global-name-compare-form .record-picker label { font-size: 12px; }

.global-name-rule-card {
  min-width: 0;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid #d7e6df;
  border-left: 3px solid var(--primary);
  border-radius: 5px;
  background: #f8fbfa;
}

.global-name-rule-card span,
.global-name-rule-card strong,
.global-name-rule-card small { display: block; }
.global-name-rule-card span { color: var(--muted); font-size: 11px; }
.global-name-rule-card strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.global-name-rule-card small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.global-name-compare-actions {
  display: flex;
  gap: 6px;
  align-items: end;
  white-space: nowrap;
}

.global-name-compare-actions button { min-height: 32px; padding: 6px 10px; font-size: 12px; }

.global-name-compare-input textarea {
  min-height: 50px;
  max-height: 62px;
  resize: none;
  line-height: 1.45;
}

.global-name-compare-results {
  min-height: 0;
  display: block;
  overflow: auto;
  padding: 11px 12px;
}

.global-name-compare-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 7px;
}
.global-name-compare-result-head h2 { margin: 0; font-size: 17px; }
.global-name-compare-result-head p { margin: 3px 0 0; font-size: 11px; line-height: 1.4; }

.global-name-compare-stat {
  min-width: 90px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfaf8;
  text-align: right;
}
.global-name-compare-stat strong,
.global-name-compare-stat span { display: block; }
.global-name-compare-stat strong { color: var(--ink); font-size: 17px; }
.global-name-compare-stat span { color: var(--muted); font-size: 11px; }

.global-name-compare-result-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 7px;
  align-content: start;
}

.global-name-compare-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

.global-name-compare-summary span {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfaf8;
}

.global-name-compare-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: max-content;
  gap: 9px;
  align-content: start;
  overflow: visible;
  padding: 1px 3px 2px 1px;
}

.global-name-compare-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
  align-content: start;
  padding: 7px 9px;
  border: 1px solid #d8e6df;
  border-radius: 8px;
  background: #fbfffc;
}

.global-name-compare-card.category-matched { border-color: #75b79a; background: #f0fbf5; }
.global-name-compare-card.category-partial { border-color: #dfc37e; background: #fffaf0; }
.global-name-compare-card.category-none { border-color: #e8b9b1; background: #fff9f7; }
.global-name-compare-card.category-unknown { border-color: #e3cf9a; background: #fffdf4; }

.global-name-compare-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.global-name-compare-card-head > strong {
  overflow: hidden;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-name-compare-card-head .mini-tag { padding: 3px 7px; font-size: 11px; white-space: nowrap; }

.global-name-compare-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.global-name-compare-pair > div {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(91, 118, 107, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
}
.global-name-compare-pair > div.is-hit {
  border-color: rgba(32, 133, 98, .28);
  background: rgba(230, 247, 239, .8);
}
.global-name-compare-pair > div.is-miss {
  border-color: rgba(193, 101, 86, .2);
  background: rgba(255, 248, 246, .76);
}
.global-name-compare-pair b,
.global-name-compare-pair span,
.global-name-compare-pair em { display: block; }
.global-name-compare-pair b { color: var(--ink); font-size: 20px; line-height: 1.05; }
.global-name-compare-pair span,
.global-name-compare-pair em { overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.global-name-compare-pair em { margin-top: 2px; color: var(--accent); }
.global-name-compare-pair > i { color: var(--primary); font-size: 15px; font-style: normal; white-space: nowrap; }

.global-name-compare-card-foot {
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.global-name-compare-card-foot span,
.global-name-compare-card-foot small { display: block; overflow-wrap: anywhere; }
.global-name-compare-card-foot span { color: var(--ink); font-size: 11px; }
.global-name-compare-card-foot small { min-width: 0; flex: 1 1 160px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.global-name-compare-card-foot .row { flex: 0 0 auto; gap: 4px; }
.global-name-compare-card-foot button { min-height: 25px; padding: 3px 7px; font-size: 10px; }

.global-name-compare-grid > .profile-empty { grid-column: 1 / -1; }

.global-name-compare-result-body .bottom-actions {
  min-height: 31px;
  gap: 6px;
  padding-top: 4px;
}

.global-name-compare-result-body .bottom-actions button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.global-name-compare-empty {
  display: grid;
  place-content: center;
  min-height: 0;
  text-align: center;
  color: var(--muted);
}
.global-name-compare-empty strong { color: var(--ink); font-size: 18px; }
.global-name-compare-empty p { max-width: 480px; margin: 7px 0 0; font-size: 13px; line-height: 1.55; }

.global-search-empty {
  display: grid;
  place-content: center;
  min-height: 0;
  text-align: center;
  color: var(--muted);
}

.global-search-empty strong { color: var(--ink); font-size: 18px; }
.global-search-empty p { margin: 7px 0 0; font-size: 13px; }

.global-profile-layout {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.global-character-hero {
  display: grid;
  grid-template-columns: 76px minmax(260px, 1fr) minmax(420px, .9fr);
  gap: 13px;
  align-items: center;
  padding: 11px 14px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, #f8fbfa, #fffdf9);
}

.global-character-glyph {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid #bdd7cb;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 47px;
  line-height: 1;
}

.global-character-summary { min-width: 0; }
.global-character-summary .tag-list { margin-bottom: 6px; }
.global-character-summary h2 { margin: 0 0 3px; font-size: 20px; }
.global-character-summary p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.global-fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.global-fact-strip > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.82);
}

.global-fact-strip strong,
.global-fact-strip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-fact-strip strong { color: var(--ink); font-size: 15px; }
.global-fact-strip span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.global-profile-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
}

.global-profile-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 11px 12px;
}

.global-profile-card h2 { font-size: 16px; }
.global-profile-card .compact-page-head p { font-size: 11px; line-height: 1.35; }
.global-profile-basics-card { overflow-y: auto; overscroll-behavior: contain; }

.profile-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 23px;
}

.profile-line > span { color: var(--muted); font-size: 12px; }
.profile-line > strong { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.35; }
.profile-line .tag-list { gap: 4px; }
.profile-line .mini-tag { min-height: 20px; padding: 1px 7px; font-size: 11px; }

.global-zodiac-summary-line { align-items: start; }
.global-zodiac-summary { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.global-zodiac-summary b,
.global-zodiac-summary em,
.global-zodiac-summary strong {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}
.global-zodiac-summary b.keep { border: 1px solid #abd5c4; background: #edf8f3; color: #276d5b; }
.global-zodiac-summary b.avoid { border: 1px solid #e5b8ad; background: #fff3f0; color: #a34a3d; }
.global-zodiac-summary em { border: 1px solid #deddd6; background: #f7f7f4; color: var(--muted); }
.global-zodiac-summary strong { border: 1px solid #e4bd77; background: #fff7e6; color: #8b611d; font-weight: 700; }

.global-zodiac-profile {
  min-width: 0;
  border: 1px solid #d8e2dd;
  border-radius: 7px;
  background: #fbfdfc;
}
.global-zodiac-profile > summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 5px 8px;
  color: #2b685a;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 800;
}
.global-zodiac-profile > summary::-webkit-details-marker,
.global-zodiac-match > summary::-webkit-details-marker { display: none; }
.global-zodiac-profile > summary::after { content: "展开"; margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 500; }
.global-zodiac-profile[open] > summary::after { content: "收起"; }
.global-zodiac-match-list {
  max-height: 270px;
  overflow-y: auto;
  display: grid;
  gap: 5px;
  padding: 0 7px 7px;
}
.global-zodiac-match { min-width: 0; border: 1px solid #dce4e0; border-radius: 6px; background: #fff; }
.global-zodiac-match.avoid { border-color: #ead0ca; background: #fffafa; }
.global-zodiac-match > summary {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px 7px;
  cursor: pointer;
  list-style: none;
}
.global-zodiac-match > summary span { padding: 1px 5px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.global-zodiac-match > summary span.keep { background: #e7f5ef; color: #276d5b; }
.global-zodiac-match > summary span.avoid { background: #fdeae6; color: #a34a3d; }
.global-zodiac-match > summary strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-zodiac-match > summary em { color: var(--muted); font-size: 9px; font-style: normal; white-space: nowrap; }
.global-zodiac-match > div { display: grid; gap: 6px; padding: 7px 8px 8px; border-top: 1px solid #e6e9e6; }
.global-zodiac-match p {
  margin: 0;
  color: #4c5a55;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-line;
}
.global-zodiac-match dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.global-zodiac-match dl > div { min-width: 0; display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 5px; }
.global-zodiac-match dt { color: var(--muted); font-size: 9px; }
.global-zodiac-match dd { margin: 0; color: var(--ink); font-size: 9px; line-height: 1.4; }
.global-zodiac-match small { padding: 5px 6px; border-radius: 5px; background: #fff8e9; color: #7f642e; font-size: 9px; line-height: 1.45; }

.mini-tag.status-ok {
  border-color: #b8d8c8;
  background: #edf8f1;
  color: #2d6a4f;
}

.global-style-label-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.global-style-label {
  min-width: 0;
  border: 1px solid #d9e6e0;
  border-radius: 5px;
  background: #fbfdfc;
  padding: 5px 7px;
}

.global-style-label strong,
.global-style-label span,
.global-style-label em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-style-label strong { color: var(--ink); font-size: 12px; }
.global-style-label span { color: var(--primary); font-size: 11px; margin-top: 1px; }
.global-style-label em { color: var(--muted); font-style: normal; font-size: 10px; margin-top: 2px; }

.profile-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.profile-reason {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-sample-list { display: flex; flex-wrap: wrap; gap: 4px; }
.profile-sample-list span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid #eee2df; border-radius: 4px; background: #fff9f8; padding: 2px 5px; color: #8a4b43; font-size: 11px; }
.global-profile-admin-card button { justify-self: start; font-size: 12px; padding: 6px 9px; }

.compact-page-head {
  margin-bottom: 0;
}

.compact-page-head h1 {
  font-size: 22px;
}

.compact-page-head h2 {
  margin-bottom: 4px;
}

.compact-page-head p {
  margin: 4px 0 0;
}

.compact-work-panel {
  padding: 10px;
  box-shadow: none;
}

.screen-main-grid {
  min-height: 0;
}

.screen-result-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
}

.screen-result-panel:has(.role-tabs),
.screen-result-panel:has(.wuxing-order-tabs) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.seasonal-name-result-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.seasonal-load-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e2bb71;
  border-radius: 8px;
  background: #fff8e8;
  color: #6f4d13;
}

.seasonal-load-warning > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seasonal-load-warning span {
  color: #7b6743;
}

.seasonal-load-warning button {
  white-space: nowrap;
}

.screen-list-area {
  min-height: 0;
  overflow: hidden;
  padding-bottom: 2px;
  box-sizing: border-box;
}

.fixed-bottom-actions {
  margin-top: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 7px;
}

.record-picker {
  max-width: 420px;
}

.compact-controls {
  max-width: 980px;
}

.field label {
  font-weight: 600;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inline-select select {
  min-width: 92px;
  padding: 6px 26px 6px 9px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(31, 41, 51, 0.32);
  padding: 24px;
}

.center-modal {
  width: min(460px, 100%);
  border: 1px solid #cddbd6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.22);
  padding: 28px;
  text-align: center;
}

.modal-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e4f3ed;
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.center-modal p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-detail {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px 12px;
  color: #62411e;
  text-align: left;
  white-space: pre-line;
}

.modal-actions {
  justify-content: center;
  margin-top: 18px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.check input {
  width: auto;
}

.mini-count {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 600;
}

.element-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.element-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 96px;
  min-height: 42px;
  border-radius: 8px;
  border: 2px solid currentColor;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.element-check input {
  position: absolute;
  opacity: 0;
}

.element-check .label {
  font-size: 17px;
}

.element-check .mark {
  display: none;
  font-size: 16px;
  line-height: 1;
}

.element-check:has(input:checked) {
  color: #fff;
  box-shadow: 0 0 0 3px rgba(31, 41, 51, 0.16);
  transform: translateY(-1px);
}

.element-check:has(input:checked) .mark {
  display: inline;
}

.element-check.element-金 {
  color: #a47d26;
}

.element-check.element-金:has(input:checked) {
  background: #b08d3c;
  border-color: #b08d3c;
}

.element-check.element-木 {
  color: #2f7d4f;
}

.element-check.element-木:has(input:checked) {
  background: #2f7d4f;
  border-color: #2f7d4f;
}

.element-check.element-水 {
  color: #2f6f9f;
}

.element-check.element-水:has(input:checked) {
  background: #2f6f9f;
  border-color: #2f6f9f;
}

.element-check.element-火 {
  color: #b94836;
}

.element-check.element-火:has(input:checked) {
  background: #b94836;
  border-color: #b94836;
}

.element-check.element-土 {
  color: #8f6b3f;
}

.element-check.element-土:has(input:checked) {
  background: #8f6b3f;
  border-color: #8f6b3f;
}

.selected-summary {
  margin: 10px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.record-status-panel {
  border: 1px solid var(--line);
  border-left: 4px solid #b58b45;
  border-radius: 8px;
  background: #fffaf1;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.record-status-panel.empty {
  border-left-color: #9aa4b2;
  background: #f8fafc;
}

.record-status-panel.ready {
  border-left-color: var(--accent);
}

.record-status-panel.filter-result-locked {
  border-color: #dc8b74;
  border-left-color: #c24d37;
  background: #fff8f5;
}

.filter-validity-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e5a28f;
  border-radius: 7px;
  background: #fff1ec;
  color: #873528;
}

.filter-validity-warning > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.filter-validity-warning strong,
.filter-validity-warning span {
  display: block;
}

.filter-validity-warning span {
  font-size: 12px;
  line-height: 1.45;
}

.filter-validity-warning button {
  flex: 0 0 auto;
  min-height: 32px;
  white-space: nowrap;
}

.status-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-head span {
  color: var(--muted);
  font-size: 12px;
}

.status-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.status-metrics div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 8px;
  min-width: 0;
}

.status-metrics strong,
.status-metrics span {
  display: block;
}

.status-metrics strong {
  font-size: 18px;
  line-height: 1.2;
}

.status-metrics .time-metric strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-metrics span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-detail {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.naming-gender-scope {
  display: grid;
  gap: 10px;
  border: 1px solid #cbded6;
  border-left: 4px solid var(--primary);
  border-radius: 9px;
  background: #f7fbf9;
  padding: 14px;
}

.naming-gender-scope.pending {
  border-color: #e0bd89;
  border-left-color: #b57535;
  background: #fffaf1;
}

.gender-scope-status {
  flex: none;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.gender-scope-status.ready { background: #e5f2ec; color: #246453; }
.gender-scope-status.pending { background: #fff0df; color: #955624; }

.naming-gender-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.naming-gender-options label {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 2px solid #d5dfdb;
  border-radius: 9px;
  background: #fff;
  padding: 11px 12px;
  cursor: pointer;
}

.naming-gender-options label:has(input:checked) {
  border-color: var(--primary);
  background: #eaf5f0;
  box-shadow: 0 0 0 3px rgba(39, 111, 96, .1);
}

.naming-gender-options input {
  position: absolute;
  opacity: 0;
}

.gender-option-mark {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf2ef;
  color: #476159;
  font-size: 15px;
  font-weight: 900;
}

.naming-gender-options label:has(input:checked) .gender-option-mark {
  background: var(--primary);
  color: #fff;
}

.naming-gender-options strong,
.naming-gender-options small { display: block; }
.naming-gender-options strong { font-size: 15px; }
.naming-gender-options small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.naming-gender-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 7px;
  background: #e8f3ee;
  padding: 8px 10px;
}

.naming-gender-auto-row p { margin: 0; color: #315f53; font-size: 13px; font-weight: 700; }
.naming-gender-auto-row button { flex: none; }
.gender-library-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; }
.gender-scope-mismatch { margin: 0; border-left: 3px solid #c4684f; background: #fff0eb; color: #8d402f; padding: 8px 10px; font-size: 13px; font-weight: 700; }
.gender-scope-mismatch[hidden] { display: none; }

.legacy-gender-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e3c28f;
  border-radius: 8px;
  background: #fff6e8;
  padding: 10px 11px;
}

.legacy-gender-confirm strong,
.legacy-gender-confirm span { display: block; }
.legacy-gender-confirm strong { color: #7e4c20; font-size: 13px; }
.legacy-gender-confirm span { margin-top: 3px; color: #7b6959; font-size: 12px; }

.pending-gender-projects {
  border-top: 1px solid #ead8bd;
  padding-top: 8px;
}

.pending-gender-projects summary { width: fit-content; cursor: pointer; color: #855126; font-size: 12px; font-weight: 800; }
.pending-gender-projects > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.pending-gender-projects button { min-height: 32px; display: flex; align-items: center; gap: 6px; padding: 5px 8px; }
.pending-gender-projects button b { font-size: 12px; }
.pending-gender-projects button span { color: var(--muted); font-size: 10px; }

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.section-title-row h3,
.section-title-row p {
  margin-top: 0;
}

.exclusion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.exclusion-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.exclusion-option .ghost {
  padding: 7px 10px;
  white-space: nowrap;
}

.exclusion-desc {
  margin: 7px 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.inset-panel {
  box-shadow: none;
  background: #fbfaf7;
}

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

.stat {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.stat strong {
  display: block;
  font-size: 24px;
}

.progress,
.bar {
  height: 12px;
  background: #e8e1d7;
  border-radius: 999px;
  overflow: hidden;
}

.progress span,
.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

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

.dashboard-hero {
  display: grid;
  grid-template-columns: 190px 1.3fr 1.7fr;
  gap: 16px;
  align-items: stretch;
}

.donut {
  --value: 0;
  width: 178px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 68%, transparent 69%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), #e6ded3 0);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.donut div {
  text-align: center;
}

.donut strong {
  display: block;
  font-size: 34px;
  color: var(--accent);
}

.donut span {
  color: var(--muted);
}

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

.hero-metrics div,
.hero-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.hero-metrics strong {
  display: block;
  font-size: 26px;
  color: var(--accent);
}

.hero-metrics span {
  color: var(--muted);
}

.hero-note {
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-layout .wide {
  grid-column: 1 / -1;
}

.admin-workbench {
  width: 100%;
  max-width: none;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
  margin: 0 auto;
  overflow: hidden;
}

.admin-workbench-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-workbench-head h1 {
  font-size: 24px;
}

.admin-workbench-head p,
.admin-section-head p,
.dashboard-backup-modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.admin-head-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.admin-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid #c8ddd5;
  border-radius: 999px;
  background: #f1f8f5;
  color: #2d6a4f;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-live-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #36a269;
  box-shadow: 0 0 0 4px rgba(54, 162, 105, 0.13);
}

.admin-overview-band {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(360px, 1.2fr) minmax(310px, 0.95fr);
  gap: 12px;
  min-height: 142px;
}

.admin-completion-visual {
  min-width: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, 0.2) 0 48px, transparent 49px),
    linear-gradient(135deg, #163f3b, #286e64 62%, #367d6d);
  color: #fff;
  padding: 16px 18px;
  text-align: left;
  box-shadow: 0 16px 34px rgba(27, 76, 69, 0.2);
}

.admin-completion-ring {
  width: 104px;
  height: 104px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #1f5b53 72%, transparent 73%),
    conic-gradient(#d7b56d calc(var(--value) * 1%), rgba(255, 255, 255, 0.2) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 10px 24px rgba(0, 0, 0, 0.14);
  text-align: center;
}

.admin-completion-ring strong,
.admin-completion-ring small {
  display: block;
}

.admin-completion-ring strong {
  font-size: 25px;
  line-height: 1;
}

.admin-completion-ring small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.admin-completion-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-completion-copy em {
  color: #ecd39b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.admin-completion-copy strong {
  font-size: 18px;
  line-height: 1.3;
}

.admin-completion-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.admin-overview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-overview-health {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  border: 1px solid #e1d7c7;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf9, #f5efe5);
  padding: 12px 14px;
  box-shadow: 0 10px 26px rgba(104, 77, 42, 0.08);
}

.admin-overview-health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-overview-health-head strong {
  font-size: 13px;
}

.admin-overview-health-head button {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  padding: 2px;
  font-size: 10px;
  box-shadow: none;
}

.admin-overview-health-list {
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 3px;
}

.admin-overview-health-list button {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(40px, 1fr) 30px;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #554535;
  padding: 1px 0;
  font-size: 9px;
  text-align: left;
  box-shadow: none;
}

.admin-overview-health-list button i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ddd1;
}

.admin-overview-health-list button b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b98b43, #d3b06f);
}

.admin-overview-health-list button strong {
  text-align: right;
  font-size: 9px;
}

.admin-kpi-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-color: #d9dfdc;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f5f8f7);
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.065);
}

.admin-kpi-card > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f2ee;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.admin-kpi-card div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.admin-kpi-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-kpi-card small,
.admin-kpi-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-kpi-card em {
  color: var(--accent-2);
}

.admin-workbench-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.92fr) minmax(0, 0.82fr);
  align-items: start;
  gap: 12px;
}

.admin-workbench-body > .panel,
.admin-ops-column > .panel {
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 9px 25px rgba(31, 41, 51, 0.065);
}

.admin-section-head,
.dashboard-backup-modal-head {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-section-head h2,
.dashboard-backup-modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-text-button {
  min-height: 28px;
  flex: none;
  padding: 4px 8px;
  font-size: 11px;
}

.admin-quick-panel {
  display: grid;
  grid-template-rows: auto auto;
  gap: 9px;
  border-top: 4px solid #2d776d;
  background: linear-gradient(180deg, #fff 0, #fbfdfc 100%);
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, 68px);
  gap: 7px;
}

.admin-quick-card {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-color: #d5e2dd;
  background: linear-gradient(135deg, #f7fbfa, #eef6f3);
  color: var(--ink);
  padding: 8px 9px;
  text-align: left;
}

.admin-quick-card:hover:not(:disabled) {
  border-color: var(--accent);
  background: #eff7f4;
}

.admin-quick-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #2f796f, #1f5b53);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.admin-quick-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-quick-copy strong,
.admin-quick-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-quick-copy strong {
  font-size: 13px;
}

.admin-quick-copy small {
  color: var(--muted);
  font-size: 10px;
}

.admin-quick-arrow {
  color: #82918c;
  font-size: 20px;
  font-weight: 400;
}

.admin-library-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.admin-library-strip button,
.admin-library-strip button.warning {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-color: #d6e4de;
  background: #f1f8f5;
  color: #2d6a4f;
  padding: 6px 7px;
  font-size: 10px;
}

.admin-library-strip button.warning {
  border-color: #ead5b8;
  background: #fff8ed;
  color: #8f5b2f;
}

.admin-library-strip strong {
  font-size: 11px;
}

.admin-current-panel {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 9px;
  border-top: 4px solid #446b8a;
  background: linear-gradient(180deg, #fff 0, #f8fbfd 100%);
}

.admin-active-record {
  display: grid;
  gap: 4px;
  border: 1px solid #c8d8e3;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf5fa, #f8fbfd);
  padding: 11px;
}

.admin-active-record.empty {
  border-style: dashed;
  background: #faf9f6;
}

.admin-active-record > span,
.admin-active-record small {
  color: var(--muted);
  font-size: 10px;
}

.admin-active-record strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-active-record button {
  min-height: 31px;
  margin-top: 3px;
  padding: 5px 8px;
  font-size: 12px;
}

.admin-recent-list {
  display: grid;
  grid-template-rows: repeat(4, 56px);
  gap: 6px;
}

.admin-recent-row {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  text-align: left;
}

.admin-recent-row.active {
  border-color: #9fbdd2;
  box-shadow: inset 3px 0 #446b8a;
}

.admin-recent-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-recent-row strong,
.admin-recent-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-recent-row strong {
  font-size: 12px;
}

.admin-recent-row small,
.admin-recent-row time {
  color: var(--muted);
  font-size: 10px;
}

.admin-recent-row time {
  flex: none;
}

.admin-ops-column {
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
}

.admin-task-panel,
.admin-backup-card {
  display: grid;
  gap: 8px;
}

.admin-task-panel {
  grid-template-rows: auto auto auto;
  border-top: 4px solid #b95c50;
  background: linear-gradient(180deg, #fff 0, #fff9f8 100%);
}

.admin-task-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.admin-task-summary span {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  border-radius: 7px;
  background: #f1f4f3;
  color: var(--muted);
  padding: 6px 4px;
  font-size: 9px;
}

.admin-task-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.admin-task-summary .failed strong {
  color: var(--danger);
}

.admin-task-summary .partial strong,
.admin-task-summary .paused strong {
  color: #a65d12;
}

.admin-task-list {
  display: grid;
  grid-template-rows: repeat(3, 50px);
  gap: 5px;
}

.admin-task-list button {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 6px 7px;
  text-align: left;
}

.admin-task-list button > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.admin-task-list strong,
.admin-task-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-task-list strong {
  font-size: 10px;
}

.admin-task-list small {
  color: var(--muted);
  font-size: 9px;
}

.admin-task-list em {
  flex: none;
  border-radius: 999px;
  background: #eef3f1;
  color: var(--accent);
  padding: 3px 6px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.admin-task-list em.failed {
  background: #fff0ee;
  color: var(--danger);
}

.admin-backup-card {
  grid-template-rows: auto auto auto;
  border-top: 4px solid #b98b43;
  background: linear-gradient(180deg, #fff 0, #fffaf1 100%);
}

.admin-health-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d69a42;
  box-shadow: 0 0 0 4px rgba(214, 154, 66, 0.12);
}

.admin-health-dot.ready {
  background: #36a269;
  box-shadow: 0 0 0 4px rgba(54, 162, 105, 0.13);
}

.admin-backup-latest {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
  padding: 9px;
}

.admin-backup-latest span,
.admin-backup-latest small {
  color: var(--muted);
  font-size: 10px;
}

.admin-backup-latest strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-backup-actions button {
  min-height: 30px;
  padding: 5px 6px;
  font-size: 10px;
}

.admin-empty-state {
  min-height: 60px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.admin-empty-state.compact {
  grid-row: 1 / -1;
  min-height: 0;
}

.dashboard-backup-backdrop {
  z-index: 90;
}

.dashboard-backup-modal {
  width: min(1120px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.24);
  padding: 16px;
}

.dashboard-backup-modal > .full-backup-panel {
  min-height: 0;
  overflow: auto;
}

@media (max-width: 1400px) {
  .admin-overview-band {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
  }

  .admin-completion-visual {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding-inline: 14px;
  }

  .admin-completion-ring {
    width: 88px;
    height: 88px;
  }
}

@media (max-height: 800px) {
  .admin-workbench {
    gap: 8px;
  }

  .admin-overview-band {
    min-height: 126px;
    gap: 8px;
  }

  .admin-completion-ring {
    width: 84px;
    height: 84px;
  }

  .admin-quick-grid {
    grid-template-rows: repeat(4, 64px);
  }

  .admin-quick-card {
    min-height: 64px;
  }

  .admin-task-list {
    grid-template-rows: repeat(3, 46px);
  }

  .admin-backup-latest {
    min-height: 74px;
  }
}

.full-backup-panel {
  display: grid;
  gap: 14px;
}

.full-backup-panel .page-head {
  margin-bottom: 0;
}

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

.full-backup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.full-backup-row > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.full-backup-row strong,
.full-backup-row span {
  overflow-wrap: anywhere;
}

.full-backup-row > div:first-child span {
  color: var(--muted);
  font-size: 13px;
}

.backup-verify {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.backup-verify.verified {
  color: #2f7d4f;
}

.backup-verify.warning {
  color: var(--accent-2);
}

.element-chart {
  height: 235px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.element-col {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.element-bar-wrap {
  height: 160px;
  display: flex;
  align-items: end;
  width: 100%;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.element-bar {
  width: 42px;
  border-radius: 8px 8px 0 0;
  transition: height 0.2s ease;
}

.element-bar.empty {
  background: #d8d2c9;
}

.element-col strong {
  font-size: 18px;
}

.element-col span {
  color: var(--muted);
  font-size: 13px;
}

.risk-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.risk-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: #f7fbfa;
}

.risk-panel.missing {
  background: #fff9f0;
  border-color: #ead5b8;
}

.risk-panel strong {
  font-size: 18px;
}

.risk-panel span {
  font-size: 26px;
  color: var(--accent);
  font-weight: 700;
}

.risk-panel.missing span {
  color: var(--accent-2);
}

.risk-panel p {
  margin: 0;
  color: var(--muted);
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 90px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  font-weight: 600;
}

.bar-track {
  height: 18px;
  background: #e8e1d7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #25635b, #5d8d83);
}

.bar-track span.empty {
  width: 0;
}

.bar-value {
  color: var(--muted);
  text-align: right;
}

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

.matrix-cell {
  --level: 0;
  min-height: 112px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  background:
    linear-gradient(rgba(37, 99, 91, calc(var(--level) * 0.28)), rgba(37, 99, 91, calc(var(--level) * 0.28))),
    #ffffff;
}

.matrix-cell.missing {
  background: #fff9f0;
  border-color: #ead5b8;
}

.matrix-cell strong {
  font-size: 16px;
}

.matrix-cell span {
  color: var(--accent);
  font-weight: 700;
}

.matrix-cell.missing span {
  color: var(--accent-2);
}

.matrix-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.library-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 9px;
}

.library-card.missing {
  background: #fff9f0;
  border-color: #ead5b8;
}

.library-card.uploaded {
  background: #f7fbfa;
}

.library-top,
.library-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.library-top span {
  color: var(--accent);
  font-weight: 700;
}

.library-card.missing .library-top span {
  color: var(--accent-2);
}

.library-meta {
  color: var(--muted);
  font-size: 13px;
}

.upload-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.upload-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.upload-summary strong {
  display: block;
  font-size: 22px;
  color: var(--accent);
}

.upload-summary span {
  color: var(--muted);
}

.upload-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.upload-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.upload-status.missing {
  background: #fff9f0;
  border-color: #ead5b8;
}

.upload-status div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.upload-status span {
  color: var(--accent);
  font-weight: 700;
}

.upload-status.missing span {
  color: var(--accent-2);
}

.upload-status p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ai-rule-panel {
  align-content: start;
}

.ai-rule-panel details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf7;
}

.ai-rule-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.ai-rule-panel textarea {
  margin-top: 10px;
  min-height: 180px;
}

.frequency-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.frequency-button em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.frequency-button.hit {
  border-color: #8fc7df;
  background: #e9f7fc;
  color: #154f68;
}

.frequency-button.hit em {
  color: #1d6f8f;
}

.frequency-button.miss {
  border-color: #dedbd4;
  background: #f7f6f3;
  color: #7a746a;
}

.frequency-button.miss em {
  color: #9a9185;
}

.frequency-button.unknown {
  border-style: dashed;
}

.frequency-button:hover,
.frequency-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.frequency-button.active em,
.frequency-button:hover em {
  color: #fff;
}

.frequency-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.frequency-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.frequency-legend i {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.frequency-legend i.hit {
  border-color: #8fc7df;
  background: #e9f7fc;
}

.frequency-legend i.miss {
  background: #f7f6f3;
}

.default-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.default-category-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.default-category-card.uploaded {
  border-color: #b8d5cc;
  background: #f7fbfa;
}

.default-category-card.missing {
  border-color: #ead5b8;
  background: #fff9f0;
}

.category-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.default-category-card.missing .category-index {
  background: var(--accent-2);
}

.default-category-card strong {
  display: block;
  margin-bottom: 5px;
}

.default-category-card p,
.default-category-card span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.user-list-table th:nth-child(1) {
  width: 17%;
}

.user-list-table th:nth-child(2),
.user-list-table th:nth-child(3) {
  width: 11%;
}

.user-list-table th:nth-child(4) {
  width: 22%;
}

.user-note-cell {
  min-width: 230px;
}

.user-note-editor {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-note-editor input {
  width: 100%;
  min-width: 130px;
  padding: 7px 9px;
}

.user-note-editor button {
  flex: 0 0 auto;
  padding: 7px 11px;
}

.table-check {
  width: auto;
}

.analysis-panel {
  border-color: #b8d5cc;
  background: #fbfdfc;
}

.analysis-panel p {
  line-height: 1.75;
}

.analysis-backdrop {
  z-index: 60;
  align-items: center;
}

.analysis-modal {
  width: min(1080px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #b8d5cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(31, 41, 51, 0.28);
  overflow: hidden;
}

.analysis-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
  padding: 18px 20px;
}

.analysis-modal-head h2 {
  margin-bottom: 4px;
}

.analysis-modal-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px 20px 22px;
}

.analysis-modal-body p {
  line-height: 1.75;
}

.char-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.stroke-group {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.stroke-group:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.stroke-group .char-cloud {
  max-height: none;
}

.char-item {
  min-width: 42px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.char-item.clickable {
  cursor: pointer;
  color: var(--ink);
}

.char-item.clickable:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.char-item.selected {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.preview-cloud {
  max-height: 220px;
}

.review-layout {
  grid-template-columns: 390px minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

.review-tools {
  gap: 12px;
  align-content: start;
  overflow: auto;
  scrollbar-gutter: stable;
}

.review-tools textarea {
  min-height: 96px;
}

.review-delete-tools {
  display: grid;
  gap: 10px;
}

.review-delete-tool {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e3d7cc;
  border-radius: 8px;
  background: #fffaf7;
}

.review-delete-tool textarea {
  min-height: 70px;
  resize: vertical;
}

.review-delete-tool-head > div {
  display: grid;
  gap: 2px;
}

.review-delete-tool-head strong {
  font-size: 15px;
}

.review-delete-tool-head span,
.review-pinyin-result-head {
  color: var(--muted);
  font-size: 12px;
}

.review-pinyin-delete-tool {
  border-color: #d6dfec;
  background: #f8fbff;
}

.review-pinyin-search-row,
.review-pinyin-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-pinyin-search-row input {
  min-width: 0;
  flex: 1;
}

.review-pinyin-result-head {
  justify-content: space-between;
}

.review-pinyin-result-head > div {
  display: flex;
  gap: 5px;
}

.review-pinyin-result-head button {
  min-height: 28px;
  padding: 4px 8px;
}

.review-pinyin-result-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  max-height: 150px;
  overflow: auto;
}

.review-pinyin-result-char {
  min-width: 0;
  min-height: 46px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 4px 2px;
  border: 1px solid #b9c9dc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.review-pinyin-result-char strong {
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}

.review-pinyin-result-char span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-pinyin-result-char.selected {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.review-pinyin-result-char.selected span {
  color: #fff;
}

.review-pinyin-empty {
  grid-column: 1 / -1;
  margin: 4px 0;
}

.review-ai-assistant {
  display: grid;
  gap: 9px;
  align-content: start;
  grid-auto-rows: max-content;
  border: 1px solid #9fc8ba;
  border-radius: 9px;
  background: #f5fbf8;
  padding: 11px;
}

.review-ai-statebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #d4e4de;
  padding-bottom: 7px;
}

.review-ai-statebar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.review-ai-statebar span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.review-ai-statebar strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-ai-status b {
  border: 1px solid #c8d6d0;
  border-radius: 999px;
  background: #fff;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.review-ai-status b.ready {
  border-color: #91c5b1;
  background: #e6f4ee;
  color: #246553;
}

.review-ai-status b.running,
.review-ai-status b.loading,
.review-ai-status b.stale {
  border-color: #dfbd78;
  background: #fff8e9;
  color: #8b6225;
}

.review-ai-status b.error {
  border-color: #dda49d;
  background: #fff0ee;
  color: #9a3933;
}

.review-ai-head,
.review-ai-confirm,
.review-ai-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.review-ai-head > div {
  display: grid;
  gap: 2px;
}

.review-ai-head strong {
  color: #245f50;
  font-size: 16px;
}

.review-ai-head span,
.review-ai-project,
.review-ai-hard-rules span,
.review-ai-group-head,
.review-ai-confirm {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.review-ai-head button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 9px;
}

.review-ai-project {
  margin: 0;
  border-left: 3px solid #b98535;
  padding-left: 7px;
}

.review-ai-project-summary {
  display: grid;
  gap: 4px;
  border-left: 3px solid #b98535;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 7px;
}

.review-ai-project-summary > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
}

.review-ai-project-summary strong {
  color: var(--ink);
  font-size: 10px;
}

.review-ai-project-summary span,
.review-ai-project-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.review-ai-project-summary p {
  padding-left: 0;
}

.review-ai-hard-rules {
  display: grid;
  gap: 6px;
}

.review-ai-hard-rules > div {
  display: grid;
  grid-template-columns: minmax(84px, auto) 1fr auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e5df;
  border-radius: 6px;
  background: #fff;
  padding: 6px 7px;
}

.review-ai-hard-rules strong {
  color: var(--ink);
  font-size: 11px;
}

.review-ai-hard-rules button {
  min-height: 26px;
  padding: 3px 6px;
  font-size: 10px;
}

.review-ai-running,
.review-ai-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px dashed #a8cbbf;
  border-radius: 7px;
  background: #fff;
  padding: 14px 10px;
  text-align: center;
}

.review-ai-running p,
.review-ai-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.review-ai-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.review-ai-tabs button {
  min-height: 48px;
  display: grid;
  gap: 1px;
  border-color: #bed5cc;
  background: #fff;
  padding: 6px 4px;
  color: var(--ink);
}

.review-ai-tabs button.active {
  border-color: #2b715f;
  background: #e6f4ee;
  color: #245f50;
}

.review-ai-tabs strong {
  font-size: 11px;
}

.review-ai-tabs span {
  font-size: 10px;
}

.review-ai-group-head button {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 10px;
}

.review-ai-char-list {
  display: grid;
  gap: 5px;
  max-height: 280px;
  overflow: auto;
}

.review-ai-inline-actions {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d8b5ae;
  border-radius: 7px;
  background: #fff8f6;
  padding: 6px 7px;
  box-shadow: 0 3px 9px rgba(58, 43, 36, 0.08);
}

.review-ai-inline-actions > span {
  color: var(--ink);
  font-size: 11px;
}

.review-ai-inline-actions > div {
  display: flex;
  gap: 5px;
}

.review-ai-inline-actions button {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 10px;
}

.review-ai-char {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 7px;
  border-color: #d3dfda;
  background: #fff;
  padding: 6px 8px;
  color: var(--ink);
  text-align: left;
}

.review-ai-char > strong {
  grid-row: 1 / 3;
  color: #244f44;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

.review-ai-char > span {
  font-size: 11px;
  line-height: 1.4;
}

.review-ai-char > em {
  color: #9b6a2d;
  font-size: 9px;
  font-style: normal;
}

.review-ai-char.selected {
  border-color: #bc6159;
  background: #fff0ee;
}

.review-ai-char.selected > strong {
  color: #9a3933;
}

.review-ai-open-selection {
  display: grid;
  justify-items: start;
  gap: 7px;
  border: 1px dashed #b8d5ca;
  border-radius: 8px;
  background: #f8fcfa;
  padding: 12px;
}

.review-ai-open-selection strong {
  color: #245f50;
}

.review-ai-open-selection p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.review-ai-selection-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.review-ai-selection-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.review-ai-selection-header h1,
.review-ai-selection-header p {
  margin: 0;
}

.review-ai-selection-header h1 {
  font-size: 20px;
}

.review-ai-selection-header h1 strong {
  color: var(--accent);
}

.review-ai-selection-header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.review-ai-selection-project {
  display: grid;
  gap: 2px;
  min-width: 160px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.review-ai-selection-project span {
  color: var(--muted);
  font-size: 10px;
}

.review-ai-selection-project strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-ai-selection-cache {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #b37b2b;
  border-radius: 7px;
  background: #fff8eb;
  padding: 8px 12px;
}

.review-ai-selection-cache strong {
  flex: none;
  color: #83571d;
}

.review-ai-selection-cache span {
  min-width: 0;
  color: #755d3b;
  font-size: 11px;
}

.review-ai-selection-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
}

.review-ai-selection-toolbar,
.review-ai-selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-ai-selection-toolbar > div:first-child,
.review-ai-selection-footer > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.review-ai-selection-toolbar > div:first-child > span,
.review-ai-selection-footer > div > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-ai-selection-toolbar > div:last-child {
  flex: none;
  display: flex;
  gap: 7px;
}

.review-ai-selection-list {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-content: start;
  gap: 7px;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 2px 4px 8px 2px;
}

.review-ai-selection-card {
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 9px;
  border: 1px solid #cfe0d9;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
}

.review-ai-selection-card > strong {
  grid-row: 1 / 3;
  align-self: center;
  color: #245f50;
  font-size: 30px;
  text-align: center;
}

.review-ai-selection-card > span {
  font-size: 12px;
  line-height: 1.45;
}

.review-ai-selection-card > em {
  color: #9b6a2d;
  font-size: 10px;
  font-style: normal;
}

.review-ai-selection-card.selected {
  border-color: #c55e56;
  background: #fff0ee;
  box-shadow: inset 4px 0 #c55e56;
}

.review-ai-selection-card.selected > strong {
  color: #9a3933;
}

.review-ai-selection-footer {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.review-ai-selection-empty {
  align-self: stretch;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .review-ai-selection-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .review-ai-selection-project {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 7px;
    padding-left: 0;
  }

  .review-ai-selection-toolbar,
  .review-ai-selection-footer,
  .review-ai-selection-cache {
    align-items: stretch;
    flex-direction: column;
  }

  .review-ai-selection-toolbar > div:last-child {
    flex-wrap: wrap;
  }

  .review-ai-selection-list {
    grid-template-columns: 1fr;
  }
}

.review-ai-confirm {
  align-items: flex-start;
  border-top: 1px solid #d4e4de;
  padding-top: 8px;
}

.review-ai-confirm > span {
  min-width: 0;
  max-height: 48px;
  overflow: auto;
}

.review-ai-confirm > div {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.review-ai-confirm button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 10px;
}

.review-manual-preview {
  display: grid;
  gap: 7px;
  border-top: 1px dashed #d8b5ae;
  padding-top: 8px;
}

.review-manual-preview > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-manual-preview > div button {
  min-width: 30px;
  min-height: 30px;
  border-color: #d8aaa3;
  background: #fff;
  padding: 3px;
  color: var(--ink);
}

.review-manual-preview > div button.selected {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.review-manual-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.review-tools .status-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-notice {
  font-size: 13px;
  line-height: 1.55;
  padding: 8px 10px;
}

.compact-action {
  width: fit-content;
}

.review-finish {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid #b8d5cc;
  border-radius: 8px;
  background: #f7fbfa;
  box-shadow: 0 -10px 30px rgba(31, 41, 51, 0.08);
  padding: 14px 16px;
}

.review-finish strong,
.review-finish span {
  display: block;
}

.review-finish span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.review-screen {
  grid-template-rows: auto 1fr auto;
}

.deleted-char-recovery-screen {
  grid-template-rows: auto minmax(0, 1fr);
}

.deleted-char-recovery-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.recovery-topbar {
  display: grid;
  grid-template-columns: minmax(180px, 250px) auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.recovery-topbar .record-picker {
  margin: 0;
  max-width: none;
}

.recovery-tabs,
.recovery-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.recovery-actions {
  justify-content: flex-end;
}

.recovery-actions button,
.recovery-tabs button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.recovery-stat {
  min-width: 74px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf8;
}

.recovery-stat strong,
.recovery-stat span {
  display: block;
}

.recovery-stat strong {
  font-size: 18px;
  line-height: 1.1;
}

.recovery-stat span,
.recovery-helper {
  color: var(--muted);
  font-size: 12px;
}

.recovery-helper {
  padding: 7px 9px;
  border-left: 3px solid var(--accent-2);
  background: #fffaf2;
  line-height: 1.45;
}

.recovery-char-area {
  min-height: 0;
  overflow: hidden;
}

.recovery-char-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(38px, 1fr);
  align-content: stretch;
  gap: 6px;
}

.recovery-char-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 4px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid #e2ddd4;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.recovery-char-card:hover {
  border-color: #78a79f;
  background: #f4fbf9;
}

.recovery-char-card input {
  width: 13px;
  height: 13px;
  grid-row: 1 / -1;
  margin: 0;
  accent-color: var(--accent);
}

.recovery-char-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
}

.recovery-char-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.recovery-char-card.selected {
  border-color: #c47a30;
  background: #fff5e8;
  box-shadow: inset 0 0 0 1px rgba(196, 122, 48, 0.18);
}

.recovery-char-card.restored {
  grid-template-columns: 1fr;
  background: #f2faf6;
  border-color: #b8d8c5;
  cursor: default;
}

.recovery-empty {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.recovery-pagination {
  justify-content: flex-end;
}

.review-preview-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 14px;
}

.selected-review-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-preview-area {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  overflow: hidden;
}

.review-page-groups {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-content: start;
}

.flat-char-page {
  align-self: stretch;
}

.flat-char-page .char-cloud {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  grid-auto-rows: 30px;
  align-content: start;
}

.review-page-groups .stroke-group {
  margin-top: 7px;
  padding-top: 7px;
}

.review-page-groups .stroke-group h3 {
  margin-bottom: 5px;
  font-size: 14px;
}

.review-page-groups .char-cloud {
  max-height: none;
  overflow: hidden;
  gap: 5px;
}

.review-page-groups .char-item {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.review-pagination {
  justify-content: flex-end;
}

.review-history-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #dfd6c9;
  border-radius: 7px;
  background: #fffdf9;
  padding: 9px 10px;
}

.review-history-panel.disabled {
  border-color: #dfdfdc;
  background: #f6f6f3;
}

.review-history-panel.disabled .review-history-legend { opacity: .45; }
.review-history-safety { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

.review-history-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  align-items: end;
  gap: 8px;
}

.review-history-head strong,
.review-history-head span {
  display: block;
}

.review-history-head strong {
  color: var(--ink);
  font-size: 13px;
}

.review-history-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.review-history-head select {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.review-history-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: var(--muted);
  font-size: 11px;
}

.review-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.review-history-legend i {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.review-memory-panel {
  display: grid;
  gap: 7px;
  border: 1px solid #cfe2db;
  border-radius: 7px;
  background: #f6fbf8;
  padding: 9px 10px;
}

.review-memory-head,
.review-mode-tabs,
.review-memory-actions,
.review-sort-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.review-memory-head {
  justify-content: space-between;
}

.review-memory-head strong { color: var(--ink); font-size: 13px; }
.review-memory-head span { color: var(--muted); font-size: 12px; }

.review-mode-tabs button,
.review-memory-actions button,
.review-sort-tabs button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.review-mode-tabs button.active,
.review-sort-tabs button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.memory-review-note {
  border-left-color: #287a9b;
  background: #eef8fd;
}

.review-page-groups .char-item.remembered {
  border-color: #8bc8a5;
  background: #f1fbf4;
  color: #236247;
}

.review-page-groups .char-item.material-auto-keep {
  border-color: #b59a4c;
  background: #fff7dc;
  color: #6a5012;
  box-shadow: inset 0 -2px 0 rgba(181, 154, 76, 0.35);
}

.review-page-groups .char-item.history-delete-1,
.review-history-legend .history-delete-1 {
  border-color: #e9c2a6;
  background: #fff3e5;
  color: #8a4d2d;
}

.review-page-groups .char-item.history-delete-2 {
  border-color: #df9277;
  background: #fbd8c8;
  color: #7d3529;
}

.review-page-groups .char-item.history-delete-3,
.review-history-legend .history-delete-3 {
  border-color: #c86459;
  background: #efaaa0;
  color: #65231f;
  font-weight: 800;
}

.review-page-groups .char-item.history-keep-1,
.review-history-legend .history-keep-1 {
  border-color: #bbdcca;
  background: #eff9f2;
  color: #2f6848;
}

.review-page-groups .char-item.history-keep-2 {
  border-color: #83bea0;
  background: #cfeadb;
  color: #205d40;
}

.review-page-groups .char-item.history-keep-3,
.review-history-legend .history-keep-3 {
  border-color: #4f9b72;
  background: #91caa9;
  color: #164b32;
  font-weight: 800;
}

.review-page-groups .char-item.history-balanced,
.review-history-legend .history-balanced {
  border-color: #dccb91;
  background: #fff4c9;
  color: #705b22;
}

.review-page-groups .char-item.history-none,
.review-history-legend .history-none {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.review-page-groups .char-item.memory-selected {
  border-color: #287a9b;
  background: #dff3fb;
  color: #175c78;
}

.review-page-groups .char-item.selected {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

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

.name-columns {
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  gap: 8px;
  align-items: start;
}

.name-column {
  display: grid;
  gap: 5px;
}

.bottom-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.name-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.name-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px 12px;
}

.name-stats strong {
  display: block;
  font-size: 19px;
  color: var(--ink);
}

.name-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.delivery-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.delivery-info div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px 12px;
}

.delivery-info strong,
.delivery-info span {
  display: block;
}

.delivery-info strong {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.name-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.name-columns .name-item {
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0;
  padding: 0;
}

.name-columns .name-text {
  font-size: 15px;
}

.quick-name-item {
  position: relative;
  min-height: 34px;
  overflow: visible;
}

.quick-name-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
}

.quick-name-badges {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.quick-name-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% - 4px);
  z-index: 6;
  display: none;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(31, 41, 51, 0.16);
}

.quick-name-item:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(31, 41, 51, 0.1);
}

.quick-name-item:hover .quick-name-actions {
  display: flex;
}

.quick-name-actions button {
  padding: 5px 6px;
  font-size: 11px;
}

.aesthetic-section {
  display: grid;
  gap: 10px;
}

.aesthetic-name-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
  align-items: start;
}

.aesthetic-name-grid .name-item {
  min-height: 34px;
  padding: 0;
}

.aesthetic-name-grid .name-text {
  font-size: 14px;
  line-height: 1.2;
}

.aesthetic-name-grid .quick-name-main {
  padding: 7px 8px;
}

.aesthetic-name-grid .quick-name-actions {
  left: 4px;
  right: 4px;
}

.aesthetic-case-table {
  table-layout: fixed;
}

.aesthetic-case-table th:first-child,
.aesthetic-case-table td:first-child {
  width: 72px;
  font-weight: 700;
}

.aesthetic-case-table th:last-child,
.aesthetic-case-table td:last-child {
  width: 96px;
}

.aesthetic-case-table td {
  vertical-align: top;
  line-height: 1.6;
}

.compact-head {
  margin-bottom: 0;
}

@media (max-width: 1500px) {
  .name-columns {
    grid-template-columns: repeat(8, minmax(92px, 1fr));
  }

  .aesthetic-name-grid {
    grid-template-columns: repeat(4, minmax(92px, 1fr));
  }
}

@media (max-width: 1200px) {
  .name-columns {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
  }

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

  .names-control-actions { grid-column: 1 / -1; }

  .name-search-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .recovery-actions {
    justify-content: flex-start;
  }

  .recovery-char-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .aesthetic-name-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }
}

.reference-style-first {
  border-color: #b8d5cc;
  background: #fbfdfc;
}

.name-item.favorite {
  border-color: #d8a21f;
  background: #fffaf0;
}

.name-item.candidate {
  border-color: #288260;
  background: #f0fbf6;
}

.name-item.risk {
  border-color: var(--danger);
}

.name-title-row {
  gap: 8px;
  margin-bottom: 2px;
}

.name-text {
  font-size: 19px;
  font-weight: 700;
}

.name-text.meaning-enabled {
  cursor: help;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.name-text.meaning-enabled:hover,
.name-text.meaning-enabled:focus-visible {
  color: var(--accent);
  text-decoration-color: rgba(31, 116, 91, 0.36);
  outline: none;
}

.name-text.favorite,
.saved-name-text.favorite {
  color: #9a6a00;
}

.name-text.candidate,
.saved-name-text.candidate {
  color: #126044;
}

.saved-name-text {
  display: inline-block;
  min-width: 64px;
  font-weight: 800;
}

.name-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.name-status.favorite {
  border: 1px solid #d8a21f;
  background: #fff0bf;
  color: #7d5400;
}

.name-status.candidate {
  border: 1px solid #288260;
  background: #dff6ea;
  color: #126044;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--danger);
  background: #fff1f0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-tag.homophone.low {
  border-color: #8fc9a9;
  background: #eefaf3;
  color: #126044;
}

.mini-tag.homophone.medium {
  border-color: #d8a21f;
  background: #fff8df;
  color: #7d5400;
}

.mini-tag.homophone.high,
.mini-tag.homophone.blocked {
  border-color: var(--danger);
  background: #fff1f0;
  color: var(--danger);
}

.homophone-risk {
  display: grid;
  gap: 5px;
  border: 1px solid #d9e3df;
  background: #f8faf9;
  border-radius: 7px;
  padding: 8px 10px;
  min-width: 160px;
  line-height: 1.45;
}

.homophone-risk.empty {
  color: var(--muted);
}

.homophone-risk strong {
  font-size: 13px;
}

.homophone-risk span,
.homophone-risk em {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}

.homophone-risk.low {
  border-color: #8fc9a9;
  background: #eefaf3;
}

.homophone-risk.low strong {
  color: #126044;
}

.homophone-risk.medium {
  border-color: #d8a21f;
  background: #fff8df;
}

.homophone-risk.medium strong {
  color: #7d5400;
}

.homophone-risk.high,
.homophone-risk.blocked {
  border-color: #e09a92;
  background: #fff1f0;
}

.homophone-risk.high strong,
.homophone-risk.blocked strong {
  color: var(--danger);
}

button.status-favorite {
  border-color: #d8a21f;
  background: #fff0bf;
  color: #7d5400;
  font-weight: 700;
}

button.status-candidate {
  border-color: #288260;
  background: #288260;
  color: #fff;
  font-weight: 700;
}

button.status-favorite:disabled,
button.status-candidate:disabled {
  opacity: 1;
}

.saved-name-row.favorite td {
  background: #fffaf0;
}

.saved-name-row.candidate td {
  background: #f0fbf6;
}

.saved-name-row.candidate.delivery-selected td {
  background: #e3f5ec;
}

.saved-row-actions {
  align-items: flex-start;
  gap: 6px;
}

.saved-row-actions button {
  white-space: nowrap;
}

/* 确认备选：名单总览与紧凑管理工作台 */
.saved-candidates-page { display: grid; align-content: start; gap: 8px; min-height: 0; }
.saved-candidates-page .saved-page-head { align-items: center; margin: 0; }
.saved-candidates-page .saved-page-head h1 { font-size: 22px; }.saved-candidates-page .saved-page-head p { margin: 3px 0 0; font-size: 11px; }
.saved-page-nav { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }.saved-page-nav button { min-height: 32px; padding: 5px 10px; font-size: 11px; }.saved-page-nav button.active { border-color: #276f60; background: #276f60; color: #fff; }
.saved-action-menu { position: relative; }.saved-action-menu > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid #377b6c; border-radius: 6px; background: #fff; color: #2c665a; padding: 5px 10px; font-size: 11px; cursor: pointer; list-style: none; white-space: nowrap; }.saved-action-menu > summary::-webkit-details-marker { display: none; }.saved-action-menu[open] > summary { border-color: #276f60; background: #276f60; color: #fff; }.saved-action-menu-popover { position: absolute; top: calc(100% + 5px); right: 0; z-index: 40; display: grid; gap: 5px; min-width: 170px; border: 1px solid #c9dbd4; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(25,57,48,.18); padding: 7px; }.saved-action-menu-popover button { width: 100%; min-height: 32px; border-color: #d4e1dc; background: #fff; color: #315d53; text-align: left; }
.saved-workbench-panel { min-height: 0; padding: 10px 12px 12px; }
.saved-record-strip { display: flex; align-items: end; max-width: 420px; margin-bottom: 6px; }.saved-record-strip .field { width: 100%; }.saved-record-strip label { margin-bottom: 4px; font-size: 11px; }.saved-record-strip select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.saved-candidate-workbench { display: grid; align-content: start; gap: 8px; min-height: 0; }
.saved-candidate-count-notice { display: flex; align-items: baseline; gap: 9px; border: 1px solid #a8cdbd; border-radius: 8px; background: #eef8f3; padding: 7px 10px; color: #245f4e; }
.saved-candidate-count-notice strong { flex: none; font-size: 13px; }
.saved-candidate-count-notice span { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-candidate-count-notice.is-empty { border-color: #e3c78d; background: #fff9eb; color: #765918; }
.saved-candidate-toolbar { display: grid; grid-template-columns: minmax(190px, .7fr) auto minmax(520px, 1.5fr); align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.saved-candidate-toolbar h2 { display: flex; align-items: center; gap: 7px; margin: 0; color: #245d50; font-size: 18px; }.saved-candidate-toolbar h2 span { border-radius: 999px; background: #e5f3ed; padding: 2px 7px; font-size: 12px; }.saved-candidate-toolbar small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.saved-candidate-view-switch, .saved-candidate-primary-actions { display: flex; align-items: center; gap: 6px; }.saved-candidate-primary-actions { justify-content: flex-end; flex-wrap: wrap; }.saved-candidate-toolbar button { min-height: 31px; padding: 4px 9px; font-size: 11px; white-space: nowrap; }.saved-candidate-toolbar button.active { border-color: #287261; background: #287261; color: #fff; }
.saved-homophone-status { display: flex; align-items: baseline; gap: 5px; min-height: 31px; border: 1px solid #c8ddd4; border-radius: 7px; background: #f4faf7; padding: 5px 9px; color: #527068; white-space: nowrap; }.saved-homophone-status span { font-size: 10px; }.saved-homophone-status strong { color: #245f51; font-size: 14px; }.saved-homophone-status small { color: #9a6c34; font-size: 9px; }.saved-candidate-primary-actions > .saved-homophone-primary { border-color: #26735f; background: #26735f; color: #fff; }.saved-candidate-primary-actions > .saved-homophone-primary:disabled { border-color: #a9c2b8; background: #a9c2b8; color: #fff; }.saved-more-menu > summary { min-height: 31px; }
.saved-candidates-page .delivery-name-selection-toolbar { grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; min-height: 44px; margin: 0; border-width: 1px; padding: 7px 10px; }.saved-candidates-page .delivery-name-selection-toolbar > div:first-child { display: flex; align-items: baseline; gap: 8px; }.saved-candidates-page .delivery-name-selection-toolbar > div:first-child strong { flex: none; font-size: 13px; }.saved-candidates-page .delivery-name-selection-toolbar > div:first-child span { overflow: hidden; margin: 0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.saved-candidates-page .delivery-name-selection-count strong { font-size: 17px; }.saved-candidates-page .delivery-name-selection-toolbar button { min-height: 30px; padding: 4px 8px; font-size: 10px; }
.compact-external-candidate-toolbar, .compact-homophone-batch-toolbar { margin: 0; }.compact-external-candidate-toolbar { padding: 9px 10px; }.compact-external-candidate-toolbar .external-candidate-fields textarea { min-height: 68px; }.compact-homophone-batch-toolbar { padding: 8px 10px; }
.saved-candidate-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
.saved-candidate-card { display: grid; grid-template-rows: auto auto minmax(26px, auto) auto; gap: 5px; min-width: 0; min-height: 112px; border: 1px solid #b8d8c8; border-radius: 9px; background: #f5fbf8; box-shadow: 0 3px 10px rgba(42,88,73,.05); padding: 8px 9px; }.saved-candidate-card.delivery-selected { border: 2px solid #126747; background: #ccebdc; box-shadow: inset 7px 0 #126747, 0 5px 14px rgba(23,96,70,.2); padding: 7px 8px 7px 14px; }
.saved-candidate-card > header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }.saved-candidate-card > header > span { color: #8b7248; font-size: 9px; }.saved-candidate-card .mini-tag { padding: 2px 5px; font-size: 9px; }
.saved-candidate-name { display: flex; align-items: center; gap: 7px; min-width: 0; }.saved-candidate-name strong { overflow: hidden; color: #23594d; font-family: "Songti SC", "STSong", serif; font-size: 21px; letter-spacing: 1px; text-overflow: ellipsis; white-space: nowrap; }.saved-candidate-name em { flex: none; border: 1px solid #6bb393; border-radius: 999px; color: #277158; padding: 1px 5px; font-size: 9px; font-style: normal; }.saved-candidate-card.delivery-selected .saved-candidate-name strong { color: #104b38; font-weight: 800; }.saved-candidate-card.delivery-selected .saved-candidate-name em { border-color: #126747; background: #126747; color: #fff; padding: 2px 7px; font-size: 10px; font-weight: 900; box-shadow: 0 2px 5px rgba(18,103,71,.24); }
.saved-candidate-card > p { display: -webkit-box; overflow: hidden; margin: 0; color: #60716a; font-size: 10px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.saved-candidate-card > footer { display: grid; grid-template-columns: minmax(72px, 1fr) auto auto; gap: 5px; border-top: 1px dashed #cfe0d8; padding-top: 6px; }.saved-candidate-card > footer button { min-height: 27px; padding: 3px 6px; font-size: 9px; white-space: nowrap; }
.saved-candidate-card:not(.delivery-mode) > footer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.saved-candidate-empty { grid-column: 1 / -1; display: grid; place-items: center; align-content: center; gap: 5px; min-height: 180px; border: 1px dashed #bad0c7; border-radius: 9px; color: var(--muted); }
.saved-candidate-empty strong { color: #765918; font-size: 15px; }
.saved-candidate-empty span { font-size: 11px; }
.saved-candidate-detail-table { overflow: auto; max-height: 62vh; border: 1px solid var(--line); border-radius: 8px; }.saved-candidate-detail-table thead { position: sticky; top: 0; z-index: 2; background: #fff; }.saved-candidate-detail-table .table th, .saved-candidate-detail-table .table td { padding-top: 7px; padding-bottom: 7px; }
.saved-candidate-drawer-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(24,34,30,.34); backdrop-filter: blur(2px); }.saved-candidate-drawer { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; width: min(480px, 92vw); height: 100%; border-left: 1px solid #bfd3cb; background: #fbfdfc; box-shadow: -14px 0 36px rgba(26,53,45,.2); padding: 20px; }.saved-candidate-drawer > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }.saved-candidate-drawer h2 { margin: 2px 0 0; color: #24594d; font-family: "Songti SC", "STSong", serif; font-size: 30px; }.saved-candidate-drawer small { color: var(--muted); }.saved-candidate-drawer dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }.saved-candidate-drawer dl > div { border: 1px solid #d9e4df; border-radius: 8px; background: #fff; padding: 9px; }.saved-candidate-drawer dl > div.wide { grid-column: 1 / -1; }.saved-candidate-drawer dt { color: var(--muted); font-size: 10px; }.saved-candidate-drawer dd { margin: 3px 0 0; color: #304d44; line-height: 1.45; }.saved-candidate-drawer > section { border: 1px solid #d9e4df; border-radius: 8px; background: #fff; padding: 10px; }.saved-candidate-drawer > section > strong { display: block; margin-bottom: 8px; color: #24594d; }.saved-candidate-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.saved-candidate-drawer-actions button { min-height: 36px; }.saved-candidate-drawer-actions .danger-outline { grid-column: 1 / -1; }

@media (max-width: 1700px) { .saved-candidate-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }.saved-candidate-toolbar { grid-template-columns: minmax(180px, .7fr) auto 1fr; } }
@media (max-width: 1350px) { .saved-candidate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.saved-candidate-toolbar { grid-template-columns: 1fr auto; }.saved-candidate-primary-actions { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 900px) { .saved-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.saved-candidates-page .saved-page-head, .saved-candidate-toolbar { align-items: stretch; flex-direction: column; }.saved-candidates-page .delivery-name-selection-toolbar { grid-template-columns: 1fr; }.saved-candidates-page .delivery-name-selection-toolbar > div:first-child { display: grid; }.saved-record-strip { max-width: none; } }
@media (max-width: 600px) { .saved-candidate-grid { grid-template-columns: 1fr; }.saved-candidate-view-switch, .saved-candidate-primary-actions { flex-wrap: wrap; }.saved-candidate-drawer { width: 100vw; } }

.saved-candidate-workbench.delivery-selection-active { gap: 10px; }
.saved-candidates-page .delivery-selection-mode-header { display: grid; grid-template-columns: minmax(360px, 1fr) auto auto; align-items: center; gap: 16px; min-height: 66px; border: 2px solid #155f48; border-radius: 10px; background: linear-gradient(110deg, #174f40, #26745c); padding: 10px 13px; color: #fff; box-shadow: 0 7px 18px rgba(23,79,64,.18); }
.saved-candidates-page .delivery-name-selection-toolbar > .delivery-selection-mode-title { display: grid; align-items: start; gap: 2px; min-width: 0; }
.saved-candidates-page .delivery-name-selection-toolbar > .delivery-selection-mode-title small { color: #cce9de; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.saved-candidates-page .delivery-name-selection-toolbar > .delivery-selection-mode-title strong { flex: none; color: #fff; font-size: 18px; }
.saved-candidates-page .delivery-name-selection-toolbar > .delivery-selection-mode-title span { overflow: hidden; margin: 0; color: #e5f4ee; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.saved-candidates-page .delivery-selection-mode-header .delivery-name-selection-count { display: grid; justify-items: center; min-width: 68px; border-left: 1px solid rgba(255,255,255,.25); border-right: 1px solid rgba(255,255,255,.25); padding: 0 14px; color: #fff; }
.saved-candidates-page .delivery-selection-mode-header .delivery-name-selection-count strong { color: #fff; font-size: 22px; line-height: 1; }
.saved-candidates-page .delivery-selection-mode-header .delivery-name-selection-count span { margin: 3px 0 0; color: #d9eee6; font-size: 9px; }
.saved-candidates-page .delivery-selection-mode-actions { justify-content: flex-end; flex-wrap: nowrap; }
.saved-candidates-page .delivery-selection-mode-actions button { min-height: 32px; border-color: rgba(255,255,255,.72); background: #fff; color: #205c4a; font-weight: 700; }
.saved-candidates-page .delivery-selection-mode-actions button:first-child { background: transparent; color: #fff; }
.saved-candidates-page .delivery-selection-mode-actions button:last-child { border-color: #f2c56c; background: #f2c56c; color: #4f3810; }
.saved-candidates-page .delivery-selection-mode-actions button:disabled { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.14); color: rgba(255,255,255,.55); }
.saved-candidate-card.delivery-mode { min-height: 96px; border: 1px solid #c9d8d2; background: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(42,88,73,.05); }
.saved-candidate-card.delivery-mode:hover { border-color: #3a8a70; box-shadow: 0 5px 14px rgba(28,101,77,.14); transform: translateY(-1px); }
.saved-candidate-card.delivery-mode > p { -webkit-line-clamp: 1; }
.saved-candidate-card.delivery-mode > footer { grid-template-columns: 1fr; }
.saved-candidate-card.delivery-mode .delivery-card-toggle { width: 100%; }
.saved-candidate-card.delivery-mode.delivery-selected { border: 2px solid #0f6545; background: #c7ead9; box-shadow: inset 7px 0 #0f6545, 0 6px 16px rgba(15,101,69,.2); }
.saved-candidate-card.delivery-mode.delivery-selection-disabled { opacity: .48; cursor: not-allowed; }
.saved-candidate-card.delivery-mode.delivery-selection-disabled:hover { border-color: #c9d8d2; box-shadow: 0 2px 8px rgba(42,88,73,.05); transform: none; }

@media (max-width: 1400px) { .saved-candidates-page .delivery-selection-mode-header { grid-template-columns: 1fr auto; }.saved-candidates-page .delivery-selection-mode-actions { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 760px) { .saved-candidates-page .delivery-selection-mode-header { grid-template-columns: 1fr; }.saved-candidates-page .delivery-selection-mode-header .delivery-name-selection-count { justify-items: start; border: 0; padding: 0; }.saved-candidates-page .delivery-selection-mode-actions { flex-wrap: wrap; } }

@media (max-width: 1100px) {
  .external-candidate-toolbar,
  .homophone-batch-toolbar,
  .delivery-name-selection-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-name-selection-toolbar {
    grid-template-columns: 1fr;
  }

  .external-candidate-toolbar {
    grid-template-columns: 1fr;
  }

  .external-candidate-fields {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .external-candidate-result {
    grid-template-columns: 1fr;
  }

  .homophone-batch-actions {
    justify-content: flex-start;
  }
}

.exclusion-clean-panel textarea {
  min-height: 110px;
}

.exclusion-audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exclusion-audit-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.exclusion-audit-table .current-category-hit td {
  background: #eef8f3;
}

.exclusion-audit-table .other-category-hit td {
  background: #fff9ee;
}

.mini-tag.warning {
  border-color: #ead5a8;
  background: #fff6df;
  color: #8a6322;
}

.audit-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
}

.muted-row td {
  background: #fafafa;
}

.notice {
  border-left: 4px solid var(--accent-2);
  background: #fff9f0;
  padding: 10px 12px;
  border-radius: 6px;
  color: #62411e;
  animation: message-enter 160ms ease-out;
}

.nameology-combination-banner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
}

.nameology-combination-banner span {
  color: var(--muted);
  line-height: 1.6;
}

.floating-message {
  position: fixed;
  top: 18px;
  right: 28px;
  z-index: 80;
  max-width: min(520px, calc(100vw - 320px));
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #fff9f0;
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.16);
  color: #62411e;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
  animation: message-enter 160ms ease-out;
}

@keyframes message-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.success {
  color: var(--accent);
}

.spacer {
  height: 14px;
}

.project-style-panel {
  gap: 14px;
}

.task-progress {
  display: grid;
  gap: 8px;
  border: 1px solid #d7ccc0;
  border-radius: 8px;
  background: #fffaf2;
  padding: 12px;
}

.task-progress.completed {
  border-color: rgba(45, 106, 79, 0.35);
  background: #f2fbf5;
}

.task-progress.failed {
  border-color: rgba(192, 57, 43, 0.35);
  background: #fff4f2;
}

.task-progress.paused {
  border-color: rgba(166, 93, 18, 0.35);
  background: #fff9ef;
}

.task-progress-head,
.task-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.task-progress-head strong {
  color: var(--ink);
}

.task-progress-meta {
  font-size: 13px;
}

.style-provider-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.style-provider-progress {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d7ddd9;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
}

.style-provider-progress.retrying {
  border-color: #d6a652;
  background: #fff8e9;
}

.style-provider-progress.failed {
  border-color: rgba(192, 57, 43, 0.38);
  background: #fff4f2;
}

.style-provider-progress.completed,
.style-provider-progress.saved {
  border-color: rgba(45, 106, 79, 0.35);
  background: #f2fbf5;
}

.style-provider-progress-head,
.style-provider-progress-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.style-provider-progress-head strong {
  color: var(--ink);
  font-size: 13px;
}

.style-provider-progress-head span,
.style-provider-progress-state,
.style-provider-progress p {
  color: var(--muted);
  font-size: 10px;
}

.style-provider-progress-state b {
  color: var(--ink);
}

.style-provider-progress-state em {
  padding: 2px 5px;
  border-radius: 999px;
  background: #f1f2f0;
  font-style: normal;
}

.style-provider-progress-state em.retrying {
  color: #8b5419;
  background: #fff0cf;
  font-weight: 700;
}

.style-provider-progress p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-error {
  color: #b42318;
  font-size: 13px;
  line-height: 1.6;
}

.task-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.task-work-panel {
  display: grid;
  gap: 10px;
}

.task-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.task-stats .running strong {
  color: #1a5276;
}

.task-stats .failed strong {
  color: #c0392b;
}

.task-stats .partial strong,
.task-stats .paused strong {
  color: #a65d12;
}

.task-stats .completed strong {
  color: #2d6a4f;
}

.task-filter-row {
  display: grid;
  grid-template-columns: 180px 220px auto;
  gap: 10px;
  align-items: end;
}

.task-list {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(132px, auto);
  gap: 10px;
  overflow: hidden;
}

.task-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.task-card.running {
  border-color: rgba(26, 82, 118, 0.32);
  background: #f3f8fb;
}

.task-card.completed {
  border-color: rgba(45, 106, 79, 0.32);
  background: #f4fbf7;
}

.task-card.failed {
  border-color: rgba(192, 57, 43, 0.35);
  background: #fff6f4;
}

.task-card.partial,
.task-card.paused {
  border-color: rgba(166, 93, 18, 0.35);
  background: #fff9ef;
}

.task-card-head,
.task-card-actions,
.task-progress-line {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.task-card-head strong {
  display: block;
  font-size: 16px;
}

.task-card-head span,
.task-card-body p,
.task-progress-line em {
  font-size: 12px;
}

.task-card-body {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.task-progress-line .progress {
  flex: 1;
}

.task-progress-line em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.task-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.task-badge.running {
  color: #1a5276;
  background: #e8f4fb;
  border-color: rgba(26, 82, 118, 0.25);
}

.task-badge.completed {
  color: #2d6a4f;
  background: #e8f7ee;
  border-color: rgba(45, 106, 79, 0.25);
}

.task-badge.failed {
  color: #c0392b;
  background: #fff0ed;
  border-color: rgba(192, 57, 43, 0.25);
}

.task-badge.partial,
.task-badge.paused {
  color: #8a4b0f;
  background: #fff2dc;
  border-color: rgba(166, 93, 18, 0.28);
}

.task-card-actions {
  justify-content: flex-end;
}

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

.style-profile-buttons button {
  min-width: 92px;
}

.style-profile-buttons button.active {
  background: #1f2933;
  border-color: #1f2933;
  color: #fff;
}

.style-profile-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
  padding: 16px;
}

.style-profile-card h2 {
  margin: 0 0 6px;
}

.style-profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.style-profile-card .grid div {
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid #e7e1d8;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.style-profile-card .grid strong {
  color: var(--ink);
}

.style-profile-card .grid span {
  color: var(--muted);
  line-height: 1.6;
}

.project-style-results {
  align-items: start;
}

.compact-table {
  font-size: 13px;
}

.compact-table th,
.compact-table td {
  padding: 8px 9px;
  vertical-align: top;
}

.big-char {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  min-width: 38px;
}

.score-pill,
.role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.score-pill {
  background: #edf4f2;
  color: var(--accent);
}

.role-pill.main {
  background: #e8f1ff;
  color: #1a5276;
}

.role-pill.support {
  background: #eef8f1;
  color: #2d6a4f;
}

.role-pill.careful {
  background: #fff6dc;
  color: #8b6914;
}

.role-pill.excluded {
  background: #fff1f0;
  color: var(--danger);
}

.project-style-name-list {
  display: grid;
  gap: 10px;
}

.style-name-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.style-name-row.recommended {
  border-color: #7db69b;
  background: #f4fbf7;
}

.style-name-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.style-name-main strong {
  font-size: 22px;
  letter-spacing: 0;
}

.style-name-main span,
.style-name-main em {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  background: #edf4f2;
  color: var(--accent);
}

.style-name-main em {
  background: #dff3e8;
  color: #236247;
}

.style-name-main em.candidate {
  background: #fff0bf;
  color: #7d5400;
}

.style-score-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.style-score-line span {
  border: 1px solid #e7e1d8;
  border-radius: 6px;
  padding: 4px 7px;
  background: #fbfaf8;
  color: var(--muted);
  font-size: 12px;
}

.style-name-row p {
  margin: 6px 0;
  line-height: 1.6;
}

.names-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 3px;
  align-content: start;
}

.main.screen-main.with-project-context:has(.names-screen) {
  gap: 4px;
  padding-top: 6px;
}

.names-screen > .page-head {
  align-items: end;
  min-height: 0;
  margin-bottom: 0;
  padding: 0 2px;
}

.names-screen > .page-head h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.1;
}

.names-screen > .page-head p {
  margin: 0;
  font-size: 11px;
  line-height: 1.15;
}

.names-screen > .page-head button {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.names-workbench {
  display: grid;
  grid-template-columns: 450px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}

/* 严格姓名池基础组合页：控制区横置，左侧整栏只管理可组合字。 */
.names-screen.strict-names-top-layout {
  grid-template-columns: 450px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "heading modes"
    "controls controls"
    "characters results";
  column-gap: 10px;
  row-gap: 4px;
}

.strict-names-top-layout > .page-head {
  grid-area: heading;
}

.strict-names-top-layout > .name-combination-mode {
  grid-area: modes;
  min-width: 0;
}

.strict-names-top-layout > .nameology-combination-banner {
  grid-column: 1 / -1;
}

.strict-names-top-layout > .names-workbench,
.strict-names-top-layout > .names-workbench > .names-left-tools {
  display: contents;
}

.strict-names-top-layout .names-control-panel {
  grid-area: controls;
  grid-template-columns: 1.25fr 1fr .9fr 1.4fr .36fr;
  align-items: end;
  gap: 4px;
  min-width: 0;
  padding: 4px;
}

.strict-names-top-layout .names-control-section {
  min-width: 0;
  height: 100%;
  padding: 4px 5px;
}

.strict-names-top-layout .names-control-title {
  display: grid;
  margin-bottom: 2px;
}

.strict-names-top-layout .names-control-title strong {
  font-size: 10px;
  line-height: 1.1;
}

.strict-names-top-layout .names-project-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 104px;
  gap: 4px;
}

.strict-names-top-layout .strict-stroke-pair-row,
.strict-names-top-layout .names-find-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  margin-top: 0;
}

.strict-names-top-layout .strict-stroke-pair-row label {
  display: block;
}

.strict-names-top-layout .strict-stroke-pair-row label > span,
.strict-names-top-layout .names-control-row .field label,
.strict-names-top-layout .names-find-row .field label,
.strict-names-top-layout .name-search-controls .field label {
  display: none;
}

.strict-names-top-layout .names-control-row .field select,
.strict-names-top-layout .names-find-row .field input,
.strict-names-top-layout .name-search-controls select {
  height: 30px;
  padding: 4px 6px;
  font-size: 11px;
}

.strict-names-top-layout .strict-stroke-pair-row button,
.strict-names-top-layout .names-control-actions button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 10px;
}

.strict-names-top-layout .name-search-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.strict-names-top-layout .names-find-section,
.strict-names-top-layout .names-danger-section {
  position: relative;
}

.strict-names-top-layout .name-pinyin-match-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 190px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 12px 28px rgba(32, 59, 51, .18);
}

.strict-names-top-layout .names-danger-section summary {
  min-height: 30px;
  justify-content: center;
}

.strict-names-top-layout .names-danger-section summary strong {
  font-size: 10px;
}

.strict-names-top-layout .names-danger-row {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  width: 370px;
  margin-top: 0;
  border: 1px solid #e3c1ba;
  border-radius: 8px;
  background: #fff8f6;
  box-shadow: 0 12px 28px rgba(81, 39, 32, .18);
  padding: 8px;
}

.strict-names-top-layout .names-char-sidebar {
  grid-area: characters;
  align-self: stretch;
  height: 100%;
  max-height: none;
}

.strict-names-top-layout .names-result-panel {
  grid-area: results;
}

.strict-names-top-layout > .page-head p,
.strict-names-top-layout > .name-combination-mode > span {
  display: none;
}

@media (max-width: 1500px) {
  .strict-names-top-layout .names-control-panel {
    grid-template-columns: 1.15fr 1fr .9fr;
  }

  .strict-names-top-layout .names-filter-section {
    grid-column: 1 / 3;
  }
}

.names-left-tools {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
}

.names-control-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 5px;
}

.names-control-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.names-project-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 112px;
  align-items: end;
}

.names-project-row .names-control-actions {
  grid-column: auto;
}

.names-control-section {
  border: 1px solid #e2dbd1;
  border-radius: 8px;
  padding: 5px;
  background: #fffdf9;
}

.temporary-library-controls {
  border-left: 4px solid #7a6297;
  background: #fbf9ff;
}

.temporary-library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
  align-items: center;
  margin-bottom: 5px;
}

.temporary-library-toolbar input {
  min-width: 0;
  height: 31px;
}

.temporary-library-batch {
  margin-bottom: 6px;
  padding: 7px;
  border: 1px solid #ded5e8;
  border-radius: 7px;
  background: #fff;
}

.temporary-library-batch-heading {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 5px;
}

.temporary-library-batch-heading strong {
  flex: 0 0 auto;
  color: #5e4779;
}

.temporary-library-batch-heading span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.temporary-library-batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: stretch;
}

.temporary-library-batch-row textarea {
  min-width: 0;
  min-height: 48px;
  max-height: 90px;
  padding: 7px 9px;
  resize: vertical;
  line-height: 1.5;
}

.temporary-library-batch-result {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #ded5e8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.temporary-library-batch-result .success {
  color: #276f5d;
}

.temporary-library-batch-result .warning {
  color: #9a5e23;
}

.temporary-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 4px;
  max-height: 270px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #ded5e8;
  border-radius: 7px;
  background: #fff;
}

.temporary-char-button {
  min-width: 0;
  min-height: 32px;
  padding: 3px;
  border-color: #d8cee2;
  background: #fff;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.temporary-char-button:hover {
  border-color: #7a6297;
  color: #5e4779;
}

.temporary-char-button.active {
  border-color: #6b5488;
  background: #6b5488;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.temporary-library-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.temporary-library-actions span {
  color: #5e4779;
  font-weight: 700;
}

.temporary-library-summary {
  padding: 12px;
  border: 1px solid #ded5e8;
  border-radius: 10px;
  background: #fbf9ff;
}

.temporary-library-summary h3 {
  margin: 0 0 4px;
}

.temporary-library-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 9px 0;
  color: #5e4779;
}

.temporary-library-count strong {
  font-size: 30px;
  line-height: 1;
}

.temporary-library-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #e4ddec;
  border-radius: 7px;
  background: #fff;
}

.temporary-library-selected-list span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: #eee8f5;
  color: #5e4779;
  font-size: 17px;
  font-weight: 700;
}

.temporary-library-selected-list em {
  color: var(--muted);
  font-style: normal;
}

.temporary-library-selected-list.customer-specified-list {
  display: grid;
  grid-template-columns: 1fr;
  max-height: 330px;
}

.temporary-library-selected-list .customer-specified-char {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  width: auto;
  height: auto;
  min-height: 46px;
  padding: 6px 8px;
  place-items: initial;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  text-align: left;
}

.temporary-library-selected-list .customer-specified-char b {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 22px;
  text-align: center;
}

.temporary-library-selected-list .customer-specified-char small {
  color: #5e4779;
  font-size: 12px;
  font-weight: 700;
}

.temporary-library-selected-list .customer-specified-char em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temporary-library-selected-list .customer-specified-char.review_deleted {
  background: #fff5df;
}

.temporary-library-selected-list .customer-specified-char.first_level_excluded {
  background: #f9e8e5;
}

.name-library-check-panel {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(460px, 1.2fr);
  gap: 20px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.name-library-check-screen { overflow: hidden; }
.name-library-check-form { min-height: 0; display: grid; align-content: start; gap: 12px; }
.name-library-check-form > .field { margin: 0; }
.name-library-check-form textarea { min-height: 260px; resize: vertical; line-height: 1.7; }
.name-library-check-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 6px; }
.name-library-check-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.name-library-check-actions span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.name-library-check-empty { min-height: 180px; display: grid; place-items: center; color: var(--muted); text-align: center; border: 1px dashed #d9d2c8; border-radius: 14px; padding: 24px; }
.name-library-check-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 12px; background: #f3f8f5; border-radius: 12px; }
.name-library-check-summary span { color: var(--muted); font-size: 13px; }
.name-library-check-list { display: grid; gap: 12px; }
.name-library-check-card { border: 1px solid #ded8cf; border-left: 5px solid #b77b3c; border-radius: 14px; padding: 14px; background: #fff; }
.name-library-check-card.passed { border-left-color: #287c69; background: #fbfefd; }
.name-library-check-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.name-library-check-card > header strong { font-size: 24px; letter-spacing: .08em; }
.name-library-check-card > header span { color: #9b5d24; font-size: 13px; font-weight: 700; }
.name-library-check-card.passed > header span { color: #287c69; }
.name-library-check-characters { display: grid; gap: 8px; }
.name-library-check-character { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: #f7f5f1; }
.name-library-check-character b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #fff; font-size: 24px; }
.name-library-check-character div { display: grid; gap: 3px; }
.name-library-check-character div strong { font-size: 14px; }
.name-library-check-character div span { color: var(--muted); font-size: 13px; }
.name-library-check-character.review_deleted { background: #fff8e8; }
.name-library-check-character.first_level_excluded { background: #fff1f2; }

@media (max-width: 980px) {
  .name-library-check-panel { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .name-library-check-form textarea { min-height: 150px; }
}

.names-project-section { border-left: 4px solid #4f7f9b; }
.names-find-section { border-left: 4px solid var(--green); background: #fbfffc; }
.names-filter-section { border-left: 4px solid #c3903c; background: #fffaf1; }
.names-danger-section { border-left: 4px solid #c84d43; background: #fff8f6; }

.names-danger-section summary {
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
  list-style: none;
}

.names-danger-section summary strong {
  font-size: 13px;
  line-height: 1.15;
}

.names-danger-section summary::-webkit-details-marker { display: none; }

.names-danger-section summary span {
  display: none;
}

.names-danger-section summary::after {
  content: "展开";
  align-self: flex-start;
  margin-top: 1px;
  color: var(--green);
  font-size: 11px;
}

.names-danger-section[open] summary::after { content: "收起"; }

.names-control-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 2px;
  color: var(--text);
}

.names-control-title strong {
  font-size: 13px;
  line-height: 1.15;
}

.names-control-title span {
  display: none;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.names-find-row,
.names-danger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: end;
  gap: 5px;
  margin-top: 3px;
}

.names-danger-row .warning {
  min-height: 28px;
}

.names-control-row .record-picker {
  margin: 0;
  max-width: none;
}

.names-control-row .field select,
.names-find-row .field input,
.names-danger-row .field input,
.name-search-controls select {
  height: 32px;
  padding: 5px 8px;
  font-size: 13px;
}

.names-control-row .field label,
.name-search-controls .field label {
  margin-bottom: 2px;
  font-size: 11px;
}

.names-control-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.names-control-actions button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
  flex: 1;
}

.name-search-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 6px;
  max-width: none;
  margin-top: 0;
}

.name-search-controls .field {
  min-width: 0;
}

.name-search-controls select {
  min-width: 0;
}

.names-char-sidebar {
  min-height: 0;
  overflow: hidden;
  padding: 6px;
}

.names-result-panel {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px;
}

.names-result-panel > .page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-height: 0;
  margin: 0;
}

.names-result-panel > .page-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.names-result-panel > .page-head p {
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.1;
}

.names-result-panel .name-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 152px));
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

.names-result-meta {
  display: flex;
  gap: 3px;
  min-height: 0;
  align-items: flex-start;
  flex-wrap: wrap;
}

.names-result-panel .name-stats div {
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 6px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.names-result-panel .name-stats strong {
  display: block;
  margin-right: 0;
  font-size: 18px;
  line-height: 1.05;
}

.names-result-panel .name-stats span {
  display: block;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.names-result-panel .screen-list-area {
  min-height: clamp(840px, calc(100vh - 300px), 940px);
  overflow: auto;
  padding-right: 2px;
  align-self: stretch;
}

.names-result-panel .name-columns {
  height: auto;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  grid-auto-rows: 26px;
  gap: 3px 4px;
  align-content: start;
}

.names-result-panel .name-column {
  grid-template-rows: none;
  grid-auto-rows: 26px;
  align-content: start;
  gap: 3px;
}

.names-result-panel .quick-name-item {
  min-height: 26px;
  border-radius: 3px;
}

.names-result-panel .quick-name-main {
  height: auto;
  min-height: 26px;
  justify-content: center;
  padding: 3px 5px;
}

.names-result-panel .name-text {
  font-size: 14px;
  line-height: 1.05;
  white-space: nowrap;
  font-weight: 600;
}

.names-result-panel .quick-name-actions {
  left: 0;
  right: 0;
  gap: 3px;
  padding: 4px;
}

.names-result-panel .quick-name-actions button {
  min-height: 20px;
  padding: 2px 4px;
  font-size: 10px;
}

.names-result-panel .quick-name-item.combined-meaning-actions .quick-name-actions,
.names-result-panel .quick-name-item.combined-meaning-actions:hover .quick-name-actions {
  display: none;
}

.names-result-panel .fixed-bottom-actions {
  gap: 5px;
  padding-top: 3px;
  font-size: 11px;
}

.strict-names-result-panel .screen-list-area {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.project-context-content:has(> .name-pool-identity.strict + .names-screen) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.project-context-content:has(> .name-pool-identity.strict + .names-screen) > .name-pool-identity {
  margin-bottom: 0;
}

.project-context-content:has(> .name-pool-identity.strict + .names-screen) > .names-screen {
  height: auto;
}

.strict-names-result-panel,
.strict-names-result-panel > * {
  min-width: 0;
}

.strict-names-result-panel .name-stats {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  width: 100%;
}

.names-result-panel .name-columns.strict-name-columns {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-auto-rows: 184px;
  height: 100%;
  gap: 8px;
  overflow: hidden;
}

.names-result-panel .strict-name-columns .quick-name-item.with-strict-proof {
  height: 184px;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
}

.names-result-panel .strict-name-columns .with-strict-proof .quick-name-main {
  min-height: 0;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 7px;
  padding: 9px;
}

.names-result-panel .strict-name-columns .with-strict-proof .name-text {
  font-size: 18px;
  line-height: 1.15;
  text-align: center;
}

.strict-name-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid #e7dece;
  background: #fbf8f1;
  padding: 6px;
}

.strict-name-card-actions button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 3px;
  font-size: 10px;
  white-space: nowrap;
}

.strict-names-result-panel .fixed-bottom-actions {
  position: static;
  z-index: 8;
  min-height: 38px;
  margin-top: 0;
  border-top: 1px solid #cfdcd7;
  background: rgba(255, 255, 255, .97);
  padding: 6px 0 0;
}

.strict-name-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.strict-name-page-jump input {
  width: 58px;
  height: 28px;
  padding: 3px 5px;
  text-align: center;
}

.name-combination-mode {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid #d9e3df;
  border-radius: 8px;
  background: #f8fbfa;
}

.name-combination-mode button {
  min-height: 28px;
  padding: 5px 13px;
  font-size: 12px;
}

.name-combination-mode button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.name-combination-mode span {
  color: var(--muted);
  font-size: 12px;
}

.template-mode-note {
  min-height: 32px;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 4px 8px;
  border: 1px solid #d7e8e1;
  border-radius: 6px;
  background: #f2faf7;
}

.template-mode-note strong {
  color: #1f6958;
  font-size: 12px;
}

.template-mode-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.template-filter-section {
  border-left: 4px solid #c3903c;
  background: #fffaf1;
}

.surname-homophone-filter-section {
  border-left: 4px solid #8c6a9d;
  background: #fbf8fd;
}

.surname-homophone-title span {
  display: block;
}

.surname-homophone-phrase-list {
  display: grid;
  gap: 5px;
  max-height: 310px;
  overflow: auto;
  padding-right: 2px;
}

.surname-homophone-phrase {
  width: 100%;
  min-height: 64px;
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid #d8cedf;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.surname-homophone-phrase > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.surname-homophone-phrase strong {
  color: #594065;
  font-size: 18px;
}

.surname-homophone-phrase em {
  color: #78657f;
  font-size: 10px;
  font-style: normal;
}

.surname-homophone-phrase small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.surname-homophone-phrase b {
  color: var(--green);
  font-size: 10px;
}

.surname-homophone-phrase.active {
  border-color: #765685;
  box-shadow: inset 3px 0 0 #765685;
  background: #f6eff9;
}

.surname-homophone-phrase.unavailable {
  border-color: #e5e1dc;
  background: #f4f2ef;
  opacity: .66;
}

.surname-homophone-phrase.unavailable b {
  color: var(--muted);
}

.surname-homophone-bridge {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 7px 9px;
  border: 1px solid #ded4e4;
  border-radius: 7px;
  background: #fff;
}

.surname-homophone-bridge > strong {
  font-size: 12px;
}

.surname-homophone-bridge > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.surname-homophone-bridge button {
  min-height: 29px;
  padding: 4px 8px;
}

.surname-homophone-bridge button small {
  margin-left: 3px;
  font-size: 9px;
}

.surname-homophone-bridge .warning-text {
  margin: 0;
  color: #a05b3f;
  font-size: 10px;
}

.surname-homophone-actions {
  justify-content: space-between;
}

.surname-homophone-summary {
  gap: 9px;
}

.surname-homophone-steps {
  display: grid;
  gap: 6px;
}

.surname-homophone-steps > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 8px;
  border-left: 3px solid #8c6a9d;
  background: #faf7fc;
}

.surname-homophone-steps b {
  color: #654c72;
  font-size: 11px;
}

.surname-homophone-steps span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.surname-homophone-selected {
  padding: 10px;
  border: 1px solid #d9cfe0;
  border-radius: 7px;
  background: #fff;
}

.surname-homophone-selected span,
.surname-homophone-selected p {
  color: var(--muted);
  font-size: 11px;
}

.surname-homophone-selected strong {
  display: block;
  margin: 5px 0;
  color: #594065;
  font-size: 17px;
}

.surname-homophone-selected p {
  margin: 0;
  line-height: 1.5;
}

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

.template-controls-grid .field {
  min-width: 0;
}

.template-controls-grid label {
  margin-bottom: 2px;
  font-size: 11px;
}

.template-controls-grid select,
.template-controls-grid input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 5px 8px;
  font-size: 13px;
}

.template-filter-actions {
  justify-content: flex-start;
  margin-top: 6px;
}

.template-filter-actions button {
  min-height: 30px;
  padding: 5px 12px;
  font-size: 12px;
}

.template-catalog-sidebar {
  overflow: auto;
  background: #fbfdfc;
}

.template-catalog {
  display: grid;
  align-content: start;
  gap: 8px;
}

.template-catalog .page-head {
  margin: 0;
}

.template-catalog .page-head h3 {
  margin: 0;
  font-size: 16px;
}

.template-catalog .page-head p {
  margin-top: 2px;
  font-size: 11px;
}

.template-catalog-counts,
.template-name-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.template-catalog-counts > div,
.template-name-stats > div {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d9e5e0;
  border-radius: 7px;
  background: #f3f8f6;
}

.template-catalog-counts strong,
.template-name-stats strong {
  color: #215e51;
  font-size: 18px;
  line-height: 1;
}

.template-catalog-counts span,
.template-name-stats span {
  color: var(--muted);
  font-size: 11px;
}

.template-virtual-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.template-virtual-list button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 4px 2px;
  border-color: #cddbd6;
  background: #fff;
  color: var(--ink);
}

.template-virtual-list button strong {
  font-size: 18px;
  line-height: 1;
}

.template-virtual-list button span {
  color: var(--muted);
  font-size: 10px;
}

.template-virtual-list button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.template-virtual-list button.active span {
  color: #eaf6f2;
}

.template-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.template-category-list span {
  padding: 5px 7px;
  border: 1px solid #e1ddd5;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.template-category-list strong {
  color: var(--ink);
}

.template-name-stats {
  grid-template-columns: repeat(4, minmax(110px, 145px));
  width: max-content;
  max-width: 100%;
}

.template-name-stats > div {
  min-height: 48px;
}

.template-name-stats .priority {
  border-color: #a7d5c5;
  background: #edf8f4;
}

.template-name-stats .reference {
  border-color: #d8d8c7;
  background: #fafaf2;
}

.template-name-stats .caution {
  border-color: #ebc7a8;
  background: #fff6ed;
}

.template-message {
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
}

.template-result-panel .name-columns {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(88px, auto);
  gap: 8px;
}

.template-result-panel .name-column {
  grid-auto-rows: minmax(88px, auto);
  gap: 8px;
}

.template-result-panel .quick-name-item {
  min-height: 88px;
  overflow: visible;
  border-radius: 9px;
}

.template-result-panel .quick-name-main {
  min-height: 88px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 5px;
  padding: 10px;
}

.template-result-panel .name-text {
  font-size: 19px;
}

.template-name-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.template-name-badge.priority {
  background: #dff3eb;
  color: #176853;
}

.template-name-badge.reference {
  background: #f1f0e5;
  color: #74642c;
}

.template-name-badge.caution {
  background: #fde8dc;
  color: #a14f30;
}

.template-name-reason {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.template-result-panel .quick-name-item.template-priority {
  border-color: #8fc9b5;
  background: #f5fcf9;
}

.template-result-panel .quick-name-item.template-reference {
  border-color: #d9d5bd;
  background: #fffef8;
}

.template-result-panel .quick-name-item.template-caution {
  border-color: #e5b18d;
  background: #fff8f3;
}

.name-char-picker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
}

.name-char-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.name-char-picker-title {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.name-char-picker-head span {
  font-size: 12px;
  line-height: 1.15;
}

.name-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
  gap: 2px;
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.name-char-grid button {
  min-height: 32px;
  padding: 2px 2px 1px;
  border-color: #d9e3df;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  border-radius: 5px;
  box-shadow: none;
}

.name-char-tile {
  position: relative;
  display: grid;
  place-content: center;
  gap: 0;
  line-height: 1;
}

.name-char-position {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  padding: 1px 2px;
  border-radius: 4px;
  background: #e8f4ef;
  color: #236b5d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.name-char-position-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  margin-top: 3px;
  color: #6f7772;
  font-size: 10px;
  line-height: 1.3;
}

.name-char-position-legend b {
  border-radius: 4px;
  background: #e8f4ef;
  color: #236b5d;
  padding: 1px 3px;
  font-size: 10px;
}

.name-char-position-legend b.first {
  background: #eaf2fb;
  color: #315f87;
}

.name-char-position-legend b.second {
  background: #fbf1e5;
  color: #8b5c24;
}

.name-char-position.first {
  background: #eaf2fb;
  color: #315f87;
}

.name-char-position.second {
  background: #fbf1e5;
  color: #8b5c24;
}

.name-char-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  margin-top: 2px;
  line-height: 1;
}

.name-char-foot .name-char-pinyin {
  min-width: 0;
  margin-top: 0;
  font-size: 8px;
}

.name-char-foot .name-char-position {
  position: static;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 1px;
  border-radius: 3px;
  font-size: 8px;
  line-height: 1.1;
}

.name-char-glyph {
  font-size: 16px;
  font-weight: 400;
}

.name-char-pinyin {
  margin-top: 2px;
  color: #748078;
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
}

.name-char-tile.pinyin-sorted {
  border-color: hsl(var(--pinyin-hue) 42% 71%);
  background: hsl(var(--pinyin-hue) 55% 96%);
}

.name-char-tile.pinyin-sorted .name-char-pinyin {
  color: hsl(var(--pinyin-hue) 38% 35%);
}

.name-char-sort {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.name-char-sort button {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid #bfd3cc;
  border-radius: 6px;
  background: #fff;
  color: #3d665e;
  font-size: 11px;
  line-height: 1;
}

.character-meaning-popover {
  position: fixed;
  z-index: 90;
  max-height: min(620px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid #9fc6b9;
  border-radius: 12px;
  background: #fffefb;
  box-shadow: 0 18px 46px rgba(28, 53, 47, 0.2);
  color: var(--ink);
  padding: 13px;
}

.character-meaning-popover[hidden] {
  display: none;
}

.character-meaning-head,
.character-meaning-title,
.character-meaning-actions {
  display: flex;
  align-items: center;
}

.character-meaning-head {
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #dbe8e3;
}

.character-meaning-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.character-meaning-name-elements {
  color: #5b746d;
  font-size: 13px;
  font-weight: 700;
}

.character-meaning-kicker {
  border-radius: 999px;
  background: #e3f2ec;
  color: #226d58;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.character-meaning-close {
  width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f2;
  color: #66736e;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.character-meaning-list {
  display: grid;
  gap: 9px;
  margin-top: 9px;
}

.character-meaning-entry {
  border: 1px solid #e1e9e5;
  border-radius: 9px;
  background: #fff;
  padding: 10px;
}

.character-meaning-entry.missing {
  border-style: dashed;
  background: #fafaf8;
}

.character-meaning-title {
  gap: 7px;
  margin-bottom: 6px;
}

.character-meaning-title strong {
  color: #194f41;
  font-size: 24px;
  line-height: 1;
}

.character-meaning-title span {
  color: var(--muted);
  font-size: 12px;
}

.character-meaning-title em {
  margin-left: auto;
  border-radius: 999px;
  background: #edf6f2;
  color: #4f786c;
  padding: 2px 7px;
  font-size: 10px;
  font-style: normal;
}

.character-meaning-entry p {
  margin: 5px 0 0;
  color: #3e4e49;
  font-size: 13px;
  line-height: 1.55;
}

.character-meaning-entry p b {
  display: inline-block;
  min-width: 64px;
  color: #6a756f;
  font-size: 11px;
}

.character-meaning-note {
  border-top: 1px dashed #eadfc9;
  padding-top: 7px;
  color: #765b32 !important;
}

.character-meaning-source {
  color: #7a827e !important;
  font-size: 11px !important;
}

.character-meaning-missing {
  color: #888f8b !important;
}

.character-meaning-actions {
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e3e9e6;
}

.character-meaning-actions span {
  color: var(--muted);
  font-size: 11px;
}

.character-meaning-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.character-meaning-name-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e3e9e6;
}

.character-meaning-name-actions button {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.character-meaning-loading {
  color: var(--muted);
  padding: 15px 8px;
  text-align: center;
}

.character-meaning-loading.error {
  color: var(--danger);
}

.name-char-sort button.active {
  border-color: #1f6f64;
  background: #1f6f64;
  color: #fff;
}

.name-char-grid button.active {
  border-color: #1f6f64;
  background: #e8f7ee;
  color: #126044;
  box-shadow: inset 0 0 0 1px rgba(31, 111, 100, 0.22);
}

.names-char-sidebar .name-char-picker-head strong {
  font-size: 16px;
}

.names-char-sidebar .name-char-grid {
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 4px;
}

.names-char-sidebar .name-char-grid button {
  min-height: 42px;
  padding: 2px 4px;
  font-weight: 400;
}

.names-char-sidebar .name-char-glyph {
  font-size: 20px;
  font-weight: 400;
}

.names-char-sidebar .name-char-pinyin {
  font-size: 10px;
}

.name-pinyin-match-panel {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #c8ded5;
  border-radius: 7px;
  background: #f4fbf7;
}

.name-pinyin-match-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.name-pinyin-match-head strong {
  color: #245f54;
  font-size: 12px;
}

.name-pinyin-match-head span {
  color: var(--muted);
  font-size: 10px;
}

.name-pinyin-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 4px;
  max-height: 108px;
  overflow: auto;
}

.name-pinyin-match-grid button {
  min-height: 38px;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 3px;
  border-color: #b8d5c9;
  background: #fff;
  color: var(--ink);
}

.name-pinyin-match-grid b {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.name-pinyin-match-grid span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.name-search-info {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 92px;
  margin-top: -34px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  flex: 0 1 680px;
  max-width: min(680px, 72%);
}

.name-search-info.available {
  border-color: #a8d7b7;
  background: #f7fcf9;
}

.name-search-info.unavailable {
  border-color: #e3b6ad;
  background: #fff8f6;
}

.name-search-char {
  display: grid;
  place-items: center;
  gap: 4px;
  border-right: 1px solid var(--line);
  text-align: center;
  padding-right: 10px;
}

.name-search-char strong {
  font-size: 42px;
  line-height: 1;
  font-family: "Songti SC", "Noto Serif SC", serif;
}

.name-search-char span {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
}

.name-search-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 16px;
  align-content: center;
}

.name-search-meta p {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-search-meta .notice {
  grid-column: 1 / -1;
  margin: 0;
}

.project-style-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.unique-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.unique-work-panel {
  display: grid;
  gap: 8px;
}

.unique-funnel {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #c8dfd7;
  border-left: 4px solid #2d6a4f;
  border-radius: 7px;
  background: linear-gradient(100deg, #f1faf6 0%, #fbfaf7 100%);
}

.unique-funnel.waiting {
  border-color: #dfd7c8;
  border-left-color: #b8893e;
  background: #fffaf1;
}

.unique-funnel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unique-funnel-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.unique-funnel-head strong { font-size: 14px; }
.unique-funnel-head span { color: var(--muted); font-size: 11px; }
.unique-funnel-head em {
  flex: none;
  color: #9a641e;
  font-size: 11px;
  font-style: normal;
}

.unique-funnel-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr) auto) minmax(92px, 1fr) minmax(92px, 1fr);
  gap: 6px;
  align-items: center;
}

.unique-funnel-steps > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(45, 106, 79, .13);
  border-radius: 5px;
  background: rgba(255, 255, 255, .78);
}

.unique-funnel-steps > b { color: #8aa096; font-size: 12px; }
.unique-funnel-steps span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.unique-funnel-steps strong { color: var(--ink); font-size: 15px; }
.unique-funnel-steps .priority { border-color: #9bcdb7; background: #e5f6ed; }
.unique-funnel-steps .priority strong { color: #176244; }
.unique-funnel-steps .extended { border-color: #d8c598; background: #fff8e8; }
.unique-funnel-steps .extended strong { color: #8b641d; }

.unique-work-top {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 12px;
  align-items: end;
}

.unique-main-actions {
  justify-content: flex-end;
  align-items: end;
}

.unique-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.unique-stats div {
  padding: 6px 8px;
}

.unique-stats strong {
  font-size: 17px;
}

.unique-stats span {
  font-size: 12px;
}

.unique-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.unique-tabs button {
  padding: 6px 10px;
}

.unique-tabs button.active {
  background: #1f2933;
  border-color: #1f2933;
}

.unique-tabs span {
  margin-left: 4px;
  font-size: 12px;
  opacity: 0.72;
}

.unique-filter-row {
  display: grid;
  grid-template-columns: 140px minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.unique-filter-actions {
  display: flex;
  gap: 7px;
  align-items: end;
}

.unique-filter-actions button,
.unique-main-actions button {
  padding: 7px 10px;
  white-space: nowrap;
}

.unique-result-panel {
  min-height: 0;
}

.unique-result-panel .screen-list-area {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.unique-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  grid-auto-rows: 44px;
  gap: 6px;
  align-content: start;
}

.unique-name-card {
  position: relative;
  min-width: 0;
  height: 44px;
  border: 1px solid #d5e1dc;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.unique-name-card:hover,
.unique-name-card:focus-within {
  border-color: #7eaa9b;
  box-shadow: 0 2px 8px rgba(31, 70, 58, 0.1);
}

.unique-name-card.favorite {
  border-color: #d9bd79;
  background: #fffdf6;
}

.unique-name-card.auto-priority {
  border-color: #a7ccb9;
  background: #f8fcfa;
}

.unique-name-card.auto-extended {
  border-color: #ddd0aa;
  background: #fffdf8;
}

.unique-name-card.candidate {
  border-color: #80b69f;
  background: #e9f6ef;
}

.unique-name-card.hidden {
  border-color: #d3d6da;
  background: #f3f4f6;
  opacity: 0.72;
}

.unique-name-main {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  padding: 5px 9px;
}

.unique-name-main:hover {
  box-shadow: none;
}

.unique-name-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .03em;
}

.unique-name-actions {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.unique-name-actions button {
  min-height: 25px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(4px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}

.unique-name-card:hover .unique-name-actions button,
.unique-name-card:focus-within .unique-name-actions button {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.unique-name-actions .candidate-only {
  color: #286b55;
  background: rgba(255, 255, 255, .96);
  border-color: #8cb8a8;
}

.unique-name-actions .restore-only {
  color: #58636b;
  background: rgba(255, 255, 255, .96);
  border-color: #b9c0c4;
}

.unique-name-selected-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d4ecdf;
  color: #287056;
  font-size: 13px;
  font-weight: 900;
}

.unique-detail-modal {
  width: min(760px, calc(100vw - 72px));
  max-height: min(780px, calc(100vh - 70px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #b8d5cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.unique-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.unique-auto-detail {
  border-color: #c7ded6;
  border-left: 4px solid #2d6a4f;
  background: #f2faf6;
}

.unique-auto-detail.extended {
  border-color: #dfd0aa;
  border-left-color: #b8893e;
  background: #fffaf0;
}

.unique-auto-detail > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.unique-auto-detail span,
.unique-auto-detail em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.unique-auto-detail p { margin: 7px 0 4px; }

.unique-style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.unique-style-tags span {
  border: 1px solid #c7ded6;
  border-radius: 999px;
  background: #f3fbf7;
  padding: 3px 9px;
  color: #25635b;
  font-weight: 800;
  font-size: 12px;
}

.unique-match-list {
  display: grid;
  gap: 7px;
}

.unique-match-list div {
  display: grid;
  grid-template-columns: 110px 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #eee8df;
  padding-bottom: 7px;
}

.unique-match-list span,
.unique-match-list em {
  min-width: 0;
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-style-topline {
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.project-style-panel {
  gap: 6px;
}

.project-style-panel .record-picker {
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.project-style-panel .record-picker label {
  margin: 0;
  white-space: nowrap;
}

.project-style-panel .style-profile-buttons {
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.project-style-panel .style-profile-buttons::-webkit-scrollbar {
  display: none;
}

.project-style-panel .style-profile-buttons button {
  min-width: 72px;
  padding: 5px 7px;
  font-size: 12px;
}

.project-style-panel .style-profile-card {
  grid-template-columns: minmax(180px, 0.8fr) minmax(360px, 1.5fr) minmax(260px, 1fr);
  align-items: stretch;
  gap: 6px;
  padding: 3px 5px;
}

.project-style-panel .style-profile-card h2 {
  font-size: 15px;
  margin-bottom: 2px;
}

.project-style-panel .style-profile-card p,
.style-profile-brief span,
.style-profile-warning {
  line-height: 1.35;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-profile-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.style-profile-brief span,
.style-profile-warning {
  border: 1px solid #e7e1d8;
  border-radius: 7px;
  background: #fff;
  padding: 5px 7px;
  color: var(--muted);
}

.style-profile-brief strong {
  margin-right: 6px;
  color: var(--ink);
}

.style-profile-warning {
  border-left: 4px solid var(--accent-2);
  color: #62411e;
}

.project-style-panel .compact-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.project-style-panel .compact-stats div {
  padding: 5px 8px;
}

.project-style-panel .compact-stats strong {
  font-size: 16px;
}

.project-style-panel .compact-stats span {
  font-size: 12px;
}

.project-style-actions button {
  padding: 6px 9px;
}

.project-style-workbench {
  min-width: 0;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.project-style-current-round {
  min-width: 0;
  display: grid;
}

.project-style-workflow {
  width: auto;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  padding: 9px;
  border: 1px solid #d7dedb;
  border-radius: 10px;
  background: #f7f9f8;
}

.workflow-title {
  display: block;
  padding: 2px 2px 7px;
  border-bottom: 1px solid #dce3df;
  background: transparent;
  color: var(--ink);
}

.workflow-title strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
}

.workflow-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(34px, 1fr);
  gap: 5px;
}

.workflow-step {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #ddd7ce;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.workflow-step.selected {
  box-shadow: inset 0 0 0 1px currentColor;
}

.workflow-step > span,
.round-number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e7ecea;
  color: #52615c;
  font-weight: 800;
  font-size: 12px;
}

.workflow-step div {
  min-width: 0;
}

.workflow-step strong,
.workflow-step em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step strong {
  font-size: 11px;
}

.workflow-step em {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.workflow-step.done,
.workflow-step.ready {
  border-color: #bcd8cc;
  background: #f2faf6;
}

.workflow-step.done > span,
.workflow-step.ready > span {
  background: var(--primary);
  color: #fff;
}

.workflow-step.current {
  border-color: #c79749;
  background: #fff8ea;
}

.workflow-step.current > span {
  background: #b47b2d;
  color: #fff;
}

.workflow-step.paused {
  border-color: #d8b77f;
  background: #fff8ea;
}

.workflow-step.paused > span {
  background: #a65d12;
  color: #fff;
}

.workflow-step.failed {
  border-color: rgba(192, 57, 43, 0.35);
  background: #fff4f2;
}

.workflow-step.failed > span {
  background: #c0392b;
  color: #fff;
}

.workflow-step.locked,
.workflow-step.future {
  opacity: 0.62;
  background: #f4f3f0;
}

.project-style-round-card {
  width: 100%;
  display: grid;
  gap: 7px;
  justify-self: stretch;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cfe0da;
  border-left: 4px solid var(--primary);
  border-radius: 9px;
  background: linear-gradient(90deg, #f4fbf8 0%, #fff 70%);
}

.project-style-round-one.current {
  border-color: #e0cda9;
  border-left-color: #b47b2d;
  background: linear-gradient(90deg, #fff9ee 0%, #fff 70%);
}

.project-style-round-card.locked {
  border-color: #ddd9d1;
  border-left-color: #aaa59c;
  background: #f7f6f3;
}

.round-card-head,
.round-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.first-round-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}

.round-card-head > button,
.first-round-actions button,
.quick-review-head > .row button {
  padding: 5px 8px;
  font-size: 11px;
}

.first-round-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
}

.first-round-more-menu {
  position: relative;
  flex: 0 0 auto;
}

.first-round-more-menu > summary {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #cfd7d3;
  border-radius: 7px;
  background: #fff;
  color: #61706a;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  list-style: none;
}

.first-round-more-menu > summary::-webkit-details-marker {
  display: none;
}

.first-round-more-menu[open] > div {
  position: absolute;
  z-index: 8;
  top: calc(100% + 5px);
  right: 0;
  width: max-content;
  padding: 6px;
  border: 1px solid #d8ddd9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 41, 51, .12);
}

.first-round-actions button {
  min-height: 28px;
  border-radius: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.first-round-actions .first-round-current-action {
  border-color: #246c58;
  background: #246c58;
  color: #fff;
}

.first-round-actions .first-round-all-action {
  border-color: #bb8735;
  background: #fff8e9;
  color: #895a17;
}

.first-round-actions .first-round-pause-action {
  border-color: #a76e22;
  background: #fff2d7;
  color: #7b4b0e;
}

.first-round-actions .first-round-retry-action {
  border-color: #bc544b;
  background: #fff1ef;
  color: #a33d35;
}

.round-title-wrap {
  justify-content: flex-start;
  min-width: 0;
}

.round-heading-copy {
  min-width: 0;
}

.round-heading-copy strong,
.round-heading-copy span {
  display: block;
}

.round-heading-copy strong {
  font-size: 14px;
}

.round-heading-copy span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-round-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
}

.first-round-flow > div {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid #e2ddd5;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.85);
}

.first-round-flow > div:not(:last-child)::after {
  content: "›";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -7px;
  width: 13px;
  height: 18px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  color: #8b9893;
  font-size: 16px;
  font-weight: 800;
}

.first-round-flow > div.pending {
  border-color: #e8d3aa;
  background: #fff8eb;
}

.first-round-flow > div.complete,
.first-round-flow > div.retain {
  border-color: #c9dfd5;
  background: #f2faf6;
}

.first-round-flow strong {
  font-size: 14px;
  white-space: nowrap;
}

.first-round-flow span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-round-flow em {
  grid-column: 1 / -1;
  display: none;
}

.task-progress-completed-summary {
  padding: 0;
  border-color: #bcd8cc;
  background: #f3faf6;
  overflow: hidden;
}

.task-progress-completed-summary > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 9px;
  cursor: pointer;
  list-style: none;
}

.task-progress-completed-summary > summary::-webkit-details-marker {
  display: none;
}

.completed-task-main,
.completed-task-facts {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.completed-task-main > div {
  min-width: 0;
}

.completed-task-main strong,
.completed-task-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-task-main strong {
  color: #245f4c;
  font-size: 12px;
}

.completed-task-main em {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.completed-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2d765e;
  color: #fff;
  font-weight: 900;
}

.completed-task-facts span,
.completed-task-facts b {
  padding: 3px 7px;
  border: 1px solid #cfe1d9;
  border-radius: 999px;
  background: #fff;
  color: #53645e;
  font-size: 9px;
  white-space: nowrap;
}

.completed-task-facts b {
  color: #24624e;
}

.task-detail-hint {
  padding: 4px 8px;
  border-color: #9ebeb2;
  border-radius: 999px;
  background: transparent;
  color: #2f6b57;
  font-size: 9px;
  box-shadow: none;
}

.task-progress-completed-summary[open] .task-detail-hint {
  background: #e1f1e9;
}

.task-progress-details {
  display: grid;
  gap: 7px;
  padding: 7px 9px 9px;
  border-top: 1px solid #d7e8e1;
}

.task-progress-completed-summary .task-progress-meta {
  font-size: 10px;
}

.task-progress-completed-summary .style-provider-progress {
  padding: 6px 8px;
}

.project-style-results:not(.one) {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

@media (max-width: 1180px) {
  .project-style-workbench {
    grid-template-columns: 1fr;
  }

  .project-style-workflow {
    grid-template-rows: auto auto;
  }

  .workflow-title {
    padding-bottom: 5px;
  }

  .workflow-steps {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    grid-auto-rows: 38px;
    overflow-x: auto;
  }

  .project-style-panel .style-profile-card {
    grid-template-columns: minmax(170px, .8fr) minmax(0, 1.4fr);
  }

  .project-style-panel .style-profile-warning {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .project-style-topline,
  .project-style-panel .style-profile-card,
  .project-style-results:not(.one) {
    grid-template-columns: 1fr;
  }

  .project-style-panel .record-picker {
    grid-template-columns: 1fr;
  }

  .project-style-panel .style-profile-brief,
  .first-round-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .first-round-flow > div::after {
    display: none !important;
  }

  .round-card-head,
  .quick-review-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .first-round-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* 项目智能筛选：A1.0 第一、二轮共用验收入口。 */
.smart-funnel-screen { gap: 10px; }
.smart-funnel-control { display: grid; gap: 10px; padding: 12px 14px; border-top: 3px solid #276d63; }
.smart-funnel-record-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.smart-funnel-record-row .record-picker { margin: 0; }
.smart-funnel-style-stack { min-width: 0; display: grid; gap: 8px; }
.smart-funnel-saved-styles { display: flex; align-items: flex-start; gap: 10px; padding: 7px 9px; border-radius: 8px; background: #edf7f3; }
.smart-funnel-saved-styles > span { flex: 0 0 auto; padding-top: 3px; color: #276d63; font-size: 11px; font-weight: 800; }
.smart-funnel-saved-styles > div { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 11px; }
.smart-funnel-saved-styles b { padding: 3px 7px; border: 1px solid #abd0c4; border-radius: 999px; background: white; color: #245f57; font-size: 10px; }
.smart-funnel-style-picker { min-width: 0; display: grid; gap: 5px; }
.smart-funnel-style-picker > header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.smart-funnel-style-picker > header > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.smart-funnel-style-picker > header > div { display: flex; gap: 5px; align-items: center; }
.smart-funnel-style-picker > header em { color: var(--muted); font-size: 10px; font-style: normal; }
.smart-funnel-style-picker > div { display: flex; flex-wrap: wrap; gap: 6px; }
.smart-funnel-style-picker button { min-height: 32px; padding: 6px 12px; }
.smart-funnel-style-picker button.mini { min-height: 24px; padding: 3px 8px; font-size: 10px; }
.smart-funnel-style-picker button.selected { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.smart-funnel-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.smart-funnel-steps > button { min-width: 0; min-height: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid #dedbd3; border-radius: 10px; background: #faf9f6; color: var(--ink); text-align: left; box-shadow: none; }
.smart-funnel-steps > button:hover:not(:disabled) { transform: none; border-color: #7fb4a8; background: #f3faf7; }
.smart-funnel-steps > button.active { border-color: #276d63; box-shadow: inset 0 0 0 1px #276d63, 0 5px 14px rgba(39, 109, 99, .11); }
.smart-funnel-steps > button:disabled { cursor: not-allowed; opacity: .55; }
.smart-funnel-steps b { grid-row: 1 / 3; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #ece9e1; color: #6f746f; }
.smart-funnel-steps span { overflow: hidden; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.smart-funnel-steps em { color: var(--muted); font-size: 10px; font-style: normal; }
.smart-funnel-steps .completed { border-color: #9fcbbd; background: #eef8f4; color: var(--ink); }
.smart-funnel-steps .completed b { background: #276d63; color: white; }
.smart-funnel-steps .running { border-color: #c89b43; background: #fff8e9; color: var(--ink); }
.smart-funnel-steps .running b { background: #b68022; color: white; }
.smart-funnel-steps .pending { border-color: #7eb5aa; background: #f4fbf8; color: var(--ink); }
.smart-funnel-rounds { display: block; }
.smart-funnel-rounds > .smart-funnel-round-card { display: none; }
.smart-funnel-rounds > .smart-funnel-round-card.active { display: grid; }
.smart-funnel-round-card { min-width: 0; margin: 0; padding: 14px; display: grid; align-content: start; gap: 11px; }
.smart-funnel-round-card.ready { border-top: 3px solid #276d63; }
.smart-funnel-round-card.locked { opacity: .72; }
.smart-funnel-round-three { grid-column: auto; }
.smart-funnel-round-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.smart-funnel-round-head > div:first-child { min-width: 0; }
.smart-funnel-round-head > div > span { color: #9a6b22; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.smart-funnel-round-head h2 { margin: 2px 0 3px; font-size: 18px; }
.smart-funnel-round-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.smart-funnel-round-head button { flex: 0 0 auto; white-space: nowrap; }
.smart-funnel-stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.smart-funnel-stat-row > div { min-width: 0; display: grid; gap: 2px; padding: 9px; border-radius: 8px; background: #f4f6f4; }
.smart-funnel-stat-row strong { font-size: 16px; }
.smart-funnel-stat-row span { color: var(--muted); font-size: 10px; }
.smart-funnel-provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.smart-funnel-provider-grid > div { display: grid; gap: 6px; padding: 10px; border: 1px solid #dbe5df; border-radius: 9px; background: #fbfdfc; }
.smart-funnel-provider-grid header { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.smart-funnel-provider-grid header span { color: var(--muted); }
.smart-funnel-total-progress { display: grid; grid-template-columns: 1fr auto; gap: 6px; color: var(--muted); font-size: 11px; }
.smart-funnel-total-progress em { font-style: normal; }
.smart-funnel-total-progress .progress { grid-column: 1 / -1; }
.smart-funnel-results { min-height: 320px; margin: 0; padding: 14px; display: grid; align-content: start; gap: 10px; }
.smart-funnel-results-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.smart-funnel-results-head h2 { margin: 0 0 2px; font-size: 18px; }
.smart-funnel-results-head p { margin: 0; color: var(--muted); font-size: 11px; }
.smart-funnel-results-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.smart-funnel-result-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.smart-funnel-export { display: flex; align-items: center; gap: 6px; }
.smart-funnel-export select { min-height: 30px; width: auto; min-width: 112px; padding: 5px 28px 5px 9px; }
.smart-funnel-export button { min-height: 30px; padding: 5px 10px; white-space: nowrap; }
.smart-funnel-result-tools { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; background: #f5f7f5; }
.smart-funnel-style-filters { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.smart-funnel-style-filters button { min-height: 29px; padding: 5px 9px; font-size: 10px; }
.smart-funnel-pagination { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.smart-funnel-pagination span { color: var(--muted); font-size: 11px; }
.smart-funnel-pagination button { min-height: 30px; padding: 5px 10px; }
.smart-funnel-name-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.smart-funnel-name-card { min-width: 0; border: 1px solid #d9e4de; border-radius: 9px; background: #f8fcfa; }
.smart-funnel-name-card.disagreement { border-color: #e0b96a; background: #fffaf0; }
.smart-funnel-name-card summary { min-height: 42px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; cursor: pointer; list-style: none; }
.smart-funnel-name-card summary::-webkit-details-marker { display: none; }
.smart-funnel-name-card summary strong { font-size: 16px; }
.smart-funnel-name-card summary span { color: var(--muted); font-size: 10px; }
.smart-funnel-name-card summary em { grid-column: 2; grid-row: 1 / 3; color: #a66818; font-size: 9px; font-style: normal; }
.smart-funnel-review-lines { display: grid; gap: 5px; padding: 8px 10px 10px; border-top: 1px solid #e7ece8; }
.smart-funnel-review-lines p { margin: 0; display: flex; justify-content: space-between; gap: 6px; font-size: 10px; }
.smart-funnel-review-lines .risk { color: #b5473b; }
.smart-funnel-empty { min-height: 180px; display: grid; place-items: center; color: var(--muted); background: #fafaf8; border: 1px dashed #ddd9cf; border-radius: 10px; }

/* 项目智能筛选：四区工作台。任务操作、状态、名单入口和名单内容各自独立。 */
.smart-funnel-command-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.smart-funnel-zone {
  min-width: 0;
  margin: 0;
  padding: 13px 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-top-width: 4px;
}
.smart-funnel-zone > header,
.smart-funnel-zone > summary { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.smart-funnel-zone > summary { cursor: pointer; list-style: none; }
.smart-funnel-zone > summary::-webkit-details-marker { display: none; }
.smart-funnel-zone > header > span,
.smart-funnel-zone > summary > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.smart-funnel-zone > header h2,
.smart-funnel-zone > summary h2 { margin: 0; font-size: 17px; }
.smart-funnel-zone > header p,
.smart-funnel-zone > summary p { margin: 0 0 0 auto; color: var(--muted); font-size: 10px; }
.smart-funnel-zone > header > b { margin-left: auto; color: #47615a; font-size: 12px; }

.smart-funnel-zone.project-zone {
  grid-column: span 4;
  border-top-color: #5b7992;
  background: linear-gradient(135deg, #f5f9fc 0%, #fff 75%);
}
.project-zone > header > span { background: #e3edf4; color: #486b84; }
.project-zone .record-picker { margin: 0; }
.project-zone .record-picker label { font-size: 11px; }
.project-zone .record-picker select { min-height: 38px; font-size: 13px; }
.project-zone > p { margin: 0; color: var(--muted); font-size: 10px; }

.smart-funnel-zone.status-zone {
  grid-column: span 8;
  border-top-color: #2c806d;
  background: linear-gradient(135deg, #f0faf6 0%, #fff 78%);
}
.status-zone > header > span { background: #dcefe7; color: #236655; }
.smart-funnel-status-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.smart-funnel-status-strip > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px auto auto;
  grid-template-rows: auto;
  column-gap: 7px;
  align-items: center;
  justify-content: start;
  padding: 7px 8px;
  border: 1px solid #dddeda;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}
.smart-funnel-status-strip i {
  grid-row: 1;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ebece9;
  color: #6d746f;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.smart-funnel-status-strip span { overflow: hidden; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.smart-funnel-status-strip em { color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.smart-funnel-status-strip .completed { border-color: #68af99; background: #dff3eb; box-shadow: inset 0 0 0 1px rgba(43,121,104,.08); }
.smart-funnel-status-strip .completed i { background: #18765c; color: white; box-shadow: 0 2px 5px rgba(24,118,92,.22); }
.smart-funnel-status-strip .completed span,
.smart-funnel-status-strip .completed em { color: #155d4a; }
.smart-funnel-status-strip .running { border-color: #deb96e; background: #fff8e9; }
.smart-funnel-status-strip .running i { background: #b8862c; color: white; }
.smart-funnel-status-strip .starting { border-color: #e2aa45; background: #fff3d7; box-shadow: 0 0 0 2px rgba(204,141,29,.11); }
.smart-funnel-status-strip .starting i { background: #c58418; color: white; animation: smart-funnel-pulse 1s ease-in-out infinite; }
.smart-funnel-status-strip .paused { border-color: #d6b983; background: #fffaf0; }
.smart-funnel-status-strip .failed { border-color: #dba9a0; background: #fff3f1; }
.smart-funnel-style-summary { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(225,241,235,.7); }
.smart-funnel-style-summary > span { flex: 0 0 auto; color: #276d63; font-size: 10px; font-weight: 900; }
.smart-funnel-style-summary > div { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: 10px; }
.smart-funnel-style-summary b { padding: 2px 6px; border-radius: 999px; background: white; color: #276d63; font-size: 9px; }
.status-zone .smart-funnel-style-picker { width: 100%; display: block; }
.status-zone .smart-funnel-style-picker[open] { width: 100%; }
.status-zone .smart-funnel-style-picker[open] > summary { width: auto; min-width: 0; }

.smart-funnel-zone.task-zone {
  grid-column: span 7;
  border-top-color: #bd8731;
  background: linear-gradient(135deg, #fff9ed 0%, #fff 74%);
}
.task-zone > header > span,
.task-zone > summary > span { background: #faedce; color: #95671d; }
.smart-funnel-task-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.smart-funnel-task-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #e4dfd3;
  border-radius: 9px;
  background: rgba(255,255,255,.82);
}
.smart-funnel-task-row.completed { border-color: #72b49f; background: #e7f6f0; box-shadow: inset 4px 0 0 #18765c; }
.smart-funnel-task-row.running { border-color: #deb96e; background: #fffaf0; }
.smart-funnel-task-row.starting { border-color: #dfa63d; background: #fff3d9; box-shadow: inset 4px 0 0 #c58418, 0 0 0 2px rgba(197,132,24,.08); }
.smart-funnel-task-row.failed { border-color: #dfaaa1; background: #fff4f2; }
.smart-funnel-task-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.smart-funnel-task-title > i {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f0e8d7;
  color: #94671e;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.smart-funnel-task-row.completed .smart-funnel-task-title > i { background: #18765c; color: #fff; box-shadow: 0 2px 5px rgba(24,118,92,.22); }
.smart-funnel-task-row.completed .smart-funnel-task-title strong,
.smart-funnel-task-row.completed .smart-funnel-task-title em { color: #155d4a; }
.smart-funnel-task-row.starting .smart-funnel-task-title > i { background: #c58418; color: #fff; animation: smart-funnel-pulse 1s ease-in-out infinite; }
.smart-funnel-task-title > span { min-width: 0; display: grid; gap: 2px; }
.smart-funnel-task-title strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.smart-funnel-task-title em { color: var(--muted); font-size: 9px; font-style: normal; }
.smart-funnel-task-progress { min-width: 0; display: grid; gap: 4px; }
.smart-funnel-task-progress > div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.smart-funnel-task-progress > div em { font-style: normal; }
.smart-funnel-task-progress > i,
.smart-funnel-task-providers i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e5dd;
}
.smart-funnel-task-progress > i > u,
.smart-funnel-task-providers i > u { height: 100%; display: block; border-radius: inherit; background: #2b7968; text-decoration: none; }
.smart-funnel-task-row.completed .smart-funnel-task-progress > i { background: #c9e4da; }
.smart-funnel-task-row.completed .smart-funnel-task-progress > i > u,
.smart-funnel-task-row.completed .smart-funnel-task-providers i > u { background: #168361; box-shadow: 0 0 6px rgba(22,131,97,.24); }
.smart-funnel-task-row.starting .smart-funnel-task-progress > i > u {
  background: repeating-linear-gradient(120deg, #c58418 0, #c58418 10px, #e4b95f 10px, #e4b95f 20px);
  background-size: 36px 100%;
  animation: smart-funnel-stripes .8s linear infinite;
}
.smart-funnel-task-providers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.smart-funnel-task-providers > span { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 5px; align-items: center; }
.smart-funnel-task-providers b { font-size: 8px; }
.smart-funnel-task-providers em { justify-self: end; color: var(--muted); font-size: 8px; font-style: normal; }
.smart-funnel-task-providers i { grid-column: 1 / -1; height: 3px; }
.smart-funnel-task-action { display: flex; justify-content: flex-start; }
.smart-funnel-task-action button { min-height: 29px; padding: 5px 9px; font-size: 9px; white-space: nowrap; }
.smart-funnel-task-note { max-width: none; color: var(--muted); font-size: 9px; text-align: left; }
.smart-funnel-task-done { padding: 5px 8px; border-radius: 999px; background: #18765c; color: #fff; font-size: 9px; font-weight: 900; white-space: nowrap; }
.smart-funnel-task-error { grid-column: 1 / -1; padding: 5px 7px; border-radius: 6px; background: #fff0ee; color: #a74338; font-size: 9px; }

.smart-funnel-zone.lists-zone {
  grid-column: span 5;
  border-top-color: #6a718e;
  background: linear-gradient(135deg, #f5f5fb 0%, #fff 76%);
}
.lists-zone > header > span,
.lists-zone > summary > span { background: #e8e9f2; color: #555e7d; }
.smart-funnel-list-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.smart-funnel-list-groups > section {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
  padding: 7px;
  border: 1px solid #e1e1e7;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}
.smart-funnel-list-groups section > header { min-width: 0; display: flex; align-items: center; gap: 7px; }
.smart-funnel-list-groups section > header > b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: #ececf2; color: #626983; font-size: 9px; }
.smart-funnel-list-groups section > header > span { min-width: 0; display: grid; gap: 1px; }
.smart-funnel-list-groups section > header strong { font-size: 10px; }
.smart-funnel-list-groups section > header em { color: var(--muted); font-size: 8px; font-style: normal; }
.smart-funnel-list-groups section > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.smart-funnel-list-groups button { min-height: 28px; padding: 4px 7px; font-size: 9px; }
.smart-funnel-list-groups button b { margin-left: 3px; }
.smart-funnel-list-groups section.completed { border-color: #c8dcd6; }
.smart-funnel-list-groups section.completed > header > b { background: #dcefe8; color: #246554; }

.smart-funnel-results { border-top-color: #384f5d; background: #fff; }
.smart-funnel-results-head { padding-bottom: 9px; border-bottom: 1px solid #e3e5e2; }
.smart-funnel-results-head h2 strong { color: #276d63; }

@keyframes smart-funnel-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(197,132,24,.18); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 5px rgba(197,132,24,0); }
}

@keyframes smart-funnel-stripes {
  from { background-position: 0 0; }
  to { background-position: 36px 0; }
}

@media (max-width: 1050px) {
  .smart-funnel-zone.project-zone,
  .smart-funnel-zone.status-zone,
  .smart-funnel-zone.task-zone,
  .smart-funnel-zone.lists-zone { grid-column: 1 / -1; }
  .smart-funnel-task-list,
  .smart-funnel-list-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .smart-funnel-status-strip { grid-template-columns: 1fr; }
  .smart-funnel-task-list,
  .smart-funnel-list-groups { grid-template-columns: 1fr; }
  .smart-funnel-task-action { justify-content: flex-start; }
  .smart-funnel-list-groups > section { grid-template-columns: 1fr; }
}

/* 项目智能筛选：最终结果优先，五轮过程按需展开。 */
.smart-funnel-screen.completed { display: flex; flex-direction: column; }
.smart-funnel-screen.completed .smart-funnel-control { order: 1; }
.smart-funnel-screen.completed .smart-funnel-process { order: 2; }
.smart-funnel-screen.completed .smart-funnel-results { order: 3; }

.smart-funnel-style-stack { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.smart-funnel-style-picker { min-width: 210px; }
.smart-funnel-style-picker > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border: 1px solid #9dc4b8;
  border-radius: 8px;
  background: #fff;
  color: #245f57;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 800;
}
.smart-funnel-style-picker > summary::-webkit-details-marker { display: none; }
.smart-funnel-style-picker > summary em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
.smart-funnel-style-picker[open] { grid-column: 1 / -1; width: 100%; }
.smart-funnel-style-picker[open] > summary { width: fit-content; min-width: 250px; }
.smart-funnel-style-picker-body { display: grid; gap: 8px; margin-top: 7px; padding: 10px; border: 1px solid #d9e5df; border-radius: 9px; background: #f8fbf9; }
.smart-funnel-style-picker-body > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.smart-funnel-style-picker-body > header > span { color: var(--muted); font-size: 11px; }
.smart-funnel-style-picker-body > header > div,
.smart-funnel-style-picker-body > div { display: flex; flex-wrap: wrap; gap: 6px; }
.smart-funnel-style-picker-body > footer { display: flex; justify-content: flex-end; }
.smart-funnel-label-readiness {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e0c48e;
  border-radius: 8px;
  background: #fff8e9;
}
.smart-funnel-label-readiness > div:first-child { display: grid; gap: 2px; }
.smart-funnel-label-readiness strong { color: #8a5b16; font-size: 12px; }
.smart-funnel-label-readiness span { color: var(--muted); font-size: 10px; }
.smart-funnel-label-readiness.ready { border-color: #a9d1c4; background: #edf8f3; }
.smart-funnel-label-readiness.ready strong { color: #236c5d; }
.smart-funnel-label-readiness.running { border-color: #d7ae5e; background: #fff5dc; }
.smart-funnel-label-progress { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.smart-funnel-label-progress span { padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.8); }
.smart-funnel-label-progress b { color: #8a5b16; font-size: 12px; }

.smart-funnel-steps { gap: 5px; }
.smart-funnel-steps > button { min-height: 44px; padding: 6px 9px; grid-template-columns: 24px minmax(0, 1fr); column-gap: 7px; border-radius: 8px; }
.smart-funnel-steps b { width: 23px; height: 23px; font-size: 11px; }
.smart-funnel-steps span { font-size: 11px; }

.smart-funnel-process { margin: 0; padding: 0; overflow: visible; border-top: 3px solid #c89b43; }
.smart-funnel-process-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 14px;
}
.smart-funnel-process-head > span { display: grid; gap: 2px; }
.smart-funnel-process-head strong { font-size: 14px; }
.smart-funnel-process-head small { color: var(--muted); font-size: 10px; }
.smart-funnel-process-head > b { color: #276d63; font-size: 13px; letter-spacing: .03em; }
.smart-funnel-process-head { border-bottom: 1px solid #e5e3dd; background: #fffdf8; }
.smart-funnel-process .smart-funnel-rounds { padding: 10px; }

.smart-funnel-results {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 3px solid #276d63;
}
.smart-funnel-results-head.final {
  padding: 13px 15px;
  border: 1px solid #bdd8ce;
  border-radius: 12px;
  background: linear-gradient(115deg, #edf8f3 0%, #f8fbf8 68%, #fff8e8 100%);
}
.smart-funnel-finished-label { display: block; margin-bottom: 2px; color: #9a6b22; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.smart-funnel-results-head.final h2 { margin: 0; font-size: 20px; }
.smart-funnel-results-head.final h2 strong { color: #1f6b58; font-size: 30px; }
.smart-funnel-primary-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.smart-funnel-primary-tabs button { min-height: 34px; padding: 6px 11px; }
.smart-funnel-current-list { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 8px; }
.smart-funnel-current-list strong { font-size: 15px; }
.smart-funnel-current-list > span { color: #276d63; font-size: 12px; font-weight: 800; }
.smart-funnel-current-list small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.smart-funnel-result-tools { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; padding: 7px 8px; }
.smart-funnel-style-count-note {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  white-space: nowrap;
}
.smart-funnel-history-menu { position: relative; }
.smart-funnel-history-menu > summary {
  min-height: 29px;
  display: flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #c7d5cf;
  border-radius: 7px;
  background: #fff;
  color: #50645e;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 800;
}
.smart-funnel-history-menu > summary::-webkit-details-marker { display: none; }
.smart-funnel-history-menu > div {
  position: absolute;
  z-index: 20;
  top: 36px;
  right: 0;
  width: min(760px, 72vw);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d7ded9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 49, 43, .16);
}
.smart-funnel-history-menu button { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.smart-funnel-name-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; }
.smart-funnel-name-card summary { position: relative; min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 7px 10px; text-align: center; }
.smart-funnel-name-card summary strong { font-size: 17px; }
.smart-funnel-name-card summary em { position: absolute; margin: -28px 0 0 78px; padding: 1px 4px; border-radius: 5px; background: #fff3d9; }

.smart-funnel-name-grid.final-actions { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.smart-funnel-name-card.final-name { display: grid; overflow: hidden; background: #fbfdfc; }
.smart-funnel-name-card.final-name.candidate { border-color: #5ba58e; background: #eff9f5; }
.smart-funnel-name-card.final-name.favorite { border-color: #d3a64f; background: #fffaf0; }
.smart-funnel-name-card.final-name.hidden { border-color: #c9cdca; background: #f4f4f2; opacity: .88; }
.smart-funnel-name-main {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.smart-funnel-name-main:hover { background: rgba(39, 109, 99, .055); box-shadow: none; }
.smart-funnel-meaning-target {
  cursor: help;
}
.smart-funnel-meaning-target:hover,
.smart-funnel-meaning-target:focus-visible {
  color: var(--accent);
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(31, 116, 91, .24);
}
.smart-funnel-review-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 6px;
}
.smart-funnel-name-main strong { font-size: 19px; letter-spacing: .04em; }
.smart-funnel-name-main span { padding: 2px 5px; border-radius: 999px; background: #dcefe7; color: #276d63; font-size: 9px; }
.smart-funnel-name-main em { position: absolute; top: 4px; right: 5px; color: #a66818; font-size: 9px; font-style: normal; }
.smart-funnel-name-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; border-top: 1px solid #e4e9e6; background: rgba(255,255,255,.72); }
.smart-funnel-name-actions:has(button:only-child) { grid-template-columns: 1fr; }
.smart-funnel-name-actions button { min-height: 26px; padding: 3px 4px; font-size: 9px; white-space: nowrap; }
.smart-funnel-name-actions button.active { background: #276d63; color: #fff; }
.smart-funnel-name-grid.final-actions:not(.ai-combo-actions) .smart-funnel-name-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.smart-funnel-name-grid.review-actions { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.smart-funnel-name-card.review-name { display: grid; overflow: hidden; background: #fbfdfc; }
.smart-funnel-name-card.review-name.candidate { border-color: #5ba58e; background: #eff9f5; }
.smart-funnel-name-card.review-name.favorite { border-color: #d3a64f; background: #fffaf0; }
.smart-funnel-name-card.review-name.hidden { border-color: #c9cdca; background: #f4f4f2; opacity: .88; }
.smart-funnel-name-card.review-name summary span {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #dcefe7;
  color: #276d63;
  font-size: 9px;
}
.smart-funnel-name-actions.compact-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px 6px 6px;
}
.smart-funnel-name-actions.compact-inline span.muted {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 10px;
}
.smart-funnel-name-actions.compact-inline button { min-height: 24px; padding: 3px 5px; font-size: 10px; }
.smart-funnel-detail-modal { width: min(820px, 92vw); }
.smart-funnel-detail-reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.smart-funnel-detail-reviews .detail-card { margin: 0; }
.smart-funnel-detail-reviews em { display: block; margin-top: 6px; color: #a14f3f; font-size: 11px; font-style: normal; }
.smart-funnel-detail-actions { justify-content: flex-end; }
.smart-funnel-detail-actions button { min-width: 94px; }

@media (max-width: 1300px) {
  .smart-funnel-name-grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); }
}

@media (max-width: 900px) {
  .smart-funnel-record-row { grid-template-columns: 1fr; }
  .smart-funnel-style-stack { grid-template-columns: 1fr; }
  .smart-funnel-style-picker { width: 100%; }
  .smart-funnel-result-tools { grid-template-columns: 1fr; align-items: flex-start; }
  .smart-funnel-pagination { width: 100%; }
  .smart-funnel-result-head-actions { width: 100%; justify-content: flex-start; }
  .smart-funnel-detail-reviews { grid-template-columns: 1fr; }
}

/* 项目智能筛选：常显工作台。左侧项目与五轮任务，右侧总进度与风格，下方统一查阅名单。 */
.smart-funnel-screen.completed,
.smart-funnel-screen.in-progress {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  overflow: hidden;
}

.smart-funnel-screen.smart-funnel-restored {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.smart-funnel-page-head {
  min-height: 34px;
  align-items: center;
  margin-bottom: 0;
  padding: 0 2px;
}
.smart-funnel-page-head > div { display: flex; align-items: baseline; gap: 10px; }
.smart-funnel-page-head h1 { margin: 0; font-size: 19px; }
.smart-funnel-page-head p { margin: 0; font-size: 10px; }
.smart-funnel-page-head button { min-height: 30px; padding: 5px 10px; }

.smart-funnel-command-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}
.smart-funnel-left-column {
  min-width: 0;
  grid-column: span 4;
  display: block;
}
.smart-funnel-left-column .smart-funnel-zone,
.smart-funnel-zone.status-zone { height: 100%; }
.smart-funnel-left-column .project-zone,
.smart-funnel-left-column .task-zone { grid-column: auto; }
.smart-funnel-zone {
  padding: 9px 10px;
  gap: 7px;
  border-top-width: 3px;
}
.smart-funnel-zone > header { align-items: center; }
.smart-funnel-zone > header h2 { font-size: 15px; }
.smart-funnel-zone > header p { font-size: 9px; }
.smart-funnel-zone.project-zone { padding-bottom: 8px; }
.project-zone .record-picker select { min-height: 34px; }
.project-zone > p { line-height: 1.35; }
.smart-funnel-zone.status-zone { grid-column: span 8; }

.smart-funnel-compact-board { align-content: start; }
.smart-funnel-compact-task-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.smart-funnel-project-cell {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 8px;
  border: 1px solid #c9d9e3;
  border-left: 4px solid #5b7992;
  border-radius: 7px;
  background: #f5f9fc;
}
.smart-funnel-project-cell .record-picker {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}
.smart-funnel-project-cell .record-picker label {
  margin: 0;
  color: #31495c;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.smart-funnel-project-cell .record-picker select {
  min-width: 0;
  min-height: 46px;
  padding: 8px 34px 8px 12px;
  font-size: 16px;
  font-weight: 650;
}

.smart-funnel-task-list { grid-template-columns: 1fr; gap: 4px; }
.smart-funnel-task-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 7px;
}
.smart-funnel-task-title { gap: 6px; }
.smart-funnel-task-title > i { width: 22px; height: 22px; border-radius: 6px; }
.smart-funnel-task-title > span { display: flex; align-items: baseline; gap: 5px; }
.smart-funnel-task-title strong { font-size: 12px; }
.smart-funnel-task-title em { font-size: 9px; }
.smart-funnel-task-progress { grid-column: 1 / -1; gap: 3px; }
.smart-funnel-task-progress > div { font-size: 10px; }
.smart-funnel-task-progress > i { height: 4px; }
.smart-funnel-task-providers.single { grid-template-columns: 1fr; gap: 2px; }
.smart-funnel-task-action { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.smart-funnel-task-action button { min-height: 25px; padding: 3px 7px; }
.smart-funnel-task-done { padding: 4px 7px; }
.smart-funnel-task-note { max-width: 72px; line-height: 1.25; text-align: right; }
.smart-funnel-task-error { grid-column: 1 / -1; }

.smart-funnel-status-strip > div { padding: 5px 6px; }
.smart-funnel-style-summary { padding: 5px 7px; }
.status-zone .smart-funnel-style-picker.always-visible { display: block; min-width: 0; }
.smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body {
  margin-top: 0;
  padding: 8px;
  gap: 6px;
}
.smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body > header > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body > header strong {
  color: #245f57;
  font-size: 11px;
}
.smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body > header em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.smart-funnel-style-picker.always-visible button { min-height: 28px; padding: 5px 9px; }
.smart-funnel-style-picker.always-visible .smart-funnel-style-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.smart-funnel-style-picker.always-visible .smart-funnel-run-action {
  margin-left: 2px;
  white-space: nowrap;
}
.smart-funnel-style-help { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.smart-funnel-style-picker.always-visible .smart-funnel-label-readiness { padding: 6px 8px; }
.smart-funnel-style-picker.always-visible .smart-funnel-label-readiness strong { font-size: 11px; }
.smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body > footer button { min-height: 30px; }

.smart-funnel-results {
  min-height: 0;
  padding: 9px 10px;
  gap: 7px;
}
.smart-funnel-results-lists {
  display: grid;
  gap: 5px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e3e5e2;
}
.smart-funnel-results-lists > header { display: flex; align-items: baseline; gap: 9px; }
.smart-funnel-results-lists > header span { color: #555e7d; font-size: 12px; font-weight: 900; }
.smart-funnel-results-lists > header p { margin: 0; color: var(--muted); font-size: 9px; }
.smart-funnel-results-lists .smart-funnel-list-groups {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.smart-funnel-results-lists .smart-funnel-list-groups > section {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 7px;
  padding: 5px 6px;
}
.smart-funnel-results-lists .smart-funnel-list-groups section > div { gap: 3px; }
.smart-funnel-results-lists .smart-funnel-list-groups button { min-height: 25px; padding: 3px 6px; }
.smart-funnel-results-head { padding-bottom: 6px; }

.smart-funnel-status-lists {
  min-height: 0;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 2px;
  margin-top: 0;
  padding: 2px 0 0;
  border-top: 1px dashed #cfddd7;
  border-bottom: 0;
}
.smart-funnel-status-lists > header { gap: 4px; line-height: 1; }
.smart-funnel-status-lists > header span { font-size: 10px; }
.smart-funnel-status-lists > header p { display: none; }
.smart-funnel-status-lists .smart-funnel-list-groups {
  min-height: 0;
  height: 100%;
  grid-template-columns: repeat(3, max-content);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  justify-content: start;
  align-items: stretch;
  gap: 3px 5px;
}
.smart-funnel-status-lists .smart-funnel-list-groups > section {
  width: max-content;
  max-width: 100%;
  height: 100%;
  justify-self: start;
  align-self: stretch;
  align-content: center;
  gap: 4px 6px;
  min-height: 0;
  padding: 5px 7px;
  border-radius: 7px;
}
.smart-funnel-status-lists .smart-funnel-list-groups section > header { gap: 5px; }
.smart-funnel-status-lists .smart-funnel-list-groups section > header > b {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
}
.smart-funnel-status-lists .smart-funnel-list-groups section > header > span {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.smart-funnel-status-lists .smart-funnel-list-groups section > header strong { font-size: 11px; }
.smart-funnel-status-lists .smart-funnel-list-groups section > header em { font-size: 9px; }
.smart-funnel-status-lists .smart-funnel-list-groups section > div { gap: 4px; }
.smart-funnel-status-lists .smart-funnel-list-groups button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.15;
}
.smart-funnel-status-lists .ai-name-combo-group {
  border-color: #d9c48d;
  background: #fffaf0;
}
.smart-funnel-status-lists .ai-name-combo-group > header > b {
  background: #f3e4bc;
  color: #805a12;
}
.smart-funnel-status-lists .ai-name-combo-group.running {
  border-color: #8fcbb8;
  background: #edf9f4;
}
.smart-funnel-status-lists .ai-name-combo-group.completed {
  border-color: #9dcbbd;
  background: #f0faf6;
}
.smart-funnel-status-lists .ai-name-combo-group > small {
  grid-column: 1 / -1;
  color: #6b675d;
  font-size: 9px;
  line-height: 1.3;
}
.smart-funnel-status-lists .ai-name-combo-group > p {
  grid-column: 1 / -1;
  max-width: 300px;
  margin: 0;
  color: #a34439;
  font-size: 9px;
}
.smart-funnel-status-lists .ai-name-combo-group .danger-outline {
  border-color: #c9867b;
  color: #9f4136;
  background: #fff8f6;
}
.smart-funnel-name-grid.ai-combo-actions .smart-funnel-name-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.smart-funnel-name-main.ai-combo-name {
  cursor: default;
}
.smart-funnel-name-card.newly-added {
  border-color: #d8a84f;
  box-shadow: inset 0 3px 0 #e5bd6d;
}
.smart-funnel-name-card.newly-added .ai-combo-name > span {
  color: #8a5a10;
  background: #fff2cf;
}
.smart-funnel-name-grid.ai-combo-actions .smart-funnel-name-card.final-name.candidate {
  border: 2px solid #23806b;
  background: #dff4ec;
  box-shadow: inset 0 4px 0 #23806b, 0 0 0 1px rgba(35, 128, 107, .12);
}
.smart-funnel-name-grid.ai-combo-actions .smart-funnel-name-card.final-name.candidate .ai-combo-name > span:last-of-type {
  color: #fff;
  background: #23806b;
}
.smart-funnel-zone.status-zone {
  height: 100%;
  box-sizing: border-box;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 4px;
}
.status-zone .smart-funnel-style-picker.always-visible .smart-funnel-style-picker-body {
  gap: 4px;
  padding: 7px;
}

@media (max-width: 1180px) {
  .smart-funnel-left-column,
  .smart-funnel-zone.status-zone { grid-column: 1 / -1; }
  .smart-funnel-results-lists .smart-funnel-list-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-funnel-status-lists .smart-funnel-list-groups { grid-template-columns: repeat(3, max-content); }
}

@media (max-width: 760px) {
  .smart-funnel-page-head > div { display: block; }
  .smart-funnel-compact-task-grid,
  .smart-funnel-results-lists .smart-funnel-list-groups { grid-template-columns: 1fr; }
  .smart-funnel-task-row { grid-template-columns: 1fr; }
  .smart-funnel-task-progress,
  .smart-funnel-task-action { grid-column: auto; grid-row: auto; }
  .smart-funnel-task-action { justify-content: flex-start; }
}

.project-style-admin-tools {
  padding: 4px 8px;
  border: 1px dashed #d8d2c9;
  border-radius: 7px;
  background: #faf9f6;
}

.project-style-admin-tools summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
}

.project-style-admin-tools[open] {
  display: grid;
  gap: 6px;
}

.project-style-admin-tools p {
  margin: 0;
  font-size: 10px;
}

.quick-review-head,
.quick-review-head > div:first-child,
.quick-review-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quick-review-head > div:first-child {
  justify-content: flex-start;
  min-width: 0;
}

.quick-review-head strong {
  font-size: 14px;
  white-space: nowrap;
}

.quick-review-head span,
.quick-review-progress span,
.quick-review-progress em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.quick-round-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #dde5e1;
  border-radius: 7px;
  background: #f7f9f8;
}

.quick-round-state strong {
  font-size: 11px;
  white-space: nowrap;
}

.quick-round-state span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-round-state.running,
.quick-round-state.completed {
  border-color: #b8d9ca;
  background: #edf8f2;
  color: #1c6a4e;
}

.quick-round-state.paused {
  border-color: #e1c995;
  background: #fff8e9;
  color: #8b5f16;
}

.quick-round-state.failed {
  border-color: #e5b6b1;
  background: #fff2f0;
  color: #a33b32;
}

.quick-review-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.quick-review-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #e1e8e5;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.quick-review-stats strong {
  font-size: 14px;
}

.quick-review-stats span {
  color: var(--muted);
  font-size: 10px;
}

.quick-review-progress {
  display: grid;
  gap: 3px;
}

.quick-review-progress .progress {
  height: 5px;
}

.quick-review-progress.paused .progress span {
  background: #bd842d;
}

.quick-review-progress.failed .progress span {
  background: #bd4a42;
}

.quick-review-progress p {
  margin: 0;
  color: #b53a32;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-review-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.quick-review-tabs button {
  padding: 4px 8px;
  font-size: 11px;
}

.quick-review-tabs button span {
  margin-left: 3px;
  opacity: 0.72;
}

.quick-review-name-grid .style-name-tile.disagreement {
  border-color: #d6a047;
  background: #fffaf0;
}

.project-style-results {
  min-height: 0;
  align-items: stretch;
}

.project-style-results.one {
  grid-template-columns: minmax(0, 1fr);
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.role-tabs button {
  padding: 7px 10px;
}

.role-tabs button span {
  margin-left: 4px;
  font-size: 12px;
  opacity: 0.72;
}

.role-tabs button.active {
  background: #1f2933;
  border-color: #1f2933;
}

.style-char-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(46px, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px;
  align-content: stretch;
  align-items: stretch;
}

.style-char-tile {
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  display: grid;
  place-items: center;
  gap: 0;
  border-color: #d9e3df;
  background: #fff;
  color: var(--ink);
  padding: 2px 3px;
  box-shadow: none;
}

.style-char-tile strong {
  font-size: 16px;
  line-height: 1;
}

.style-char-tile span,
.style-char-tile em {
  font-size: 9px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
}

.style-char-tile span {
  margin-top: 2px;
}

.style-char-tile.pinyin-sorted {
  border-color: hsl(var(--pinyin-hue) 42% 71%);
  background: hsl(var(--pinyin-hue) 55% 96%);
}

.style-char-tile.pinyin-sorted span {
  color: hsl(var(--pinyin-hue) 38% 35%);
}

.style-char-tile.main {
  border-color: #a9c8ee;
  background: #f1f7ff;
}

.style-char-tile.support {
  border-color: #a8d7b7;
  background: #f0fbf5;
}

.style-char-tile.careful {
  border-color: #ead18a;
  background: #fff9e6;
}

.style-char-tile.excluded {
  border-color: #ecc5c1;
  background: #fff6f5;
}

.style-char-tile.selected {
  border-color: #1f6f64;
  background: #e8f4f1;
  box-shadow: inset 0 0 0 2px rgba(31, 111, 100, 0.18);
}

.style-char-tile.selected strong {
  color: #13584f;
}

.name-panel-actions {
  justify-content: flex-end;
  gap: 8px;
}

.name-panel-actions button {
  white-space: nowrap;
}

.wuxing-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 0 4px;
}

.wuxing-order-tabs button {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.15;
}

.wuxing-order-tabs span {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 700;
}

.mini-help {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.2;
}

.project-style-name-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(10, minmax(58px, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px;
}

.empty-action {
  height: 100%;
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.style-name-tile {
  min-width: 0;
  min-height: 0;
  border-color: #d9e3df;
  background: #fff;
  color: var(--ink);
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
  display: grid;
  place-content: center;
  gap: 1px;
  text-align: center;
}

.style-name-tile strong,
.style-name-tile span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-name-tile.pinyin-sorted {
  border-color: hsl(var(--pinyin-hue) 42% 71%);
  background: hsl(var(--pinyin-hue) 55% 96%);
}

.style-name-tile em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-name-tile em {
  font-size: 9px;
  line-height: 1;
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
}

.style-name-tile.pinyin-sorted em {
  color: hsl(var(--pinyin-hue) 38% 35%);
}

.name-sort-row {
  margin-left: auto;
}

.style-name-tile.recommended {
  border-color: #8fc9a9;
  background: #f2fbf5;
}

.style-name-tile.favorite {
  border-color: #d8a122;
  background: #fff7dd;
  color: #745000;
}

.style-name-tile.favorite em {
  color: #9a6a00;
}

.style-name-tile.candidate {
  border-color: #288260;
  background: #e8f7ee;
  color: #126044;
}

.style-name-tile.candidate em {
  color: #126044;
}

/* Seasonal names need their titles visible at a glance. Actions appear only on hover. */
.seasonal-name-grid {
  grid-template-rows: repeat(10, minmax(0, 1fr));
}

.seasonal-name-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #b8d5cc;
  border-radius: 5px;
  background: #f5fbf8;
  color: var(--ink);
  padding: 3px;
  text-align: center;
}

.seasonal-name-tile.recommended {
  border-color: #8fc9a9;
  background: #effaf3;
}

.seasonal-name-tile strong,
.seasonal-name-tile em,
.seasonal-review-status {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seasonal-name-tile strong {
  font-size: 13px;
  line-height: 1.1;
}

.seasonal-name-tile em,
.seasonal-review-status {
  font-size: 9px;
  line-height: 1;
  font-style: normal;
  color: var(--muted);
}

.seasonal-review-status {
  color: #37756b;
}

.seasonal-tile-actions {
  position: absolute;
  inset: 2px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.seasonal-name-tile:hover .seasonal-tile-actions,
.seasonal-name-tile:focus-within .seasonal-tile-actions {
  opacity: 1;
  pointer-events: auto;
}

.seasonal-tile-actions button {
  min-height: 0;
  padding: 1px 2px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  box-shadow: none;
}

.seasonal-name-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.seasonal-name-tabs button {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.15;
}

.seasonal-name-tabs span {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 700;
}

.seasonal-name-tabs button.active {
  background: #1f2933;
  border-color: #1f2933;
}

.name-detail-backdrop {
  z-index: 58;
}

.name-detail-modal {
  width: min(720px, calc(100vw - 72px));
  border: 1px solid #b8d5cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(31, 41, 51, 0.26);
  overflow: hidden;
}

.name-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.name-detail-head h2 {
  font-size: 34px;
  margin: 0 0 4px;
  font-family: "Songti SC", "Noto Serif SC", serif;
}

.name-detail-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.name-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.name-detail-stats div,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
  padding: 12px;
}

.name-detail-stats strong,
.name-detail-stats span {
  display: block;
}

.name-detail-stats strong {
  font-size: 18px;
  color: var(--accent);
}

.name-detail-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-card p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.subtle-detail-card {
  background: #fff;
}

.homophone-card {
  display: grid;
  gap: 10px;
}

.homophone-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.homophone-head p {
  margin-top: 4px;
}

.homophone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow: hidden;
}

.homophone-name-card {
  min-width: 0;
  border: 1px solid #b8d5cc;
  border-radius: 8px;
  background: #f5fbf8;
  overflow: hidden;
}

.homophone-name-card.favorite {
  border-color: #d8a122;
  background: #fff9e8;
}

.homophone-name-card.candidate {
  border-color: #288260;
  background: #e8f7ee;
}

.homophone-name-main {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  box-shadow: none;
}

.homophone-name-main strong {
  font-size: 17px;
}

.homophone-name-main span,
.homophone-name-main em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
}

.homophone-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 8px 8px;
}

.homophone-card-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.homophone-card-actions button.active {
  border-color: #288260;
  background: #dff3e8;
  color: #126044;
}

.homophone-actions {
  justify-content: flex-end;
}

.name-detail-actions {
  justify-content: flex-end;
  padding: 0 20px 18px;
}

.soft-panel {
  box-shadow: none;
  background: #fbfaf7;
}

.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
}

.unique-ai-card {
  display: grid;
  gap: 10px;
}

.unique-ai-review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.unique-ai-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.unique-ai-review.manual {
  border-color: #2d6a4f;
  background: #f1faf5;
}

.unique-ai-review-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.unique-ai-review-head span,
.unique-ai-review-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.unique-ai-edit-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}

.unique-ai-review textarea {
  min-height: 58px;
}

.unique-deep-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.unique-deep-score-grid label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.unique-deep-score-grid input {
  min-width: 0;
  padding: 5px 6px;
  font-size: 12px;
}

.unique-deep-score-grid.readonly > div {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid #d8e5df;
  border-radius: 5px;
  background: #f7faf8;
}

.unique-deep-score-grid.readonly span {
  color: var(--muted);
  font-size: 10px;
}

.unique-deep-score-grid.readonly strong {
  color: var(--ink);
  font-size: 13px;
}

.unique-style-tags.small span.risk {
  border-color: #e7c0b9;
  background: #fff2ef;
  color: #a43b30;
}

.unique-deep-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
}

.unique-deep-flags label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.unique-deep-flags input {
  width: auto;
}

.unique-style-tags.small span {
  font-size: 11px;
  padding: 3px 7px;
}

/* Delivery management and the local page-turn book preview. */
.delivery-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

.delivery-readiness {
  margin: 0 0 7px;
  padding: 8px 10px;
  border: 1px solid #d7dfdb;
  border-radius: 10px;
  background: #f8faf9;
}

.delivery-readiness.ready {
  border-color: #9bcbb5;
  background: #f1faf5;
}

.delivery-readiness.blocked {
  border-color: #e1b5ad;
  background: #fff7f5;
}

.delivery-readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delivery-readiness-head strong,
.delivery-readiness-head span {
  display: block;
}

.delivery-readiness-head strong {
  color: var(--ink);
  font-size: 14px;
}

.delivery-readiness-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.delivery-readiness-pending {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 7px;
}

.delivery-readiness-details {
  margin-top: 6px;
}

.delivery-readiness-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.delivery-readiness-grid > button {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-height: 58px;
  padding: 8px;
  text-align: left;
  color: var(--ink);
  background: #fff;
}

.delivery-readiness-grid > button i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
  background: #edf0ef;
}

.delivery-readiness-grid > button span,
.delivery-readiness-grid > button b,
.delivery-readiness-grid > button small,
.delivery-readiness-grid > button em {
  display: block;
}

.delivery-readiness-grid > button b {
  font-size: 11px;
}

.delivery-readiness-grid > button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.delivery-readiness-grid > button em {
  margin-top: 5px;
  color: #2b695a;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.delivery-readiness-grid > button.blocked em {
  color: #9b3f38;
}

.delivery-readiness-grid > button.warning em {
  color: #806019;
}

.delivery-return-banner {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  border: 1px solid #a9cec0;
  border-radius: 9px;
  background: #eef8f3;
  box-shadow: 0 8px 20px rgba(35, 80, 69, 0.1);
  padding: 8px 11px;
  color: #285b4f;
}

.delivery-return-banner span {
  font-size: 12px;
}

.delivery-return-banner button {
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}

.delivery-target-flash {
  animation: delivery-target-pulse 850ms ease-in-out 3;
  outline: 3px solid rgba(181, 116, 35, 0.42);
  outline-offset: 4px;
}

@keyframes delivery-target-pulse {
  0%, 100% { outline-color: rgba(181, 116, 35, 0.2); }
  50% { outline-color: rgba(181, 116, 35, 0.72); }
}

.delivery-readiness-grid > button.complete {
  border-color: #9bcbb5;
  background: #f2faf6;
}

.delivery-readiness-grid > button.complete i {
  color: #fff;
  background: #2d7a5c;
}

.delivery-readiness-grid > button.blocked {
  border-color: #dfaaa2;
  background: #fff3f1;
}

.delivery-readiness-grid > button.blocked i {
  color: #fff;
  background: #a6433c;
}

.delivery-readiness-grid > button.warning {
  border-color: #e5ce95;
  background: #fff9e9;
}

.delivery-readiness-grid > button.warning i {
  color: #76580d;
  background: #f4dda5;
}

.delivery-smart-build {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 12px 0;
  padding: 22px 24px;
  border: 1px solid #b9d9cc;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4fbf8 0%, #edf7f2 55%, #fffaf0 100%);
  box-shadow: 0 12px 30px rgba(31, 91, 73, 0.08);
}

.delivery-smart-build-compact {
  gap: 14px;
  margin: 7px 0;
  padding: 9px 12px;
  box-shadow: none;
}

.delivery-smart-build-compact h2 {
  display: inline;
  margin: 0 8px 0 0;
  font-size: 15px;
}

.delivery-smart-build-compact p {
  display: inline;
  font-size: 11px;
  line-height: 1.4;
}

.delivery-smart-build-compact .pdf-generate-button {
  min-height: 32px;
  padding: 5px 10px;
}

.delivery-smart-build-compact .secondary {
  min-height: 32px;
  padding: 5px 9px;
}

.delivery-smart-build.blocked {
  border-color: #edc6bd;
  background: #fff7f4;
}

.delivery-smart-build > div:first-child {
  min-width: 0;
}

.delivery-smart-build span {
  color: #8a6a31;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.delivery-smart-build h2 {
  margin: 5px 0 6px;
  color: #173f36;
  font-size: 23px;
}

.delivery-smart-build p {
  margin: 0;
  color: #60716c;
  line-height: 1.65;
}

.delivery-smart-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.delivery-smart-actions .pdf-generate-button {
  min-height: 44px;
  padding-inline: 22px;
}

.delivery-advanced-hidden {
  display: none !important;
}

.delivery-record-tabs,
.delivery-zone-tabs,
.delivery-library-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.delivery-record-tabs {
  margin: 0 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 5px 8px;
}

.delivery-record-tabs select {
  width: min(360px, 100%);
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}

.delivery-record-tabs > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-record-tabs > div {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.delivery-record-tabs button,
.delivery-zone-tabs button,
.delivery-library-tabs button,
.delivery-role-choices button {
  flex: 0 0 auto;
  border-color: #a8c8bd;
  background: #fff;
  color: #24624c;
}

.delivery-role-card-actions .delivery-name-remove {
  border-color: #cf8d83;
  color: #97443b;
}

.delivery-record-tabs button.active,
.delivery-zone-tabs button.active,
.delivery-library-tabs button.active,
.delivery-role-choices button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.delivery-record-tabs button {
  padding: 5px 9px;
  font-size: 12px;
}

.delivery-zone-tabs {
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 2px 0;
}

.delivery-zone-tabs button {
  padding: 7px 11px;
  font-size: 13px;
}

.delivery-zone-tabs button span {
  margin-left: 5px;
  font-size: 9px;
  opacity: 0.82;
}

.delivery-zone-tabs button.readiness-complete:not(.active) {
  border-color: #9bcbb5;
  color: #24684e;
}

.delivery-zone-tabs button.readiness-blocked:not(.active) {
  border-color: #dfa9a1;
  color: #9b3f38;
}

.delivery-zone-tabs button.readiness-warning:not(.active) {
  border-color: #dec888;
  color: #785d18;
}

.delivery-stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 9px;
}

.delivery-stat strong,
.delivery-stat span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-stat strong {
  flex: none;
  font-size: 16px;
  color: var(--ink);
}

.delivery-stat span {
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.delivery-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.delivery-workspace {
  display: block;
}

.delivery-section {
  min-width: 0;
  box-shadow: none;
}

.delivery-workspace .delivery-section {
  display: none;
}

.delivery-workspace .delivery-section.active {
  display: block;
  min-height: 0;
}

.delivery-zone--profile { background: #f7fbf8; border-color: #d6e8de; }
.delivery-zone--bazi { background: #fbfaf6; border-color: #e5ded0; }
.delivery-zone--names { background: #f6fafc; border-color: #d7e5ec; }
.delivery-zone--libraries { background: #faf7fb; border-color: #e6d8e8; }
.delivery-zone--external { background: #f5faf8; border-color: #cfe2db; }
.delivery-zone--pools { background: #fffaf2; border-color: #ead9b7; }
.delivery-zone--build { background: #f8f8fb; border-color: #d9dce6; }

.delivery-profile-section,
.delivery-bazi-section,
.delivery-external-section,
.delivery-build-section {
  grid-column: 1 / -1;
}

.delivery-workspace .delivery-external-section.active {
  display: flex;
  min-height: calc(100vh - 285px);
  max-height: calc(100vh - 285px);
  overflow: hidden;
}

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

.section-head h2 {
  margin-bottom: 4px;
}

.section-head p {
  margin: 0;
  line-height: 1.55;
}

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

.delivery-form-grid .delivery-wide {
  grid-column: span 2;
}

.delivery-form-grid textarea,
.delivery-pool-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.delivery-request-strategy {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #cfe1d8;
  border-left: 4px solid var(--accent, #2d6a5d);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.delivery-request-strategy.correction {
  border-color: #e7c6ad;
  border-left-color: #b76e2b;
  background: #fffaf4;
}

.delivery-request-strategy.pending {
  border-color: #e8d4bd;
  background: #fffaf5;
}

.delivery-request-strategy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.delivery-request-strategy-head span {
  display: block;
  color: #9a7018;
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 700;
}

.delivery-request-strategy-head h3 {
  margin: 2px 0 0;
}

.delivery-request-strategy-head > strong {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: #236653;
  background: #e8f5ef;
}

.delivery-request-strategy.correction .delivery-request-strategy-head > strong {
  color: #9a4d1f;
  background: #fae8d8;
}

.delivery-request-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delivery-request-strategy-grid > div {
  padding: 10px 12px;
  border: 1px solid #e1e8e3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.delivery-request-strategy-grid > div.wide {
  grid-column: 1 / -1;
}

.delivery-request-strategy-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-request-strategy-grid p {
  margin: 0;
  line-height: 1.65;
}

.delivery-request-strategy > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

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

.delivery-source-text {
  min-height: 170px;
  line-height: 1.6;
  resize: vertical;
}

.delivery-theme-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.delivery-theme-toolbar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.theme-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.theme-choice::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--theme-dot);
  content: "";
}

.theme-choice.active {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.delivery-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.delivery-color-field {
  display: grid;
  grid-template-columns: auto 34px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fbfaf8;
}

.delivery-color-field span,
.delivery-color-field code {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-color-field input[type="color"] {
  width: 34px;
  height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.delivery-bazi-preview {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.delivery-bazi-actions,
.delivery-bazi-status {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.delivery-bazi-status {
  border-left: 3px solid #b47837;
  background: #fff9ee;
  padding: 8px 10px;
  color: #76512e;
  font-size: 12px;
}

.delivery-bazi-status.success { border-color: #2d6a4f; background: #f0faf4; color: #276346; }
.delivery-bazi-status.warning { border-color: #b47837; }
.delivery-bazi-status b { margin-left: auto; color: #2d6a4f; }

.delivery-bazi-chart {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e2dc;
  background: #fff;
}

.delivery-bazi-chart.empty { display: block; color: var(--muted); font-size: 12px; }

.delivery-bazi-chart-donut {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
}

.delivery-bazi-chart-donut::after {
  position: absolute;
  inset: 25px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.delivery-bazi-chart-donut span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.delivery-bazi-chart-donut b { color: var(--ink); font-size: 11px; }
.delivery-bazi-chart-bars { display: grid; gap: 6px; }
.delivery-bazi-chart-bars div { display: grid; grid-template-columns: 20px minmax(60px, 1fr) 45px; align-items: center; gap: 7px; font-size: 12px; }
.delivery-bazi-chart-bars i { height: 7px; overflow: hidden; border-radius: 6px; background: #edf0ee; }
.delivery-bazi-chart-bars i b { display: block; height: 100%; border-radius: inherit; }
.delivery-bazi-chart small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }

.delivery-fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.delivery-fact-grid div {
  min-width: 0;
  border-left: 3px solid var(--accent);
  background: #fbfaf8;
  padding: 8px 9px;
}

.delivery-fact-grid span,
.delivery-fact-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-fact-grid span {
  color: var(--muted);
  font-size: 11px;
}

.delivery-fact-grid strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.delivery-strength-line,
.delivery-image-list {
  color: var(--muted);
  font-size: 12px;
}

.delivery-image-list strong { width: 100%; color: var(--ink); font-size: 11px; }

.delivery-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delivery-image-list span {
  border: 1px solid #cfe2db;
  border-radius: 999px;
  background: #f2faf6;
  color: #24624c;
  padding: 3px 8px;
}

.delivery-role-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.delivery-extended-names {
  margin-top: 14px;
  border: 1px solid #cddbd4;
  border-radius: 9px;
  background: #fbfdfc;
  padding: 14px;
}

.delivery-extended-names.enabled {
  border-left: 4px solid var(--primary);
  background: #f4faf7;
}

.delivery-extended-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.delivery-extended-head small,
.delivery-extended-head p,
.delivery-extended-names > small {
  color: var(--muted);
}

.delivery-extended-head h3 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.delivery-extended-head p {
  margin: 0;
  font-size: 12px;
}

.delivery-extended-head > strong {
  flex: none;
  border-radius: 999px;
  background: #e6f4ec;
  color: #216447;
  padding: 7px 12px;
  font-size: 13px;
}

.delivery-extended-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.delivery-extended-chips span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid #d8e3dc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 8px;
  font-size: 12px;
}

.delivery-extended-chips em {
  flex: none;
  color: #9a7018;
  font-size: 9px;
  font-style: normal;
}

.delivery-extended-actions {
  margin: 12px 0 8px;
}

.delivery-role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 8px;
}

.delivery-role-row.assigned {
  border-color: #85b89f;
  background: #f3fbf6;
}

.delivery-role-row strong,
.delivery-role-row span,
.delivery-role-row input,
.delivery-role-choices {
  min-width: 0;
}

.delivery-role-card-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.delivery-role-card-head > span {
  flex: none;
  color: #8a6a31;
  font-size: 9px;
}

.delivery-role-card-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-role-card-head em {
  flex: none;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.delivery-role-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.delivery-role-card-actions label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
}

.delivery-role-card-actions input {
  width: 38px;
  min-height: 27px;
  padding: 3px;
  font-size: 10px;
  text-align: center;
}

.delivery-role-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.delivery-role-choices button {
  min-width: 0;
  min-height: 27px;
  padding: 3px 6px;
  font-size: 10px;
}

.delivery-copy-status {
  align-self: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-copy-status.ready {
  color: #267054;
}

.delivery-copy-status.error {
  color: #a6433c;
}

.delivery-role-note {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
}

.delivery-role-meta {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-role-save-state {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-role-save-state.pending {
  background: #fff3d6;
  color: #8a5a00;
}

.delivery-role-save-state.saved {
  background: #e8f6ee;
  color: #216447;
}

.delivery-role-save-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  white-space: nowrap;
}

.delivery-role-floating-save {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 80;
  min-width: 210px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.28);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 760px) {
  .delivery-role-floating-save {
    right: 14px;
    bottom: 14px;
    min-width: 180px;
  }
}

.delivery-library-section {
  grid-column: 1 / -1;
}

.delivery-external-import {
  margin: 0 0 18px;
  border: 1px solid #c9d9d2;
  border-radius: 8px;
  background: #f7fbf8;
  padding: 14px;
  width: 100%;
  overflow: hidden;
}

.delivery-external-head,
.delivery-external-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.delivery-external-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.delivery-external-head p,
.delivery-external-result-head small,
.delivery-external-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.delivery-external-stats {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.delivery-external-stats span,
.delivery-external-stats strong {
  border: 1px solid #b8d7c5;
  border-radius: 4px;
  background: #fff;
  color: #2f6d55;
  padding: 4px 7px;
  font-size: 11px;
}

.delivery-external-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) minmax(260px, 1.5fr);
  gap: 10px;
  margin-top: 12px;
}

.delivery-external-view-tabs {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.delivery-external-view-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.delivery-external-form .delivery-wide {
  grid-column: span 1;
}

.delivery-external-form textarea {
  min-height: 70px;
  resize: vertical;
}

.delivery-external-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}

.delivery-external-results {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.delivery-external-groups {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.delivery-external-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.delivery-external-group {
  display: grid;
  gap: 6px;
  border: 1px solid #d9d4b9;
  background: #fffcf3;
  padding: 9px;
}

.delivery-external-group.eligible { border-color: #b8d7c5; background: #f4fbf6; }
.delivery-external-group > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.delivery-external-group span,
.delivery-external-group p,
.delivery-external-group small { color: var(--muted); font-size: 11px; }
.delivery-external-group p { margin: 0; line-height: 1.45; }
.delivery-external-group button { padding: 5px 7px; font-size: 11px; }

.delivery-external-name {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #d6e6dc;
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}

.delivery-external-name.not-eligible {
  border-color: #ead7cf;
  background: #fffaf7;
}

.delivery-external-name-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.delivery-external-name-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-external-name-head span,
.delivery-external-name p,
.delivery-external-assign span {
  color: var(--muted);
  font-size: 11px;
}

.delivery-external-name p {
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.delivery-external-assign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.delivery-external-assign button { min-width: 0; padding: 5px 6px; font-size: 11px; }

.delivery-external-assign select {
  min-width: 0;
  padding: 5px 6px;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .delivery-external-form {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-external-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-external-group-grid { grid-template-columns: 1fr 1fr; }
}

/* 用户与项目一屏工作台 */
.customer-workbench { width: 100%; grid-template-rows: auto auto auto; align-content: start; max-width: none; margin: 0; overflow: hidden; }
.customer-workbench-head, .project-info-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; }
.customer-workbench-head h1, .project-info-head h1 { margin: 1px 0 0; font-size: 25px; }
.customer-workbench-head p, .project-info-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.eyebrow { color: #9b6f31; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.customer-head-actions, .project-info-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.customer-head-actions button, .project-info-head-actions button { min-height: 36px; padding: 7px 12px; }
.customer-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.customer-stat-strip > button, .customer-stat-strip > div { min-height: 62px; display: flex; align-items: center; gap: 11px; border: 1px solid #dce3df; border-radius: 11px; background: linear-gradient(145deg, #fff, #f5f8f7); padding: 8px 13px; color: var(--ink); text-align: left; box-shadow: 0 7px 18px rgba(31, 41, 51, .05); }
.customer-stat-strip i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #e7f2ed; color: var(--primary); font-style: normal; font-weight: 900; }
.customer-stat-strip span { display: grid; }
.customer-stat-strip strong { font-size: 19px; line-height: 1; }
.customer-stat-strip small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.customer-list-panel { min-height: 0; display: grid; grid-template-rows: auto auto auto; align-self: start; overflow: hidden; border-top: 4px solid #2d776d; padding: 12px 14px 9px; box-shadow: 0 12px 28px rgba(31, 41, 51, .07); }
.customer-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; }
.customer-tabs { display: flex; align-items: center; gap: 5px; }
.customer-tabs button { min-height: 34px; border: 0; background: transparent; color: var(--muted); padding: 6px 11px; box-shadow: none; }
.customer-tabs button.active { border-radius: 7px; background: #e6f2ed; color: var(--primary); }
.customer-tabs b { margin-left: 4px; }
.customer-filters { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.customer-filters select { width: 160px; }
.customer-filters input { width: min(340px, 28vw); }
.customer-filters input, .customer-filters select { min-height: 34px; padding: 6px 9px; font-size: 11px; }
.customer-table-wrap { min-height: 0; max-height: calc(100vh - 260px); overflow: auto; border: 1px solid #e1e5e2; border-radius: 8px; }
.customer-table { width: 100%; min-width: 1160px; margin: 0; table-layout: fixed; }
.customer-table th { position: sticky; top: 0; z-index: 2; background: #f3f7f5; color: #52625c; font-size: 10px; }
.customer-table th, .customer-table td { padding: 8px 9px; vertical-align: middle; }
.customer-table td { height: 52px; font-size: 11px; }
.customer-table td > strong, .customer-table td > small { display: block; }
.customer-table td > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-table td > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.user-workbench-table th:nth-child(1) { width: 13%; }.user-workbench-table th:nth-child(2) { width: 21%; }.user-workbench-table th:nth-child(3) { width: 12%; }.user-workbench-table th:nth-child(4) { width: 8%; }.user-workbench-table th:nth-child(5) { width: 15%; }.user-workbench-table th:nth-child(6) { width: 20%; }.user-workbench-table th:nth-child(7) { width: 11%; }
.project-workbench-table { min-width: 1580px; }
.project-workbench-table th:nth-child(1) { width: 14%; }.project-workbench-table th:nth-child(2) { width: 7%; }.project-workbench-table th:nth-child(3) { width: 7%; }.project-workbench-table th:nth-child(4) { width: 8%; }.project-workbench-table th:nth-child(5) { width: 9%; }.project-workbench-table th:nth-child(6) { width: 10%; }.project-workbench-table th:nth-child(7) { width: 10%; }.project-workbench-table th:nth-child(8) { width: 13%; }.project-workbench-table th:nth-child(9) { width: 12%; }.project-workbench-table th:nth-child(10) { width: 10%; }
.customer-table tr.review-needed td:first-child { box-shadow: inset 3px 0 #cf8435; }
.review-flag { color: #a45a25 !important; font-weight: 800; }
.compact-note { overflow: hidden; max-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.compact-button { min-height: 29px; padding: 4px 7px; font-size: 10px; }
.table-actions { display: flex; gap: 4px; }.table-actions button { min-width: 0; padding: 3px 5px; white-space: nowrap; }
.text-link { min-height: 26px; border: 0; background: transparent; color: var(--primary); padding: 2px; box-shadow: none; }
.stage-pill { display: inline-flex; border-radius: 999px; background: #e9f4ef; color: #266356; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.delivery-status-button { min-height: 28px; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; }
.delivery-status-button.is-pending { border-color: #b9c4bf; background: #f5f7f6; color: #56635f; }
.delivery-status-button.is-delivered { border-color: #7cb6a0; background: #def1e8; color: #17644f; }
.after-sales-status-button { min-height: 28px; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.after-sales-status-button.is-none { border-color: #c7cfcc; background: #f4f6f5; color: #66716d; }
.after-sales-status-button.is-active { border-color: #c96355; background: #fbe1dc; color: #9e2f24; }
.after-sales-status-button.is-resolved { border-color: #7cb6a0; background: #def1e8; color: #17644f; }
.delivery-countdown { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.delivery-countdown.is-overdue { background: #8e2525; color: #fff; }
.delivery-countdown.is-urgent { background: #f7d9d5; color: #a52c24; }
.delivery-countdown.is-warning { background: #fff0bd; color: #86620c; }
.delivery-countdown.is-safe, .delivery-countdown.is-complete { background: #dff1e6; color: #17644f; }
.delivery-countdown.is-unset { background: #edf0ef; color: #66716d; }
.empty-cell { color: var(--muted); text-align: center; }
.customer-list-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; color: var(--muted); font-size: 10px; }
.customer-list-footer div { display: flex; gap: 5px; }.customer-list-footer button { min-height: 28px; padding: 3px 8px; font-size: 10px; }

.workbench-drawer-backdrop, .profile-drawer-backdrop { position: fixed; inset: 0; z-index: 110; display: flex; justify-content: flex-end; background: rgba(20, 31, 36, .38); backdrop-filter: blur(2px); }
.workbench-drawer, .project-profile-drawer { width: min(720px, 66vw); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #f8f7f3; box-shadow: -18px 0 45px rgba(22, 34, 38, .2); animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(32px); opacity: .5; } }
.workbench-drawer > header, .project-profile-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #dedbd3; background: #fff; padding: 17px 20px 14px; }
.workbench-drawer h2, .project-profile-drawer h2 { margin: 2px 0; font-size: 21px; }.workbench-drawer header p, .project-profile-drawer header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.workbench-drawer-body, .project-profile-drawer-body { min-height: 0; overflow: auto; padding: 14px 18px; }
.drawer-form { display: grid; gap: 11px; }.drawer-form section { border: 1px solid #dedfd9; border-radius: 10px; background: #fff; padding: 12px; }.drawer-form h3 { margin: 0 0 9px; color: #31564e; font-size: 13px; }.drawer-form footer { position: sticky; bottom: -14px; display: flex; justify-content: flex-end; border-top: 1px solid #e0ddd5; background: rgba(248, 247, 243, .96); padding: 10px 0 2px; }
.form-grid { display: grid; gap: 8px; }.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }.form-grid .wide { grid-column: span 2; }
.drawer-form .field, .project-profile-form .field { gap: 3px; }.drawer-form label, .project-profile-form label { font-size: 10px; }.drawer-form input, .drawer-form select, .drawer-form textarea, .project-profile-form input, .project-profile-form select, .project-profile-form textarea { min-height: 34px; padding: 6px 8px; font-size: 11px; }.drawer-form textarea, .project-profile-form textarea { min-height: 52px; resize: vertical; }
.admin-note-field { border-radius: 7px; background: #fff8eb; padding: 7px; }

/* 项目基本信息与全流程快捷资料 */
.project-context-dock { width: min(1120px, 100%); display: grid; gap: 8px; border: 1px solid #c8d9d2; border-radius: 12px; background: #fbfdfc; color: var(--ink); padding: 10px 13px; text-align: left; box-shadow: 0 7px 20px rgba(28, 62, 54, .09); }
.project-context-dock:hover { border-color: #79a99d; background: #fff; }
.project-context-dock span { min-width: 0; }
.project-context-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-context-head > span { display: flex; align-items: baseline; gap: 8px; }
.project-context-dock small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.project-context-head strong { overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.project-context-head em { flex: none; border-radius: 999px; background: #e5f2ec; color: #246453; padding: 4px 8px; font-size: 10px; font-style: normal; font-weight: 800; }
.project-context-facts { display: grid; grid-template-columns: minmax(145px, 1.25fr) minmax(80px, .65fr) minmax(70px, .55fr) minmax(120px, .95fr) minmax(100px, .8fr); gap: 7px; }
.project-context-facts > span, .project-context-requirements { border-radius: 8px; background: #f2f6f4; padding: 7px 9px; }
.project-context-facts .favorable { background: #e8f5ee; }
.project-context-dock b { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
.project-context-facts .favorable b { color: #246453; }
.project-context-requirements { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: 8px; background: #f7f2e8; }
.project-context-requirements small { padding-top: 2px; color: #80683d; font-weight: 800; }
.project-context-requirements b { margin: 0; color: #554d3f; white-space: pre-wrap; }
.project-context-dock.needs-review { border-color: #e0b17d; }
.project-context-dock.needs-review .project-context-head em { background: #fff0df; color: #9a5728; }

/* 交付页优先展示12人名单：项目资料保留入口，但压缩成单行摘要。 */
.project-context-dock.delivery-project-context {
  width: 100%;
  max-width: 1350px;
  grid-template-columns: minmax(190px, .8fr) minmax(0, 3.2fr);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.delivery-project-context .project-context-facts {
  grid-template-columns: minmax(145px, 1.25fr) minmax(65px, .55fr) minmax(55px, .5fr) minmax(105px, .9fr) minmax(85px, .7fr);
  gap: 5px;
}

.delivery-project-context .project-context-facts > span {
  padding: 4px 7px;
}

.delivery-project-context .project-context-facts > span:first-child {
  display: none;
}

.delivery-project-context .project-context-requirements {
  display: none;
}

.delivery-project-context .project-context-head em {
  padding: 3px 6px;
}

.delivery-page-head {
  align-items: center;
  margin-bottom: 6px;
}

.delivery-page-head h1 {
  font-size: 21px;
}

.delivery-page-head p {
  margin: 2px 0 0;
  font-size: 10px;
}

.delivery-page-head button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 10px;
}

.delivery-zone-tabs {
  margin-bottom: 6px;
}

.delivery-zone-tabs button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11px;
}

.delivery-roles-section {
  padding: 9px 10px;
}

.delivery-names-head {
  align-items: center;
  margin-bottom: 7px;
}

.delivery-names-head h2 {
  margin-bottom: 2px;
  font-size: 16px;
}

.delivery-names-head p {
  margin: 0;
  font-size: 10px;
}

.delivery-names-head > .row {
  gap: 5px;
}

.delivery-names-head > .row > strong,
.delivery-names-head .delivery-role-save-state {
  font-size: 10px;
}

.delivery-names-head button {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 10px;
}

/* 项目智能筛选专用顶部：把原先两侧空白改成全流程指引与五轮实时数据。 */
.project-context-slot:has(.smart-funnel-context-dock) { width: 100%; }
.smart-funnel-context-dock {
  width: 100%;
  max-width: none;
  gap: 7px;
  padding: 8px 10px;
  background: #fbfdfc;
}
.smart-funnel-context-dock:hover { background: #fbfdfc; }
.smart-guide-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(650px, 3.5fr) auto;
  align-items: center;
  gap: 10px;
}
.smart-guide-project {
  min-width: 0;
  border-right: 1px solid #d9e4df;
  padding: 1px 12px 1px 2px;
}
.smart-guide-project > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.smart-guide-project strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.smart-guide-project p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #63716c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-guide-stages {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  align-items: center;
  gap: 4px;
}
.smart-guide-stages button {
  position: relative;
  min-width: 0;
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: #d5ded9;
  background: #fff;
  color: #66716d;
  padding: 4px 6px;
  font-size: 10px;
}
.smart-guide-stages button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 5px;
  border-top: 1px solid #cfdad5;
}
.smart-guide-stages button:last-child::after { display: none; }
.smart-guide-stages button i {
  width: 17px;
  height: 17px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1ef;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}
.smart-guide-stages button.done {
  border-color: #b8d8cc;
  background: #eef8f3;
  color: #236554;
}
.smart-guide-stages button.done i { background: #2c7665; color: #fff; }
.smart-guide-stages button.current {
  border-color: #b58a42;
  background: #fff8e9;
  color: #74541d;
  box-shadow: inset 0 -2px 0 #c69747;
}
.smart-guide-stages button.current i { background: #b98632; color: #fff; }
.smart-guide-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}
.smart-guide-tools button {
  min-height: 31px;
  padding: 4px 8px;
  font-size: 10px;
}
.smart-guide-bottom {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(650px, 3.5fr) minmax(150px, auto);
  align-items: stretch;
  gap: 10px;
  border-top: 1px solid #e0e7e3;
  padding-top: 7px;
}
.smart-guide-current {
  min-width: 0;
  display: grid;
  align-content: center;
  border-left: 3px solid #2b7564;
  padding: 0 8px;
}
.smart-guide-current strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-guide-current span {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-guide-funnel {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 5px;
}
.smart-guide-funnel > div {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  border: 1px solid #dce3df;
  border-radius: 7px;
  background: #f7f9f8;
  padding: 4px 15px 4px 7px;
}
.smart-guide-funnel > div small { font-size: 9px; }
.smart-guide-funnel > div strong {
  margin-top: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-guide-funnel > div i {
  position: absolute;
  top: 50%;
  right: -7px;
  z-index: 1;
  color: #9caaa5;
  font-size: 16px;
  font-style: normal;
  transform: translateY(-52%);
}
.smart-guide-funnel > div.completed {
  border-color: #b8d9cd;
  background: #edf8f3;
  color: #245f50;
}
.smart-guide-funnel > div.running,
.smart-guide-funnel > div.starting {
  border-color: #d3ae6f;
  background: #fff8ea;
  color: #7a581f;
}
.smart-guide-funnel > div.paused,
.smart-guide-funnel > div.failed {
  border-color: #e2b5aa;
  background: #fff3f0;
  color: #9b493b;
}
.smart-guide-next {
  min-width: 150px;
  min-height: 43px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 5px 11px;
  text-align: left;
}
.smart-guide-next small { color: rgba(255, 255, 255, .78); }
.smart-guide-next strong { margin-top: 0; font-size: 12px; }
.smart-guide-next.attention { background: #a85443; }
.smart-guide-next.done { background: #986f2c; }
.smart-guide-next:disabled { cursor: wait; opacity: .72; }
.smart-funnel-style-picker.guide-focus {
  animation: smart-guide-focus 1.8s ease;
}
@keyframes smart-guide-focus {
  0%, 100% { box-shadow: none; }
  25%, 70% { box-shadow: 0 0 0 4px rgba(183, 137, 55, .28); }
}

@media (max-width: 1100px) {
  .project-context-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-context-facts > span:first-child, .project-context-facts > span:last-child { grid-column: span 1; }
}

@media (max-width: 1400px) {
  .smart-guide-top,
  .smart-guide-bottom { grid-template-columns: minmax(155px, .72fr) minmax(540px, 3fr) auto; }
  .smart-guide-stages { grid-template-columns: repeat(6, minmax(68px, 1fr)); }
  .smart-guide-stages button { padding-inline: 4px; }
  .smart-guide-funnel { grid-template-columns: repeat(6, minmax(70px, 1fr)); }
  .smart-guide-next { min-width: 135px; }
}

@media (max-width: 1120px) {
  .smart-guide-top { grid-template-columns: minmax(170px, .8fr) minmax(0, 3fr) auto; }
  .smart-guide-bottom { grid-template-columns: minmax(170px, .8fr) minmax(0, 3fr); }
  .smart-guide-next { grid-column: 1 / -1; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; }
  .smart-guide-next strong { font-size: 11px; }
  .smart-guide-stages button { gap: 3px; }
  .smart-guide-stages button i { display: none; }
}

@media (max-width: 760px) {
  .main.with-project-context { gap: 6px; }
  .project-context-dock { padding: 9px; }
  .project-context-head { align-items: flex-start; }
  .project-context-head > span { display: grid; gap: 2px; }
  .project-context-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-context-requirements { grid-template-columns: 1fr; gap: 2px; }
  .smart-guide-top,
  .smart-guide-bottom { grid-template-columns: 1fr; }
  .smart-guide-project { border-right: 0; border-bottom: 1px solid #d9e4df; padding: 0 0 6px; }
  .smart-guide-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smart-guide-tools { position: absolute; top: 7px; right: 7px; }
  .smart-guide-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .smart-guide-next { grid-column: auto; }
}
.project-profile-drawer { width: min(650px, 62vw); }.project-profile-drawer > footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #dedbd3; background: #fff; padding: 10px 18px; }.project-profile-drawer > footer button { min-height: 34px; }
.project-info-screen { width: min(100%, 1680px); grid-template-rows: auto minmax(0, 1fr); max-width: 1680px; margin: 0 auto; gap: 14px; overflow: hidden; }
.project-info-head { min-height: 72px; border-bottom: 1px solid #e1dfd8; padding: 0 2px 10px; }
.project-info-head h1 { font-size: 30px; line-height: 1.15; }.project-info-head p { margin-top: 6px; font-size: 14px; }
.project-info-head .eyebrow { font-size: 10px; }.project-info-head-actions button { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.project-info-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1240px) 300px; justify-content: center; align-items: start; gap: 18px; overflow: hidden; }
.project-profile-summary { min-height: 0; display: grid; grid-template-columns: .9fr 1.25fr .9fr; align-items: start; gap: 14px; overflow: auto; align-content: start; }
.profile-summary-card { min-width: 0; border: 1px solid #d8e0dc; border-radius: 14px; background: #fff; padding: 18px; box-shadow: 0 10px 25px rgba(31, 41, 51, .06); }
.profile-summary-card.identity { border-top: 4px solid #2c7569; }.profile-summary-card.requirements { border-top: 4px solid #b28a4a; }.profile-summary-card.notes { border-top: 4px solid #657687; }
.profile-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.profile-card-title h3 { margin-bottom: 14px; }.profile-source-badge { border-radius: 999px; background: #f1f3f1; color: #60706a; padding: 5px 9px; font-size: 12px; font-weight: 800; }.profile-source-badge.bazi { background: #e7f4ed; color: #27624f; }.profile-source-badge.draft { background: #fff0df; color: #995827; }
.profile-summary-card h3, .profile-history h3 { margin: 0 0 14px; font-size: 17px; }.profile-kv-grid, .requirement-list { display: grid; gap: 9px; }.profile-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-kv-grid div, .requirement-list div, .profile-summary-card.notes > div { border-radius: 8px; background: #f4f7f5; padding: 11px 12px; }.profile-summary-card span { display: block; color: #6c7773; font-size: 12px; line-height: 1.35; }.profile-summary-card strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }.requirement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-summary-card.notes { display: grid; align-content: start; gap: 9px; }.profile-summary-card.notes h3 { margin-bottom: 5px; }.profile-summary-card.notes p { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.profile-summary-card.bazi { grid-column: 1 / -1; border-top: 4px solid #7c6643; padding: 18px; }
.five-grid-calculator { grid-column: 1 / -1; border-top: 4px solid #4d7292; }
.five-grid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }.five-grid-head h3 { margin-bottom: 4px; }.five-grid-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }.five-grid-head > span { flex: none; border-radius: 999px; background: #edf3f7; color: #426681; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.five-grid-form { display: grid; grid-template-columns: 180px minmax(220px, 1fr) 120px; align-items: end; gap: 10px; margin-top: 14px; }.five-grid-form label { display: grid; gap: 5px; }.five-grid-form input { min-height: 42px; }.five-grid-form button { min-height: 42px; }.five-grid-error { margin-top: 10px; }
.five-grid-result { margin-top: 14px; border-top: 1px solid #e1e6e9; padding-top: 13px; }.five-grid-meta { display: flex; align-items: baseline; gap: 12px; }.five-grid-meta strong { margin: 0; color: #264f6b; font-size: 20px; }.five-grid-meta span { color: #697780; font-size: 12px; }
.five-grid-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }.five-grid-item { min-width: 0; border: 1px solid #dde5e9; border-radius: 10px; background: #f8fafb; padding: 10px; }.five-grid-item > span { color: #687781; font-size: 12px; }.five-grid-item > strong { margin: 2px 0 0; color: #294f68; font-size: 27px; line-height: 1.1; }.five-grid-item > small { display: block; color: #78858c; font-size: 11px; }.five-grid-item > b { display: block; margin-top: 7px; color: #475c68; font-size: 13px; }.five-grid-item > p { margin: 4px 0 0; color: #68757c; font-size: 12px; line-height: 1.45; }.five-grid-item.great_auspicious, .five-grid-item.auspicious, .five-grid-item.half_auspicious { border-color: #c9dfd5; background: #f2f8f5; }.five-grid-item.inauspicious, .five-grid-item.great_inauspicious { border-color: #ead3cc; background: #fff6f3; }.five-grid-version { display: block; margin-top: 9px; color: #77827e; line-height: 1.5; }
.sancai-result { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 16px; margin-top: 10px; border: 1px solid #d7e1dd; border-radius: 10px; background: #f7faf8; padding: 12px; }.sancai-result.auspicious, .sancai-result.half_auspicious { border-color: #c9dfd5; background: #f2f8f5; }.sancai-result.inauspicious { border-color: #ead3cc; background: #fff6f3; }.sancai-result-head { grid-row: span 2; }.sancai-result-head > span { color: #6d7a75; font-size: 12px; }.sancai-result-head > strong { color: #285a4f; font-size: 24px; letter-spacing: .1em; }.sancai-result-head > b { display: block; margin-top: 5px; color: #455d55; font-size: 13px; }.sancai-elements { display: flex; flex-wrap: wrap; gap: 7px; }.sancai-elements span { border-radius: 7px; background: rgba(255,255,255,.8); color: #66746e; padding: 6px 8px; font-size: 12px; }.sancai-elements b { color: #2b5b50; }.sancai-result > p { margin: 0; color: #5f6e68; font-size: 12px; line-height: 1.5; }
.nameology-batch-error { margin: 12px 0; }.nameology-batch-result { margin: 14px 0; border: 1px solid #d8e2de; border-radius: 13px; background: #fbfcfb; padding: 14px; }.nameology-batch-result > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.nameology-batch-result h3 { margin: 0; font-size: 17px; }.nameology-batch-result header p { margin: 4px 0 0; color: #6e7a75; font-size: 12px; }.nameology-batch-counts { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 4px 7px; }.nameology-batch-counts strong { color: #28705d; font-size: 22px; }.nameology-batch-counts b { color: #a05d45; font-size: 22px; }.nameology-batch-counts span { color: #6e7975; font-size: 12px; }.nameology-batch-rule { margin-top: 10px; border-radius: 8px; background: #f0f4f2; color: #5c6b65; padding: 9px 10px; font-size: 12px; line-height: 1.55; }.nameology-batch-group { margin-top: 12px; }.nameology-batch-group h4 { margin: 0 0 7px; color: #40554e; font-size: 14px; }.nameology-batch-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.nameology-batch-item { border: 1px solid #dde5e1; border-radius: 9px; background: #fff; padding: 10px; }.nameology-batch-item.passed { border-color: #c8dfd5; background: #f3f9f6; }.nameology-batch-item.rejected { border-color: #ead5ce; background: #fff7f4; }.nameology-batch-item header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.nameology-batch-item header strong { color: #294e44; font-size: 17px; }.nameology-batch-item header span { border-radius: 999px; background: #e7f3ed; color: #2b6b58; padding: 3px 7px; font-size: 11px; font-weight: 800; }.nameology-batch-item.rejected header span { background: #f8e7e1; color: #96553e; }.nameology-batch-item p { margin: 7px 0; color: #5d6e67; font-size: 12px; }.nameology-batch-item > div { display: flex; flex-wrap: wrap; gap: 5px; }.nameology-batch-item > div span { border-radius: 6px; background: rgba(255,255,255,.85); color: #67756f; padding: 4px 6px; font-size: 11px; }.nameology-batch-item small { display: block; margin-top: 7px; color: #76594f; line-height: 1.45; }
.bazi-card-head, .bazi-edit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bazi-card-head h3, .bazi-edit-head h3 { margin-bottom: 4px; }.bazi-card-head p, .bazi-edit-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bazi-updated-badge, .bazi-empty-badge, .bazi-edit-head > span { flex: none; border-radius: 999px; background: #f3efe7; color: #745f3c; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.bazi-status-ok { margin-top: 13px; border-radius: 9px; background: #edf7f2; color: #28624f; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.bazi-authority-preview { margin-top: 12px; border: 1px solid #c8ddd4; border-radius: 11px; background: #f5faf7; padding: 12px; }.bazi-authority-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.bazi-authority-head strong { color: #285e52; font-size: 14px; }.bazi-authority-head span { border-radius: 999px; background: #deeee7; color: #31695b; padding: 4px 8px; font-size: 12px; font-weight: 800; }.bazi-authority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }.bazi-authority-grid div { min-width: 0; border-radius: 8px; background: #fff; padding: 8px 9px; }.bazi-authority-grid span { display: block; color: #6b7772; font-size: 12px; }.bazi-authority-grid b { display: block; margin-top: 3px; color: #253b35; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }.bazi-authority-preview > p { margin: 9px 0 0; color: #5f6e68; font-size: 12px; }.bazi-authority-changes { display: grid; gap: 5px; margin-top: 10px; border-top: 1px solid #d7e6df; padding-top: 9px; }.bazi-authority-changes > strong { color: #8b562d; font-size: 13px; }.bazi-authority-changes span { color: #6d6257; font-size: 12px; }.bazi-authority-changes span b { color: #245f52; }
.bazi-warning-list { display: grid; gap: 7px; margin-top: 13px; }.bazi-warning-list div { border: 1px solid #efc797; border-radius: 9px; background: #fff8ed; padding: 9px 11px; }.bazi-warning-list strong { margin: 0; color: #935623; font-size: 13px; }.bazi-warning-list span { margin-top: 3px; color: #795f45; font-size: 12px; }
.bazi-core-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 9px; margin-top: 13px; }.bazi-core-grid > div { min-width: 0; border: 1px solid #e2e5e1; border-radius: 10px; background: #f7f8f6; padding: 11px 12px; }.bazi-core-grid .bazi-four-pillars { grid-row: span 2; display: grid; align-content: center; background: #eef5f2; }.bazi-core-grid .favorable { background: #edf7f2; border-color: #cce4d9; }.bazi-core-grid .unfavorable { background: #fff2ef; border-color: #f0d2ca; }.bazi-core-grid span { font-size: 12px; }.bazi-core-grid strong { margin-top: 4px; font-size: 16px; }.bazi-core-grid .bazi-four-pillars strong { color: #255f53; font-size: 22px; letter-spacing: .08em; }.bazi-core-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.bazi-five-overview { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 14px; border: 1px solid #ded6c9; border-radius: 14px; background: #faf8f3; padding: 18px 24px; }.bazi-five-donut { width: 176px; height: 176px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }.bazi-five-donut > div { width: 86px; height: 86px; border: 1px solid #d9c9aa; border-radius: 50%; background: #faf8f3; display: grid; place-content: center; text-align: center; }.bazi-five-donut span,.bazi-five-donut small { color: #8c6f3b; font-size: 12px; }.bazi-five-donut strong { color: #22272f; font-family: var(--font-mincho); font-size: 28px; line-height: 1.05; }.bazi-five-bars h4 { margin: 0 0 13px; color: #24334a; font-size: 16px; }.bazi-five-bars > div { display: grid; grid-template-columns: 24px minmax(100px, 1fr) 54px; align-items: center; gap: 9px; min-height: 30px; }.bazi-five-bars b { font-family: var(--font-mincho); font-size: 16px; }.bazi-five-bars i { height: 9px; border-radius: 99px; background: #e8e4dd; overflow: hidden; }.bazi-five-bars em { display: block; height: 100%; border-radius: inherit; }.bazi-five-bars strong { text-align: right; font-size: 13px; }
.bazi-strengths { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }.bazi-strengths > strong { margin: 0 3px 0 0; font-size: 13px; }.bazi-strengths span, .bazi-stat-tags span { border-radius: 8px; background: #f3f5f3; color: #52615c; padding: 7px 9px; font-size: 12px; }.bazi-strengths span b, .bazi-stat-tags span b { margin-right: 5px; color: #2f4f47; }
.bazi-season-note { margin-top: 10px; border-left: 3px solid #b79256; background: #fbf7ee; color: #625744; padding: 9px 11px; font-size: 13px; line-height: 1.55; }
.bazi-full-details { margin-top: 12px; border-top: 1px solid #e3e4df; padding-top: 10px; }.bazi-full-details > summary { width: fit-content; cursor: pointer; color: #2b675b; font-size: 13px; font-weight: 800; }.bazi-detail-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }.bazi-detail-body section { min-width: 0; border: 1px solid #e1e5e2; border-radius: 9px; background: #fbfcfb; padding: 11px; }.bazi-detail-body section:has(.bazi-table-wrap), .bazi-detail-body section:has(.bazi-flow-rows) { grid-column: 1 / -1; }.bazi-detail-body h4 { margin: 0 0 8px; color: #31564e; font-size: 14px; }.bazi-detail-body p { margin: 4px 0; color: #56635f; font-size: 13px; line-height: 1.55; }.bazi-detail-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.bazi-detail-kv span { border-radius: 6px; background: #f1f4f2; padding: 7px 8px; color: #53605c; font-size: 12px; }
.bazi-table-wrap { overflow: auto; }.bazi-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 12px; }.bazi-table-wrap th, .bazi-table-wrap td { border: 1px solid #e1e5e2; padding: 7px 8px; text-align: center; white-space: nowrap; }.bazi-table-wrap th { background: #f0f4f2; color: #40564f; }.bazi-flow-rows { display: grid; gap: 6px; }.bazi-flow-rows div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; border-bottom: 1px solid #ebedea; padding: 5px 0; }.bazi-flow-rows span { color: #56635f; font-size: 12px; word-spacing: 8px; }.bazi-stat-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.bazi-hexagram-lines { display: grid; gap: 4px; margin-top: 7px; }.bazi-hexagram-lines span { border-radius: 5px; background: #f1f4f2; padding: 5px 7px; color: #55635e; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; white-space: pre-wrap; }
.project-profile-summary.compact { grid-template-columns: 1fr; overflow: visible; }.project-profile-summary.compact .profile-kv-grid, .project-profile-summary.compact .requirement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.project-profile-summary.compact .bazi-core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.project-profile-summary.compact .bazi-four-pillars { grid-row: auto; grid-column: 1 / -1; }.project-profile-summary.compact .bazi-detail-body { grid-template-columns: 1fr; }.project-profile-summary.compact .bazi-card-head { flex-direction: column; }
.profile-history { min-height: 0; max-height: calc(100vh - 125px); overflow: auto; border: 1px solid #e0d9ce; border-radius: 14px; background: #fbf8f2; padding: 16px; }.profile-history > div { position: relative; border-left: 2px solid #c1ab82; padding: 2px 0 14px 12px; }.profile-history strong { display: block; font-size: 13px; line-height: 1.45; }.profile-history p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }.profile-history em { display: inline-block; margin-top: 6px; border-radius: 999px; background: #fff0df; color: #995827; padding: 3px 7px; font-size: 11px; font-style: normal; }
.project-profile-form { min-height: 0; max-height: calc(100vh - 125px); display: grid; grid-template-columns: 480px minmax(0, 1fr); align-items: start; column-gap: 22px; row-gap: 14px; overflow: auto; border: 1px solid #d8e0dc; border-radius: 14px; background: #fff; padding: 20px; }.project-profile-title-edit { grid-column: 1 / -1; max-width: 720px; }.project-profile-form section:nth-of-type(2) { margin-top: 0; border-left: 1px solid #e1e5e2; padding-left: 22px; }.project-profile-form .profile-notes-edit { grid-column: 1 / -1; border-top: 1px solid #e1e5e2; border-left: 0; padding-top: 14px; padding-left: 0; }.project-profile-form h3 { margin: 0 0 14px; color: #31564e; font-size: 17px; }.project-profile-form section:nth-of-type(1) .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }.project-profile-form section:nth-of-type(2) .form-grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }.project-profile-form .form-grid { gap: 12px; }.project-profile-form .field { gap: 5px; }.project-profile-form label { color: #4e5d58; font-size: 13px; font-weight: 700; }.project-profile-form input, .project-profile-form select, .project-profile-form textarea { min-height: 42px; padding: 9px 11px; font-size: 14px; }.project-profile-form textarea { min-height: 62px; line-height: 1.5; resize: vertical; }.profile-requirements-edit .full { grid-column: 1 / -1; }.profile-reference-note { margin: 0; border-radius: 8px; background: #f4f7f5; color: #5e6d67; padding: 10px 12px; font-size: 12px; line-height: 1.5; }.project-profile-form footer { position: sticky; bottom: -20px; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #dedfdc; background: rgba(255, 255, 255, .97); padding: 12px 0 0; }.project-profile-form footer span { color: #8b6534; font-size: 13px; }.project-profile-form footer button { min-height: 42px; padding: 9px 18px; font-size: 14px; }
.forbidden-homophone-setting { border: 1px solid #bfd8cf; border-radius: 10px; background: #f2f8f5; padding: 11px 12px; cursor: pointer; }.project-profile-form .forbidden-homophone-setting input { min-height: auto; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: #23695c; }.forbidden-homophone-check { display: flex; align-items: center; gap: 9px; color: #245e53; }.forbidden-homophone-setting small { display: block; margin: 5px 0 0 27px; color: #687770; font-weight: 400; line-height: 1.45; }
.profile-naming-methods { grid-column: 1 / -1; border: 1px solid #dfe5e1; border-radius: 10px; background: #fafbf9; padding: 13px; }.profile-naming-methods h3 { margin-bottom: 9px; }.profile-method-setting { display: block; border: 1px solid #c7d9d2; border-radius: 10px; background: #f3f8f6; padding: 12px 13px; cursor: pointer; }.project-profile-form .profile-method-setting input { min-height: auto; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: #23695c; }.profile-method-check { display: flex; align-items: center; gap: 9px; color: #245e53; }.profile-method-setting small { display: block; margin: 6px 0 0 27px; color: #687770; font-weight: 400; line-height: 1.5; }
@media (max-width: 760px) { .five-grid-form { grid-template-columns: 1fr; }.five-grid-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }.five-grid-head, .five-grid-meta, .nameology-batch-result > header { align-items: flex-start; flex-direction: column; }.sancai-result { grid-template-columns: 1fr; }.sancai-result-head { grid-row: auto; }.nameology-batch-group > div { grid-template-columns: 1fr; } }
.project-profile-form .profile-bazi-edit { grid-column: 1 / -1; border-top: 1px solid #e1e5e2; padding-top: 15px; }.bazi-edit-head > div { max-width: 880px; }.bazi-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: end; gap: 12px; margin-top: 12px; }.project-profile-form .bazi-edit-layout textarea { min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.6; }.bazi-edit-layout small { display: block; color: #7a6a50; font-size: 12px; line-height: 1.5; }.bazi-edit-actions { display: grid; gap: 8px; }.bazi-edit-actions button { width: 100%; min-height: 42px; }.bazi-preview-banner { display: flex; align-items: center; gap: 10px; margin-top: 12px; border: 1px solid #d5ba84; border-radius: 9px; background: #fff8e9; color: #725a2e; padding: 9px 11px; font-size: 13px; }.bazi-preview-banner span { color: #796a50; }.bazi-edit-preview { margin-top: 10px; }.bazi-edit-preview .profile-summary-card.bazi { box-shadow: none; }.bazi-edit-empty { margin-top: 10px; border: 1px dashed #ccd5d0; border-radius: 9px; background: #f7f9f7; color: var(--muted); padding: 18px; text-align: center; font-size: 13px; }
.profile-authority-readonly { border: 1px solid #d7e2dd; border-radius: 10px; background: #f5f8f6; padding: 11px; }.profile-authority-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.profile-authority-title strong { color: #315d53; font-size: 14px; }.profile-authority-title span { color: #6b7773; font-size: 12px; }.profile-authority-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }.profile-authority-values div { border-radius: 7px; background: #fff; padding: 8px 9px; }.profile-authority-values span { display: block; color: #75807c; font-size: 12px; }.profile-authority-values b { display: block; margin-top: 3px; color: #263c35; font-size: 13px; line-height: 1.45; }.profile-authority-readonly p { margin: 8px 0 0; color: #766849; font-size: 12px; line-height: 1.5; }
.project-create-bazi > .field textarea { min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.55; }.project-create-bazi > .field small { color: #74684f; font-size: 12px; line-height: 1.5; }.project-create-bazi > button { width: 100%; margin-top: 8px; }.create-bazi-core { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }.create-bazi-core span { border-radius: 8px; background: #f3f6f4; color: #66726e; padding: 8px 9px; font-size: 12px; }.create-bazi-core b { color: #285b50; font-size: 14px; }.project-create-footer { display: grid !important; grid-template-columns: 1fr 1.25fr; gap: 8px; }.record-create-panel .drawer-form { max-height: calc(100vh - 190px); overflow: auto; padding-right: 6px; }
.project-create-help { margin: -2px 0 11px; color: #68756f; font-size: 12px; line-height: 1.6; }
.project-create-upload { min-height: 132px; background: linear-gradient(145deg, #fff 0%, #f2f8f5 100%); }
.project-create-upload > strong { font-size: 19px; }.project-create-upload > em { font-size: 12px; }
.project-create-text-fallback, .project-create-admin { margin-top: 10px; border: 1px solid #dedbd3; border-radius: 10px; background: #fbfaf7; padding: 10px 12px; }
.project-create-text-fallback > summary, .project-create-admin > summary { color: #40665d; font-size: 12px; font-weight: 800; cursor: pointer; }
.project-create-text-fallback[open] > summary, .project-create-admin[open] > summary { margin-bottom: 10px; }
.project-create-text-fallback textarea { min-height: 150px !important; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.project-create-text-fallback > button { width: 100%; margin-top: 8px; }
.project-create-next { border-color: #c8dfd5 !important; background: #f3f8f5 !important; }
.project-create-next p { margin: 5px 0 0; color: #536c65; font-size: 12px; line-height: 1.65; }
.profile-conditional[hidden], .birth-lunar-field[hidden], [id$="-solar-wrap"][hidden] { display: none !important; }.lunar-date-parts { display: grid; grid-template-columns: minmax(90px, 1.2fr) 1fr 1fr auto; gap: 7px; }.lunar-leap-check { min-height: 42px; display: flex; align-items: center; gap: 5px; border: 1px solid #d9d7cf; border-radius: 7px; background: #fff; padding: 8px 9px; white-space: nowrap; }.lunar-leap-check input { width: 16px; min-height: 16px; margin: 0; }.birth-calendar-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-radius: 9px; background: #eef6f2; padding: 10px 12px; }.birth-calendar-preview div { min-width: 0; }.birth-calendar-preview span { display: block; color: #60716a; font-size: 11px; }.birth-calendar-preview strong { display: block; margin-top: 3px; color: #245b50; font-size: 13px; line-height: 1.4; }.birth-calendar-preview p { grid-column: 1 / -1; margin: 0; color: #68756f; font-size: 12px; }.birth-calendar-preview .calendar-error { color: #a54538; }.project-create-form .birth-calendar-preview { grid-column: span 2; }.project-create-form .lunar-date-parts input, .project-create-form .lunar-date-parts select { min-width: 0; }
.profile-review-warning, .profile-review-ok { border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; }.profile-review-warning { background: #fff0df; color: #9a5728; }.profile-review-ok { background: #e7f4ed; color: #27624f; }.profile-loading, .empty-project-info { display: grid; place-content: center; min-height: 240px; color: var(--muted); text-align: center; }

@media (min-width: 1301px) {
  .project-info-screen {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0 18px;
  }
  .project-info-body:has(> .project-profile-summary) {
    grid-template-columns: 1.25fr 1.25fr .95fr .8fr;
    justify-content: stretch;
    align-items: stretch;
    gap: 14px;
    overflow: auto;
    padding: 0 4px 18px;
  }
  .project-info-body > .project-profile-summary {
    display: contents;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.identity {
    grid-column: 1;
    grid-row: 1;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.requirements {
    grid-column: 2;
    grid-row: 1;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.notes {
    grid-column: 3;
    grid-row: 1;
  }
  .project-info-body:has(> .project-profile-summary) > .profile-history {
    grid-column: 4;
    grid-row: 1;
    width: auto;
    height: 100%;
    max-height: none;
    box-sizing: border-box;
    overflow: auto;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.identity,
  .project-info-body > .project-profile-summary > .profile-summary-card.requirements,
  .project-info-body > .project-profile-summary > .profile-summary-card.notes {
    height: 100%;
    box-sizing: border-box;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.identity .profile-kv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.bazi {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    box-sizing: border-box;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.bazi .bazi-core-grid {
    grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.bazi .bazi-detail-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.bazi .bazi-detail-body > section:first-child {
    grid-column: 1 / -1;
  }
  .project-info-body > .project-profile-summary > .profile-summary-card.bazi .bazi-detail-body > section:first-child .bazi-detail-kv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1300px) {
  .customer-workbench { gap: 7px; }.customer-stat-strip > button, .customer-stat-strip > div { min-height: 52px; }.customer-table th, .customer-table td { padding: 6px 7px; }.customer-table td { height: 45px; }
  .customer-table { min-width: 920px; }
  .project-info-body { grid-template-columns: minmax(0, 1fr) 240px; }.project-profile-summary { grid-template-columns: 1fr 1fr; }.profile-summary-card.notes { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }.profile-summary-card.notes h3 { grid-column: 1 / -1; }
  .project-profile-form { grid-template-columns: 390px minmax(0, 1fr); padding: 16px; }.project-profile-form section:nth-of-type(2) { padding-left: 16px; }.project-profile-form section:nth-of-type(2) .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1001px) and (max-width: 1300px) {
  .project-info-body > .project-profile-summary {
    height: 100%;
    align-self: stretch;
    overflow: auto;
    padding-right: 4px;
  }
}

@media (max-width: 1000px) {
  .project-info-screen { overflow: auto; }.project-info-head { align-items: flex-start; flex-direction: column; }.project-info-head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .project-info-body { grid-template-columns: 1fr; overflow: visible; }.project-profile-summary { grid-template-columns: 1fr; overflow: visible; }.profile-summary-card.notes { grid-column: auto; grid-template-columns: 1fr; }.profile-summary-card.notes h3 { grid-column: auto; }.profile-history { max-height: none; }
  .project-profile-form { max-height: none; grid-template-columns: 1fr; overflow: visible; }.project-profile-title-edit, .project-profile-form .profile-notes-edit { grid-column: 1; }.project-profile-form section:nth-of-type(2) { border-left: 0; border-top: 1px solid #e1e5e2; padding-top: 18px; padding-left: 0; }.project-profile-form footer { grid-column: 1; }
  .bazi-five-overview { grid-template-columns: 1fr; }.bazi-five-donut { width: 158px; height: 158px; }
  .bazi-core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.bazi-core-grid .bazi-four-pillars { grid-row: auto; grid-column: 1 / -1; }.bazi-edit-layout { grid-template-columns: 1fr; }.bazi-edit-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }.bazi-detail-body { grid-template-columns: 1fr; }
  .bazi-authority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.delivery-library-tabs {
  margin: 0 0 12px;
}

.delivery-library-tabs button {
  padding: 6px 9px;
  font-size: 12px;
}

.delivery-library-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-library-summary strong {
  color: var(--accent);
  font-size: 22px;
}

.delivery-library-summary small {
  margin-left: 4px;
}

.delivery-library-groups {
  display: grid;
  gap: 16px;
}

.delivery-library-group {
  max-height: min(510px, calc(100vh - 360px));
  overflow: auto;
  padding-right: 3px;
}

.delivery-library-group h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.delivery-library-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.delivery-library-card {
  display: grid;
  grid-template-rows: auto minmax(37px, auto) auto auto;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.delivery-library-card.has-names {
  border-color: #91c7ac;
  background: #f8fdf9;
}

.delivery-library-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.delivery-library-card-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-library-card-head span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.delivery-library-card p,
.delivery-library-card small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.delivery-assigned-chips {
  display: flex;
  min-height: 22px;
  flex-wrap: wrap;
  gap: 4px;
  align-content: start;
}

.delivery-assigned-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #a9d7bd;
  border-radius: 4px;
  background: #eaf7ef;
  color: #24624c;
  padding: 2px 5px;
  font-size: 11px;
}

.delivery-assigned-chips span small {
  color: #8a621e;
  background: #fff5d8;
  border: 1px solid #e9cf8c;
  border-radius: 3px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 15px;
}

.delivery-assigned-chips button {
  min-width: 14px;
  border: 0;
  background: transparent;
  color: #8c3e36;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.delivery-assigned-chips em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.delivery-library-card > button {
  justify-self: start;
  padding: 5px 8px;
  font-size: 11px;
}

.delivery-library-modal-backdrop {
  z-index: 70;
}

.delivery-library-picker {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 42px));
  overflow: auto;
  border-color: #c9d9d2;
  background: #fff;
  padding: 18px;
  box-shadow: 0 28px 80px rgba(31, 41, 51, 0.28);
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-title-row h2,
.modal-title-row p {
  margin: 0;
}

.modal-title-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.delivery-source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 9px;
}

.delivery-source-tabs button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.delivery-library-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.delivery-source-results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 154px;
  margin-top: 13px;
}

.delivery-source-results.loading {
  opacity: 0.6;
}

.delivery-source-results > p {
  grid-column: 1 / -1;
}

.delivery-source-name {
  display: grid;
  min-height: 54px;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.delivery-source-name.selected {
  border-color: #74b08d;
  background: #eff9f2;
}

.delivery-source-name strong {
  font-size: 14px;
}

.delivery-source-name span {
  color: var(--muted);
  font-size: 11px;
}

.delivery-source-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-report-empty {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
}

.delivery-report-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.delivery-report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf8;
  padding: 10px 12px;
}

.delivery-report-row strong,
.delivery-report-row span {
  display: block;
}

.delivery-report-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-book-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100vh - 24px);
  min-height: 0;
  gap: 10px;
  color: var(--book-text);
}

.book-toolbar,
.book-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.book-toolbar {
  border: 1px solid var(--book-line);
  border-radius: 8px;
  background: var(--book-card);
  padding: 8px 10px;
}

.book-toolbar > div:nth-child(2) {
  min-width: 0;
  text-align: center;
}

.book-toolbar strong,
.book-toolbar span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-toolbar span,
.book-controls span {
  color: var(--book-muted);
  font-size: 12px;
}

.book-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px;
  background: #d9d7d1;
  border: 1px solid #c8c5bd;
  border-radius: 8px;
}

.delivery-book-spread {
  width: min(800px, 98%);
  height: min(100%, 760px);
  min-height: 0;
  animation: book-turn-in 0.28s ease both;
  perspective: 1200px;
}

@keyframes book-turn-in {
  from { opacity: 0.3; transform: rotateY(-7deg) translateX(10px); }
  to { opacity: 1; transform: rotateY(0); }
}

.delivery-book-page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  border: 1px solid var(--book-line);
  border-radius: 3px;
  background: var(--book-page);
  box-shadow: 12px 14px 34px rgba(29, 37, 48, 0.18);
  padding: 34px 52px 42px;
  color: var(--book-text);
}

.book-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--book-line);
  padding-bottom: 10px;
  color: var(--book-muted);
  font-size: 12px;
}

.delivery-book-page h2 {
  margin: 24px 0 7px;
  color: var(--book-ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 29px;
}

.book-rule {
  width: 58px;
  height: 2px;
  margin-bottom: 20px;
  background: var(--book-accent);
}

.book-page-body {
  display: grid;
  gap: 13px;
}

.book-cover {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  overflow: hidden;
  background: var(--book-cover);
  color: #fff;
  text-align: center;
}

.book-cover::before,
.book-cover::after {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.book-cover::before { top: -105px; right: -65px; }
.book-cover::after { bottom: -125px; left: -78px; }

.book-cover-brand,
.book-cover h1,
.book-cover p,
.book-cover-surname,
.book-cover-meta { position: relative; z-index: 1; }

.book-cover-brand {
  color: #e5e9f0;
  font-size: 13px;
  letter-spacing: 0;
}

.book-cover h1 {
  max-width: 570px;
  margin: 0;
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 42px;
}

.book-cover p { margin: 0; color: #dae2ed; }

.book-cover-surname {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 58px;
}

.book-cover-meta {
  display: grid;
  gap: 6px;
  min-width: 330px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 14px;
  color: #dce3ed;
  font-size: 12px;
}

.book-hero-name {
  display: grid;
  gap: 8px;
  border: 1px solid var(--book-line);
  border-radius: 6px;
  background: var(--book-card);
  padding: 20px 24px;
}

.book-hero-name span,
.book-hero-name em {
  color: var(--book-muted);
  font-size: 12px;
  font-style: normal;
}

.book-hero-name strong {
  color: var(--book-ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 40px;
}

.book-hero-name.compact strong { font-size: 34px; }

.book-card {
  border: 1px solid var(--book-line);
  border-radius: 6px;
  background: var(--book-card);
  padding: 14px 16px;
}

.book-card h3,
.book-subtitle {
  margin: 0 0 8px;
  color: var(--book-ink);
  font-size: 16px;
}

.book-card p,
.book-note,
.book-closing p {
  margin: 0;
  color: var(--book-text);
  line-height: 1.75;
}

.book-card small { color: var(--book-muted); line-height: 1.6; }

.book-card.two-col,
.book-key-grid,
.book-fact-grid,
.book-library-grid,
.book-char-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.book-name-list {
  display: grid;
  gap: 7px;
}

.book-name-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--book-line);
  padding: 8px 2px;
}

.book-name-list strong { color: var(--book-ink); font-size: 17px; }
.book-name-list span { color: var(--book-muted); font-size: 12px; text-align: right; }

.book-char-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

.book-char-grid > div,
.book-key-grid > div,
.book-fact-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--book-line);
  border-radius: 6px;
  background: var(--book-card);
  padding: 11px;
}

.book-char-grid strong { color: var(--book-ink); font-family: "Songti SC", serif; font-size: 25px; }
.book-char-grid span,
.book-char-grid em,
.book-key-grid span,
.book-fact-grid span { color: var(--book-muted); font-size: 11px; font-style: normal; }
.book-key-grid strong,
.book-fact-grid strong { color: var(--book-ink); font-size: 14px; }

.book-chart-wrap {
  border: 1px solid var(--book-line);
  border-radius: 6px;
  background: var(--book-card);
  padding: 8px;
}

.book-chart-wrap svg { width: 100%; height: 205px; }
.book-chart-center { fill: var(--book-ink); font-size: 11px; }
.book-chart-label { fill: var(--book-text); font-size: 12px; }

.book-process { margin: 0; padding-left: 22px; color: var(--book-text); line-height: 2; }

.book-closing {
  margin-top: 12px;
  border-left: 3px solid var(--book-accent);
  padding: 16px 18px;
  background: var(--book-card);
}

.book-closing h3 { margin: 0 0 8px; color: var(--book-ink); font-family: "Songti SC", serif; font-size: 23px; }

.delivery-confirm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #d8e7df;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  background: #f6fbf8;
}

.delivery-confirm-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  white-space: nowrap;
}

.delivery-confirm-button.loading {
  background: #1a1a2e;
  border-color: #1a1a2e;
}

.delivery-action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid #b9d3c6;
  border-left: 4px solid var(--primary);
  border-radius: 7px;
  background: rgba(247, 252, 249, 0.97);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.10);
  padding: 10px 12px;
}

.delivery-action-bar strong,
.delivery-action-bar span {
  display: block;
}

.delivery-action-bar strong { color: var(--ink); font-size: 13px; }
.delivery-action-bar span { margin-top: 2px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .delivery-layout { grid-template-columns: 1fr; }
  .delivery-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .delivery-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .delivery-role-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-role-row { grid-template-columns: minmax(0, 1fr) auto; }
  .delivery-extended-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .names-workbench { grid-template-columns: 1fr; }

  .names-screen.strict-names-top-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "modes"
      "controls"
      "characters"
      "results";
  }

  .strict-names-top-layout .names-control-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .strict-names-top-layout .names-filter-section {
    grid-column: auto;
  }

  .strict-names-top-layout .names-char-sidebar {
    height: auto;
    max-height: 260px;
  }

  .names-char-sidebar { max-height: 210px; }

  .name-char-picker { min-height: 190px; }
}

@media (max-width: 760px) {
  .delivery-role-list,
  .delivery-overview-grid,
  .delivery-readiness-grid,
  .delivery-form-grid,
  .delivery-inline-grid,
  .delivery-pool-grid,
  .delivery-library-card-grid,
  .delivery-fact-grid,
  .book-card.two-col,
  .book-key-grid,
  .book-fact-grid,
  .book-library-grid { grid-template-columns: 1fr; }
  .delivery-form-grid .delivery-wide { grid-column: auto; }
  .delivery-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-source-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-extended-head { display: grid; }
  .delivery-extended-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head,
  .delivery-readiness-head,
  .delivery-smart-build,
  .delivery-report-row,
  .delivery-confirm-row,
  .book-toolbar { align-items: stretch; flex-direction: column; }
  .delivery-smart-actions { align-items: stretch; flex-direction: column; }
  .delivery-book-page { padding: 26px 22px 35px; }
  .book-cover h1 { font-size: 32px; }
  .book-cover-meta { min-width: auto; width: 100%; }
}

.delivery-zodiac-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid #e5e2dc;
  border-radius: 6px;
  background: #faf8f5;
}

.delivery-zodiac-preview img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border: 1px solid #e5e2dc;
  border-radius: 4px;
}

.delivery-zodiac-preview div {
  display: grid;
  gap: 4px;
}

.delivery-zodiac-preview span {
  color: var(--muted);
  font-size: 12px;
}

.book-zodiac-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.book-zodiac-image {
  min-height: 292px;
  overflow: hidden;
  border: 1px solid var(--book-line);
  border-radius: 6px;
  background: var(--book-page);
}

.book-zodiac-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-zodiac-orb {
  display: grid;
  width: 100%;
  min-height: 292px;
  place-items: center;
  color: white;
  background: var(--book-cover);
  font-family: Georgia, "Songti SC", serif;
  font-size: 90px;
}

@media (max-width: 760px) {
  .book-zodiac-panel { grid-template-columns: 1fr; }
  .book-zodiac-image { min-height: 350px; }
}

/* Shared high-quality material library */
.materials-screen { grid-template-rows: auto auto auto minmax(0, 1fr); }
.material-summary-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.material-summary-row > div { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fffdf9; }
.material-summary-row strong { color: var(--ink); font-size: 19px; }
.material-summary-row span { color: var(--muted); font-size: 11px; }
.material-tabs, .segmented, .material-batch-list, .material-pack-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.material-tabs button, .segmented button, .material-batch-button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.material-entry-panel, .material-bulk-panel, .material-ocr-panel, .material-setting-panel, .material-library-panel, .material-pack-panel { min-height: 0; }
.compact-section-head { margin-bottom: 8px; }
.compact-section-head h2 { margin: 0 0 3px; font-size: 18px; }
.compact-section-head p { margin: 0; font-size: 12px; }
.material-entry-grid { display: grid; grid-template-columns: minmax(200px, 1.7fr) repeat(4, minmax(116px, .7fr)); gap: 8px; }
.material-entry-grid .field { margin: 0; }
.material-entry-wide { grid-column: span 2; }
.material-checkbox-field { display: grid; gap: 5px; grid-column: span 2; min-width: 0; color: var(--muted); font-size: 12px; }
.material-style-options, .material-pack-options { display: flex; gap: 4px; flex-wrap: wrap; max-height: 56px; overflow: auto; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.material-style-options label, .material-pack-options label { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 1px solid #d9e5e0; border-radius: 4px; color: var(--ink); font-size: 11px; white-space: nowrap; }
.material-style-options input, .material-pack-options input { width: auto; min-height: 0; }
.material-entry-actions { justify-content: flex-end; margin-top: 8px; }
.material-bulk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 10px; }
.material-bulk-grid textarea { min-height: 155px; resize: none; }
.material-bulk-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; }
.material-bulk-options .field { margin: 0; }
.material-bulk-options button { grid-column: 1 / -1; }
.material-bulk-result { display: grid; gap: 4px; margin-top: 10px; border: 1px solid #b8d6c8; border-left: 4px solid #287a5f; border-radius: 6px; background: #f4fbf7; padding: 9px 11px; color: #225644; font-size: 12px; line-height: 1.5; }
.material-bulk-result strong { color: #174637; font-size: 13px; }
.material-bulk-result em { color: #39705c; font-style: normal; }
.material-bulk-result.has-invalid { border-color: #e2bd82; border-left-color: #b86f25; background: #fff8eb; color: #79511d; }
.material-bulk-result.has-invalid strong { color: #754615; }
.material-ocr-upload { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(400px, 1.4fr) auto; gap: 8px; align-items: end; }
.material-ocr-upload .field { margin: 0; }
.material-ocr-upload input[type="file"] { padding: 7px; font-size: 12px; }
.material-correction { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.material-correction input { width: auto; min-height: 0; }
.material-staged-images { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; }
.material-staged-images span, .material-pack-chip { padding: 3px 7px; border: 1px solid #cae0d6; border-radius: 4px; background: #f3fbf6; color: #276b59; font-size: 12px; }
.material-pack-chip em { margin-left: 4px; color: var(--muted); font-style: normal; }
.materials-manage-workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .35fr); gap: 8px; }
.material-library-panel { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 8px; }
.material-filter-bar { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(100px, .7fr)) auto auto auto auto; gap: 6px; align-items: center; }
.material-filter-bar input, .material-filter-bar select { min-height: 32px; }
.material-filter-bar label { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.material-filter-bar label input { width: auto; min-height: 0; }
.material-filter-bar button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.material-list-area { min-height: 0; overflow: hidden; }
.material-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; align-content: start; }
.material-card { min-width: 0; min-height: 128px; display: grid; align-content: start; gap: 6px; padding: 9px; border: 1px solid #d8e4df; border-radius: 6px; background: #fff; }
.material-card.deleted { opacity: .56; background: #f5f5f5; }
.material-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.material-card-top strong { overflow: hidden; color: var(--ink); font-family: "Songti SC", serif; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.material-card-top span { color: var(--primary); font-size: 11px; white-space: nowrap; }
.material-card .tag-list { gap: 3px; min-height: 20px; }
.material-card p { min-height: 32px; max-height: 32px; margin: 0; overflow: hidden; color: #52606a; font-size: 12px; line-height: 1.35; }
.material-card small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.material-card-actions { justify-content: flex-end; }
.material-card-actions button { min-height: 25px; padding: 3px 7px; font-size: 11px; }
.material-group-select { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.material-group-select input { width: auto; min-height: 0; }
.material-pack-panel { display: grid; align-content: start; gap: 8px; }
.material-pack-create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; }
.material-group-create { display: grid; grid-template-columns: minmax(0, 1fr) 88px auto; gap: 6px; }
.material-group-create input, .material-group-create select { min-width: 0; min-height: 32px; }
.material-group-create button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.material-group-selection { padding: 6px 8px; border-left: 3px solid var(--primary); background: #f4faf7; color: #52606a; font-size: 11px; }
.material-hit-badge, .material-hit-dot { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #6f9dca; border-radius: 3px; background: #eef6ff; color: #245f99; font-size: 10px; font-weight: 700; }
.material-hit-badge { min-height: 19px; padding: 1px 5px; }
.material-hit-dot { position: absolute; top: 3px; right: 3px; width: 15px; height: 15px; }
.quick-name-item { position: relative; }
.material-pack-create input { min-width: 0; min-height: 32px; }
.material-pack-create button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.material-group-list { display: grid; gap: 4px; max-height: 160px; overflow: auto; color: var(--muted); font-size: 12px; }
.material-setting-panel { display: grid; align-content: start; }
.material-setting-row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.material-setting-row button { min-height: 32px; font-size: 12px; }
.material-setting-row label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.material-setting-row input { width: 58px; min-height: 32px; }
.material-ocr-backdrop { z-index: 70; }
.material-ocr-modal { width: min(1420px, calc(100vw - 48px)); max-height: calc(100vh - 44px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 18px; overflow: hidden; border-radius: 8px; background: #faf8f5; box-shadow: 0 20px 58px rgba(0,0,0,.28); }
.material-ocr-review-grid { min-height: 0; display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 12px; }
.material-ocr-image-panel { min-height: 0; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.ocr-asset-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ocr-asset-tabs button { min-height: 27px; padding: 3px 8px; font-size: 11px; }
.material-ocr-image { position: relative; min-height: 140px; }
.material-ocr-image img { display: block; max-width: 100%; height: auto; }
.ocr-box { position: absolute; border: 2px solid #2d6a4f; background: rgba(45,106,79,.12); pointer-events: none; }
.ocr-box.mismatch { border-color: #c0392b; background: rgba(192,57,43,.14); }
.material-ocr-candidates { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
.ocr-candidate-toolbar { display: flex; gap: 7px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.ocr-candidate-toolbar span { margin-right: auto; }
.ocr-candidate-toolbar button { min-height: 30px; padding: 5px 8px; font-size: 12px; }
.ocr-filter-tabs { display: inline-flex; gap: 4px; }
.ocr-filter-tabs button { min-height: 27px; padding: 3px 7px; }
.ocr-batch-apply { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px; border: 1px solid #dbe7e1; border-radius: 5px; background: #f8fbf9; }
.ocr-batch-apply > select { width: 150px; }
.ocr-batch-apply > input { min-width: 150px; flex: 1 1 180px; }
.ocr-batch-apply select, .ocr-batch-apply input { min-width: 0; min-height: 30px; }
.ocr-batch-apply label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ocr-batch-apply label input { width: auto; min-height: 0; }
.ocr-batch-apply button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.ocr-candidate-grid { min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 7px; padding-right: 3px; }
.ocr-candidate-card { display: grid; gap: 5px; padding: 8px; border: 1px solid #d6e6df; border-radius: 5px; background: #fff; }
.ocr-candidate-card.low-confidence { border-color: #e5ae49; background: #fff9ec; }
.ocr-candidate-card.mismatch { border-color: #d66b61; background: #fff4f2; }
.ocr-select { color: var(--primary); font-size: 12px; font-weight: 700; }
.ocr-select input { width: auto; min-height: 0; }
.ocr-candidate-card input, .ocr-candidate-card select { min-height: 30px; }
.ocr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ocr-candidate-card small, .ocr-candidate-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.3; }
.ocr-candidate-card button { justify-self: end; min-height: 26px; padding: 3px 7px; font-size: 11px; }
.unique-material-hit { width: max-content; margin: -2px 8px 3px; }
.material-group-list > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.material-pack-chip { display: inline-flex; align-items: center; gap: 4px; }
.material-pack-chip.deleted, .material-group-list .deleted { opacity: .55; text-decoration: line-through; }
.mini-toggle { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.mini-toggle input { width: auto; min-height: 0; }

/* Character decomposition and radical/component filtering */
.component-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.component-summary-grid > div { display: grid; gap: 3px; padding: 14px; border: 1px solid #d7e4de; border-radius: 7px; background: #fff; }
.component-summary-grid strong { color: var(--ink); font-size: 22px; }
.component-summary-grid span { color: var(--muted); font-size: 12px; }
.component-inspector-search { max-width: 360px; margin-bottom: 12px; }
.component-char-result { display: grid; grid-template-columns: 84px minmax(220px, .45fr) minmax(0, 1.55fr); gap: 14px; align-items: start; }
.component-char-glyph { display: grid; place-items: center; width: 84px; height: 84px; border: 1px solid #cddfd7; border-radius: 7px; background: #f7fbf8; color: var(--ink); font-family: "Songti SC", serif; font-size: 54px; }
.component-char-result code { display: block; margin: 6px 0; padding: 8px; border-radius: 5px; background: #f2f5f3; color: #245f50; font-family: "Songti SC", serif; font-size: 21px; }
.component-char-result small { color: var(--muted); font-size: 11px; }
.component-memberships { min-width: 0; }
.component-chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.component-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid #cbded5; border-radius: 5px; background: #f6fbf8; color: #245f50; font-size: 12px; }
.component-chip.manual { border-color: #c49a4c; background: #fff9eb; }
.component-chip.excluded { border-color: #d5a09a; background: #fff5f3; color: #9b3c33; }
.component-chip button { min-height: 20px; padding: 1px 4px; font-size: 10px; }
.component-manual-add { grid-column: 2 / -1; max-width: 420px; }
.component-toolbar { display: grid; grid-template-columns: 210px minmax(260px, 1fr) auto; gap: 8px; align-items: center; }
.component-table-wrap { max-height: 560px; overflow: auto; }
.component-definition-table input[type="text"], .component-definition-table input:not([type]) { min-width: 140px; }
.component-definition-table input[type="checkbox"] { width: auto; min-height: 0; }
.component-symbol { font-family: "Songti SC", serif; font-size: 24px; }
.component-filter-section { min-width: 0; }
.component-filter-search { margin-bottom: 10px; }
.component-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-height: 440px; overflow: auto; padding: 2px; }
.component-filter-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) 76px; gap: 7px; align-items: center; padding: 8px; border: 1px solid #d9e1dd; border-radius: 6px; background: #fff; }
.component-filter-card.keep { border-color: #57977e; background: #edf8f2; }
.component-filter-card.exclude { border-color: #c97569; background: #fff2ef; }
.component-filter-card[hidden] { display: none; }
.component-filter-card > span:nth-child(2) { display: grid; min-width: 0; }
.component-filter-card strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.component-filter-card small { color: var(--muted); font-size: 10px; }
.component-filter-symbol { color: var(--ink); font-family: "Songti SC", serif; font-size: 27px; text-align: center; }
.component-filter-card select { min-width: 0; min-height: 30px; padding: 4px; font-size: 11px; }
.zodiac-filter-section { display: grid; gap: 10px; padding: 14px; border: 1px solid #d8e2dd; border-left: 4px solid #9aa4a0; border-radius: 8px; background: #fbfcfb; }
.zodiac-filter-section.enabled { border-left-color: #a66b2b; background: #fffbf4; }
.zodiac-filter-section .section-title-row { margin: 0; }
.zodiac-filter-master { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; border: 1px solid #c9d9d2; border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.zodiac-filter-master input, .zodiac-tier-option input { width: auto; min-height: 0; }
.zodiac-filter-section.enabled .zodiac-filter-master { border-color: #c79a62; background: #fff4e5; color: #87511f; }
.zodiac-filter-controls { display: grid; grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto; gap: 10px; align-items: end; }
.zodiac-filter-controls > label:first-child { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.zodiac-tier-option { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 7px 10px; border: 1px solid #e1d7c9; border-radius: 6px; background: #fff; cursor: pointer; }
.zodiac-tier-option strong, .zodiac-tier-option small { display: block; }
.zodiac-tier-option strong { font-size: 12px; }
.zodiac-tier-option small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.zodiac-filter-detected { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; background: #eef5f2; color: #315f53; font-size: 12px; }
.zodiac-filter-detected.missing { background: #fff1e7; color: #8d542d; }
.zodiac-filter-detected span { color: inherit; opacity: .86; }
.zodiac-filter-preview { display: grid; gap: 9px; padding-top: 10px; border-top: 1px solid #e5d8c5; }
.zodiac-preview-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.zodiac-preview-summary strong { color: #814b24; font-size: 15px; }
.zodiac-preview-summary span { color: var(--muted); font-size: 11px; }
.zodiac-filter-preview details { border: 1px solid #e1ddd4; border-radius: 6px; background: #fff; padding: 8px 10px; }
.zodiac-filter-preview summary { cursor: pointer; color: #345f54; font-size: 12px; font-weight: 800; }
.zodiac-preview-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.zodiac-preview-rules > div { padding: 8px; border-radius: 5px; background: #f7f9f7; }
.zodiac-preview-rules strong, .zodiac-preview-rules span { display: block; }
.zodiac-preview-rules strong { font-size: 12px; }
.zodiac-preview-rules span { margin-top: 2px; color: #9a6236; font-size: 10px; }
.zodiac-preview-rules p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.zodiac-preview-char-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.zodiac-preview-chars { display: flex; flex-wrap: wrap; gap: 5px; }
.zodiac-preview-chars button { display: inline-flex; align-items: center; gap: 3px; min-height: 34px; padding: 5px 8px; border-color: #dfaaa1; background: #fff4f1; color: #973e34; font-family: "Songti SC", serif; font-size: 18px; }
.zodiac-preview-chars button small { font-family: sans-serif; font-size: 9px; }
.zodiac-preview-pagination { justify-content: flex-end; }
.zodiac-preview-pagination button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.zodiac-test-warning { margin-top: 8px; border-left: 4px solid #a86d20; background: #fff8eb; }
.zodiac-summary-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0; }
.zodiac-summary-strip span { padding: 6px 9px; border: 1px solid #d8e2dd; border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; }
.zodiac-summary-strip span.keep { border-color: #c6dfd3; background: #eff8f3; color: #24624c; }
.zodiac-summary-strip span.avoid { border-color: #ecd0cb; background: #fff3f0; color: #9b3c33; }
.zodiac-summary-strip strong { color: inherit; font-size: 13px; }
.zodiac-admin-workspace-tabs { display: flex; gap: 8px; margin: 0 0 10px; border-bottom: 1px solid #dfe5e1; padding-bottom: 9px; }
.zodiac-admin-workspace-tabs button { min-width: 132px; }
.zodiac-admin-workspace-tabs button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.zodiac-artwork-head { margin-bottom: 5px; }
.zodiac-artwork-workbench { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .78fr); align-items: start; gap: 12px; }
.zodiac-artwork-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 9px; }
.zodiac-artwork-card { min-width: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 5px 9px; border: 1px solid #d8dfdb; border-radius: 11px; background: #fff; color: var(--ink); padding: 7px; text-align: left; }
.zodiac-artwork-card:hover, .zodiac-artwork-card.active { border-color: #2c7569; box-shadow: 0 6px 18px rgba(35, 80, 70, .12); }
.zodiac-artwork-card.active { box-shadow: inset 0 0 0 2px rgba(44, 117, 105, .16), 0 6px 18px rgba(35, 80, 70, .12); }
.zodiac-artwork-card.disabled { opacity: .58; }
.zodiac-artwork-thumb { grid-row: 1 / 3; width: 72px; height: 88px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #f3efe6; }
.zodiac-artwork-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.zodiac-artwork-thumb b { color: #8b6a34; font-family: var(--font-mincho); font-size: 34px; }
.zodiac-artwork-card-copy { min-width: 0; display: grid; gap: 4px; align-self: end; }
.zodiac-artwork-card-copy strong { font-size: 13px; }
.zodiac-artwork-card-copy small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.zodiac-artwork-card em { width: fit-content; align-self: start; border-radius: 999px; background: #edf7f2; color: #28624f; padding: 3px 6px; font-size: 10px; font-style: normal; }
.zodiac-artwork-card em.disabled { background: #f2efeb; color: #7d746a; }
.zodiac-artwork-editor { position: sticky; top: 0; display: grid; gap: 10px; padding: 14px; }
.zodiac-artwork-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.zodiac-artwork-editor-head h2 { margin: 0; font-size: 18px; }
.zodiac-artwork-editor-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.zodiac-artwork-preview { height: 220px; display: grid; place-items: center; overflow: hidden; border: 1px solid #ddd8cc; border-radius: 10px; background: #f5f1e8; }
.zodiac-artwork-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.zodiac-artwork-preview strong { color: #8a6a36; font-family: var(--font-mincho); font-size: 56px; }
.zodiac-artwork-upload { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; border: 1px dashed #b7c7c0; border-radius: 8px; background: #f6faf8; padding: 9px 10px; color: #2e655a; font-size: 12px; font-weight: 800; }
.zodiac-artwork-upload input { grid-column: 2; grid-row: 1 / 3; padding: 5px; font-size: 11px; }
.zodiac-artwork-upload small { color: var(--muted); font-size: 10px; font-weight: 400; }
.zodiac-artwork-editor .field { gap: 4px; }
.zodiac-artwork-editor .field span { color: #586660; font-size: 11px; font-weight: 800; }
.zodiac-artwork-editor input, .zodiac-artwork-editor textarea { padding: 7px 8px; font-size: 12px; }
.zodiac-artwork-editor textarea { min-height: 62px; line-height: 1.5; }
.zodiac-artwork-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
@media (max-width: 1300px) { .zodiac-artwork-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 980px) { .zodiac-artwork-workbench { grid-template-columns: 1fr; }.zodiac-artwork-editor { position: static; }.zodiac-artwork-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 620px) { .zodiac-admin-workspace-tabs { display: grid; grid-template-columns: 1fr 1fr; }.zodiac-admin-workspace-tabs button { min-width: 0; }.zodiac-artwork-grid { grid-template-columns: 1fr; } }

/* 一级筛选：无下拉、无长页面的一屏工作台 */
.filter-workbench-screen { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.filter-workbench-head { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.filter-workbench-head h1 { margin: 0; font-size: 22px; }
.filter-workbench-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.filter-record-switcher { display: grid; grid-template-columns: 34px minmax(230px, 360px) 34px; align-items: stretch; gap: 6px; }
.filter-record-switcher .icon-button { min-height: 36px; padding: 3px; font-size: 24px; }
.filter-current-record { min-width: 0; min-height: 36px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; border-color: #bad6cb; background: #f2f8f5; color: #234f45; padding: 6px 11px; text-align: left; }
.filter-current-record small { color: #76847e; font-size: 9px; }
.filter-current-record strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.filter-one-screen { min-height: 0; display: grid; grid-template-rows: 30px minmax(0, 1fr) 52px; overflow: hidden; border: 1px solid #d8dfdb; border-top: 3px solid #267064; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(35, 61, 53, .06); }
.filter-workbench-topline { min-width: 0; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #e2e7e4; background: #f8faf9; padding: 4px 10px; }
.filter-workbench-topline span { padding: 3px 8px; border-radius: 999px; background: #edf1ef; color: #62716b; font-size: 10px; white-space: nowrap; }
.filter-workbench-topline span.ready { background: #e3f3eb; color: #276653; font-weight: 800; }
.filter-workbench-topline span.pending { background: #fff1df; color: #91602d; font-weight: 800; }
.filter-console { min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) 260px; overflow: hidden; }
.filter-console-nav { min-height: 0; display: grid; align-content: start; gap: 7px; border-right: 1px solid #dfe5e2; background: #f4f7f5; padding: 10px 9px; }
.filter-console-nav button { min-height: 54px; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid transparent; background: transparent; color: #50615b; padding: 7px 8px; text-align: left; }
.filter-console-nav button i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e5ebe8; color: #687771; font-style: normal; font-size: 11px; font-weight: 900; }
.filter-console-nav button span, .filter-console-nav button strong, .filter-console-nav button small { min-width: 0; display: block; }
.filter-console-nav button strong { font-size: 13px; }
.filter-console-nav button small { margin-top: 2px; color: #86918d; font-size: 9px; }
.filter-console-nav button.active { border-color: #a9d1c1; background: #e7f4ee; color: #225f51; box-shadow: inset 3px 0 #267064; }
.filter-console-nav button.active i { background: #267064; color: #fff; }
.filter-console-stage { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: #fff; }
.filter-stage-panel { position: absolute; inset: 0; display: none; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 14px; }
.filter-stage-panel.active { display: block; }
.filter-stage-title { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.filter-stage-title h2 { margin: 0; color: #243b35; font-size: 17px; }
.filter-stage-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.filter-stage-title > div:last-child { display: flex; gap: 6px; }
.filter-stage-title button { min-height: 31px; padding: 5px 9px; font-size: 10px; }
.filter-console-summary { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); align-content: start; gap: 8px; border-left: 1px solid #dfe5e2; background: #fbfaf6; padding: 11px; overflow: hidden; }
.filter-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filter-summary-head > span { color: #293f38; font-size: 14px; font-weight: 900; }
.filter-summary-head button { min-height: 26px; font-size: 9px; }
.filter-summary-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.filter-summary-list li { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 7px; background: #fff; padding: 7px 8px; }
.filter-summary-list span { color: #748079; font-size: 10px; }
.filter-summary-list strong { overflow: hidden; color: #2a5e52; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.filter-summary-tip { align-self: end; border-left: 3px solid #c69b57; background: #fff7e9; color: #795b31; padding: 8px; font-size: 9px; line-height: 1.5; }
.filter-action-bar { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; border-top: 1px solid #dfe5e2; background: #fafbf9; padding: 7px 10px; }
.filter-action-bar > div { min-width: 0; display: grid; }
.filter-action-bar strong { color: #40514b; font-size: 11px; }
.filter-action-bar span { margin-top: 2px; color: #8a6a42; font-size: 9px; }
.filter-action-bar button { min-height: 34px; padding: 6px 13px; font-size: 11px; }

.filter-basic-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .9fr); grid-template-rows: auto auto; gap: 8px 10px; }
.filter-basic-grid > section { min-width: 0; border: 1px solid #e0e5e2; border-radius: 9px; background: #fafcfb; padding: 8px 10px; }
.filter-basic-grid > section:first-child { grid-row: span 2; }
.filter-basic-grid h3 { margin: 0 0 8px; font-size: 13px; }
.filter-gender-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.filter-gender-buttons label { min-width: 0; cursor: pointer; }
.filter-gender-buttons input { position: absolute; opacity: 0; pointer-events: none; }
.filter-gender-buttons label > span { min-height: 66px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-content: center; gap: 1px 7px; border: 1px solid #dbe4df; border-radius: 8px; background: #fff; padding: 7px 8px; }
.filter-gender-buttons b { grid-row: span 2; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #edf2ef; color: #52645e; font-size: 9px; }
.filter-gender-buttons strong { font-size: 12px; }
.filter-gender-buttons small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.filter-gender-buttons input:checked + span { border-color: #55a083; background: #eaf6f0; box-shadow: inset 0 0 0 1px #55a083; }
.filter-gender-buttons input:checked + span b { background: #267064; color: #fff; }
.filter-inline-hint { margin: 8px 0 0; border-radius: 6px; background: #eef5f2; color: #3c6258; padding: 7px 8px; font-size: 9px; }
.filter-basic-grid .element-checks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.filter-basic-grid .element-check { min-height: 42px; padding: 5px; }
.filter-basic-grid .selected-summary { margin: 7px 0 0; font-size: 9px; }
.filter-setting-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filter-setting-heading h3 { margin-bottom: 0; }
.filter-auto-badge { border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 800; }
.filter-auto-badge.ready { background: #e0f2e9; color: #216b59; }
.filter-auto-badge.missing { background: #fff0dc; color: #96601f; }
.filter-auto-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; border-radius: 6px; background: #eef7f3; color: #3c6258; padding: 5px 7px; font-size: 9px; }
.filter-auto-note .text-link { flex: 0 0 auto; min-height: 24px; padding: 2px 6px; font-size: 9px; }
.filter-stroke-setting { position: relative; min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 8px; border-width: 2px !important; padding: 6px 9px !important; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.filter-stroke-setting.unset { border-color: #d59a32 !important; background: #fff8e8 !important; box-shadow: 0 0 0 3px rgba(213, 154, 50, .11); }
.filter-stroke-setting.configured { border-color: #3d9074 !important; background: #edf8f3 !important; box-shadow: 0 0 0 3px rgba(61, 144, 116, .09); }
.filter-important-label { display: inline-block; margin-bottom: 3px; border-radius: 4px; background: #b9791f; color: #fff; padding: 2px 6px; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.filter-stroke-setting h3 { margin: 0 0 2px; color: #6f4818; font-size: 14px; }
.filter-stroke-setting p { margin: 1px 0 2px; color: #725f45; font-size: 8px; }
.filter-stroke-copy > strong { color: #9b5d14; font-size: 10px; }
.filter-stroke-setting.configured .filter-stroke-copy > strong { color: #276b58; }
.filter-stroke-input { min-height: 44px; display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid #d2a050; border-radius: 8px; background: #fff; padding: 2px 6px; }
.filter-stroke-input span { grid-column: 1 / 3; color: #8b652c; font-size: 8px; font-weight: 800; text-align: center; }
.filter-stroke-input input { width: 100%; min-height: 27px; border: 0; background: transparent; padding: 0 3px; color: #714512; font-size: 20px; font-weight: 900; text-align: center; box-shadow: none; }
.filter-stroke-input b { color: #8b652c; font-size: 12px; }
.filter-summary-list li.filter-summary-stroke.unset { border: 1px solid #e1aa50; background: #fff5df; }
.filter-summary-list li.filter-summary-stroke.unset strong { color: #a15d12; }
.filter-summary-list li.filter-summary-stroke.configured { border: 1px solid #aad7c5; background: #edf8f3; }

.filter-component-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.filter-component-toolbar input { min-height: 34px; margin: 0; padding: 6px 9px; font-size: 11px; }
.filter-component-toolbar > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.filter-component-toolbar > div { display: flex; gap: 5px; }
.filter-component-toolbar button { min-height: 30px; padding: 4px 8px; font-size: 9px; }
.component-filter-grid.one-screen-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: none; overflow: hidden; }
.component-filter-grid.one-screen-grid .component-filter-card { min-height: 58px; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; gap: 3px 6px; padding: 6px; }
.component-filter-grid.one-screen-grid .component-filter-card.common:not(.keep):not(.exclude) { border-color: #d7b976; background: #fffaf0; }
.component-filter-grid.one-screen-grid .component-filter-symbol { grid-row: 1 / 3; font-size: 22px; }
.component-filter-grid.one-screen-grid .component-filter-card strong { font-size: 10px; }
.component-filter-grid.one-screen-grid .component-filter-card small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.component-usage-cell { display: grid; gap: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.component-common-toggle { display: inline-flex; align-items: center; gap: 4px; color: #72531e; font-size: 10px; white-space: nowrap; }
.component-common-toggle input { width: 15px; height: 15px; margin: 0; }
.component-mode-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.component-mode-switch button { min-height: 20px; border-color: #dce3df; border-radius: 4px; background: #f7f9f8; color: #718079; padding: 1px 2px; font-size: 8px; }
.component-mode-switch button.active { border-color: #899a93; background: #64766f; color: #fff; }
.component-mode-switch button.keep.active { border-color: #4a9075; background: #e2f3eb; color: #23634f; }
.component-mode-switch button.exclude.active { border-color: #c7776c; background: #fff0ed; color: #9b3b32; }

.one-screen-exclusions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 7px; }
.one-screen-exclusions .exclusion-option { min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 1px solid #e0e5e2; border-radius: 8px; background: #fafcfb; padding: 5px 7px; }
.one-screen-exclusions .check { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; }
.one-screen-exclusions .check > span { min-width: 0; display: grid; }
.one-screen-exclusions .check strong { color: #314a42; font-size: 11px; }
.one-screen-exclusions .check small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.one-screen-exclusions button { min-height: 27px; padding: 3px 7px; font-size: 8px; }

.filter-stage-panel .zodiac-filter-section { height: 100%; box-sizing: border-box; align-content: start; overflow: hidden; border: 0; border-left: 4px solid #9aa4a0; border-radius: 8px; padding: 10px; }
.filter-stage-panel .zodiac-filter-section.enabled { border-left-color: #a66b2b; }
.zodiac-choice-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.zodiac-choice-grid button { min-height: 31px; border-color: #d9e2de; background: #fff; color: #50625c; padding: 4px; font-size: 10px; }
.zodiac-choice-grid button.active { border-color: #267064; background: #267064; color: #fff; }
.zodiac-filter-controls.no-select { grid-template-columns: minmax(260px, 1fr) auto; align-items: center; }
.zodiac-filter-controls.no-select button { min-height: 34px; font-size: 10px; }
.zodiac-filter-section .zodiac-filter-detected { padding: 6px 8px; font-size: 9px; }
.zodiac-filter-preview { gap: 5px; padding-top: 6px; }
.zodiac-preview-summary strong { font-size: 12px; }
.zodiac-preview-summary span { font-size: 9px; }
.zodiac-preview-rules { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 0; }
.zodiac-preview-rules button { min-width: 0; min-height: 35px; display: grid; border-color: #dce4e0; background: #f8faf9; color: #315b50; padding: 4px 6px; text-align: left; }
.zodiac-preview-rules button strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.zodiac-preview-rules button span { overflow: hidden; color: #8a6741; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.zodiac-preview-chars { gap: 3px; }
.zodiac-preview-chars button { min-height: 25px; padding: 2px 5px; font-size: 14px; }
.zodiac-preview-chars button small { color: #a97972; font-size: 7px; font-weight: 500; opacity: .58; }
.zodiac-preview-char-head, .zodiac-preview-pagination { font-size: 8px; }
.zodiac-preview-pagination button { min-height: 25px; }

.filter-empty-result { height: calc(100% - 10px); display: grid; place-content: center; gap: 7px; border: 1px dashed #cfd8d4; border-radius: 10px; background: #fafcfb; color: var(--muted); text-align: center; }
.filter-empty-result strong { color: #3b5149; font-size: 18px; }
.filter-result-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.filter-result-metrics > div { min-height: 90px; display: grid; align-content: center; border-radius: 9px; background: #edf5f1; padding: 10px; }
.filter-result-metrics strong { color: #255f52; font-size: 22px; }
.filter-result-metrics span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.filter-result-notice { margin-top: 10px; border-left: 4px solid #bc8b45; background: #fff7e9; color: #755a34; padding: 10px; font-size: 10px; }

.filter-overlay { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; background: rgba(20, 32, 29, .42); backdrop-filter: blur(2px); padding: 24px; }
.filter-picker-dialog, .filter-info-dialog { width: min(920px, 86vw); max-height: min(680px, 84vh); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #cfdad5; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(17, 32, 27, .24); }
.filter-picker-dialog > header, .filter-info-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e0e5e2; padding: 14px 16px; }
.filter-picker-dialog h2, .filter-info-dialog h2 { margin: 0; font-size: 18px; }
.filter-picker-dialog header p, .filter-info-dialog header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.filter-picker-dialog > footer, .filter-info-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e0e5e2; padding: 10px 16px; }
.filter-picker-dialog > footer div { display: flex; gap: 6px; }
.filter-project-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.filter-project-grid button { min-width: 0; display: grid; align-content: center; border-color: #dbe4df; background: #f8faf9; color: #334a42; padding: 10px; text-align: left; }
.filter-project-grid button strong, .filter-project-grid button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-project-grid button strong { font-size: 13px; }
.filter-project-grid button span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.filter-project-grid button.active { border-color: #267064; background: #e6f4ed; color: #245f51; box-shadow: inset 3px 0 #267064; }
.filter-info-dialog { width: min(520px, 86vw); }
.filter-info-dialog > div { display: grid; align-content: start; gap: 5px; padding: 14px 16px; }
.filter-info-dialog > div p { margin: 0; border-radius: 6px; background: #f5f8f6; color: #4f615a; padding: 8px 9px; font-size: 11px; line-height: 1.5; }
.filter-info-dialog > footer { justify-content: flex-end; }
.exclusion-preview-dialog { width: min(880px, 86vw); }
.filter-preview-char-grid { min-height: 0; display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 14px 16px; }
.filter-preview-char-grid span { display: grid; place-items: center; border: 1px solid #dbe3df; border-radius: 5px; background: #fafcfb; font-family: "Songti SC", serif; font-size: 19px; }
.filter-preview-char-grid em { grid-column: 1 / -1; display: grid; place-items: center; color: var(--muted); font-style: normal; }

@media (max-width: 1500px) {
  .filter-console { grid-template-columns: 150px minmax(0, 1fr) 225px; }
  .filter-console-nav button { min-height: 50px; }
  /* 仍保持四列：每页 24 个字根正好是六行，普通笔记本屏幕也能完整看见。 */
  .component-filter-grid.one-screen-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .component-filter-grid.one-screen-grid .component-filter-card { min-height: 50px; grid-template-columns: 27px minmax(0, 1fr); padding: 4px; }
  .component-filter-grid.one-screen-grid .component-filter-symbol { font-size: 18px; }
  .component-mode-switch button { min-width: 0; padding-inline: 0; }
  .filter-basic-grid { grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); }
  .zodiac-preview-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.zodiac-mobile-pane-tabs { display: none; }
.zodiac-test-layout { display: grid; grid-template-columns: minmax(250px, 300px) minmax(300px, 360px) minmax(420px, 1fr); gap: 10px; height: max(500px, calc(100vh - 225px)); min-height: 0; align-items: stretch; }
.zodiac-rule-sidebar { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 8px; min-height: 0; overflow: hidden; }
.zodiac-pane-heading h2, .zodiac-pane-heading p { margin: 0; }
.zodiac-pane-heading p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.zodiac-rule-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.zodiac-rule-filters #zodiac-test-status { grid-column: 1 / -1; }
.zodiac-rule-filters button { grid-column: 1 / -1; }
.zodiac-rule-filters select, .zodiac-rule-filters button { min-height: 34px; padding: 5px 7px; font-size: 11px; }
.zodiac-rule-list { display: grid; grid-auto-rows: max-content; align-content: start; min-height: 0; gap: 6px; overflow: auto; padding-right: 3px; overscroll-behavior: contain; }
.zodiac-rule-group { display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; }
.zodiac-rule-group + .zodiac-rule-group { margin-top: 8px; padding-top: 9px; border-top: 1px solid #e1e8e4; }
.zodiac-rule-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 7px 8px; border-radius: 5px; font-size: 12px; }
.zodiac-rule-group-heading.keep { background: #eaf7f0; color: #24624c; }
.zodiac-rule-group-heading.avoid { background: #fff1ee; color: #9b3c33; }
.zodiac-rule-group-heading small { font-size: 10px; font-weight: 500; }
.zodiac-rule-group-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; }
.zodiac-catalog-counts { display: grid; gap: 3px; padding: 9px; border-radius: 6px; background: #f2f6f4; }
.zodiac-catalog-counts strong { color: var(--ink); font-size: 13px; }
.zodiac-catalog-counts span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.zodiac-catalog-card { display: grid; grid-auto-rows: max-content; align-content: start; gap: 5px; padding: 8px; border: 1px solid #d8e2dd; border-radius: 6px; background: #fff; }
.zodiac-catalog-card.waiting { border-style: dashed; background: #f6f6f4; }
.zodiac-catalog-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.zodiac-catalog-card.waiting .zodiac-rule-card-head, .zodiac-catalog-card.waiting p { color: #68736f; }
.zodiac-catalog-status { padding: 5px 6px; border-radius: 4px; background: #f1f4f2; color: #67736e; font-size: 10px; line-height: 1.4; }
.zodiac-catalog-card.available .zodiac-catalog-status { background: #eaf6f0; color: #2d6a54; }
.zodiac-catalog-test-items { display: grid; grid-auto-rows: max-content; align-content: start; gap: 5px; }
.zodiac-test-item-button { display: grid; grid-auto-rows: max-content; align-content: start; gap: 3px; width: 100%; min-height: 0; padding: 7px 8px; border: 1px solid #a9c9bb; border-radius: 5px; background: #f2faf6; color: #285b49; text-align: left; }
.zodiac-test-item-button:hover, .zodiac-test-item-button.active { border-color: var(--primary); background: #dff2e8; }
.zodiac-test-item-button strong { font-size: 11px; }
.zodiac-test-item-button span { font-size: 9px; line-height: 1.4; }
.zodiac-rule-card { display: grid; gap: 5px; width: 100%; padding: 10px; border: 1px solid #d8e2dd; border-radius: 6px; background: #fff; color: var(--ink); text-align: left; }
.zodiac-rule-card:hover, .zodiac-rule-card.active { border-color: var(--primary); background: #edf7f2; }
.zodiac-rule-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zodiac-rule-card > span:not(.zodiac-rule-card-head), .zodiac-rule-card small { color: var(--muted); font-size: 11px; }
.zodiac-rule-card em { padding: 2px 5px; border-radius: 3px; font-size: 10px; font-style: normal; }
.zodiac-rule-card em.keep { background: #e5f5ec; color: #24624c; }
.zodiac-rule-card em.avoid { background: #fff0ed; color: #9b3c33; }
.zodiac-rule-detail { display: grid; gap: 10px; }
.zodiac-rule-detail-pane { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.zodiac-detail-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.zodiac-direction-badge { align-self: start; padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.zodiac-direction-badge.keep { background: #e5f5ec; color: #24624c; }
.zodiac-direction-badge.avoid { background: #fff0ed; color: #9b3c33; }
.zodiac-traditional-reason { margin: 0; padding: 12px; border-left: 3px solid #b78138; background: #fffbf2; color: #384b45; line-height: 1.85; white-space: pre-line; }
.zodiac-rule-result { margin: 0; padding: 10px 12px; border-radius: 5px; background: #eef7f3; color: #31554a; line-height: 1.7; }
.zodiac-audit-badge { align-self: start; padding: 4px 7px; border-radius: 4px; background: #eef4f1; color: #42665a; font-size: 11px; }
.zodiac-audit-badge.adjusted { background: #fff5e3; color: #8a5b18; }
.zodiac-preview-pane { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 8px; min-width: 0; min-height: 0; overflow: hidden; }
.zodiac-preview-heading { gap: 8px; }
.zodiac-page-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
.zodiac-page-controls span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.zodiac-page-controls button { min-height: 28px; padding: 3px 7px; font-size: 10px; }
.zodiac-preview-toolbar { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(105px, .7fr) minmax(105px, .7fr) auto; gap: 6px; }
.zodiac-preview-toolbar input, .zodiac-preview-toolbar select, .zodiac-preview-toolbar button { min-height: 34px; padding: 5px 7px; font-size: 11px; }
.zodiac-manual-tools { border: 1px dashed #c5d9d0; border-radius: 6px; background: #f7fbf9; }
.zodiac-manual-tools summary { padding: 6px 8px; color: #315f52; cursor: pointer; font-size: 11px; font-weight: 700; }
.zodiac-manual-include { display: grid; grid-template-columns: 76px minmax(180px, 1fr) auto; gap: 7px; align-items: center; padding: 0 8px 8px; }
.zodiac-char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; gap: 8px; min-height: 0; overflow: auto; padding-right: 3px; overscroll-behavior: contain; }
.zodiac-char-card { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 10px; border: 1px solid #d8e4df; border-radius: 6px; background: #fff; }
.zodiac-char-card.include { border-color: #6a9e82; background: #f2faf6; }
.zodiac-char-card.exclude { border-color: #c8786e; background: #fff5f3; }
.zodiac-char-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.zodiac-char-card-head strong { font-family: "Songti SC", serif; font-size: 31px; }
.zodiac-char-card-head span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.zodiac-char-card-head em { color: var(--primary); font-size: 10px; font-style: normal; }
.zodiac-char-card code { overflow: hidden; padding: 5px; border-radius: 4px; background: #f1f5f3; color: #315f52; font-family: "Songti SC", serif; text-overflow: ellipsis; white-space: nowrap; }
.zodiac-match-paths { display: grid; gap: 3px; color: #3f5550; font-size: 11px; }
.zodiac-match-paths span { overflow-wrap: anywhere; }
.zodiac-match-paths small { color: var(--muted); }
.zodiac-char-card p { margin: 0; color: #6e5542; font-size: 11px; line-height: 1.45; }
.zodiac-char-actions { display: flex; justify-content: flex-end; margin-top: auto; }
.zodiac-char-actions button { min-height: 27px; padding: 3px 7px; font-size: 10px; }
.zodiac-char-actions .danger { border-color: #c8786e; color: #9b3c33; }
@media (max-width: 1300px) {
  .zodiac-test-layout { grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); grid-template-rows: minmax(170px, .58fr) minmax(280px, 1fr); grid-template-areas: "rules detail" "rules results"; }
  .zodiac-rule-sidebar { grid-area: rules; }
  .zodiac-rule-detail-pane { grid-area: detail; }
  .zodiac-preview-pane { grid-area: results; }
  .zodiac-traditional-reason { padding: 9px 10px; line-height: 1.65; }
  .zodiac-rule-result { padding: 8px 10px; line-height: 1.55; }
}
@media (max-width: 1100px) {
  .material-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material-entry-wide, .material-checkbox-field { grid-column: span 1; }
  .material-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ocr-batch-apply { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .component-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .component-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .component-char-result { grid-template-columns: 74px minmax(0, 1fr); }
  .component-memberships, .component-manual-add { grid-column: 1 / -1; }
  .zodiac-summary-strip span:nth-child(4), .zodiac-summary-strip span:nth-child(5) { display: none; }
  .zodiac-mobile-pane-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 8px 0; }
  .zodiac-mobile-pane-tabs button { min-height: 34px; padding: 5px; border: 1px solid #cbd9d3; background: #fff; color: var(--muted); font-size: 11px; }
  .zodiac-mobile-pane-tabs button.active { border-color: var(--primary); background: #e8f5ef; color: var(--primary); }
  .zodiac-test-layout { display: block; height: max(480px, calc(100vh - 260px)); }
  .zodiac-test-layout > .zodiac-rule-sidebar, .zodiac-test-layout > .zodiac-rule-detail-pane, .zodiac-test-layout > .zodiac-preview-pane { display: none; height: 100%; }
  .zodiac-test-layout[data-mobile-pane="rules"] > .zodiac-rule-sidebar { display: grid; }
  .zodiac-test-layout[data-mobile-pane="detail"] > .zodiac-rule-detail-pane { display: block; }
  .zodiac-test-layout[data-mobile-pane="results"] > .zodiac-preview-pane { display: grid; }
  .zodiac-rule-group-list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .zodiac-preview-toolbar { grid-template-columns: 1fr 1fr; }
  .zodiac-preview-toolbar input { grid-column: 1 / -1; }
  .zodiac-preview-toolbar button { grid-column: 1 / -1; }
  .zodiac-manual-include { grid-template-columns: 70px minmax(0, 1fr) auto; }
}

/* 2026-07-16: unified library and rule workspaces */
.admin-hub-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.admin-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 2px;
}

.admin-hub-head h1,
.admin-hub-head p { margin: 0; }
.admin-hub-head h1 { font-size: 22px; line-height: 1.15; }
.admin-hub-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-hub-head > div > span { color: #9a6b2f; font-size: 8px; font-weight: 800; letter-spacing: 2px; }
.admin-hub-health { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #d5e5dd; border-radius: 999px; background: #f1faf5; color: #2c7257; font-size: 11px; }
.admin-hub-health i { width: 7px; height: 7px; border-radius: 50%; background: #32a66b; box-shadow: 0 0 0 4px rgba(50,166,107,.1); }

.admin-hub-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
}
.admin-hub-tabs button { min-height: 34px; padding: 5px 14px; }
.admin-hub-content { min-width: 0; min-height: 0; overflow: hidden; }
.admin-hub-content > .page-head,
.admin-hub-content > .screen-page > .page-head,
.admin-hub-content > .page > .page-head { display: none; }
.admin-hub-content > .screen-page,
.admin-hub-content > .page { height: 100%; min-height: 0; }
.hub-search > .global-search-screen { grid-template-rows: auto minmax(0, 1fr); }

/* 虚词＋雅字维护台：名单可长期维护，组合时仍与当前项目二级字库取交集。 */
.template-word-loading,
.template-word-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}
.template-word-empty p { margin: 0; }
.template-word-workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 9px;
}
.template-word-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 130px)) minmax(280px, 1fr);
  gap: 8px;
  align-items: stretch;
}
.template-word-summary > div {
  display: grid;
  align-content: center;
  min-height: 62px;
  padding: 8px 12px;
  border: 1px solid #d6e4de;
  border-radius: 9px;
  background: #f3f9f6;
}
.template-word-summary strong {
  color: #205f50;
  font-size: 24px;
  line-height: 1;
}
.template-word-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.template-word-summary p {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 13px;
  border-left: 4px solid #bd8b38;
  border-radius: 8px;
  background: #fff8ea;
  color: #6f5a39;
  font-size: 12px;
  line-height: 1.55;
}
.template-word-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
}
.template-word-toolbar input {
  width: min(360px, 38vw);
  min-height: 36px;
}
.template-word-toolbar button {
  min-height: 36px;
  padding: 6px 15px;
}
.template-word-columns {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 10px;
}
.template-word-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d8e2de;
  border-radius: 10px;
  background: #fff;
}
.template-word-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8e4;
}
.template-word-panel > header span {
  color: #946521;
  font-size: 10px;
  font-weight: 800;
}
.template-word-panel > header h3 {
  margin: 2px 0 0;
  color: #28463f;
  font-size: 15px;
}
.template-word-panel > header b {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f4ef;
  color: #236650;
  font-size: 12px;
}
.template-word-import {
  display: grid;
  gap: 6px;
  align-items: stretch;
  padding: 8px;
  border-bottom: 1px solid #e5ebe8;
  background: #fbfaf6;
}
.virtual-panel .template-word-import {
  grid-template-columns: minmax(140px, 1fr) 70px 122px minmax(110px, .72fr) auto auto;
}
.elegant-panel .template-word-import {
  grid-template-columns: minmax(140px, 1fr) minmax(115px, .65fr) minmax(110px, .7fr) auto auto;
}
.template-word-import textarea {
  height: 52px;
  min-height: 52px;
  resize: none;
}
.template-word-import input,
.template-word-import select,
.template-word-import button,
.template-word-file {
  min-height: 36px;
}
.template-word-file {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid #70a092;
  border-radius: 6px;
  background: #fff;
  color: #226753;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.template-word-file:hover { background: #edf7f3; }
.template-word-file input { display: none; }
.template-word-list {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  overscroll-behavior: contain;
}
.template-word-row {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid #dde5e1;
  border-radius: 7px;
  background: #fff;
}
.template-word-row:hover {
  border-color: #9fc2b6;
  background: #f8fcfa;
}
.template-word-row.virtual-row {
  grid-template-columns: 42px 64px 120px minmax(90px, 1fr) auto auto;
}
.template-word-row.elegant-row {
  grid-template-columns: 42px minmax(110px, .7fr) minmax(90px, 1fr) auto auto;
}
.template-word-row strong {
  color: #1d5347;
  font-family: "Songti SC", serif;
  font-size: 22px;
  text-align: center;
}
.template-word-row input,
.template-word-row select,
.template-word-row button {
  min-width: 0;
  min-height: 32px;
  padding: 4px 7px;
}
.template-word-row .danger-ghost {
  border-color: #edb3ac;
  background: #fff7f6;
  color: #a34238;
}
.template-word-row .danger-ghost:hover {
  border-color: #ce746a;
  background: #fff0ee;
}
.template-word-no-result {
  display: grid;
  min-height: 180px;
  place-items: center;
  margin: 0;
  color: var(--muted);
}
.action-image-library-workbench {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.action-image-library-tabs {
  width: max-content;
  max-width: 100%;
}
.action-image-word-panel,
.action-image-pair-panel {
  min-height: 0;
}
.action-image-import {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .55fr) minmax(160px, .7fr) auto auto;
}
.action-image-pair-import {
  grid-template-columns: minmax(300px, 1fr) auto auto;
}
.action-image-pair-import p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.action-image-word-row {
  grid-template-columns: 54px minmax(120px, .65fr) minmax(180px, 1fr) auto auto;
}
.action-image-pair-row {
  grid-template-columns: 82px 112px 86px minmax(100px, .55fr) minmax(180px, 1fr) auto auto;
}
.action-image-pair-row strong {
  font-size: 18px;
  white-space: nowrap;
}
.action-image-action-list button {
  min-height: 52px;
}
.action-image-action-list button span {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
@media (max-width: 1280px) {
  .template-word-workbench { height: auto; }
  .template-word-summary { grid-template-columns: repeat(4, minmax(80px, 1fr)); }
  .template-word-summary p { grid-column: 1 / -1; }
  .template-word-columns { grid-template-columns: 1fr; }
  .template-word-panel { max-height: 620px; }
  .virtual-panel .template-word-import,
  .elegant-panel .template-word-import {
    grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(100px, auto)) auto auto;
  }
  .action-image-library-workbench { height: 100%; }
  .action-image-import {
    grid-template-columns: minmax(180px, 1fr) minmax(130px, .55fr) minmax(150px, .7fr) auto auto;
  }
  .action-image-pair-row {
    grid-template-columns: 82px 112px 86px minmax(100px, .55fr) minmax(150px, 1fr);
  }
  .action-image-pair-row button { grid-column: auto; }
}
@media (max-width: 760px) {
  .template-word-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-word-toolbar { flex-wrap: wrap; }
  .template-word-toolbar input { width: 100%; }
  .virtual-panel .template-word-import,
  .elegant-panel .template-word-import {
    grid-template-columns: 1fr 1fr;
  }
  .template-word-import textarea { grid-column: 1 / -1; }
  .template-word-row.virtual-row,
  .template-word-row.elegant-row {
    grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr);
  }
  .template-word-row.virtual-row input,
  .template-word-row.elegant-row input { grid-column: span 2; }
  .action-image-library-workbench { height: auto; }
  .action-image-library-tabs { width: 100%; }
  .action-image-library-tabs button { flex: 1 1 0; }
  .action-image-import,
  .action-image-pair-import {
    grid-template-columns: 1fr 1fr;
  }
  .action-image-import textarea,
  .action-image-pair-import textarea { grid-column: 1 / -1; }
  .action-image-word-row,
  .action-image-pair-row {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  }
  .action-image-word-row input:last-of-type,
  .action-image-pair-row input:last-of-type { grid-column: span 2; }
}

/* DeepSeek character-meaning preview: real API results, never written to the official library. */
.character-meaning-workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
}
.meaning-preview-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 12px 14px;
  border-top: 3px solid #23715e;
}
.meaning-preview-summary h2,
.meaning-preview-summary p { margin: 0; }
.meaning-preview-summary h2 { margin-top: 2px; font-size: 19px; }
.meaning-preview-summary p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.meaning-preview-summary > div:first-child > span { color: #a87930; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.meaning-preview-stats { display: flex; gap: 6px; }
.meaning-preview-stats span {
  display: grid;
  min-width: 82px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #eef7f3;
  color: var(--muted);
  font-size: 9px;
}
.meaning-preview-stats b { color: #205f4e; font-size: 18px; line-height: 1.1; }
.meaning-preview-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 6px; }
.meaning-preview-actions button { min-width: 128px; min-height: 34px; padding: 5px 10px; }
.meaning-batch-progress {
  display: grid;
  gap: 5px;
  padding: 9px 12px;
  border-left: 4px solid #9eaaa5;
}
.meaning-batch-progress.status-running { border-left-color: #24745d; background: #f1faf6; }
.meaning-batch-progress.status-completed { border-left-color: #2f8a62; background: #eff9f3; }
.meaning-batch-progress.status-paused,
.meaning-batch-progress.status-partial { border-left-color: #b88532; background: #fff9ee; }
.meaning-batch-progress.status-failed { border-left-color: #bd564d; background: #fff5f3; }
.meaning-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meaning-progress-head > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.meaning-progress-head strong { font-size: 13px; white-space: nowrap; }
.meaning-progress-head span,
.meaning-batch-progress small { color: var(--muted); font-size: 9px; }
.meaning-progress-head b { color: #20624f; font-size: 16px; }
.meaning-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e1e9e5; }
.meaning-progress-track i { display: block; height: 100%; border-radius: inherit; background: #268164; transition: width .25s ease; }
.meaning-batch-progress.status-failed .meaning-progress-track i { background: #bd564d; }
.meaning-batch-progress.status-paused .meaning-progress-track i,
.meaning-batch-progress.status-partial .meaning-progress-track i { background: #bd8a35; }
.meaning-preview-rules {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 6px 14px;
  align-items: center;
  padding: 9px 12px;
}
.meaning-preview-rules h3,
.meaning-preview-rules p { margin: 0; }
.meaning-preview-rules h3 { font-size: 14px; }
.meaning-preview-rules p,
.meaning-preview-rules small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.meaning-preview-rules small { grid-column: 1 / -1; }
.meaning-preview-samples { display: grid; grid-template-columns: repeat(10, minmax(55px, 1fr)); gap: 5px; }
.meaning-preview-sample {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 3px;
  border: 1px solid #d8e5df;
  border-radius: 6px;
  background: #f8fbf9;
}
.meaning-preview-sample strong { font-family: "Songti SC", serif; font-size: 21px; }
.meaning-preview-sample span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.meaning-preview-results {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding: 1px 2px 8px;
}
.meaning-preview-result {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9e4df;
  border-radius: 8px;
  background: #fff;
}
.meaning-preview-result header { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding-bottom: 7px; border-bottom: 1px solid #e4ebe7; }
.meaning-preview-result header strong { color: #185c49; font-family: "Songti SC", serif; font-size: 28px; line-height: 1; }
.meaning-preview-result header span { color: var(--muted); font-size: 10px; }
.meaning-preview-result header i { padding: 3px 6px; border-radius: 999px; background: #e6f3ed; color: #2f755d; font-size: 8px; font-style: normal; font-weight: 800; }
.meaning-preview-result dl { display: grid; gap: 5px; margin: 8px 0 0; }
.meaning-preview-result dl div { display: grid; grid-template-columns: 62px 1fr; gap: 8px; }
.meaning-preview-result dt { color: #6e7b76; font-size: 10px; font-weight: 800; }
.meaning-preview-result dd { margin: 0; color: #26322e; font-size: 11px; line-height: 1.45; }
.meaning-preview-empty,
.meaning-preview-wait {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}
.meaning-preview-empty strong,
.meaning-preview-wait strong { color: var(--ink); font-size: 16px; }
.meaning-preview-empty p,
.meaning-preview-wait p { margin: 0; font-size: 10px; }

/* compact one-screen maintenance */
.maintenance-screen-workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 7px;
}
.maintenance-page-head { min-height: 34px; margin: 0; }
.maintenance-page-head h1 { font-size: 18px; }
.maintenance-page-head p { margin-top: 2px; font-size: 10px; }
.maintenance-page-head button { min-height: 30px; padding: 4px 9px; font-size: 10px; }
.maintenance-control-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; padding: 8px 10px; }
.maintenance-control-panel .maintenance-tabs { flex-wrap: nowrap; gap: 4px; margin: 0; }
.maintenance-control-panel .maintenance-tabs button { min-height: 32px; padding: 4px 9px; font-size: 10px; white-space: nowrap; }
.maintenance-control-panel .maintenance-toolbar { display: grid; grid-template-columns: 180px minmax(180px, 280px) 96px auto; justify-content: end; gap: 7px; width: max-content; max-width: 100%; margin-left: auto; }
.maintenance-control-panel .maintenance-character-toolbar { grid-template-columns: 145px minmax(150px, 220px) 74px 112px auto auto auto; }
.maintenance-control-panel .all-char-toolbar { grid-template-columns: 130px minmax(300px, 1fr) 230px auto; width: 100%; }
.maintenance-control-panel .all-char-filters { min-width: 0; }
.maintenance-control-panel .field label { margin-bottom: 3px; font-size: 9px; }
.maintenance-control-panel input,
.maintenance-control-panel select,
.maintenance-control-panel button { min-height: 31px; padding: 4px 7px; font-size: 10px; }
.maintenance-control-panel .filter-checks { flex-wrap: nowrap; gap: 4px; }
.maintenance-control-panel .filter-checks label { padding: 3px 5px; white-space: nowrap; }

.maintenance-workspace-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 8px; }
.maintenance-results-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 10px; overflow: hidden; }
.maintenance-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.maintenance-results-head h2,
.maintenance-results-head p { margin: 0; }
.maintenance-results-head h2 { font-size: 16px; }
.maintenance-results-head p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.maintenance-top-pagination { display: flex; align-items: center; gap: 5px; }
.maintenance-top-pagination span { color: var(--muted); font-size: 10px; }
.maintenance-top-pagination button { min-height: 28px; padding: 3px 7px; font-size: 10px; }
.maintenance-results-body { grid-row: 3; min-width: 0; min-height: 0; overflow: auto; padding-top: 8px; overscroll-behavior: contain; }

.maintenance-char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); align-content: start; gap: 6px; }
.maintenance-char-tile { position: relative; min-width: 0; height: 58px; border: 1px solid #d9e2de; border-radius: 6px; background: #fff; overflow: hidden; }
.maintenance-char-tile:hover { border-color: #7fac99; background: #f5fbf8; }
.maintenance-char-tile.selected { border: 2px solid var(--primary); background: #e8f5ef; box-shadow: 0 3px 10px rgba(34,91,72,.12); }
.maintenance-char-tile.deleted { border-color: #e4c2bc; background: #fff5f3; }
.maintenance-char-main { display: grid; place-items: center; align-content: center; gap: 1px; width: 100%; height: 100%; padding: 3px; border: 0; background: transparent; color: var(--ink); }
.maintenance-char-main strong { font-family: "Songti SC", serif; font-size: 25px; line-height: 1; }
.maintenance-char-main small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-char-tile > label { position: absolute; z-index: 2; top: 2px; left: 3px; }
.maintenance-char-tile > label input { width: 13px; min-width: 0; height: 13px; padding: 0; }
.maintenance-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); text-align: center; }
.maintenance-empty strong { color: var(--ink); }

.maintenance-side-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 9px; overflow: hidden; }
.maintenance-tool-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.maintenance-tool-tabs button { min-height: 31px; padding: 4px 3px; font-size: 9px; }
.maintenance-side-body { min-height: 0; overflow: auto; padding: 9px 2px 2px; overscroll-behavior: contain; }
.maintenance-tool-section h3 { margin: 0 0 10px; font-size: 15px; }
.maintenance-side-form { display: grid; gap: 9px; }
.maintenance-side-form textarea { min-height: 130px; }
.maintenance-selected-card { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; margin-bottom: 12px; }
.maintenance-selected-card h3,
.maintenance-selected-card p { margin: 0; }
.maintenance-selected-card p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.maintenance-selected-glyph { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; background: #e8f5ef; color: #235c48; font-family: "Songti SC", serif; font-size: 36px; }
.maintenance-selected-tags { display: grid; gap: 6px; margin-bottom: 12px; }
.maintenance-selected-tags > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.maintenance-selected-title h3,
.maintenance-selected-title p { margin: 0; }
.maintenance-selected-title p { margin-top: 3px; color: var(--muted); font-size: 9px; }
.maintenance-selected-editor { margin-top: 8px; overflow: hidden; }
.maintenance-selected-editor table,
.maintenance-selected-editor tbody,
.maintenance-selected-editor tr,
.maintenance-selected-editor td { display: block; width: 100%; }
.maintenance-selected-editor td { padding: 4px 0; border: 0; }
.maintenance-selected-editor .maintenance-table input { width: 100%; min-width: 0; }
.maintenance-selected-editor .maintenance-table td:last-child { min-width: 0; }
.maintenance-selected-editor .row { display: flex; flex-wrap: wrap; gap: 4px; }
.maintenance-selected-editor button { min-height: 30px; padding: 4px 8px; font-size: 10px; }
.maintenance-side-body .bulk-add-box { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; }
.maintenance-side-body .bulk-add-box textarea { min-height: 110px; }
.maintenance-side-body .exclusion-clean-panel .row { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.maintenance-side-body .exclusion-clean-panel .row .danger { grid-column: 1 / -1; }
.maintenance-side-body .exclusion-clean-panel .table { font-size: 10px; }
.maintenance-side-body .exclusion-clean-panel .audit-summary { display: grid; gap: 3px; margin-bottom: 7px; }
.maintenance-side-body .exclusion-clean-panel .exclusion-audit-table th,
.maintenance-side-body .exclusion-clean-panel .exclusion-audit-table td { padding: 5px 4px; }
.maintenance-side-body .exclusion-clean-panel .notice { padding: 8px; font-size: 9px; }
.maintenance-batch-details { margin-top: 7px; border: 1px solid #d8e4df; border-radius: 6px; background: #f7fbf9; }
.maintenance-batch-details summary { padding: 6px 8px; color: #2f6553; cursor: pointer; font-size: 10px; font-weight: 700; }
.maintenance-batch-details .batch-panel { margin: 0; border: 0; box-shadow: none; }
.maintenance-table-scroll { min-height: 0; overflow: auto; }
.maintenance-results-body .maintenance-table th,
.maintenance-results-body .maintenance-table td { padding: 4px 6px; }
.maintenance-results-body .maintenance-table input { min-height: 29px; padding: 4px 6px; font-size: 10px; }
.maintenance-results-body .maintenance-table button { min-height: 28px; padding: 3px 7px; font-size: 9px; }
.maintenance-results-body .maintenance-table td:nth-last-child(2) { font-size: 9px; line-height: 1.25; }

/* upload as a single selected work area */
.library-upload-workbench { height: 100%; min-height: 0; display: grid; grid-template-columns: 240px minmax(420px, 1fr) 300px; grid-template-rows: minmax(0, 1fr); gap: 8px; }
.library-upload-workbench > .page-head { display: none; }
.upload-library-list,
.upload-library-form,
.upload-library-status { min-height: 0; overflow: auto; padding: 12px; }
.upload-overall { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin-bottom: 10px; padding: 10px; border-radius: 7px; background: #1f6758; color: #fff; }
.upload-overall strong { font-size: 22px; }
.upload-overall span { font-size: 10px; opacity: .82; }
.upload-library-choice { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; width: 100%; margin-bottom: 6px; padding: 9px; border-color: #d8e2dd; background: #fff; color: var(--ink); text-align: left; }
.upload-library-choice i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #eef5f2; color: #2e705b; font-size: 12px; font-style: normal; font-weight: 800; }
.upload-library-choice span { display: grid; gap: 2px; }
.upload-library-choice small { color: var(--muted); font-size: 9px; }
.upload-library-choice.active { border-color: var(--primary); background: #eaf6f0; }
.upload-form-head { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.upload-form-head > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 10px; background: #e4f2ec; color: #25634e; font-size: 20px; font-weight: 800; }
.upload-form-head h2,
.upload-form-head p { margin: 0; }
.upload-form-head p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.upload-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; margin-top: 16px; max-width: 760px; }
.upload-form-fields .full,
.upload-form-fields > button { grid-column: 1/-1; }
.upload-risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.upload-subform { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fbfaf7; }
.upload-subform h3 { margin: 0; }
.upload-library-status h2 { margin-top: 0; font-size: 15px; }
.compact-upload-status { display: grid; gap: 5px; }
.compact-upload-status > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid #e0e6e3; border-radius: 5px; font-size: 10px; }
.compact-upload-status span { display: flex; align-items: center; gap: 6px; }
.compact-upload-status i { width: 6px; height: 6px; border-radius: 50%; background: #c9883e; }
.compact-upload-status .uploaded i { background: #34a46e; }
.compact-upload-status strong { font-size: 10px; }

/* embedded component/category/rule pages */
.hub-components { display: grid; grid-template-columns: minmax(480px, 1.15fr) minmax(360px, .85fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
.hub-components > .component-summary-grid { grid-column: 1/-1; grid-row: 1; }
.hub-components > .spacer,
.hub-components > .page-head { display: none; }
.hub-components > .component-inspector { grid-column: 2; grid-row: 2; min-height: 0; overflow: auto; }
.hub-components > .panel:last-child { grid-column: 1; grid-row: 2; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.hub-components .component-summary-grid { gap: 6px; }
.hub-components .component-summary-grid > div { padding: 8px; }
.hub-components .component-definition-table { font-size: 9px; }
.hub-components .component-definition-table th,
.hub-components .component-definition-table td { padding: 4px; }
.hub-components .component-definition-table input[type="text"],
.hub-components .component-definition-table input:not([type]) { min-width: 78px; min-height: 28px; padding: 3px 5px; font-size: 9px; }
.hub-components .component-definition-table button { min-height: 27px; padding: 3px 6px; font-size: 9px; }
.hub-components .component-table-wrap { min-height: 0; max-height: none; overflow: hidden; }
.hub-components .component-table-wrap table { margin: 0; }

.hub-categories { height: 100%; display: grid; grid-template-columns: minmax(420px, 1.2fr) minmax(360px, .8fr); grid-template-rows: minmax(0, 1fr); gap: 8px; }
.hub-categories > .page-head,
.hub-categories > .spacer { display: none; }
.hub-categories > .panel { min-height: 0; overflow: auto; }
.hub-categories > .grid.two { min-height: 0; grid-template-columns: 1fr; overflow: auto; }

.hub-zodiac { min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); }
.hub-zodiac > .page-head { display: none; }
.hub-zodiac .zodiac-test-layout { height: auto; min-height: 0; }
.hub-seasonal { height: 100%; min-height: 0; }
.hub-seasonal > .page { height: 100%; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 8px; }
.hub-seasonal > .page > .page-head { display: none; }
.hub-seasonal > .page > .panel { min-height: 0; margin: 0; overflow: auto; }
.hub-seasonal > .page > .panel.form-grid { align-content: start; gap: 5px; padding: 9px 12px; }
.hub-seasonal > .page > .panel.form-grid .field { gap: 2px; }
.hub-seasonal > .page > .panel.form-grid button { padding: 8px 10px; }
.hub-seasonal .style-char-grid { height: auto; grid-template-columns: repeat(7, minmax(72px, 1fr)); grid-template-rows: repeat(4, minmax(72px, auto)); grid-auto-rows: minmax(72px, auto); align-content: start; }
.hub-seasonal .style-char-tile { min-height: 72px; padding: 5px; }
.hub-seasonal .style-char-tile strong { font-size: 20px; }
.hub-ai { height: 100%; min-height: 0; overflow: hidden; }
.ai-rules-workbench { height: 100%; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px; }
.ai-rules-nav { min-height: 0; display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; padding: 10px; }
.ai-rules-nav button { display: grid; gap: 3px; padding: 10px; color: var(--ink); text-align: left; }
.ai-rules-nav button span { color: var(--muted); font-size: 9px; }
.ai-rules-nav button.active span { color: rgba(255,255,255,.75); }
.ai-rules-section { min-width: 0; min-height: 0; display: none; overflow: auto; padding-right: 3px; }
.ai-rules-section.active { display: block; }
.ai-rules-section > .panel { margin: 0; }
.ai-rules-section > .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1450px) {
  .maintenance-control-panel { grid-template-columns: 1fr; }
  .maintenance-control-panel .maintenance-toolbar { justify-content: start; width: 100%; margin-left: 0; }
  .maintenance-workspace-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .library-upload-workbench { grid-template-columns: 210px minmax(380px, 1fr) 250px; }
}

@media (max-width: 1050px) {
  .maintenance-workspace-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .maintenance-control-panel .maintenance-tabs { overflow-x: auto; }
  .maintenance-control-panel .maintenance-toolbar { grid-template-columns: 140px minmax(160px, 1fr) 90px auto; }
  .maintenance-control-panel .maintenance-character-toolbar { grid-template-columns: 135px minmax(145px, 1fr) 80px 108px repeat(3, auto); }
  .library-upload-workbench { grid-template-columns: 190px minmax(0, 1fr); }
  .upload-library-status { display: none; }
  .hub-components { grid-template-columns: minmax(450px, 1.1fr) minmax(0, .9fr); }
}

@media (max-width: 900px) {
  .naming-gender-options { grid-template-columns: 1fr; }
  .naming-gender-auto-row,
  .legacy-gender-confirm { align-items: flex-start; flex-direction: column; }
  .gender-library-links { justify-content: flex-start; }
}
/* 字库动态分析：一眼看清字库和名字如何逐层收缩。 */
.library-dynamics-screen {
  --dynamics-ink: #1f2c37;
  --dynamics-teal: #226d62;
  --dynamics-blue: #527c94;
  --dynamics-gold: #b7893d;
  --dynamics-soft: #f4f7f5;
  height: 100%;
  overflow: auto;
  align-content: start;
  grid-auto-rows: max-content;
  color: var(--dynamics-ink);
}

.library-dynamics-head > div:first-child > span,
.library-dynamics-flow > header span {
  color: #a47732;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.library-dynamics-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.library-dynamics-controls {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.2fr) minmax(300px, 1fr);
  align-items: end;
  gap: 14px;
  border-top: 4px solid var(--dynamics-teal);
}

.library-dynamics-controls .field { margin: 0; }

.library-dynamics-source {
  min-height: 58px;
  padding: 9px 13px;
  border-radius: 10px;
  background: #edf7f3;
  border: 1px solid #c9e3da;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
}

.library-dynamics-source.backfill { background: #fff7e8; border-color: #ead5a7; }
.library-dynamics-source small { color: #738079; }
.library-dynamics-source strong { color: var(--dynamics-teal); }
.library-dynamics-source.backfill strong { color: #946526; }
.library-dynamics-source span { grid-column: 1 / -1; color: #68736e; font-size: 12px; }

.library-dynamics-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.library-dynamics-summary article {
  position: relative;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid #dce6e2;
  background: linear-gradient(145deg, #fff, #f1f7f4);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 2px 9px;
  box-shadow: 0 5px 16px rgba(33, 68, 58, .06);
}

.library-dynamics-summary article i {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #dff0ea;
  color: var(--dynamics-teal);
  font-style: normal;
  font-weight: 800;
}

.library-dynamics-summary article span { color: #67746f; font-size: 12px; }
.library-dynamics-summary article span { grid-column: 2; white-space: nowrap; }
.library-dynamics-summary article strong { grid-column: 2; align-self: end; padding-right: 20px; font-size: clamp(23px, 1.8vw, 34px); line-height: 1; white-space: nowrap; }
.library-dynamics-summary article small { position: absolute; right: 14px; bottom: 14px; color: #718079; }
.library-dynamics-summary article.final { background: linear-gradient(145deg, #fffaf0, #f7ead1); border-color: #e5cc9d; }
.library-dynamics-summary article.final i { color: #8b6024; background: #f3ddb5; }

.library-dynamics-flow {
  padding: 16px;
  overflow: hidden;
}

.library-dynamics-flow > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.library-dynamics-flow > header h2 { margin: 2px 0; }
.library-dynamics-flow > header p { margin: 0; color: #748078; }
.library-dynamics-flow > header > b { color: #65726c; background: #eef3f1; border-radius: 999px; padding: 7px 11px; white-space: nowrap; }

.library-dynamics-flow-legend { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.library-dynamics-flow-legend span,
.library-dynamics-flow-legend b { padding: 6px 9px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.library-dynamics-flow-legend .completed { color: #176b4e; background: #d6f0e3; border: 1px solid #69b493; }
.library-dynamics-flow-legend .pending { color: #69716d; background: #e8eae9; border: 1px dashed #aeb5b1; }
.library-dynamics-flow-legend b { color: #65726c; background: #eef3f1; }

.library-dynamics-flow > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 10px;
  position: relative;
}

.library-dynamics-step {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e4df;
  border-radius: 12px;
  background: #fbfdfc;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.library-dynamics-step:hover,
.library-dynamics-step.selected { border-color: var(--dynamics-teal); box-shadow: 0 6px 18px rgba(34, 109, 98, .11); transform: translateY(-1px); }
.library-dynamics-step.name-stage { background: #fffdf8; border-color: #eadfc9; }
.library-dynamics-step.name-stage:hover,
.library-dynamics-step.name-stage.selected { border-color: var(--dynamics-gold); }
.library-dynamics-step.failed { background: #fff4f2; border-color: #efbbb2; }
.library-dynamics-step.running { background: #f0f8ff; border-color: #a9ccdf; }
.library-dynamics-step.paused { background: #fff8ea; border-color: #e5c98d; }

/* 动态分析状态必须能在不读文字时一眼分辨。 */
.library-dynamics-step.completed {
  position: relative;
  background: linear-gradient(145deg, #edf9f3 0%, #f7fcf9 100%);
  border: 2px solid #69b493;
  box-shadow: inset 4px 0 0 #238160;
}

.library-dynamics-step.name-stage.completed {
  background: linear-gradient(145deg, #eef9f3 0%, #fffdf7 100%);
  border-color: #69b493;
}

.library-dynamics-step.pending,
.library-dynamics-step.locked {
  background: #f3f4f3;
  border: 1px dashed #b9c0bc;
  box-shadow: none;
  opacity: .78;
}

.library-dynamics-step.pending:hover,
.library-dynamics-step.locked:hover {
  border-color: #8f9994;
  box-shadow: 0 4px 12px rgba(74, 84, 79, .08);
}

.library-dynamics-step.completed header em,
.library-dynamics-step.running header em,
.library-dynamics-step.paused header em,
.library-dynamics-step.failed header em,
.library-dynamics-step.stale header em,
.library-dynamics-step.pending header em,
.library-dynamics-step.locked header em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  font-weight: 800;
}

.library-dynamics-step.completed header em { color: #176b4e; background: #d6f0e3; }
.library-dynamics-step.completed header em::before { content: "\2713"; }
.library-dynamics-step.pending header em,
.library-dynamics-step.locked header em { color: #707873; background: #e1e4e2; }
.library-dynamics-step.pending header em::before,
.library-dynamics-step.locked header em::before { content: "\25CB"; }
.library-dynamics-step.running header em { color: #1d648c; background: #dceef9; }
.library-dynamics-step.running header em::before { content: "\25CF"; }
.library-dynamics-step.paused header em,
.library-dynamics-step.stale header em { color: #8a5a12; background: #f8e7bd; }
.library-dynamics-step.paused header em::before { content: "\2016"; }
.library-dynamics-step.stale header em::before { content: "!"; }
.library-dynamics-step.failed header em { color: #a43d34; background: #f8deda; }
.library-dynamics-step.failed header em::before { content: "\00D7"; }

.library-dynamics-step.completed header i { color: #fff; background: #238160; }
.library-dynamics-step.pending header i,
.library-dynamics-step.locked header i { color: #737b77; background: #dfe3e1; }
.library-dynamics-step.completed .library-dynamics-step-bar { background: #cfe2d9; }
.library-dynamics-step.completed .library-dynamics-step-bar i,
.library-dynamics-step.name-stage.completed .library-dynamics-step-bar i { background: #238160; }
.library-dynamics-step.pending .library-dynamics-step-bar i,
.library-dynamics-step.locked .library-dynamics-step-bar i { background: #aab1ad; }

.library-dynamics-step header {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
}

.library-dynamics-step header i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dcefe9;
  color: var(--dynamics-teal);
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.library-dynamics-step.name-stage header i { background: #f4e4c5; color: #8c6328; }
.library-dynamics-step.name-stage.completed header i { color: #fff; background: #238160; }
.library-dynamics-step header span { min-width: 0; display: grid; }
.library-dynamics-step header small { color: #89928e; font-size: 10px; }
.library-dynamics-step header strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-dynamics-step header em { font-style: normal; color: #5b776e; font-size: 11px; white-space: nowrap; }

.library-dynamics-step-count { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 8px; }
.library-dynamics-step-count b { color: #85918b; font-size: 16px; }
.library-dynamics-step-count span { color: #9aa49f; }
.library-dynamics-step-count strong { color: var(--dynamics-ink); font-size: 24px; }
.library-dynamics-step-count small { color: #7d8983; }
.library-dynamics-step-explain {
  min-height: 58px;
  margin: 12px 0 10px;
  color: #26342f;
  font-size: 13px;
  line-height: 1.55;
}
.library-dynamics-step-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}
.library-dynamics-step-metrics span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(34, 109, 98, .12);
  color: #68756f;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-dynamics-step-metrics b {
  color: var(--dynamics-ink);
  font-size: 14px;
}
.library-dynamics-step-counts {
  margin: 0 0 9px;
  color: #53645d;
  font-size: 12px;
  line-height: 1.45;
}
.library-dynamics-step-bar { height: 6px; border-radius: 999px; overflow: hidden; background: #e8eeeb; }
.library-dynamics-step-bar i { display: block; height: 100%; border-radius: inherit; background: var(--dynamics-blue); }
.library-dynamics-step.name-stage .library-dynamics-step-bar i { background: var(--dynamics-gold); }
.library-dynamics-step footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; color: #6c7772; font-size: 11px; }

.library-dynamics-detail { border-left: 4px solid var(--dynamics-teal); }
.library-dynamics-detail.empty { min-height: 80px; display: grid; place-items: center; color: #75817b; }
.library-dynamics-detail > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.library-dynamics-detail > header span { color: #a47732; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.library-dynamics-detail > header h2 { margin: 2px 0; }
.library-dynamics-detail > header p { margin: 0; color: #68756f; }
.library-dynamics-detail > header > b { padding: 7px 11px; border-radius: 999px; background: #e7f2ee; color: var(--dynamics-teal); white-space: nowrap; }
.library-dynamics-detail-notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.library-dynamics-detail-notes span { background: #fff6e5; color: #835d27; padding: 6px 9px; border-radius: 8px; }
.library-dynamics-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; margin-top: 14px; max-height: 330px; overflow: auto; }
.library-dynamics-detail-grid > div { min-width: 0; padding: 8px 9px; border: 1px solid #dce6e2; border-radius: 9px; background: #fafcfb; display: grid; gap: 2px; }
.library-dynamics-detail-grid strong { font-size: 17px; }
.library-dynamics-detail-grid span { color: #67746e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-dynamics-detail-grid small { color: #9a7641; }
.library-dynamics-detail > footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.library-dynamics-footnote { padding: 10px 13px; border-left: 3px solid #c3944c; background: #fff8ea; color: #735b38; border-radius: 8px; }

.review-library-toggle { background: #fff; color: #226b60; border: 1px solid #4e8d83; }
.review-library-toggle.active { color: #fff; background: #226b60; border-color: #226b60; box-shadow: 0 4px 12px rgba(34, 107, 96, .18); }
.review-library-same-note,
.review-library-difference-note { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 9px 12px; border-radius: 9px; font-size: 12px; }
.review-library-same-note { color: #6f5a34; background: #fff8e9; border: 1px solid #e8d5aa; }
.review-library-difference-note { color: #226b60; background: #edf8f4; border: 1px solid #b9ddd1; }
.review-library-same-note span,
.review-library-difference-note span { color: inherit; opacity: .86; }

@media (max-width: 1500px) {
  .library-dynamics-flow > div { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  .library-dynamics-controls { grid-template-columns: 1fr 1fr; }
  .library-dynamics-source { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .library-dynamics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-dynamics-summary article.final { grid-column: 1 / -1; }
  .library-dynamics-controls,
  .library-dynamics-flow > div { grid-template-columns: 1fr; }
  .library-dynamics-actions { align-items: stretch; flex-direction: column; }
}

/* 字库动态分析一屏工作台：主页面固定，只有右侧详情名单内部滚动。 */
.library-dynamics-screen {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px 62px 38px minmax(0, 1fr);
  gap: 8px;
  align-content: stretch;
}

.library-dynamics-integrity {
  min-width: 0;
  min-height: 0;
  padding: 7px 11px;
  border: 1px solid #c8ddd6;
  border-left: 4px solid var(--dynamics-teal);
  border-radius: 8px;
  background: #f2faf7;
  color: #365f57;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.library-dynamics-integrity strong,
.library-dynamics-integrity span,
.library-dynamics-integrity small { white-space: nowrap; }
.library-dynamics-integrity strong { flex: none; font-size: 11px; }
.library-dynamics-integrity span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.library-dynamics-integrity small { flex: none; margin-left: auto; font-size: 9px; }
.library-dynamics-integrity.backfill,
.library-dynamics-integrity.pending {
  border-color: #ead7aa;
  border-left-color: var(--dynamics-gold);
  background: #fff9ec;
  color: #755b2f;
}
.library-dynamics-integrity.warning {
  border-color: #e7b7ae;
  border-left-color: #b94b3d;
  background: #fff3f0;
  color: #8a3d33;
}

.library-dynamics-toolbar {
  min-width: 0;
  min-height: 0;
  padding: 7px 10px;
  border-top: 3px solid var(--dynamics-teal);
  display: grid;
  grid-template-columns: 180px minmax(180px, .75fr) minmax(250px, 1.25fr) 155px auto;
  align-items: end;
  gap: 8px;
  overflow: hidden;
}

.library-dynamics-title { align-self: center; min-width: 0; }
.library-dynamics-title span,
.library-dynamics-inspector-head span {
  color: #a47732;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}
.library-dynamics-title h1 { margin: 1px 0 0; font-size: 19px; line-height: 1.1; }
.library-dynamics-toolbar .field { min-width: 0; margin: 0; }
.library-dynamics-toolbar .field label { margin-bottom: 2px; font-size: 9px; }
.library-dynamics-toolbar select,
.library-dynamics-toolbar button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
.library-dynamics-toolbar select { width: 100%; }

.library-dynamics-toolbar .library-dynamics-source {
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  overflow: hidden;
}
.library-dynamics-toolbar .library-dynamics-source small { font-size: 8px; white-space: nowrap; }
.library-dynamics-toolbar .library-dynamics-source strong { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.library-dynamics-actions { align-self: end; gap: 5px; white-space: nowrap; }

.library-dynamics-summary { min-height: 0; gap: 7px; }
.library-dynamics-summary article {
  min-height: 0;
  height: 62px;
  padding: 7px 10px;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 0 7px;
  border-radius: 10px;
}
.library-dynamics-summary article i { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.library-dynamics-summary article span { font-size: 9px; }
.library-dynamics-summary article strong { padding-right: 16px; font-size: clamp(19px, 1.4vw, 26px); }
.library-dynamics-summary article small { right: 9px; bottom: 8px; font-size: 9px; }

.library-dynamics-workspace {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  gap: 8px;
}

.library-dynamics-map {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 8px;
}

.library-dynamics-flow {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.library-dynamics-flow > header {
  flex: none;
  min-height: 30px;
  margin: 0 0 6px;
  align-items: center;
  gap: 8px;
}
.library-dynamics-flow > header span { font-size: 8px; }
.library-dynamics-flow > header h2 { margin: 0; font-size: 15px; line-height: 1.05; }
.library-dynamics-flow-legend { flex-wrap: nowrap; gap: 4px; }
.library-dynamics-flow-legend span,
.library-dynamics-flow-legend b { padding: 3px 6px; font-size: 8px; }
.library-dynamics-flow > div {
  flex: 1;
  min-height: 0;
  gap: 6px;
  align-items: stretch;
}
.library-dynamics-flow.character-flow > div {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.library-dynamics-flow.name-flow > div {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.library-dynamics-step {
  min-width: 0;
  min-height: 0;
  padding: 7px 8px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.library-dynamics-step:focus-visible { outline: 2px solid var(--dynamics-teal); outline-offset: 1px; }
.library-dynamics-step:hover,
.library-dynamics-step.selected { transform: none; box-shadow: 0 3px 11px rgba(34, 109, 98, .12); }
.library-dynamics-step.selected { outline: 2px solid var(--dynamics-teal); outline-offset: -2px; }
.library-dynamics-step header { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 5px; }
.library-dynamics-step header i { width: 21px; height: 21px; border-radius: 6px; font-size: 9px; }
.library-dynamics-step header small { font-size: 7px; line-height: 1; }
.library-dynamics-step header strong { font-size: 12px; line-height: 1.2; }
.library-dynamics-step header em { padding: 3px 5px !important; font-size: 8px; }
.library-dynamics-step-count { margin: 5px 0 3px; gap: 4px; line-height: 1; }
.library-dynamics-step-count b { font-size: 11px; }
.library-dynamics-step-count strong { font-size: 16px; }
.library-dynamics-step-count span,
.library-dynamics-step-count small { font-size: 8px; }
.library-dynamics-step-explain {
  min-height: 46px;
  margin: 8px 0 7px;
  font-size: 11px;
  line-height: 1.42;
}
.library-dynamics-step-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
}
.library-dynamics-step-metrics span {
  padding: 5px 6px;
  font-size: 9px;
}
.library-dynamics-step-metrics b {
  font-size: 12px;
}
.library-dynamics-step-counts {
  margin-bottom: 6px;
  font-size: 10px;
  line-height: 1.35;
}
.library-dynamics-step-bar { height: 4px; }
.library-dynamics-step footer { margin-top: 4px; gap: 4px; font-size: 8px; }
.library-dynamics-step footer small { color: #7b8a83; font-size: 7px; white-space: nowrap; }

.library-dynamics-inspector {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border-top: 3px solid var(--dynamics-gold);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
}
.library-dynamics-inspector-head {
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid #e3e8e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.library-dynamics-inspector-head h2 { margin: 0; font-size: 16px; }
.library-dynamics-inspector-head small { padding: 3px 6px; border-radius: 999px; background: #eef3f1; color: #758079; font-size: 8px; white-space: nowrap; }

.library-dynamics-inspector .library-dynamics-detail {
  min-width: 0;
  min-height: 0;
  padding: 1px;
  border: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.library-dynamics-inspector .library-dynamics-detail.empty,
.library-dynamics-inspector .library-dynamics-detail.loading {
  height: 100%;
  min-height: 0;
  place-items: center;
  align-content: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}
.library-dynamics-detail.empty p,
.library-dynamics-detail.loading p { max-width: 250px; margin: 0; font-size: 10px; }
.library-dynamics-detail-empty-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6f2ee;
  color: var(--dynamics-teal);
  font-weight: 800;
}
.library-dynamics-detail > header { flex: none; gap: 8px; }
.library-dynamics-detail > header span { font-size: 8px; }
.library-dynamics-detail > header h2 { margin: 1px 0; font-size: 15px; }
.library-dynamics-detail > header p { max-height: 34px; overflow: auto; font-size: 9px; }
.library-dynamics-detail > header > b { padding: 4px 7px; font-size: 9px; }
.library-dynamics-detail-notes { flex: none; gap: 4px; margin-top: 6px; max-height: 46px; overflow: auto; }
.library-dynamics-detail-notes span { padding: 4px 6px; font-size: 8px; }
.library-dynamics-detail-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  align-content: start;
  gap: 5px;
  margin-top: 7px;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}
.library-dynamics-detail-grid > div { padding: 6px 7px; border-radius: 7px; }
.library-dynamics-detail-grid strong { font-size: 14px; }
.library-dynamics-detail-grid span,
.library-dynamics-detail-grid small { font-size: 8px; }
.library-dynamics-detail > .notice { margin-top: 8px; font-size: 9px; }
.library-dynamics-detail > footer { flex: none; margin-top: 6px; gap: 5px; }
.library-dynamics-detail > footer span { margin-right: auto; font-size: 9px; }
.library-dynamics-detail > footer button { min-height: 27px; padding: 3px 7px; font-size: 9px; }

.library-dynamics-inspector .library-dynamics-footnote {
  min-width: 0;
  padding: 7px 8px;
  border-left-width: 3px;
  display: grid;
  gap: 2px;
}
.library-dynamics-footnote strong { font-size: 9px; }
.library-dynamics-footnote span,
.library-dynamics-footnote small { color: #78684f; font-size: 8px; line-height: 1.25; }

@media (max-width: 1500px) {
  .library-dynamics-toolbar { grid-template-columns: 150px minmax(160px, .75fr) minmax(210px, 1.1fr) 135px auto; }
  .library-dynamics-workspace { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
  .library-dynamics-flow.character-flow > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .library-dynamics-screen { overflow: auto; grid-template-rows: auto auto auto auto; }
  .library-dynamics-toolbar { grid-template-columns: 1fr 1fr; height: auto; }
  .library-dynamics-title,
  .library-dynamics-actions { grid-column: 1 / -1; }
  .library-dynamics-toolbar .library-dynamics-source { grid-column: auto; }
  .library-dynamics-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-dynamics-summary article.final { grid-column: auto; }
  .library-dynamics-workspace { grid-template-columns: 1fr; overflow: visible; }
  .library-dynamics-map { min-height: 700px; }
  .library-dynamics-inspector { min-height: 520px; }
}

/* 诗词起名：10首测试库与项目筛选共用的一屏工作台 */
.poetry-screen {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
}
.poetry-page-head { margin: 0; }
.poetry-page-head h1 { font-size: 21px; }
.poetry-page-head p { margin-top: 2px; }
.poetry-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.poetry-workspace-tabs button {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 12px;
}
.poetry-workspace-tabs button.active {
  border-color: #276f63;
  background: #276f63;
  color: #fff;
}
.poetry-top-workbench {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(310px, .68fr) minmax(520px, 1.32fr);
  gap: 8px;
}
.poetry-top-workbench > .panel,
.poetry-main-workbench > .panel {
  margin: 0;
}
.poetry-project-box,
.poetry-extraction-box {
  min-width: 0;
  padding: 9px 11px;
}
.poetry-project-box .field { margin: 0; }
.poetry-project-box select { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.poetry-project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}
.poetry-project-facts span {
  min-width: 0;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f2f7f5;
}
.poetry-project-facts small,
.poetry-project-facts strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-project-facts small { color: var(--muted); font-size: 9px; }
.poetry-project-facts strong { margin-top: 2px; color: #245f57; font-size: 12px; }
.poetry-extraction-box {
  border-top: 3px solid #bd842c;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
}
.poetry-extraction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.poetry-extraction-head > div { min-width: 0; }
.poetry-extraction-head strong,
.poetry-extraction-head span { display: block; }
.poetry-extraction-head strong { font-size: 14px; }
.poetry-extraction-head span,
.poetry-extraction-box > p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.poetry-project-library-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid #ead8b7;
  border-radius: 8px;
  background: #fffbf2;
}
.poetry-project-library-link p {
  margin: 0;
  color: #735d3e;
  font-size: 11px;
}
.poetry-project-library-link button { flex: none; }
.poetry-extraction-head button { flex: none; padding: 7px 11px; }
.poetry-formal-status {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e3f2eb;
  color: #21685c !important;
  font-size: 10px !important;
  font-weight: 700;
}
.poetry-archive-workbench {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #ead8b7;
  border-radius: 8px;
  background: #fffbf2;
}
.poetry-archive-workbench summary {
  color: #805d25;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.poetry-archive-workbench textarea {
  width: 100%;
  min-height: 130px;
  max-height: 280px;
  margin-top: 7px;
  resize: vertical;
  border-color: #decba9;
  background: #fff;
  font-size: 11px;
  line-height: 1.55;
}
.poetry-archive-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 6px;
}
.poetry-archive-actions button { padding: 6px 10px; font-size: 10px; }
.poetry-archive-preview {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(260px, 1fr);
  gap: 4px 10px;
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 7px;
  background: #edf7f2;
  color: #49615a;
  font-size: 10px;
}
.poetry-archive-preview strong { color: #215e54; }
.poetry-archive-preview em {
  grid-column: 1 / -1;
  color: #42665e;
  font-style: normal;
}
.poetry-archive-preview em.error { color: #b33f33; }
.poetry-archive-preview em.warning { color: #95651f; }
.poetry-archive-preview > button {
  justify-self: end;
  padding: 5px 9px;
  font-size: 10px;
}
.poetry-archive-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 31, 27, .5);
  backdrop-filter: blur(3px);
}
.poetry-archive-preview-dialog {
  width: min(1180px, 96vw);
  height: min(900px, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #c7d9d2;
  border-radius: 14px;
  background: #f8faf9;
  box-shadow: 0 28px 80px rgba(16, 33, 27, .28);
}
.poetry-archive-preview-dialog > header,
.poetry-archive-preview-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
}
.poetry-archive-preview-dialog > header { border-bottom: 1px solid #dbe6e1; }
.poetry-archive-preview-dialog > footer { border-top: 1px solid #dbe6e1; }
.poetry-archive-preview-dialog > header small {
  color: #9a6b23;
  font-size: 10px;
  font-weight: 800;
}
.poetry-archive-preview-dialog > header h2 {
  margin: 2px 0 0;
  color: #203a33;
  font-size: 20px;
}
.poetry-archive-preview-dialog > header p,
.poetry-archive-preview-dialog > footer p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.poetry-archive-preview-dialog > footer > div {
  display: flex;
  gap: 8px;
}
.poetry-archive-preview-body {
  overflow: auto;
  padding: 14px 18px 22px;
}
.poetry-preview-poem {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #e1d4b9;
  border-radius: 9px;
  background: #fffbf2;
  padding: 11px 13px;
}
.poetry-preview-poem strong { color: #7d5b27; }
.poetry-preview-poem p {
  margin: 0;
  color: #4d544f;
  line-height: 1.8;
  white-space: pre-wrap;
}
.poetry-preview-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.poetry-preview-counts span {
  border: 1px solid #d7e6e0;
  border-radius: 8px;
  background: #eef7f3;
  padding: 9px 11px;
  color: #53655e;
}
.poetry-preview-counts strong {
  color: #17695b;
  font-size: 17px;
}
.poetry-preview-issues {
  margin-bottom: 10px;
  border-radius: 8px;
  background: #fff7e7;
  padding: 8px 10px;
}
.poetry-preview-issues p { margin: 2px 0; color: #845f28; }
.poetry-preview-issues p.error { color: #b33f33; }
.poetry-preview-group {
  margin-top: 12px;
  border: 1px solid #d9e4df;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}
.poetry-preview-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.poetry-preview-group-head h3 { margin: 0; color: #214a40; font-size: 16px; }
.poetry-preview-group-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.poetry-preview-group-head > strong {
  flex: none;
  border-radius: 999px;
  background: #e2f1eb;
  color: #22685b;
  padding: 5px 9px;
}
.poetry-preview-material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.poetry-preview-material {
  min-width: 0;
  border: 1px solid #dfe8e4;
  border-radius: 9px;
  background: #fbfdfc;
  padding: 10px;
}
.poetry-preview-material > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.poetry-preview-material > header > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.poetry-preview-material > header strong { color: #173e35; font-size: 16px; }
.poetry-preview-material > header span,
.poetry-preview-material > header em {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-style: normal;
}
.poetry-preview-material > header span { background: #eef1ef; color: #66736e; }
.poetry-preview-material > header em { background: #e2f1eb; color: #22685b; }
.poetry-preview-material > header em.priority { background: #fff0ce; color: #8b5d18; }
.poetry-preview-relation {
  margin: 6px 0 8px;
  color: #80622f;
  font-size: 10px;
}
.poetry-preview-material dl { margin: 0; }
.poetry-preview-material dl > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 7px;
  border-top: 1px dashed #e2e8e5;
  padding: 5px 0;
}
.poetry-preview-material dt { color: #74827d; font-size: 10px; }
.poetry-preview-material dd {
  margin: 0;
  color: #3e4c47;
  font-size: 10px;
  line-height: 1.55;
}
@media (max-width: 840px) {
  .poetry-archive-preview-overlay { padding: 8px; }
  .poetry-archive-preview-dialog { width: 100%; height: 96vh; }
  .poetry-preview-material-list { grid-template-columns: 1fr; }
  .poetry-preview-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.poetry-task-idle {
  padding: 7px 9px;
  border-radius: 7px;
  background: #fbf5e8;
  color: #875f24;
  font-size: 11px;
}
.poetry-task-status {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.5fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f5f7f6;
}
.poetry-task-status span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-task-status span strong { margin-right: 6px; color: var(--ink); }
.poetry-task-status > div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7e3;
}
.poetry-task-status > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2c7b6e;
  transition: width .2s ease;
}
.poetry-task-status em { color: #64736d; font-size: 9px; font-style: normal; white-space: nowrap; }
.poetry-task-status.completed,
.poetry-task-status.partial { background: #edf8f3; }
.poetry-task-status.failed { background: #fff1ed; }
.poetry-task-status.failed > div i { background: #bd3a2d; }
.poetry-main-workbench {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(430px, 470px) minmax(0, 1fr);
  gap: 8px;
}
.poetry-filter-column,
.poetry-result-column {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
}
.poetry-filter-column {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(48px, 1fr);
  gap: 7px;
}
.poetry-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.poetry-section-head h2,
.poetry-result-head h2 { margin: 0; font-size: 15px; }
.poetry-section-head p,
.poetry-result-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.poetry-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.poetry-filter-grid label {
  min-width: 0;
  color: #46534e;
  font-size: 11px;
  font-weight: 700;
}
.poetry-filter-grid select,
.poetry-filter-grid input {
  width: 100%;
  min-height: 34px;
  margin-top: 3px;
  padding: 5px 8px;
  border: 1px solid #dcd8cf;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}
.poetry-filter-grid .span-two { grid-column: span 2; }
.poetry-check-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  padding: 8px 9px;
  border-radius: 7px;
  background: #f7f5ef;
}
.poetry-check-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #59645f;
  font-size: 11px;
}
.poetry-check-filters input { flex: none; width: auto; margin: 0; }
.poetry-filter-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.poetry-filter-summary.formal-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.poetry-filter-summary span {
  padding: 6px 7px;
  border: 1px solid #dbe7e1;
  border-radius: 7px;
  color: #6c7772;
  font-size: 10px;
  text-align: center;
}
.poetry-filter-summary strong {
  display: block;
  color: #25635b;
  font-size: 15px;
}
.poetry-relation-note {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #d3a34f;
  border-radius: 6px;
  background: #fff8e9;
  color: #6d624e;
  font-size: 11px;
  line-height: 1.55;
}
.poetry-selected-work {
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-top: 1px solid #ebe7df;
  border-radius: 7px;
  background: #fbfcfb;
}
.poetry-selected-work > div { min-width: 0; }
.poetry-selected-work strong {
  display: block;
  color: #314f49;
  font-size: 12px;
}
.poetry-selected-work p {
  margin: 3px 0 0;
  color: #69746f;
  font-size: 10px;
  line-height: 1.55;
}
.poetry-selected-work button {
  flex: none;
  padding: 4px 7px;
  font-size: 10px;
}
.poetry-selected-work.empty {
  align-items: center;
  color: #7b847f;
  font-size: 11px;
}
.poetry-section-head.work-head {
  padding-top: 5px;
  border-top: 1px solid #ebe7df;
}
.poetry-work-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 5px;
}
.poetry-work-card {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #e1ddd4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.poetry-work-card:hover,
.poetry-work-card.selected {
  border-color: #4e9588;
  background: #f1faf6;
}
.poetry-work-card > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.poetry-work-card > div span { color: #8a704f; font-size: 10px; white-space: nowrap; }
.poetry-work-card > div strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-work-card p { display: none; }
.poetry-work-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.poetry-work-card footer span { font-size: 10px; }
.poetry-work-card footer span.ready { color: #247567; }
.poetry-work-card footer span.pending { color: #ad7127; }
.poetry-work-card footer button { padding: 4px 6px; font-size: 10px; }
.poetry-result-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
}
.poetry-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.poetry-result-head > span {
  color: #71807a;
  font-size: 9px;
  white-space: nowrap;
}
.poetry-result-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.poetry-result-actions label {
  color: #53615c;
  font-size: 10px;
  font-weight: 700;
}
.poetry-result-actions select {
  display: block;
  min-width: 126px;
  min-height: 32px;
  margin-top: 2px;
  padding: 4px 8px;
  border: 1px solid #d4ddd8;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.poetry-result-actions > span {
  padding-bottom: 7px;
  color: #71807a;
  font-size: 10px;
  white-space: nowrap;
}
.poetry-result-grid {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  grid-auto-rows: min-content;
  align-content: start;
  gap: 7px;
  padding-right: 2px;
}
.poetry-name-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dedbd3;
  border-radius: 9px;
  background: #fff;
}
.poetry-name-card.favorable {
  border-color: #83bdaf;
  background: #f7fcfa;
}
.poetry-name-card.warning { box-shadow: inset 3px 0 #d47a65; }
.poetry-name-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}
.poetry-name-card > header > div { min-width: 0; }
.poetry-name-card > header strong {
  display: block;
  color: #1c453f;
  font-size: 18px;
}
.poetry-name-card > header strong[data-name-meaning] {
  cursor: help;
}
.poetry-name-card > header strong[data-name-meaning]:focus-visible {
  border-radius: 4px;
  outline: 2px solid #68a99c;
  outline-offset: 2px;
}
.poetry-name-card > header span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #76817c;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-name-card > header em {
  flex: none;
  padding: 3px 6px;
  border-radius: 999px;
  background: #edf4f1;
  color: #28695f;
  font-size: 8px;
  font-style: normal;
}
.poetry-source-line {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 6px 7px;
  border-radius: 6px;
  background: #f7f5f0;
}
.poetry-source-line b { color: #5d4a34; font-size: 9px; }
.poetry-source-line span {
  overflow: hidden;
  color: #74716b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-name-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}
.poetry-name-tags span {
  padding: 2px 5px;
  border-radius: 999px;
  background: #eef1ef;
  color: #69736e;
  font-size: 7px;
}
.poetry-name-tags span.match { background: #dff2e9; color: #1b6b5c; }
.poetry-name-tags span.same-poem { background: #f8ecd0; color: #875b1e; }
.poetry-name-tags span.warning { background: #fde9e4; color: #a73c31; }
.poetry-source-hover-hint {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #ece9e2;
  color: #416e66;
  font-size: 9px;
}
.poetry-source-hover-card {
  position: relative;
}
.poetry-source-hover-panel {
  position: fixed;
  top: 8vh;
  left: 50%;
  z-index: 110;
  display: flex;
  visibility: hidden;
  width: min(1080px, calc(100vw - 72px));
  max-height: 82vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #8cbcae;
  border-radius: 16px;
  background: #fffefb;
  box-shadow: 0 26px 80px rgba(25, 49, 43, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 0s linear 220ms;
  flex-direction: column;
}
.poetry-source-hover-card:hover .poetry-source-hover-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition-delay: 240ms;
}
.poetry-source-hover-head {
  display: flex;
  flex: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid #d7e5df;
  background: linear-gradient(135deg, #f4fbf8 0%, #fffaf0 100%);
}
.poetry-source-hover-head > div:first-child {
  min-width: 0;
}
.poetry-source-hover-head > div:first-child > span {
  color: #9c6c29;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.poetry-source-hover-head h3 {
  margin: 5px 0 4px;
  color: #173f38;
  font-size: 30px;
  line-height: 1.1;
}
.poetry-source-hover-head p {
  margin: 0;
  color: #60716b;
  font-size: 14px;
  line-height: 1.55;
}
.poetry-origin-legend {
  display: flex;
  flex: none;
  gap: 12px;
  padding-bottom: 4px;
}
.poetry-origin-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #51635d;
  font-size: 13px;
  white-space: nowrap;
}
.poetry-origin-legend i {
  width: 17px;
  height: 17px;
  border-radius: 4px;
}
.poetry-origin-legend i.surname {
  background: #cceadd;
  box-shadow: inset 0 -2px #2d826e;
}
.poetry-origin-legend i.given {
  background: #f9df9f;
  box-shadow: inset 0 -2px #bb7d1e;
}
.poetry-source-hover-body {
  min-height: 0;
  padding: 18px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.poetry-hover-source + .poetry-hover-source {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px dashed #d7e4df;
}
.poetry-hover-source-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}
.poetry-hover-source-title > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.poetry-hover-source-title span {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7f3ee;
  color: #28695d;
  font-size: 12px;
  font-weight: 700;
}
.poetry-hover-source-title h4 {
  margin: 0;
  overflow: hidden;
  color: #243f39;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-hover-source-title em {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf4f1;
  color: #28695f;
  font-size: 13px;
  font-style: normal;
}
.poetry-origin-relation {
  padding: 14px 16px;
  border: 1px solid #d7e6e0;
  border-radius: 10px;
  background: #f8fcfa;
}
.poetry-origin-relation > strong,
.poetry-highlighted-original > strong {
  display: block;
  margin-bottom: 7px;
  color: #254f47;
  font-size: 15px;
}
.poetry-origin-relation > p {
  margin: 0;
  color: #263b36;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}
.poetry-origin-relation > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 11px;
}
.poetry-origin-relation > div span {
  padding: 9px 11px;
  border-radius: 7px;
  color: #45544f;
  font-size: 14px;
  line-height: 1.55;
}
.poetry-origin-relation > div span.surname {
  background: #e4f3ed;
}
.poetry-origin-relation > div span.given {
  background: #fff3d8;
}
.poetry-highlighted-original {
  margin-top: 13px;
  padding: 16px 18px;
  border: 1px solid #eadfc8;
  border-radius: 10px;
  background: #fffcf5;
}
.poetry-highlighted-original > p {
  margin: 0;
  color: #2f3835;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.poetry-highlighted-original mark {
  display: inline-block;
  margin: 0 1px;
  padding: 0 3px;
  border-radius: 4px;
  color: #173f38;
  font-weight: 800;
}
.poetry-origin-surname-char {
  background: #cceadd;
  box-shadow: inset 0 -3px #2d826e;
}
.poetry-origin-name-char {
  background: #f9df9f;
  box-shadow: inset 0 -3px #bb7d1e;
}
.poetry-original-empty {
  color: #7c8883;
  font-family: inherit !important;
  font-size: 14px !important;
}
.poetry-hover-source > p {
  margin: 11px 2px 0;
  color: #53605c;
  font-size: 14px;
  line-height: 1.65;
}
.poetry-hover-source > p strong {
  color: #314b44;
}
.poetry-hover-source > p.poetry-source-status {
  color: #78827e;
  font-size: 13px;
}
.poetry-source-hover-panel > footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid #dce7e2;
  background: #f8faf9;
}
.poetry-source-hover-panel > footer span {
  color: #71807a;
  font-size: 13px;
}
.poetry-source-hover-panel > footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.poetry-source-hover-panel > footer button {
  padding: 8px 14px;
  font-size: 13px;
}
.poetry-source-hover-panel > footer button.is-active {
  border-color: #c2872f;
  background: #f8e8c6;
  color: #724915;
}
.poetry-source-detail + .poetry-source-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dce4df;
}
.poetry-source-detail h4 {
  margin: 5px 0 2px;
  color: #245f57;
  font-size: 10px;
}
.poetry-source-detail h4 span {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #edf3f0;
  color: #6a746f;
  font-size: 8px;
  font-weight: 500;
}
.poetry-name-card > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}
.poetry-name-card > footer button { padding: 5px 7px; font-size: 9px; }
.poetry-name-card > footer button.is-active {
  border-color: #c2872f;
  background: #f8e8c6;
  color: #724915;
}
.poetry-empty-result {
  grid-column: 1 / -1;
  align-self: center;
  padding: 36px 20px;
  border: 1px dashed #cfdad5;
  border-radius: 10px;
  color: #52615c;
  text-align: center;
}
.poetry-empty-result strong { font-size: 15px; }
.poetry-empty-result p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.poetry-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #eae7df;
}
.poetry-pagination span { color: var(--muted); font-size: 9px; }
.poetry-pagination > div { display: flex; gap: 5px; }
.poetry-pagination button { padding: 5px 9px; font-size: 9px; }

/* 诗词库管理：目录、诗词正文、姓名素材在同一屏内维护 */
.poetry-manager-screen {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.poetry-manager-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.poetry-manager-overview {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(430px, .75fr);
  gap: 8px;
}
.poetry-manager-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.poetry-manager-stats span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d9e6e0;
  border-radius: 9px;
  background: #f7fbf9;
}
.poetry-manager-stats small,
.poetry-manager-stats strong { display: block; }
.poetry-manager-stats small {
  overflow: hidden;
  color: #687670;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-manager-stats strong {
  margin-top: 2px;
  color: #215f56;
  font-size: 18px;
}
.poetry-manager-import {
  margin: 0;
  padding: 8px 10px;
  background: #fffaf0;
}
.poetry-manager-import[open] {
  position: relative;
  z-index: 3;
}
.poetry-manager-import textarea {
  min-height: 92px;
  max-height: 180px;
}
.poetry-manager-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid #d9e3de;
  border-radius: 9px;
  background: #f8faf8;
}
.poetry-manager-view-tabs button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 10px;
}
.poetry-manager-view-tabs button.active {
  border-color: #276f63;
  background: #276f63;
  color: #fff;
}
.poetry-manager-view-tabs span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
}
.poetry-manager-workbench {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(245px, .62fr) minmax(370px, .92fr) minmax(430px, 1.46fr);
  gap: 8px;
}
.poetry-manager-workbench > .panel {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: hidden;
}
.poetry-manager-list,
.poetry-manager-editor,
.poetry-manager-materials {
  display: grid;
  gap: 8px;
}
.poetry-manager-list { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.poetry-manager-editor { grid-template-rows: auto auto auto minmax(0, 1fr); }
.poetry-manager-materials { grid-template-rows: auto auto minmax(0, 1fr); }
.poetry-manager-list > header,
.poetry-manager-editor > header,
.poetry-manager-materials > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.poetry-manager-list h2,
.poetry-manager-editor h2,
.poetry-manager-materials h2 {
  margin: 0;
  font-size: 16px;
}
.poetry-manager-list header p,
.poetry-manager-editor header p,
.poetry-manager-materials header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.poetry-manager-list header > strong,
.poetry-manager-materials header > strong {
  color: #28695f;
  font-size: 15px;
  white-space: nowrap;
}
.poetry-manager-editor > header > span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.poetry-manager-editor > header > span.enabled { background: #e2f2eb; color: #20685c; }
.poetry-manager-editor > header > span.disabled { background: #f5e6e2; color: #9b4538; }
.poetry-manager-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}
.poetry-manager-search input,
.poetry-manager-material-tools input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d7ddd9;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}
.poetry-manager-status-tabs,
.poetry-manager-material-tools > div,
.poetry-manager-version-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.poetry-manager-status-tabs button,
.poetry-manager-material-tools button,
.poetry-manager-version-list button {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 10px;
}
.poetry-manager-status-tabs button.active,
.poetry-manager-material-tools button.active,
.poetry-manager-version-list button.active {
  border-color: #276f63;
  background: #276f63;
  color: #fff;
}
.poetry-manager-work-list,
.poetry-manager-material-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.poetry-manager-work-list {
  display: grid;
  align-content: start;
  gap: 5px;
}
.poetry-manager-work-item {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #dce3df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.poetry-manager-work-item:hover,
.poetry-manager-work-item.selected {
  border-color: #5c9b90;
  background: #eff8f4;
}
.poetry-manager-work-item.disabled { opacity: .64; }
.poetry-manager-work-item span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.poetry-manager-work-item b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-manager-work-item em {
  flex: none;
  color: #33766b;
  font-size: 9px;
  font-style: normal;
}
.poetry-manager-work-item small,
.poetry-manager-work-item i {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #77817d;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-manager-list > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.poetry-manager-list > footer div { display: flex; gap: 5px; }
.poetry-manager-list > footer button { padding: 4px 7px; font-size: 9px; }
.poetry-manager-work-fields {
  display: grid;
  grid-template-columns: 1.5fr .72fr .72fr;
  gap: 7px;
}
.poetry-manager-work-fields label,
.poetry-material-editor-grid label {
  color: #53615c;
  font-size: 10px;
  font-weight: 700;
}
.poetry-manager-work-fields label.wide,
.poetry-material-editor-grid label.wide { grid-column: 1 / -1; }
.poetry-manager-work-fields input,
.poetry-manager-work-fields textarea,
.poetry-material-editor-grid input,
.poetry-material-editor-grid select,
.poetry-material-editor-grid textarea {
  width: 100%;
  min-height: 34px;
  margin-top: 3px;
  padding: 6px 8px;
  border: 1px solid #d7ddd9;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}
.poetry-manager-work-fields textarea {
  min-height: 118px;
  resize: vertical;
}
.poetry-manager-work-actions {
  display: flex;
  gap: 6px;
}
.poetry-manager-work-actions button { min-height: 31px; padding: 5px 10px; font-size: 10px; }
button.danger.secondary { border-color: #d8a096; color: #a34235; }
.poetry-manager-versions {
  min-height: 0;
  overflow: auto;
  padding-top: 7px;
  border-top: 1px solid #e5e9e6;
}
.poetry-manager-versions > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.poetry-manager-versions h3 { margin: 0; font-size: 13px; }
.poetry-manager-versions span { color: var(--muted); font-size: 9px; }
.poetry-manager-version-list { margin-top: 6px; }
.poetry-manager-versions details {
  margin-top: 7px;
  border: 1px solid #e0e5e2;
  border-radius: 7px;
  background: #fafbf9;
}
.poetry-manager-versions summary {
  padding: 7px 8px;
  color: #46665f;
  cursor: pointer;
  font-size: 10px;
}
.poetry-manager-versions pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  padding: 9px;
  border-top: 1px solid #e0e5e2;
  color: #4f5a56;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.poetry-manager-versions > button { margin-top: 6px; }
.poetry-manager-material-tools {
  display: grid;
  grid-template-columns: auto minmax(125px, 1fr);
  gap: 6px;
}
.poetry-manager-material-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.poetry-manager-material-list article {
  min-width: 0;
  padding: 8px;
  border: 1px solid #dce4e0;
  border-radius: 8px;
  background: #fff;
}
.poetry-manager-material-list article.disabled { opacity: .62; background: #f3f3f1; }
.poetry-manager-material-list article > header,
.poetry-manager-material-list article > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.poetry-manager-material-list article > header div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.poetry-manager-material-list article strong { font-size: 14px; }
.poetry-manager-material-list article header span {
  padding: 2px 5px;
  border-radius: 999px;
  background: #e7f3ee;
  color: #276b60;
  font-size: 8px;
}
.poetry-manager-material-list article header em {
  color: #75817c;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}
.poetry-manager-material-list article > p {
  min-height: 30px;
  margin: 6px 0;
  overflow: hidden;
  color: #66716c;
  font-size: 9px;
  line-height: 1.45;
}
.poetry-manager-material-list article footer {
  align-items: center;
  border-top: 1px solid #edf0ee;
  padding-top: 5px;
}
.poetry-manager-material-list article footer > span {
  min-width: 0;
  overflow: hidden;
  color: #7b847f;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-manager-material-list article footer div { flex: none; display: flex; gap: 4px; }
.poetry-manager-material-list article footer button { min-height: 26px; padding: 3px 6px; font-size: 8px; }
.poetry-surname-workbench {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(0, 2.38fr);
  gap: 8px;
}
.poetry-surname-workbench > .panel {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: hidden;
}
.poetry-surname-directory,
.poetry-surname-results {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}
.poetry-surname-directory > header,
.poetry-surname-results > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.poetry-surname-directory h2,
.poetry-surname-results h2 {
  margin: 0;
  font-size: 16px;
}
.poetry-surname-directory header p,
.poetry-surname-results header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.poetry-surname-directory header > strong,
.poetry-surname-results header > strong {
  color: #28695f;
  font-size: 15px;
  white-space: nowrap;
}
.poetry-surname-directory-list,
.poetry-surname-name-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.poetry-surname-directory-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.poetry-surname-directory-list > button {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid #dce3df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.poetry-surname-directory-list > button:hover,
.poetry-surname-directory-list > button.selected {
  border-color: #4d9185;
  background: #eaf6f1;
}
.poetry-surname-directory-list > button.common {
  grid-column: 1 / -1;
  background: #fff9ec;
}
.poetry-surname-directory-list span,
.poetry-surname-directory-list b,
.poetry-surname-directory-list small {
  min-width: 0;
  display: block;
}
.poetry-surname-directory-list b { font-size: 14px; }
.poetry-surname-directory-list small {
  margin-top: 2px;
  overflow: hidden;
  color: #7b8681;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-surname-directory-list em {
  flex: none;
  color: #246b60;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.poetry-surname-name-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.poetry-surname-name-list > article {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce4e0;
  border-radius: 9px;
  background: #fff;
}
.poetry-surname-name-list > article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf1ef;
}
.poetry-surname-name-list > article > header div {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.poetry-surname-name-list > article > header strong {
  color: #173f38;
  font-size: 17px;
}
.poetry-surname-name-list > article > header span,
.poetry-surname-name-list > article > header em {
  padding: 2px 5px;
  border-radius: 999px;
  background: #e8f4ef;
  color: #286b60;
  font-size: 8px;
  font-style: normal;
}
.poetry-surname-name-list > article > header em {
  background: #fff1cf;
  color: #8b6319;
}
.poetry-surname-name-list > article > header small {
  flex: none;
  color: var(--muted);
  font-size: 9px;
}
.poetry-surname-source-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}
.poetry-surname-source-list section {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
  background: #f8faf8;
}
.poetry-surname-source-list section div { min-width: 0; }
.poetry-surname-source-list b,
.poetry-surname-source-list span,
.poetry-surname-source-list p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poetry-surname-source-list b { font-size: 11px; }
.poetry-surname-source-list span { margin-top: 2px; color: #4b776f; font-size: 8px; }
.poetry-surname-source-list p { margin: 3px 0 0; color: #727d78; font-size: 9px; }
.poetry-surname-source-list button {
  min-height: 27px;
  padding: 3px 7px;
  font-size: 8px;
}
.poetry-surname-loading {
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.poetry-manager-empty,
.poetry-manager-loading {
  align-self: center;
  margin: 0;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.poetry-material-editor-overlay {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 31, 29, .55);
}
.poetry-material-editor-dialog {
  width: min(900px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid #bcd4cb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(18, 38, 34, .22);
}
.poetry-material-editor-dialog > header,
.poetry-material-editor-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.poetry-material-editor-dialog h2 { margin: 0; font-size: 20px; }
.poetry-material-editor-dialog header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.poetry-material-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 11px;
  margin-top: 13px;
}
.poetry-material-editor-grid textarea { min-height: 74px; resize: vertical; }
.poetry-material-editor-grid label.poetry-material-priority {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f8f4ea;
}
.poetry-material-editor-grid .poetry-material-priority input { flex: none; width: auto; min-height: 0; margin: 0; }
.poetry-material-editor-dialog > footer {
  justify-content: flex-end;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid #e3e8e5;
}

@media (max-width: 1250px) {
  .poetry-top-workbench { grid-template-columns: minmax(280px, .72fr) minmax(440px, 1.28fr); }
  .poetry-main-workbench { grid-template-columns: minmax(390px, 430px) minmax(0, 1fr); }
  .poetry-result-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .poetry-manager-overview { grid-template-columns: 1fr; }
  .poetry-manager-workbench { grid-template-columns: minmax(220px, .6fr) minmax(340px, 1fr) minmax(380px, 1.25fr); }
}
@media (max-width: 900px) {
  .poetry-screen { height: auto; overflow: auto; }
  .poetry-top-workbench,
  .poetry-main-workbench { grid-template-columns: 1fr; overflow: visible; }
  .poetry-filter-column,
  .poetry-result-column { overflow: visible; }
  .poetry-work-list,
  .poetry-result-grid { max-height: none; overflow: visible; }
  .poetry-manager-screen { height: auto; overflow: auto; }
  .poetry-manager-workbench { grid-template-columns: 1fr; overflow: visible; }
  .poetry-manager-workbench > .panel { overflow: visible; }
  .poetry-surname-workbench { grid-template-columns: 1fr; overflow: visible; }
  .poetry-surname-workbench > .panel { overflow: visible; }
  .poetry-manager-work-list,
  .poetry-manager-material-list,
  .poetry-surname-directory-list,
  .poetry-surname-name-list { max-height: none; overflow: visible; }
  .poetry-manager-material-list,
  .poetry-surname-name-list { grid-template-columns: 1fr; }
  .poetry-manager-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poetry-material-editor-grid { grid-template-columns: 1fr; }
  .poetry-material-editor-grid label.wide { grid-column: auto; }
}

/* 独立 AI 名单优选：只比较当前名单，不改变原筛选结果。 */
.ai-ranking-launch {
  border-color: #c79a45;
  background: #fff8e8;
  color: #745216;
  font-weight: 700;
}
.ai-ranking-launch:hover {
  border-color: #a97821;
  background: #fff1cd;
}
.ai-ranking-sequence-launch {
  border-color: #247565;
  background: #e9f6f1;
  color: #185c4f;
  font-weight: 800;
}
.ai-ranking-sequence-launch:hover {
  border-color: #185f51;
  background: #dff1ea;
}
.ai-ranking-sequence-launch:disabled {
  border-color: #d2ddd8;
  background: #f2f5f3;
  color: #93a19c;
}
.ai-name-ranking-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(19, 31, 29, .56);
  backdrop-filter: blur(3px);
}
.ai-name-ranking-modal {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #cbd9d3;
  border-radius: 20px;
  background: #fbfaf6;
  box-shadow: 0 28px 80px rgba(18, 37, 32, .28);
}
.ai-name-ranking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #dfe7e3;
  background: linear-gradient(135deg, #f1f8f4, #fffaf0);
}
.ai-name-ranking-head h2 {
  margin: 4px 0 5px;
  color: #173f38;
  font-size: 25px;
}
.ai-name-ranking-head p {
  margin: 0;
  color: #687670;
  font-size: 14px;
}
.ai-ranking-eyebrow {
  color: #9a6c20;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.ai-name-ranking-body {
  min-height: 280px;
  overflow: auto;
  padding: 18px 22px 24px;
}
.ai-ranking-wait,
.ai-ranking-failed {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  color: #36574f;
}
.ai-ranking-wait p,
.ai-ranking-failed p { margin: 0; color: #75817d; }
.ai-ranking-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #d9e9e3;
  border-top-color: #217665;
  border-radius: 50%;
  animation: ai-ranking-spin .8s linear infinite;
}
@keyframes ai-ranking-spin { to { transform: rotate(360deg); } }
.ai-ranking-error {
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #efb7ae;
  border-radius: 9px;
  background: #fff1ef;
  color: #a13d30;
}
.ai-ranking-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 16px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #c9dfd6;
  border-radius: 12px;
  background: #f0f8f4;
}
.ai-ranking-status > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-ranking-status > div:first-child span,
.ai-ranking-status-meta,
.ai-ranking-status small { color: #64746e; font-size: 13px; }
.ai-ranking-status-meta { text-align: right; }
.ai-ranking-status.failed {
  border-color: #edbbb3;
  background: #fff3f1;
}
.ai-ranking-progress {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #dce8e3;
}
.ai-ranking-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #177866, #57a88f);
  transition: width .3s ease;
}
.ai-ranking-status small { grid-column: 1 / -1; }
.ai-ranking-result-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef5f1;
}
.ai-ranking-result-summary strong { color: #1d594c; font-size: 17px; }
.ai-ranking-result-summary span { color: #6b7873; font-size: 13px; }
.ai-ranking-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ai-ranking-result-card {
  padding: 14px;
  border: 1px solid #d8e1dd;
  border-radius: 13px;
  background: #fff;
}
.ai-ranking-result-card.winner {
  grid-column: 1 / -1;
  padding: 18px;
  border: 2px solid #d09a35;
  background: linear-gradient(135deg, #fff9e6, #fff);
  box-shadow: 0 8px 24px rgba(143, 98, 23, .10);
}
.ai-ranking-result-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.ai-ranking-result-head strong {
  color: #173f38;
  font-size: 22px;
}
.ai-ranking-gender-fit {
  padding: 3px 8px;
  border-radius: 99px;
  background: #e4f3ec;
  color: #176653;
  font-size: 12px;
  font-weight: 700;
}
.ai-ranking-gender-fit.neutral {
  background: #f4efe3;
  color: #876329;
}
.ai-ranking-result-card.winner .ai-ranking-result-head strong { font-size: 30px; }
.ai-ranking-place {
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 99px;
  background: #e6f3ee;
  color: #176653;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.ai-ranking-result-card.winner .ai-ranking-place {
  background: #b88425;
  color: #fff;
}
.ai-ranking-reason {
  min-height: 42px;
  margin: 10px 0 11px;
  color: #43544f;
  line-height: 1.65;
}
.ai-ranking-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
}
.ai-ranking-detail > div {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f5f7f5;
  color: #3f504b;
  line-height: 1.5;
}
.ai-ranking-detail span {
  display: block;
  margin-bottom: 3px;
  color: #78837f;
  font-size: 11px;
}
.ai-ranking-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ai-ranking-card-actions button { min-height: 36px; }
.ai-ranking-card-actions .status-favorite,
.ai-ranking-card-actions .status-candidate {
  border-color: #73b29f;
  background: #e4f3ed;
  color: #236855;
}
.ai-ranking-sequence-modal { width: min(980px, 96vw); }
.ai-ranking-sequence-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #c9dfd6;
  border-radius: 12px;
  background: #f0f8f4;
}
.ai-ranking-sequence-summary.failed {
  border-color: #edbbb3;
  background: #fff3f1;
}
.ai-ranking-sequence-summary > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-ranking-sequence-summary strong { color: #214f45; }
.ai-ranking-sequence-summary span { color: #6d7c76; font-size: 13px; }
.ai-ranking-sequence-summary .ai-ranking-spinner { width: 28px; height: 28px; flex: 0 0 auto; }
.ai-ranking-sequence-grid {
  display: grid;
  gap: 9px;
}
.ai-ranking-sequence-round {
  padding: 13px 14px;
  border: 1px solid #dce4e0;
  border-radius: 12px;
  background: #fff;
}
.ai-ranking-sequence-round.running {
  border-color: #79b8a5;
  background: #f4fbf8;
  box-shadow: 0 6px 18px rgba(30, 102, 85, .08);
}
.ai-ranking-sequence-round.completed { border-color: #bcdccd; }
.ai-ranking-sequence-round.failed { border-color: #edbbb3; background: #fff8f6; }
.ai-ranking-sequence-round > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}
.ai-ranking-sequence-round > header > b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7f3ee;
  color: #1e6b59;
}
.ai-ranking-sequence-round > header span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ai-ranking-sequence-round > header strong { color: #234b43; }
.ai-ranking-sequence-round > header em,
.ai-ranking-sequence-round > header > i,
.ai-ranking-sequence-round > p,
.ai-ranking-sequence-round > footer span {
  color: #70807a;
  font-size: 12px;
  font-style: normal;
}
.ai-ranking-sequence-round > header > i { font-weight: 700; }
.ai-ranking-sequence-round.completed > header > i { color: #21725f; }
.ai-ranking-sequence-round.failed > header > i,
.ai-ranking-sequence-round > p.error { color: #a13d30; }
.ai-ranking-sequence-round .ai-ranking-progress { margin-top: 10px; }
.ai-ranking-sequence-round > p { margin: 7px 0 0 45px; }
.ai-ranking-sequence-round > footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.ai-ranking-sequence-round > footer button { min-height: 30px; padding: 5px 12px; }
.ai-ranking-sequence-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 11px;
  background: #f6f3ea;
}
.ai-ranking-sequence-actions > div { display: flex; flex-direction: column; gap: 3px; }
.ai-ranking-sequence-actions span { color: #6f7773; font-size: 13px; }
@media (max-width: 760px) {
  .ai-name-ranking-backdrop { padding: 8px; }
  .ai-name-ranking-head { flex-direction: column; }
  .ai-ranking-result-grid,
  .ai-ranking-detail { grid-template-columns: 1fr; }
  .ai-ranking-result-summary { align-items: flex-start; flex-direction: column; }
  .ai-ranking-sequence-round > header { grid-template-columns: 34px minmax(0, 1fr); }
  .ai-ranking-sequence-round > header > i { grid-column: 2; }
  .ai-ranking-sequence-actions { align-items: stretch; flex-direction: column; }
}

/* 二级审阅：固定为一屏工作台，左侧只显示当前工具，右侧始终保留字库主体。 */
.review-screen {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
}

.review-workbench-header {
  position: relative;
  z-index: 4;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(160px, 220px) minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 6px 8px;
}

.review-filter-locked-banner {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5b36b;
  border-radius: 7px;
  background: #fff7e9;
  padding: 7px 9px;
}

.review-filter-locked-banner > div {
  min-width: 0;
}

.review-filter-locked-banner strong,
.review-filter-locked-banner span {
  display: block;
}

.review-filter-locked-banner strong {
  color: #7a4c18;
  font-size: 12px;
}

.review-filter-locked-banner span {
  margin-top: 2px;
  overflow: hidden;
  color: #765f46;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-filter-locked-banner button {
  min-height: 30px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.review-page-groups .char-item.filter-conflict {
  position: relative;
  border-color: #c34c43;
  background: #fff0ed;
  box-shadow: inset 0 0 0 1px rgba(195, 76, 67, 0.2);
  color: #a73731;
}

.review-page-groups .char-item.filter-conflict::after {
  content: "!";
  position: absolute;
  top: -5px;
  right: -4px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #b9433a;
  color: #fff;
  font: 700 9px/1 sans-serif;
}

.review-preview-area.is-readonly .char-item.clickable {
  cursor: default;
}

.review-preview-area.is-readonly .char-item.clickable:hover {
  transform: none;
  box-shadow: none;
}

.review-title-block {
  min-width: 154px;
}

.review-title-block h1 {
  font-size: 20px;
  line-height: 1.1;
}

.review-title-block span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.review-record-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
}

.review-record-inline > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.review-record-inline select {
  min-width: 0;
  min-height: 32px;
  padding: 4px 28px 4px 8px;
  font-size: 12px;
}

.review-status-pills {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.review-status-pills > span {
  min-width: 48px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  background: #f2f6f4;
  padding: 5px 7px;
  white-space: nowrap;
}

.review-status-pills > span.wide {
  min-width: 72px;
  background: #eaf5ef;
}

.review-status-pills small {
  color: var(--muted);
  font-size: 10px;
}

.review-status-pills strong {
  color: #245f50;
  font-size: 14px;
}

.review-header-menu {
  position: relative;
}

.review-header-menu > summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  list-style: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  padding: 5px 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.review-header-menu > summary::-webkit-details-marker {
  display: none;
}

.review-header-menu[open] > summary {
  background: var(--accent);
  color: #fff;
}

.review-header-menu > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: 300px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(31, 41, 51, 0.18);
  padding: 10px;
}

.review-header-menu > div span,
.review-header-menu > div strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.review-header-menu > div span {
  color: var(--muted);
}

.review-more-menu > div {
  width: 180px;
}

.review-more-menu > div button {
  width: 100%;
  min-height: 32px;
  text-align: left;
}

.grid.two.review-layout {
  min-height: 0;
  grid-template-columns: minmax(330px, 360px) minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.review-tools {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 7px;
  overflow: hidden;
  padding: 8px;
}

.review-tool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.review-tool-tabs button {
  min-width: 0;
  min-height: 40px;
  display: grid;
  place-items: center;
  gap: 1px;
  border-color: #cad9d3;
  background: #fff;
  padding: 4px 2px;
  color: var(--ink);
}

.review-tool-tabs button strong {
  font-size: 11px;
  white-space: nowrap;
}

.review-tool-tabs button span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.review-tool-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.review-tool-tabs button.active span {
  color: rgba(255, 255, 255, 0.78);
}

.review-tool-pane {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.review-tool-pane > .review-ai-assistant,
.review-tool-pane > .review-history-panel,
.review-tool-pane > .review-memory-panel,
.review-tool-pane > .review-delete-tools {
  min-height: 100%;
  box-sizing: border-box;
}

.review-tool-pane .review-ai-assistant {
  gap: 7px;
  align-content: start;
  grid-auto-rows: max-content;
  border-radius: 7px;
  padding: 8px;
}

.review-tool-pane .review-ai-head span {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-tool-pane .review-ai-project-summary > div {
  grid-template-columns: 74px minmax(0, 1fr);
}

.review-tool-pane .review-ai-running,
.review-tool-pane .review-ai-empty {
  min-height: 0;
  padding: 10px 8px;
}

.review-tool-pane .review-ai-empty p {
  line-height: 1.35;
}

.review-tool-pane .review-ai-char-list {
  max-height: none;
}

.review-tool-pane .review-delete-tools {
  align-content: start;
  gap: 8px;
}

.review-tool-pane .review-delete-tool {
  gap: 6px;
  padding: 8px;
}

.review-tool-pane .review-delete-tool textarea {
  min-height: 54px;
}

.review-preview-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 7px;
  overflow: hidden;
  padding: 8px;
}

.review-library-bar {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.review-library-bar > div:first-child {
  min-width: 112px;
}

.review-library-bar h2 {
  margin: 0;
  font-size: 17px;
  white-space: nowrap;
}

.review-library-bar h2 strong {
  color: var(--accent);
  font-size: 18px;
}

.review-library-bar span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.review-library-controls,
.review-library-level-switch {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.review-library-controls select,
.review-library-controls button,
.review-library-level-switch button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.review-library-controls select {
  width: 104px;
}

.pinyin-initial-filter {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  padding: 1px 0 3px;
  scrollbar-width: thin;
}

.pinyin-initial-filter > span {
  flex: 0 0 auto;
  margin: 0 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.pinyin-initial-filter button {
  min-width: 25px;
  min-height: 25px;
  flex: 0 0 auto;
  padding: 2px 5px;
  font-size: 10px;
}

.pinyin-initial-filter button:first-of-type {
  min-width: 38px;
}

.pinyin-initial-filter button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.review-library-level-switch {
  gap: 0;
}

.review-library-level-switch button {
  border-radius: 0;
  background: #fff;
  color: var(--accent);
}

.review-library-level-switch button:first-child {
  border-radius: 6px 0 0 6px;
}

.review-library-level-switch button:last-child {
  margin-left: -1px;
  border-radius: 0 6px 6px 0;
}

.review-library-level-switch button.active {
  position: relative;
  z-index: 1;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.review-preview-area {
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 5px;
}

.flat-char-page .char-cloud {
  grid-template-columns: repeat(auto-fill, minmax(31px, 1fr));
  grid-auto-rows: 31px;
  gap: 4px;
}

.review-page-groups .char-item {
  font-size: 15px;
}

.review-pagination {
  min-height: 34px;
  gap: 6px;
  padding-top: 5px;
}

.review-pagination button {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 11px;
}

.review-pagination span {
  margin-right: auto;
  font-size: 11px;
}

.review-finish {
  min-height: 44px;
  gap: 8px;
  border-radius: 8px;
  box-shadow: none;
  padding: 6px 8px;
}

.review-finish > div:first-child {
  min-width: 0;
}

.review-finish strong {
  font-size: 12px;
}

.review-finish span {
  max-width: 360px;
  margin-top: 1px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-finish-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
}

.review-finish-actions button {
  min-height: 31px;
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .review-workbench-header {
    grid-template-columns: minmax(145px, auto) minmax(145px, 190px) minmax(190px, 1fr) auto auto;
  }

  .review-title-block span {
    display: none;
  }

  .review-status-pills > span {
    min-width: 42px;
    padding-inline: 5px;
  }

  .grid.two.review-layout {
    grid-template-columns: minmax(310px, 330px) minmax(0, 1fr);
  }

  .review-library-controls button {
    padding-inline: 5px;
  }
}

/* 项目智能筛选：按“项目资料 / 四种方法 / 当前操作 / 名单查看”重新分区。 */
.project-context-slot:has(.smart-project-context-full) {
  width: 100%;
}

.project-context-dock.smart-project-context-full {
  width: min(1120px, 100%);
  max-width: 1120px;
  gap: 8px;
  border-top: 1px solid #c8d9d2;
  background: #fbfdfc;
  padding: 10px 13px;
  box-shadow: 0 7px 20px rgba(28, 62, 54, .09);
}

.smart-project-context-full .project-context-head strong {
  font-size: 14px;
}

.smart-project-context-full .project-context-facts {
  grid-template-columns: minmax(145px, 1.25fr) minmax(80px, .65fr) minmax(70px, .55fr) minmax(120px, .95fr) minmax(100px, .8fr);
}

.smart-project-context-full .project-context-facts > span,
.smart-project-context-full .project-context-requirements {
  padding: 7px 9px;
}

.smart-board-layout {
  min-height: 0;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 8px !important;
  overflow: hidden !important;
}

.smart-method-board-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.smart-method-card {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 2px 8px;
  border-width: 1px;
  border-left-width: 5px;
  border-radius: 11px;
  padding: 9px 11px;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.smart-method-card:hover:not(:disabled),
.smart-method-card.active {
  transform: none;
  box-shadow: 0 6px 16px rgba(31, 47, 42, .09);
}

.smart-method-card > span {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.smart-method-card small,
.smart-method-card em {
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.smart-method-card em {
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  padding: 2px 6px;
}

.smart-method-card > strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-method-card > p {
  grid-column: 1;
  margin: 0;
  overflow: hidden;
  color: #61706b;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-method-card > b {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: center;
  font-size: 11px;
  white-space: nowrap;
}

.smart-method-card.style {
  border-color: #9dcfc4;
  border-left-color: #4f9b8c;
  background: #eaf7f4;
}

.smart-method-card.style.active { border-color: #3f8e7f; }
.smart-method-card.style small,
.smart-method-card.style > b { color: #35796d; }

.smart-method-card.funnel {
  border-color: #afd3b5;
  border-left-color: #5b9c68;
  background: #edf7ef;
}

.smart-method-card.funnel.active { border-color: #4e915b; }
.smart-method-card.funnel small,
.smart-method-card.funnel > b { color: #417d4b; }

.smart-method-card.ranking {
  border-color: #cdbbe0;
  border-left-color: #8968ab;
  background: #f4effa;
}

.smart-method-card.ranking.active { border-color: #7c59a0; }
.smart-method-card.ranking small,
.smart-method-card.ranking > b { color: #6e4c91; }

.smart-method-card.combo {
  border-color: #edc495;
  border-left-color: #d28a3e;
  background: #fff4e8;
}

.smart-method-card.combo.active { border-color: #c97c2f; }
.smart-method-card.combo small,
.smart-method-card.combo > b { color: #a86124; }

.smart-method-workspace {
  min-width: 0;
  min-height: 176px;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  border-top-width: 4px;
  padding: 10px 12px;
  overflow: hidden;
  box-shadow: none;
}

.smart-method-workspace.style { border-top-color: #4f9b8c; background: #f6fbfa; }
.smart-method-workspace.funnel { border-top-color: #5b9c68; background: #f7fbf7; }
.smart-method-workspace.ranking { border-top-color: #8968ab; background: #faf8fc; }
.smart-method-workspace.combo { border-top-color: #d28a3e; background: #fffaf4; }

.smart-method-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.smart-method-title > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: start;
  gap: 2px 8px;
}

.smart-method-title span {
  color: #708079;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.smart-method-title h2 {
  margin: 0;
  font-size: 17px;
}

.smart-method-title p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.smart-method-title > strong {
  flex: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  padding: 4px 8px;
  color: #52645d;
  font-size: 10px;
}

.smart-style-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr) 315px;
  align-items: stretch;
  gap: 9px;
}

.smart-style-heading,
.smart-style-footer,
.smart-style-readiness {
  min-width: 0;
}

.smart-style-heading {
  display: grid;
  align-content: center;
  gap: 6px;
  border-right: 1px solid #cfe1dc;
  padding-right: 9px;
}

.smart-style-heading > span {
  display: grid;
  gap: 2px;
}

.smart-style-heading b { font-size: 12px; }
.smart-style-heading em { color: var(--muted); font-size: 10px; font-style: normal; }
.smart-style-heading > div { display: flex; gap: 5px; }
.smart-style-heading button { min-height: 27px; padding: 4px 8px; }

.smart-style-options {
  min-width: 0;
  max-height: 105px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  overflow: auto;
}

.smart-style-options button {
  min-height: 29px;
  padding: 4px 9px;
  font-size: 10px;
}

.smart-style-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-left: 1px solid #cfe1dc;
  padding-left: 9px;
}

.smart-style-readiness {
  display: grid;
  gap: 2px;
}

.smart-style-readiness strong { font-size: 11px; }
.smart-style-readiness span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.smart-style-readiness.ready strong { color: #377b64; }
.smart-style-readiness.missing strong { color: #a46a29; }
.smart-main-action { min-height: 38px; padding: 7px 11px; white-space: nowrap; }

.smart-live-funnel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 26px minmax(80px, 1fr) 26px minmax(80px, 1fr) 26px minmax(80px, 1fr) 26px minmax(80px, 1fr) 26px minmax(80px, 1fr);
  align-items: center;
  gap: 0;
}

.smart-live-node {
  min-width: 0;
  min-height: 50px;
  display: grid;
  place-content: center;
  border: 1px solid #d8dfda;
  border-radius: 9px;
  background: #f1f3f1;
  padding: 5px 8px;
  text-align: center;
}

.smart-live-node small { color: #6f7a75; font-size: 9px; }
.smart-live-node strong { margin-top: 2px; font-size: 15px; }
.smart-live-node.completed { border-color: #a8d0b0; background: #eaf6ed; color: #347543; }
.smart-live-node.running,
.smart-live-node.starting {
  border-color: #d2a45b;
  background: #fff4dc;
  color: #885f20;
  animation: smart-current-pulse 1.55s ease-in-out infinite;
}
.smart-live-node.paused { border-color: #e5a767; background: #fff1e3; color: #9b5c22; }
.smart-live-node.failed { border-color: #dc8f82; background: #fff0ed; color: #a6493d; }
.smart-live-node .live-count { animation: smart-count-flash 1.2s ease-in-out infinite; }

.smart-live-connector {
  position: relative;
  height: 12px;
  overflow: hidden;
}

.smart-live-connector::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 2px;
  right: 6px;
  border-top: 2px solid #cbd3ce;
}

.smart-live-connector::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-top: 2px solid #cbd3ce;
  border-right: 2px solid #cbd3ce;
  transform: rotate(45deg);
}

.smart-live-connector span {
  display: none;
  position: absolute;
  top: 3px;
  left: -8px;
  width: 10px;
  height: 6px;
  border-radius: 99px;
  background: #c38b32;
}

.smart-live-connector.active::before,
.smart-live-connector.active::after { border-color: #c38b32; }
.smart-live-connector.active span {
  display: block;
  animation: smart-flow-move 1.15s linear infinite;
}

@keyframes smart-flow-move {
  from { transform: translateX(0); opacity: .15; }
  30% { opacity: 1; }
  to { transform: translateX(32px); opacity: .1; }
}

@keyframes smart-current-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(195, 139, 50, .05); }
  50% { box-shadow: 0 0 0 4px rgba(195, 139, 50, .16); }
}

@keyframes smart-count-flash {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}

.smart-round-control-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.smart-round-control-strip > section {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 3px 6px;
  border-left: 3px solid #ced5d1;
  background: rgba(255, 255, 255, .74);
  padding: 6px 7px;
}

.smart-round-control-strip > section.completed { border-left-color: #5b9c68; }
.smart-round-control-strip > section.running,
.smart-round-control-strip > section.starting { border-left-color: #c38b32; }
.smart-round-control-strip > section.paused { border-left-color: #d8873d; }
.smart-round-control-strip > section.failed { border-left-color: #c85f50; }
.smart-round-control-strip header { min-width: 0; display: flex; align-items: center; gap: 5px; }
.smart-round-control-strip header i { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e8ece9; font-size: 9px; font-style: normal; font-weight: 900; }
.smart-round-control-strip header span { min-width: 0; display: grid; }
.smart-round-control-strip header b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.smart-round-control-strip header em { color: var(--muted); font-size: 8px; font-style: normal; }
.smart-round-control-strip p { grid-column: 1; margin: 0; color: #66736d; font-size: 9px; }
.smart-round-control-strip footer { grid-column: 2; grid-row: 1 / 4; align-self: center; }
.smart-round-control-strip footer button { min-height: 27px; max-width: 106px; padding: 4px 7px; font-size: 9px; }
.smart-round-control-strip footer .smart-funnel-task-done {
  background: transparent;
  color: #397947;
  padding: 0;
  font-size: 9px;
  font-weight: 800;
}
.smart-round-progress { grid-column: 1; height: 3px; overflow: hidden; border-radius: 99px; background: #e4e8e5; }
.smart-round-progress span { display: block; height: 100%; border-radius: inherit; background: #659e72; }
.smart-round-control-strip section > small { grid-column: 1 / -1; color: #a3483d; font-size: 8px; }

.smart-ranking-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.smart-ranking-options section {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d8cce4;
  border-radius: 9px;
  background: #fff;
  padding: 9px 10px;
}

.smart-ranking-options section.waiting { opacity: .58; }
.smart-ranking-options span { min-width: 0; display: grid; gap: 2px; }
.smart-ranking-options b { font-size: 11px; }
.smart-ranking-options em { color: var(--muted); font-size: 9px; font-style: normal; }
.smart-ranking-options button { min-height: 31px; padding: 5px 8px; font-size: 10px; white-space: nowrap; }

.smart-combo-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-left: 3px solid #d28a3e;
  background: rgba(255, 255, 255, .72);
  padding: 11px 13px;
}

.smart-combo-workspace b { color: #9a5c23; font-size: 13px; }
.smart-combo-workspace p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.smart-combo-workspace small { display: block; margin-top: 4px; color: #a4493e; font-size: 9px; }
.smart-combo-workspace > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.smart-combo-workspace button { min-height: 34px; padding: 6px 10px; font-size: 10px; }

.smart-results-board {
  min-height: 0;
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 7px;
  border-top: 4px solid #77868d;
  background: #fff;
  overflow: hidden;
  padding: 9px 11px;
}

.smart-results-navigation {
  min-width: 0;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e1e5e2;
  padding-bottom: 7px;
}

.smart-results-navigation > div:first-child {
  display: grid;
  gap: 1px;
}

.smart-results-navigation > div:first-child span {
  color: #66756f;
  font-size: 9px;
  font-weight: 800;
}

.smart-results-navigation > div:first-child strong { font-size: 12px; }
.smart-results-navigation nav { min-width: 0; display: flex; gap: 5px; overflow-x: auto; }
.smart-results-navigation button,
.smart-more-lists summary { min-height: 29px; padding: 4px 8px; font-size: 9px; white-space: nowrap; }
.smart-more-lists { position: relative; }
.smart-more-lists summary { display: flex; align-items: center; border: 1px solid #b6cbc4; border-radius: 6px; background: #fff; color: #2f685d; cursor: pointer; list-style: none; font-weight: 800; }
.smart-more-lists summary::-webkit-details-marker { display: none; }
.smart-more-lists[open] > div { position: absolute; top: 34px; right: 0; z-index: 20; width: min(560px, 70vw); display: flex; flex-wrap: wrap; gap: 5px; border: 1px solid #d5ddd9; border-radius: 9px; background: #fff; padding: 9px; box-shadow: 0 12px 26px rgba(30, 43, 39, .16); }

.smart-results-board .smart-funnel-results-head {
  min-height: 36px;
}

.smart-results-board .smart-funnel-results-head h2 { font-size: 15px; }
.smart-results-board .smart-funnel-results-head p { max-width: 930px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-results-board .smart-funnel-result-tools { padding: 5px 7px; }
.smart-results-board .smart-funnel-name-grid {
  min-height: 0;
  align-content: start;
  overflow: auto;
}

.smart-results-board .smart-funnel-name-card.final-name {
  min-height: 70px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
}

.smart-results-board .smart-funnel-name-card.final-name .smart-funnel-name-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid #e2e9e5;
  padding: 5px;
}

.smart-results-board .smart-funnel-name-card.final-name .smart-funnel-name-actions button {
  min-height: 25px;
  padding: 3px 7px;
  font-size: 9px;
}

@media (max-width: 1300px) {
  .smart-method-card > p { display: none; }
  .smart-method-card { min-height: 64px; }
  .smart-style-workspace { grid-template-columns: 160px minmax(0, 1fr) 275px; }
  .smart-round-control-strip footer button { max-width: 88px; }
  .smart-ranking-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .smart-board-layout { overflow: auto !important; }
  .smart-method-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-style-workspace { grid-template-columns: 1fr; }
  .smart-style-heading,
  .smart-style-footer { border: 0; padding: 0; }
  .smart-live-funnel { min-width: 760px; }
  .smart-method-workspace.funnel { overflow-x: auto; }
  .smart-round-control-strip { min-width: 760px; }
  .smart-results-navigation { grid-template-columns: 1fr auto; }
  .smart-results-navigation nav { grid-column: 1 / -1; grid-row: 2; }
  .smart-results-board { min-height: 480px; }
}

/* 项目智能筛选：一个主流程，三个用户步骤。五轮只作为过程明细。 */
.smart-simple-layout {
  min-height: 0;
  height: 100%;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 8px !important;
  overflow: hidden !important;
}

.smart-workflow-overview {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(560px, 2fr);
  align-items: center;
  gap: 18px;
  border-top: 4px solid #657f8f;
  padding: 8px 12px;
  background: #f8fbfc;
  box-shadow: none;
}

.smart-workflow-title {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 8px;
}

.smart-workflow-title > span {
  color: #778680;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.smart-workflow-title > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-workflow-title > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.smart-workflow-steps {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.smart-workflow-steps > div {
  position: relative;
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
}

.smart-workflow-steps > div:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -19px;
  color: #9aaba5;
  font-size: 15px;
  font-weight: 900;
}

.smart-workflow-steps > div.active {
  border-color: #b88732;
  background: #fff8e9;
  box-shadow: inset 0 0 0 1px rgba(184, 135, 50, .12);
}

.smart-workflow-steps > div.completed {
  border-color: #9fcfc2;
  background: #eff9f5;
}

.smart-workflow-steps i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #e8eeec;
  color: #71817b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.smart-workflow-steps .active i {
  background: #b88732;
  color: #fff;
}

.smart-workflow-steps .completed i {
  background: #2d796b;
  color: #fff;
}

.smart-workflow-steps span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.smart-workflow-steps small {
  color: #798780;
  font-size: 8px;
}

.smart-workflow-steps strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-simple-current {
  min-width: 0;
  min-height: 142px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid #cad9d4;
  border-left: 6px solid #468c7e;
  border-radius: 10px;
  background: #f5fbf8;
  padding: 9px 12px;
  overflow: hidden;
}

.smart-simple-current.setup {
  border-color: #a8cec4;
  border-left-color: #438f80;
  background: #f4fbf9;
}

.smart-simple-current.selecting {
  border-color: #b6d4bc;
  border-left-color: #579766;
  background: #f5fbf6;
}

.smart-simple-current.complete {
  border-color: #d8c28d;
  border-left-color: #b88732;
  background: #fffaf0;
}

.smart-simple-current-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.smart-simple-current-head > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: start;
  gap: 2px 8px;
}

.smart-simple-current-head span {
  color: #647770;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.smart-simple-current-head h2 {
  margin: 0;
  font-size: 16px;
}

.smart-simple-current-head p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64716d;
  font-size: 10px;
  line-height: 1.35;
}

.smart-simple-current-head > strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  padding: 5px 9px;
  color: #357567;
  font-size: 11px;
}

.smart-simple-style-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.smart-simple-style-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.smart-simple-style-actions b {
  width: 100%;
  font-size: 11px;
}

.smart-simple-style-actions span {
  color: var(--muted);
  font-size: 9px;
}

.smart-simple-style-actions button,
.smart-simple-style-options button {
  min-height: 27px;
  padding: 3px 7px;
  font-size: 9px;
}

.smart-simple-style-options {
  min-width: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.smart-simple-command {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(81, 125, 112, .18);
  padding-top: 7px;
}

.smart-simple-command > div:first-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.smart-simple-command strong {
  color: #335f55;
  font-size: 11px;
}

.smart-simple-command span {
  color: #697872;
  font-size: 9px;
}

.smart-simple-command > div:last-child,
.smart-simple-complete-actions,
.smart-simple-combo > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.smart-simple-command button,
.smart-simple-complete-actions button,
.smart-simple-combo button {
  min-height: 33px;
  padding: 5px 11px;
  white-space: nowrap;
}

.smart-simple-process {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(105px, 1fr) 26px minmax(105px, 1fr) 26px minmax(105px, 1fr) 26px minmax(105px, 1fr) 26px minmax(105px, 1fr);
  align-items: center;
}

.smart-simple-process-node {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8e1de;
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
}

.smart-simple-process-node.completed {
  border-color: #a3d0b6;
  background: #edf8f0;
}

.smart-simple-process-node.running,
.smart-simple-process-node.starting {
  border-color: #cba24e;
  background: #fff8e9;
}

.smart-simple-process-node.failed {
  border-color: #df9187;
  background: #fff2f0;
}

.smart-simple-process-node i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #e9efed;
  color: #718079;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.smart-simple-process-node.completed i {
  background: #3b8b67;
  color: #fff;
}

.smart-simple-process-node.running i,
.smart-simple-process-node.starting i {
  background: #bd8b28;
  color: #fff;
  animation: smart-simple-pulse 1.25s ease-in-out infinite;
}

.smart-simple-process-node span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.smart-simple-process-node small {
  color: #6c7b75;
  font-size: 9px;
}

.smart-simple-process-node strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-simple-process-arrow {
  position: relative;
  display: grid;
  place-items: center;
  color: #aebbb7;
  font-size: 16px;
  font-weight: 900;
}

.smart-simple-process-arrow.passed {
  color: #75a98f;
}

.smart-simple-process-arrow.moving span {
  color: #b88732;
  animation: smart-simple-arrow 1s ease-in-out infinite;
}

@keyframes smart-simple-arrow {
  0%, 100% { transform: translateX(-3px); opacity: .45; }
  50% { transform: translateX(3px); opacity: 1; }
}

@keyframes smart-simple-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 135, 50, .1); }
  50% { box-shadow: 0 0 0 5px rgba(184, 135, 50, .18); }
}

.smart-simple-details {
  border-top: 1px solid rgba(81, 125, 112, .18);
  padding-top: 6px;
}

.smart-simple-details summary,
.smart-simple-filter-details summary,
.smart-simple-result-tools summary {
  color: #3e6f63;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.smart-simple-round-details {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.smart-simple-round-details article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 6px;
  border: 1px solid #dce4e1;
  border-radius: 7px;
  background: #fff;
  padding: 6px;
}

.smart-simple-round-details article > i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: #e8eeec;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.smart-simple-round-details article.completed > i {
  background: #3b8b67;
  color: #fff;
}

.smart-simple-round-details article span {
  min-width: 0;
  display: grid;
}

.smart-simple-round-details b {
  font-size: 10px;
}

.smart-simple-round-details small,
.smart-simple-round-details em {
  color: #748079;
  font-size: 8px;
  font-style: normal;
}

.smart-simple-round-details article > em {
  grid-column: 2;
}

.smart-simple-complete-actions {
  justify-content: flex-start;
  align-self: center;
}

.smart-simple-complete-actions > strong {
  color: #755817;
  font-size: 11px;
}

.smart-simple-combo {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ead7b0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
  padding: 7px 9px;
}

.smart-simple-combo p {
  margin: 2px 0 0;
  color: #6c746f;
  font-size: 9px;
}

.smart-simple-combo small {
  display: block;
  margin-top: 2px;
  color: #a25245;
  font-size: 8px;
}

.smart-simple-results {
  min-height: 0 !important;
  margin: 0;
  display: flex !important;
  flex-direction: column;
  gap: 7px;
  border-top-color: #657f8f;
  padding: 9px 11px;
  overflow: hidden;
  box-shadow: none;
}

.smart-simple-result-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e0e6e3;
  padding-bottom: 6px;
}

.smart-simple-result-head > div:first-child {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: start;
  gap: 1px 7px;
}

.smart-simple-result-head span {
  color: #71807a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.smart-simple-result-head h2 {
  margin: 0;
  font-size: 15px;
}

.smart-simple-result-head h2 strong {
  color: var(--accent);
}

.smart-simple-result-head p {
  grid-column: 1 / -1;
  margin: 0;
  color: #6d7974;
  font-size: 9px;
}

.smart-simple-result-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.smart-simple-result-actions button,
.smart-simple-result-actions select {
  min-height: 29px;
  padding: 4px 7px;
  font-size: 9px;
  white-space: nowrap;
}

.smart-simple-filter-details {
  border: 1px solid #dde5e2;
  border-radius: 7px;
  background: #f8faf9;
  padding: 5px 7px;
}

.smart-simple-filter-details[open] summary {
  margin-bottom: 5px;
}

.smart-simple-results > .smart-funnel-name-grid {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  overflow: auto;
}

.smart-simple-results > .smart-funnel-name-grid.final-actions {
  grid-auto-rows: minmax(88px, auto);
}

.smart-simple-results .smart-funnel-name-card.final-name {
  min-height: 88px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.smart-simple-results .smart-funnel-name-card.final-name .smart-funnel-name-actions {
  position: relative;
  display: grid;
}

.smart-simple-result-tools {
  min-width: 0;
  display: flex;
  gap: 6px;
  border-top: 1px solid #e0e6e3;
  padding-top: 5px;
}

.smart-simple-result-tools details {
  position: relative;
  min-width: 0;
}

.smart-simple-result-tools summary {
  min-height: 28px;
  display: flex;
  align-items: center;
  border: 1px solid #c7d6d1;
  border-radius: 6px;
  background: #fff;
  padding: 4px 8px;
  list-style: none;
  white-space: nowrap;
}

.smart-simple-result-tools summary::-webkit-details-marker {
  display: none;
}

.smart-simple-result-tools details[open] > div {
  position: absolute;
  bottom: 34px;
  left: 0;
  z-index: 30;
  width: min(780px, 74vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #d2dcd8;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(30, 43, 39, .16);
}

.smart-simple-other-panel > section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  border: 1px solid #e0e6e3;
  border-radius: 7px;
  background: #fafcfb;
  padding: 7px;
}

.smart-simple-other-panel > section > b {
  color: #354b44;
  font-size: 10px;
}

.smart-simple-other-panel > section > p {
  width: auto;
  margin: 0;
  color: #6d7974;
  font-size: 8px;
}

.smart-simple-other-panel > section > div {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.smart-simple-result-tools details[open] button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 9px;
}

@media (max-width: 1300px) {
  .smart-workflow-overview {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .smart-simple-current-head p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .smart-simple-process-node {
    padding-inline: 5px;
  }

  .smart-simple-process-node i {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }
}

@media (max-width: 980px) {
  .smart-simple-layout {
    height: auto;
    overflow: visible !important;
  }

  .smart-workflow-overview {
    grid-template-columns: 1fr;
  }

  .smart-simple-current {
    overflow: visible;
  }

  .smart-simple-style-picker {
    grid-template-columns: 1fr;
  }

  .smart-simple-process {
    min-width: 760px;
  }

  .smart-simple-current.selecting {
    overflow-x: auto;
  }

  .smart-simple-results {
    min-height: 520px !important;
  }
}

/* Xiaohongshu comment reply workbench */
.xhs-reply-screen {
  display: grid;
  gap: 14px;
  align-content: start;
  color: #24312d;
}

.xhs-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px;
}

.xhs-reply-head > div:first-child {
  display: grid;
  gap: 2px;
}

.xhs-reply-head > div:first-child > span {
  color: #78827e;
  font-size: 10px;
  font-weight: 700;
}

.xhs-reply-head h1,
.xhs-section-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.xhs-reply-head h1 {
  font-size: 22px;
}

.xhs-resource-status {
  display: grid;
  grid-template-columns: 9px auto;
  gap: 0 8px;
  align-items: center;
  min-width: 220px;
  border: 1px solid #d7dfdc;
  border-radius: 7px;
  background: #fff;
  padding: 8px 11px;
}

.xhs-resource-status i {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c58a28;
}

.xhs-resource-status.ready i {
  background: #24815f;
}

.xhs-resource-status strong {
  font-size: 12px;
}

.xhs-resource-status span {
  color: #74807b;
  font-size: 10px;
}

.xhs-reply-layout {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.35fr);
  gap: 14px;
  align-items: stretch;
}

.xhs-composer,
.xhs-result-pane,
.xhs-history,
.xhs-admin-corrections {
  min-width: 0;
  border: 1px solid #d8e0dd;
  border-radius: 8px;
  background: #fff;
}

.xhs-composer {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.xhs-composer label,
.xhs-admin-correction-body label {
  display: grid;
  gap: 6px;
  color: #4d5b56;
  font-size: 11px;
  font-weight: 700;
}

.xhs-composer textarea,
.xhs-final-reply,
.xhs-admin-correction-body textarea,
.xhs-admin-correction-body input,
.xhs-correction-fields input,
.xhs-correction-fields select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cdd7d3;
  border-radius: 6px;
  background: #fbfcfc;
  color: #26332f;
  font: inherit;
  letter-spacing: 0;
}

.xhs-composer textarea {
  min-height: 190px;
  padding: 10px;
  resize: vertical;
  line-height: 1.65;
}

.xhs-context-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.xhs-context-fields textarea {
  min-height: 94px;
}

.xhs-context-toggle {
  justify-self: start;
  min-height: 30px;
}

.xhs-generate {
  min-height: 38px;
  width: 100%;
  background: #286b57;
}

.xhs-result-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 410px;
  padding: 14px;
}

.xhs-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.xhs-section-head h2 {
  font-size: 14px;
}

.xhs-section-head span {
  color: #7b8682;
  font-size: 10px;
}

.xhs-result-empty {
  display: grid;
  place-items: center;
  min-height: 310px;
  border: 1px dashed #d6dfdc;
  color: #89938f;
}

.xhs-run-progress {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 310px;
}

.xhs-run-progress-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.xhs-run-progress-head b {
  color: #537067;
}

.xhs-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8eeec;
}

.xhs-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2d8064;
  transition: width .25s ease;
}

.xhs-result-block {
  display: grid;
  align-content: start;
  gap: 10px;
}

.xhs-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xhs-result-head small {
  color: #77827e;
}

.xhs-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #ccd6d2;
  border-radius: 5px;
  padding: 0 7px;
  color: #52615c;
  font-size: 10px;
  font-weight: 700;
}

.xhs-status.ready {
  border-color: #a9cbbb;
  background: #edf7f2;
  color: #236d52;
}

.xhs-status.review {
  border-color: #e5c999;
  background: #fff8ea;
  color: #8b6220;
}

.xhs-status.failed {
  border-color: #dfb8b1;
  background: #fff2f0;
  color: #98483d;
}

.xhs-final-reply {
  min-height: 230px;
  padding: 13px;
  resize: vertical;
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
}

.xhs-result-actions {
  display: flex;
  gap: 8px;
}

.xhs-result-actions button {
  min-width: 110px;
}

.xhs-run-error {
  margin: 0;
  border-left: 3px solid #c56858;
  background: #fff5f3;
  padding: 8px 10px;
  color: #8d4138;
  font-size: 11px;
}

.xhs-correction,
.xhs-evidence,
.xhs-admin-corrections details {
  border-top: 1px solid #e2e8e5;
  padding-top: 8px;
}

.xhs-correction summary,
.xhs-evidence summary,
.xhs-admin-corrections summary {
  cursor: pointer;
  color: #57645f;
  font-size: 11px;
  list-style: none;
}

.xhs-correction summary::-webkit-details-marker,
.xhs-evidence summary::-webkit-details-marker,
.xhs-admin-corrections summary::-webkit-details-marker {
  display: none;
}

.xhs-correction-fields {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) auto;
  gap: 7px;
  padding-top: 8px;
}

.xhs-correction-fields input,
.xhs-correction-fields select,
.xhs-admin-correction-body input,
.xhs-admin-correction-body textarea {
  min-height: 34px;
  padding: 7px 9px;
}

.xhs-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 9px;
}

.xhs-evidence-grid section {
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8e5;
  background: #fafcfc;
  padding: 8px;
}

.xhs-evidence-grid span,
.xhs-evidence-meta {
  color: #84908b;
  font-size: 9px;
}

.xhs-evidence-grid strong {
  font-size: 11px;
  line-height: 1.5;
}

.xhs-evidence-reasons {
  padding: 5px 2px;
}

.xhs-evidence-reasons p {
  margin: 5px 0;
  color: #55635e;
  font-size: 11px;
}

.xhs-evidence-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.xhs-reply-lower {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.xhs-history,
.xhs-admin-corrections {
  padding: 12px;
}

.xhs-history-list {
  display: grid;
  gap: 5px;
  max-height: 310px;
  overflow: auto;
}

.xhs-history-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 43px;
  border: 1px solid #e0e7e4;
  background: #fff;
  color: #35423e;
  text-align: left;
}

.xhs-history-list button.active {
  border-color: #80aa9a;
  background: #f1f8f5;
}

.xhs-history-list strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-history-list span {
  color: #84908b;
  font-size: 9px;
  white-space: nowrap;
}

.xhs-admin-corrections {
  display: grid;
  gap: 8px;
}

.xhs-admin-corrections details {
  padding: 8px 2px 0;
}

.xhs-admin-corrections summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.xhs-admin-correction-body {
  display: grid;
  gap: 8px;
  padding: 9px 0 3px;
}

.xhs-admin-correction-body p {
  margin: 0;
  border-left: 3px solid #87a99b;
  padding: 7px 9px;
  background: #f7faf9;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .app-shell:has(.xhs-reply-screen) {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell:has(.xhs-reply-screen) .sidebar {
    display: block;
    height: auto;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .app-shell:has(.xhs-reply-screen) .brand,
  .app-shell:has(.xhs-reply-screen) .user-line {
    display: none;
  }

  .app-shell:has(.xhs-reply-screen) .nav {
    display: flex;
    gap: 6px;
    width: max-content;
  }

  .app-shell:has(.xhs-reply-screen) .nav button {
    width: auto;
    min-height: 31px;
    padding: 5px 9px;
    white-space: nowrap;
  }

  .app-shell:has(.xhs-reply-screen) .main.screen-main {
    height: auto;
    padding: 10px;
    overflow: auto;
  }

  .app-shell:has(.xhs-reply-screen) .xhs-reply-screen {
    height: auto;
    overflow: visible;
  }

  .xhs-reply-head,
  .xhs-result-head {
    align-items: flex-start;
  }

  .xhs-reply-head,
  .xhs-reply-layout,
  .xhs-reply-lower {
    grid-template-columns: 1fr;
  }

  .xhs-reply-head {
    display: grid;
  }

  .xhs-resource-status {
    min-width: 0;
  }

  .xhs-context-fields,
  .xhs-evidence-grid,
  .xhs-correction-fields {
    grid-template-columns: 1fr;
  }

  .xhs-composer textarea {
    min-height: 150px;
  }

  .xhs-final-reply {
    min-height: 260px;
  }

  .xhs-history-list button {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 项目资料：两类截图智能导入，旧字段仅作为兼容修正入口。 */
.project-profile-form { grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); }
.project-profile-form .profile-intake-edit { grid-column: 1 / -1; border: 1px solid #bcd9cf; border-radius: 13px; background: #f7fbf9; padding: 16px; }
.profile-intake-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.profile-intake-head h3 { margin: 2px 0 4px; }.profile-intake-head p { margin: 0; color: #687873; font-size: 13px; }
.intake-status { border-radius: 999px; background: #e4f2ec; color: #246656; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.intake-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.intake-upload-card { position: relative; display: grid; gap: 4px; min-height: 112px; border: 1px dashed #75a99b; border-radius: 12px; background: #fff; padding: 16px; cursor: pointer; }
.intake-upload-card.chat { border-color: #c69a59; }.intake-upload-card:hover { box-shadow: 0 7px 18px rgba(31, 78, 67, .08); transform: translateY(-1px); }
.intake-upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.intake-upload-card > span { color: #9b6d25; font-size: 11px; font-weight: 800; }.intake-upload-card > strong { color: #234f46; font-size: 17px; }
.intake-upload-card small { color: #6d7773; font-size: 12px; }.intake-upload-card em { justify-self: start; margin-top: 4px; border-radius: 999px; background: #edf5f1; color: #3e6c61; padding: 3px 8px; font-size: 11px; font-style: normal; }
.intake-upload-card.busy { opacity: .65; cursor: wait; }
.intake-empty { margin-top: 12px; border: 1px dashed #cbd9d3; border-radius: 10px; background: #fff; color: #72807a; padding: 16px; text-align: center; font-size: 13px; }
.intake-review { margin-top: 13px; border: 1px solid #cbded7; border-radius: 12px; background: #fff; padding: 14px; }.intake-review.pending { border-color: #d4b77b; box-shadow: inset 4px 0 #c38b31; }
.intake-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.intake-review-head > div { display: grid; gap: 3px; }.intake-review-head strong { color: #294f47; font-size: 15px; }.intake-review-head span { color: #75817d; font-size: 11px; }
.intake-confirmed-badge { border-radius: 999px; background: #dff1e9; color: #28705f !important; padding: 5px 9px; font-weight: 800; }
.intake-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.intake-review-grid label { display: grid; gap: 4px; }.intake-review-grid label > span { color: #52635e; font-size: 12px; font-weight: 750; }.intake-review-grid .full { grid-column: 1 / -1; }
.project-profile-form .intake-review-grid input, .project-profile-form .intake-review-grid select, .project-profile-form .intake-review-grid textarea { min-height: 38px; padding: 7px 9px; font-size: 13px; }.project-profile-form .intake-review-grid textarea { min-height: 56px; }
.intake-review-grid .intake-check { display: flex; flex-direction: row; align-items: center; align-self: end; min-height: 38px; border: 1px solid #cbded7; border-radius: 8px; background: #f4f9f7; padding: 7px 10px; }.project-profile-form .intake-review-grid .intake-check input { min-height: auto; width: 17px; height: 17px; }
.customer-claim { border-radius: 8px; background: #fff8ea; padding: 9px; }.intake-uncertain { display: flex; gap: 10px; border-radius: 8px; background: #fff1ec; color: #864839; padding: 9px 11px; font-size: 12px; }.intake-evidence { margin-top: 10px; border-top: 1px solid #edf0ee; padding-top: 9px; }.intake-evidence summary { color: #3b685e; cursor: pointer; font-size: 12px; font-weight: 700; }.intake-evidence p { display: grid; grid-template-columns: 120px 1fr; gap: 8px; margin: 7px 0 0; font-size: 12px; }.intake-evidence p span { color: #687570; }
.project-profile-form .profile-basic-edit.compact { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #e2e7e4; padding-left: 0; padding-top: 14px; }.profile-basic-edit.compact .profile-authority-readonly { margin-top: 4px; }
.profile-manual-correction, .project-profile-form details.profile-notes-edit { grid-column: 1 / -1; border: 1px solid #dfe5e1; border-radius: 10px; background: #fafbf9; padding: 11px 13px; }.profile-manual-correction > summary, .project-profile-form details.profile-notes-edit > summary, .bazi-manual-correction > summary { color: #42655c; cursor: pointer; font-size: 13px; font-weight: 750; }.profile-manual-correction .profile-requirements-edit { margin-top: 13px; border: 0 !important; padding: 0 !important; }
.project-profile-form .profile-bazi-edit { grid-column: 1 / -1; }.bazi-manual-correction { margin-top: 11px; border: 1px solid #dde5e1; border-radius: 9px; background: #fafbf9; padding: 10px 12px; }.bazi-confirm-row { display: flex; justify-content: flex-end; margin: 10px 0; }.bazi-confirm-row button { min-height: 42px; }
.project-profile-form details.profile-notes-edit[open] > .form-grid { margin-top: 12px; }

@media (max-width: 900px) {
  .project-profile-form { grid-template-columns: 1fr; }.project-profile-form .profile-intake-edit, .project-profile-form .profile-basic-edit.compact, .profile-manual-correction, .project-profile-form details.profile-notes-edit { grid-column: 1; }
  .intake-upload-grid, .intake-review-grid { grid-template-columns: 1fr; }.intake-review-grid .full { grid-column: 1; }.profile-intake-head { flex-direction: column; }.intake-evidence p { grid-template-columns: 1fr; }
}

/* 排除字库 AI 纠错：AI只给候选，人工确认后才移出当前排除分类。 */
.exclusion-ai-correction { display: grid; gap: 12px; min-width: 0; }
.exclusion-ai-correction-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.exclusion-ai-correction-head button { flex: 0 0 auto; min-width: 104px; white-space: nowrap; }
.exclusion-ai-correction-head h2, .exclusion-ai-correction-head p { margin: 0; }
.exclusion-ai-correction-head p { margin-top: 4px; color: #697772; font-size: 11px; line-height: 1.5; }
.exclusion-ai-progress { display: grid; gap: 9px; padding: 11px; border: 1px solid #b8d8cc; border-radius: 10px; background: #f4fbf8; }
.exclusion-ai-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.exclusion-ai-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dfeae5; }
.exclusion-ai-progress-track i { display: block; height: 100%; border-radius: inherit; background: #277764; transition: width .25s ease; }
.exclusion-ai-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.exclusion-ai-summary span, .exclusion-ai-summary button { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px; border: 1px solid #d9e1dd; border-radius: 8px; background: #fff; color: inherit; font-size: 11px; text-align: left; }
.exclusion-ai-summary button { cursor: pointer; }.exclusion-ai-summary button small { color: #5e7d73; font-size: 9px; }.exclusion-ai-summary button:disabled { cursor: default; opacity: .55; }
.exclusion-ai-summary .restore { color: #17644f; border-color: #9fd3be; }.exclusion-ai-summary .review { color: #8a5c12; border-color: #e5ca8f; }
.exclusion-ai-candidate-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.exclusion-ai-list { display: grid; gap: 7px; max-height: calc(100vh - 500px); min-height: 120px; overflow: auto; padding-right: 3px; }
.exclusion-ai-item { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid #d7dedb; border-radius: 9px; background: #fff; cursor: pointer; }
.exclusion-ai-item.restore { border-color: #9dceb9; background: #f0faf5; }.exclusion-ai-item.review { border-color: #e1c88f; background: #fffaf0; }.exclusion-ai-item.done { opacity: .58; cursor: default; }
.exclusion-ai-item > strong { font-size: 23px; text-align: center; }.exclusion-ai-item > span { display: grid; gap: 2px; line-height: 1.4; font-size: 11px; }.exclusion-ai-item > span b { font-size: 11px; }.exclusion-ai-item > span small { color: #9a5b18; }.exclusion-ai-item > em { color: #69756f; font-size: 10px; font-style: normal; }

/* AI建议恢复改为主区域复核：名单在一屏工作台内独立滚动，工具栏始终可见。 */
.exclusion-ai-review-workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}
.maintenance-screen-workbench:has(.exclusion-ai-review-workspace) {
  grid-template-rows: minmax(0, 1fr);
}
.maintenance-screen-workbench:has(.exclusion-ai-review-workspace) > .maintenance-page-head,
.maintenance-screen-workbench:has(.exclusion-ai-review-workspace) > .maintenance-control-panel {
  display: none;
}
.exclusion-ai-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.exclusion-ai-review-head > div { display: grid; gap: 3px; }.exclusion-ai-review-head span { color: #a26f22; font-size: 10px; font-weight: 800; letter-spacing: .12em; }.exclusion-ai-review-head h2, .exclusion-ai-review-head p { margin: 0; }.exclusion-ai-review-head h2 { color: #214f45; font-size: 22px; }.exclusion-ai-review-head p { color: #697772; font-size: 12px; }
.exclusion-ai-review-toolbar { z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #b8d8cc; border-radius: 10px; background: #f4fbf8; padding: 9px 11px; }
.exclusion-ai-review-toolbar > div { display: flex; flex-wrap: wrap; gap: 7px; }.exclusion-ai-review-toolbar strong { color: #335f55; }
.exclusion-ai-review-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0 7px 12px 0;
}
.exclusion-ai-review-grid::-webkit-scrollbar { width: 10px; }
.exclusion-ai-review-grid::-webkit-scrollbar-track { border-radius: 999px; background: #e7efeb; }
.exclusion-ai-review-grid::-webkit-scrollbar-thumb { border: 2px solid #e7efeb; border-radius: 999px; background: #6a9b8c; }
.exclusion-ai-review-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 2px 10px; min-height: 82px; border: 1px solid #b8d8cc; border-radius: 10px; background: #f6fbf9; color: #293633; padding: 10px; text-align: left; cursor: pointer; transition: border-color .12s ease, background .12s ease, box-shadow .12s ease; }
.exclusion-ai-review-card:hover { border-color: #4b927f; }.exclusion-ai-review-card.selected { border: 2px solid #1f715f; background: #dff2ea; box-shadow: 0 0 0 2px rgba(39,119,100,.12); padding: 9px; }
.exclusion-ai-review-card > strong { grid-row: 1 / 3; align-self: center; color: #214f45; font-size: 30px; text-align: center; }.exclusion-ai-review-card > span { align-self: end; overflow: hidden; line-height: 1.35; font-size: 12px; }.exclusion-ai-review-card > em { align-self: start; color: #74817c; font-size: 10px; font-style: normal; }
@media (max-width: 900px) { .exclusion-ai-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.exclusion-ai-review-head, .exclusion-ai-review-toolbar { align-items: stretch; flex-direction: column; } }

/* 名字组合：古风精品 */
.classical-name-screen { grid-template-rows: none; grid-auto-rows: max-content; align-content: start; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-bottom: 32px; background: linear-gradient(180deg, #f8f6ef 0, #fbfaf7 260px, #f4f7f5 100%); }
.classical-name-screen > * { min-height: 0; }
.classical-name-toolbar { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1fr) minmax(420px, 1.6fr) auto; align-items: end; gap: 12px; margin-top: 10px; padding: 14px; border-color: #d9caa8; background: rgba(255,255,255,.92); }
.classical-name-source-stats { display: grid; grid-template-columns: repeat(4, minmax(78px, 1fr)); gap: 7px; }
.classical-name-source-stats span { display: grid; gap: 3px; border: 1px solid #e2dbc9; border-radius: 9px; background: #faf8f1; padding: 8px 10px; }
.classical-name-source-stats small { color: #7e776a; font-size: 11px; }.classical-name-source-stats b { color: #315f55; font-size: 16px; }
.classical-name-start { min-height: 43px; white-space: nowrap; background: #8a6221; }.classical-name-start:hover { background: #714c14; }
.classical-provider-tabs { display: grid; grid-template-columns: repeat(2, minmax(190px, 260px)) minmax(180px, 1fr); align-items: stretch; gap: 10px; margin: 10px 0; }
.classical-provider-tabs > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #b8d4ca; background: #f7fbf9; color: #315e54; padding: 10px 13px; text-align: left; }
.classical-provider-tabs > button.active { border-color: #2c7464; background: #2c7464; color: #fff; box-shadow: 0 5px 14px rgba(44,116,100,.16); }
.classical-provider-tabs > button span { font-size: 12px; opacity: .85; }
.classical-joint-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; border: 1px solid #dfd1b4; border-radius: 9px; background: #fff9ec; color: #77551e; padding: 9px 13px; }.classical-joint-summary > div { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }.classical-joint-summary small { color: #8d806b; }.classical-inline-messages { display: flex; min-width: 0; align-items: center; gap: 10px; overflow: hidden; white-space: nowrap; }.classical-inline-error { flex: 0 0 auto; color: #8a5b21; font-size: 12px; }.classical-inline-disclaimer { overflow: hidden; color: #8a7858; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.classical-name-progress { display: grid; grid-template-columns: auto 1fr minmax(220px, .5fr); align-items: center; gap: 12px; margin: 10px 0; border: 1px solid #b9d8ce; border-radius: 10px; background: #edf8f4; padding: 11px 14px; color: #315e54; }
.classical-name-progress progress { width: 100%; accent-color: #2d7464; }
.classical-name-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.classical-name-card { overflow: hidden; border: 1px solid #dacfb8; border-radius: 14px; background: #fffdf8; box-shadow: 0 7px 20px rgba(87,67,33,.07); }
.classical-name-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8dfcc; background: linear-gradient(100deg, #f8f0df, #f2f8f4); padding: 13px 15px; }
.classical-name-card > header > div:first-child { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }.classical-name-card header span { color: #93681f; font-size: 12px; }.classical-name-card h3 { margin: 0; color: #244d45; font-family: "Songti SC", "STSong", serif; font-size: 24px; letter-spacing: 2px; }.classical-name-card header em { border-radius: 999px; background: #dff0e9; color: #357261; padding: 3px 8px; font-size: 11px; font-style: normal; }
.classical-name-card header em.joint-selected { background: #f3dfae; color: #805612; }
.classical-name-actions { display: flex; gap: 7px; }.classical-name-actions button { min-width: 68px; }
.classical-name-card section { padding: 12px 15px 2px; }.classical-name-card section > strong { display: block; margin-bottom: 8px; color: #815d22; font-size: 13px; }
.classical-poem { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 18px; }.classical-poem > strong { grid-column: 1 / -1; }.classical-poem p { margin: 0; color: #354a45; font-family: "Songti SC", "STSong", serif; font-size: 16px; line-height: 1.8; letter-spacing: 1px; }
.classical-meanings p { display: grid; grid-template-columns: 30px 1fr; gap: 8px; margin: 7px 0; color: #4c544f; line-height: 1.55; }.classical-meanings p b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #e7f1ed; color: #245a4e; font-family: "Songti SC", "STSong", serif; font-size: 17px; }.classical-meanings p span { align-self: center; }
.classical-deep-meaning p { margin: 0; color: #424b47; line-height: 1.75; }.classical-name-card footer { margin-top: 11px; border-top: 1px dashed #ded3bd; background: #faf6ed; color: #8a7858; padding: 9px 15px; font-size: 11px; }
.classical-name-card.pending { min-height: 130px; }.classical-name-card.pending > p { margin: 18px 15px; color: #887b68; }.classical-name-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 300px; border: 1px dashed #cfc3a9; border-radius: 14px; background: rgba(255,255,255,.72); color: #6f6a60; text-align: center; padding: 36px; }.classical-name-empty strong { color: #3e6259; font-size: 20px; }.classical-name-empty p { max-width: 620px; line-height: 1.7; }
@media (max-width: 1300px) { .classical-name-toolbar { grid-template-columns: 1fr 1fr; }.classical-name-source-stats { grid-column: 1 / -1; }.classical-name-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .classical-name-toolbar { grid-template-columns: 1fr; }.classical-name-source-stats { grid-column: auto; grid-template-columns: repeat(2, 1fr); }.classical-provider-tabs { grid-template-columns: 1fr; }.classical-joint-summary { justify-content: space-between; }.classical-name-progress { grid-template-columns: 1fr; }.classical-poem { grid-template-columns: 1fr; }.classical-poem > strong { grid-column: auto; } }

/* 古风精品：快速总览与右侧详情 */
.classical-browse-toolbar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 12px; margin: 10px 0; border: 1px solid #d8d2c4; border-radius: 10px; background: rgba(255,255,255,.96); box-shadow: 0 5px 16px rgba(53,68,62,.07); padding: 9px 11px; backdrop-filter: blur(8px); }
.classical-browse-toolbar > span { margin-left: auto; color: #756f63; font-size: 12px; white-space: nowrap; }
.classical-view-switch, .classical-filter-switch { display: flex; align-items: center; gap: 6px; }
.classical-browse-toolbar button { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.classical-browse-toolbar button.active { border-color: #2c7464; background: #2c7464; color: #fff; }
.classical-name-list.compact-view { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.classical-compact-card { display: grid; grid-template-rows: auto auto minmax(34px, auto) auto; gap: 8px; min-width: 0; min-height: 158px; border: 1px solid #d8d0be; border-radius: 11px; background: #fffdf8; box-shadow: 0 4px 13px rgba(72,62,41,.06); padding: 11px 12px; cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.classical-compact-card:hover, .classical-compact-card:focus-visible { border-color: #4a8d7d; box-shadow: 0 7px 18px rgba(44,116,100,.13); outline: none; transform: translateY(-1px); }
.classical-compact-card.candidate { border-color: #71ad9e; background: #f2faf7; }.classical-compact-card.favorite { border-color: #d4ae60; background: #fffaf0; }
.classical-compact-card > header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.classical-compact-card > header span, .classical-compact-card.pending > span { color: #93681f; font-size: 11px; }
.classical-compact-card > header em { border-radius: 999px; background: #f3dfae; color: #805612; padding: 2px 6px; font-size: 9px; font-style: normal; white-space: nowrap; }
.classical-compact-card > strong { color: #244d45; font-family: "Songti SC", "STSong", serif; font-size: 25px; letter-spacing: 2px; }
.classical-compact-card > small { display: -webkit-box; overflow: hidden; color: #686d68; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.classical-compact-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 6px; border-top: 1px dashed #e1dacb; padding-top: 8px; }
.classical-compact-card > footer button { min-height: 29px; padding: 4px 8px; font-size: 11px; }
.classical-compact-card.pending { cursor: default; }.classical-compact-card.pending:hover { border-color: #d8d0be; box-shadow: 0 4px 13px rgba(72,62,41,.06); transform: none; }
.classical-detail-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(25,33,30,.34); backdrop-filter: blur(2px); }
.classical-detail-drawer { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; width: min(650px, calc(100vw - 220px)); height: 100%; border-left: 1px solid #d9cfb9; background: #fffdf8; box-shadow: -16px 0 40px rgba(31,44,40,.2); padding: 20px 22px 28px; }
.classical-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e5dcc9; padding-bottom: 13px; }
.classical-detail-head > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }.classical-detail-head span { color: #93681f; font-size: 12px; }.classical-detail-head h2 { margin: 0; color: #244d45; font-family: "Songti SC", "STSong", serif; font-size: 32px; letter-spacing: 3px; }.classical-detail-head em { border-radius: 999px; background: #f3dfae; color: #805612; padding: 3px 8px; font-size: 11px; font-style: normal; }
.classical-detail-actions { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 7px; }.classical-detail-actions > span { color: #777064; font-size: 12px; text-align: center; }
.classical-detail-drawer section { border: 1px solid #e2d9c6; border-radius: 10px; background: #fff; padding: 14px 15px; }.classical-detail-drawer section > strong { display: block; margin-bottom: 10px; color: #815d22; font-size: 14px; }
.classical-detail-drawer > footer { border-top: 1px dashed #ded3bd; background: #faf6ed; color: #8a7858; padding: 10px 12px; font-size: 11px; }
@media (max-width: 1700px) { .classical-name-list.compact-view { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1450px) { .classical-name-list.compact-view { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .classical-name-list.compact-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }.classical-browse-toolbar { align-items: flex-start; flex-direction: column; }.classical-browse-toolbar > span { margin-left: 0; }.classical-detail-drawer { width: min(650px, 92vw); } }
@media (max-width: 680px) { .classical-name-list.compact-view { grid-template-columns: 1fr; }.classical-filter-switch { flex-wrap: wrap; }.classical-detail-drawer { width: 100vw; padding: 16px; }.classical-detail-actions { grid-template-columns: repeat(2, 1fr); }.classical-detail-actions > span { grid-column: 1 / -1; grid-row: 1; } }

/* 三才五格独立线路与当前姓名池身份 */
.name-pool-identity { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; margin: 0 0 12px; border: 1px solid #bdd8cf; border-left: 5px solid #2e7463; border-radius: 11px; background: linear-gradient(100deg, #eef8f4, #fbfdfc); box-shadow: 0 4px 14px rgba(40,91,77,.06); padding: 11px 14px; }
.name-pool-identity > div { display: grid; gap: 2px; min-width: 0; }.name-pool-identity small { color: #6d7c76; font-size: 10px; font-weight: 800; letter-spacing: .08em; }.name-pool-identity strong { color: #24594d; font-size: 15px; }.name-pool-identity > div > span { overflow: hidden; color: #62726c; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.name-pool-identity > p { display: grid; margin: 0; text-align: right; }.name-pool-identity > p b { color: #215f50; font-size: 20px; }.name-pool-identity > p span { color: #74817c; font-size: 10px; }.name-pool-identity.regular { border-color: #d8d0bd; border-left-color: #9a7a3b; background: linear-gradient(100deg, #fffaf0, #fffefd); }.name-pool-identity.regular strong { color: #73551f; }.name-pool-identity.warning { border-color: #e5c7ae; border-left-color: #b16c36; background: #fff6ee; }.name-pool-identity.warning strong { color: #8e4f27; }
.name-pool-plan { overflow-y: auto; padding-bottom: 36px; }.name-pool-loading { min-height: 180px; display: grid; place-items: center; color: #67766f; }
.name-pool-current-version { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; border-left-color: #2e7463; background: #f0f8f5; color: #285d50; }.name-pool-current-version span { color: #64736d; }
.name-pool-overview { display: grid; gap: 14px; border-color: #c8d8d2; background: linear-gradient(145deg, #fff, #f5faf8); padding: 18px; }.name-pool-overview > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.name-pool-overview > header small { color: #8b6a2d; font-weight: 800; letter-spacing: .08em; }.name-pool-overview h2 { margin: 4px 0; color: #244f45; }.name-pool-overview header p { margin: 0; color: #6e7b76; }.name-pool-overview > header > span { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; }.name-pool-overview > header > span.ready { background: #dff1e9; color: #286856; }.name-pool-overview > header > span.blocked { background: #fae9df; color: #975538; }
.name-pool-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }.name-pool-metrics > span { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 2px 5px; border: 1px solid #d8e3df; border-radius: 11px; background: #fff; padding: 12px 13px; }.name-pool-metrics small { grid-column: 1 / -1; color: #77837f; }.name-pool-metrics b { color: #315f55; font-size: 25px; }.name-pool-metrics em { color: #75817c; font-size: 11px; font-style: normal; }.name-pool-metrics > span.primary { border-color: #b8d6cb; background: #edf8f4; }.name-pool-metrics > span.primary b { color: #1f705d; }
.name-pool-position-metrics { display: flex; flex-wrap: wrap; gap: 8px; }.name-pool-position-metrics span { border-radius: 999px; background: #edf2f0; color: #617069; padding: 6px 10px; font-size: 12px; }.name-pool-position-metrics b { color: #2c6155; }
.name-pool-rule { display: grid; gap: 5px; border-left: 4px solid #a88747; border-radius: 8px; background: #fff9ed; padding: 11px 13px; }.name-pool-rule strong { color: #755720; }.name-pool-rule span { color: #625b4d; line-height: 1.6; }.name-pool-rule small { color: #8b8170; }
.name-pool-stroke-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 7px; }.name-pool-stroke-pairs > span { display: grid; gap: 2px; border: 1px solid #d9e4e0; border-radius: 8px; background: #fff; padding: 8px 10px; }.name-pool-stroke-pairs b { color: #345e55; }.name-pool-stroke-pairs small { color: #7b8782; }
.name-pool-route-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }.name-pool-route-cards article { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 8px; border: 1px solid #d9d2c3; border-radius: 14px; background: #fffdf8; box-shadow: 0 6px 18px rgba(57,66,61,.07); padding: 19px; }.name-pool-route-cards article.strict { border-color: #b8d5ca; background: #f5fbf8; }.name-pool-route-cards article.disabled { opacity: .7; }.name-pool-route-cards small { color: #92702e; font-weight: 800; letter-spacing: .08em; }.name-pool-route-cards h2 { margin: 0; color: #4e422d; }.name-pool-route-cards .strict h2 { color: #24594d; }.name-pool-route-cards p { margin: 0; color: #68736e; line-height: 1.65; }.name-pool-route-cards ul { margin: 4px 0 8px; padding-left: 19px; color: #5f6b66; line-height: 1.8; }.name-pool-route-cards button { min-height: 42px; }.name-pool-route-cards .strict button { background: #286f5d; }.name-pool-zero { display: grid; gap: 4px; margin-bottom: 14px; }
.name-pool-history { padding: 0; }.name-pool-history > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; padding: 14px 16px; }.name-pool-history > summary::-webkit-details-marker { display: none; }.name-pool-history > summary > span { display: grid; gap: 2px; }.name-pool-history > summary small { color: #78837f; }.name-pool-history > summary > b { color: #6d5b38; }.name-pool-history-body { display: grid; gap: 12px; border-top: 1px solid #e4e7e5; padding: 14px 16px 16px; }
.name-pool-version-list { display: flex; flex-wrap: wrap; gap: 7px; }.name-pool-version-list > span { display: grid; gap: 2px; border: 1px solid #dddeda; border-radius: 8px; background: #f7f8f7; padding: 7px 9px; }.name-pool-version-list > span.current { border-color: #a9d0c2; background: #eef8f4; }.name-pool-version-list b { color: #425e55; font-size: 12px; }.name-pool-version-list small { color: #7d8783; }
.name-pool-artifact-list { display: grid; gap: 7px; }.name-pool-artifact-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e1e4e2; border-radius: 9px; background: #fff; padding: 9px 11px; }.name-pool-artifact-list article > div { display: grid; gap: 2px; }.name-pool-artifact-list small, .name-pool-artifact-list span { color: #7b8581; }.name-pool-artifact-list strong { color: #31594f; }.name-pool-artifact-list em { color: #8b8f8d; font-size: 11px; font-style: normal; }
.name-pool-classical-notice { display: grid; gap: 3px; border-left-color: #2d7464; background: #edf8f4; color: #2e6256; }.name-pool-classical-notice span { color: #62736d; }.classical-strict-source { display: grid; gap: 3px; border: 1px solid #bcd8ce; border-radius: 9px; background: #eef8f4; padding: 9px 11px; }.classical-strict-source small, .classical-strict-source span { color: #6e7d77; font-size: 11px; }.classical-strict-source strong { color: #285f52; }.classical-name-source-stats.strict span { border-color: #c4dad2; background: #f0f8f5; }.classical-strict-batch { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }.classical-strict-batch span { border-radius: 999px; background: #edf2f0; color: #65736e; padding: 6px 10px; font-size: 11px; }.classical-strict-batch b, .classical-strict-batch code { color: #285f52; }
@media (max-width: 900px) { .name-pool-identity { grid-template-columns: 1fr auto; }.name-pool-identity > p { display: none; }.name-pool-identity > div > span { white-space: normal; }.name-pool-metrics, .name-pool-route-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .name-pool-identity, .name-pool-route-cards, .name-pool-metrics { grid-template-columns: 1fr; }.name-pool-identity { align-items: stretch; }.name-pool-overview > header, .name-pool-history > summary, .name-pool-artifact-list article { align-items: flex-start; flex-direction: column; }.name-pool-artifact-list article button { width: 100%; } }
.name-pool-version-list { display: grid; grid-template-columns: 1fr; width: 100%; }
.name-pool-version-list > article { border: 1px solid #dddeda; border-radius: 9px; background: #f7f8f7; padding: 9px 11px; }
.name-pool-version-list > article.current { border-color: #a9d0c2; background: #eef8f4; }
.classical-evaluation-actions { display: grid; gap: 7px; align-content: center; }
.classical-evaluation-progress { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(260px, 1fr); gap: 10px 18px; align-items: center; margin-top: 10px; border-color: #bad8ce; background: #f5fbf8; }
.classical-evaluation-progress > div:first-child { display: grid; gap: 3px; }
.classical-evaluation-progress > div:first-child strong { color: #245f52; font-size: 15px; }
.classical-evaluation-progress > div:first-child span, .classical-evaluation-progress > p { color: #62756e; font-size: 12px; }
.classical-evaluation-progress > progress { width: 100%; height: 13px; accent-color: #2c806c; }
.classical-evaluation-numbers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.classical-evaluation-numbers span { display: flex; justify-content: space-between; gap: 8px; border: 1px solid #d5e8e1; border-radius: 8px; background: #fff; padding: 7px 9px; color: #6c7b76; font-size: 12px; }
.classical-evaluation-numbers b { color: #285f54; }
.classical-evaluation-progress > p { grid-column: 1 / -1; margin: 0; }
.classical-evaluation-progress.failed { border-color: #e3c3b7; background: #fff8f5; }
@media (max-width: 1050px) { .classical-evaluation-progress { grid-template-columns: 1fr; }.classical-evaluation-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 客户账号：页面仍保留原菜单位置，真实数据由后端权限门禁保护。 */
.mobile-nav-toggle, .mobile-nav-backdrop { display: none; }
.client-nav-locked { opacity: .62; }
.client-nav-lock { float: right; margin-left: 8px; font-size: 11px; }
.client-action-locked { cursor: not-allowed !important; filter: grayscale(.25); opacity: .5 !important; }
.client-readonly-badge, .client-account-status { border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.client-readonly-badge { background: #edf2f0; color: #526760; }
.client-locked-page { position: relative; min-height: min(720px, calc(100vh - 30px)); overflow: hidden; border: 1px solid #dfe5e2; border-radius: 15px; background: #f7f9f8; }
.client-safe-preview { height: 100%; min-height: 680px; display: grid; grid-template-rows: auto auto 1fr; gap: 18px; padding: 24px; filter: blur(8px); opacity: .34; pointer-events: none; user-select: none; }
.client-safe-head { display: flex; align-items: center; gap: 13px; }.client-safe-head > i { width: 52px; height: 52px; border-radius: 12px; background: #78998e; }.client-safe-head > div { flex: 1; display: grid; gap: 8px; }.client-safe-head b, .client-safe-head span { display: block; height: 14px; border-radius: 8px; background: #79958b; }.client-safe-head span { width: 46%; height: 10px; }.client-safe-head button { width: 120px; height: 38px; }
.client-safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }.client-safe-grid article { min-height: 130px; border-radius: 13px; background: #9db1aa; }
.client-safe-table { display: grid; gap: 12px; border-radius: 13px; background: #fff; padding: 20px; }.client-safe-table i { display: block; height: 42px; border-radius: 8px; background: #b0beb9; }
.client-lock-overlay { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; background: rgba(245,248,247,.58); padding: 28px; text-align: center; backdrop-filter: blur(1px); }.client-lock-overlay h1 { margin: 12px 0 7px; color: #294d45; }.client-lock-overlay p { margin: 0; color: #4e655e; font-size: 16px; }.client-lock-overlay small { margin-top: 8px; color: #7b8883; }.client-lock-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #294f46; box-shadow: 0 9px 24px rgba(34,70,61,.2); font-size: 25px; }
.client-password-change .login-panel { width: min(500px, 100%); }
.client-create-locked { position: relative; overflow: hidden; }.client-create-locked > :not(.client-create-lock-message) { filter: blur(4px); opacity: .32; pointer-events: none; }.client-create-lock-message { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(250,251,250,.55); text-align: center; }.client-create-lock-message span { font-size: 25px; }.client-create-lock-message strong { color: #345b51; }.client-create-lock-message small { color: #74817c; }
.client-account-panel { grid-column: 1 / -1; display: grid; gap: 16px; margin-top: 18px; border-top: 4px solid #2d7362; }.client-account-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }.client-account-panel h2, .client-account-panel h3, .client-account-panel p { margin: 0; }.client-account-panel header p, .client-permission-head p { margin-top: 5px; color: #6d7975; }.client-account-status.active { background: #dff1e9; color: #276755; }.client-account-status.disabled { background: #f7e6e1; color: #96503e; }
.client-credentials-once { display: grid; gap: 9px; border: 1px solid #e3bd69; border-radius: 10px; background: #fff8e8; padding: 13px; color: #795319; }.client-credentials-once > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }.client-credentials-once code { border-radius: 7px; background: #fff; padding: 8px 10px; color: #433d31; }
.client-account-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }.client-account-summary > div { display: grid; gap: 4px; border: 1px solid #dce5e1; border-radius: 9px; background: #f9fbfa; padding: 10px 12px; }.client-account-summary span { color: #74817c; font-size: 11px; }.client-account-summary strong { color: #315c52; }
.client-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }.client-account-actions .danger { background: #a45242; border-color: #a45242; }
.client-permission-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; border-top: 1px solid #e1e6e3; padding-top: 14px; }
.client-capability-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 13px; }.client-capability-groups section { min-width: 0; border: 1px solid #dde5e1; border-radius: 10px; background: #fafcfb; padding: 10px; }.client-capability-groups h3 { margin: 0 0 8px; color: #345e54; font-size: 14px; }.client-capability-groups section > div { display: grid; gap: 6px; }.client-capability-groups label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; border-radius: 6px; background: #fff; padding: 6px 7px; font-size: 12px; }.client-capability-groups label input { width: 16px; height: 16px; }.client-capability-groups code, .client-capability-groups small { overflow: hidden; color: #7c8883; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.client-capability-groups .ceiling-disabled { opacity: .48; }.client-ceiling-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }.client-ceiling-panel > summary > span { display: grid; gap: 3px; }.client-ceiling-panel > summary small { color: #74817c; font-weight: 400; }.client-ceiling-panel > summary b { color: #2d6e5e; }.client-ceiling-panel footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.client-permission-events { border-top: 1px solid #e3e7e5; padding-top: 11px; }.client-permission-events summary { cursor: pointer; color: #40685e; font-weight: 750; }.client-permission-events > div { display: grid; gap: 5px; margin-top: 8px; }.client-permission-events p { display: grid; grid-template-columns: 100px minmax(0,1fr) auto; gap: 8px; border-bottom: 1px dashed #e7eae8; padding: 5px 0; font-size: 11px; }.client-permission-events small { color: #7d8884; }.client-account-empty { display: grid; place-items: center; gap: 7px; min-height: 200px; border: 1px dashed #bdd0c9; border-radius: 12px; background: #f8fbfa; text-align: center; }.client-account-empty > div { font-size: 30px; }.client-account-empty p { color: #74817c; }

@media (min-width: 901px) {
  .customer-workbench:has(> .client-ceiling-panel[open]) {
    grid-template-rows: auto auto minmax(0, 1fr);
  }
  .customer-workbench:has(> .client-ceiling-panel[open]) > .customer-list-panel {
    display: none;
  }
  .client-ceiling-panel[open] {
    min-height: 0;
    display: block;
    overflow: hidden;
  }
  .client-ceiling-panel[open] > .client-capability-groups {
    min-height: 0;
    max-height: calc(100vh - 310px);
    align-content: start;
    margin-top: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }
  .client-ceiling-panel[open] > footer {
    margin-top: 8px;
    border-top: 1px solid #e3e7e5;
    background: #fff;
    padding-top: 9px;
  }
}

@media (min-width: 1001px) {
  .project-info-body.has-client-account-manager {
    display: block;
    overflow-y: auto;
    padding: 0 4px 18px;
  }
  .project-info-body.has-client-account-manager > .project-profile-summary {
    display: grid;
    width: 100%;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }
  .project-info-body.has-client-account-manager > .profile-history {
    width: 100%;
    height: auto;
    max-height: 360px;
    margin-top: 14px;
    overflow: auto;
  }
  .project-info-body.has-client-account-manager > .client-account-panel {
    margin-top: 18px;
  }
}

@media (max-width: 900px) {
  .app-shell { display: block; height: 100vh; }
  .mobile-nav-toggle { position: fixed; z-index: 1002; top: 10px; left: 10px; display: block; min-height: 38px; box-shadow: 0 4px 14px rgba(31,41,51,.2); }
  .sidebar { position: fixed; z-index: 1003; inset: 0 auto 0 0; width: min(310px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.2); }
  .mobile-nav-open .sidebar { transform: translateX(0); }
  .mobile-nav-open .mobile-nav-backdrop { position: fixed; z-index: 1001; inset: 0; display: block; background: rgba(16,25,22,.38); }
  .main, .main.screen-main { width: 100%; height: 100vh; overflow: auto; padding: 62px 12px 18px; }
  .main.with-project-context, .main.screen-main.with-project-context { overflow: auto; }
  .main.screen-main.with-project-context .project-context-content { overflow: visible; }
  .client-safe-preview { min-height: calc(100vh - 90px); padding: 14px; }.client-safe-grid { grid-template-columns: 1fr; }.client-safe-grid article { min-height: 80px; }
  .client-account-panel > header, .client-permission-head { align-items: stretch; flex-direction: column; }.client-account-summary, .client-capability-groups { grid-template-columns: 1fr; }.client-credentials-once > div { align-items: stretch; flex-direction: column; }.client-permission-events p { grid-template-columns: 1fr; }
  .customer-table-wrap, .table { overflow-x: auto; }.table { min-width: 720px; }
}
