/* ============================================
   乡音记 · 认知守护模块样式
   Taste Skill 标准：温暖纸感 · 中性阴影 · 非对称布局
   ============================================ */

/* ===== 页面 Hero ===== */
.health-hero {
  padding: var(--sp-10) var(--sp-5) var(--sp-6);
  text-align: center;
  background: var(--bg);
}
.health-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--gold-bg);
  color: var(--gold);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-4);
}
.health-hero-tag svg {
  color: var(--gold);
  flex-shrink: 0;
}
.health-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
  color: var(--gold);
  display: inline-block;
}
.health-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.health-intro {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== 区块布局（非对称） ===== */
.health-section {
  padding: var(--sp-6) 0;
}
.health-top { padding-bottom: var(--sp-4); }
.health-bottom { padding-top: var(--sp-4); }
.health-top-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.health-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: var(--sp-5);
  align-items: start;
}
.section-block-title {
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.section-block-title::before {
  content: '';
  width: 5px;
  height: 22px;
  background: var(--gold);
  border-radius: 3px;
}

/* ===== 图表卡片 ===== */
.health-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline, var(--rule));
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.chart-title {
  font-size: 1.3rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.chart-title svg {
  color: var(--gold);
  flex-shrink: 0;
}
.chart-sub {
  font-size: 0.85rem;
  color: var(--muted);
}
.chart-summary {
  text-align: right;
}
.chart-avg {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.01em;
}
.chart-avg span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}
.chart-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
  font-size: 0.88rem;
  font-weight: 700;
}
.chart-trend.up {
  color: var(--sage);
  background: var(--sage-soft);
}
.chart-trend.down {
  color: var(--terra);
  background: var(--terra-soft);
}

/* 图表容器 — 纯色背景 + 内阴影 */
.chart-svg-wrap {
  width: 100%;
  background: var(--bg-warm);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-2);
  border: 1px solid var(--hairline, var(--rule));
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-grid-line {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart-axis-label {
  fill: var(--muted);
  font-size: 13px;
  font-family: var(--font-sans);
}
.chart-y-label { font-size: 12px; fill: var(--muted-dim); }

/* 图表面积与折线 — 纯色填充与描边 */
.chart-area {
  fill: var(--gold-bg);
}
.chart-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}
.chart-point { cursor: pointer; }
.point-hit {
  fill: transparent;
}
.point-dot {
  fill: var(--bg-card);
  stroke: var(--gold);
  stroke-width: 3;
  transition: r 0.2s var(--ease), stroke-width 0.2s var(--ease);
}
.chart-point:hover .point-dot {
  stroke-width: 4;
  r: 7;
}
.point-tooltip {
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}
.chart-point:hover .point-tooltip {
  opacity: 1;
}
.tooltip-bg {
  fill: var(--ink);
  opacity: 0.92;
}
.tooltip-day {
  fill: var(--gold-soft);
  font-size: 11px;
  font-family: var(--font-sans);
}
.tooltip-score {
  fill: #ffffff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-serif);
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  font-size: 0.82rem;
  color: var(--muted);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--gold);
}

/* ===== 测验卡片 ===== */
.health-quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline, var(--rule));
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.quiz-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.quiz-title {
  font-size: 1.3rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.quiz-title svg {
  color: var(--gold);
  flex-shrink: 0;
}
.quiz-sub { font-size: 0.85rem; color: var(--muted); }
.quiz-type-tag {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--gold-bg);
  color: var(--gold);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}

/* 进度条 */
.quiz-progress {
  margin-bottom: var(--sp-4);
}
.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.quiz-progress-track {
  height: 8px;
  background: var(--rule-soft);
  border-radius: var(--r-full);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 20%;
  background: var(--gold);
  border-radius: var(--r-full);
  transition: width 0.5s var(--ease-spring);
}

/* 测验舞台 */
.quiz-stage {
  min-height: 180px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: var(--sp-6) var(--sp-3);
}
.empty-state-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-3);
}
.empty-state-icon svg {
  color: var(--gold-light);
}
.empty-state p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* 记忆阶段 */
.quiz-memory {
  text-align: center;
  padding: var(--sp-3) 0;
}
.memory-label {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}
.memory-words {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.memory-word {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--gold);
  background: var(--gold-bg);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-5);
  box-shadow: var(--shadow-sm);
  animation: scaleIn var(--dur-slow) var(--ease-spring) both;
}
.memory-word:nth-child(1) { animation-delay: 0.05s; }
.memory-word:nth-child(2) { animation-delay: 0.2s; }
.memory-word:nth-child(3) { animation-delay: 0.35s; }
.memory-countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-warm);
  border-radius: var(--r-full);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.memory-countdown #memoryCount {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--terra);
  min-width: 1.2em;
  display: inline-block;
  animation: pulse 1s var(--ease) infinite;
}

