/* HAZ-125 content module rework: keep the content entry point as three clear choices. */
body.content-page .haz125-content-rework {
  gap: 14px;
}

body.content-page .content-module-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
}

body.content-page .content-module-tab {
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

body.content-page .content-module-tab span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.content-page .content-module-tab:hover,
body.content-page .content-module-tab:focus-visible {
  border-color: var(--color-border-strong);
  color: var(--text-main);
  outline: none;
}

body.content-page .content-module-tab.active {
  /* HAZ-178 R1 patch：硬编码陶土 #f4dbd1 / #fcf4f1 改走 palette token，雾蓝/抹茶/暮紫下也跟着换色。 */
  border-color: color-mix(in srgb, var(--primary-accent) 30%, var(--color-border));
  background: var(--primary-soft);
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-accent) 30%, var(--color-border));
}

body.content-page .haz125-content-rework .content-config-panel .config-readonly {
  min-height: 72px;
}

body.content-page .haz125-content-rework .content-config-panel .config-readonly small {
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 760px) {
  body.content-page .content-module-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-module-tab {
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {

  body.content-page .content-module-tab,
  .dashboard-target-list,
  .inspiration-modal,
  .upload-modal,
  .profile-history-dialog,
  .profile-ai-dialog {
    animation: none !important;
    transition: none !important;
  }
}

/* HAZ-125 content page guided redesign.
   Three expandable module choices share one beginner-friendly workbench skeleton. */
body.content-page .haz125-content-rework {
  gap: 12px;
}

body.content-page .content-module-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
}

body.content-page .content-module-tab {
  display: flex;
  min-height: 62px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

body.content-page .content-module-tab .content-module-label,
body.content-page .content-module-tab small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.content-page .content-module-tab .content-module-label {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

body.content-page .content-module-tab small {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

body.content-page .content-module-tab.active small {
  color: color-mix(in srgb, var(--text-main) 70%, var(--primary));
}

body.content-page .content-guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
  align-items: center;
  padding: 16px;
}

body.content-page .content-guide-hero .section-title {
  font-size: 1.28rem;
}

body.content-page .content-eyebrow,
body.content-page .content-hero-context span {
  display: block;
  color: #6e6b63;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.content-page .content-hero-context {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--secondary);
}

body.content-page .content-hero-context strong,
body.content-page .content-hero-context small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.content-page .content-hero-context strong {
  margin-top: 4px;
  font-size: 0.94rem;
}

body.content-page .content-hero-context small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

body.content-page .content-guided-layout.content-workflow-grid {
  grid-template-columns: minmax(236px, 300px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
}

body.content-page .content-guide-panel,
body.content-page .content-status-panel {
  position: sticky;
  top: 12px;
}

body.content-page .content-editor-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

body.content-page .content-guided-form-card {
  position: static;
  max-height: none;
}

body.content-page .content-guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

body.content-page .content-guide-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--secondary);
}

body.content-page .content-guide-step>span,
body.content-page .content-check-row>span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
}

body.content-page .content-guide-step strong,
body.content-page .content-guide-step small,
body.content-page .content-check-row strong,
body.content-page .content-check-row small {
  display: block;
  min-width: 0;
}

body.content-page .content-guide-step strong,
body.content-page .content-check-row strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

body.content-page .content-guide-step small,
body.content-page .content-check-row small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.content-page .content-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: stretch;
}

body.content-page .content-form-grid .config-readonly,
body.content-page .guided-field-shell {
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fdfcf8;
}

body.content-page .guided-field-shell {
  justify-content: space-between;
}

body.content-page .guided-field-shell .select-field {
  margin-top: 8px;
}

body.content-page .guided-prompt-field .textarea-field {
  min-height: 88px;
}

body.content-page .content-prompt-status {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--color-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning) 9%, var(--color-card));
}

