/* challenge.css — 自 components.css 连续拆分（原 2293-3229 行）。保持级联顺序，勿随意重排各文件引入次序 */


.challenge-stage.locked .stage-num {
  background: var(--color-locked);
  box-shadow: none;
}

.challenge-stage.locked .stage-label {
  color: var(--color-text-tertiary);
}

.challenge-stage.completed .stage-num {
  background: linear-gradient(135deg, var(--status-emerald), var(--accent-emerald));
}

.challenge-stage.active .stage-num {
  box-shadow: 0 0 0 4px rgba(94, 106, 210, 0.2);
}

.stage-content {
  flex: 1;
  background: var(--color-surface-1);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}

.challenge-stage:not(.locked):hover .stage-content {
  border-color: rgba(94, 106, 210, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(94, 106, 210, 0.12);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stage-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
}

.stage-badge {
  font-size: var(--font-size-xs);
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-weight: 500;
}

.stage-badge.complete {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-emerald);
}

.stage-badge.available {
  background: rgba(94, 106, 210, 0.1);
  color: var(--color-primary);
}

.stage-badge.locked {
  background: rgba(148, 163, 184, 0.1);
  color: var(--color-text-tertiary);
}

.stage-desc {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.stage-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.module-tag {
  font-size: var(--font-size-xs);
  padding: 4px 10px;
  background: var(--color-background);
  border-radius: 8px;
  color: var(--color-text-secondary);
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-subtle);
}

.stage-requirement {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}





.btn-locked {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  font-style: italic;
}

.challenge-flow {
  max-width: 960px;
  margin: 0 auto;
}

/* 桌面端：Hero 与内容区同宽（960px 居中），消除右侧留白 */
@media (min-width: 769px) {
  .ch-hero {
    margin: 0 auto;
    max-width: 960px;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0 0 var(--body-radius, 20px) var(--body-radius, 20px);
  }
  .ch-body {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 闯关步骤指示器 · Fathom 数据叙事风格（方案 A） */
.step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  --si-primary: var(--color-primary);
  --si-primary-2: var(--color-primary-light);
  --si-muted: var(--color-text-tertiary);
  --si-border: var(--icon-border);
  --si-grad: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

.step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 56px;
}

/* 步骤指示器：已完成=翠绿 / 当前=主色+外发光 / 未完成=灰底灰图标（SVG 图标，无数字） */
.step-dot {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 2px solid transparent;
  background: #E5E7EB;
  color: #9CA3AF;
  transition: background var(--duration-slow) var(--ease-smooth), color var(--duration-slow) var(--ease-smooth), border-color var(--duration-slow) var(--ease-smooth), box-shadow var(--duration-slow) var(--ease-smooth), transform var(--duration-slow) var(--ease-smooth);
}

.step-dot svg {
  width: 22px;
  height: 22px;
}

.step-dot.completed {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.step-dot.completed::after {
  content: "✓";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  color: #059669;
  font-size: var(--font-size-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.step-dot.active {
  background: linear-gradient(135deg, var(--color-primary), var(--accent-purple, #8B5CF6));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(94, 106, 210, 0.2), 0 4px 10px rgba(94, 106, 210, 0.4);
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(94, 106, 210, 0.40); }
  50% { box-shadow: 0 10px 30px rgba(94, 106, 210, 0.62); }
}

.step-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--duration-slow) var(--ease-smooth);
}

.step-col.active-col .step-label {
  color: var(--color-text-primary);
  font-weight: 600;
}

.step-line {
  flex: 0 0 40px;
  height: 2px;
  border-radius: 2px;
  background: #E5E7EB;
  margin-top: 23px;
  transition: background var(--duration-slow) var(--ease-smooth);
}

.step-line.done {
  background: linear-gradient(90deg, #10B981, #059669);
}

.step-content {
  background: var(--color-surface-1);
  border-radius: var(--radius-xl);
  padding: 32px;
  min-height: 300px;
}

.read-step h3,
.quiz-step h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.read-step p,
.quiz-step p {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.read-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.read-module-card {
  background: var(--color-background);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--color-border-subtle);
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}

.read-module-card:hover {
  border-color: var(--shadow-primary-sm);
  transform: translateY(-2px);
}

.read-module-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--color-primary);
}

.read-module-icon svg {
  width: 100%;
  height: 100%;
}

.read-module-name {
  font-size: var(--font-size-md);
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}







.quiz-actions {
  text-align: center;
  margin-bottom: 24px;
}





.step-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-subtle);
}











