:root {
  --bg: #efe7db;
  --bg-deep: #e2d5c2;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: rgba(255, 254, 251, 0.96);
  --surface-accent: rgba(242, 231, 217, 0.74);
  --line: rgba(80, 56, 31, 0.12);
  --line-strong: rgba(80, 56, 31, 0.2);
  --text: #1f1a16;
  --muted: #6b6259;
  --accent: #b75d3a;
  --accent-strong: #92401d;
  --accent-soft: #f4d8c8;
  --jade: #215e59;
  --jade-soft: #dcebe7;
  --danger: #8f2945;
  --shadow-soft: 0 18px 42px rgba(78, 53, 29, 0.09);
  --shadow-strong: 0 26px 70px rgba(64, 44, 24, 0.15);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Georgia", "Songti SC", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(183, 93, 58, 0.2), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(33, 94, 89, 0.18), transparent 34%),
    linear-gradient(180deg, #f6f0e7 0%, #e8ddcf 100%);
  font-family: var(--font-body);
}

body {
  position: relative;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px 22px 72px;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.login-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.login-submit {
  width: 100%;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.56;
  pointer-events: none;
}

.ambient-left {
  width: 280px;
  height: 280px;
  top: 110px;
  left: -90px;
  background: rgba(183, 93, 58, 0.18);
}

.ambient-right {
  width: 340px;
  height: 340px;
  top: 220px;
  right: -120px;
  background: rgba(33, 94, 89, 0.16);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto 22px;
}

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

.user-chip {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(82, 59, 35, 0.12);
}

.user-chip-label {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-chip strong {
  font-family: var(--font-display);
  font-size: 15px;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.brand-mark,
.eyebrow {
  display: inline-block;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-block strong {
  font-family: var(--font-display);
  font-size: 22px;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}

.view-pane {
  display: grid;
  gap: 22px;
}

.hidden {
  display: none !important;
}

.hero-stage,
.workspace-panel,
.feature-card,
.metric-card,
.detail-header {
  backdrop-filter: blur(12px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 22px;
  padding: 30px;
}

.hero-copy h1,
.section-head h2,
.detail-header h1,
.feature-card h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
}

.hero-copy p,
.detail-header p,
.feature-card p,
.history-card p,
.config-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy p {
  margin-top: 16px;
  max-width: 720px;
  font-size: 18px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 24px;
}

.hero-aside {
  display: grid;
  gap: 14px;
}

.metric-card {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 249, 241, 0.96), rgba(244, 235, 223, 0.88));
}

.metric-label,
.result-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-card strong {
  font-family: var(--font-display);
  font-size: 26px;
}

.config-path {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  word-break: break-all;
}

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

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

.feature-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.feature-card-wechat {
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.94), rgba(248, 237, 228, 0.92));
}

.feature-card-xhs {
  background:
    linear-gradient(180deg, rgba(247, 252, 250, 0.94), rgba(228, 241, 236, 0.92));
}

.feature-card-xpost {
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.94), rgba(225, 233, 247, 0.92));
}

.feature-card-digital-human {
  background:
    linear-gradient(180deg, rgba(255, 248, 251, 0.94), rgba(243, 228, 236, 0.92));
}

.feature-card-quark {
  background:
    linear-gradient(180deg, rgba(249, 252, 246, 0.94), rgba(231, 241, 222, 0.92));
}

.feature-card-stock-quant {
  background:
    linear-gradient(180deg, rgba(246, 250, 252, 0.94), rgba(224, 238, 241, 0.92));
}

.feature-card-market-news {
  background:
    linear-gradient(180deg, rgba(250, 250, 246, 0.94), rgba(235, 239, 225, 0.92));
}

.feature-card-zhihu-qa {
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(226, 236, 246, 0.92));
}

.selected-card {
  border-color: rgba(33, 94, 89, 0.36);
  box-shadow: 0 18px 42px rgba(33, 94, 89, 0.12);
}

.feature-card-head,
.history-card-head,
.section-head,
.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.feature-badge,
.feature-tag,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.feature-badge {
  color: var(--accent-strong);
  background: rgba(183, 93, 58, 0.12);
}

.feature-tag {
  color: var(--jade);
  background: rgba(33, 94, 89, 0.1);
}

.feature-points {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.feature-points li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.workspace-panel {
  padding: 26px;
}

.history-panel {
  background: rgba(255, 252, 246, 0.72);
}

.detail-header {
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(255, 248, 240, 0.96), rgba(237, 245, 242, 0.94));
}

