/* ============================================================
   宠侠英雄传 · 创建英雄页面
   移动端优先 · 水墨江湖设计系统
   ============================================================ */

.create-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

/* ── 顶栏 ── */
.create-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
}

.create-topbar__back {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink-nong);
  cursor: pointer;
  padding: 4px 8px;
  min-width: 36px;
}

.create-topbar__title {
  font-family: var(--font-brush);
  font-size: 18px;
  color: var(--ink-jiao);
  letter-spacing: 4px;
}

.create-topbar__spacer {
  min-width: 36px;
}

/* ── 步骤指示器 ── */
.create-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}

.create-progress__dot {
  width: 6px;
  height: 6px;
  background: var(--ink-qing);
  border-radius: 1px;
  transition: all 0.3s var(--ease-out);
}

.create-progress__dot.active { background: var(--seal); width: 18px; }
.create-progress__dot.done { background: var(--ink-zhong); }

/* ── 步骤主体 ── */
.create-step {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 16px 20px 100px;
  animation: stepIn 0.35s var(--ease-out);
}

.create-step.active { display: flex; }

.step-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── 问题标题 ── */
.create-question {
  font-family: var(--font-brush);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink-jiao);
  letter-spacing: 4px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.create-hint {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-dan);
  margin-bottom: 32px;
  line-height: 1.6;
}

.create-hint--compact { margin-bottom: 16px; }
.create-first-fields { width: 100%; max-width: 460px; margin: 8px auto 0; }

/* ── 输入框 ── */
.create-input {
  width: 100%;
  padding: 16px;
  border: none;
  border-bottom: 2px solid var(--ink-qing);
  background: transparent;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-nong);
  outline: none;
  transition: border-color 0.2s;
}

.create-input:focus { border-bottom-color: var(--seal); }
.create-input::placeholder { color: var(--ink-qing); }

.create-input--large {
  font-size: 24px;
  text-align: center;
  padding: 20px 16px;
}

.create-textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--ink-qing);
  background: var(--paper-light);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-nong);
  outline: none;
  resize: none;
  min-height: 120px;
  transition: border-color 0.2s;
}

.create-textarea:focus { border-color: var(--seal); }
.create-textarea::placeholder { color: var(--ink-qing); }

.create-char-count {
  text-align: right;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-qing);
  margin-top: 4px;
}

.anecdote-input-wrap {
  position: relative;
}

.anecdote-input-wrap .create-textarea {
  padding-right: 40px;
}

.anecdote-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--paper-dark);
  color: var(--ink-dan);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
  z-index: 1;
}

.anecdote-clear.show { display: flex; }

.anecdote-clear:active {
  opacity: 0.6;
}

.anecdote-question {
  margin: 24px 0 6px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-nong);
}

.anecdote-subhint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-qing);
}

/* ── 轶事示例 ── */
.anecdote-examples { margin-top: 16px; }

.anecdote-examples__title {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  margin-bottom: 4px;
}

.anecdote-examples__note {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-qing);
  margin-bottom: 10px;
  line-height: 1.5;
}

.anecdote-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anecdote-chip {
  padding: 8px 14px;
  border: 1px solid var(--ink-qing);
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-zhong);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  border-radius: 2px;
}

.anecdote-chip:active {
  background: var(--ink-jiao);
  color: var(--paper);
  border-color: var(--ink-jiao);
}

/* ── 物种选择 ── */
.species-options { display: flex; gap: 12px; margin-bottom: 16px; }

.species-card {
  flex: 1;
  padding: 28px 16px;
  border: 2px solid var(--ink-qing);
  background: var(--paper-light);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.species-card:active { transform: scale(0.97); }
.species-card.selected {
  border-color: var(--ink-jiao);
  background: var(--ink-jiao);
  color: var(--paper);
}

.species-card__icon { font-size: 36px; margin-bottom: 8px; line-height: 1; }
.species-card__label {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
}

.species-note-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
}

