/* ═══════════════════════════════════════════════════════════
 *  「颐养天年」DLC 样式
 *  仅使用 theme.css 中已定义的 CSS 变量
 *  无新增配色，无 emoji
 *  移动端优先 · SVG 图标尺寸统一管控 · 性能优化
 * ═══════════════════════════════════════════════════════════ */

/* ── 全局 SVG 尺寸管控（移动端优先，防止图标过大） ── */
/* 排除关系图谱 SVG，其尺寸由 .ret-network-svg 单独控制 */
#retirement-overlay svg:not(.ret-network-svg) {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ── 退休模式覆盖层 ── */
#retirement-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  flex-direction: column;
  overflow: hidden;
  /* 性能：内容区单独滚动，减少合成层 */
  contain: layout style;
}
#retirement-overlay.active { display: flex; }

/* ── 顶部状态栏 ── */
.ret-status-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: var(--radius-pill);
  background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-sm), 0 0 0 0.5px rgba(0,0,0,0.03);
  overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
  margin: calc(var(--safe-top) + 6px + var(--statusbar-offset)) 12px 0;
}
.ret-status-bar::-webkit-scrollbar { display: none; }
.ret-chip {
  display: flex; align-items: center; gap: 3px;
  padding: 4px 8px; border-radius: 16px;
  background: transparent; white-space: nowrap;
  font-size: 12px; flex-shrink: 0;
}
.ret-chip .chip-icon {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ret-chip .chip-icon svg { width: 12px; height: 12px; }
.ret-chip .rc-label { color: var(--text-3); font-size: 10px; }
.ret-chip .rc-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.ret-chip .rc-val.good { color: var(--green); }
.ret-chip .rc-val.warn { color: var(--orange); }
.ret-chip .rc-val.bad { color: var(--red); }

/* ── 主内容区 ── */
.ret-main {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(var(--safe-bottom) + 80px);
  /* 性能：虚拟化内容区，减少绘制范围 */
  contain: layout style;
}

/* ── 子导航 ── */
.ret-subnav {
  display: flex; gap: 4px;
  padding: 0 0 10px;
  border-bottom: 0.5px solid var(--separator); margin-bottom: 12px;
  overflow-x: auto; scrollbar-width: none;
}
.ret-subnav::-webkit-scrollbar { display: none; }
.ret-subnav-btn {
  flex-shrink: 0; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--separator); background: transparent;
  font-size: 11px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: var(--transition);
  white-space: nowrap; text-align: center;
  display: flex; align-items: center; gap: 3px;
  /* 移动端最小触控区域 32px */
  min-height: 32px;
}
.ret-subnav-btn svg { width: 12px; height: 12px; }
.ret-subnav-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ret-subnav-btn.active svg { color: #fff; }
.ret-subnav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── 通用卡片 ── */
.ret-card {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-xs);
}
.ret-card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.ret-card-title svg { width: 14px; height: 14px; opacity: 0.7; color: var(--accent); flex-shrink: 0; }
.ret-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }

/* ── 状态指标条 ── */
.ret-metric-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px; background: var(--bg-card);
  border-radius: var(--radius-xs); margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.ret-metric {
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px; flex: 1;
}
.ret-metric .rm-val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ret-metric .rm-label { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ── 进度条 ── */
.ret-progress {
  height: 6px; background: var(--separator-light);
  border-radius: 3px; overflow: hidden; margin-top: 4px;
}
.ret-progress-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.3s ease;
}

