/* ═══════════════════════════════════════════════════════════
   笔灵工坊 · 墨星云 (Ink Nebula) 主题
   概念：东方书法气韵 × 深空科技美学
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── 深空底色 ── */
  --bg: #0A0B12;
  --bg-deep: #06070C;
  --surface: rgba(16, 18, 30, 0.75);
  --surface-hover: rgba(22, 25, 42, 0.85);
  --glass: rgba(255, 255, 255, 0.03);

  /* ── 墨色霓虹 ── */
  --ink: #E0F4FF;
  --paper: #0E1018;
  --reader-ink: #C8D6E5;
  --muted: #5E6E82;
  --dim: #2A3444;
  --line: rgba(0, 229, 204, 0.1);
  --line-hover: rgba(0, 229, 204, 0.25);
  --accent: #00E5CC;
  --accent-dark: #007A6A;
  --blue: #8B5CF6;
  --warm: #FFB800;
  --magenta: #FF2D78;
  --soft: rgba(0, 229, 204, 0.08);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(0, 229, 204, 0.15), 0 0 40px rgba(0, 229, 204, 0.1);

  /* ── 字体系统 ── */
  --ui-font: "PingFang SC", "Source Han Sans SC", -apple-system, "Microsoft YaHei", sans-serif;
  --display-font: "Noto Serif SC", "LXGW WenKai", "STSong", "Songti SC", Georgia, serif;
  --reader-font: "Noto Serif SC", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --mono-font: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700;900&display=swap');

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(0, 229, 204, 0.2);
  color: #E0F4FF;
}

/* ── 背景系统 ── */

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--ui-font);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse 900px 700px at 15% 25%, rgba(0, 229, 204, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 600px 900px at 85% 70%, rgba(255, 45, 120, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 50% 50%, rgba(139, 92, 246, 0.025) 0%, transparent 70%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(42, 52, 68, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 52, 68, 0.12) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
}

/* ── GSAP will-change 优化 ── */

.simple-hero,
.hero-copy,
.model-strip,
.mode-switch,
.mode-panel,
.goal-picker,
.direction-box,
.one-click,
.status-strip,
.privacy-reassurance,
.story-compass > div,
.reader-section {
  will-change: transform, opacity;
}

body.is-writing .simple-hero {
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 229, 204, 0.25), 0 0 60px rgba(0, 229, 204, 0.15);
}

/* ── 基础元素 ── */

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(0, 229, 204, 0.5);
  outline-offset: 2px;
}

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

/* ── 主容器 ── */

.simple-shell {
  width: min(960px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

/* ── 面板通用样式 ── */

.simple-hero,
.reader-section,
.chapter-editor,
.advanced-details,
.next-actions {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.2);
}

/* ── Hero 区域 ── */

.simple-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  box-shadow: var(--shadow), var(--glow);
}

.simple-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(110deg, rgba(0, 229, 204, 0.08), transparent 30%),
    linear-gradient(280deg, rgba(139, 92, 246, 0.06), transparent 34%);
}

.simple-hero > * {
  position: relative;
}

/* ── 顶部导航栏 ── */

.simple-topbar,
.simple-actions,
.choice-row,
.status-strip,
.reader-title,
.editor-actions,
.stage-tabs {
  display: flex;
  align-items: center;
}

.simple-topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.simple-topbar strong {
  font-family: var(--display-font);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.simple-actions {
  gap: 8px;
}

.text-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.text-button:hover {
  color: var(--ink);
  border-color: var(--line-hover);
  background: rgba(0, 229, 204, 0.06);
}

/* ── Hero 文案 ── */

.hero-copy {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

h1 {
  margin-bottom: 14px;
  font-family: var(--display-font);
  font-size: clamp(34px, 6.5vw, 58px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(0, 229, 204, 0.15), 0 0 80px rgba(0, 229, 204, 0.06);
}

h1 span {
  display: block;
}

.hero-copy p:last-child {
  max-width: 620px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

/* ── 模型能力条 ── */

.model-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  width: min(620px, 100%);
  margin: 0 auto 28px;
  padding: 14px;
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 12px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(0, 229, 204, 0.06), rgba(139, 92, 246, 0.04)),
    rgba(6, 7, 12, 0.8);
  box-shadow: inset 0 0 22px rgba(0, 229, 204, 0.04), 0 0 30px rgba(0, 229, 204, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.model-strip span {
  grid-column: 1 / -1;
  color: var(--ink);
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.model-strip span:first-child {
  color: var(--accent);
  font-size: 13px;
}

.model-strip span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.model-strip strong {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--bg-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 900;
}

.model-strip strong:nth-of-type(1) {
  background: linear-gradient(135deg, #00E5CC 0%, #00B4D8 52%, #48CAE4 100%);
  box-shadow: 0 12px 30px rgba(0, 229, 204, 0.25), 0 0 20px rgba(0, 229, 204, 0.15);
}

.model-strip strong:nth-of-type(2) {
  color: #ffffff;
  background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 52%, #C4B5FD 100%);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.25), 0 0 20px rgba(139, 92, 246, 0.15);
  text-shadow: 0 1px 6px rgba(30, 0, 60, 0.3);
}

.model-strip strong:nth-of-type(3) {
  background: linear-gradient(135deg, #FFB800 0%, #FF8C00 48%, #FFC947 100%);
  box-shadow: 0 12px 30px rgba(255, 184, 0, 0.25), 0 0 20px rgba(255, 184, 0, 0.15);
}

/* ── 输入区域通用 ── */

.idea-box,
.direction-box,
.upload-box {
  display: block;
}

.idea-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.idea-box span,
.idea-title,
.direction-box span,
.upload-box span,
.choice-row span,
.field-label,
.input-block span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.idea-box > span,
.direction-box span,
.upload-box span,
.choice-row span,
.field-label,
.input-block span {
  margin-bottom: 8px;
}

/* ── 随机想法按钮 ── */

.random-idea-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 10px;
  color: var(--accent);
  background: rgba(0, 229, 204, 0.06);
  font-family: var(--mono-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 12px rgba(0, 229, 204, 0.03);
  transition: all 0.3s ease;
}

.random-idea-button:hover {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-color: var(--accent);
}

/* ── 模式切换 ── */

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 auto 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 7, 12, 0.8);
  box-shadow: inset 0 0 20px rgba(0, 229, 204, 0.03);
}

.mode-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-button.active {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), rgba(0, 229, 204, 0.75) 60%, var(--blue) 120%);
  box-shadow: 0 8px 28px rgba(0, 229, 204, 0.2);
}

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

/* ── 上传区域 ── */

.upload-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px dashed rgba(0, 229, 204, 0.2);
  border-radius: 12px;
  background: rgba(0, 229, 204, 0.03);
  cursor: pointer;
  transition: border-color 250ms ease, background 250ms ease, transform 250ms ease;
}

.upload-box:hover {
  border-color: rgba(0, 229, 204, 0.45);
  background: rgba(0, 229, 204, 0.06);
  transform: translateY(-2px);
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin-bottom: 0;
  place-items: center;
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 10px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 8px 24px rgba(0, 229, 204, 0.15);
  font-size: 22px;
  font-weight: 900;
}

.upload-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 0;
  font-weight: inherit;
}

.upload-copy strong {
  color: var(--ink);
  font-size: 16px;
}

.upload-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.source-stats {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: 10px;
  color: var(--warm);
  background: rgba(255, 184, 0, 0.06);
  font-family: var(--mono-font);
  font-size: 13px;
  font-weight: 600;
}

.direction-box {
  margin: 10px 0 14px;
}

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

/* ── 输入控件通用 ── */

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(6, 7, 12, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--line-hover);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 204, 0.08), 0 0 20px rgba(0, 229, 204, 0.06);
}

