/* ===================================================================
   玄学命理学习系统 · OmniLoom 风格主题
   深海军蓝底 + 金色强调 · 玄学风格
   =================================================================== */

:root {
  --bg: #06131b;
  --panel: #0b1c28;
  --panel-2: #102635;
  --panel-3: #163245;
  --line: rgba(218, 177, 95, .26);
  --line-strong: rgba(218, 177, 95, .5);
  --muted: #8fa5b4;
  --muted-2: #c4d0d7;
  --text: #edf6f7;
  --gold: #e8b55b;
  --gold-2: #ffd28a;
  --red: #ef6249;
  --green: #4fc37a;
  --blue: #4f9de8;
  --shadow: 0 18px 60px rgba(0, 0, 0, .35);
  --shadow-sm: 0 6px 22px rgba(0, 0, 0, .28);
  --radius: 8px;
  --radius-lg: 12px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 6%, rgba(232, 181, 91, .13), transparent 24rem),
    radial-gradient(circle at 88% 92%, rgba(79, 157, 232, .08), transparent 22rem),
    linear-gradient(135deg, #040b11 0%, #092033 48%, #06131b 100%);
  letter-spacing: 0;
  font-size: 14px;
  line-height: 1.6;
}
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--gold-2); }

/* ==================== 顶栏 ==================== */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 21, 31, .86);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.brand h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
  color: var(--gold-2);
  font-weight: 800;
  white-space: nowrap;
}
.brand p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.4;
}
/* 标题行：项目名 + 版本更新说明按钮同行（参考 jiezi_pro） */
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* 版本更新说明按钮 */
.changelog-btn {
  padding: 4px 12px;
  border: 1px solid rgba(232, 181, 91, .4);
  border-radius: 6px;
  background: rgba(232, 181, 91, .08);
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.changelog-btn:hover {
  background: rgba(232, 181, 91, .18);
  border-color: var(--gold);
}
.nav-tabs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.nav-tab {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
}
.nav-tab:hover { color: var(--gold-2); background: rgba(232, 181, 91, .08); }
.nav-tab.active {
  color: var(--gold-2);
  border-color: var(--line-strong);
  background: rgba(232, 181, 91, .12);
}
.top-actions { display: flex; gap: 6px; }
.mini-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted-2);
  cursor: pointer;
  font-size: 13px;
  transition: all .2s ease;
}
.mini-btn:hover { border-color: var(--gold); color: var(--gold-2); }

/* ==================== 状态条 ==================== */
.status-strip {
  width: min(1480px, calc(100% - 24px));
  margin: 12px auto 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 28, 40, .6);
  color: var(--muted-2);
  font-size: 14px;
  display: none;
}
.status-strip.show { display: block; }
.status-strip strong { color: var(--gold-2); }

/* ==================== 主区 ==================== */
.app {
  width: min(1480px, calc(100% - 24px));
  margin: 14px auto 40px;
  padding: 0;
}

/* 通用面板 */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(11, 28, 40, .72);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.panel-title {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--gold-2);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.section-h { color: var(--gold); font-size: 16px; margin: 18px 0 10px; font-weight: 600; }