.pass-result,
.fail-result {
  text-align: center;
  padding: 40px;
}

.pass-icon,
.fail-icon {
  font-size: var(--font-size-6xl);
  margin-bottom: 20px;
}

.pass-result h3,
.fail-result h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: 12px;
}

.pass-result p,
.fail-result p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.score-display {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.fail-message {
  font-size: var(--font-size-md);
  color: var(--color-text-tertiary);
  margin-bottom: 24px;
}

.pass-actions,
.fail-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}











/* 闯关模式 - 阅读步骤文章链接 */
.read-article-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.read-article-link {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(94, 106, 210, 0.08);
  border: 1px solid var(--color-border-subtle, rgba(94, 106, 210, 0.2));
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}

.read-article-link:hover {
  background: rgba(94, 106, 210, 0.16);
}

.read-article-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2, rgba(148, 163, 184, 0.06));
  border: 1px dashed var(--color-border-subtle, var(--icon-border));
  text-align: center;
}

.read-article-empty .empty-icon {
  width: 28px;
  height: 28px;
  color: var(--color-text-tertiary, var(--color-text-tertiary));
  opacity: 0.7;
}

.read-article-empty p {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary, var(--color-text-tertiary));
  margin: 0;
}

.read-article-empty .btn-link {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(94, 106, 210, 0.1);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}

.read-article-empty .btn-link:hover {
  background: rgba(94, 106, 210, 0.18);
}

/* 闯关阅读步骤 - 方案3：双层概览 + 文章流 */
.read-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.read-mod-card {
  background: var(--color-background);
  border: 1px solid var(--color-border, var(--color-border));
  border-radius: 16px;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}
.read-mod-card:hover {
  border-color: rgba(94, 106, 210, 0.4);
  transform: translateY(-2px);
}
.read-mod-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(94, 106, 210, 0.18);
}
.read-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(var(--color-primary) calc(var(--p, 0) * 1%), rgba(94, 106, 210, 0.15) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.read-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--color-surface-1, #FFFFFF);
}
.read-ring span {
  position: relative;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-primary, var(--color-text-primary));
}
.read-mod-icon {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
  line-height: 0;
}
.read-mod-name {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text-primary, var(--color-text-primary));
}
.read-list-wrap {
  margin-bottom: 24px;
}
.read-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, var(--color-text-primary));
  margin: 0 0 12px;
}
.read-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.read-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-background);
  border: 1px solid var(--color-border, var(--color-border));
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}
.read-item:hover {
  border-color: rgba(94, 106, 210, 0.4);
  background: rgba(94, 106, 210, 0.06);
}
.read-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(94, 106, 210, 0.12);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.read-title {
  flex: 1;
  font-size: var(--font-size-md);
  color: var(--color-text-primary, var(--color-text-primary));
}
.read-item.done .read-title {
  color: var(--color-text-tertiary, var(--color-text-tertiary));
  text-decoration: line-through;
}
.read-check {
  color: var(--status-emerald);
  font-weight: 700;
  flex-shrink: 0;
}

