/* team-app.css — SPA 团队训练样式 */
/* 靛蓝配色，APP 风格 */

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

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-muted: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-primary: #4f46e5;
  --color-primary-soft: #eef2ff;
  --color-primary-border: #c7d2fe;
  --color-accent: #6366f1;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-success: #16a34a;
  --color-success-soft: #f0fdf4;
  --color-warning: #d97706;
  --color-warning-soft: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-soft: #fef2f2;
  --tab-height: 64px;
  --header-height: 52px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.05);
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-subtle);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === 首页：准备状态 === */
.home-container { }

.home-countdown {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
}

.countdown-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.countdown-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.countdown-phase {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-top: 0.625rem;
}

.phase-success { color: var(--color-success); background: var(--color-success-soft); }
.phase-warning { color: var(--color-warning); background: var(--color-warning-soft); }
.phase-danger { color: var(--color-danger); background: var(--color-danger-soft); }

.countdown-advice {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  line-height: 1.55;
}

.home-team-brief {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.home-team-id { font-weight: 800; }
.home-team-score { font-weight: 600; color: var(--color-text-secondary); }
.home-team-risk {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
}

.risk-critical { color: var(--color-danger); background: var(--color-danger-soft); }
.risk-warning, .risk-caution { color: var(--color-warning); background: var(--color-warning-soft); }
.risk-pass { color: var(--color-success); background: var(--color-success-soft); }

/* === 摸底测试 === */
.home-quiz {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.quiz-header { margin-bottom: 1rem; }

.quiz-title {
  font-size: 1rem;
  font-weight: 800;
}

.quiz-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.quiz-item {
  margin-bottom: 0.875rem;
}

.quiz-q {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  line-height: 1.45;
}

.quiz-options {
  display: flex;
  gap: 0.25rem;
}

.quiz-opt {
  flex: 1;
  padding: 0.5rem 0.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.quiz-opt:hover { border-color: var(--color-primary-border); }

.quiz-opt.selected {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* === 摸底结果 === */
.quiz-result {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.quiz-result-score {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.quiz-result-score small {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.quiz-result-level {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin: 0.5rem 0;
}

.level-success { color: var(--color-success); background: var(--color-success-soft); }
.level-warning { color: var(--color-warning); background: var(--color-warning-soft); }
.level-danger { color: var(--color-danger); background: var(--color-danger-soft); }

.quiz-result-suggestion {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* === 快捷入口 === */
.home-shortcuts {
  margin-top: 0.5rem;
}

.home-shortcuts-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.home-shortcut {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.home-shortcut:hover {
  border-color: var(--color-primary-border);
  box-shadow: var(--shadow-sm);
}

.home-shortcut span {
  font-size: 1.375rem;
  flex-shrink: 0;
}

.home-shortcut small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

/* === 密钥输入 === */
.key-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.key-gate-box {
  max-width: 360px;
  width: 100%;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.key-gate-team {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.key-gate-box h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.key-gate-box p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

/* === 顶部 header === */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
}

.back-btn {
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.back-btn:hover { background: var(--color-bg-muted); }

.team-name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.risk-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.175rem 0.5rem;
  border-radius: 99px;
}

/* === Tab 内容区 === */
.tab-content {
  padding: calc(var(--header-height) + 0.75rem) 1rem calc(var(--tab-height) + 1rem);
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
}

.loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* === 底部 5 Tab === */
.app-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: stretch;
  height: var(--tab-height);
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.app-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition);
}

.app-tab.active { color: var(--color-primary); }
.app-tab:hover { color: var(--color-primary); }

.app-tab-icon {
  font-size: 1.375rem;
  line-height: 1;
}

.app-tab-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* === 空状态 === */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.empty-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

/* === 通用按钮 === */
.btn-primary {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-secondary:hover { background: var(--color-border); }

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* === 速查卡滑动器 === */
.cards-slider {
  position: relative;
}

.cards-progress {
  height: 3px;
  background: var(--color-bg-muted);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.cards-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.cards-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.cards-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: background var(--transition);
}

.cards-dot.active {
  background: var(--color-primary);
}

.cards-viewport {
  position: relative;
  min-height: 300px;
}

.qcard {
  display: none;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.qcard.active {
  display: block;
}

.qcard-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.625rem;
  border-radius: 99px;
  margin-bottom: 0.625rem;
}

.emergency-label {
  color: var(--color-danger);
  background: var(--color-danger-soft);
  border: 1px solid #fca5a5;
}

.risk-label {
  color: var(--color-warning);
  background: var(--color-warning-soft);
}

.g4d-label {
  color: #9333ea;
  background: #faf5ff;
}

.qcard-title {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.cards-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0.5rem 0;
}

.cards-counter {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* === 紧急模式卡片 === */
.emergency-section {
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.say-section { background: var(--color-success-soft); }
.dont-section { background: var(--color-danger-soft); }

.emergency-header {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.say-header { color: var(--color-success); }
.dont-header { color: var(--color-danger); }

.emergency-item {
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.emergency-item strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text);
  margin-bottom: 0.125rem;
}

.emergency-text {
  color: var(--color-text-secondary);
}

/* === 队伍档案表 === */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.profile-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.profile-key {
  color: var(--color-text-muted);
  font-weight: 500;
  width: 5rem;
}

/* === 风险卡片 === */
.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

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

.risk-defense-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.risk-defense {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 0.375rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-primary-border);
}

/* === G4d 卡片 === */
.g4d-pair {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.g4d-pair:last-child { border-bottom: none; margin-bottom: 0; }

.g4d-team {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.g4d-risk {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-danger);
  background: var(--color-danger-soft);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  margin-left: 0.375rem;
}

.g4d-row {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.g4d-key {
  display: inline-block;
  width: 2.5rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.g4d-action {
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 0.375rem;
}

/* === 证据页码表 === */
.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.evidence-table th {
  text-align: left;
  font-weight: 600;
  padding: 0.5rem;
  background: var(--color-bg-muted);
  color: var(--color-text);
}

.evidence-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}

.evidence-page {
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.evidence-fix td {
  background: var(--color-danger-soft);
}

/* === 防守句式 === */
.defense-phrase {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

/* === 好答案/坏答案对照 === */
.compare-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.compare-item:last-child { border-bottom: none; margin-bottom: 0; }

.compare-topic {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.compare-good, .compare-bad {
  font-size: 0.8125rem;
  line-height: 1.55;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.375rem;
}

.compare-good {
  background: var(--color-success-soft);
  color: var(--color-text-secondary);
}

.compare-bad {
  background: var(--color-danger-soft);
  color: var(--color-text-secondary);
}

.compare-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.375rem;
  border-radius: 4px;
  margin-right: 0.375rem;
}

.good-tag { color: var(--color-success); background: white; }
.bad-tag { color: var(--color-danger); background: white; }

/* === 知识点自查 === */
.check-container { }

.check-header { margin-bottom: 1.25rem; }

.check-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.check-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.check-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.check-item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

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

.check-item-name {
  font-weight: 700;
  font-size: 0.9375rem;
}

.check-item-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.check-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
}

.check-btn {
  padding: 0.5rem 0.375rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.check-btn:hover { border-color: var(--color-primary-border); }

.check-btn.active-ok {
  background: var(--color-success-soft);
  border-color: var(--color-success);
  color: var(--color-success);
}

.check-btn.active-partial {
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.check-btn.active-miss {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.check-btn.active-wrong {
  background: #fef2f2;
  border-color: #991b1b;
  color: #991b1b;
}

.check-followup {
  margin-top: 0.75rem;
  border-top: 1px solid var(--color-border-light);
  padding-top: 0.5rem;
}

.check-followup summary {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.followup-item {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
}

.followup-q {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.followup-why {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* === 总评区 === */
.check-summary {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-border);
}

.check-summary-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.score-dim {
  margin-bottom: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
}

.score-dim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.score-dim-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.score-dim-input {
  display: flex;
  gap: 0.25rem;
}

.score-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.score-btn:hover { border-color: var(--color-primary-border); }

.score-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.rubric-detail {
  margin-top: 0.5rem;
}

.rubric-detail summary {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.rubric-row {
  margin-top: 0.375rem;
  padding: 0.375rem 0;
  border-top: 1px solid var(--color-border-light);
}

.rubric-name {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.rubric-levels {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.rubric-expert, .rubric-prof, .rubric-emerg {
  font-size: 0.6875rem;
  line-height: 1.4;
}

.rubric-expert { color: var(--color-success); }
.rubric-prof { color: var(--color-warning); }
.rubric-emerg { color: var(--color-danger); }

/* === G2/G4 风险判定 === */
.risk-judge {
  margin: 1rem 0;
}

.risk-judge-title {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.risk-judge-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
}

.risk-j-btn {
  padding: 0.625rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.risk-j-btn:hover { border-color: var(--color-primary-border); }

.risk-j-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* === 备注和保存 === */
.check-notes { margin: 1rem 0; }

.check-textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.check-textarea:focus { border-color: var(--color-primary); }

.check-save {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  transition: all var(--transition);
}

/* === 压力测试 === */
.pressure-select { }

.pressure-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.pressure-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.pressure-modes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pressure-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.pressure-mode-btn:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.mode-icon { font-size: 2rem; }

.mode-name {
  font-size: 1rem;
  font-weight: 700;
}

.mode-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.pressure-container { }

.pressure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.pressure-mode-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.pressure-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

.pressure-why {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-warning-soft);
  border-radius: var(--radius-sm);
}

.pressure-answers, .pressure-followups {
  margin-bottom: 0.75rem;
}

.pressure-answers summary, .pressure-followups summary {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  margin-bottom: 0.375rem;
}

/* === 判断按钮 === */
.pressure-judge { margin: 0.75rem 0; }

.pressure-judge-title, .pressure-flags-title {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.pressure-judge-btns {
  display: flex;
  gap: 0.375rem;
}

.pj-btn {
  flex: 1;
  padding: 0.5rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.pj-btn:hover { border-color: var(--color-primary-border); }

.pj-btn.active-ok {
  background: var(--color-success-soft);
  border-color: var(--color-success);
  color: var(--color-success);
}

.pj-btn.active-partial {
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.pj-btn.active-miss {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* === 行为红旗 === */
.pressure-flags { margin: 0.75rem 0; }

.pressure-flags-btns {
  display: flex;
  gap: 0.375rem;
}

.flag-btn {
  padding: 0.375rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: 99px;
  background: white;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.flag-btn:hover { border-color: var(--color-warning); }

.flag-btn.active {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* === 囚徒困境 === */
.prisoner-section { margin: 0.75rem 0; }

.prisoner-inputs { margin-top: 0.75rem; }

.prisoner-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.prisoner-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
  width: 4.5rem;
}

.prisoner-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
}

.prisoner-input:focus { border-color: var(--color-primary); }

.prisoner-result {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 0.375rem;
}

.prisoner-result.consistent {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.prisoner-result.inconsistent {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* === 直接定罪卡片 === */
.accuse-card {
  border-color: var(--color-danger);
  border-width: 2px;
}

.accuse-statement {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-danger);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: var(--color-danger-soft);
  border-radius: var(--radius-md);
}

/* === 学习指引 === */
.learn-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.learn-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.learn-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 1.25rem 0 0.5rem;
}

.learn-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.learn-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.learn-topic {
  font-weight: 700;
  font-size: 0.9375rem;
}

.learn-risk {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.175rem 0.5rem;
  border-radius: 99px;
}

.learn-risk-danger { color: var(--color-danger); background: var(--color-danger-soft); }
.learn-risk-warning { color: var(--color-warning); background: var(--color-warning-soft); }
.learn-risk-success { color: var(--color-success); background: var(--color-success-soft); }

.learn-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.learn-row strong { color: var(--color-text); }

.learn-row-danger {
  color: var(--color-danger);
  font-weight: 600;
}

.learn-icon {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.learn-link {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  margin-right: 0.75rem;
}

.learn-link:hover { text-decoration: underline; }

.learn-redflag-list { margin-bottom: 1rem; }

.learn-redflag {
  font-size: 0.8125rem;
  color: var(--color-danger);
  padding: 0.5rem 0.75rem;
  background: var(--color-danger-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 0.375rem;
  border-left: 3px solid var(--color-danger);
}

/* === 训练记录 === */
.history-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.history-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.history-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.stat-card {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.875rem 0.5rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.history-list { }

.history-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.history-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.history-scenario {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
}

.history-scores {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.375rem;
}

.history-score-chip {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.175rem 0.5rem;
  background: var(--color-bg-muted);
  border-radius: 99px;
  color: var(--color-text-secondary);
}

.history-risk {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.history-pressure-summary {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hp-ok { color: var(--color-success); }
.hp-doubt { color: var(--color-warning); }
.hp-fail { color: var(--color-danger); }

.history-notes {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* === 首次引导 === */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.guide-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem 1.5rem;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.guide-step-indicator {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.guide-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

.guide-title {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
}

.guide-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.guide-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.guide-actions .btn-primary,
.guide-actions .btn-secondary {
  flex: 1;
}

.guide-skip {
  display: block;
  margin: 0.75rem auto 0;
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
}

.guide-skip:hover { color: var(--color-text); }

/* === 打印隐藏导航 === */
@media print {
  .app-header, .app-tabs { display: none; }
  .tab-content { padding: 0; }
}
