/* ============================================================
 * 咒回人生模拟器 · 样式
 * 主题：现代霓虹 · 咒术界 —— 深夜黑底 + 咒力紫 + 宿傩绯红；
 *       咒物用符纸金，咒灵与危险用暗红。
 * 背景纯色（长列表滚动不出现上下分层），布局完全沿用旧模拟器。
 * ============================================================ */
[hidden] { display: none !important; }

:root {
  --bg:          #07070b;
  --bg-app:      #0b0b12;
  --panel:       #14141f;
  --panel-2:     #1b1b29;
  --panel-3:     #262638;
  --line:        #3a3550;
  --line-soft:   #2a2740;
  --gold:        #8a6cff;   /* 咒力紫（主色） */
  --gold-bright: #c3b0ff;
  --gold-dim:    #6a55b8;
  --cinnabar:    #b3242f;   /* 宿傩绯红 */
  --cinnabar-lt: #e2525c;
  --jade:        #4fc7d6;   /* 咒力青 */
  --jade-dim:    #2d6f7a;
  --text:        #eceaf5;
  --text-dim:    #c2bdd6;
  --text-mute:   #8b86a3;
  --danger:      #e2525c;
  --ok:          #7fdc9a;
  --relic:       #ffd27a;   /* 特级咒物金 */
  --relic-dim:   #b3852f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #3a3550; border-radius: 3px; }
*::-webkit-scrollbar-track { background: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: var(--bg-app);
  position: relative;
  overflow-x: hidden;
}

.view {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
}
.btn:active { transform: scale(.97); background: var(--panel-2); }
.btn-primary {
  background: linear-gradient(180deg, #6b3fd4, #4a2a9e);
  color: #f3eeff;
  border-color: #8a6cff;
  font-weight: 700;
}
.btn-primary:active { background: #3a2080; }
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #7c121b; color: var(--danger); }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold-bright);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  position: relative; z-index: 2;
}

/* ---------- 页头：返回 ✕ 在右上角，标题绝对居中 ---------- */
.page-head {
  width: 100%;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 10px 10px;
}
.page-title {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--gold-bright);
  text-align: center;
  white-space: nowrap;
  max-width: 72%;
  overflow: hidden;
}

/* ---------- 首页 ---------- */
#view-home { justify-content: flex-start; gap: 14px; padding-top: 40px; }
.home-hero { text-align: center; width: 100%; }
.home-title {
  margin: 0 auto; font-size: 32px; font-weight: 800;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(138,108,255,.30);
  white-space: nowrap; max-width: 100%; overflow: hidden;
}
.home-sub {
  color: var(--text-mute); font-size: 15px; margin-top: 6px;
  white-space: nowrap; max-width: 100%; overflow: hidden;
}
.home-count {
  background: rgba(20,20,31,.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.home-count b { color: var(--gold-bright); font-size: 13px; }
.home-lv { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: var(--text-mute); font-size: 13px; }
.lv-lv { color: var(--gold-bright); font-size: 17px; font-weight: 800; margin-left: auto; }
.lv-bonus { color: var(--gold-dim); font-size: 11.5px; margin-top: 6px; text-align: center; }
.lv-bar { height: 10px; background: var(--panel-3); border-radius: 5px; overflow: hidden; margin-top: 8px; border: 1px solid var(--line-soft); }
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #4a2a9e, var(--gold)); border-radius: 5px; width: 0%; transition: width .3s; }
.lv-exp-line { margin-top: 7px; color: var(--text-mute); font-size: 12px; text-align: center; }

.home-btns { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.home-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.home-grid3 { grid-template-columns: repeat(3, 1fr); }
.home-grid .btn { font-size: 14px; padding: 12px 6px; white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.btn-follow {
  margin-top: 2px;
  border-color: #d63b47;
  background: linear-gradient(180deg, #b3242f, #7c121b);
  color: #ffe6e8;
  font-weight: 700;
}
.btn-follow:active { background: #6a0e16; }
#btn-follow-bonus {
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 10px;
}
.ach-plus { display: block; color: var(--gold-dim); font-size: 10.5px; line-height: 1.4; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: var(--text-mute); font-size: 12px; margin-bottom: 6px; }
.qr-img { width: 130px; height: 130px; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 5px; }

/* ---------- 面板/提示 ---------- */
.panel { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.small-tip { color: var(--text-mute); font-size: 12px; line-height: 1.8; }
.mid-head { width: 100%; display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.mid-head .mt { color: var(--text-mute); font-size: 13px; }
.mid-head .xian-title { flex: 1; min-width: 0; white-space: normal; line-height: 1.55; color: var(--text); font-weight: 600; }
.mid-head .mv { color: var(--gold-bright); font-size: 16px; font-weight: 800; }

/* ---------- 设置开关 ---------- */
.set-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
.set-card + .set-card { margin-top: 10px; }
.set-row { display: flex; align-items: center; gap: 10px; cursor: pointer; justify-content: space-between; }
.set-label { font-size: 15px; color: var(--text); }
.set-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex: 0 0 auto; }
.set-switch input { opacity: 0; width: 0; height: 0; }
.track { position: absolute; inset: 0; background: var(--panel-3); border: 1px solid var(--line); border-radius: 13px; transition: background .2s; }
.track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #c8bca8; transition: transform .2s; }
.set-switch input:checked + .track { background: #4a2a9e; border-color: #8a6cff; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #f3eeff; }
.speed-label { display: flex; justify-content: space-between; align-items: center; color: var(--text-mute); font-size: 13px; width: 100%; }
.speed-label b { color: var(--gold-bright); }
.speed-range { width: 100%; margin-top: 8px; accent-color: var(--cinnabar); }

/* ---------- 页签 ---------- */
.tabs { width: 100%; display: flex; gap: 6px; margin: 4px 0 10px; }
.tab {
  flex: 1; border: 1px solid var(--line); background: var(--panel);
  color: var(--text-mute); border-radius: 8px; padding: 7px 4px;
  font-size: 12.5px; cursor: pointer; white-space: nowrap; text-align: center;
}
.tab.on { border-color: #8a6cff; background: linear-gradient(180deg, #6b3fd4, #4a2a9e); color: #f3eeff; font-weight: 700; }
.tabs-small .tab { font-size: 12px; padding: 6px 4px; }

/* ---------- 命格卡 ---------- */
#view-start { align-items: stretch; }
.ten-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tcard {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 9px 10px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.tcard:active { transform: scale(.97); }
.tcard.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(138,108,255,.40); }
.tcard .tc-name { font-weight: 700; font-size: 15px; color: var(--text); }
.tcard .tc-desc { color: var(--text-mute); font-size: 12px; line-height: 1.5; }
.tcard .tc-grade { position: absolute; top: 7px; right: 9px; font-size: 11px; color: var(--text-mute); white-space: nowrap; }
/* 宿傩入口卡：给右上角品质留出空间，避免与长名字重叠 */
#xian-grid .tcard .tc-name { padding-right: 62px; }
/* 档位色：凡 / 良 / 珍 / 绝 */
.tg0 .tc-name, .tg0 .tc-grade { color: #d5d1e2; }
.tg1 .tc-name, .tg1 .tc-grade { color: #7fb2f0; }
.tg2 .tc-name, .tg2 .tc-grade { color: #c5a0f5; }
.tg3 { border-color: var(--relic-dim); }
.tg3 .tc-name, .tg3 .tc-grade { color: var(--relic); }
.tg3 .tc-desc { color: #e6cfa2; }
/* 只有「两面宿傩的手指」是特级，红色；其余最高档显示一级 */
.tg3.special { border-color: var(--cinnabar); }
.tg3.special .tc-name, .tg3.special .tc-grade { color: var(--cinnabar-lt); }
.tg3.special .tc-desc { color: #f0b6ba; }
.empty-hint { color: var(--text-mute); font-size: 13px; padding: 20px; text-align: center; }
/* 十连空态提示：跨两列、单行居中 */
.ten-grid > .empty-hint { grid-column: 1 / -1; white-space: nowrap; text-align: center; }

/* 宿傩线锁定卡 */
.xian-locked { border-style: dashed; border-color: #6a2a33; background: rgba(28,12,18,.62); }
.xian-locked.special { border-color: var(--cinnabar); }
.xian-locked .tc-name { color: #ff8a93; }
.xian-locked .tc-grade { color: #a34a55; }
.xian-locked.special .tc-name, .xian-locked.special .tc-grade { color: var(--cinnabar-lt); }
.xian-locked .tc-desc { color: #b58f95; }
.xian-box { text-align: center; }
.xian-box .mask-info { line-height: 1.9; }

/* ---------- 加点 ---------- */
#view-allocate { align-items: stretch; }
.alloc-grid { width: 100%; display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.a-row { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.a-name { width: 56px; flex: 0 0 auto; color: var(--text-mute); font-size: 13px; }
.a-val { flex: 1; text-align: center; color: var(--gold-bright); font-size: 22px; font-weight: 700; }
.a-btn { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--gold-bright); font-size: 20px; line-height: 1; cursor: pointer; }
.a-btn:active { transform: scale(.92); background: var(--panel-3); }
.a-btn:disabled { opacity: .35; }
.btn-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }

/* ---------- 游戏日志 ---------- */
#view-play { padding-top: 0; padding-bottom: 16px; }
.game-top { width: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 12px 4px 4px; }
.game-title {
  font-size: 12.5px;
  color: var(--gold-dim);
  font-weight: 800;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0 56px;
  overflow: hidden;
}
.btn-pause { position: absolute; right: 0; top: 4px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--gold-bright); font-size: 16px; cursor: pointer; }
.realm-badge { color: var(--gold-bright); font-weight: 800; white-space: nowrap; }
.attr-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.attr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.attr-name { color: var(--text-mute); font-size: 11.5px; }
.attr-val { color: var(--gold-bright); font-size: 21px; font-weight: 700; }
.active-words {
  width: 100%; margin-top: 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.active-words .aw-label { color: var(--text-mute); font-size: 12px; flex: 0 0 auto; }
.aw-chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 3px 9px; font-size: 12.5px;
  background: var(--panel-2); color: var(--text-dim);
}
.aw-chip.extra { border-style: dashed; border-color: var(--jade-dim); color: var(--jade); }
.aw-chip .g { font-size: 10px; color: var(--text-mute); }
.aw-chip.c1 { border-color: #3f6a9e; color: #9fc4ec; }
.aw-chip.c2 { border-color: #6a4b91; color: #d2b6f5; }
.aw-chip.c3 { border-color: var(--relic-dim); color: var(--relic); background: rgba(255,210,122,.08); }
.aw-chip.c3.special { border-color: var(--cinnabar); color: var(--cinnabar-lt); background: rgba(226,82,92,.10); }
.manual-tip { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 8px; padding: 7px 10px; margin-top: 8px; font-size: 12.5px; text-align: center; }

.log-box {
  width: 100%; flex: 1; min-height: 200px; margin-top: 8px;
  overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 5px;
  -webkit-overflow-scrolling: touch;
}
.log-item { font-size: 13.5px; line-height: 1.5; padding: 6px 9px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text-dim); }
.log-item.year { background: transparent; border: none; color: var(--text-mute); font-size: 12px; font-weight: 700; }
.log-item.tlt { background: rgba(43,34,78,.55); border: 1px solid #4a3d7a; color: #cbbcf5; }
.log-item.evt { background: var(--panel-2); border-left: 3px solid var(--line); color: var(--text-dim); }
.log-item.gold { background: rgba(138,108,255,.12); border: 1px solid var(--gold-dim); color: var(--gold-bright); }
.log-item.danger { background: rgba(179,36,47,.18); border: 1px solid #7c121b; color: #ff9a92; }
.log-item.good { background: rgba(60,120,70,.16); border: 1px solid #3c6b45; color: #9fdcae; }
.log-item.dead { background: rgba(179,36,47,.3); border: 1px solid #b3242f; color: #ffc0bb; font-weight: 700; }
.log-item .delta { margin-left: 2px; font-size: 12.5px; white-space: nowrap; }
.log-item .delta i { font-style: normal; margin-left: 2px; }
.log-item .delta .up { color: #8fd6a0; }
.log-item .delta .down { color: #f08a82; }

/* ---------- 最终决战斩击特效（每击破一处弱点触发一次） ---------- */
#trib-fx {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.trib-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 90% at 50% 0%,
    rgba(255,255,255,.92) 0%, rgba(255,120,132,.55) 34%, rgba(179,36,47,.18) 64%, rgba(179,36,47,0) 88%);
  opacity: 0;
  animation: tribFlash .55s ease-out;
}
.trib-bolt {
  position: absolute;
  top: -6%;
  opacity: 0;
  animation: tribBolt .55s ease-out;
  filter: drop-shadow(0 0 6px rgba(255,90,105,.95)) drop-shadow(0 0 22px rgba(140,108,255,.7));
}
@keyframes tribFlash {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  15%  { opacity: .10; }
  22%  { opacity: .88; }
  36%  { opacity: .16; }
  52%  { opacity: .42; }
  100% { opacity: 0; }
}
@keyframes tribBolt {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  16%  { opacity: .08; }
  24%  { opacity: .96; }
  40%  { opacity: .18; }
  56%  { opacity: .55; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .trib-flash, .trib-bolt { animation-duration: .3s; animation-iteration-count: 1; }
}

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; }
.settle-box { width: 100%; }
.settle-title { text-align: center; font-size: 24px; letter-spacing: 3px; margin: 2px 0 8px; font-weight: 800; color: var(--gold-bright); }
.settle-title.ascend { color: var(--relic); font-size: 28px; text-shadow: 0 0 18px rgba(255,210,122,.55), 0 0 34px rgba(179,36,47,.35); }
.settle-rows { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-bottom: 7px; }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; }
.s-row span { color: var(--text-mute); flex: 0 0 auto; }
.s-row b { color: var(--gold-bright); flex: 0 0 auto; font-size: 15.5px; }
.s-row em { color: var(--gold-dim); font-style: normal; font-size: 11.5px; flex: 1; text-align: right; min-width: 0; }
.settle-line {
  color: var(--text-mute); font-size: 12.5px; line-height: 1.6;
  margin: 6px 0; padding: 7px 10px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.settle-btns { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 6px; }
.settle-btns .btn-big { padding: 11px 6px; font-size: 14.5px; border-radius: 11px; }
#btn-hl-settle { margin-bottom: 6px; }
.inherit-head { color: var(--text-mute); font-size: 13px; margin: 6px 0 8px; text-align: center; }
.inherit-head b { color: var(--gold-bright); }

/* ---------- 图鉴 / 成就列表 ---------- */
#view-tome, #view-ach, #view-hl, #view-rank { align-items: stretch; }
.cnt-line { width: 100%; text-align: center; color: var(--text-mute); font-size: 13px; margin-bottom: 8px; }
.cnt-line b { color: var(--gold-bright); }
.list { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.item { border-radius: 9px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.item .it-name { font-size: 15px; font-weight: 700; color: var(--text); }
.item .it-sub { color: var(--text-mute); font-size: 12.5px; line-height: 1.5; }
.item.locked { opacity: .45; }
.item .it-mark { font-size: 11px; align-self: flex-end; color: var(--text-mute); }
.item.g1 .it-name { color: #9fc4ec; }
.item.g2 .it-name { color: #d2b6f5; }
.item.g3 .it-name { color: var(--relic); }
.item.g3.special .it-name { color: var(--cinnabar-lt); }

/* ---------- 高光 ---------- */
.hl-item {
  border: 1px solid var(--relic-dim);
  background: linear-gradient(180deg, rgba(179,36,47,.10), rgba(138,108,255,.06), var(--panel));
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer;
}
.hl-item:active { filter: brightness(1.15); }
.hl-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.hl-top b { color: var(--gold-bright); font-size: 14px; }
.hl-way { margin-left: auto; color: var(--relic); font-weight: 700; }
.hl-mid { font-size: 12.5px; color: var(--text-mute); }
.hl-attrs { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }
.hl-attrs b { color: var(--gold-bright); }
.hl-img-box { padding: 12px; }
.hl-img { width: 100%; border-radius: 8px; border: 1px solid var(--gold-dim); background: #0b0806; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); width: calc(100% - 60px); max-width: 420px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #171325; color: #f3eeff; border: 1px solid var(--gold-dim); border-radius: 10px; padding: 11px 14px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.45); animation: toast-in .25s ease; word-break: break-word; }
.toast.gold { background: rgba(138,108,255,.18); color: #ddd2ff; border: 1px solid var(--gold); }
.toast.bad { background: #5c0d14; color: #ffe0e2; border: 1px solid #b3242f; }
@keyframes toast-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }
.toast.ach { animation: toast-in .22s ease, toast-out .3s ease .9s forwards; }

/* ---------- Mask ---------- */
.mask { position: fixed; inset: 0; background: rgba(5,4,3,.72); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mask-box { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; max-height: 84vh; overflow-y: auto; }
.mask-title { text-align: center; color: var(--gold-bright); font-size: 17px; letter-spacing: 2px; font-weight: 700; }
.mask-info { color: var(--text-dim); font-size: 14px; line-height: 1.8; text-align: center; }
.mask-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; }

/* 三连/关注弹窗 */
.follow-rows { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.follow-action { display: flex; align-items: center; font-size: 13px; padding: 10px 12px; }
.fb-state { margin-left: auto; font-size: 11.5px; }
.fb-state.done { color: var(--ok); }
.fb-state.todo { color: var(--text-mute); }
.fb-total { color: var(--gold-bright); font-weight: 700; }

.fb-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.fb-rowline { display: flex; align-items: center; justify-content: space-between; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.fb-rowline .st { color: var(--text-mute); }
.fb-rowline .done { color: var(--ok); }
.fb-rowline .todo { color: var(--danger); }

/* ---------- 回顾 / 可滚动 ---------- */
.review-log { width: 100%; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.scroll-y { overflow-y: auto; min-height: 0; }

/* ---------- 排行榜（对标三国争霸 lb-* 结构） ---------- */
.lb-note { width: 100%; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.rank-fate-note { width: 100%; font-size: 12px; color: var(--gold); margin-bottom: 8px; text-align: center; }
.lb-body { width: 100%; max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.lb-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(20,20,31,.72); border: 1px solid rgba(138,108,255,.20);
  border-radius: 10px; font-size: 13px;
}
.lb-row.me { border-color: var(--gold); background: rgba(138,108,255,.12); }
.lb-rank { flex: 0 0 30px; text-align: center; font-weight: 800; color: var(--text-mute); }
.lb-rank.top { color: var(--gold-bright); }
.lb-rank.r1 { color: #f0c96a; }
.lb-rank.r2 { color: #dfe6f0; }
.lb-rank.r3 { color: #e0b64a; }
.lb-user { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.lb-avatar { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; background: var(--panel-2); }
.lb-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-time { font-size: 11px; color: var(--text-mute); white-space: nowrap; }
.lb-score { margin-left: auto; color: var(--gold-bright); font-weight: 700; white-space: nowrap; }
.lb-tip { text-align: center; color: var(--text-mute); font-size: 13px; padding: 22px 0; }

/* 旧排行榜类保留（不再使用） */
.rank-row { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; }
.rank-row.top { border-color: var(--gold-dim); background: rgba(138,108,255,.08); }
.rank-no { width: 34px; flex: 0 0 auto; text-align: center; color: var(--text-mute); font-weight: 700; }
.rank-no.r1 { color: var(--gold-bright); font-weight: 900; }
.rank-no.r2 { color: #cfd6e0; }
.rank-no.r3 { color: #d3a06a; }
.rank-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  flex: 0 0 auto;
  object-fit: cover;
}
.rank-user { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; }
.rank-mine {
  width: 100%;
  background: rgba(138,108,255,.12);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 8px;
  color: var(--gold-bright);
  font-size: 13.5px;
  text-align: center;
  font-weight: 700;
}
.rank-score { flex: 0 0 auto; color: var(--gold-bright); font-weight: 700; font-size: 14px; }
.rank-fate-note { width: 100%; text-align: center; color: var(--gold-dim); font-size: 12px; margin: 8px 0 4px; }

@media (min-width: 600px) {
  #view-home { padding-top: 60px; }
}