.btn-text {
  background: none;
  border: 1px solid var(--ink-qing);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-zhong);
  cursor: pointer;
  padding: 2px 10px;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}

.btn-text:active {
  background: var(--seal);
  color: var(--paper);
  border-color: var(--seal);
}

/* ── 岁数滑块 ── */
.age-slider-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 40px;
}

.age-display {
  font-family: var(--font-brush);
  font-size: 72px;
  color: var(--ink-jiao);
  line-height: 1;
}

.age-unit {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-dan);
}

.age-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ink-qing);
  outline: none;
  border-radius: 2px;
  margin-bottom: 12px;
}

.age-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: var(--seal);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--paper);
  box-shadow: 0 1px 6px rgba(158,43,37,0.3);
}

.age-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: var(--seal);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--paper);
  box-shadow: 0 1px 6px rgba(158,43,37,0.3);
}

.age-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-qing);
  padding: 0 4px;
}

/* ── 性格标签（多行居中网格）── */
.tag-scroller-wrapper {
  position: relative;
  margin: 0 -20px 8px;
  overflow: hidden;
  max-height: 360px;
}

.tag-scroller-wrapper::before,
.tag-scroller-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}

.tag-scroller-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--paper), transparent);
}

.tag-scroller-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--paper), transparent);
}

.tag-scroller-wrapper--multi {
  max-height: 360px;
}

.tag-scroller {
  display: flex;
  gap: 10px;
  padding: 8px 20px;
  scrollbar-width: none;
}

.tag-scroller--multi {
  flex-wrap: wrap;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 360px;
  -webkit-overflow-scrolling: touch;
}

.tag-scroller--multi::-webkit-scrollbar { display: none; }

.tag-scroller.dragging { cursor: grabbing; }
.tag-scroller::-webkit-scrollbar { display: none; }

.tag-chip {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid var(--ink-qing);
  background: var(--paper-light);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-zhong);
  letter-spacing: 2px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.tag-chip:active { transform: scale(0.95); }
.tag-chip.selected {
  background: var(--seal);
  color: var(--paper);
  border-color: var(--seal);
}

.tag-count {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  margin-top: 16px;
}

/* ── 轶事示例 ── */
.anecdote-examples { margin-top: 20px; }

.anecdote-examples__title {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  margin-bottom: 10px;
}

.anecdote-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anecdote-chip {
  padding: 8px 14px;
  border: 1px solid var(--ink-qing);
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-zhong);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  border-radius: 2px;
}

.anecdote-chip:active {
  background: var(--ink-jiao);
  color: var(--paper);
  border-color: var(--ink-jiao);
}

/* ── 底部操作栏 ── */
.create-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--paper-dark);
  z-index: 100;
}

.create-nav .btn {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 4px;
}

/* ── 照片上传 ── */
.upload-zone {
  border: 2px dashed var(--ink-qing);
  background: var(--paper-light);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-zone:active { border-color: var(--seal); }
.upload-zone.has-image { border-style: solid; border-color: var(--ink-jiao); padding: 0; }
.upload-zone--first { margin-top: 24px; }

.upload-preview {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.upload-icon { font-size: 40px; margin-bottom: 8px; }

.upload-text {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-dan);
  letter-spacing: 2px;
}

.upload-subtext {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-qing);
  margin-top: 8px;
  line-height: 1.6;
}

.species-check {
  margin-top: 16px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  display: none;
}

.species-check.show { display: block; }
.species-check.ok { background: rgba(29,158,117,0.08); color: #0f6e56; border-left: 3px solid #0f6e56; }
.species-check.fail { background: rgba(158,43,37,0.08); color: var(--seal); border-left: 3px solid var(--seal); }

.species-check__ok {
  display: block;
  font-weight: 600;
}

.species-check__desc {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-dan);
  font-weight: 400;
}