/* 按钮 */
.btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--gold), #c98f33); color: #1a1208; border-color: var(--gold); font-weight: 600; }
.btn-primary:hover { color: #1a1208; filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(239, 98, 73, .5); color: var(--red); }
.btn-danger:hover { background: rgba(239, 98, 73, .12); color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ==================== 阶段地图 ==================== */
.roadmap-hero { text-align: center; padding: 10px 0 20px; }
.roadmap-hero h2 { margin: 0 0 6px; color: var(--gold-2); font-size: 22px; }
.roadmap-hero p { margin: 0; color: var(--muted); font-size: 14px; }

.stage-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.stage-node {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 18px 16px;
  cursor: pointer;
  transition: all .25s ease;
  text-align: center;
}
.stage-node:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.stage-node.locked { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.stage-node.unlocked { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(232,181,91,.15) inset; }
.stage-node.passed { border-color: var(--green); box-shadow: 0 0 0 1px rgba(79,195,122,.25) inset; }
.stage-node.current { border-color: var(--gold); box-shadow: 0 0 22px rgba(232,181,91,.25); }
.stage-idx { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.stage-name { font-size: 19px; color: var(--gold-2); font-weight: 700; margin: 6px 0; }
.stage-node.passed .stage-name { color: var(--green); }
.stage-scope { font-size: 13px; color: var(--muted-2); line-height: 1.5; min-height: 48px; }
.stage-meta { margin-top: 10px; font-size: 12px; color: var(--muted); }
.stage-lock { font-size: 28px; }
.stage-badge { position: absolute; top: 10px; right: 12px; font-size: 18px; }

/* ==================== 阶段详情（三入口） ==================== */
.stage-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.stage-detail-head h2 { margin: 0; color: var(--gold-2); font-size: 22px; }
.back-link { color: var(--muted); cursor: pointer; font-size: 14px; }
.back-link:hover { color: var(--gold-2); }
.stage-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.trio-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 26px 18px;
  cursor: pointer;
  text-align: center;
  transition: all .25s ease;
}
.trio-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.trio-icon { font-size: 40px; }
.trio-title { font-size: 17px; color: var(--gold-2); margin: 10px 0 6px; font-weight: 700; }
.trio-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.trio-status { margin-top: 10px; font-size: 12px; color: var(--green); }
.trio-status.warn { color: var(--red); }

/* ==================== 知识卡片 ==================== */
.cards-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.card-counter { color: var(--muted); font-size: 13px; }
.flip-card {
  perspective: 1400px;
  height: 360px;
  margin: 0 auto;
  max-width: 640px;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  padding: 30px 26px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.flip-back { transform: rotateY(180deg); overflow-y: auto; }
.flip-front .card-cat { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.flip-front .card-title { font-size: 30px; color: var(--gold-2); font-weight: 800; margin: auto 0; text-align: center; }
.flip-front .card-hint { text-align: center; color: var(--muted); font-size: 13px; }
.flip-back .bk-label { color: var(--gold); font-weight: 700; margin: 0 0 4px; font-size: 14px; }
.flip-back .bk-block { margin-bottom: 12px; font-size: 14px; line-height: 1.7; color: var(--muted-2); }
.flip-back .bk-block.memo { background: rgba(232,181,91,.08); border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 4px; }
.card-controls { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--muted); margin-right: 4px; }
.tag.gold { color: var(--gold-2); border-color: var(--line-strong); }

/* ==================== 训练/考核通用 ==================== */
.qbox {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.q-meta .tag.type { color: var(--blue); border-color: rgba(79,157,232,.4); }
.q-meta .tag.angle { color: var(--gold-2); border-color: var(--line-strong); }
.q-meta .tag.kp { color: var(--muted); }
.q-stem { font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 14px; }
.q-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opt {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  cursor: pointer;
  transition: all .15s ease;
  font-size: 14px;
}
.q-opt:hover { border-color: var(--gold); }
.q-opt.selected { border-color: var(--gold); background: rgba(232,181,91,.1); }
.q-opt.correct { border-color: var(--green); background: rgba(79,195,122,.12); color: var(--green); }
.q-opt.wrong { border-color: var(--red); background: rgba(239,98,73,.12); color: var(--red); }
.q-opt .opt-key { color: var(--gold); font-weight: 700; margin-right: 8px; }
.q-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); font-size: 14px; }
.q-input:focus { outline: none; border-color: var(--gold); }
.q-explain {
  margin-top: 12px; padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(232,181,91,.07);
  border-radius: 4px;
  font-size: 13px; line-height: 1.7; color: var(--muted-2);
  display: none;
}
.q-explain.show { display: block; }
.q-explain b { color: var(--gold-2); }

.train-progress {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; color: var(--muted); font-size: 13px;
}
.progress-bar { flex: 1; height: 6px; background: var(--panel-3); border-radius: 3px; margin: 0 14px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .3s ease; }

/* ==================== 雷达图 ==================== */
.radar-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: center; }
.radar-svg { max-width: 380px; }

/* ==================== 错题本 ==================== */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter-bar select, .filter-bar input { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 13px; }
.chip.active { border-color: var(--gold); color: var(--gold-2); background: rgba(232,181,91,.12); }

/* ==================== 实战舱 ==================== */
.bazi-display {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 26px; letter-spacing: 4px;
  text-align: center; padding: 20px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0d2230, #142e40);
  color: var(--gold-2); margin-bottom: 16px;
}
.bazi-display .pillar { display: inline-block; margin: 0 18px; }
.bazi-display .pillar span { display: block; line-height: 1.4; }
.bazi-display .pillar small { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.task-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--panel); padding: 18px 20px; margin-bottom: 14px;
}
.task-card h4 { margin: 0 0 8px; color: var(--gold-2); }
.task-card .ref { margin-top: 12px; padding: 12px; background: rgba(79,157,232,.07); border-left: 3px solid var(--blue); border-radius: 4px; font-size: 13px; line-height: 1.7; color: var(--muted-2); display: none; }
.task-card .ref.show { display: block; }

/* ==================== Toast / Modal ==================== */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--radius);
  background: rgba(11,28,40,.95); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 14px; box-shadow: var(--shadow);
  animation: toastIn .25s ease; max-width: 360px;
}
.toast.ok { border-color: var(--green); }
.toast.err { border-color: var(--red); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(2,8,12,.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
/* hidden 属性优先：避免 display:flex 覆盖导致遮罩常驻拦截点击 */
.modal-mask[hidden] { display: none !important; }
.modal-box {
  width: min(520px, calc(100% - 32px));
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 22px 24px;
}
.modal-box h3 { margin: 0 0 14px; color: var(--gold-2); }

/* ==================== 统计 ==================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 14px; text-align: center; }
.stat-card .num { font-size: 28px; color: var(--gold-2); font-weight: 800; }
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-card.ok .num { color: var(--green); }
.stat-card.warn .num { color: var(--red); }

.weak-list { list-style: none; padding: 0; margin: 0; }
.weak-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.weak-list .err-rate { color: var(--red); font-weight: 700; }

.empty-hint { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }
.empty-hint .big { font-size: 42px; display: block; margin-bottom: 10px; opacity: .5; }

/* 阶段进度条（阶段详情内） */
.stage-prog-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.mini-stat { flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 10px 12px; }
.mini-stat .v { color: var(--gold-2); font-size: 18px; font-weight: 700; }
.mini-stat .k { color: var(--muted); font-size: 12px; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--panel); }
::-webkit-scrollbar-thumb { background: rgba(232,181,91,.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232,181,91,.5); }

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; }
  .nav-tabs { justify-content: flex-start; }
  .flip-card { height: 320px; }
}