.detail-head-left {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.detail-header h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.detail-header p {
  margin-top: 10px;
}

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

.switch-chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(83, 60, 37, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
}

.switch-chip:hover {
  transform: translateY(-1px);
}

.switch-chip-active {
  color: #fff9f3;
  background: linear-gradient(135deg, #245d66, #174b51);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(23, 75, 81, 0.22);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.panel-column {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
}

.panel-column-config {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-accent);
  border: 1px solid rgba(102, 77, 52, 0.1);
  align-content: start;
}

.panel-column-config h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
}

.zhihu-qa-workflow-grid {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
}

.zhihu-qa-mode-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: var(--radius-md);
  background: rgba(255, 254, 251, 0.78);
}

.zhihu-qa-mode-panel-hot {
  border-left-color: var(--accent);
}

.zhihu-qa-mode-panel-link {
  border-left-color: var(--jade);
}

.zhihu-qa-mode-head {
  display: grid;
  gap: 6px;
}

.zhihu-qa-mode-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
}

.mode-kicker {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(33, 94, 89, 0.09);
  color: var(--jade);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.field-grid {
  display: grid;
  gap: 14px;
}

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

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

.field-block {
  display: grid;
  gap: 8px;
}

.field-block > span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.field-check {
  align-content: end;
}

.field-check input {
  width: 22px;
  height: 22px;
}

.config-note {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(33, 94, 89, 0.08), rgba(183, 93, 58, 0.08));
  border: 1px solid rgba(96, 72, 46, 0.12);
}

.config-note strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 15px;
}

.text-input,
.file-input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(96, 72, 46, 0.18);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.text-input:focus,
.file-input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(183, 93, 58, 0.58);
  box-shadow: 0 0 0 4px rgba(183, 93, 58, 0.12);
  transform: translateY(-1px);
}

.text-large {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.primary-button {
  color: #fff9f3;
  background: linear-gradient(135deg, #bd633d, #92421f);
  box-shadow: 0 14px 28px rgba(146, 66, 31, 0.24);
}

.secondary-button {
  color: var(--jade);
  background: linear-gradient(135deg, #e8f3f0, #dbece7);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(82, 59, 35, 0.12);
}

.link-button {
  color: #fff;
  background: linear-gradient(135deg, #245d66, #174b51);
  box-shadow: 0 12px 24px rgba(23, 75, 81, 0.22);
}

.small-link-button,
.compact-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.status-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.6;
}

.status-idle {
  background: rgba(102, 77, 52, 0.08);
  color: var(--muted);
}

.status-running {
  background: rgba(183, 93, 58, 0.12);
  color: var(--accent-strong);
}

.status-success {
  background: rgba(33, 94, 89, 0.12);
  color: var(--jade);
}

.status-error {
  background: rgba(143, 41, 69, 0.12);
  color: var(--danger);
}

.result-shell {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.74);
  border: 1px solid rgba(92, 68, 43, 0.1);
}

.progress-shell {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(251, 247, 241, 0.88), rgba(243, 236, 226, 0.86));
  border: 1px solid rgba(92, 68, 43, 0.1);
}

.progress-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.section-subhead {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.section-subhead h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(33, 94, 89, 0.1);
  color: var(--jade);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.log-output {
  margin: 16px 0 0;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(89, 68, 45, 0.12);
  background: #1d1a17;
  color: #efe3d6;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.result-grid,
.history-grid {
  display: grid;
  gap: 16px;
}

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

.result-card,
.history-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(103, 73, 46, 0.1);
  background: rgba(255, 255, 255, 0.62);
}

.result-card p,
.history-card p {
  margin: 0;
}

.result-card-wide {
  grid-column: 1 / -1;
}

.image-preview {
  width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(237, 228, 216, 0.8);
  cursor: zoom-in;
}

.result-card .image-preview,
.generated-image-card .image-preview,
.avatar-card > .image-preview {
  display: block;
  height: 220px;
}

.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.generated-image-grid-dh {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}

.generated-image-grid-dh .generated-image-card {
  flex: 0 0 var(--dh-result-card-width, 280px);
  width: min(100%, var(--dh-result-card-width, 280px));
  justify-self: start;
}

.generated-image-grid-dh .generated-image-card .image-preview {
  height: 240px;
  object-fit: contain;
}

.generated-image-grid-dh > .history-card {
  width: min(100%, 420px);
}

.generated-image-grid-dh[data-aspect-ratio="source"] {
  --dh-result-card-width: 280px;
}

.generated-image-grid-dh[data-aspect-ratio="1:1"] {
  --dh-result-card-width: 260px;
}

.generated-image-grid-dh[data-aspect-ratio="3:4"] {
  --dh-result-card-width: 280px;
}

.generated-image-grid-dh[data-aspect-ratio="4:3"] {
  --dh-result-card-width: 320px;
}

.generated-image-grid-dh[data-aspect-ratio="9:16"] {
  --dh-result-card-width: 240px;
}

.generated-image-grid-dh[data-aspect-ratio="16:9"] {
  --dh-result-card-width: 360px;
}

.generated-image-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(103, 73, 46, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.generated-image-meta {
  display: grid;
  gap: 8px;
}

.generated-image-meta strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.generated-image-meta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.generated-image-prompt {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.result-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(103, 73, 46, 0.1);
  background: rgba(255, 255, 255, 0.62);
}

.result-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.result-table th,
.result-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(103, 73, 46, 0.1);
  text-align: left;
  vertical-align: top;
}

.result-table th {
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 250, 244, 0.72);
}

.result-table tr:last-child td {
  border-bottom: 0;
}

.result-table-url {
  max-width: 240px;
  word-break: break-all;
}

.upload-stage {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  min-height: 240px;
  border: 1px dashed rgba(97, 73, 48, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 248, 0.54);
}

.upload-preview-frame,
.preview-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(103, 73, 46, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 232, 219, 0.88));
}