/* 选择题 */
.quiz-question {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-warm);
  border-radius: var(--r);
  border-left: 4px solid var(--gold);
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* 选项按钮 — hairline 边框，hover 上浮 */
.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  padding: var(--sp-4);
  border-radius: 8px;
  border: 1px solid var(--rule-soft);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  min-height: 60px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.quiz-option:hover:not(.disabled) {
  background: var(--gold-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.quiz-option:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-bg);
}
.opt-letter {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--ink-soft);
  transition: all var(--dur-fast) var(--ease);
}
.quiz-option:hover:not(.disabled) .opt-letter {
  background: var(--gold);
  color: #fff;
}
.quiz-option.correct {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.quiz-option.correct .opt-letter {
  background: var(--sage);
  color: #fff;
}
.quiz-option.correct::after {
  content: '\2713';
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--sage);
}
.quiz-option.wrong {
  border-color: var(--terra);
  background: var(--terra-soft);
  color: var(--terra);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.quiz-option.wrong .opt-letter {
  background: var(--terra);
  color: #fff;
}
.quiz-option.wrong::after {
  content: '\2717';
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--terra);
}
.quiz-option.disabled {
  cursor: default;
}
.quiz-option.disabled:not(.correct):not(.wrong) {
  opacity: 0.5;
}

/* 反馈与操作 — hairline 边框 + 背景 */
.quiz-feedback {
  margin-top: var(--sp-3);
  min-height: 0;
  padding: 0;
  border-radius: var(--r);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}