/* ==================== 角色系统 ==================== */

/* 顶部用户徽章 */
.user-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--line-strong);
  border-radius: 14px; background: rgba(232,181,91,.08);
  cursor: pointer; transition: all .2s ease;
}
.user-badge:hover { background: rgba(232,181,91,.16); transform: translateY(-1px); }
.badge-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #c98f33);
  color: #1a1208; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.badge-name { color: var(--gold-2); font-size: 13px; }

/* 角色门面（gate） */
.profile-gate { max-width: 980px; margin: 30px auto; }
.gate-hero { text-align: center; padding: 30px 0 28px; }
.gate-hero .gate-logo {
  width: 120px; height: 120px; object-fit: contain;
  border-radius: 10px; margin-bottom: 12px;
}
.gate-hero h2 { margin: 6px 0; color: var(--gold-2); font-size: 32px; font-weight: 800; }
.gate-hero p { margin: 0; color: var(--muted-2); font-size: 14px; }

.gate-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 16px; }
.gate-section { padding: 20px 22px; }

.profile-list { display: flex; flex-direction: column; gap: 10px; }
.profile-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel-2);
  transition: all .2s ease;
}
.profile-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.profile-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #c98f33);
  color: #1a1208; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-avatar.lg { width: 64px; height: 64px; font-size: 28px; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { color: var(--gold-2); font-size: 15px; font-weight: 600; }
.profile-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 创建表单 */
.create-form { display: flex; flex-direction: column; gap: 4px; }
.form-label {
  display: flex; align-items: baseline; justify-content: space-between;
  color: var(--gold-2); font-size: 14px; margin-top: 10px; margin-bottom: 4px;
}
.form-label .hint { color: var(--muted); font-size: 12px; font-weight: 400; }

/* 角色视图 */
.profile-view { display: flex; flex-direction: column; gap: 18px; }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.profile-head-info { flex: 1; min-width: 0; }
.profile-head-info h2 { margin: 0; color: var(--gold-2); font-size: 22px; }
.profile-head-info p { margin: 4px 0 0; color: var(--muted-2); font-size: 13px; }