/* 文章阅读器（内联全屏，替代弹窗） */
.article-reader {
  display: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 40px;
  animation: reader-fade var(--duration-normal) var(--ease-smooth);
}
@keyframes reader-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* 阅读态：沉浸式，隐藏顶部模式切换导航 */
body.reader-mode .navbar {
  display: none;
}
body.reader-mode .main-content {
  margin-top: 0;
}
.reader-article {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}
.reader-head { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.reader-head h2 { font-size: var(--font-size-2xl); font-weight: 700; line-height: 1.35; margin: 0; color: var(--color-text, var(--color-text-primary)); }
.reader-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary, var(--color-text-secondary));
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--color-surface-2, rgba(94, 106, 210, 0.06));
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
}
.reader-section-title { font-size: var(--font-size-base); font-weight: 700; margin: 24px 0 12px; color: var(--color-text, var(--color-text-primary)); }
.key-points { display: flex; flex-direction: column; gap: 10px; }
.kp-card {
  padding: 12px 16px;
  background: var(--color-surface-2, rgba(148, 163, 184, 0.07));
  border: 1px solid var(--color-border-subtle, var(--color-surface-1));
  border-radius: var(--radius-lg);
}
.kp-card h4 { font-size: var(--font-size-md); font-weight: 700; color: var(--color-primary); margin: 0 0 4px; }
.kp-card p { font-size: var(--font-size-md); line-height: 1.65; color: var(--color-text-secondary, var(--color-text-secondary)); margin: 0; }
.reader-original {
  margin-top: 24px;
  border-top: 1px dashed var(--color-border-subtle, var(--icon-border));
  padding-top: 16px;
}
.reader-original summary { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-tertiary, var(--color-text-tertiary)); cursor: pointer; }
.reader-original .detail-body { margin-top: 14px; }

/* 闯关模式 - 打印证书按钮 */


/* 根因C：闯关数据未就绪时的占位（非白屏） */
.challenge-loading {
  padding: 24px;
  text-align: center;
  color: var(--color-text-tertiary, var(--color-text-tertiary));
  font-size: var(--font-size-md);
  background: var(--color-surface-2, rgba(148, 163, 184, 0.06));
  border: 1px dashed var(--color-border-subtle, var(--color-border));
  border-radius: var(--radius-lg);
  margin-top: 8px;
}



/* 结业证书样式已抽到 certificate.css（闯关页与 certificate.html 共用） */

/* 闯关模式 - 移动端适配 */
@media (max-width: 768px) {
  .step-indicator {
    gap: 0;
  }

  .step-line {
    flex-basis: 24px;
  }

  .step-content {
    padding: 20px 16px;
    min-height: auto;
  }

  .pass-result,
  .fail-result {
    padding: 24px 16px;
  }
}

/* ===== 方案B：章节地图 + 线性路径 ===== */
.chapter-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 8px;
}
.chapter-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface-1);
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}
.chapter-card:hover {
  transform: translateY(-4px);
  border-color: var(--shadow-primary-sm);
  box-shadow: var(--glow-primary);
}
.chapter-card.done { border-color: rgba(52, 211, 153, 0.35); }
.chapter-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: rgba(94, 106, 210, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chapter-icon svg { width: 28px; height: 28px; }
.chapter-body { flex: 1; min-width: 0; }
.chapter-title { font-size: 17px; font-weight: 700; color: var(--color-text-primary); }
.chapter-sub { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin: 2px 0 8px; }
.chapter-progress { display: flex; align-items: center; gap: 10px; }
.chapter-bar {
  flex: 1; height: 8px; background: var(--color-border); border-radius: 99px; overflow: hidden;
}
.chapter-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 99px;
}
.chapter-card.done .chapter-bar span { background: linear-gradient(90deg, var(--status-emerald), var(--accent-emerald)); }
.chapter-pct { font-size: var(--font-size-xs); color: var(--color-text-tertiary); }