body.content-page .content-prompt-status span,
body.content-page .content-prompt-status small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.content-page .content-prompt-status strong {
  display: block;
  margin-top: 3px;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.3;
}

body.content-page .content-prompt-status p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

body.content-page .content-prompt-status-meta {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-card) 78%, white);
}

body.content-page .content-prompt-placeholder .textarea-field {
  min-height: 58px;
  color: var(--text-muted);
  background: var(--secondary);
  resize: none;
}


body.content-page .workflow-editor-card {
  min-height: 560px;
}

body.content-page .content-editor-boundary-note {
  padding: 10px 12px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

body.content-page .content-check-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fdfcf8;
}

body.content-page .content-check-row.done {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--color-border));
  background: color-mix(in srgb, var(--primary) 8%, #fdfcf8);
}

body.content-page .content-check-row.done>span {
  background: color-mix(in srgb, var(--primary) 85%, #16a34a);
}

body.content-page .content-status-panel .module-card,
body.content-page .content-guide-panel,
body.content-page .content-guided-form-card,
body.content-page .workflow-editor-card,
body.content-page .content-guide-hero {
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 1320px) {
  body.content-page .content-guided-layout.content-workflow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-guide-panel,
  body.content-page .content-status-panel {
    position: static;
  }
}

@media (max-width: 900px) {

  body.content-page .content-guide-hero,
  body.content-page .content-form-grid,
  body.content-page .content-prompt-status {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body.content-page .content-module-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-module-tab {
    min-height: 54px;
  }

  body.content-page .content-guide-hero {
    padding: 14px;
  }

  body.content-page .draft-field-grid,
  body.content-page .save-state-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .workflow-editor-card {
    min-height: 0;
  }

  body.content-page .content-generate-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* HAZ-133/135 simplified content composer.
   The three content modes use one light input/output surface and a trustworthy AI status. */
body.content-page .haz133-content-lite {
  --content-accent: var(--primary);
  --content-accent-soft: var(--primary-soft);
  --content-line: var(--color-border);
  gap: 12px;
}

body.content-page .haz133-content-lite .content-lite-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
}

body.content-page .haz133-content-lite .content-module-tab {
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

body.content-page .haz133-content-lite .content-module-tab.active {
  /* HAZ-178 R1 patch：tab 选中态走 palette token；非陶土主题下也跟着换色。 */
  background: var(--primary-soft);
  color: var(--primary-accent);
  box-shadow: none;
}

body.content-page .haz133-content-lite .content-module-tab.active small {
  color: var(--primary-accent);
}

body.content-page .content-lite-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f9f9f8;
  box-shadow: none;
}

body.content-page .content-lite-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
  min-width: 0;
}

body.content-page .content-lite-title-block {
  min-width: 0;
}

body.content-page .content-lite-title-block .section-title {
  margin-top: 4px;
  font-size: 1.26rem;
}

body.content-page .content-lite-boundary {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, var(--color-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning) 8%, var(--color-card));
}

body.content-page .content-lite-boundary span,
body.content-page .content-lite-boundary small,
body.content-page .content-lite-panel-head span,
body.content-page .content-lite-panel-head p,
body.content-page .content-lite-step-title small,
body.content-page .content-output-state span,
body.content-page .content-output-state small {
  display: block;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

body.content-page .content-lite-boundary span,
body.content-page .content-lite-panel-head span,
body.content-page .content-output-state span {
  font-weight: 800;
}

body.content-page .content-lite-boundary strong {
  display: block;
  margin: 4px 0 2px;
  overflow-wrap: anywhere;
  color: var(--text-main);
  font-size: 0.95rem;
}

body.content-page .content-lite-io-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

body.content-page .content-lite-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
}

body.content-page .content-lite-output {
  border-color: var(--color-border);
  background: #ffffff;
}

body.content-page .content-draft-only-output {
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 560px;
}

body.content-page .content-lite-panel-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