/* 统计行（角色视图专用，避免与 stats.js 的 .stat-card .num/.lbl 冲突） */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; }
.stat-row .stat-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-2); padding: 16px 12px; text-align: center;
}
.stat-row .stat-num { color: var(--gold-2); font-size: 26px; font-weight: 800; }
.stat-row .stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* 阶段进度列表 */
.stage-progress-list { display: flex; flex-direction: column; gap: 10px; }
.stage-progress-row {
  display: flex; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-2); transition: all .2s ease;
}
.stage-progress-row.passed { border-color: rgba(79,195,122,.35); }
.stage-progress-row.locked { opacity: .55; filter: grayscale(.4); }
.sp-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(232,181,91,.12); color: var(--gold-2);
  font-size: 20px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sp-main { flex: 1; min-width: 0; }
.sp-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--text); font-size: 14px; font-weight: 600;
}
.sp-tag { padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 400; }
.sp-tag.passed { color: var(--green); border: 1px solid rgba(79,195,122,.4); background: rgba(79,195,122,.08); }
.sp-tag.unlocked { color: var(--gold-2); border: 1px solid var(--line-strong); background: rgba(232,181,91,.08); }
.sp-tag.locked { color: var(--muted); border: 1px solid var(--line); }
.sp-bar { height: 5px; background: var(--panel-3); border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.sp-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .4s ease; }
.sp-meta { color: var(--muted); font-size: 12px; }

.muted-text { color: var(--muted-2); font-size: 13px; line-height: 1.7; }
.muted-text code { background: var(--panel-3); padding: 1px 6px; border-radius: 4px; color: var(--gold-2); font-size: 12px; }

@media (max-width: 720px) {
  .gate-grid { grid-template-columns: 1fr; }
  .profile-head { flex-wrap: wrap; }
}

/* ==================== 版本更新说明弹窗 ==================== */
/* 标题行：标题 + 关闭按钮 */
.cl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cl-header h3 { margin: 0; }
.cl-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  padding: 0 8px;
  transition: color .2s;
}
.cl-close:hover { color: var(--gold-2); }
.cl-body { margin-top: 8px; }
.cl-version {
  margin: 18px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--gold-2); font-size: 16px; font-weight: 700;
}
.cl-version:first-child { margin-top: 0; }
.cl-section {
  margin: 14px 0 8px; color: var(--text); font-size: 14px; font-weight: 700;
  padding-left: 10px; border-left: 3px solid var(--gold);
}
.cl-sub { margin: 10px 0 6px; color: var(--gold-2); font-size: 13px; font-weight: 600; }
.cl-li {
  list-style: none; margin: 6px 0; padding-left: 16px; position: relative;
  color: var(--text); font-size: 13px; line-height: 1.7;
}
.cl-li::before {
  content: "•"; position: absolute; left: 2px; top: 0;
  color: var(--gold); font-weight: 700;
}
.cl-p { margin: 8px 0; color: var(--text); font-size: 13px; line-height: 1.7; }
.cl-quote {
  margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line-strong);
  background: var(--panel-2); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted-2); font-size: 13px; line-height: 1.7;
}
.cl-code {
  margin: 8px 0; padding: 10px 12px; background: var(--panel-3);
  border-radius: var(--radius); overflow-x: auto;
  font-size: 12px; line-height: 1.6; color: var(--gold-2);
}
.cl-code code { font-family: Consolas, Monaco, "Courier New", monospace; }
.cl-table {
  width: 100%; border-collapse: collapse; margin: 10px 0;
  font-size: 12px; line-height: 1.6;
}
.cl-table th {
  padding: 6px 8px; text-align: left;
  border: 1px solid var(--line-strong); background: var(--panel-3);
  color: var(--gold-2); font-weight: 700;
}
.cl-table td {
  padding: 6px 8px; border: 1px solid var(--line);
  color: var(--text);
}
.cl-table tr:nth-child(even) td { background: var(--panel-2); }
.cl-body strong { color: var(--gold-2); }
.cl-body code {
  background: var(--panel-3); padding: 1px 5px; border-radius: 3px;
  color: var(--gold-2); font-size: 12px;
  font-family: Consolas, Monaco, "Courier New", monospace;
}
