/* ==============================================
   PRESCHOOL-AI 主样式表
   ============================================== */

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

:root {
  --primary: #0e7490;
  --primary-dark: #0c6a83;
  --primary-light: #e0f2fe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* ── 工具类 ───────────────────────────────── */
.hidden { display: none !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.ml-2 { margin-left: 0.5rem; }
.flex-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.inline-block { display: inline-block; }

/* ── 导航 ───────────────────────────────────── */
#topNav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.75rem 0;
  border-right: 1px solid rgba(255,255,255,0.2);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.nav-brand img { height: 32px; width: auto; }
.nav-brand-text { color: white; font-size: 0.85rem; font-weight: 500; line-height: 1.2; }

.nav-tabs { display: flex; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-feedback-btn {
  flex-shrink: 0; white-space: nowrap;
  color: var(--accent); font-size: 0.82rem; font-weight: 600;
  text-decoration: none; padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--accent); border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  margin-left: 0.5rem; align-self: center;
}
.nav-feedback-btn:hover { background: var(--accent); color: #1a1a1a; }

.mod-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  user-select: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.mod-tab:hover { color: white; background: rgba(255,255,255,0.1); }

.mod-tab.active-tab {
  color: white;
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.1);
}

.progress-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: background 0.3s;
}

.progress-dot.completed { background: var(--accent); }

/* ── Hero ───────────────────────────────────── */
#hero {
  background: linear-gradient(135deg, var(--primary) 0%, #164e63 100%);
  color: white;
  padding: 4rem 1rem 3rem;
  text-align: center;
}

.hero-inner { max-width: 700px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.hero-title span { color: var(--accent); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  padding: 0.875rem 2.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,158,11,0.4); }

/* ── 模块区域 ───────────────────────────────── */
.module-section { max-width: 900px; margin: 0 auto; padding: 2.5rem 1rem; }

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.section-num {
  width: 44px; height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.section-title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.section-sub { font-size: 0.9rem; color: var(--muted); margin-top: 0.2rem; }

/* ── 卡片 ───────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* ── 按钮 ───────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  color: var(--primary);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid var(--primary);
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover { background: var(--primary-light); }

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1a1a1a;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-copy:hover { background: #d97706; }
.btn-copy.copied { background: var(--success); color: white; }

.btn-copy-sm {
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-copy-sm:hover { background: var(--primary); color: white; }

/* ── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(2rem);
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: #064e3b; }
.toast-error { background: #7f1d1d; }

/* ── 模块一：投票 ───────────────────────────── */
.poll-section { text-align: center; margin-bottom: 2rem; }
.poll-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; }
.poll-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.poll-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 2rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  min-width: 120px;
}

.poll-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.poll-btn.selected { border-color: var(--primary); background: var(--primary-light); }
.poll-btn:disabled { cursor: default; }
.poll-emoji { font-size: 1.8rem; }

.poll-results { margin-top: 1.5rem; }
.poll-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.poll-bar-label { width: 80px; font-size: 0.85rem; text-align: right; flex-shrink: 0; }
.poll-bar-track {
  flex: 1;
  background: var(--border);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 0%;
  transition: width 1s ease-out;
}
.poll-bar-pct { font-size: 0.85rem; width: 40px; font-weight: 600; color: var(--primary); }

