/* ============================================================
 * 武神模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：玄墨正文 × 玄金流光（多彩光斑背景 + 金芒点缀的武道大陆画风）
 * ============================================================ */
:root {
  --ink: #262019;
  --ink-soft: #4a4238;
  --ink-dim: #7c7466;
  --paper: #fdf9ef;
  --paper-2: #f8f2e3;
  --line: #e6dcc6;
  --gold: #c8942c;
  --gold-hi: #e9bd5e;
  --gold-deep: #7d5a12;
  --flame: #ee7f2d;
  --flame-hi: #ffb057;
  --green: #55a63f;
  --blue: #3f6fd0;
  --violet: #9355c8;
  --red: #cf4444;
  --radius: 14px;
}
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  background: #efe3cd;
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
body {
  background:
    radial-gradient(120vw 90vh at 118% -12%, rgba(250,176,82,.22), transparent 60%),
    radial-gradient(110vw 80vh at -16% 6%, rgba(100,124,255,.13), transparent 55%),
    radial-gradient(90vw 70vh at 8% 104%, rgba(190,120,255,.12), transparent 55%),
    linear-gradient(160deg, #f2e7d2 0%, #ece0c6 100%);
}

/* ---------- 多彩背景光斑（画在内容之下） ---------- */
#app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  overflow: clip;
  background:
    radial-gradient(140% 60% at 50% -20%, rgba(255,214,150,.5), transparent 62%),
    linear-gradient(180deg, rgba(253,249,239,.9), rgba(250,244,231,.92) 48%, rgba(245,236,218,.94));
  box-shadow: 0 0 0 1px rgba(120,90,40,.06), 0 0 46px rgba(150,110,50,.12);
}
#app::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(46% 34% at 88% 8%,  rgba(250,165,72,.20), transparent 70%),
    radial-gradient(40% 30% at 2% 30%,  rgba(110,140,255,.13), transparent 70%),
    radial-gradient(42% 34% at 96% 58%, rgba(180,120,255,.12), transparent 70%),
    radial-gradient(46% 34% at 6% 92%,  rgba(80,200,185,.10), transparent 70%),
    radial-gradient(44% 30% at 86% 100%, rgba(250,120,150,.11), transparent 72%),
    radial-gradient(1.6px 1.6px at 18% 16%, rgba(196,150,60,.35), transparent),
    radial-gradient(1px 1px at 78% 24%,   rgba(196,150,60,.28), transparent),
    radial-gradient(1.4px 1.4px at 42% 62%, rgba(150,120,180,.22), transparent),
    radial-gradient(1px 1px at 66% 82%,  rgba(120,170,150,.25), transparent),
    radial-gradient(1.2px 1.2px at 12% 80%, rgba(216,130,80,.22), transparent);
}