.upload-preview-frame {
  width: min(100%, 240px);
  height: 240px;
  margin-inline: auto;
}

.upload-preview-frame .image-preview,
.preview-thumb .image-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.upload-tip {
  color: var(--muted);
  line-height: 1.8;
}

.preview-grid,
.avatar-grid,
.anchor-strip {
  display: grid;
  gap: 12px;
}

.preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.preview-thumb {
  aspect-ratio: 3 / 4;
  max-height: 220px;
}

.avatar-grid {
  max-height: 520px;
  overflow: auto;
}

.avatar-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(103, 73, 46, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.avatar-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.avatar-card-head strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.avatar-card-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

.avatar-mini-grid img,
.anchor-strip img {
  width: 100%;
  height: 110px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: rgba(237, 228, 216, 0.8);
  cursor: zoom-in;
}

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

.top-gap {
  margin-top: 16px;
}

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

.history-card-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
}

.history-meta {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.lightbox-open {
  overflow: hidden;
}

body.job-result-modal-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.82);
  backdrop-filter: blur(8px);
}

.image-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(92vw, 1180px);
  max-height: 92vh;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(31, 24, 18, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.image-lightbox-image {
  width: 100%;
  max-width: 100%;
  max-height: calc(92vh - 92px);
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.08);
}

.image-lightbox-close {
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-caption {
  margin: 0;
  color: rgba(255, 245, 236, 0.9);
  text-align: center;
  line-height: 1.7;
}

.job-result-modal {
  position: fixed;
  inset: 0;
  z-index: 1190;
  display: grid;
  place-items: center;
  padding: 24px;
}

.job-result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.74);
  backdrop-filter: blur(10px);
}

.job-result-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(94vw, 1280px);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.97), rgba(243, 235, 225, 0.95));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
}

.job-result-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.job-result-modal-head-copy {
  display: grid;
  gap: 6px;
}

.job-result-modal-head-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
}

.job-result-modal-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.job-result-modal-body {
  display: grid;
  gap: 18px;
}

.job-result-modal-log-shell {
  margin-top: 0;
}

.job-result-pre,
.job-result-copy-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
}

.badge-ready {
  color: var(--jade);
  background: rgba(33, 94, 89, 0.12);
}

.badge-running {
  color: var(--accent-strong);
  background: rgba(183, 93, 58, 0.12);
}

.badge-failed {
  color: var(--danger);
  background: rgba(143, 41, 69, 0.12);
}

.stock-side-buy {
  color: var(--jade);
}

.stock-side-sell {
  color: var(--danger);
}

@media (max-width: 1180px) {
  .hero-stage,
  .feature-grid,
  .panel-grid,
  .history-grid,
  .detail-header {
    grid-template-columns: 1fr;
  }

  .detail-header {
    display: grid;
  }
}

@media (max-width: 780px) {
  .page-shell {
    padding: 16px 12px 48px;
  }

  .hero-stage,
  .workspace-panel,
  .feature-card,
  .detail-header {
    padding: 20px;
  }

  .two-cols,
  .three-cols,
  .result-grid,
  .generated-image-grid,
  .preview-grid,
  .anchor-strip,
  .avatar-mini-grid {
    grid-template-columns: 1fr;
  }

  .generated-image-grid-dh .generated-image-card,
  .generated-image-grid-dh > .history-card {
    flex-basis: 100%;
    width: 100%;
  }

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox-dialog {
    width: 100%;
    padding: 14px;
  }

  .job-result-modal {
    padding: 12px;
  }

  .job-result-modal-dialog {
    width: 100%;
    max-height: 94vh;
    padding: 16px;
  }

  .job-result-modal-head {
    flex-direction: column;
  }

  .hero-actions,
  .button-row,
  .feature-switcher,
  .detail-head-left {
    flex-direction: column;
  }
}

