/* ==============================================
   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;
}

.lang-toggle {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(14,116,144,0.24);
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(15,23,42,0.16);
  padding: 0.25rem;
}

.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--primary);
  color: white;
}

/* ── 工具类 ───────────────────────────────── */
.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: 1180px;
  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.75rem;
  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.45rem;
  padding: 0.875rem 0.82rem;
  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 {
  position: relative;
  background: linear-gradient(145deg, #0a3d52 0%, #0d5e72 40%, #0e7490 70%, #1a5c6e 100%);
  color: white;
  padding: 4rem 2rem;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: -20%; left: -5%;
  width: 60%; height: 140%;
  background: radial-gradient(ellipse at center, rgba(102,171,178,0.22) 0%, transparent 65%);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.75rem;
  position: relative;
  z-index: 1;
}

.hero-poster {
  flex: 0 0 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
}
.hero-poster-card {
  margin: 0;
  min-width: 0;
}
.hero-poster-card:first-child {
  grid-column: 1 / -1;
  width: 68%;
  justify-self: center;
}
.poster-zoom-btn {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  padding: 0;
  font: inherit;
}
.hero-poster-card img {
  width: 100%;
  aspect-ratio: 4 / 5.65;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.34), 0 3px 12px rgba(0,0,0,0.16);
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.poster-zoom-btn:hover img,
.poster-zoom-btn:focus-visible img {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(0,0,0,0.42), 0 6px 18px rgba(0,0,0,0.2);
}
.hero-poster-card figcaption {
  margin-top: 0.45rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.hero-content { flex: 1; text-align: left; }

.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 18, 24, 0.78);
  padding: clamp(14px, 3vw, 32px);
}

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

.poster-modal img {
  max-width: min(92vw, 760px);
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.46);
  object-fit: contain;
  background: #fff;
}

.poster-modal-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

@media(max-width: 760px) {
  .hero-inner { flex-direction: column; gap: 2rem; }
  .hero-poster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    gap: 0.65rem;
  }
  .hero-poster-card {
    min-width: 118px;
  }
  .hero-poster-card:first-child {
    width: 72%;
  }
  .hero-poster-card img {
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.34);
  }
  .hero-poster-card figcaption {
    font-size: 0.66rem;
  }
  .hero-content { text-align: center; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(102,171,178,0.45);
  color: rgba(255,255,255,0.9);
  padding: 0.35rem 1rem 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
}
.hero-badge::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #f59e0b;
  border-radius: 2px;
  flex-shrink: 0;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.hero-title span {
  color: #f59e0b;
  font-weight: 500;
  font-size: 1.65rem;
  display: block;
  margin-top: 0.2rem;
}

.hero-sub {
  font-size: 0.98rem;
  color: rgba(255,255,255,0.68);
  margin-bottom: 2rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
@media(max-width: 760px) {
  .hero-stats { justify-content: center; }
}

.hero-stat {
  text-align: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 12px;
  padding: 0.6rem 1.1rem;
  backdrop-filter: blur(8px);
  min-width: 72px;
}
.hero-stat-num { font-size: 1.65rem; font-weight: 700; color: #f59e0b; line-height: 1; margin-bottom: 0.2rem; }
.hero-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.62); letter-spacing: 0.03em; white-space: nowrap; }

@keyframes heroCtaShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.hero-cta {
  display: inline-block;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 35%, #fde68a 50%, #f59e0b 65%, #d97706 100%);
  background-size: 200% auto;
  animation: heroCtaShimmer 3.5s linear infinite;
  color: #1a1a1a;
  padding: 0.875rem 2.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.03em;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245,158,11,0.5); }

/* ── 模块区域 ───────────────────────────────── */
.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; }

/* Canva 分层技巧 */
.canva-layering-panel {
  margin-top: 1.5rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.35rem;
}

.layering-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 1.25rem;
  align-items: center;
}

.mini-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.layering-copy h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.layering-copy p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
}

.layering-visual {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem;
}

.layering-visual img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.layer-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.layer-stack-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
}

.layer-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

.layer-stack-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.layer-stack-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.canva-steps-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
  align-items: stretch;
}

.canva-steps-card,
.canva-shot-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.canva-steps-card {
  padding: 1rem;
}

.canva-layer-steps {
  margin: 0;
  padding-left: 1.2rem;
}