.view {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid rgba(120,95,50,.22);
  background: linear-gradient(180deg, #fffdf6, #f2ebd8);
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(120,90,40,.10), inset 0 1px 0 rgba(255,255,255,.85);
  transition: transform .12s ease, box-shadow .2s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); filter: brightness(.97); box-shadow: 0 0 0 2px rgba(200,148,44,.18), inset 0 1px 0 #fff; }
.btn-primary {
  border: none;
  color: #381f04;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #ffd98a 0%, #f4ab43 46%, #e0822a 100%);
  box-shadow: 0 4px 16px rgba(230,140,40,.34), inset 0 1px 0 rgba(255,255,255,.6);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:active { box-shadow: 0 2px 8px rgba(230,140,40,.3), inset 0 2px 6px rgba(120,60,0,.22); }
.btn-danger { border-color: rgba(200,80,60,.35); color: #b13a2c; background: linear-gradient(180deg, #fff6f2, #f9e2da); }
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 14px; }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(120,95,50,.22);
  background: linear-gradient(180deg, #fffdf6, #f1e9d5);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(120,90,40,.14);
}

/* ---------- 首页 ---------- */
#view-home { justify-content: center; gap: 13px; }
.home-hero { text-align: center; margin-top: -14px; }
.home-title {
  margin: 0;
  font-size: 38px;
  letter-spacing: 6px;
  font-weight: 900;
  background:
    radial-gradient(120% 140% at 50% -20%, #fff6df 0%, #f5c968 34%, #b97f1f 72%, #6f4a0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(120,85,20,.18));
  animation: titleBreath 3.6s ease-in-out infinite;
}
@keyframes titleBreath {
  0%, 100% { filter: drop-shadow(0 2px 3px rgba(200,150,50,.22)); }
  50% { filter: drop-shadow(0 0 14px rgba(240,160,60,.5)); }
}
.home-sub {
  color: var(--ink-dim);
  font-size: clamp(8px, 2.9vw, 12.5px);
  margin-top: 6px;
  letter-spacing: .5px;
  white-space: nowrap;
  max-width: 100%;
}
.home-count {
  background: linear-gradient(180deg, rgba(255,248,232,.9), rgba(250,238,214,.9));
  border: 1px solid rgba(190,140,60,.35);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ink-soft);
  font-size: clamp(8px, 2.8vw, 12px);
  white-space: nowrap;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(170,120,50,.12);
}
.home-count b { font-size: 1.08em; color: #a9641a; font-weight: 800; }
.home-lv {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,253,248,.96), rgba(250,244,231,.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(130,100,50,.10);
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: var(--ink-dim); font-size: 13px; }
.lv-lv { color: #a35d12; font-size: 17px; font-weight: 800; }
.lv-bonus { color: #d0552a; font-size: 11px; white-space: nowrap; margin-left: 4px; }
.lv-exp { margin-left: auto; color: var(--ink-dim); font-size: 12px; }
.lv-bar { height: 10px; background: #ede4cd; border-radius: 6px; overflow: hidden; margin-top: 8px; box-shadow: inset 0 1px 2px rgba(130,105,60,.18); }
.lv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7cc26a, #c7e2a0, #8fc95f);
  background-size: 200% 100%;
  animation: barSheen 3s linear infinite;
  border-radius: 6px;
  width: 0%;
  transition: width .35s ease;
}
@keyframes barSheen { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
.home-btns { width: 100%; display: flex; flex-direction: column; gap: 13px; }
.home-link-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
#btn-guard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px 8px; }
#btn-guard .ach-btn-tip { font-size: 10px; color: #a0611c; font-weight: 700; white-space: nowrap; }
#btn-guard.on { border-color: transparent; background: linear-gradient(180deg, #ffd98a, #ef9f32 70%, #dc7f1d); box-shadow: 0 4px 14px rgba(220,140,40,.35); }
#btn-guard.on .ach-btn-tip { color: #3a2100; }
.guard-rows { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 2px 0; }
.guard-row {
  background: linear-gradient(180deg, rgba(255,248,232,.95), rgba(250,238,214,.85));
  border: 1px solid rgba(190,150,80,.4);
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  line-height: 1.6;
}
.guard-row b { color: #a05f05; }
.mask-info b.gold { color: #b46a16; font-size: 16px; }
.settings-body {
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.set-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,253,248,.97), rgba(249,243,229,.93));
  border: none;
  border-bottom: 1px solid rgba(205,178,120,.55);
  border-radius: 0;
  padding: 16px 18px;
}
.set-card .set-row { justify-content: space-between; }
.speed-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 14px;
}
.speed-label b {
  font-size: 15px;
  color: #a05f05;
  background: linear-gradient(180deg, rgba(255,230,170,.6), rgba(250,216,130,.4));
  border: 1px solid rgba(200,150,60,.45);
  border-radius: 999px;
  padding: 2px 12px;
  white-space: nowrap;
}

/* 速度滑杆：整条宽轨道，铺满卡片宽度 */
.speed-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.speed-range::-webkit-slider-runnable-track {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe7ae 0%, #ffd27a 30%, #f3a83f 100%);
  border: 1px solid rgba(170,112,34,.55);
  box-shadow: inset 0 2px 4px rgba(130,70,0,.22);
}
.speed-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  margin-top: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff8e0, #f0b14c 72%);
  border: 2px solid #a4630e;
  box-shadow: 0 3px 8px rgba(150,90,10,.4);
}
.speed-range::-moz-range-track {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe7ae, #f3a83f);
  border: 1px solid rgba(170,112,34,.55);
}
.speed-range::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff8e0, #f0b14c 72%);
  border: 2px solid #a4630e;
}
.speed-range:active::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(240,170,60,.25), 0 3px 8px rgba(150,90,10,.4); }
.speed-range:active::-moz-range-thumb { box-shadow: 0 0 0 6px rgba(240,170,60,.25); }
.about-body { width: 100%; padding: 14px; }
.about-text {
  background: linear-gradient(180deg, rgba(255,253,248,.96), rgba(248,241,225,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 2;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(130,100,50,.10);
}
.about-text b { color: #b46a16; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: var(--ink-dim); font-size: 12.5px; margin-bottom: 6px; }
.qr-img {
  width: 132px; height: 132px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  border: 1px solid rgba(190,145,70,.4);
  box-shadow: 0 4px 14px rgba(170,120,50,.2);
}

/* ---------- 开关 ---------- */
.set-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.set-label { font-size: 15px; color: var(--ink); }
.set-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.set-switch input { opacity: 0; width: 0; height: 0; }
.track {
  position: absolute; inset: 0;
  background: #e9e0c8;
  border: 1px solid #d8ccae;
  border-radius: 13px;
  transition: background .2s;
  box-shadow: inset 0 1px 2px rgba(130,105,60,.14);
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #a29a89;
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track {
  background: linear-gradient(90deg, #f6be4f, #df9430);
  border-color: #c98d2a;
}
.set-switch input:checked + .track::after { transform: translateX(22px); background: #fff; box-shadow: 0 1px 3px rgba(120,70,10,.35); }

/* ---------- 游戏 ---------- */
#view-game { padding-top: 0; padding-bottom: 20px; }
.game-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 8px 8px;
}
.game-title {
  font-size: 20px;
  letter-spacing: 4px;
  color: #9c5a0f;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.btn-pause {
  position: absolute;
  right: 4px; top: 12px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(120,95,50,.24);
  background: linear-gradient(180deg, #fffdf6, #f1e9d5);
  color: var(--ink-soft);
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(120,90,40,.16);
}
.btn-pause:active { transform: scale(.94); }

.attr-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.attr-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,253,248,.98), rgba(247,240,225,.94));
  border: 1px solid rgba(200,175,120,.5);
  border-radius: var(--radius);
  padding: 12px 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 3px 12px rgba(130,100,50,.10);
}
.attr-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #e7b24e, #c9711d);
}
.attr-card:nth-child(2)::before { background: linear-gradient(180deg, #c9e07a, #62a83e); }
.attr-card:nth-child(3)::before { background: linear-gradient(180deg, #8fb8ff, #3f6fd0); }
.attr-card:nth-child(4)::before { background: linear-gradient(180deg, #e79de0, #a34ec8); }
.attr-name { color: var(--ink-dim); font-size: 12px; letter-spacing: 1px; }
.attr-rank { color: #b46a16; font-weight: 800; font-size: 12.5px; }
.attr-val { color: #241a0d; font-size: 26px; font-weight: 900; letter-spacing: .5px; }
.attr-sub { color: var(--ink-dim); font-size: 12px; }
.attr-wuhun { grid-column: 1 / -1; }
.attr-wuhun-name { color: #241a0d; font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.attr-innate-line { color: #a0611c; font-size: 13px; margin-top: 2px; }
.attr-innate-line b { color: #d0552a; }

.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255,251,241,.82), rgba(248,241,225,.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 1px 0 #fff, 0 2px 10px rgba(130,100,50,.08);
}
.log-item {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(246,240,226,.78);
  color: var(--ink);
  animation: logIn .32s ease both;
}
@keyframes logIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}
.log-item.year{ background: rgba(246,240,226,.5); color: var(--ink-dim); font-size: 12.5px; }
.log-item.brk { background: linear-gradient(180deg, rgba(126,205,110,.2), rgba(126,205,110,.1)); border: 1px solid rgba(80,160,66,.5); color: #23611a; }
.log-item.gain { background: linear-gradient(180deg, rgba(126,205,110,.2), rgba(126,205,110,.1)); border: 1px solid rgba(80,160,66,.5); color: #23611a; }
.log-item.ev1 { background: linear-gradient(180deg, rgba(116,160,240,.18), rgba(116,160,240,.08)); border: 1px solid rgba(80,120,210,.5); color: #1e4a9e; }
.log-item.ev2 { background: linear-gradient(180deg, rgba(184,132,238,.18), rgba(184,132,238,.08)); border: 1px solid rgba(150,95,210,.5); color: #6a23a8; }
.log-item.ev3 { background: linear-gradient(180deg, rgba(222,178,72,.2), rgba(222,178,72,.08)); border: 1px solid rgba(190,148,60,.55); color: #8a5d08; }
.log-item.ev4 { background: linear-gradient(180deg, rgba(240,96,84,.2), rgba(240,96,84,.08)); border: 1px solid rgba(220,70,60,.5); color: #b82c20; }
.log-item.rare{ background: linear-gradient(180deg, rgba(255,170,84,.2), rgba(255,150,60,.08)); border: 1px solid rgba(240,140,60,.55); color: #c05a12; }
.log-item.red {
  background: linear-gradient(180deg, rgba(244,80,72,.2), rgba(244,80,72,.08));
  border: 1px solid rgba(220,60,55,.55);
  color: #b81f15;
  font-weight: 800;
}
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(232,102,98,.24), rgba(236,190,84,.24), rgba(124,200,120,.24), rgba(104,160,236,.24), rgba(180,120,236,.24));
  background-size: 400% 100%;
  border: 1px solid rgba(190,148,60,.6);
  color: #241a0d;
  font-weight: 800;
  animation: rainbowShift 1.2s linear infinite;
}
@keyframes rainbowShift { 0% { background-position: 0% 0; } 100% { background-position: 400% 0; } }
.log-item.god {
  background: linear-gradient(180deg, rgba(240,204,124,.28), rgba(240,190,96,.12));
  border: 1px solid rgba(200,150,60,.6);
  color: #7a4f04;
  font-weight: 800;
}
.log-item.dead{ background: linear-gradient(180deg, rgba(200,84,70,.18), rgba(200,84,70,.08)); border: 1px solid rgba(190,70,55,.5); color: #ab3124; }

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.settle-box {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,253,248,.97), rgba(250,243,228,.95));
  border: 1px solid rgba(200,170,110,.55);
  border-radius: 18px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 6px 26px rgba(130,95,45,.18);
}
.settle-title { text-align: center; font-size: 23px; font-weight: 900; color: #241a0d; letter-spacing: 2px; }
.settle-title.god {
  background: linear-gradient(180deg, #a05f05, #e0a437 55%, #6f4a0a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(255,235,180,.6));
  animation: titleBreath 2.6s ease-in-out infinite;
}
.settle-wuhun { text-align: center; color: var(--ink-dim); font-size: 13.5px; }
.settle-wuhun b { color: #d05a16; font-weight: 800; }
.settle-rows { display: flex; flex-direction: column; }
.s-row {
  display: flex; justify-content: space-between;
  padding: 7px 6px;
  border-bottom: 1px dashed #ddd1b5;
  font-size: 14px;
}
.s-row:last-child { border-bottom: none; }
.s-row span { color: var(--ink-dim); }
.s-row b { color: var(--ink); font-weight: 800; }
.settle-god {
  text-align: center;
  font-size: 14px;
  color: #7a4f04;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(242,206,128,.32), rgba(240,192,100,.12));
  border: 1px solid rgba(200,150,60,.6);
  border-radius: 11px;
  padding: 10px;
  letter-spacing: 1px;
}
.settle-legacy { font-size: 12.5px; color: #cf4f13; line-height: 1.6; text-align: center; font-weight: 700; }
.settle-rank {
  background: linear-gradient(180deg, rgba(240,200,110,.2), rgba(240,195,100,.1));
  border: 1px solid rgba(200,150,60,.4);
  border-radius: 11px;
  padding: 7px;
  color: #8a5d08;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
  font-weight: 700;
}
.settle-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.settle-btns .btn-big { padding: 11px 6px; font-size: 15px; border-radius: 11px; }

/* ---------- 排行榜 ---------- */
.page-view { padding: 0 !important; }
.page-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background: linear-gradient(180deg, rgba(252,246,232,.96), rgba(249,240,222,.9));
  border-bottom: 1px solid rgba(210,180,120,.6);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(130,100,50,.07);
}
.page-title {
  flex: 1; text-align: center;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(180deg, #a05f05, #e0a437 60%, #6f4a0a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  letter-spacing: 3px;
}
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(120,95,50,.22);
  background: #f6efdd;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex: none;
  box-shadow: 0 1px 4px rgba(120,90,40,.12);
}
.btn-close:active { transform: scale(.92); }
.tabs { display: flex; gap: 8px; padding: 10px 14px 4px; width: 100%; }
.tabs-small { padding-top: 4px; }
.tabs-small .tab { font-size: 12px; padding: 6px 0; }
.tab {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 0;
  background: rgba(243,234,216,.9);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, color .2s ease;
}
.tab:active { transform: scale(.97); }
.tab.active {
  background: linear-gradient(180deg, #ffd98a, #f0a63e 60%, #dd8a26);
  color: #3a2100;
  border-color: rgba(255,220,150,.7);
  box-shadow: 0 3px 10px rgba(220,140,40,.3);
}
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #a0611c; width: 100%; font-weight: 700; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: var(--ink-dim); padding: 30px 0; font-size: 14px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255,253,248,.98), rgba(250,244,231,.9));
  border: 1px solid rgba(210,185,130,.6);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(130,100,50,.07);
}
.lb-row.me {
  box-shadow: 0 0 0 2px #c8942c inset, 0 3px 12px rgba(200,148,44,.22);
  background: linear-gradient(180deg, rgba(255,248,224,.98), rgba(250,236,196,.92));
}
.lb-rank {
  flex: none;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: #f0e8d4;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 27px;
  border: 1px solid rgba(180,150,90,.3);
}
.lb-rank.top {
  color: #fff;
  border: none;
  background: linear-gradient(180deg, #ffb75a, #e8882a);
  box-shadow: 0 2px 6px rgba(220,130,40,.4);
}
.lb-rank.top.r1 { background: linear-gradient(180deg, #ff8b70, #e64f38); box-shadow: 0 2px 8px rgba(230,80,50,.45); }
.lb-rank.top.r2 { background: linear-gradient(180deg, #ffd07a, #ec9c32); }
.lb-rank.top.r3 { background: linear-gradient(180deg, #ffe3a0, #d6a92e); color: #5d3c00; }
.lb-user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 2px rgba(200,148,44,.4);
}
.lb-name { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-score {
  font-size: 15px; font-weight: 900; color: #a35d12; flex: none; white-space: nowrap;
}
.lb-time { font-size: 11px; color: var(--ink-dim); flex: none; }

/* ---------- 遮罩 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(60,46,26,.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: linear-gradient(180deg, #fffdf6, #f7f0de);
  border: 1px solid rgba(200,170,110,.6);
  border-radius: 18px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 10px 44px rgba(70,45,10,.4);
  animation: popUp .25s ease both;
}
@keyframes popUp {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.mask-title {
  text-align: center;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(180deg, #a05f05, #e0a437 60%, #6f4a0a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 3px;
}
.mask-info { text-align: center; color: var(--ink-dim); font-size: 13px; line-height: 1.7; }
.mask-box .set-row { justify-content: center; padding: 4px 0; }
.review-box { width: 330px; max-width: 88vw; max-height: 80vh; }
.review-log {
  flex: 1;
  min-height: 200px;
  max-height: 55vh;
  overflow-y: auto;
  background: rgba(255,252,244,.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 1px 0 #fff;
}
.review-log .rv-brk { color: #23611a; }
.review-log .rv-gain { color: #23611a; }
.review-log .rv-ev1 { color: #1e4a9e; }
.review-log .rv-ev2 { color: #6a23a8; }
.review-log .rv-ev3 { color: #8a5d08; }
.review-log .rv-ev4 { color: #b82c20; }
.review-log .rv-god { color: #8a5d08; font-weight: 800; }
.review-log .rv-dead { color: #ab3124; }
.review-log .rv-rare { color: #c05a12; }
.review-log .rv-red { color: #b81f15; font-weight: 800; }
.review-log .rv-rainbow {
  background: linear-gradient(90deg, #e0503c, #dc9c28, #67a845, #3d77d0, #9546c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.review-log .rv-year { color: var(--ink-dim); }

/* ---------- 电脑端 ---------- */
@media (min-width: 520px) {
  body { background: #e4d6bd; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cfb98a; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 高阶资质增益（点赞/投币/关注） ---------- */
.btn-follow {
  border-color: rgba(200,150,60,.55);
  color: #a0611c;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fff8e8, #faedcf);
}
.follow-box { width: 330px; max-width: 88vw; }
.follow-rows { display: flex; flex-direction: column; gap: 10px; }
.follow-action {
  display: flex; justify-content: space-between; align-items: center;
  text-align: left; padding: 13px 16px; font-size: 14px;
  color: var(--ink);
  border-radius: 12px;
  border: 1px solid rgba(150,120,70,.24);
  background: linear-gradient(180deg, #fffdf6, #f4ecda);
}
.follow-action:active { transform: scale(.98); }
.fb-state { font-size: 13px; font-weight: 800; }
.fb-state.done { color: var(--green); }
.fb-state.todo { color: var(--ink-dim); }
.fb-total { font-size: 15px; color: #a05f05; font-weight: 900; text-align: center; }

/* ---------- 成就系统 ---------- */
.home-ach-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
#btn-ach { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px 14px; }
#btn-ach > span:first-child { font-size: 17px; line-height: 1.3; }
.ach-btn-tip { font-size: 10px; color: #a0611c; font-weight: 700; white-space: nowrap; }
.ach-tip { text-align: center; color: #a0611c; font-size: 12px; margin-bottom: 12px; font-weight: 700; }
.ach-total {
  text-align: center;
  color: #a05f05;
  font-size: 16px;
  font-weight: 900;
  margin: 6px 14px 10px;
  padding: 9px;
  width: calc(100% - 28px);
  background: linear-gradient(180deg, rgba(255,240,200,.6), rgba(250,224,160,.4));
  border: 1px solid rgba(200,150,60,.45);
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(190,140,50,.12);
}
.ach-list {
  display: flex; flex-direction: column; gap: 14px;
  padding: 6px 16px 30px;
  width: 100%;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.ach-list::-webkit-scrollbar { width: 6px; }
.ach-list::-webkit-scrollbar-thumb { background: #cfb26a; border-radius: 3px; }
.ach-list::-webkit-scrollbar-track { background: #f1ead8; border-radius: 3px; }
.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(210,185,130,.6);
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,253,248,.98), rgba(246,240,226,.92));
  box-shadow: 0 3px 12px rgba(130,100,50,.08);
}
.ach-item.done {
  border-color: rgba(200,155,70,.8);
  background: linear-gradient(180deg, rgba(255,246,224,.98), rgba(249,232,192,.95));
  box-shadow: 0 4px 16px rgba(200,148,44,.22);
}
.ach-item.todo { opacity: .78; }
.ach-name { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #8a5d08; }
.ach-item.todo .ach-name { color: var(--ink-soft); }
.ach-bonus { font-size: 13px; white-space: nowrap; font-weight: 800; }
.ach-item.done .ach-bonus { color: var(--green); }
.ach-item.todo .ach-bonus { color: var(--ink-dim); }

/* ---------- 成就达成面包屑 ---------- */
.ach-toast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  text-align: center;
  padding: 13px 16px;
  background: linear-gradient(180deg, #ffd98a, #ef9f32 70%, #dc7f1d);
  color: #2f1c02;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  transform: translateY(-100%);
  transition: transform .35s ease;
  box-shadow: 0 4px 18px rgba(160,100,20,.4);
}
.ach-toast.show { transform: translateY(0); }