textarea {
  min-height: 120px;
  padding: 16px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.7;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

/* ── 偏好选择行 ── */

.choice-row {
  gap: 12px;
  margin: 14px 0;
}

.choice-row label {
  flex: 1;
}

.goal-picker {
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 7, 12, 0.6);
}

.goal-picker summary {
  min-height: 44px;
  padding: 12px 16px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.goal-picker summary span {
  color: var(--ink);
  font-family: var(--mono-font);
  font-size: 13px;
}

.goal-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 12px;
  padding: 0 16px 16px;
}

/* ── 主按钮 ── */

.one-click {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 12px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), rgba(0, 229, 204, 0.8) 55%, var(--blue) 120%);
  box-shadow: 0 16px 48px rgba(0, 229, 204, 0.22), 0 0 30px rgba(0, 229, 204, 0.1);
  font-family: var(--display-font);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 250ms ease, filter 250ms ease, box-shadow 250ms ease;
}

.one-click.small {
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
}

.one-click:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 20px 56px rgba(0, 229, 204, 0.3), 0 0 40px rgba(0, 229, 204, 0.15);
}

.one-click:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* ── 状态条 ── */

.status-strip {
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 13px;
}

.status-strip span {
  flex: 1;
}

.status-strip strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ── 隐私安全提示 ── */

.privacy-reassurance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 229, 204, 0.1);
  border-radius: 10px;
  background: rgba(6, 7, 12, 0.5);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.privacy-reassurance span:first-child {
  color: var(--accent);
  font-weight: 700;
}

.privacy-dot {
  color: rgba(0, 229, 204, 0.25);
}

.privacy-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* ── 进度条 ── */

.progress-track {
  width: 130px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 204, 0.1);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--magenta));
  box-shadow: 0 0 16px rgba(0, 229, 204, 0.45);
  transition: width 280ms ease;
}

/* ── 故事指南针 ── */

.story-compass {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  margin-top: 16px;
}

.story-compass > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 7, 12, 0.7);
  box-shadow: inset 0 0 16px rgba(0, 229, 204, 0.03);
  transition: border-color 0.3s ease;
}

.story-compass > div:hover {
  border-color: var(--line-hover);
}

.story-compass span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-compass strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 700;
}

.story-memory p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #8898AA;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.55;
}

/* ── 下一步操作 ── */

.next-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 22px;
  box-shadow: var(--shadow), var(--glow);
}

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

.next-actions h2 {
  margin-bottom: 8px;
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 700;
}

.next-actions p:last-child {
  margin: 0;
  color: var(--muted);
}

.next-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 330px;
}

/* ── 小说阅读器 ── */

.reader-section {
  margin-top: 20px;
  padding: 22px;
  color: var(--reader-ink);
  border-color: rgba(0, 229, 204, 0.12);
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.chapter-editor {
  margin-top: 20px;
  padding: 20px;
}

.chapter-editor[hidden] {
  display: none;
}

.reader-title {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.reader-title h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
}

.reader-title span {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 13px;
}

.novel-reader {
  min-height: 220px;
  max-height: 560px;
  overflow: auto;
  padding: 8px 2px;
  font-family: var(--reader-font);
  font-size: 17px;
  line-height: 2;
}

.novel-reader h4 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.chapter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 10px;
}

.novel-reader article:first-child .chapter-head {
  margin-top: 0;
}

.novel-reader p {
  margin-bottom: 14px;
  color: var(--reader-ink);
}

/* ── 高级面板 ── */

.advanced-details {
  margin-top: 20px;
  padding: 0;
}

.advanced-details summary {
  min-height: 52px;
  padding: 15px 20px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 14px;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.tree,
.queue-list,
.memory-card,
.library-list {
  display: grid;
  gap: 8px;
}

.tree-item,
.chapter-item,
.queue-item,
.memory-card,
.library-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 7, 12, 0.7);
  font-size: 13px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.tree-item,