.path-list {
  display: flex; flex-direction: column; gap: 14px; max-width: 1200px; margin: 16px auto 0; position: relative;
}
.path-list::before {
  content: ''; position: absolute; left: calc(16px + 22px - 1.5px); top: 30px; bottom: 30px; width: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--accent-indigo)); border-radius: 2px; z-index: 0;
}
.path-node {
  display: flex; align-items: center; gap: 16px; position: relative; z-index: 1;
  background: var(--color-surface-1); border: 2px solid transparent; border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); transition: background var(--duration-normal) var(--ease-smooth), color var(--duration-normal) var(--ease-smooth), border-color var(--duration-normal) var(--ease-smooth), box-shadow var(--duration-normal) var(--ease-smooth), transform var(--duration-normal) var(--ease-smooth);
}
.path-node.open, .path-node.current { cursor: pointer; }
.path-node.open:hover, .path-node.current:hover {
  transform: translateY(-4px); border-color: var(--shadow-primary-sm); box-shadow: var(--glow-primary);
}
.node-dot {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: var(--font-size-base); font-weight: 700;
  box-shadow: 0 4px 12px var(--shadow-primary-sm);
}
.path-node.done .node-dot { background: linear-gradient(135deg, var(--status-emerald), var(--accent-emerald)); }
.path-node.locked .node-dot { background: var(--color-locked); box-shadow: none; color: #fff; }
.path-node.current .node-dot { animation: nodePulse 1.8s infinite; }
@keyframes nodePulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 106, 210, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(94, 106, 210, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 106, 210, 0); }
}
.node-body { flex: 1; min-width: 0; }
.node-title { font-size: var(--font-size-base); font-weight: 700; color: var(--color-text-primary); }
.node-sub { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin: 2px 0 4px; }
.node-meta { font-size: var(--font-size-xs); color: var(--color-text-tertiary); }
.path-node.locked .node-title,
.path-node.locked .node-sub,
.path-node.locked .node-meta { color: var(--color-text-tertiary); }
.node-go { flex-shrink: 0; color: var(--color-primary); font-size: var(--font-size-xl); font-weight: 700; }
.path-node.locked .node-go { display: none; }

@media (max-width: 768px) {
  .chapter-map { grid-template-columns: 1fr; padding: 0 16px; }
  .path-head { padding: 0 16px; }
  .path-list { padding: 0 16px; margin-top: 16px; }
  .chapter-card { padding: 16px; }
  .path-node { padding: 14px 16px; gap: 14px; }
  /* 移动端：列表 padding 16px + 节点左 padding 14px + 半径 22px，线宽 3px 取半 */
  .path-list::before { left: calc(16px + 14px + 22px - 1.5px); }
}

/* 打印规则在 certificate.css（与证书结构同处一文件，避免两处漂移） */

/* ===== 闯关完成页 · 方案A渐变炫彩 + 玻璃态数据条 ===== */
.pass-page {
  max-width: 1200px;
  margin: 0 auto;
}

.pass-hero {
  background: var(--hero-grad);
  border-radius: 0 0 var(--hero-radius) var(--hero-radius);
  position: relative;
  overflow: hidden;
  margin: 0 -16px;
  padding: 0 16px 28px;
}

.pass-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--hero-spot) 0%, transparent 70%);
  border-radius: 50%;
}

.pass-hero::after {
  content: '';
  position: absolute;
  bottom: 20px; left: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--hero-spot) 0%, transparent 70%);
  border-radius: 50%;
}

.pass-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
}

/* 勋章：通关奖励，放大呈现；名称自适应宽度不换行 */
.pass-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  width: auto; /* 覆盖 .pf-badge 的 86px 固定宽，让勋章名按文字宽度展开 */
}

.pass-badge .pf-badge-ico {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
  color: #fff;
}

.pass-badge .pf-badge-ico svg {
  width: 48px;
  height: 48px;
}

/* 去掉名称的底部容器，纯文字直接落在渐变 Hero 上 */
.pass-badge .pf-badge-name {
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pass-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin: 0 0 6px;
}

.pass-stage {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* 玻璃态数据条 */
.pass-glass-bar {
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 18px;
  padding: 16px 8px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.2);
}

.pass-glass-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.pass-glass-item + .pass-glass-item {
  border-left: 1px solid rgba(255,255,255,0.2);
}