/* 简洁后台主题覆盖：保留原有结构和交互，只收敛视觉噪音。 */
:root {
  --bg: #f6f7f9;
  --bg-deep: #eef1f4;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-accent: #f8fafc;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-strong: #0f766e;
  --accent-soft: #ccfbf1;
  --jade: #047857;
  --jade-soft: #d1fae5;
  --danger: #b42318;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 12px 32px rgba(15, 23, 42, 0.14);
  --radius-xl: 8px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 6px;
  --font-display: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body {
  background: var(--bg);
  font-family: var(--font-body);
}

.ambient {
  display: none;
}

.page-shell {
  padding: 20px 24px 56px;
}

.login-shell {
  background: var(--bg);
}

.topbar {
  max-width: 1440px;
  margin-bottom: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  gap: 2px;
}

.brand-mark,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.brand-block strong {
  font-size: 20px;
}

.user-chip {
  min-width: 132px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border-color: var(--line);
}

.user-chip-label {
  font-size: 10px;
  letter-spacing: 0.06em;
}

.user-chip strong {
  font-size: 14px;
}

.app-shell {
  max-width: 1440px;
}

.view-pane {
  gap: 16px;
}

.hero-stage,
.workspace-panel,
.feature-card,
.metric-card,
.detail-header,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.hero-stage {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
  padding: 24px;
}

.hero-copy h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy p,
.detail-header p,
.feature-card p,
.history-card p,
.config-note p {
  line-height: 1.65;
}

.hero-copy p {
  margin-top: 12px;
  max-width: 760px;
  font-size: 15px;
}

.hero-actions {
  margin-top: 18px;
}

.hero-actions,
.button-row {
  gap: 8px;
}

.hero-aside {
  gap: 10px;
}

.metric-card {
  padding: 14px 16px;
  background: var(--surface-accent);
}

.metric-label,
.result-label {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.metric-card strong {
  font-size: 22px;
}

.feature-grid {
  gap: 14px;
}

.feature-card {
  gap: 14px;
  padding: 18px;
}

.feature-card-wechat,
.feature-card-xhs,
.feature-card-xpost,
.feature-card-digital-human,
.feature-card-quark,
.feature-card-stock-quant,
.feature-card-market-news,
.history-panel,
.detail-header,
.progress-shell,
.result-shell,
.config-note {
  background: var(--surface);
}

.feature-card h2,
.section-head h2,
.detail-header h1 {
  letter-spacing: 0;
}

.feature-card h2 {
  font-size: 20px;
}

.feature-card-head,
.history-card-head,
.section-head,
.detail-header {
  gap: 12px;
}

.feature-badge,
.feature-tag,
.badge,
.progress-pill {
  min-height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.feature-badge {
  color: var(--accent-strong);
  background: #f0fdfa;
}

.feature-tag {
  color: #374151;
  background: #f3f4f6;
}

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

.feature-points li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.workspace-panel {
  padding: 20px;
}

.detail-header {
  padding: 18px 20px;
}

.detail-header h1 {
  font-size: clamp(24px, 2.6vw, 34px);
}

.detail-header p {
  margin-top: 6px;
}

.feature-switcher {
  gap: 8px;
}

.switch-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.switch-chip:hover {
  transform: none;
  border-color: var(--line-strong);
  color: var(--text);
}

.switch-chip-active {
  color: #ffffff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: none;
}

.panel-grid {
  gap: 16px;
}

.panel-column {
  gap: 14px;
}

.panel-column-config {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-accent);
  border-color: var(--line);
}

.panel-column-config h3,
.section-subhead h3 {
  font-size: 18px;
}

.field-grid {
  gap: 12px;
}

.field-block {
  gap: 6px;
}

.field-block > span {
  font-size: 12px;
}

.config-note {
  padding: 14px;
  border-color: var(--line);
}

.text-input,
.file-input,
textarea,
select {
  padding: 10px 12px;
  border-color: var(--line-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.text-input:focus,
.file-input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  transform: none;
}

.text-large {
  min-height: 180px;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: none;
}

.primary-button {
  color: #ffffff;
  background: var(--accent-strong);
  box-shadow: none;
}

.primary-button:hover {
  background: #115e59;
}

.secondary-button {
  color: var(--accent-strong);
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}

.ghost-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.link-button {
  color: #1f2937;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  box-shadow: none;
}

.small-link-button,
.compact-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.status-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 13px;
}

.status-idle {
  background: #f9fafb;
  border-color: var(--line);
}

.status-running {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.status-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--jade);
}

.status-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.result-shell,
.progress-shell {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border-color: var(--line);
}

.log-output {
  min-height: 180px;
  padding: 14px;
  border-radius: var(--radius-md);
  border-color: #1f2937;
  background: #111827;
  color: #e5e7eb;
  box-shadow: none;
}

.result-grid,
.history-grid {
  gap: 12px;
}

.result-card,
.history-card,
.generated-image-card,
.avatar-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  border-color: var(--line);
  background: var(--surface);
}