.create-retry { display: none; margin: 12px auto 0; }
.create-retry.show { display: block; }

/* 照片模型的轻量预览，与正式英雄卡明确区分 */
.impression-stage { max-width: 430px; width: 100%; margin: 0 auto; }
.first-impression {
  overflow: hidden;
  background: var(--paper-light);
  border: 1px solid var(--ink-qing);
  box-shadow: 0 10px 32px rgba(26, 22, 18, 0.08);
  text-align: center;
}
.first-impression__photo { width: 100%; height: 220px; object-fit: cover; display: block; }
.first-impression__pet { margin-top: 20px; font-family: var(--font-serif); font-size: 14px; color: var(--ink-dan); }
.first-impression__label { margin-top: 14px; font-family: var(--font-sans); font-size: 11px; letter-spacing: 4px; color: var(--seal); }
.first-impression__archetype { margin-top: 8px; font-family: var(--font-brush); font-size: 28px; letter-spacing: 3px; color: var(--ink-jiao); }
.first-impression__comment { padding: 12px 24px 26px; font-family: var(--font-serif); font-size: 16px; line-height: 1.8; color: var(--ink-nong); }
.impression-note { margin: 18px 0 0; text-align: center; font-family: var(--font-serif); font-size: 13px; color: var(--ink-dan); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-jiao);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
  z-index: 300;
  text-align: center;
  letter-spacing: 2px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 重新生成弹窗 ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 22, 18, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--paper-light);
  border: 2px solid var(--ink-jiao);
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
}

.modal-title {
  font-family: var(--font-brush);
  font-size: 24px;
  color: var(--ink-jiao);
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 8px;
}

.modal-warn {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--seal);
  margin-bottom: 12px;
}

.modal-back-link {
  display: block;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 12px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.modal-back-link:active { color: var(--seal); }

.modal-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

.modal-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ink-qing);
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-nong);
  outline: none;
  resize: none;
  min-height: 80px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-textarea:focus { border-color: var(--seal); }

.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  flex: 1;
  font-size: 13px;
  padding: 10px 8px;
  min-width: 0;
  letter-spacing: 2px;
}

/* ── 英雄卡结果 ── */
.hero-card-result {
  border: 2px solid var(--ink-jiao);
  background: var(--paper-light);
  padding: 24px 20px;
}

.hero-card-result__name {
  font-family: var(--font-brush);
  font-size: 36px;
  color: var(--ink-jiao);
  text-align: center;
  letter-spacing: 6px;
  margin-bottom: 4px;
}

.hero-card-result__species {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-dan);
  margin-bottom: 20px;
}

/* 六维竖条：数值在柱子上面，标签在下面，防遮挡 */
.attrs-vertical {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 0 4px;
  gap: 4px;
}

.attr-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.attr-pillar__val {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-nong);
  margin-bottom: 4px;
  line-height: 1;
}

.attr-pillar__bar {
  width: 100%;
  max-width: 28px;
  min-height: 4px;
  background: var(--ink-zhong);
  border-radius: 1px 1px 0 0;
  transition: height 0.5s var(--ease-out);
}

.attr-pillar__bar.max { background: var(--seal); }

.attr-pillar__label {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--ink-dan);
  letter-spacing: 1px;
  margin-top: 4px;
  line-height: 1;
  white-space: nowrap;
}

.hero-card-result__skill {
  text-align: center;
  margin-bottom: 16px;
  padding: 14px 10px;
  background: var(--paper-warm);
}

.hero-card-result__skill-label {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--seal);
  margin-bottom: 6px;
}

.hero-card-result__skill-tag {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--paper);
  background: var(--ink-zhong);
  border-radius: 8px;
  margin-bottom: 8px;
}

.hero-card-result__skill-quote {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-dan);
  line-height: 1.7;
  font-style: italic;
  margin-top: 4px;
}