body.content-page .content-lite-panel-head>div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.content-page .content-lite-panel-head h3 {
  margin: 0;
  color: #21201e;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
}

body.content-page .haz133-content-lite .content-prompt-status {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-color: color-mix(in srgb, var(--warning) 30%, var(--color-border));
  background: color-mix(in srgb, var(--warning) 8%, var(--color-card));
}

body.content-page .haz133-content-lite .content-prompt-status strong {
  font-size: 0.9rem;
}

body.content-page .haz133-content-lite .content-prompt-status-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.content-page .haz133-content-lite .content-prompt-status-meta small {
  max-width: 100%;
}

body.content-page .content-lite-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #faf9f5;
}

body.content-page .content-lite-step.primary-step {
  /* HAZ-178 R1 patch：primary step 强调底 & 边走 palette token。 */
  border-color: color-mix(in srgb, var(--primary-accent) 32%, var(--color-border));
  background: var(--primary-soft);
}

body.content-page .content-lite-step-index {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  /* HAZ-178 R1 patch：序号 chip 主色走 palette token。 */
  background: var(--primary-accent);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}

body.content-page .content-lite-step-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body.content-page .content-lite-step-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.content-page .content-lite-step-title strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.3;
}

body.content-page .content-source-asset-note {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary-accent) 30%, var(--color-border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-accent) 7%, var(--color-card));
  color: var(--text-main);
}

body.content-page .content-source-asset-note > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--text-control);
}

body.content-page .content-source-asset-note .phosphor-icon {
  flex: 0 0 auto;
  color: var(--primary-accent);
}

body.content-page .content-source-asset-note strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.content-page .content-source-asset-note small {
  color: var(--text-muted);
  font-size: var(--text-caption);
  line-height: 1.5;
}

body.content-page .content-source-brief-count {
  justify-self: end;
  color: var(--text-muted);
  font-size: var(--text-caption);
  line-height: 1.4;
}

body.content-page .content-source-brief-count.is-limit {
  color: var(--color-warning);
}

body.content-page .content-lite-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  min-width: 0;
}

body.content-page .content-lite-readonly,
body.content-page .haz133-content-lite .guided-field-shell {
  min-width: 0;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
}

body.content-page .content-lite-readonly span,
body.content-page .content-lite-readonly small,
body.content-page .content-lite-readonly strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.content-page .content-lite-readonly span,
body.content-page .content-lite-readonly small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

body.content-page .content-lite-readonly strong {
  margin: 4px 0 2px;
  color: var(--text-main);
  font-size: 0.9rem;
}

body.content-page .haz133-content-lite .guided-field-shell.compact-select {
  min-height: 0;
}

body.content-page .haz133-content-lite .guided-field-shell .select-field {
  margin-top: 8px;
}

body.content-page .haz133-content-lite .input-field,
body.content-page .haz133-content-lite .select-field,
body.content-page .haz133-content-lite .textarea-field {
  border-color: var(--color-border);
  background: #ffffff;
}

body.content-page .haz133-content-lite .input-field:focus,
body.content-page .haz133-content-lite .select-field:focus,
body.content-page .haz133-content-lite .textarea-field:focus {
  /* HAZ-178 R1 patch：focus ring 跟 palette 走，雾蓝主题下不再出现陶土环。 */
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-accent) 18%, transparent);
}

body.content-page .haz133-content-lite .guided-prompt-field .textarea-field {
  min-height: 96px;
}

body.content-page .haz133-content-lite .primary-step .guided-prompt-field .textarea-field {
  min-height: 158px;
}

body.content-page .haz133-content-lite .content-generate-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

body.content-page .haz133-content-lite .content-generate-btn {
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 0.92rem;
  border-color: transparent;
  /* HAZ-178 R1 patch：生成 CTA 主按钮跟 palette 走。 */
  background: var(--primary-accent);
  color: #ffffff;
  border-radius: 8px;
}