.chapter-item,
.queue-item,
.library-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.chapter-item {
  width: calc(100% - 10px);
  margin-left: 10px;
  text-align: left;
  color: var(--muted);
}

.chapter-item.active,
.chapter-item:hover,
.library-item.active {
  border-color: var(--accent);
  background: rgba(0, 229, 204, 0.06);
}

.chapter-item.failed {
  color: #FFB3C1;
  border-color: rgba(255, 45, 120, 0.3);
  background: rgba(255, 45, 120, 0.06);
}

.library-panel {
  margin: 12px 0;
}

.panel-title,
.library-item button:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-title {
  margin-bottom: 8px;
}

.library-item button:first-child {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.library-item small,
.muted-note {
  color: var(--muted);
}

/* ── 阶段标签页 ── */

.stage-tabs {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-button,
.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(6, 7, 12, 0.8);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}

.tab-button.active,
.primary-button {
  color: var(--bg-deep);
  border-color: var(--accent-dark);
  background: linear-gradient(135deg, var(--accent), rgba(0, 229, 204, 0.8) 60%, var(--blue) 120%);
  font-weight: 700;
}

.secondary-button {
  color: var(--ink);
  background: rgba(0, 229, 204, 0.06);
}

.secondary-button:hover {
  border-color: var(--line-hover);
  background: rgba(0, 229, 204, 0.1);
}

.stage-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 7, 12, 0.8);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stage-header h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
}

.status-pill {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--bg-deep);
  background: var(--accent);
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.editor-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.queue-icon,
.live-dot,
.flow-map,
.hidden-control {
  display: none;
}

/* ── 记忆卡片 ── */

.memory-card {
  margin-top: 8px;
  line-height: 1.55;
}

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

.ops-card {
  border-color: rgba(0, 229, 204, 0.15);
  background: rgba(0, 229, 204, 0.04);
}

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

.strict-mode-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 229, 204, 0.05);
  cursor: pointer;
}

.strict-mode-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.strict-mode-toggle span {
  display: grid;
  gap: 3px;
}

.strict-mode-toggle strong {
  color: var(--ink);
  font-size: 13px;
}

.strict-mode-toggle small {
  color: var(--muted);
  line-height: 1.45;
}

.consistency-card {
  border-color: rgba(120, 133, 255, 0.22);
  background: rgba(120, 133, 255, 0.05);
}

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

.consistency-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 7, 12, 0.5);
}

.consistency-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 11px;
}

.consistency-grid strong,
.consistency-grid p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

/* ══════════════════════════════════════════════════════════
   响应式适配
   ══════════════════════════════════════════════════════════ */

@media (max-width: 760px) {
  .simple-shell {
    width: min(100vw - 20px, 880px);
    padding: 10px 0 28px;
  }

  .simple-hero,
  .reader-section,
  .advanced-details {
    border-radius: 12px;
  }

  .simple-hero {
    padding: 18px;
  }

  .simple-topbar {
    margin-bottom: 20px;
  }

  .simple-topbar,
  .choice-row,
  .mode-switch,
  .reader-title,
  .status-strip,
  .next-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-actions {
    justify-content: space-between;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-copy p:last-child {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
  }

  .model-strip {
    grid-template-columns: 1fr;
    margin-bottom: 18px;
  }

  .model-strip strong {
    min-height: 42px;
    font-size: 15px;
  }

  .idea-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .random-idea-button {
    width: 100%;
    border-radius: 10px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.15;
  }

  .progress-track {
    width: 100%;
  }

  .privacy-reassurance {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .privacy-dot {
    display: none;
  }

  .story-compass {
    grid-template-columns: 1fr;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    display: flex;
  }

  .mode-button {
    width: 100%;
    min-height: 42px;
  }

  textarea {
    min-height: 100px;
    padding: 12px;
    font-size: 15px;
    line-height: 1.6;
  }

  .direction-box textarea {
    min-height: 76px;
  }

  .one-click {
    min-height: 56px;
    font-size: 17px;
  }

  .next-buttons {
    min-width: 0;
    justify-content: stretch;
  }

  .next-buttons button {
    width: 100%;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   认证 & 模态框
   ══════════════════════════════════════════════════════════ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(6, 7, 12, 0.75);
  backdrop-filter: blur(12px);
}

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

.auth-modal {
  width: min(420px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(24px) saturate(1.2);
}

.auth-head {
  margin-bottom: 22px;
}

.auth-head h2 {
  margin: 0 0 8px;
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--primary);
  color: var(--bg);
}

.auth-form input {
  min-height: 48px;
  font-size: 15px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.auth-code-row button {
  min-height: 48px;
  white-space: nowrap;
}

.auth-error {
  padding: 10px 14px;
  border: 1px solid rgba(255, 45, 120, 0.3);
  border-radius: 10px;
  background: rgba(255, 45, 120, 0.06);
  color: #FFB3C1;
  font-size: 13px;
}

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

.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons button {
  flex: 1;
  min-height: 48px;
  font-size: 14px;
  font-weight: 700;
}

.auth-close {
  display: block;
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

/* ── 余额徽章 ── */

.balance-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(0, 229, 204, 0.06);
  font-family: var(--mono-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 250ms ease, border-color 250ms ease;
}

.balance-badge:hover {
  background: rgba(0, 229, 204, 0.1);
  border-color: rgba(0, 229, 204, 0.35);
}

.balance-badge.low-balance {
  border-color: rgba(255, 184, 0, 0.35);
  background: rgba(255, 184, 0, 0.06);
  color: var(--warm);
}

.balance-icon {
  font-size: 16px;
}

.recharge-button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.recharge-button:hover {
  filter: brightness(1.1);
}

.balance-badge[hidden] {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   充值模态框
   ══════════════════════════════════════════════════════════ */

.pricing-modal {
  width: min(680px, calc(100vw - 32px));
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pricing-loading {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.pricing-card {
  position: relative;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 7, 12, 0.8);
  text-align: center;
  transition: transform 250ms ease, border-color 250ms ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-hover);
}

.pricing-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 229, 204, 0.2), 0 0 30px rgba(0, 229, 204, 0.08);
}

.pricing-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  font-size: 11px;
  font-weight: 800;
}

.pricing-card h3 {
  margin: 0 0 8px;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.pricing-credits {
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 900;
}

.pricing-desc {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pricing-price {
  margin-bottom: 14px;
  color: var(--warm);
  font-family: var(--mono-font);
  font-size: 17px;
  font-weight: 700;
}

.pricing-original-price {
  font-size: 13px;
  font-weight: 400;
  color: var(--dim);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 45, 120, 0.5);
  margin-left: 6px;
}

@keyframes promo-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.pricing-discount-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--blue), var(--accent));
  background-size: 200% auto;
  animation: promo-shimmer 3s linear infinite;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(0, 229, 204, 0.2);
}

.pricing-buy {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
}

.pricing-dev-tools {
  text-align: center;
  margin-bottom: 8px;
}

.feedback-modal {
  width: min(560px, calc(100vw - 32px));
}

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

.feedback-form textarea {
  resize: vertical;
}

.auth-error.success {
  color: #0d7c72;
  border-color: rgba(13, 124, 114, 0.24);
  background: rgba(13, 124, 114, 0.08);
}

.admin-modal {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(88vh, 820px);
  overflow: auto;
}

.admin-toolbar,
.admin-tabs,
.admin-actions,
.admin-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-toolbar {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 12px;
}

.admin-stats article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 229, 204, 0.05);
}

