/* ============================================================
 * 武道重开模拟器 · 样式
 * 主题：大秦帝国 · 武道显学 —— 玄墨底 + 青铜古金 + 朱砂；
 *       仙缘用青碧幽光，藏在暗处。
 * 背景纯色（长列表滚动不出现上下分层），布局完全沿用旧模拟器。
 * ============================================================ */
[hidden] { display: none !important; }

:root {
  --bg:          #0f0c09;
  --bg-app:      #14100c;
  --panel:       #1e1812;
  --panel-2:     #271f17;
  --panel-3:     #33281d;
  --line:        #4a3820;
  --line-soft:   #33281c;
  --gold:        #c9a227;
  --gold-bright: #e8c76a;
  --gold-dim:    #8a6a2e;
  --cinnabar:    #a3231f;
  --cinnabar-lt: #d4574f;
  --jade:        #4fae9a;
  --jade-dim:    #2f6f63;
  --text:        #f0e9da;
  --text-dim:    #c8bca8;
  --text-mute:   #8d8271;
  --danger:      #d4574f;
  --ok:          #7fdc9a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #4a3820; 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, #8d1f1b, #6e1714);
  color: #ffe9c8;
  border-color: #b23a32;
  font-weight: 700;
}
.btn-primary:active { background: #5c120f; }
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #7a2622; 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(201,162,39,.25);
  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(30,24,18,.85);
  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, #8a6a2e, 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: #b23a32;
  background: linear-gradient(180deg, #8d1f1b, #6e1714);
  color: #ffe9c8;
  font-weight: 700;
}
.btn-follow:active { background: #5c120f; }
#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 .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: #6e1714; border-color: #b23a32; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #ffe9c8; }
.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: #b23a32; background: linear-gradient(180deg, #8d1f1b, #6e1714); color: #ffe9c8; 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(201,162,39,.35); }
.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); }
/* 档位色：凡 / 良 / 珍 / 绝 */
.tg0 .tc-name, .tg0 .tc-grade { color: #d8cbb4; }
.tg1 .tc-name, .tg1 .tc-grade { color: #7fb2f0; }
.tg2 .tc-name, .tg2 .tc-grade { color: #c5a0f5; }
.tg3 { border-color: var(--gold-dim); }
.tg3 .tc-name, .tg3 .tc-grade { color: var(--gold-bright); }
.tg3 .tc-desc { color: #d6c39a; }
.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: var(--jade-dim); background: rgba(20,30,26,.55); }
.xian-locked .tc-name { color: var(--jade); }
.xian-locked .tc-grade { color: var(--jade-dim); }
.xian-locked .tc-desc { color: #7f9c93; }
.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(--gold-dim); color: var(--gold-bright); background: rgba(201,162,39,.08); }
.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(38,46,72,.55); border: 1px solid #34456b; color: #b9cdf0; }
.log-item.evt { background: var(--panel-2); border-left: 3px solid var(--line); color: var(--text-dim); }
.log-item.gold { background: rgba(201,162,39,.1); border: 1px solid var(--gold-dim); color: var(--gold-bright); }
.log-item.danger { background: rgba(163,35,31,.18); border: 1px solid #7a2622; color: #ff9a92; }
.log-item.good { background: rgba(60,120,70,.16); border: 1px solid #3c6b45; color: #9fdcae; }
.log-item.dead { background: rgba(163,35,31,.3); border: 1px solid #a3231f; 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,.96) 0%, rgba(186,220,255,.62) 38%, rgba(120,160,255,.16) 66%, rgba(120,160,255,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(160,205,255,.95)) drop-shadow(0 0 20px rgba(90,140,255,.75));
}
@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: #ffe08a; font-size: 28px; text-shadow: 0 0 18px rgba(232,199,106,.55); }
.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(--gold-bright); }

/* ---------- 高光 ---------- */
.hl-item {
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(201,162,39,.08), 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: #ffe08a; 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: #2b2118; color: #ffe9c8; 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(201,162,39,.16); color: #ffe08a; border: 1px solid var(--gold); }
.toast.bad { background: #6e1714; color: #ffe0dc; border: 1px solid #b23a32; }
@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(30,24,18,.7); border: 1px solid rgba(201,162,39,.18);
  border-radius: 10px; font-size: 13px;
}
.lb-row.me { border-color: var(--gold); background: rgba(201,162,39,.1); }
.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(201,162,39,.07); }
.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(201,162,39,.1);
  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; }
}