body.content-page .haz133-content-lite .content-generate-btn:hover {
  background: var(--primary-accent-hover);
}

body.content-page .haz133-content-lite .content-generate-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

body.content-page .content-output-state {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--content-accent) 24%, var(--color-border));
  border-radius: 8px;
  background: var(--content-accent-soft);
}

body.content-page .content-output-state strong {
  color: var(--text-main);
  font-size: 0.92rem;
}

body.content-page .haz133-content-lite .draft-field-grid {
  gap: 10px;
}

body.content-page .haz133-content-lite .draft-field-grid .textarea-field {
  min-height: 92px;
}

body.content-page .haz133-content-lite .draft-body-field {
  min-height: 220px;
}

body.content-page .haz133-content-lite .content-draft-only-field {
  display: grid;
  min-height: 0;
  gap: 8px;
}

body.content-page .haz133-content-lite .content-draft-only-textarea {
  min-height: 460px;
  height: 100%;
  font-size: 0.96rem;
  line-height: 1.7;
  resize: vertical;
}

body.content-page .content-markdown-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

body.content-page .content-output-editor-field {
  min-height: 0;
  height: 100%;
  flex-shrink: 0 !important;
}

body.content-page .content-markdown-preview {
  min-width: 0;
  min-height: 400px;
  max-height: 600px;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfbfb;
  color: #21201e;
  font-size: 0.94rem;
  line-height: 1.75;
}

body.content-page .content-markdown-preview>*:first-child {
  margin-top: 0;
}

body.content-page .content-markdown-preview>*:last-child {
  margin-bottom: 0;
}

body.content-page .content-markdown-preview h4,
body.content-page .content-markdown-preview h5,
body.content-page .content-markdown-preview h6 {
  margin: 16px 0 8px;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.35;
}

body.content-page .content-markdown-preview h5 {
  font-size: 0.95rem;
}

body.content-page .content-markdown-preview h6 {
  font-size: 0.9rem;
}

body.content-page .content-markdown-preview p,
body.content-page .content-markdown-preview ul,
body.content-page .content-markdown-preview ol {
  margin: 0 0 12px;
}

body.content-page .content-markdown-preview ul,
body.content-page .content-markdown-preview ol {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

body.content-page .content-markdown-preview li {
  min-width: 0;
  padding-left: 2px;
}

body.content-page .content-markdown-preview strong {
  font-weight: 850;
}

body.content-page .content-markdown-preview em {
  color: color-mix(in srgb, var(--text-main) 72%, var(--content-accent));
  font-style: normal;
  font-weight: 700;
}

body.content-page .content-markdown-empty {
  color: var(--text-muted);
}

body.content-page .content-markdown-raw-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--secondary);
}

body.content-page .content-markdown-raw-panel summary {
  display: flex;
  min-width: 0;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
}