.pass-glass-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.pass-glass-ico svg {
  width: 16px;
  height: 16px;
}

/* ===== 新版闯关页面：渐变Hero + 章节Tab + 横向地图 ===== */
.ch-hero {
  background: var(--hero-grad);
  padding: 8px 0 18px;
  position: relative;
  overflow: hidden;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.ch-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 160px; height: 160px;
  background: var(--hero-spot);
  border-radius: 50%;
}
.ch-hero::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 100px; height: 100px;
  background: var(--hero-spot);
  border-radius: 50%;
}
.ch-hero > * { position: relative; z-index: 2; }

.ch-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 4px;
}
.ch-nav-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
}
.ch-nav-back svg { width: 18px; height: 18px; stroke: #fff; }
.ch-nav-title {
  font-size: 17px; font-weight: 700; color: #fff;
}
.ch-nav-right {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ch-nav-right svg { width: 18px; height: 18px; stroke: #fff; }

/* 章节Tab */
.ch-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 0 0;
}
.ch-tab {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.ch-tab.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ch-tab-name { font-size: 14px; font-weight: 700; }
.ch-tab-desc { font-size: 10px; opacity: 0.8; margin-top: 2px; }

/* 闯关内页 Hero 标题区（替代旧 h2+p 纯文字） */
.ch-stage-hero-info {
  padding: 8px 0 14px;
}
.ch-stage-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.ch-stage-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* 白色内容区 */
.ch-body {
  background: var(--body-soft);
  padding: 20px 16px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  margin-top: -10px;
  border-radius: 20px 20px 0 0;
  position: relative;
  z-index: 3;
  min-height: 420px;
}

/* 关卡地图标题 */
.ch-map-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-primary);
}
.ch-map-progress { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; }

/* 横向关卡地图 */
.ch-stage-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  padding: 0 4px;
}
.ch-stage-map::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: linear-gradient(90deg, #10B981 0%, #10B981 33%, #5E6AD2 33%, #5E6AD2 66%, #E5E7EB 66%, #E5E7EB 100%);
  border-radius: 2px;
  z-index: 0;
}
.ch-map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.ch-map-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  border: 3px solid transparent;
  transition: background var(--duration-normal), border-color var(--duration-normal), box-shadow var(--duration-normal), transform var(--duration-normal);
}
.ch-map-circle.done {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: rgba(16,185,129,0.35);
  box-shadow: 0 4px 10px rgba(16,185,129,0.4);
  color: #fff;
}
.ch-map-circle.current {
  background: var(--color-primary, #5E6AD2);
  border-color: rgba(94,106,210,0.45);
  box-shadow: 0 0 0 4px rgba(94,106,210,0.18), 0 4px 12px rgba(94,106,210,0.35);
  color: #fff;
}
.ch-map-circle.open {
  background: #ffffff;
  border: 2.5px solid var(--color-primary, #5E6AD2);
  color: var(--color-primary, #5E6AD2);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(94, 106, 210, 0.18);
}
.ch-map-circle.locked {
  background: #F3F4F6;
  border: 2.5px solid #E5E7EB;
  color: #9CA3AF;
  font-size: 14px;
}
[data-theme="dark"] .ch-map-circle.open {
  background: rgba(124, 134, 224, 0.16);
  border-color: rgba(124, 134, 224, 0.7);
  color: #C7CCF5;
}
[data-theme="dark"] .ch-map-circle.locked {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #6B7280;
}
.ch-map-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.ch-map-node.current .ch-map-label { color: var(--color-primary); }

/* 当前关卡卡片 */
.ch-current-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
}

/* 桌面端侧栏：默认隐藏，仅桌面展开 */
.ch-side { display: none; }
.ch-side-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}
.ch-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ch-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-smooth), color var(--duration-fast) var(--ease-smooth), background var(--duration-fast) var(--ease-smooth);
}
.ch-side-item:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ch-side-item.is-current {
  border-color: var(--color-primary);
  background: rgba(94, 106, 210, 0.06);
  color: var(--color-primary);
  font-weight: 600;
}
.ch-side-item.is-done { color: var(--status-emerald); }
.ch-side-item.is-locked { opacity: 0.6; cursor: default; }
.ch-side-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-border-strong);
  flex-shrink: 0;
}
.ch-side-item.is-done .ch-side-dot { background: var(--status-emerald); }
.ch-side-item.is-current .ch-side-dot { background: var(--color-primary); }
.ch-side-no { font-weight: 700; }
.ch-side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-side-lock { font-size: 12px; }