/* ── 关系网络 ── */
.ret-network-tier {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; margin-bottom: 8px;
}
.ret-tier-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ret-node-row {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.ret-node {
  background: var(--bg-card); border: 1px solid var(--separator);
  border-radius: var(--radius-xs); padding: 8px 10px;
  min-width: 100px; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.ret-node:hover { border-color: var(--accent); }
.ret-node.selected { border-color: var(--accent); background: var(--accent-light); }
.ret-node.danger { border-color: var(--red); }
.ret-node-name { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-node-role { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.ret-node-bar {
  height: 4px; border-radius: 2px; margin-top: 4px;
  background: var(--separator-light);
}
.ret-node-bar-fill { height: 100%; border-radius: 2px; }
.ret-connector {
  width: 1px; height: 16px; background: var(--separator);
  margin: 0 auto;
}

/* ── 证据列表 ── */
.ret-evidence-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-card);
  border-radius: var(--radius-xs); margin-bottom: 6px;
  border-left: 3px solid var(--separator);
  box-shadow: var(--shadow-xs);
}
.ret-evidence-item.exposed { border-left-color: var(--red); }
.ret-evidence-item.concealed { border-left-color: var(--green); }
.ret-ev-icon {
  width: 28px; height: 28px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ret-ev-icon svg { width: 14px; height: 14px; stroke: var(--text-2); }
.ret-ev-info { flex: 1; min-width: 0; }
.ret-ev-name { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-ev-meta { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.ret-ev-status {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; white-space: nowrap;
}
.ret-ev-status.exposed { background: var(--red-light); color: var(--red); }
.ret-ev-status.concealed { background: var(--green-light); color: var(--green); }
.ret-ev-status.pending { background: var(--orange-light); color: var(--orange); }

/* ── 证据详情卡片（新增） ── */
.ret-ev-detail-card {
  margin: 6px 0 8px; padding: 10px 12px;
  background: var(--bg-elevated); border-radius: var(--radius-xs);
  border: 1px solid var(--separator-light);
  font-size: 12px; line-height: 1.7;
}
.ret-ev-detail-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.ret-ev-detail-header .ret-ev-type-badge {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; background: var(--accent-light); color: var(--accent);
}
.ret-ev-detail-desc {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 8px;
}
.ret-ev-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  margin-bottom: 8px;
}
.ret-ev-detail-grid .deg-item {
  display: flex; flex-direction: column;
}
.ret-ev-detail-grid .deg-label {
  font-size: 9px; color: var(--text-3); text-transform: uppercase;
}
.ret-ev-detail-grid .deg-val {
  font-size: 12px; color: var(--text); font-weight: 500;
}
.ret-ev-detail-risk {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-top: 1px dashed var(--separator-light);
}
.ret-ev-detail-risk .der-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--separator-light); overflow: hidden;
}
.ret-ev-detail-risk .der-bar-fill {
  height: 100%; border-radius: 2px; transition: width 0.3s ease;
}
.ret-ev-detail-career {
  font-size: 10px; color: var(--text-3); line-height: 1.6;
  padding: 4px 0; border-top: 1px dashed var(--separator-light);
}
.ret-ev-detail-career strong { color: var(--text-2); }

/* ── 调查面板 ── */
.ret-invest-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--radius-xs);
  background: var(--bg-card); margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.ret-invest-icon {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  background: var(--red-light); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ret-invest-icon svg { width: 18px; height: 18px; stroke: var(--red); }
.ret-invest-info { flex: 1; min-width: 0; }
.ret-invest-name { font-size: 15px; font-weight: 700; color: var(--text); }
.ret-invest-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── 行动按钮 ── */
.ret-action-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 9px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--separator); background: var(--bg-card);
  font-size: 12px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-xs); margin-bottom: 6px;
  /* 移动端最小触控高度 */
  min-height: 36px;
}
.ret-action-btn svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.7; }
.ret-action-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.ret-action-btn:active { transform: scale(0.98); }
.ret-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ret-action-btn .ra-cost { margin-left: auto; font-size: 10px; color: var(--text-3); }
.ret-action-btn .ra-cost.affordable { color: var(--green); }
.ret-action-btn .ra-cost.unaffordable { color: var(--red); }

/* ── 家族面板 ── */
.ret-family-member {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: var(--bg-card);
  border-radius: var(--radius-xs); margin-bottom: 8px;
  box-shadow: var(--shadow-xs);
}
.ret-fm-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple-light); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--purple);
}
.ret-fm-info { flex: 1; min-width: 0; }
.ret-fm-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ret-fm-detail { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ── 底部操作栏 ── */
.ret-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; gap: 4px; padding: 8px 12px calc(var(--safe-bottom) + 8px);
  background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 -2px 12px rgba(70,58,40,0.06);
  z-index: 101;
}
.ret-bottom-btn {
  flex: 1; padding: 10px 4px; border-radius: var(--radius-xs);
  border: none; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: var(--transition); display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  /* 移动端最小触控高度 */
  min-height: 40px;
}
.ret-bottom-btn:active { transform: scale(0.96); }
.ret-bottom-btn svg { width: 14px; height: 14px; }
.ret-bottom-btn.secondary { background: var(--bg-card); color: var(--text-2); border: 1px solid var(--separator); }