.quiz-feedback.correct,
.quiz-feedback.wrong {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  animation: fadeInUp var(--dur) var(--ease);
}
.quiz-feedback.correct {
  background: var(--sage-soft);
  color: var(--sage);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.quiz-feedback.wrong {
  background: var(--terra-soft);
  color: var(--terra);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fb-icon {
  font-size: 1.3rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
}
.fb-icon svg {
  color: inherit;
}
.quiz-actions {
  margin-top: var(--sp-4);
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* 结果页 */
.quiz-result {
  text-align: center;
  padding: var(--sp-5) var(--sp-3);
  animation: scaleIn var(--dur-slow) var(--ease-spring);
}
.quiz-result-icon {
  margin-bottom: var(--sp-2);
  display: flex;
  justify-content: center;
  animation: float 3s var(--ease) infinite;
}
.quiz-result-icon svg {
  color: var(--gold);
  width: 56px;
  height: 56px;
}
.quiz-result-score {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 4.5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.quiz-result-score span {
  font-size: 1.3rem;
  color: var(--muted);
  font-weight: 500;
}
.quiz-result-correct {
  font-size: 1.1rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin: var(--sp-2) 0 var(--sp-3);
}
.quiz-result-tip {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--sp-5);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 健康提醒 — hairline 边框，中性阴影，错位动画 ===== */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.alert-card {
  display: flex;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--hairline, var(--rule));
  border-left: 4px solid var(--rule);
  border-radius: 14px;
  padding: var(--sp-4);
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
  animation: staggerInUp var(--dur-slow) var(--ease) both;
}
.alert-card:nth-child(1) { animation-delay: 0.05s; }
.alert-card:nth-child(2) { animation-delay: 0.15s; }
.alert-card:nth-child(3) { animation-delay: 0.25s; }
.alert-card:nth-child(4) { animation-delay: 0.35s; }
.alert-card:nth-child(5) { animation-delay: 0.45s; }
.alert-card:nth-child(6) { animation-delay: 0.55s; }
.alert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.alert-card.warning { border-left-color: var(--warning); }
.alert-card.info { border-left-color: var(--info); }
.alert-card.success { border-left-color: var(--success); }

/* 提醒图标 — SVG 着色 */
.alert-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--gold-bg);
}
.alert-icon svg {
  color: var(--gold);
}
.alert-card.warning .alert-icon {
  background: rgba(212,148,0,0.10);
}
.alert-card.warning .alert-icon svg {
  color: var(--warning);
}
.alert-card.info .alert-icon {
  background: var(--ink-blue-soft);
}
.alert-card.info .alert-icon svg {
  color: var(--info);
}
.alert-card.success .alert-icon {
  background: var(--sage-soft);
}
.alert-card.success .alert-icon svg {
  color: var(--success);
}

.alert-body { flex: 1; min-width: 0; }
.alert-title {
  font-size: 1.05rem;
  margin-bottom: var(--sp-1);
  color: var(--ink);
}
.alert-desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: var(--sp-2);
}
.alert-time {
  font-size: 0.8rem;
  color: var(--muted-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alert-time::before {
  content: '\1F552';
  font-size: 0.85rem;
}
.alert-level-tag {
  display: inline-block;
  padding: 1px var(--sp-2);
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: var(--sp-2);
  vertical-align: middle;
}
.alert-card.warning .alert-level-tag { background: rgba(212,148,0,0.12); color: var(--warning); }
.alert-card.info .alert-level-tag { background: var(--ink-blue-soft); color: var(--info); }
.alert-card.success .alert-level-tag { background: var(--sage-soft); color: var(--success); }

/* ===== 邻里互助看护板 — hairline 边框，中性阴影，错位动画 ===== */
.neighbors-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.neighbor-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline, var(--rule));
  border-radius: 14px;
  padding: var(--sp-4);
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
  animation: staggerInUp var(--dur-slow) var(--ease) both;
}
.neighbor-card:nth-child(1) { animation-delay: 0.05s; }
.neighbor-card:nth-child(2) { animation-delay: 0.18s; }
.neighbor-card:nth-child(3) { animation-delay: 0.31s; }
.neighbor-card:nth-child(4) { animation-delay: 0.44s; }
.neighbor-card:nth-child(5) { animation-delay: 0.57s; }
.neighbor-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.neighbor-header {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  margin-bottom: var(--sp-2);
}
.neighbor-avatar {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-bg);
  border-radius: 50%;
  line-height: 1;
  box-shadow: var(--shadow-xs);
}
.neighbor-info { flex: 1; min-width: 0; }
.neighbor-user {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
}
.neighbor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
  align-items: center;
}
.neighbor-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px var(--sp-2);
  background: var(--bg-warm);
  border-radius: var(--r-full);
  color: var(--ink-soft);
  font-weight: 600;
}
.neighbor-type svg {
  color: var(--ink-soft);
}
.neighbor-status {
  align-self: flex-start;
  flex-shrink: 0;
}
.neighbor-content {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-warm);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--gold-soft);
}
.neighbor-replies {
  margin-bottom: var(--sp-3);
  padding-left: var(--sp-2);
  border-left: 2px dashed var(--rule);
  margin-left: var(--sp-1);
}
.reply-item {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
}
.reply-item + .reply-item { border-top: 1px solid var(--rule-soft); }
.reply-avatar {
  font-size: 1.3rem;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-soft);
  border-radius: 50%;
  line-height: 1;
}
.reply-body { flex: 1; min-width: 0; }
.reply-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 2px;
}
.reply-user {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.reply-time {
  font-size: 0.76rem;
  color: var(--muted-dim);
}
.reply-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.neighbor-actions {
  display: flex;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--rule-soft);
}
.neighbor-btn.done {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .health-top-grid,
  .health-bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .health-hero { padding: var(--sp-8) var(--sp-4) var(--sp-5); }
  .chart-card-header { flex-direction: column; align-items: flex-start; }
  .chart-summary { text-align: left; }
  .chart-avg { font-size: 2.2rem; }
  .memory-words { gap: var(--sp-2); }
  .memory-word { padding: var(--sp-2) var(--sp-4); }
  .quiz-question { font-size: 1.02rem; }
  .quiz-option { padding: var(--sp-3); min-height: 54px; font-size: 0.98rem; }
  .neighbor-actions { flex-direction: column; }
  .neighbor-actions .btn { width: 100%; }

  /* 移动端禁用错位动画延迟，避免内容跳动 */
  .alert-card,
  .neighbor-card {
    animation-delay: 0s !important;
  }
}
@media (max-width: 480px) {
  .memory-words { flex-direction: column; align-items: stretch; }
  .memory-word { text-align: center; }
}