/* 桌面端（≥769px）：Hero 保留，body 改为双栏，侧栏显示 */
@media (min-width: 769px) {
  .ch-body {
    max-width: 1080px;
    margin: 24px auto 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    min-height: 420px;
  }
  .ch-main-col { min-width: 0; }
  .ch-stage-map {
    justify-content: flex-start;
    gap: 36px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .ch-current-card { margin-bottom: 0; }
  .ch-side {
    display: block;
    position: sticky;
    top: 80px;
    background: var(--color-surface);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
  }
}
.ch-cc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ch-cc-title { font-size: 17px; font-weight: 700; color: var(--color-text-primary); }
.ch-cc-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
}
.ch-cc-status.done {
  background: rgba(16,185,129,0.1);
  color: #10B981;
}
.ch-cc-status.doing {
  background: rgba(94,106,210,0.1);
  color: var(--color-primary);
}
.ch-cc-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ch-progress-bar {
  height: 8px;
  background: var(--color-border-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5E6AD2, #8B5CF6);
  border-radius: 4px;
  transition: width 0.3s;
}
.ch-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-bottom: 14px;
}
.ch-btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #5E6AD2, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(94,106,210,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ch-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(94,106,210,0.45);
}

.pass-glass-num {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.pass-glass-label {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 白色内容区 */
.pass-body {
  padding: 24px 0 40px;
}

/* 答题卡 */
.pass-answer-card {
  background: var(--color-surface, #fff);
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.pass-answer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pass-answer-legend {
  font-size: 11px;
  color: var(--color-text-tertiary);
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: center;
}

.pass-answer-legend .dot-right,
.pass-answer-legend .dot-wrong {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.pass-answer-legend .dot-right { background: var(--accent-emerald); }
.pass-answer-legend .dot-wrong { background: var(--status-red, #B91C1C); }

.pass-answer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  justify-content: space-between;
}

.pass-answer-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.pass-answer-cell.right {
  background: #E8F8F0;
  color: var(--accent-emerald);
  border: 1px solid rgba(16,185,129,0.2);
}

.pass-answer-cell.wrong {
  background: #FFF0F0;
  color: var(--status-red, #B91C1C);
  border: 1px solid rgba(239,68,68,0.2);
}

/* 按钮区 */
.pass-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-retry-pass {
  flex: 1;
  padding: 14px;
  background: var(--color-surface, #fff);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-retry-pass:hover {
  background: rgba(94,106,210,0.04);
}

.btn-next-pass {
  flex: 1;
  padding: 14px;
  /* 主按钮不带琥珀末端：右端白字对比度仅 2.2:1 */
  background: linear-gradient(135deg, var(--color-primary), var(--accent-purple, #8B5CF6));
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(94,106,210,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-next-pass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(94,106,210,0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .pass-hero {
    margin: 0 -16px;
    padding: 0 16px 24px;
  }
  .pass-title {
    font-size: 22px;
  }
  .pass-glass-num {
    font-size: 18px;
  }
  .pass-answer-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== 闯关结果页：星级 / 未解锁勋章提示 / 失败文案 ===== */
.pass-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 4px;
}
.pass-star {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.32);
}
.pass-star.is-on {
  color: #FFD34D;
  filter: drop-shadow(0 2px 6px rgba(255, 180, 0, 0.45));
}
.pass-fail-hint {
  margin-top: 8px;
  font-size: var(--font-size-xs);
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
}