/* ── 风险标签 ── */
.ret-risk-tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
}
.ret-risk-tag.low { background: var(--green-light); color: var(--green); }
.ret-risk-tag.med { background: var(--orange-light); color: var(--orange); }
.ret-risk-tag.high { background: var(--red-light); color: var(--red); }

/* ── 信息提示块 ── */
.ret-alert {
  padding: 10px 12px; border-radius: var(--radius-xs);
  margin-bottom: 10px; font-size: 12px; line-height: 1.6;
}
.ret-alert.danger { background: var(--red-light); color: var(--red); border-left: 3px solid var(--red); }
.ret-alert.warn { background: var(--orange-light); color: var(--orange); border-left: 3px solid var(--orange); }
.ret-alert.info { background: var(--accent-light); color: var(--accent); border-left: 3px solid var(--accent); }
.ret-alert.success { background: var(--green-light); color: var(--green); border-left: 3px solid var(--green); }

/* ── 模态弹窗内嵌样式 ── */
.ret-modal-section { margin-bottom: 14px; }
.ret-modal-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
}
.ret-modal-section-title svg { width: 12px; height: 12px; opacity: 0.7; }
.ret-choice-list { display: flex; flex-direction: column; gap: 6px; }
.ret-choice-item {
  padding: 10px 12px; border: 1px solid var(--separator);
  border-radius: var(--radius-xs); background: var(--bg-card);
  cursor: pointer; transition: var(--transition);
}
.ret-choice-item:hover { border-color: var(--accent); background: var(--accent-light); }
.ret-choice-item .rci-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ret-choice-item .rci-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.ret-choice-item .rci-effect { font-size: 10px; color: var(--text-2); margin-top: 4px; }

/* ── 地图标记 ── */
.ret-map-legend {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg-glass);
  backdrop-filter: blur(20px); border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs); margin-bottom: 10px;
}
.ret-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-2);
}
.ret-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
}

/* ── 职业回顾面板（新增 · Issue #3 联动游戏本体） ── */
.ret-career-summary {
  padding: 12px; background: var(--bg-card);
  border-radius: var(--radius-xs); margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.ret-career-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.ret-career-title svg { width: 14px; height: 14px; color: var(--accent); }
.ret-career-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px;
  margin-bottom: 8px;
}
.ret-career-grid .rcg-item {
  display: flex; flex-direction: column;
}
.ret-career-grid .rcg-label {
  font-size: 9px; color: var(--text-3); text-transform: uppercase;
}
.ret-career-grid .rcg-val {
  font-size: 12px; color: var(--text); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ret-career-buildings {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--separator-light);
}
.ret-career-building-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-2); padding: 2px 0;
}
.ret-career-building-item svg { width: 10px; height: 10px; opacity: 0.5; }