.canva-layer-steps li {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.canva-layer-steps strong {
  color: var(--text);
}

.layering-warning {
  margin-top: 0.85rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
}

.canva-shot-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.shot-caption {
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.layering-fallback {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.85rem;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
}

.layering-fallback img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.layering-fallback strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.layering-fallback p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.layering-practice {
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--primary-light), #f0fdf4);
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 10px;
  padding: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.layering-practice strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.layering-practice span {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* 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: #fdf8f0;
  border: 3px solid #c8a96e;
  border-radius: 4px;
  padding: 0;
  box-shadow: 0 16px 60px rgba(180,140,80,0.18), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  position: relative;
}
#certificate::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(200,169,110,0.38);
  border-radius: 1px;
  pointer-events: none;
  z-index: 0;
}

.cert-inner {
  position: relative;
  text-align: center;
  padding: 3.5rem 4rem 2.5rem;
  overflow: hidden;
  z-index: 1;
}
.cert-inner::before {
  content: '';
  position: absolute;
  top: 22px; left: 22px;
  width: 56px; height: 56px;
  border-top: 2px solid #c8a96e;
  border-left: 2px solid #c8a96e;
}
.cert-inner::after {
  content: '';
  position: absolute;
  bottom: 72px; right: 22px;
  width: 56px; height: 56px;
  border-bottom: 2px solid #c8a96e;
  border-right: 2px solid #c8a96e;
}

.cert-logo {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(200,169,110,0.55);
  box-shadow: 0 4px 20px rgba(180,140,80,0.22);
  margin: 0 auto 0.5rem;
  display: block;
}
.cert-org {
  font-size: 0.76rem;
  color: #8a6b3a;
  margin-bottom: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cert-org::after {
  content: '';
  display: block;
  width: 56px; height: 1px;
  background: linear-gradient(90deg, transparent, #c8a96e, transparent);
  margin: 0.7rem auto 0.8rem;
}
.cert-seal-top {
  font-size: 3rem;
  margin-bottom: 0.3rem;
  filter: drop-shadow(0 2px 6px rgba(180,140,80,0.35));
}
.cert-heading {
  font-size: 2rem;
  font-weight: 900;
  color: #1a3d4a;
  margin-bottom: 0.15rem;
  letter-spacing: 0.38em;
}
.cert-heading-en {
  font-size: 0.78rem;
  color: #8a6b3a;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.cert-body { font-size: 0.92rem; color: #5a4a3a; margin-bottom: 0.35rem; }
.cert-name-display {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a3d4a;
  display: inline-block;
  min-width: 240px;
  padding: 0.25rem 1.25rem 0.55rem;
  margin: 0.5rem 0 1.5rem;
  background-image: linear-gradient(90deg, transparent 0%, #c8a96e 20%, #f5d48a 50%, #c8a96e 80%, transparent 100%);
  background-size: 100% 2px;
  background-position: bottom center;
  background-repeat: no-repeat;
}
.cert-course-label { font-size: 0.85rem; color: #7a6a5a; margin-bottom: 0.4rem; letter-spacing: 0.03em; }
.cert-course { font-size: 1.05rem; font-weight: 700; color: #1a3d4a; line-height: 1.65; margin-bottom: 0.35rem; letter-spacing: 0.02em; }
.cert-course-en { font-size: 0.78rem; color: #9a8a7a; font-style: italic; margin-bottom: 1.75rem; letter-spacing: 0.03em; }
.cert-meta {
  display: flex; justify-content: space-around; align-items: flex-end;
  border-top: 1px solid rgba(200,169,110,0.35);
  margin: 1.25rem 0 0.75rem; padding-top: 1.25rem;
}
.cert-meta-item { text-align: center; }
.cert-meta-label { font-size: 0.68rem; color: #9a8a7a; margin-bottom: 0.2rem; letter-spacing: 0.1em; text-transform: uppercase; }
.cert-meta-value { font-size: 0.88rem; font-weight: 600; color: #3a2a1a; }
.cert-sig-line { width: 110px; border-bottom: 1px solid #c8a96e; margin: 0 auto 0.2rem; height: 30px; }
.cert-footer-content {
  font-size: 0.74rem; color: #9a8a7a;
  border-top: 1px solid rgba(200,169,110,0.25);
  padding-top: 0.75rem; margin-top: 0.5rem; line-height: 1.7;
}
.cert-irb { font-size: 0.68rem; color: #b0a090; margin-top: 0.25rem; margin-bottom: 1.25rem; letter-spacing: 0.04em; }
.cert-print-btn {
  background: linear-gradient(135deg, #c8a96e 0%, #e8c878 50%, #c8a96e 100%);
  color: #3a2a0a;
  border: none; border-radius: 6px;
  padding: 0.7rem 2rem; font-size: 0.92rem;
  font-weight: 700; cursor: pointer; font-family: inherit;
  margin-bottom: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.04em;
}
.cert-print-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,169,110,0.5); }

/* ── 问卷横幅（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: 3px solid #c8a96e !important; box-shadow: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #certificate::before { border-color: rgba(200,169,110,0.38) !important; }
  .cert-inner::before, .cert-inner::after { border-color: #c8a96e !important; }
}

/* ── 响应式 ─────────────────────────────────── */
@media (max-width: 640px) {
  .lang-toggle {
    top: 8px;
    right: 8px;
  }
  .lang-toggle button {
    font-size: 0.7rem;
    padding: 0.36rem 0.5rem;
  }

  /* 导航 */
  .nav-brand-text { display: none; }
  .nav-brand { border-right: none; padding-right: 0.4rem; }
  .nav-feedback-btn { padding: 0.3rem 0.55rem; font-size: 0.74rem; }
  .mod-tab { padding: 0.65rem 0.45rem; font-size: 0.76rem; gap: 0.3rem; }
  .progress-dot { width: 6px; height: 6px; }

  /* Hero */
  #hero { padding: 2.5rem 1rem; }
  .hero-title { font-size: 1.55rem; }
  .hero-title span { font-size: 1.25rem; }
  .hero-sub { font-size: 0.85rem; }
  .hero-cta { padding: 0.75rem 1.75rem; font-size: 0.95rem; }

  /* 打字机 */
  .typewriter-box { padding: 1.25rem; }
  #typewriter-text { font-size: 1.05rem; min-height: 1.8rem; }

  /* 模块布局 */
  .module-section { padding: 1.75rem 0.75rem; }
  .section-title { font-size: 1.2rem; }
  .section-sub { font-size: 0.82rem; }

  /* 场景 */
  .notice-columns { grid-template-columns: 1fr; }
  .notice-arrow { display: none; }
  .scene-row { grid-template-columns: 64px 1fr; }
  .scene-output { display: none; }
  .canva-layering-panel { padding: 1rem; }
  .layering-intro { grid-template-columns: 1fr; }
  .layer-stack-grid { grid-template-columns: 1fr; }
  .canva-steps-grid { grid-template-columns: 1fr; }
  .canva-shot-card img { height: auto; max-height: none; }
  .layering-fallback { grid-template-columns: 1fr; }
  .layering-fallback img { max-height: 180px; }
  .layering-practice { flex-direction: column; align-items: stretch; }
  .layering-practice .btn-outline { text-align: center; }

  /* 证书 */
  .cert-inner { padding: 2rem 1.25rem 1.5rem; }
  .cert-inner::before, .cert-inner::after { width: 36px; height: 36px; }
  .cert-heading { font-size: 1.45rem; letter-spacing: 0.22em; }
  .cert-heading-en { font-size: 0.7rem; letter-spacing: 0.14em; }
  .cert-name-display { font-size: 1.45rem; min-width: 0; padding: 0.2rem 0.75rem 0.4rem; }
  .cert-course { font-size: 0.9rem; }
  .cert-inner { padding: 1.75rem 1rem 1.25rem; }

  /* 问卷卡 */
  .survey-card { flex-direction: column; }
  .survey-card-right { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
  .survey-banner { border-radius: var(--radius); }
}

@media (max-width: 480px) {
  /* 导航：隐藏「课程反馈」文字，仅保留图标 */
  .nav-feedback-btn { font-size: 0; padding: 0.35rem 0.5rem; }
  .nav-feedback-btn::before { content: '📋'; font-size: 1rem; }

  /* 问卷横幅竖排 */
  .survey-banner { flex-direction: column; align-items: flex-start; gap: 0.5rem; border-radius: var(--radius); }
  .survey-banner-text { min-width: 0; text-align: left; }

  /* 任务卡片保持单列 */
  #task-cards { grid-template-columns: 1fr; }

  /* 资源包单列 */
  .resources-grid { grid-template-columns: 1fr; }

  /* 场景选项竖排 */
  .scenario-tabs { flex-direction: column; }
  .scenario-tab { flex-direction: row; justify-content: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; }
  .scenario-tab-icon { font-size: 1.4rem; }

  /* 投票按钮缩小 */
  .poll-btn { padding: 0.875rem 1rem; min-width: 90px; }
  .poll-emoji { font-size: 1.5rem; }
}