.admin-stats span,
.admin-actions span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats strong {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 20px;
}

.admin-actions {
  align-items: flex-end;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 7, 12, 0.48);
}

.admin-actions label {
  display: grid;
  min-width: min(260px, 100%);
}

.admin-tabs {
  margin-bottom: 10px;
}

.admin-table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

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

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--ink);
  background: rgba(6, 7, 12, 0.96);
}

.admin-table td {
  color: var(--muted);
  max-width: 280px;
  overflow-wrap: anywhere;
}

.admin-table .admin-wide-cell {
  min-width: 260px;
  color: var(--ink);
}

.text-button.danger {
  color: #ff7a9a;
}

/* ── 支付二维码 ── */

.pricing-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 16px;
  margin-bottom: 16px;
}

.pricing-qr-section[hidden] {
  display: none;
}

.pricing-qr-title {
  margin: 0 0 18px;
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.pricing-qr-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 240px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 14px;
  background: rgba(6, 7, 12, 0.8);
  box-shadow: inset 0 0 20px rgba(0, 229, 204, 0.04);
}

.pricing-qr-code img {
  display: block;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.pricing-qr-status {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.pricing-qr-back {
  margin-top: 4px;
}

/* ── 优惠码输入 ── */

.pricing-coupon {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 229, 204, 0.03);
}

.pricing-coupon-input {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono-font);
  font-size: 13px;
  letter-spacing: 0.5px;
  outline: none;
}

.pricing-coupon-input::placeholder {
  color: var(--dim);
  font-family: var(--ui-font);
  letter-spacing: 0;
}

.pricing-coupon-input:focus {
  background: rgba(0, 229, 204, 0.04);
}

.pricing-coupon-btn {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  color: var(--bg-deep);
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pricing-coupon-btn:hover {
  background: #33EDD6;
  box-shadow: 0 0 16px rgba(0, 229, 204, 0.3);
}

.pricing-coupon-msg {
  width: 100%;
  margin: 6px 0 0;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
}

/* ── 邀请弹窗 ── */

.referral-modal {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}

.referral-modal .auth-head {
  padding: 28px 28px 0;
  margin-bottom: 0;
  text-align: center;
}

.referral-modal .auth-head h2 {
  font-size: 20px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.referral-modal .auth-head p {
  font-size: 13px;
  margin-top: 4px;
}

.referral-link-section {
  padding: 20px 28px 0;
  margin-bottom: 0;
}

.referral-code-display {
  position: relative;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px dashed rgba(0, 229, 204, 0.25);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(0, 229, 204, 0.04), rgba(139, 92, 246, 0.03));
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 13px;
  word-break: break-all;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.6;
}

.referral-copy-btn {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  background: rgba(0, 229, 204, 0.06);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.referral-copy-btn:hover {
  background: rgba(0, 229, 204, 0.12);
  box-shadow: 0 0 20px rgba(0, 229, 204, 0.15);
}

.referral-copy-btn.copied {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.referral-qr-section {
  display: flex;
  justify-content: center;
  padding: 20px 28px 0;
  margin-bottom: 0;
}

.referral-qr-code img {
  display: block;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(0, 229, 204, 0.1),
    0 8px 30px rgba(0, 0, 0, 0.3);
}

.referral-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 28px 0;
  padding-bottom: 0;
}

.referral-stat-card {
  position: relative;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(0, 229, 204, 0.04) 0%, rgba(6, 7, 12, 0.6) 100%);
  text-align: center;
  overflow: hidden;
}

.referral-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.referral-stat-card strong {
  display: block;
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 2px;
  line-height: 1.2;
}

.referral-stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.referral-modal .auth-close {
  display: block;
  width: calc(100% - 56px);
  margin: 20px 28px 24px;
  min-height: 38px;
}

/* ── 邀请按钮（顶栏） ── */

#referralButton {
  position: relative;
  border-color: rgba(0, 229, 204, 0.2);
  color: var(--accent);
  background: rgba(0, 229, 204, 0.05);
  font-weight: 600;
}

#referralButton::before {
  content: "✦";
  margin-right: 4px;
  font-size: 10px;
  opacity: 0.7;
}