/* ── 退休结局画面 ── */
.ret-ending {
  text-align: center; padding: 20px 16px;
}
.ret-ending-title {
  font-family: var(--font-serif); font-size: 22px; font-weight: 900;
  color: var(--accent); margin-bottom: 8px; letter-spacing: 0.05em;
}
.ret-ending-sub { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.ret-ending-score {
  display: flex; justify-content: center; gap: 16px;
  margin: 16px 0; flex-wrap: wrap;
}
.ret-ending-score .res-item {
  display: flex; flex-direction: column; align-items: center;
}
.ret-ending-score .res-val { font-size: 20px; font-weight: 800; color: var(--accent); }
.ret-ending-score .res-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ── 空状态 ── */
.ret-empty {
  text-align: center; padding: 32px 16px;
  color: var(--text-3); font-size: 13px;
}
.ret-empty svg { width: 28px; height: 28px; opacity: 0.3; margin-bottom: 8px; }

/* ── 加载骨架屏（新增 · Issue #2 性能优化） ── */
.ret-skeleton {
  padding: 14px; margin-bottom: 10px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}
.ret-skeleton-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--separator-light) 25%, var(--separator) 50%, var(--separator-light) 75%);
  background-size: 200% 100%;
  animation: ret-shimmer 1.5s infinite;
  margin-bottom: 6px;
}
.ret-skeleton-line:last-child { width: 60%; }
@keyframes ret-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
 *  响应式适配 — 平板/桌面端微调
 * ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  #retirement-overlay svg:not(.ret-network-svg) { width: 16px; height: 16px; }
  .ret-subnav-btn svg { width: 14px; height: 14px; }
  .ret-action-btn svg { width: 14px; height: 14px; }
  .ret-bottom-btn svg { width: 16px; height: 16px; }
  .ret-card-title svg { width: 16px; height: 16px; }
  .ret-ev-icon svg { width: 16px; height: 16px; }
  .ret-chip .chip-icon svg { width: 14px; height: 14px; }
  .ret-career-title svg { width: 16px; height: 16px; }

  .ret-status-bar { margin: calc(var(--safe-top) + 8px) 16px 0; padding: 8px 14px; }
  .ret-main { padding: 16px 16px calc(var(--safe-bottom) + 80px); }
  .ret-subnav-btn { padding: 8px 14px; font-size: 12px; min-height: 36px; }
  .ret-action-btn { padding: 10px 14px; font-size: 13px; min-height: 40px; }
  .ret-bottom-btn { padding: 12px 8px; font-size: 13px; min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════
 *  v2 新增样式 — 分组导航 / 折叠组件 / 新面板
 * ═══════════════════════════════════════════════════════════ */

/* ── 分组导航（与本体 FAB 两级设计一致） ── */
.ret-nav-sheet {
  background: var(--bg-glass); backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs), 0 0 0 0.5px rgba(0,0,0,0.03);
  overflow: hidden;
}
.ret-nav-handle {
  width: 36px; height: 5px; border-radius: 3px;
  background: var(--separator);
  margin: 8px auto 4px;
}
.ret-nav-header {
  display: flex; align-items: center; justify-content: center;
  padding: 2px 20px 6px;
}
.ret-nav-title {
  font-family: var(--font-serif); font-size: 17px; font-weight: 900;
  letter-spacing: 0.05em; color: var(--text);
}
/* 第一级：分组标签（对应本体 .sheet-tabs） */
.ret-nav-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 4px 10px 6px;
  border-bottom: 0.5px solid var(--separator);
}
.ret-nav-tab {
  padding: 10px 4px; border: none; background: transparent;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  justify-content: center; text-align: center;
  border-radius: 8px 8px 0 0;
}
.ret-nav-tab svg { width: 15px; height: 15px; opacity: 0.6; color: var(--text-2); }
.ret-nav-tab.active {
  color: var(--accent); border-bottom-color: var(--accent); font-weight: 700;
}
.ret-nav-tab.active svg { opacity: 1; color: var(--accent); }
.ret-nav-tab:active { transform: scale(0.97); }

/* 第二级：子标签（与第一级风格一致，更紧凑） */
.ret-subtabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 2px; padding: 6px 10px 8px;
}
.ret-subtabs::-webkit-scrollbar { display: none; }
.ret-subtab-btn {
  padding: 8px 6px; border: none; background: transparent;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; transition: var(--transition);
  display: flex; align-items: center; gap: 3px;
  justify-content: center; text-align: center;
  border-radius: 6px;
  min-height: 32px;
}
.ret-subtab-btn svg { width: 12px; height: 12px; }
.ret-subtab-btn.active {
  color: var(--accent); border-bottom-color: var(--accent); font-weight: 700;
  background: var(--accent-light);
}
.ret-subtab-btn:active { transform: scale(0.97); }
.ret-subtab-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  opacity: 0.5; cursor: pointer; transition: opacity 0.15s ease;
  margin-left: 2px;
}
.ret-subtab-help:hover { opacity: 1; }
.ret-subtab-help svg { width: 11px; height: 11px; }
.ret-subtab-btn.active .ret-subtab-help { opacity: 0.8; }