/* 打字机 */
.typewriter-box {
  background: linear-gradient(135deg, var(--primary-light), #f0fdf4);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

#typewriter-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  min-height: 2.2rem;
}

/* 信息卡片翻转 */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.info-card {
  height: 180px;
  perspective: 800px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.info-card.flipped .card-inner { transform: rotateY(180deg); }

.card-front, .card-back {
  position: absolute;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-front { background: var(--primary); color: white; }
.card-back { background: white; border: 2px solid var(--primary); color: var(--text); transform: rotateY(180deg); }
.card-front-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.card-front-title { font-size: 1rem; font-weight: 600; }
.card-back-text { font-size: 0.85rem; line-height: 1.6; }
.card-hint { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 0.5rem; }

/* ── 模块二：工具卡片 ─────────────────────── */
.tool-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
  border-left: 4px solid var(--primary);
}

.tool-cyan { border-left-color: #0891b2; }
.tool-purple { border-left-color: #7c3aed; }
.tool-green { border-left-color: #059669; }

.tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.tool-header:hover { background: #f8fafc; }

.tool-icon { font-size: 2rem; flex-shrink: 0; }
.tool-info { flex: 1; }
.tool-name { font-weight: 700; font-size: 1rem; }
.tool-sub { font-size: 0.83rem; color: var(--muted); }
.tool-chevron { font-size: 0.85rem; color: var(--muted); flex-shrink: 0; }

.tool-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.tool-desc { color: var(--muted); margin: 1rem 0 0.75rem; font-size: 0.9rem; }

.scene-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 0.75rem 0; }
.scene-row { display: grid; grid-template-columns: 80px 1fr 140px; gap: 0; }
.scene-header { background: #f1f5f9; font-weight: 600; font-size: 0.82rem; }
.scene-row > span { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.83rem; }
.scene-label { font-weight: 600; color: var(--primary); }
.scene-prompt { color: var(--text); font-style: italic; }
.scene-output { color: var(--success); font-weight: 500; }

.tips-list { margin-top: 0.75rem; }
.tip-item { font-size: 0.85rem; color: var(--muted); padding: 0.3rem 0; border-bottom: 1px solid #f1f5f9; }

/* Prompt卡片 */
#prompt-library { margin-top: 2rem; }

.prompt-lib-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.prompt-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.prompt-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.prompt-card-header:hover { background: #f8fafc; }
.prompt-icon { font-size: 1.4rem; }
.prompt-title { font-weight: 600; flex: 1; }
.prompt-tag {
  background: var(--accent-light);
  color: #92400e;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.prompt-chevron { color: var(--muted); font-size: 0.85rem; }

.prompt-card-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }

.prompt-fields {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.pfield { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.pfield label { font-weight: 500; white-space: nowrap; }
.pfield select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: white;
}

.prompt-preview-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.preview-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; font-weight: 600; }

.prompt-text {
  font-family: 'Noto Sans SC', 'PingFang SC', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}

.prompt-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

/* ── 模块三：场景 ───────────────────────────── */
.scenario-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.scenario-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.875rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
  background: none;
  min-width: 100px;
}

.scenario-tab:hover { background: var(--primary-light); border-color: var(--primary); }
.scenario-tab.active-scenario-tab { background: var(--primary); color: white; border-color: var(--primary); }
.active-scenario-tab .scenario-tab-sub { color: rgba(255,255,255,0.8); }

.scenario-tab-icon { font-size: 1.6rem; }
.scenario-tab-title { font-weight: 600; font-size: 0.9rem; }
.scenario-tab-sub { font-size: 0.75rem; color: var(--muted); text-align: center; }

/* Scenario A */
.sa-form { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.sa-form-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }
.sa-fields { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.25rem; }
.sa-field { display: flex; flex-direction: column; gap: 0.35rem; }
.sa-field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.sa-field select, .sa-field input {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
}
.sa-field select:focus, .sa-field input:focus { outline: none; border-color: var(--primary); }
.sa-include-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sa-include-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.sa-include-label:has(input:checked) { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 600; }

.sa-output { background: #f8fafc; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.sa-output-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-bottom: 0.75rem; }
#sa-prompt-output { display: block; font-family: 'Noto Sans SC', sans-serif; font-size: 0.9rem; white-space: pre-wrap; line-height: 1.8; margin-bottom: 1rem; }
.sa-output-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

.mock-output-btn-wrap { margin-top: 1.25rem; }
#sa-mock-btn { background: none; border: 2px solid var(--primary); color: var(--primary); padding: 0.5rem 1.25rem; border-radius: 8px; font-family: inherit; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
#sa-mock-btn:hover { background: var(--primary-light); }

#sa-mock-output {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

.mock-title { font-weight: 700; font-size: 1rem; color: var(--primary); margin-bottom: 1rem; }
.mock-section { margin-bottom: 1rem; }
.mock-section-name { font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 0.4rem; }
.mock-section-content { font-size: 0.88rem; color: var(--muted); white-space: pre-line; line-height: 1.7; }

/* Scenario B storybook */
.story-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.story-step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.story-step-dot.active-step { background: var(--primary); color: white; transform: scale(1.15); }
.story-step-dot.done-step { background: var(--success); color: white; }
.story-step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; }

#story-step-content {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-height: 250px;
}

.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.step-tool-badge { background: var(--primary-light); color: var(--primary); padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.step-duration { font-size: 0.82rem; color: var(--muted); }
.step-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.story-preview { background: var(--primary-light); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.story-title { font-weight: 700; color: var(--primary); margin-bottom: 0.75rem; }
.story-sentence { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; font-size: 0.9rem; align-items: flex-start; }
.story-num { background: var(--primary); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

.prompt-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-top: 1rem; }
.prompt-label { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 0.5rem; }

.image-prompts { display: flex; flex-direction: column; gap: 0.75rem; }
.img-prompt-row { background: #f8fafc; border-radius: 8px; padding: 0.875rem; }
.img-prompt-num { font-size: 0.78rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.img-prompt-text { font-size: 0.85rem; white-space: pre-wrap; margin-bottom: 0.5rem; color: var(--text); background: none; border: none; }

.tips-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.tip-card { display: flex; align-items: flex-start; gap: 0.75rem; background: #f8fafc; border-radius: 8px; padding: 0.75rem; }
.tip-num { background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }

/* TTS demo */
.tts-demo-box { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-radius: var(--radius); padding: 1.5rem; }
.tts-story-text { font-size: 0.95rem; line-height: 1.9; color: var(--text); margin-bottom: 1.25rem; border-left: 4px solid var(--success); padding-left: 1rem; }
.tts-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-tts {
  background: var(--success);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-tts:hover { background: #047857; transform: scale(1.03); }
.btn-tts-stop { background: #ef4444; color: white; padding: 0.75rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; cursor: pointer; border: none; font-family: inherit; }
.tts-note { font-size: 0.83rem; color: var(--muted); margin-top: 0.75rem; }
.tts-tools { border-top: 1px solid rgba(0,0,0,0.08); padding-top: 1rem; }
.tts-tool-label { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }

.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; }
.usage-card { background: white; border-radius: 8px; padding: 0.875rem; font-size: 0.85rem; border: 1px solid var(--border); line-height: 1.6; }
.completion-msg { background: var(--success-light); color: #065f46; padding: 1rem 1.25rem; border-radius: 8px; font-weight: 600; text-align: center; margin-top: 1rem; }

.story-step-btns { display: flex; justify-content: space-between; margin-top: 1.5rem; }

/* Scenario C notices */
.notice-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 0.75rem; overflow: hidden; }
.notice-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; transition: background 0.15s; }
.notice-card-header:hover { background: #f8fafc; }
.notice-chevron { color: var(--muted); }
.notice-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.notice-columns { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 0; margin-top: 1rem; align-items: start; }
.notice-col { }
.notice-arrow { display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.5rem; padding-top: 2rem; }
.notice-col-label { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-bottom: 0.5rem; }
.notice-text { font-size: 0.85rem; white-space: pre-wrap; line-height: 1.7; color: var(--text); background: #f8fafc; padding: 0.875rem; border-radius: 8px; margin-bottom: 0.5rem; font-family: inherit; border: 1px solid var(--border); }
.friendly-text { border-color: var(--success) !important; background: #f0fdf4 !important; }
.friendly-cover { background: var(--primary-light); border-radius: 8px; padding: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.btn-reveal { background: var(--primary); color: white; padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; font-size: 0.9rem; }

/* ── 模块四：任务 ───────────────────────────── */
#task-selector h2 { font-size: 1.1rem; font-weight: 600; text-align: center; color: var(--muted); margin-bottom: 1.5rem; }

#task-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.task-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s;
  text-align: center;
}

.task-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.task-green:hover { border-color: var(--success); }
.task-blue:hover { border-color: #3b82f6; }
.task-amber:hover { border-color: var(--accent); }

.task-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.task-badge { display: inline-block; padding: 0.25rem 0.875rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; margin-bottom: 0.75rem; }
.task-badge-green { background: #d1fae5; color: #065f46; }
.task-badge-blue { background: #dbeafe; color: #1e40af; }
.task-badge-amber { background: #fef3c7; color: #92400e; }
.task-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }
.task-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.task-goal { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }

/* Task detail */
.task-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: white;
}

.task-header-green { background: linear-gradient(135deg, #059669, #10b981); }
.task-header-blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.task-header-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }

.back-btn { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.4); padding: 0.4rem 0.875rem; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: inherit; flex-shrink: 0; }
.back-btn:hover { background: rgba(255,255,255,0.3); }
.task-detail-title { font-weight: 700; font-size: 1rem; }

.task-goal-box { background: #f8fafc; border-left: 4px solid var(--primary); padding: 0.875rem 1.25rem; border-radius: 0 8px 8px 0; margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted); }

.task-timer-bar { display: flex; align-items: center; gap: 1rem; background: white; border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.timer-display { font-size: 1.5rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; flex: 1; }
.btn-timer { background: var(--primary); color: white; padding: 0.5rem 1.25rem; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; font-size: 0.9rem; }

/* Task steps accordion */
.task-steps { margin-bottom: 1.5rem; }

.task-step {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.task-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.task-step-header:hover { background: #f8fafc; }

.task-step-num {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.task-step-title { font-weight: 600; flex: 1; }
.task-step-chevron { color: var(--muted); font-size: 0.85rem; }

.task-step-body { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.task-step-body p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }

.task-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.875rem; }
.task-field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.task-field select, .task-field input {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  max-width: 300px;
  transition: border-color 0.2s;
}
.task-field select:focus, .task-field input:focus { outline: none; border-color: var(--primary); }

.field-hint { font-size: 0.83rem; color: var(--success); margin-top: 0.25rem; }
.step-sub-desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.75rem; }

.task-checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.checklist-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0.875rem; background: #f8fafc; border-radius: 8px; cursor: pointer; font-size: 0.9rem; border: 1px solid var(--border); transition: all 0.2s; }
.checklist-item:has(input:checked) { background: var(--success-light); border-color: var(--success); }
.checklist-item input { margin-top: 3px; flex-shrink: 0; }

.reflection-fields { display: flex; flex-direction: column; gap: 0.875rem; }
.reflection-item { display: flex; flex-direction: column; gap: 0.35rem; }
.reflection-item label { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.reflection-input { border: 2px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; font-family: inherit; font-size: 0.9rem; transition: border-color 0.2s; }
.reflection-input:focus { outline: none; border-color: var(--primary); }

.layout-steps { padding-left: 1.5rem; }
.layout-steps li { font-size: 0.9rem; color: var(--text); margin-bottom: 0.5rem; line-height: 1.6; }

.export-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; }
.export-option { background: #f8fafc; border-radius: 10px; padding: 1rem; text-align: center; border: 1px solid var(--border); }
.export-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.export-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.3rem; }
.export-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* Task completion */
.task-completion { margin-top: 1.5rem; }
.completion-banner {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.completion-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.completion-text { font-size: 1rem; font-weight: 600; color: #065f46; margin-bottom: 0.75rem; }
.takeaway-text { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.25rem; background: white; padding: 0.875rem; border-radius: 8px; }

/* ── 模块五：FAQ & Quiz ─────────────────────── */
.faq-list { margin-bottom: 2rem; }
.faq-item { background: white; border-radius: var(--radius); margin-bottom: 0.5rem; box-shadow: var(--shadow); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; user-select: none; transition: background 0.15s; }
.faq-q:hover { background: #f8fafc; }
.faq-chevron { color: var(--muted); flex-shrink: 0; margin-left: 0.5rem; }
.faq-a { padding: 0 1.25rem 1.25rem; font-size: 0.9rem; color: var(--muted); line-height: 1.7; border-top: 1px solid var(--border); padding-top: 0.875rem; }

.quiz-section { margin-top: 2rem; }
.quiz-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.25rem; }

.quiz-item { background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.quiz-q { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.875rem; line-height: 1.6; }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0.875rem; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); font-size: 0.9rem; transition: all 0.2s; background: white; }
.quiz-option:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-option input { margin-top: 3px; flex-shrink: 0; }
.correct-answer { background: var(--success-light) !important; border-color: var(--success) !important; }
.wrong-answer { background: #fee2e2 !important; border-color: #ef4444 !important; }

.quiz-feedback { margin-top: 0.75rem; padding: 0.5rem 0.875rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600; }
.correct-fb { background: var(--success-light); color: #065f46; }
.wrong-fb { background: #fee2e2; color: #991b1b; }

.quiz-submit-wrap { text-align: center; margin: 1.5rem 0; }
#quiz-submit-btn { background: var(--primary); color: white; padding: 0.875rem 2.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; font-family: inherit; }

.quiz-result-box { border-radius: var(--radius); padding: 2rem; text-align: center; }
.result-pass { background: var(--success-light); border: 2px solid var(--success); }
.result-try { background: #fef3c7; border: 2px solid var(--accent); }
.result-score { font-size: 3rem; font-weight: 700; color: var(--primary); }
.result-msg { font-size: 1rem; font-weight: 600; margin: 0.75rem 0; }

/* 资源包 */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.resource-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); text-align: center; border-top: 3px solid var(--primary); }
.resource-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.resource-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; }
.resource-desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.5; }

/* 获取证书步骤引导 */
.cert-steps-guide {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  background: linear-gradient(135deg, #fffbeb, #fef9c3);
  border: 1.5px solid #f59e0b; border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  font-size: 0.88rem; color: #78350f;
}
.cert-step { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.cert-step-num {
  background: #f59e0b; color: #fff; font-weight: 700; font-size: 0.78rem;
  border-radius: 50%; width: 1.4rem; height: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cert-step-arrow { color: #d97706; font-weight: 700; font-size: 1rem; }

/* 结业证书 */
#certificate {
  margin-top: 2rem;
  background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 40%, #fff8e1 100%);
  border: 5px solid #f59e0b;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 12px 48px rgba(245,158,11,0.2), 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}
.cert-inner {
  position: relative; text-align: center;
  padding: 3rem 3.5rem 2rem;
  overflow: hidden;
}
.cert-inner::before, .cert-inner::after {
  content: ''; position: absolute;
  width: 90px; height: 90px;
  border: 3px solid rgba(245,158,11,0.35); border-radius: 4px;
}
.cert-inner::before { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.cert-inner::after  { bottom: 60px; right: 16px; border-left: none; border-top: none; }

.cert-logo { width: 64px; height: auto; margin: 0 auto 0.4rem; display: block; }
.cert-org { font-size: 0.85rem; color: #92400e; margin-bottom: 1.25rem; letter-spacing: 0.5px; }
.cert-seal-top { font-size: 2.6rem; margin-bottom: 0.2rem; }
.cert-heading { font-size: 1.9rem; font-weight: 700; color: #0e7490; margin-bottom: 0.2rem; letter-spacing: 2px; }
.cert-heading-en { font-size: 0.88rem; color: #64748b; font-style: italic; letter-spacing: 0.5px; margin-bottom: 1.75rem; }
.cert-body { font-size: 0.95rem; color: #475569; margin-bottom: 0.4rem; }
.cert-name-display {
  font-size: 1.75rem; font-weight: 700; color: #1e293b;
  border-bottom: 2px solid #f59e0b;
  display: inline-block; min-width: 220px;
  padding: 0.2rem 1rem; margin: 0.4rem 0 1.5rem;
}
.cert-course-label { font-size: 0.88rem; color: #64748b; margin-bottom: 0.35rem; }
.cert-course { font-size: 1.1rem; font-weight: 700; color: #1e293b; line-height: 1.6; margin-bottom: 0.35rem; }
.cert-course-en { font-size: 0.8rem; color: #94a3b8; font-style: italic; margin-bottom: 1.75rem; }
.cert-meta {
  display: flex; justify-content: space-around; align-items: flex-end;
  border-top: 1px solid rgba(245,158,11,0.3);
  margin: 1.25rem 0 0.75rem; padding-top: 1.25rem;
}
.cert-meta-item { text-align: center; }
.cert-meta-label { font-size: 0.72rem; color: #94a3b8; margin-bottom: 0.2rem; }
.cert-meta-value { font-size: 0.88rem; font-weight: 600; color: #475569; }
.cert-sig-line { width: 110px; border-bottom: 1px solid #cbd5e1; margin: 0 auto 0.2rem; height: 28px; }
.cert-footer-content {
  font-size: 0.76rem; color: #94a3b8;
  border-top: 1px solid rgba(245,158,11,0.2);
  padding-top: 0.75rem; margin-top: 0.5rem;
}
.cert-irb { font-size: 0.7rem; color: #b0bec5; margin-top: 0.2rem; margin-bottom: 1.25rem; }
.cert-print-btn {
  background: #f59e0b; color: #1a1a1a;
  border: none; border-radius: 999px;
  padding: 0.7rem 2rem; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; font-family: inherit;
  margin-bottom: 0.5rem;
  transition: transform 0.15s;
}
.cert-print-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(245,158,11,0.4); }

/* ── 问卷横幅（Hero简版） ───────────────────── */
.survey-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.6rem 1rem 0.6rem 1.25rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.survey-banner-icon { font-size: 1.1rem; flex-shrink: 0; }

.survey-banner-text {
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  flex: 1;
  min-width: 180px;
  text-align: left;
}

.survey-banner-btn {
  background: white;
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.survey-banner-btn:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ── 问卷招募卡（模块五完整版） ─────────────── */
.survey-card {
  display: flex;
  gap: 1.5rem;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border: 2px solid #93c5fd;
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.survey-card-left { flex: 1; }

.survey-card-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.survey-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.survey-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.875rem;
}

.survey-card-points {
  list-style: none;
  padding: 0;
  margin-bottom: 0.875rem;
}

.survey-card-points li {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.survey-card-researcher {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #bfdbfe;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.survey-card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 140px;
}

.survey-qr-img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 2px solid #93c5fd;
  display: block;
  transition: transform 0.2s;
}
.survey-qr-img:hover { transform: scale(1.05); }

.survey-card-btn {
  display: block;
  background: #2563eb;
  color: white;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  text-align: center;
  width: 100%;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.survey-card-btn:hover { background: #1d4ed8; transform: translateY(-1px); }

.survey-card-time {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .survey-card { flex-direction: column; }
  .survey-card-right { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
  .survey-qr-placeholder { width: 80px; height: 80px; }
  .survey-banner { border-radius: var(--radius); }
}

/* ── Footer ─────────────────────────────────── */
footer {
  background: #1e293b;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
}

footer a { color: var(--accent); text-decoration: none; }

/* ── 打印样式 ───────────────────────────────── */
@media print {
  #topNav, .module-section:not(#module5), .quiz-section, .faq-list,
  #cert-name-form, .cert-steps-guide, .cert-print-btn { display: none !important; }
  body { background: white; }
  #certificate { border: 5px solid #f59e0b !important; box-shadow: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-inner::before, .cert-inner::after { border-color: rgba(245,158,11,0.35) !important; }
}

/* ── 响应式 ─────────────────────────────────── */
@media (max-width: 640px) {
  .hero-title { font-size: 1.6rem; }
  .hero-stats { gap: 1rem; }
  .notice-columns { grid-template-columns: 1fr; }
  .notice-arrow { display: none; }
  .scene-row { grid-template-columns: 70px 1fr; }
  .scene-output { display: none; }
  .mod-tab { padding: 0.75rem 0.5rem; font-size: 0.78rem; }
}