body.content-page .content-markdown-raw-panel summary small {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

body.content-page .content-markdown-raw-panel .content-draft-only-field {
  padding: 0 10px 10px;
}

body.content-page .haz133-content-lite .content-markdown-raw-panel .content-markdown-raw-source {
  min-height: 220px;
  height: 220px;
}

body.content-page .haz133-content-lite .content-output-editor {
  min-height: 400px;
  height: 100%;
  max-height: 600px;
  padding: 20px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.94rem;
  line-height: 1.75;
}

body.content-page .haz133-content-lite .content-editor-boundary-note {
  border-color: var(--color-border);
  background: var(--secondary);
}

@media (max-width: 1180px) {
  body.content-page .content-lite-io-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-draft-only-output {
    min-height: 480px;
  }

  body.content-page .content-markdown-preview {
    min-height: 340px;
    max-height: 520px;
  }

  body.content-page .haz133-content-lite .content-draft-only-textarea {
    min-height: 340px;
  }

  body.content-page .haz133-content-lite .content-output-editor {
    min-height: 340px;
    max-height: 520px;
  }

  body.content-page .haz133-content-lite .content-markdown-raw-panel .content-markdown-raw-source {
    min-height: 200px;
    height: 200px;
  }
}

@media (max-width: 900px) {

  body.content-page .content-lite-hero,
  body.content-page .content-lite-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-lite-panel-head,
  body.content-page .haz133-content-lite .content-generate-actions {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-lite-panel-head .editor-status-stack {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  body.content-page .haz133-content-lite .content-lite-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-page .content-lite-shell {
    padding: 12px;
  }

  body.content-page .content-lite-panel {
    padding: 12px;
  }

  body.content-page .content-lite-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  body.content-page .content-lite-step-index {
    width: 28px;
    height: 28px;
  }

  body.content-page .haz133-content-lite .primary-step .guided-prompt-field .textarea-field,
  body.content-page .haz133-content-lite .draft-body-field {
    min-height: 150px;
  }

  body.content-page .content-draft-only-output {
    min-height: 360px;
  }

  body.content-page .content-markdown-preview {
    min-height: 260px;
    max-height: 420px;
    padding: 14px;
  }

  body.content-page .haz133-content-lite .content-draft-only-textarea {
    min-height: 260px;
  }

  body.content-page .haz133-content-lite .content-output-editor {
    min-height: 260px;
    max-height: 420px;
    padding: 14px;
  }

  body.content-page .haz133-content-lite .content-markdown-raw-panel .content-markdown-raw-source {
    min-height: 180px;
    height: 180px;
  }
}

html[data-theme="dark"] body.content-page .haz133-content-lite {
  --content-line: #44423c;
}

html[data-theme="dark"] body.content-page .content-lite-shell {
  background: #21201e;
  border-color: #33322f;
}

html[data-theme="dark"] body.content-page .content-lite-panel,
html[data-theme="dark"] body.content-page .content-lite-output {
  background: #33322f;
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .content-lite-step {
  background: #21201e;
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .content-lite-step.primary-step {
  background: rgba(201, 100, 66, 0.08);
  border-color: #a64b27;
}

html[data-theme="dark"] body.content-page .content-markdown-preview,
html[data-theme="dark"] body.content-page .content-output-editor {
  background: #21201e;
  border-color: #44423c;
  color: #e8e6dc;
}

html[data-theme="dark"] body.content-page .haz133-content-lite .input-field,
html[data-theme="dark"] body.content-page .haz133-content-lite .select-field,
html[data-theme="dark"] body.content-page .haz133-content-lite .textarea-field {
  background: #21201e;
  border-color: #44423c;
  color: #e8e6dc;
}

/* HAZ-180 爆款标题第四栏：源平台 chips、候选/Top/转发描述/标签卡片，统一走 .content-lite 现有外框，不动其他栏样式。 */
body.content-page .headline-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

body.content-page .headline-source-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft, #d8d4c8);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

body.content-page .headline-source-chip:hover {
  background: var(--ghost-hover-bg, rgba(15, 14, 12, 0.05));
  color: var(--text-main);
}

body.content-page .headline-source-chip.is-active {
  background: rgba(201, 100, 66, 0.1);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

/* HAZ-175 后续：上下文来源开关。chip 视觉完全复用 .headline-source-chip，本节只补外层间距与 persona/readout 容器。 */
body.content-page .content-context-source-block {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.content-page .content-context-source-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

body.content-page .content-context-source-head strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

body.content-page .content-context-source-head small {
  font-size: 12px;
  color: var(--text-muted);
}

body.content-page .content-context-source-readout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px dashed var(--border-soft, #d8d4c8);
  border-radius: 8px;
  background: var(--surface-muted, #f9f7f1);
}

body.content-page .content-context-source-readout span {
  font-size: 12px;
  color: var(--text-muted);
}

body.content-page .content-context-source-readout strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

body.content-page .content-context-source-readout small {
  font-size: 12px;
  color: var(--text-muted);
}

body.content-page .content-context-source-persona textarea {
  min-height: 64px;
  resize: vertical;
}

body.content-page .content-context-source-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

body.content-page .headline-aux-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

body.content-page .headline-script-input {
  min-height: 200px;
  resize: vertical;
}

body.content-page .haz180-headline-workflow .headline-io-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

body.content-page .haz180-headline-workflow .content-body-row,
body.content-page .haz180-headline-workflow .content-body-row.context-panel-parent-collapsed {
  align-items: start;
}

body.content-page .haz180-headline-workflow .headline-shell {
  min-height: 0;
  height: fit-content;
  align-self: start;
}

body.content-page .haz180-headline-workflow .headline-input-form,
body.content-page .haz180-headline-workflow .headline-output-panel {
  align-self: start;
}

body.content-page .haz180-headline-workflow .content-context-panel {
  align-self: start;
  min-height: 0;
}

body.content-page .headline-output-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

body.content-page .headline-output-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

body.content-page .headline-output-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.content-page .headline-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

body.content-page .headline-section h5 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

body.content-page .headline-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.content-page .headline-top-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(201, 100, 66, 0.25);
  border-radius: 10px;
  background: rgba(201, 100, 66, 0.06);
}

body.content-page .headline-top-rank {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

body.content-page .headline-top-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
}

body.content-page .headline-top-reason {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

body.content-page .headline-candidate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.content-page .headline-candidate {
  padding: 12px;
  border: 1px solid var(--border-soft, #d8d4c8);
  border-radius: 10px;
  background: var(--surface-1, #fbfaf6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.content-page .headline-candidate.is-top {
  border-color: rgba(201, 100, 66, 0.4);
}

body.content-page .headline-candidate-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

body.content-page .headline-candidate-title {
  margin: 0;
  flex: 1;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  /* 标题最长 20 字按公式约束，但兜底允许两行折行 */
  word-break: break-word;
}

body.content-page .headline-top-flag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

body.content-page .headline-candidate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.content-page .headline-meta-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ghost-hover-bg, rgba(15, 14, 12, 0.05));
  font-size: 11.5px;
  color: var(--text-main);
  white-space: nowrap;
}

body.content-page .headline-meta-chip-muted {
  background: transparent;
  border: 1px solid var(--border-soft, #d8d4c8);
  color: var(--text-muted);
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

body.content-page .headline-candidate-reason,
body.content-page .headline-candidate-example {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* HAZ-330: 五段按顺序连续展示，文字顶到卡片宽度时才自然换行。 */
body.content-page .lead-hook-copy {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.content-page .lead-hook-location-field {
  max-width: 22rem;
}

/* HAZ-316: 窄输出栏只承载短文案本身；操作统一收为图标，禁止撑破候选卡。 */
body.content-page .content-mode-lead-hooks .lead-hook-generate-actions {
  grid-template-columns: 42px minmax(0, 1fr) minmax(148px, 0.94fr);
}

body.content-page .content-mode-lead-hooks .lead-hook-generate-actions > .btn,
body.content-page .content-mode-lead-hooks .lead-hook-generate-actions .ai-model-choice,
body.content-page .content-mode-lead-hooks .lead-hook-generate-actions .aha-choice-trigger {
  min-height: 42px;
  height: 42px;
}

body.content-page .content-mode-lead-hooks .lead-hook-clear-btn {
  width: 42px;
  padding: 0;
}

body.content-page .lead-hook-output-note {
  color: var(--text-muted);
  font-size: var(--text-label);
  white-space: nowrap;
}

body.content-page .lead-hook-candidate .headline-candidate-head {
  justify-content: space-between;
  min-width: 0;
}

body.content-page .lead-hook-candidate-heading,
body.content-page .lead-hook-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

body.content-page .lead-hook-candidate-heading {
  gap: 8px;
}

body.content-page .lead-hook-actions {
  flex: 0 0 auto;
  gap: 2px;
}

body.content-page .lead-hook-actions .icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

body.content-page .lead-hook-candidate,
body.content-page .lead-hook-candidate * {
  min-width: 0;
}

body.content-page .lead-hook-candidate .headline-top-flag {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  body.content-page .content-mode-lead-hooks .lead-hook-generate-actions {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body.content-page .content-mode-lead-hooks .lead-hook-generate-actions .content-generate-btn {
    grid-column: 1 / -1;
  }

  body.content-page .lead-hook-output-note {
    display: none;
  }
}

body.content-page .headline-candidate-example {
  padding: 6px 8px;
  border-left: 2px solid var(--border-soft, #d8d4c8);
  background: rgba(15, 14, 12, 0.02);
  border-radius: 0 6px 6px 0;
}

body.content-page .headline-forward-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft, #d8d4c8);
  border-radius: 10px;
  background: var(--surface-1, #fbfaf6);
}

body.content-page .headline-forward-text {
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.6;
  word-break: break-word;
}

body.content-page .headline-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

body.content-page .headline-tag-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft, #d8d4c8);
  background: transparent;
  color: var(--text-main);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 120ms ease;
}

body.content-page .headline-tag-chip:hover {
  background: var(--ghost-hover-bg, rgba(15, 14, 12, 0.05));
}

body.content-page .headline-tag-copy-all {
  margin-left: 4px;
}

body.content-page .headline-meta-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.content-page .headline-meta-block ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

body.content-page .headline-warn-block h5 {
  color: #b85a3a;
}

/* HAZ-180 多宽度：1280/1366/1440 走双栏；390 折行单栏并收紧 padding。 */
@media (max-width: 1100px) {
  body.content-page .haz180-headline-workflow .headline-io-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.content-page .headline-aux-grid,
  body.content-page .headline-meta-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body.content-page .headline-top-item {
    grid-template-columns: 28px 1fr;
  }
  body.content-page .headline-top-item > .btn-ghost-icon {
    grid-column: 2;
    justify-self: end;
  }
  body.content-page .headline-aux-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 深色：把容器底色、 chip 描边切到既有暗色 token，不引入新颜色。 */
html[data-theme="dark"] body.content-page .headline-source-chip {
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .headline-source-chip.is-active {
  background: rgba(217, 119, 87, 0.16);
  color: var(--primary-accent);
}

html[data-theme="dark"] body.content-page .headline-candidate,
html[data-theme="dark"] body.content-page .headline-forward-card {
  background: #21201e;
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .headline-candidate-example {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: #44423c;
}

html[data-theme="dark"] body.content-page .headline-meta-chip {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] body.content-page .headline-meta-chip-muted {
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .headline-tag-chip {
  border-color: #44423c;
}

/* HAZ-212 一鱼多吃：多形态生成模式。复用 content-lite 外壳，专用 multi-* 类不污染其他栏。 */
body.content-page .haz212-multi-workflow .content-body-row {
  grid-template-columns: minmax(0, 1fr) clamp(220px, 20vw, 252px);
  gap: 14px;
  align-items: stretch;
}

body.content-page .haz212-multi-workflow .content-body-row.context-panel-parent-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
  gap: 0;
}

body.content-page .haz212-multi-workflow .content-context-panel {
  min-height: 0;
  height: 100%;
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-card) 88%, var(--color-bg));
}

body.content-page .haz212-multi-workflow .content-context-panel[data-panel-collapsed="true"] {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
}

body.content-page .haz212-multi-workflow .context-panel-bar {
  min-height: 30px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

body.content-page .haz212-multi-workflow .content-context-section {
  padding: 9px 0;
}

body.content-page .haz212-multi-workflow .content-context-section h4 {
  margin-bottom: 6px;
}

body.content-page .haz212-multi-workflow .content-context-section p {
  line-height: 1.55;
}

body.content-page .haz212-multi-workflow .multi-io-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

body.content-page .multi-source-textarea {
  min-height: 140px;
}

body.content-page .haz212-multi-workflow .content-generate-actions {
  grid-template-columns: minmax(104px, 0.72fr) minmax(160px, 1fr) minmax(166px, 1.08fr);
  gap: 8px;
}

body.content-page .haz212-multi-workflow .content-generate-actions .btn {
  padding-inline: 10px;
}

body.content-page .multi-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

body.content-page .multi-format-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft, #d8d4c8);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  user-select: none;
}

body.content-page .multi-format-chip:hover {
  background: var(--ghost-hover-bg, rgba(15, 14, 12, 0.05));
  color: var(--text-main);
}

body.content-page .multi-format-chip.is-active {
  background: rgba(201, 100, 66, 0.1);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  font-weight: 500;
}

/* 输出区 */
body.content-page .multi-output-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

body.content-page .multi-output-empty,
body.content-page .multi-output-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 10px;
  color: var(--text-muted);
}

body.content-page .multi-output-hint {
  font-size: 12px;
  opacity: 0.7;
  margin: 0;
}

body.content-page .multi-output-slow-note {
  max-width: 320px;
}

body.content-page .multi-loading-indicator {
  font-size: 28px;
  color: var(--primary-accent);
  animation: spin 1s linear infinite;
}

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

body.content-page .multi-output-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

body.content-page .multi-output-warning {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 100, 66, 0.24);
  border-radius: 8px;
  background: rgba(201, 100, 66, 0.08);
  color: var(--text-secondary, #57544c);
  font-size: 13px;
  line-height: 1.5;
}

body.content-page .multi-format-card {
  border: 1px solid var(--border-soft, #d8d4c8);
  border-radius: 8px;
  overflow: hidden;
}

body.content-page .multi-format-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-subtle, rgba(15, 14, 12, 0.03));
  border-bottom: 1px solid var(--border-soft, #d8d4c8);
  gap: 8px;
}

body.content-page .multi-format-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #57544c);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.content-page .multi-format-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

body.content-page .multi-format-card-actions .btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  height: 28px;
}

body.content-page .multi-format-card-status {
  font-size: 12px;
  color: var(--danger-text, #a4492f);
}

body.content-page .multi-format-card-body {
  padding: 14px;
}

body.content-page .multi-format-output-text {
  display: block;
  width: 100%;
  min-height: 132px;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
}

body.content-page .multi-format-error-card {
  border-color: rgba(201, 100, 66, 0.34);
  background: rgba(201, 100, 66, 0.04);
}

body.content-page .multi-format-error-text {
  margin: 0;
  color: var(--danger-text, #a4492f);
  font-size: 13px;
  line-height: 1.6;
}

/* 窄屏：单栏堆叠 */
@media (max-width: 1100px) {
  body.content-page .haz212-multi-workflow .content-body-row,
  body.content-page .haz212-multi-workflow .content-body-row.context-panel-parent-collapsed {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.content-page .haz212-multi-workflow .multi-io-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body.content-page .multi-format-card-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  body.content-page .multi-format-card-label,
  body.content-page .multi-format-card-status {
    white-space: nowrap;
  }

  body.content-page .multi-format-card-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* 深色 */
html[data-theme="dark"] body.content-page .multi-format-chip {
  border-color: #44423c;
  color: #a09d96;
}

html[data-theme="dark"] body.content-page .multi-format-chip.is-active {
  background: rgba(201, 100, 66, 0.15);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

html[data-theme="dark"] body.content-page .multi-format-card {
  border-color: #44423c;
}

html[data-theme="dark"] body.content-page .multi-format-card-head {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: #44423c;
}

html[data-theme="dark"] body.content-page .multi-format-output-text {
  color: #e8e6dc;
}