/* ── 折叠组件 ── */
.ret-collapse {
  background: var(--bg-card); border-radius: var(--radius-xs);
  margin-bottom: 8px; box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.ret-collapse-header {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; cursor: pointer;
  transition: var(--transition); user-select: none;
}
.ret-collapse-header:active { background: var(--separator-light); }
.ret-collapse-header svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; color: var(--accent); }
.ret-collapse-title {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--text);
}
.ret-collapse-badge {
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; background: var(--separator-light); color: var(--text-3);
}
.ret-collapse-arrow {
  font-size: 10px; color: var(--text-3);
  transition: transform 0.2s ease;
}
.ret-collapse.collapsed .ret-collapse-arrow { transform: rotate(-90deg); }
.ret-collapse-body {
  padding: 0 12px 12px;
  max-height: 2000px; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.ret-collapse.collapsed .ret-collapse-body {
  max-height: 0; padding-top: 0; padding-bottom: 0;
}

/* ── 主线引导面板 ── */
.ret-guide-card {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
  border-left: 3px solid var(--accent);
}
.ret-guide-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.ret-guide-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-light); display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ret-guide-avatar svg { width: 18px; height: 18px; color: var(--accent); }
.ret-guide-name { font-size: 14px; font-weight: 700; color: var(--text); }
.ret-guide-title { font-size: 10px; color: var(--text-3); }
.ret-guide-message {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  padding: 8px 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs); margin-bottom: 8px;
}
.ret-guide-objective {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--accent-light);
  border-radius: var(--radius-xs);
}
.ret-guide-obj-icon { flex-shrink: 0; }
.ret-guide-obj-icon svg { width: 14px; height: 14px; color: var(--accent); }
.ret-guide-obj-text { flex: 1; }
.ret-guide-obj-title { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-guide-obj-desc { font-size: 10px; color: var(--text-3); }
.ret-guide-obj-progress {
  font-size: 11px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ret-guide-chapter-bar {
  display: flex; gap: 2px; margin-top: 8px;
}
.ret-guide-chapter-dot {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--separator);
}
.ret-guide-chapter-dot.done { background: var(--green); }
.ret-guide-chapter-dot.current { background: var(--accent); }

/* ── 健康面板 ── */
.ret-health-main {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg-card);
  border-radius: var(--radius-xs); margin-bottom: 8px;
  box-shadow: var(--shadow-xs);
}
.ret-health-ring {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.ret-health-ring svg { position: absolute; inset: 0; }
.ret-health-info { flex: 1; }
.ret-health-level { font-size: 14px; font-weight: 700; color: var(--text); }
.ret-health-detail { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ret-health-bar {
  height: 6px; border-radius: 3px; margin-top: 6px;
  background: var(--separator-light); overflow: hidden;
}
.ret-health-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }

.ret-condition-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs); margin-bottom: 4px;
}
.ret-condition-name { flex: 1; font-size: 12px; font-weight: 600; color: var(--text); }
.ret-condition-severity {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px;
}
.ret-condition-severity.s1 { background: var(--green-light); color: var(--green); }
.ret-condition-severity.s2 { background: var(--green-light); color: var(--green); }
.ret-condition-severity.s3 { background: var(--orange-light); color: var(--orange); }
.ret-condition-severity.s4 { background: var(--red-light); color: var(--red); }
.ret-condition-severity.s5 { background: var(--red-light); color: var(--red); }

.ret-status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600;
}
.ret-status-badge.hospital { background: var(--red-light); color: var(--red); }
.ret-status-badge.nursing { background: var(--orange-light); color: var(--orange); }
.ret-status-badge svg { width: 12px; height: 12px; }