.history-card-head strong,
.generated-image-meta strong,
.avatar-card-head strong {
  font-size: 16px;
}

.history-meta {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.image-preview {
  border-radius: var(--radius-md);
  background: #f3f4f6;
}

.result-table-wrap {
  margin-top: 12px;
  border-radius: var(--radius-lg);
  border-color: var(--line);
  background: var(--surface);
}

.result-table th,
.result-table td {
  padding: 10px 12px;
  border-bottom-color: var(--line);
}

.result-table th {
  color: var(--muted);
  background: #f9fafb;
  letter-spacing: 0.05em;
}

.upload-stage {
  padding: 14px;
  min-height: 210px;
  border-color: var(--line-strong);
  border-radius: var(--radius-lg);
  background: #f9fafb;
}

.upload-preview-frame,
.preview-thumb {
  border-radius: var(--radius-md);
  border-color: var(--line);
  background: #ffffff;
}

.avatar-grid {
  max-height: 500px;
}

.avatar-mini-grid img,
.anchor-strip img {
  border-radius: var(--radius-md);
  background: #f3f4f6;
}

.image-lightbox-backdrop,
.job-result-modal-backdrop {
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: none;
}

.image-lightbox-dialog {
  border-radius: var(--radius-xl);
  background: #111827;
  box-shadow: var(--shadow-strong);
}

.image-lightbox-image {
  border-radius: var(--radius-lg);
}

.image-lightbox-close {
  border-radius: var(--radius-md);
}

.job-result-modal-dialog {
  padding: 20px;
  border-radius: var(--radius-xl);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.job-result-modal-head-copy h2 {
  font-size: clamp(22px, 2.5vw, 30px);
}

.badge-ready {
  color: #047857;
  background: #ecfdf5;
}

.badge-running {
  color: #92400e;
  background: #fffbeb;
}

.badge-failed {
  color: var(--danger);
  background: #fef2f2;
}

.stock-holdings-editor {
  display: grid;
  gap: 10px;
}

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

.stock-holdings-head > span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stock-holdings-actions {
  gap: 8px;
  justify-content: flex-end;
}

.stock-holding-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stock-holding-search .compact-button {
  min-height: 40px;
  white-space: nowrap;
}

.stock-holding-search-results {
  display: grid;
  gap: 8px;
}

.stock-holding-search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.stock-holding-search-item:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}

.stock-holding-search-item span {
  font-weight: 700;
}

.stock-holding-search-item strong {
  color: var(--muted);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
}

.stock-holding-search-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stock-holdings-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stock-holdings-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

.stock-holdings-table th {
  color: var(--muted);
  background: #f9fafb;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.stock-holdings-table tr:last-child td {
  border-bottom: 0;
}

.stock-holding-input {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.stock-holding-symbol {
  font-family: "Consolas", "Courier New", monospace;
  letter-spacing: 0.02em;
}

.stock-holding-name {
  color: var(--text);
  font-weight: 700;
}

.stock-holding-name-muted {
  color: var(--muted);
  font-weight: 500;
}

.stock-holding-remove {
  white-space: nowrap;
}

.stock-holdings-import {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: #f9fafb;
}

.stock-holdings-import textarea {
  min-height: 96px;
  resize: vertical;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
}

.stock-holdings-summary {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
}

.stock-name-cache-tool {
  display: grid;
  gap: 10px;
}

.stock-name-cache-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stock-name-cache-form .compact-button {
  min-height: 40px;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .page-shell {
    padding: 14px 12px 40px;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .hero-stage,
  .workspace-panel,
  .feature-card,
  .detail-header {
    padding: 16px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .hero-actions,
  .button-row,
  .feature-switcher,
  .detail-head-left {
    align-items: stretch;
  }

  .stock-holdings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stock-holdings-actions {
    justify-content: flex-start;
  }

  .stock-holding-search,
  .stock-name-cache-form {
    grid-template-columns: 1fr;
  }
}