#referralButton:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 204, 0.1);
  box-shadow: 0 0 16px rgba(0, 229, 204, 0.15);
}

@media (max-width: 760px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .auth-modal {
    padding: 22px;
  }

  .auth-buttons {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════════════════════════
   无障碍 & 动效偏好
   ══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ══════════════════════════════════════════════════════════
   2026 工作台重塑：墨色编辑器 × 纸面阅读
   参考方向：calm design / progressive disclosure / expressive typography
   ══════════════════════════════════════════════════════════ */

:root {
  --bg: #eef2f0;
  --bg-deep: #121a1d;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-hover: rgba(255, 255, 255, 0.94);
  --glass: rgba(18, 26, 29, 0.04);
  --ink: #192023;
  --paper: #fbfaf6;
  --reader-ink: #283033;
  --muted: #687579;
  --dim: #d6ddd9;
  --line: rgba(35, 48, 50, 0.12);
  --line-hover: rgba(35, 48, 50, 0.24);
  --accent: #0d7c72;
  --accent-dark: #0a5e58;
  --blue: #2d5f8b;
  --warm: #c44d2d;
  --magenta: #a8345f;
  --soft: rgba(13, 124, 114, 0.08);
  --shadow: 0 24px 70px rgba(24, 35, 38, 0.14);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.62), 0 20px 48px rgba(24, 35, 38, 0.1);
  --primary: #0d7c72;
  --ui-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --reader-font: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
}

html {
  background: #eef2f0;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(18, 26, 29, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(18, 26, 29, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #eef2f0 0%, #f7f1e9 42%, #e9f1f5 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

body::before,
body::after {
  display: none;
}

.simple-shell {
  width: min(1180px, calc(100vw - 32px));
  padding: 24px 0 64px;
}

.simple-hero,
.reader-section,
.chapter-editor,
.advanced-details,
.next-actions {
  border: 1px solid rgba(29, 42, 45, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.05);
}

.simple-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px 26px;
  padding: 24px;
  overflow: visible;
}

.simple-hero::before {
  display: none;
}

.simple-topbar {
  grid-column: 1 / -1;
  min-height: 52px;
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.simple-topbar strong {
  position: relative;
  padding-left: 16px;
  color: #142326;
  font-size: 20px;
  letter-spacing: 0;
}

.simple-topbar strong::before {
  position: absolute;
  left: 0;
  top: 4px;
  width: 6px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), var(--warm));
  content: "";
}

.simple-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-copy {
  align-self: start;
  text-align: left;
}

.eyebrow {
  color: var(--warm);
  font-family: var(--ui-font);
  font-size: 13px;
  letter-spacing: 0.08em;
}

h1 {
  max-width: 680px;
  margin: 0 0 16px;
  color: #121a1d;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: none;
}

.hero-copy p:last-child {
  max-width: 640px;
  margin: 0 0 20px;
  color: #536165;
  font-size: 16px;
  line-height: 1.85;
}

.model-strip {
  width: 100%;
  margin: 0;
  padding: 10px;
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(18, 26, 29, 0.04);
  box-shadow: none;
}

.model-strip span {
  color: var(--muted);
  font-family: var(--ui-font);
  letter-spacing: 0;
}

.model-strip span:first-child {
  color: var(--accent);
}

.model-strip strong {
  min-height: 42px;
  border: 1px solid rgba(18, 26, 29, 0.09);
  border-radius: 6px;
  color: #172225;
  background: #fff;
  box-shadow: none;
  text-shadow: none;
}

.model-strip strong:nth-of-type(1),
.model-strip strong:nth-of-type(2),
.model-strip strong:nth-of-type(3) {
  color: #172225;
  background: #fff;
  box-shadow: none;
}

.mode-switch,
.mode-panel,
.goal-picker,
.direction-box,
.one-click,
.status-strip,
.privacy-reassurance,
.story-compass {
  grid-column: 2;
}

.mode-switch {
  align-self: start;
  margin: 0;
  padding: 4px;
  border-radius: 8px;
  background: #e8eeeb;
  box-shadow: none;
}

.mode-button {
  border-radius: 6px;
  color: #607074;
  font-size: 14px;
}

.mode-button.active {
  color: #fff;
  background: #142326;
  box-shadow: 0 10px 22px rgba(18, 26, 29, 0.18);
}

.idea-box,
.direction-box,
.upload-box,
.goal-picker,
.stage-card,
.tree-item,
.chapter-item,
.queue-item,
.memory-card,
.library-item {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.mode-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.idea-head {
  margin-bottom: 10px;
}

.idea-title,
.idea-box span,
.direction-box span,
.upload-box span,
.choice-row span,
.field-label,
.input-block span {
  color: #506064;
  font-size: 13px;
}

textarea,
input,
select {
  border-color: rgba(18, 26, 29, 0.13);
  border-radius: 7px;
  color: #152125;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(13, 124, 114, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 124, 114, 0.1);
}

textarea::placeholder,
input::placeholder {
  color: #8a9698;
}

.random-idea-button,
.secondary-button,
.text-button,
.tab-button {
  border-radius: 7px;
  color: #354447;
  background: rgba(255, 255, 255, 0.76);
}

.random-idea-button {
  border-color: rgba(196, 77, 45, 0.22);
  color: var(--warm);
  font-family: var(--ui-font);
}

.random-idea-button:hover,
.secondary-button:hover,
.text-button:hover {
  color: #142326;
  border-color: rgba(18, 26, 29, 0.22);
  background: #fff;
  transform: translateY(-1px);
}

.goal-picker {
  background: rgba(255, 255, 255, 0.52);
}

.goal-picker summary {
  color: #435257;
}

.goal-picker summary span {
  color: #172225;
  font-family: var(--ui-font);
}

.one-click,
.primary-button,
.tab-button.active {
  color: #fff;
  border-color: #142326;
  background: linear-gradient(135deg, #142326, #0d7c72);
  box-shadow: 0 16px 34px rgba(13, 124, 114, 0.22);
}

.one-click {
  min-height: 58px;
  border-radius: 8px;
  font-family: var(--ui-font);
  font-size: 17px;
}

.one-click:hover {
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(13, 124, 114, 0.26);
}

.status-strip {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 26, 29, 0.045);
}

.progress-track {
  background: rgba(18, 26, 29, 0.1);
  box-shadow: none;
}

.progress-track span {
  background: linear-gradient(90deg, var(--warm), var(--accent), var(--blue));
  box-shadow: none;
}

.privacy-reassurance {
  border: 0;
  background: transparent;
  padding: 0 2px;
}

.privacy-reassurance span:first-child {
  color: var(--accent);
}

.story-compass {
  margin-top: 2px;
}

.story-compass > div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.reader-section {
  margin-top: 20px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(18, 26, 29, 0.035) 1px, transparent 1px),
    #fbfaf6;
  background-size: 36px 36px;
}