/* ── 经营面板 ── */
.ret-biz-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 8px;
}
.ret-biz-stat {
  padding: 8px 10px; background: var(--bg-card);
  border-radius: var(--radius-xs); box-shadow: var(--shadow-xs);
  text-align: center;
}
.ret-biz-stat .rbs-val {
  font-size: 16px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ret-biz-stat .rbs-label { font-size: 10px; color: var(--text-3); margin-top: 1px; }

.ret-property-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs); margin-bottom: 6px;
  border-left: 3px solid var(--separator);
}
.ret-property-item.risk-high { border-left-color: var(--red); }
.ret-property-item.risk-med { border-left-color: var(--orange); }
.ret-prop-info { flex: 1; min-width: 0; }
.ret-prop-name { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-prop-meta { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.ret-prop-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ret-prop-btn {
  padding: 4px 8px; border-radius: 4px; border: 1px solid var(--separator);
  background: var(--bg-card); font-size: 10px; font-weight: 600;
  color: var(--text-2); cursor: pointer; transition: var(--transition);
  min-height: 24px;
}
.ret-prop-btn:active { transform: scale(0.95); }
.ret-prop-btn:disabled { opacity: 0.4; }
.ret-prop-btn.danger { color: var(--red); border-color: var(--red); }

.ret-investment-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs); margin-bottom: 6px;
  border-left: 3px solid var(--separator);
}
.ret-investment-item.risk-high { border-left-color: var(--red); }
.ret-inv-info { flex: 1; min-width: 0; }
.ret-inv-name { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-inv-meta { font-size: 10px; color: var(--text-3); margin-top: 1px; }

.ret-type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.ret-type-card {
  padding: 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs); border: 1px solid var(--separator);
  cursor: pointer; transition: var(--transition);
}
.ret-type-card:active { transform: scale(0.97); }
.ret-type-card:disabled { opacity: 0.4; cursor: not-allowed; }
.ret-type-card-name { font-size: 12px; font-weight: 600; color: var(--text); }
.ret-type-card-desc { font-size: 10px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.ret-type-card-meta { font-size: 10px; color: var(--accent); margin-top: 4px; font-weight: 600; }

/* ── 遗嘱面板 ── */
.ret-will-distribution {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px;
}
.ret-will-member {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--bg-elevated);
  border-radius: var(--radius-xs);
}
.ret-will-member-name { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text); min-width: 80px; }
.ret-will-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px; background: var(--separator-light);
  outline: none;
}
.ret-will-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}
.ret-will-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: none;
}
/* 通用模态滑块 */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: none;
}
.ret-will-pct {
  font-size: 12px; font-weight: 700; color: var(--accent);
  min-width: 36px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.ret-will-total {
  display: flex; justify-content: space-between;
  padding: 6px 10px; font-size: 12px; font-weight: 600;
}
.ret-will-dissatisfaction {
  padding: 8px 10px; border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600; text-align: center;
}
.ret-will-dissatisfaction.low { background: var(--green-light); color: var(--green); }
.ret-will-dissatisfaction.med { background: var(--orange-light); color: var(--orange); }
.ret-will-dissatisfaction.high { background: var(--red-light); color: var(--red); }

/* ── 引导消息弹窗 ── */
.ret-guide-modal {
  text-align: left;
}
.ret-guide-modal-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--separator);
}
.ret-guide-modal-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-light); display: flex;
  align-items: center; justify-content: center;
}
.ret-guide-modal-avatar svg { width: 20px; height: 20px; color: var(--accent); }
.ret-guide-modal-name { font-size: 15px; font-weight: 700; color: var(--text); }
.ret-guide-modal-title { font-size: 11px; color: var(--text-3); }
.ret-guide-modal-body {
  font-size: 13px; color: var(--text-2); line-height: 1.8;
}
.ret-guide-modal-body p { margin-bottom: 8px; }

/* ── 底部栏（简化：仅推进按钮） ── */
.ret-bottom-bar-single {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 8px 12px calc(var(--safe-bottom) + 8px);
  background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 -2px 12px rgba(70,58,40,0.06);
  z-index: 101;
}
.ret-bottom-btn-full {
  width: 100%; padding: 12px; border-radius: var(--radius-xs);
  border: none; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center;
  justify-content: center; gap: 6px;
  min-height: 44px;
}
.ret-bottom-btn-full:active { transform: scale(0.97); }
.ret-bottom-btn-full svg { width: 16px; height: 16px; }
.ret-bottom-btn-full:disabled { opacity: 0.5; }