.hero-card-result__bio {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-nong);
  padding: 12px;
  background: var(--paper-warm);
  border-left: 3px solid var(--seal);
  text-align: justify;
}

.hero-card-result__notice {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--seal);
  margin-top: 12px;
  padding: 8px;
}

/* ── 加载/评书/完成 ── */
/* loadingContent / completeContent 容器撑满，让内部 loading-section 垂直居中 */
#loadingContent,
#completeContent {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.loading-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.loading-seal {
  min-width: 90px;
  height: 72px;
  padding: 0 16px;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xs);
  transform: rotate(-3deg);
  opacity: 0.92;
  box-shadow: 0 2px 8px rgba(158,43,37,0.3);
  animation: pulse 1.5s ease-in-out infinite;
  letter-spacing: 2px;
  white-space: nowrap;
}

@keyframes pulse {
  0%, 100% { opacity: 0.92; transform: rotate(-3deg) scale(1); }
  50% { opacity: 1; transform: rotate(-3deg) scale(1.05); }
}

/* 评书小标题 */
.comment-wrap {
  text-align: center;
  max-width: 320px;
}

.comment-title {
  font-family: var(--font-brush);
  font-size: 16px;
  color: var(--ink-dan);
  letter-spacing: 4px;
  margin-bottom: 4px;
  opacity: 0.6;
}

.comment-display {
  min-height: 40px;
  padding: 8px 16px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-zhong);
  line-height: 1.7;
  letter-spacing: 1px;
  animation: commentIn 0.4s var(--ease-out);
}

@keyframes commentIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.loading-status {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-qing);
  letter-spacing: 2px;
}

/* 流式生成 · 三阶段体验 */
.gen-stage {
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 阶段 1：推理碎片（可阅读，低存在感，不自动滚动） */
.gen-reasoning {
  height: 200px;
  overflow-y: auto;
  padding: 12px 16px;
  background: var(--paper-warm);
  border-left: 3px solid var(--ink-qing);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-dan);
  letter-spacing: 0.5px;
  scrollbar-width: none;
  animation: fadeIn 0.4s var(--ease-out);
  position: relative;
  opacity: 0.6;
  transition: opacity 0.6s ease;
}

.gen-reasoning::before {
  content: '命格推演';
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-qing);
  margin-bottom: 6px;
  letter-spacing: 2px;
  opacity: 0.7;
}

.gen-reasoning::-webkit-scrollbar { display: none; }

.gen-reasoning.fade-out {
  opacity: 0.15;
  height: 40px;
  overflow: hidden;
}

/* 阶段 2：逐项揭晓 */
.gen-reveal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reveal-name {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--seal);
  text-align: center;
  letter-spacing: 6px;
  line-height: 1.4;
  animation: revealIn 0.5s var(--ease-out);
}

.reveal-skill {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-nong);
  text-align: center;
  letter-spacing: 3px;
  animation: revealIn 0.5s var(--ease-out);
}

.reveal-bio {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-dan);
  text-align: justify;
  padding: 12px;
  background: var(--paper-warm);
  border-left: 3px solid var(--seal);
  animation: revealIn 0.5s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.loading-error {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--seal);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── 返回修改后选择 ── */
.regen-choice {
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.regen-choice__title {
  font-family: var(--font-brush);
  font-size: 28px;
  color: var(--ink-jiao);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.regen-choice__desc {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-dan);
  margin-bottom: 24px;
}

.regen-choice__hint {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-qing);
  margin-top: 12px;
}

.regen-choice__warn {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--seal);
  margin-top: 12px;
}

.complete-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* 插画展示 */
.complete-illust {
  position: relative;
  width: 100%;
  max-width: 260px;
  border: 2px solid var(--ink-jiao);
  background: var(--paper-warm);
  margin-bottom: 4px;
}

.complete-illust::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--ink-jiao);
  pointer-events: none;
  z-index: 1;
}