.reader-title {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(18, 26, 29, 0.1);
}

.reader-title h2 {
  color: #142326;
  font-size: 24px;
}

.reader-title span {
  color: #6c7779;
  font-family: var(--ui-font);
}

.novel-reader {
  max-height: 680px;
  padding: 10px 0 0;
  color: #283033;
  font-size: 18px;
  line-height: 2.08;
}

.novel-reader h4 {
  color: #142326;
  font-size: 22px;
}

.novel-reader p {
  color: #303a3d;
}

.next-actions {
  border-left: 5px solid var(--accent);
}

.advanced-details {
  background: rgba(255, 255, 255, 0.6);
}

.advanced-details summary {
  color: #142326;
}

.advanced-grid {
  border-top-color: var(--line);
}

.status-pill,
.pricing-badge,
.recharge-button {
  color: #fff;
  background: #142326;
}

.auth-overlay {
  background: rgba(16, 23, 25, 0.42);
}

.auth-modal {
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.96);
  box-shadow: 0 26px 90px rgba(18, 26, 29, 0.26);
}

.auth-head h2,
.pricing-card h3 {
  color: #142326;
}

.auth-head p,
.pricing-desc,
.pricing-loading {
  color: #657174;
}

.auth-tabs {
  border-radius: 8px;
  background: rgba(18, 26, 29, 0.06);
}

.auth-tab {
  border-radius: 6px;
}

.auth-tab.active {
  color: #fff;
  background: #142326;
}

.balance-badge {
  border-radius: 8px;
  color: #142326;
  background: #fff;
}

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

.pricing-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.pricing-card.recommended {
  border-color: rgba(13, 124, 114, 0.45);
  box-shadow: 0 18px 42px rgba(13, 124, 114, 0.14);
}

.pricing-credits {
  color: var(--accent);
  font-family: var(--ui-font);
  font-size: 15px;
}

.pricing-price {
  color: var(--warm);
  font-size: 24px;
}

.pricing-buy {
  width: 100%;
}