/* ── 职业遗产条（总览页，增强与本体关联） ── */
.ret-career-strip {
  display: flex; align-items: center; gap: 0;
  padding: 8px 12px; border-radius: var(--radius-xs);
  background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-xs), 0 0 0 0.5px rgba(0,0,0,0.03);
  margin-bottom: 10px;
}
.ret-career-strip .rcs-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.ret-career-strip .rcs-label {
  font-size: 9px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ret-career-strip .rcs-val {
  font-size: 13px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ret-career-strip .rcs-divider {
  width: 1px; height: 24px; background: var(--separator);
  flex-shrink: 0; margin: 0 2px;
}

/* ── 本体资产联动网格 ── */
.ret-main-asset-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 4px;
}
.ret-main-asset-grid .rma-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--bg-card); box-shadow: var(--shadow-xs);
}
.ret-main-asset-grid .rma-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-light); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.ret-main-asset-grid .rma-icon svg { width: 14px; height: 14px; color: var(--accent); }
.ret-main-asset-grid .rma-info { flex: 1; min-width: 0; }
.ret-main-asset-grid .rma-val {
  font-size: 14px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ret-main-asset-grid .rma-label {
  font-size: 10px; color: var(--text-3); margin-top: 1px;
}
@media (min-width: 768px) {
  .ret-main-asset-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* ── 响应式适配（补充新组件） ── */
@media (min-width: 768px) {
  .ret-nav-tab svg { width: 17px; height: 17px; }
  .ret-subtab-btn svg { width: 13px; height: 13px; }
  .ret-collapse-header svg { width: 16px; height: 16px; }
  .ret-guide-avatar svg { width: 20px; height: 20px; }
  .ret-guide-modal-avatar svg { width: 22px; height: 22px; }
  .ret-biz-stats { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .ret-type-grid { grid-template-columns: 1fr 1fr 1fr; }
  .ret-bottom-btn-full { font-size: 14px; }
}

/* ── 减少动画偏好 ── */
@media (prefers-reduced-motion: reduce) {
  .ret-progress-fill, .ret-bottom-btn, .ret-action-btn, .ret-subnav-btn,
  .ret-collapse-body, .ret-collapse-arrow, .ret-nav-tab,
  .ret-subtab-btn, .ret-prop-btn, .ret-type-card, .ret-bottom-btn-full {
    transition: none !important;
  }
  .ret-skeleton-line { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
 *  v0.0.3 新增样式 — 关系图谱 / 信息分级 / UI一致性
 * ═══════════════════════════════════════════════════════════ */

/* ── 关系图谱容器 ── */
.ret-network-container {
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  padding: 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.ret-network-header {
  margin-bottom: 4px;
}
.ret-network-legend {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 0;
}
.ret-legend-item {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--text-3);
}
.ret-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.ret-network-svg {
  width: 100% !important; height: auto !important;
  display: block;
  cursor: default;
  max-height: 360px;
}
.ret-network-svg .ret-graph-node {
  transition: opacity 0.2s;
}
.ret-network-svg .ret-graph-node:hover circle {
  opacity: 0.85;
}

/* ── 重点指标高亮 ── */
.ret-biz-stat.highlight {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
}
.ret-biz-stat.highlight .rbs-val {
  font-size: 18px;
}

/* ── 关键指标危险状态 ── */
.ret-metric.critical {
  position: relative;
}
.ret-metric.critical::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: ret-pulse 1.5s ease-in-out infinite;
}
@keyframes ret-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── 成功提示样式（补充） ── */
.ret-alert.success {
  background: var(--green-light);
  color: var(--green);
  border-left: 3px solid var(--green);
}

/* ── 经营面板统计网格优化 ── */
@media (min-width: 768px) {
  .ret-biz-stats { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .ret-network-svg { max-height: 400px; }
}

/* ── 折叠面板内嵌操作按钮统一间距 ── */
.ret-collapse-body .ret-action-btn {
  margin-bottom: 4px;
}

/* ── 隐藏威胁节点样式 ── */
.ret-node.danger {
  border-left: 3px solid var(--red);
  background: var(--red-light);
}