.complete-illust__img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 0;
}

/* 错误详情 */
.complete-error-detail {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-qing);
  text-align: center;
  max-width: 280px;
  word-break: break-all;
  line-height: 1.5;
}

/* 操作按钮组 */
.complete-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
  max-width: 280px;
}

.complete-actions .btn {
  flex: 1;
  padding: 12px 8px;
  font-size: 14px;
  letter-spacing: 3px;
  min-width: 0;
}

.complete-title {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--ink-jiao);
  letter-spacing: 6px;
  text-align: center;
}

.complete-desc {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-dan);
  text-align: center;
  line-height: 1.6;
}

.complete-notice {
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--paper-warm);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-zhong);
  text-align: center;
  line-height: 1.6;
}

/* ── 移动端适配 ── */
@media (max-width: 380px) {
  .create-question { font-size: 28px; }
  .create-input { font-size: 18px; }
  .create-input--large { font-size: 22px; }
  .age-display { font-size: 60px; }
  .tag-chip { padding: 8px 16px; font-size: 15px; }
  .attr-pillar__label { font-size: 10px; }
}

/* ── 桌面端居中限宽 ── */
@media (min-width: 481px) {
  .create-app {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.06);
    min-height: 100vh;
  }
  .create-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
  .modal-overlay {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ============================================================
   插画生成三阶段进度
   ============================================================ */
.illust-stages {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 24px 0 8px;
  width: 100%;
  max-width: 320px;
}

.illust-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.illust-stage::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink-dan);
  opacity: 0.15;
  z-index: 0;
}

.illust-stage:first-child::before {
  left: 50%;
}

.illust-stage:last-child::before {
  width: 50%;
}

.illust-stage__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ink-dan);
  background: var(--paper);
  opacity: 0.35;
  z-index: 1;
  transition: all 0.3s var(--ease-out);
}

.illust-stage__label {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-dan);
  opacity: 0.45;
  letter-spacing: 2px;
  transition: all 0.3s var(--ease-out);
}

.illust-stage.done .illust-stage__dot {
  background: var(--ink-jiao);
  border-color: var(--ink-jiao);
  opacity: 0.5;
}

.illust-stage.done::before {
  background: var(--ink-jiao);
  opacity: 0.4;
}

.illust-stage.active .illust-stage__dot {
  background: var(--seal);
  border-color: var(--seal);
  opacity: 1;
  animation: illustPulse 1.5s ease-in-out infinite;
}

.illust-stage.active .illust-stage__label {
  opacity: 1;
  color: var(--seal);
  font-weight: 600;
}

@keyframes illustPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(158, 43, 37, 0.3); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(158, 43, 37, 0); }
}

/* 侠骨速写（角色描述展示） */
.illust-design {
  width: 100%;
  max-width: 340px;
  margin: 16px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--seal);
  background: var(--paper-warm);
  animation: designFadeIn 0.6s var(--ease-out);
}

.illust-design__title {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--seal);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.illust-design__text {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-jiao);
  text-align: justify;
}

/* 打字机光标 */
.illust-design__text.typing::after {
  content: '▌';
  color: var(--seal);
  animation: typewriterCursor 0.8s steps(1) infinite;
  margin-left: 1px;
}

@keyframes typewriterCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes designFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 离开警告 */
.illust-warn {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--seal);
  opacity: 0.7;
  letter-spacing: 1px;
  animation: warnBlink 3s ease-in-out infinite;
}

@keyframes warnBlink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}

/* 图片放大浮层（复用详情页样式） */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-md);
  animation: fadeIn 0.2s ease;
}

.image-zoom-overlay__img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
}

.image-zoom-overlay__save {
  background: var(--seal);
  color: var(--paper);
  border: none;
  padding: 10px 32px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: var(--r-sm);
}

.image-zoom-overlay__close {
  position: absolute;
  top: var(--s-md);
  right: var(--s-md);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