@media (min-width: 920px) {
  .hero-copy {
    grid-column: 1;
    grid-row: 2 / span 4;
  }

  .mode-switch {
    grid-row: 2;
  }

  .mode-panel {
    grid-row: 3;
  }

  .goal-picker {
    grid-row: 4;
  }

  .direction-box {
    grid-row: 5;
  }

  .one-click {
    grid-row: 6;
  }

  .status-strip {
    grid-row: 7;
  }

  .privacy-reassurance {
    grid-row: 8;
  }

  .story-compass {
    grid-column: 1;
    grid-row: 6 / span 3;
    align-self: end;
    grid-template-columns: 1fr 1fr;
  }

  .story-memory {
    grid-column: 1 / -1;
  }

  .reader-section,
  .next-actions,
  .chapter-editor,
  .advanced-details {
    width: min(880px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 920px) {
  .simple-shell {
    width: min(100vw - 20px, 760px);
    padding-top: 10px;
  }

  .simple-hero {
    display: block;
    padding: 18px;
  }

  .simple-topbar {
    margin-bottom: 20px;
  }

  .mode-switch,
  .mode-panel,
  .goal-picker,
  .direction-box,
  .one-click,
  .status-strip,
  .privacy-reassurance,
  .story-compass {
    grid-column: auto;
  }

  .hero-copy {
    margin-bottom: 18px;
  }

  .mode-switch,
  .mode-panel,
  .goal-picker,
  .direction-box,
  .one-click,
  .status-strip,
  .privacy-reassurance {
    margin-top: 12px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   Art Direction 2: 文学装帧式创作台
   目标：少一点后台感，多一点书籍、纸张、墨色、编辑桌面的审美
   ══════════════════════════════════════════════════════════ */

:root {
  --bg: #ede6d8;
  --bg-deep: #17120e;
  --surface: rgba(255, 252, 243, 0.9);
  --surface-hover: #fffaf0;
  --ink: #18130f;
  --paper: #fff9ea;
  --reader-ink: #2b241d;
  --muted: #766b5f;
  --dim: #d6c9b5;
  --line: rgba(48, 35, 22, 0.16);
  --line-hover: rgba(48, 35, 22, 0.32);
  --accent: #8f1f1a;
  --accent-dark: #5f1411;
  --blue: #143f4f;
  --warm: #b9782f;
  --magenta: #72334b;
  --soft: rgba(143, 31, 26, 0.08);
  --shadow: 0 28px 80px rgba(63, 44, 24, 0.18);
  --glow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 18px 50px rgba(63, 44, 24, 0.12);
}

html {
  background: #ede6d8;
}

body {
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(23, 18, 14, 0.05), transparent 34%),
    radial-gradient(circle at 15% 18%, rgba(143, 31, 26, 0.13), transparent 26%),
    radial-gradient(circle at 92% 8%, rgba(20, 63, 79, 0.12), transparent 25%),
    radial-gradient(circle at 88% 80%, rgba(185, 120, 47, 0.14), transparent 28%),
    #ede6d8;
  background-attachment: fixed;
}

body::before {
  display: block;
  z-index: -2;
  opacity: 0.52;
  background-image:
    repeating-linear-gradient(0deg, rgba(59, 41, 25, 0.045) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(59, 41, 25, 0.025) 0 1px, transparent 1px 11px);
}

body::after {
  display: block;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(237, 230, 216, 0.94), rgba(237, 230, 216, 0.58) 22%, transparent 50%, rgba(237, 230, 216, 0.82)),
    radial-gradient(circle at 50% 0%, rgba(255, 252, 243, 0.78), transparent 42%);
}

.simple-shell {
  width: min(1220px, calc(100vw - 34px));
  padding: 30px 0 76px;
}

.simple-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 0.94fr) minmax(420px, 1fr);
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: 16px 28px;
  min-height: 760px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(67, 45, 25, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(90deg, #2a1c15 0 14px, transparent 14px 18px, rgba(255, 251, 239, 0.98) 18px 50%, #fffaf0 50%),
    var(--paper);
  box-shadow:
    0 32px 90px rgba(58, 39, 20, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.86) inset;
}

.simple-hero::before {
  display: block;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 18px), rgba(78, 53, 31, 0.1) calc(50% - 1px), rgba(255, 255, 255, 0.48) 50%, rgba(78, 53, 31, 0.12) calc(50% + 1px), transparent calc(50% + 18px)),
    radial-gradient(circle at 18% 22%, rgba(143, 31, 26, 0.09), transparent 23%),
    radial-gradient(circle at 86% 16%, rgba(20, 63, 79, 0.08), transparent 26%),
    linear-gradient(rgba(61, 42, 24, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 100% 34px;
  content: "";
}

.simple-hero > * {
  position: relative;
  z-index: 1;
}

.atelier-mark {
  position: absolute;
  left: 34px;
  top: 116px;
  z-index: 2;
  display: grid;
  gap: 6px;
  width: 58px;
  padding: 10px 0 12px;
  border: 1px solid rgba(143, 31, 26, 0.55);
  color: #8f1f1a;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 14px 36px rgba(143, 31, 26, 0.14);
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  place-items: center;
}

.simple-topbar {
  grid-column: 1 / -1;
  min-height: 76px;
  margin: 0;
  padding: 20px 28px 16px 92px;
  border-bottom: 1px solid rgba(67, 45, 25, 0.13);
  background: rgba(255, 250, 240, 0.52);
}

.simple-topbar strong {
  padding-left: 0;
  color: #221711;
  font-size: 22px;
}

.simple-topbar strong::before {
  display: none;
}

.simple-actions {
  gap: 10px;
}

.text-button,
.secondary-button,
.tab-button,
.random-idea-button {
  min-height: 38px;
  border: 1px solid rgba(67, 45, 25, 0.13);
  border-radius: 999px;
  color: #463a30;
  background: rgba(255, 252, 244, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.text-button:hover,
.secondary-button:hover,
.random-idea-button:hover {
  color: #17120e;
  border-color: rgba(143, 31, 26, 0.28);
  background: #fff8e7;
  transform: translateY(-1px);
}

.hero-copy {
  grid-column: 1;
  grid-row: 2 / span 4;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 468px;
  padding: 26px 36px 24px 92px;
  text-align: left;
}

.eyebrow {
  margin-bottom: 12px;
  color: #8f1f1a;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 620px;
  margin-bottom: 20px;
  color: #18130f;
  font-size: clamp(44px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.74),
    8px 14px 0 rgba(143, 31, 26, 0.055);
}

h1 span {
  white-space: nowrap;
}

.hero-copy p:last-child {
  max-width: 520px;
  margin-bottom: 28px;
  color: #5f5145;
  font-size: 16px;
  line-height: 1.9;
}

.model-strip {
  width: min(520px, 100%);
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(67, 45, 25, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 250, 236, 0.9), rgba(238, 225, 203, 0.66)),
    rgba(255, 255, 255, 0.55);
}

.model-strip span {
  color: #77695d;
  font-family: var(--ui-font);
}

.model-strip span:first-child {
  color: #1b4c55;
}

.model-strip strong,
.model-strip strong:nth-of-type(1),
.model-strip strong:nth-of-type(2),
.model-strip strong:nth-of-type(3) {
  min-height: 46px;
  border: 1px solid rgba(67, 45, 25, 0.12);
  border-radius: 10px;
  color: #211712;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(249, 240, 222, 0.82));
  box-shadow: 0 10px 22px rgba(67, 45, 25, 0.08);
  font-size: 16px;
}

.mode-switch,
.mode-panel,
.goal-picker,
.direction-box,
.one-click,
.status-strip,
.privacy-reassurance {
  grid-column: 2;
  margin-right: 28px;
}

.mode-switch {
  grid-row: 2;
  align-self: end;
  margin-top: 14px;
  padding: 6px;
  border: 1px solid rgba(67, 45, 25, 0.14);
  border-radius: 18px;
  background: rgba(235, 224, 204, 0.68);
}

.mode-button {
  min-height: 48px;
  border-radius: 13px;
  color: #6d6156;
  font-size: 14px;
}

.mode-button.active {
  color: #fff8ea;
  background:
    linear-gradient(135deg, #221711, #143f4f);
  box-shadow: 0 16px 32px rgba(20, 63, 79, 0.2);
}

.mode-panel {
  grid-row: 3;
  padding: 18px;
  border: 1px solid rgba(67, 45, 25, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(250, 241, 224, 0.86));
  box-shadow: 0 18px 48px rgba(67, 45, 25, 0.1);
}

.idea-head {
  margin-bottom: 12px;
}

.idea-title,
.idea-box span,
.direction-box span,
.upload-box span,
.choice-row span,
.field-label,
.input-block span {
  color: #6a5d50;
  font-size: 13px;
  font-weight: 800;
}

.random-idea-button {
  min-height: 34px;
  color: #8f1f1a;
  background: #fff8eb;
}

textarea,
input,
select {
  border: 1px solid rgba(67, 45, 25, 0.14);
  border-radius: 14px;
  color: #211711;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 248, 234, 0.94));
}

textarea {
  min-height: 136px;
  padding: 18px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(143, 31, 26, 0.44);
  box-shadow: 0 0 0 4px rgba(143, 31, 26, 0.09);
}

.goal-picker {
  grid-row: 4;
  border: 1px solid rgba(67, 45, 25, 0.13);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.62);
}

.goal-picker summary {
  color: #4f4237;
}

.goal-picker summary span {
  color: #18130f;
  font-family: var(--ui-font);
}

.direction-box {
  grid-row: 5;
}

.direction-box textarea {
  min-height: 96px;
}

.one-click {
  grid-row: 6;
  min-height: 62px;
  border: 0;
  border-radius: 18px;
  color: #fff8ea;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #8f1f1a, #17120e 68%, #143f4f);
  box-shadow:
    0 24px 50px rgba(143, 31, 26, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
  font-family: var(--display-font);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.one-click:hover {
  transform: translateY(-2px);
  box-shadow:
    0 30px 64px rgba(143, 31, 26, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.status-strip {
  grid-row: 7;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(67, 45, 25, 0.12);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.72);
  color: #6b5d50;
}

.status-strip strong {
  color: #8f1f1a;
}

.progress-track {
  height: 7px;
  background: rgba(67, 45, 25, 0.12);
}

.progress-track span {
  background: linear-gradient(90deg, #8f1f1a, #b9782f, #143f4f);
}

.privacy-reassurance {
  grid-row: 8;
  margin-bottom: 24px;
  color: #76695d;
}

.privacy-reassurance span:first-child {
  color: #8f1f1a;
}

.story-compass {
  grid-column: 1;
  grid-row: 6 / span 3;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 28px 92px;
  padding-right: 20px;
}

.story-memory {
  grid-column: 1 / -1;
}

.story-compass > div {
  min-height: 90px;
  padding: 16px;
  border: 1px solid rgba(67, 45, 25, 0.14);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.68);
}

.story-compass span {
  color: #8b7b6c;
}

.story-compass strong {
  color: #1d1611;
  font-size: 16px;
}

.story-memory p {
  color: #695d52;
}

.reader-section,
.next-actions,
.chapter-editor,
.advanced-details {
  width: min(960px, 100%);
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  border-color: rgba(67, 45, 25, 0.16);
  background: rgba(255, 249, 235, 0.9);
  box-shadow: 0 28px 72px rgba(63, 44, 24, 0.16);
}

.reader-section {
  padding: 34px 42px;
  background:
    linear-gradient(90deg, transparent 0 74px, rgba(143, 31, 26, 0.11) 74px 76px, transparent 76px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(67, 45, 25, 0.055) 35px 36px),
    #fff9ea;
}

.reader-title h2 {
  color: #1d1611;
  font-size: 28px;
}

.reader-title span {
  color: #7b6e62;
}

.novel-reader {
  padding-left: 54px;
  color: #2b241d;
  font-size: 18px;
  line-height: 2.12;
}

.advanced-details {
  background: rgba(255, 250, 240, 0.78);
}

.stage-card,
.memory-card,
.tree-item,
.chapter-item,
.queue-item,
.library-item,
.upload-box {
  border-color: rgba(67, 45, 25, 0.14);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.72);
}

.primary-button,
.tab-button.active,
.status-pill,
.pricing-badge,
.recharge-button {
  color: #fff8ea;
  border-color: #8f1f1a;
  background: linear-gradient(135deg, #8f1f1a, #17120e);
}

.auth-overlay {
  background: rgba(23, 18, 14, 0.46);
}

.auth-modal {
  border: 1px solid rgba(67, 45, 25, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(247, 235, 213, 0.96));
}

.auth-head h2,
.pricing-card h3 {
  color: #1d1611;
}

.auth-tab.active {
  color: #fff8ea;
  background: #17120e;
}

.balance-badge {
  border-radius: 999px;
  color: #1d1611;
  background: #fff8ea;
}

.pricing-card {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(247, 235, 213, 0.9));
}

.pricing-card.recommended {
  border-color: rgba(143, 31, 26, 0.42);
  box-shadow: 0 22px 50px rgba(143, 31, 26, 0.16);
}

.pricing-credits {
  color: #143f4f;
}

.pricing-price {
  color: #8f1f1a;
  font-family: var(--display-font);
  font-size: 30px;
}

@media (max-width: 980px) {
  .simple-shell {
    width: min(100vw - 18px, 760px);
    padding-top: 12px;
  }

  .simple-hero {
    display: block;
    min-height: 0;
    padding: 0;
    background:
      linear-gradient(90deg, #2a1c15 0 10px, transparent 10px),
      #fff9ea;
  }

  .atelier-mark {
    left: 24px;
    top: 96px;
    width: 48px;
    font-size: 20px;
  }

  .simple-topbar {
    padding: 18px 18px 14px 74px;
  }

  .hero-copy {
    min-height: 0;
    padding: 28px 20px 18px 74px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .mode-switch,
  .mode-panel,
  .goal-picker,
  .direction-box,
  .one-click,
  .status-strip,
  .privacy-reassurance,
  .story-compass {
    margin-left: 20px;
    margin-right: 20px;
  }

  .story-compass {
    grid-template-columns: 1fr;
    padding-right: 0;
    margin-bottom: 22px;
  }

  .reader-section {
    padding: 24px 22px;
  }

  .novel-reader {
    padding-left: 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
