/* ============================================================
 * 洪荒模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：玄黄·鸿蒙 暗金洪荒
 * ============================================================ */
[hidden] { display: none !important; }

/* ---------- 量劫血光全屏特效（劫起显现、劫落消除） ---------- */
.jie-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background:
    radial-gradient(130% 100% at 50% 40%, rgba(255, 0, 0, 0) 55%, rgba(150, 0, 0, .16) 78%, rgba(70, 0, 0, .34) 100%),
    linear-gradient(180deg, rgba(80, 0, 0, 0) 0%, rgba(120, 0, 0, .06) 50%, rgba(80, 0, 0, 0) 100%);
  animation: jieRed 1.8s ease-in-out infinite;
}
.jie-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 40% at 50% 50%, rgba(255, 70, 40, .05), transparent 70%);
}
@keyframes jieRed { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #100b05;
  color: #e6dcc3;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(214, 160, 60, .16), transparent 62%),
    linear-gradient(180deg, #17100a 0%, #120c06 45%, #0d0804 100%);
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 50%;
  width: 480px; max-width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background:
    radial-gradient(1px 1px at 20% 15%, rgba(235, 205, 130, .55), transparent),
    radial-gradient(1px 1px at 80% 30%, rgba(200, 140, 60, .45), transparent),
    radial-gradient(1.5px 1.5px at 45% 65%, rgba(240, 220, 150, .35), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(230, 180, 90, .4), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255, 230, 170, .3), transparent);
  pointer-events: none;
  z-index: 0;
}
.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 #5a4326;
  background: linear-gradient(180deg, #3a2c18, #2a1f10);
  color: #e6dcc3;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); filter: brightness(1.15); }
.btn-primary {
  border: 1px solid #d6a04c;
  background: linear-gradient(180deg, #f0cf7a, #cf9f3e);
  color: #352308;
  font-weight: 700;
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-danger { border-color: #7a2f2f; color: #ffb3a6; }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #5a4326;
  background: linear-gradient(180deg, #3a2c18, #2a1f10);
  color: #e6dcc3;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
button:disabled { opacity: .45; filter: grayscale(.35); }

/* ---------- 首页 ---------- */
#view-home { justify-content: center; gap: 12px; }
.home-hero { text-align: center; margin-top: -16px; }
.home-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 5px;
  background: linear-gradient(180deg, #ffe9ae 0%, #e2b45c 45%, #a97b2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(226, 180, 92, .3);
}
.home-sub { color: #bfa878; font-size: 13px; margin-top: 6px; letter-spacing: 1px; }
.home-count {
  background: rgba(214, 160, 60, .1);
  border: 1px solid rgba(214, 160, 60, .28);
  border-radius: 20px;
  padding: 8px 14px;
  color: #d6a04c;
  font-size: 12px;
  white-space: nowrap;
}
.home-count b { font-size: 13px; }
.home-lv {
  width: 100%;
  background: rgba(24, 17, 8, .85);
  border: 1px solid #5a4326;
  border-radius: 12px;
  padding: 12px 16px;
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: #a09278; font-size: 13px; }
.lv-lv { color: #ffe9ae; font-size: 16px; font-weight: 700; }
.lv-bonus { color: #e8a06b; font-size: 10px; margin-left: 4px; }
.lv-exp-line { margin-top: 7px; color: #a89a80; font-size: 12px; text-align: center; }
.lv-bar { height: 10px; background: #322613; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #d6a04c, #f0d98a); border-radius: 5px; width: 0%; transition: width .3s; }
.home-btns { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.home-ach-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.home-link-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.home-link-btns .btn, #btn-rank { font-size: clamp(12px, 4.2vw, 15px); padding: 11px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.settings-body { width: 100%; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.set-card { background: rgba(24, 17, 8, .85); border: 1px solid #5a4326; border-radius: 12px; padding: 12px 14px; }
.set-card .set-row { justify-content: space-between; }
.set-card .speed-label { margin-bottom: 4px; }
.about-body { width: 100%; padding: 14px; }
.about-text {
  background: rgba(24, 17, 8, .85);
  border: 1px solid #5a4326;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.9;
  color: #cfc4a8;
}
.about-text b { color: #e2c66a; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: #a89a80; font-size: 12.5px; margin-bottom: 6px; }
.qr-img { width: 132px; height: 132px; border-radius: 10px; background: #fff; padding: 5px; }

/* ---------- 开关 / 滑块 ---------- */
.set-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.set-label { font-size: 15px; color: #cfc4a8; }
.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: #3a2d18;
  border: 1px solid #5a4326;
  border-radius: 13px;
  transition: background .2s;
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #9a8a68;
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track { background: #cf9f3e; border-color: #cf9f3e; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #fff; }
.set-tip { margin-top: 6px; color: #8d7e62; font-size: 12px; line-height: 1.6; }
.mode-label { display: block; margin-bottom: 6px; }
.speed-label { display: flex; justify-content: space-between; align-items: center; color: #a09278; font-size: 13px; }
.speed-label b { color: #d6a04c; }
.speed-range { width: 100%; margin-top: 6px; accent-color: #cf9f3e; }

/* 应劫方式分段选择 */
.mode-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.mode-seg .seg {
  border: 1px solid #5a4326;
  background: #2a1f10;
  color: #c9b790;
  border-radius: 9px;
  padding: 9px 0;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-seg .seg.on { background: linear-gradient(180deg, #e6c765, #cf9f3e); color: #352308; border-color: #e0b85e; font-weight: 700; }

/* ---------- 游戏 ---------- */
#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 6px;
}
.game-title {
  font-size: 20px;
  letter-spacing: 3px;
  color: #d6a04c;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: clip;
}
.btn-pause {
  position: absolute;
  right: 4px; top: 12px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid #5a4326;
  background: linear-gradient(180deg, #3a2c18, #2a1f10);
  color: #e6dcc3;
  font-size: 17px;
  cursor: pointer;
}
.btn-pause:active { transform: scale(.94); }

/* HUD */
.hud { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; width: 100%; }
.hud > * { width: 100%; min-width: 0; }
.hud-line2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hud-line4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.attr-card {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(214, 176, 106, .14);
  border-radius: 10px;
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  text-align: center;
}
.attr-name { color: #a09278; font-size: 10px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; }
.attr-rank { color: #e2c66a; font-weight: 700; font-size: 12px; }
.attr-val { color: #f0e3bd; font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.attr-mini { font-size: 14px; letter-spacing: -.2px; }
.hud-line2 .attr-card:first-child .attr-val { font-size: 16px; letter-spacing: 0; }
.shard-line {
  background: rgba(150, 120, 255, .1);
  border: 1px solid rgba(160, 130, 255, .4);
  border-radius: 10px;
  color: #d9ccff;
  font-size: 12.5px;
  padding: 6px 10px;
  text-align: center;
}
.shard-line b { color: #f0e6ff; }

/* 命格行 */
.hud .trait-line-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(214, 176, 106, .14);
  border-radius: 10px;
  padding: 6px 8px;
  width: 100%;
  min-height: 34px;
}
.hud .trait-line-wrap[hidden] { display: none; }
.trait-line-label { font-size: 12px; color: #a09278; letter-spacing: 2px; flex-shrink: 0; }
.hud .trait-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.trait-line .chip {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: #1a1005;
  font-weight: 800;
}
.chip.color-g { background: linear-gradient(90deg,#a5d665,#d3e98a); }
.chip.color-b { background: linear-gradient(90deg,#3f9bd9,#79cff0); }
.chip.color-p { background: linear-gradient(90deg,#9a5ce0,#6a3fd0); }
.chip.color-y { background: linear-gradient(90deg,#f0b64d,#d8872e); }

.manual-tip {
  width: 100%;
  text-align: center;
  color: #e8a06b;
  font-size: 13px;
  padding: 6px 0 2px;
}
.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(20, 14, 6, .72);
  border: 1px solid #3a2d18;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}
.log-item { font-size: 13.5px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; background: rgba(60, 45, 24, .35); color: #d6cbb0; }
.log-item.year { background: rgba(60, 45, 24, .16); color: #a89a80; font-size: 12.5px; }
.log-item.brk, .log-item.up { background: rgba(255, 205, 90, .16); border: 1px solid rgba(255, 205, 90, .55); color: #ffe6a8; font-weight: 700; }
.log-item.up { font-weight: 600; }
.log-item.ev1 { background: rgba(110, 150, 220, .12); border: 1px solid rgba(110, 150, 220, .3); color: #c9d7f0; }
.log-item.ev2 { background: rgba(180, 120, 220, .12); border: 1px solid rgba(180, 120, 220, .35); color: #e0c9f5; }
.log-item.ev3 { background: rgba(214, 176, 80, .14); border: 1px solid rgba(214, 176, 80, .4); color: #f4dfa8; }
.log-item.ev4 { background: rgba(230, 110, 90, .16); border: 1px solid rgba(230, 110, 90, .45); color: #ffc0b0; }
.log-item.jz { background: rgba(180, 12, 6, .22); border: 1px solid rgba(255, 40, 25, .7); color: #ff6f58; font-weight: 700; text-shadow: 0 0 6px rgba(255, 30, 10, .3); }
.log-item.dw { background: rgba(170, 120, 255, .14); border: 1px solid rgba(170, 120, 255, .45); color: #e0ccff; }
.log-item.jie { background: rgba(230, 120, 60, .16); border: 1px solid rgba(230, 120, 60, .5); color: #ffd9a8; font-weight: 600; }
.log-item.shard { background: rgba(150, 120, 255, .16); border: 1px solid rgba(160, 130, 255, .5); color: #ddccff; }
.log-item.red { background: rgba(255, 60, 40, .16); border: 1px solid rgba(255, 70, 50, .5); color: #ff9a80; font-weight: 700; }
.log-item.god { background: rgba(255, 215, 100, .18); border: 1px solid rgba(255, 215, 100, .5); color: #fff3cc; font-weight: 700; }
.log-item.dead { background: rgba(190, 60, 45, .16); border: 1px solid rgba(190, 60, 45, .4); color: #ffb0a0; }
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(255, 90, 60, .3), rgba(255, 200, 80, .3), rgba(160, 220, 120, .3), rgba(120, 170, 255, .3), rgba(200, 130, 255, .3));
  background-size: 400% 100%;
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  font-weight: 700;
  animation: rainbowShift 1.2s linear infinite;
}
@keyframes rainbowShift { 0% { background-position: 0% 0; } 100% { background-position: 400% 0; } }
.merit { color: #ff5a48; font-weight: 700; }

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.settle-box {
  width: 100%;
  background: rgba(24, 17, 8, .88);
  border: 1px solid #5a4326;
  border-radius: 16px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settle-title { text-align: center; font-size: 22px; font-weight: 700; color: #ffe9ae; letter-spacing: 4px; }
.settle-title.god {
  background: linear-gradient(180deg, #fff3cf, #ffd866 55%, #e0a83f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
}
.settle-wuhun { text-align: center; color: #a89a80; font-size: 13.5px; }
.settle-wuhun b { color: #e8c37a; }
.settle-rows { display: flex; flex-direction: column; }
.s-row { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px dashed #3a2d18; font-size: 14px; }
.s-row:last-child { border-bottom: none; }
.s-row span { color: #a09278; }
.s-row b { color: #e6dcc3; }
.settle-god {
  text-align: center; font-size: 14px; color: #fff3cc;
  background: linear-gradient(180deg, rgba(255, 215, 100, .2), rgba(255, 215, 100, .08));
  border: 1px solid rgba(255, 215, 100, .5); border-radius: 10px; padding: 10px; letter-spacing: 1px;
}
.settle-xinwu { font-size: 12.5px; color: #e8c37a; line-height: 1.6; text-align: center; }
.settle-xinwu.warn { color: #ff8a80; font-weight: 700; }
.settle-rank { background: rgba(214, 160, 60, .1); border: 1px solid rgba(214, 160, 60, .3); border-radius: 10px; padding: 7px; color: #d6a04c; font-size: 13px; text-align: center; line-height: 1.5; }
.settle-traits { margin-top: 6px; color: #d6a04c; font-size: 12px; }
.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: 10px; }
.btn, .btn-big { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .5px; }
.btn-big { font-size: clamp(13px, 4vw, 16px); }

/* ---------- 排行榜 ---------- */
.page-view { padding: 0 !important; }
.page-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  background: #171006;
  border-bottom: 1px solid #3a2d18;
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-title { flex: 1; text-align: center; font-size: 19px; color: #d6a04c; margin: 0; letter-spacing: 2px; }
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #5a4326;
  background: #2a1f10;
  color: #c9b790;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.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: none; border-radius: 9px; padding: 8px 0; background: #2a1f10; color: #a09278; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab.active { background: linear-gradient(180deg, #e6c765, #cf9f3e); color: #352308; }
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #d6a04c; width: 100%; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: #8d7e62; padding: 30px 0; font-size: 14px; }
.lb-row { display: flex; align-items: center; gap: 8px; background: #211708; border: 1px solid #3a2d18; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.lb-row.me { box-shadow: 0 0 0 2px #cf9f3e inset; background: rgba(207, 159, 62, .12); }
.lb-rank { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #3a2d18; color: #a09278; font-size: 13px; font-weight: 700; text-align: center; line-height: 26px; }
.lb-rank.top { background: #c77f2a; color: #fff; }
.lb-rank.top.r1 { background: #e04e34; }
.lb-rank.top.r2 { background: #d98b2b; }
.lb-rank.top.r3 { background: #e0b64a; }
.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; }
.lb-name { font-size: 14px; color: #d6cbb0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: #ffe9ae; flex: none; white-space: nowrap; }
.lb-time { font-size: 11px; color: #8d7e62; flex: none; }

/* ---------- 遮罩 / 弹窗 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 2, .74);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: #1a120a;
  border: 1px solid #5a4326;
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
}
.mask-title { text-align: center; font-size: 20px; color: #d6a04c; font-weight: 700; letter-spacing: 2px; }
.mask-info { text-align: center; color: #b0a183; font-size: 13px; line-height: 1.7; }
.mask-box .set-row { justify-content: center; padding: 4px 0; }
.mask-info b.gold { color: #ffe9ae; }
.review-box { width: 320px; max-width: 88vw; max-height: 80vh; }
.review-log {
  flex: 1;
  min-height: 200px;
  max-height: 55vh;
  overflow-y: auto;
  background: rgba(24, 17, 8, .72);
  border: 1px solid #3a2d18;
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #cfc4a8;
  -webkit-overflow-scrolling: touch;
}
.review-log .rv-brk, .review-log .rv-up { color: #ffe08a; font-weight: 700; }
.review-log .rv-ev1 { color: #c9d7f0; }
.review-log .rv-ev2 { color: #e0c9f5; }
.review-log .rv-ev3 { color: #f4dfa8; }
.review-log .rv-ev4 { color: #ffc0b0; }
.review-log .rv-dw { color: #ddbbff; }
.review-log .rv-jz { color: #ff7a5c; font-weight: 700; }
.review-log .rv-jie { color: #ffd9a8; }
.review-log .rv-shard { color: #ddccff; }
.review-log .rv-god { color: #fff3cc; font-weight: 700; }
.review-log .rv-dead { color: #ffb0a0; }
.review-log .rv-red { color: #ff8a80; font-weight: 700; }
.review-log .rv-year { color: #9a8b6f; }
.review-log .rv-rainbow {
  background: linear-gradient(90deg, #ff6b6b, #ffd166, #9adf8a, #6ab4ff, #b488ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* 高光 */
.hl-list { width: 100%; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.hl-empty { color: #8d7e62; text-align: center; padding: 40px 10px; font-size: 13px; line-height: 1.8; }
.hl-row { width: 100%; background: rgba(24, 17, 8, .88); border: 1px solid #5a4326; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.hl-row:active { background: rgba(48, 36, 20, .95); }
.hl-top { display: flex; align-items: center; gap: 8px; }
.hl-time { color: #a89a80; font-size: 12px; white-space: nowrap; }
.hl-title { color: #ffe9ae; font-size: 14px; font-weight: 700; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-badge { font-size: 11px; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.hl-badge.god { background: rgba(255, 215, 100, .2); color: #ffe9ae; border: 1px solid rgba(255, 215, 100, .45); }
.hl-badge.dead { background: rgba(150, 110, 80, .15); color: #d6c0a0; border: 1px solid rgba(150, 110, 80, .35); }
.hl-sub { margin-top: 0; color: #bfb296; font-size: 12px; line-height: 1.6; }
.hl-sub b { color: #ffd9a8; }
.hl-sub-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.hl-export-btn { flex-shrink: 0; margin-left: auto; font-size: 12px; padding: 5px 12px; border-radius: 15px; border: 1px solid #7c6540; background: rgba(150, 120, 200, .14); color: #cdb6e8; white-space: nowrap; cursor: pointer; }
.mask-box.hl-box { width: 320px; max-width: 88vw; max-height: 80vh; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.mask-box.hl-box .mask-head { flex-shrink: 0; }
.mask-box.hl-box .review-log { flex: 1; min-height: 0; }
.mask-box.hl-box .btn { flex-shrink: 0; width: 100%; }
.mask-head { display: flex; align-items: center; gap: 6px; width: 100%; }
.mask-head .mask-title { flex: 1; text-align: center; margin: 0; }
#hl-toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 99; max-width: 82vw; background: rgba(24, 17, 8, .96); border: 1px solid #7c6540; border-radius: 20px; color: #e8edf6; font-size: 13px; padding: 9px 16px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); pointer-events: none; text-align: center; }
#hl-img-mask { align-items: center; justify-content: center; background: rgba(8, 6, 3, .96); padding: 12px; }
.hl-img-box { width: min(94vw, 460px); height: 92vh; max-height: 92vh; display: flex; flex-direction: column; gap: 10px; }
.hl-img-head { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hl-img-tip { flex: 1; color: #cfd6e4; font-size: 13px; text-align: center; }
.hl-img-scroll { flex: 1; min-height: 0; overflow: auto; background: #fff; border-radius: 10px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.hl-img-scroll img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.hl-img-box .btn { flex-shrink: 0; }

/* 保底 */
.guard-rows { display: flex; flex-direction: column; gap: 5px; width: 100%; color: #d6cbb0; font-size: 13px; padding: 2px 0; }
.guard-row { background: rgba(50, 38, 20, .6); border-radius: 8px; padding: 5px 10px; text-align: left; }
.guard-row b { color: #ffe9ae; }

/* 关注 / 三连 */
.btn-follow { border-color: #d6a04c; color: #e2c66a; margin-bottom: 12px; font-size: 14px; padding: 12px 16px; }
.follow-box { width: 320px; 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; }
.fb-state { font-size: 13px; }
.fb-state.done { color: #8fe0a2; }
.fb-state.todo { color: #8d7e62; }
.fb-total { font-size: 15px; color: #d6a04c; font-weight: 700; }
.follow-grp { color: #e8c37a; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 4px 0 0; }

/* 成就 */
.ach-tip { text-align: center; color: #d6a04c; font-size: 12px; margin-bottom: 12px; }
.ach-total { text-align: center; color: #d6a04c; font-size: 16px; font-weight: 700; margin: 6px 14px 10px; padding: 9px; width: calc(100% - 28px); background: rgba(214, 160, 60, .1); border: 1px solid rgba(214, 160, 60, .3); border-radius: 12px; }
.ach-list { display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 30px; width: 100%; max-height: calc(100vh - 140px); overflow-y: auto; }
.ach-item { display: flex; align-items: center; justify-content: space-between; border: 1px solid #5a4326; border-radius: 14px; padding: 16px 18px; background: linear-gradient(180deg, #2c2212, #211708); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.ach-item.done { border-color: #d6a04c; background: linear-gradient(180deg, #433614, #33280f); box-shadow: 0 2px 14px rgba(214, 160, 60, .18); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #f0d98a; }
.ach-item.todo .ach-name { color: #a09278; }
.ach-bonus { font-size: 13px; white-space: nowrap; }
.ach-item.done .ach-bonus { color: #8fe0a2; }
.ach-item.todo .ach-bonus { color: #6d5f44; }
.ach-toast { position: fixed; top: 0; left: 0; right: 0; z-index: 99; text-align: center; padding: 12px 16px; background: linear-gradient(180deg, #f0d98a, #d6a04c); color: #3a2c08; font-size: 15px; font-weight: 700; letter-spacing: 1px; transform: translateY(-100%); transition: transform .35s ease; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.ach-toast.show { transform: translateY(0); }
#btn-ach, #btn-guard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 8px; }
#btn-ach > span:first-child, #btn-guard > span:first-child { font-size: 17px; line-height: 1.3; }
.ach-btn-tip { font-size: 10px; color: #d6a04c; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#btn-guard { opacity: .85; }
#btn-guard.on { opacity: 1; border-color: #d6a04c; color: #ffe9ae; background: linear-gradient(180deg, #5a4a1e, #3c3412); box-shadow: 0 0 12px rgba(214, 160, 60, .35); }

/* 命格选择弹层 */
.mask-box.trait-box { width: 350px; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.trait-mask-title { color: #ffe9b0; text-shadow: 0 0 14px rgba(255, 190, 90, .35); }
.trait-list { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; min-height: 0; padding: 2px; }
.trait-opt { display: block; width: 100%; text-align: left; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 9px 11px; cursor: pointer; }
.trait-opt-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.trait-opt-name { font-size: 16px; font-weight: 900; letter-spacing: 1px; }
.trait-opt-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; color: #1a1005; font-weight: 800; }
.trait-opt-desc { font-size: 12px; color: #b0a183; line-height: 1.5; }
.trait-opt.color-g .trait-opt-tag { background: linear-gradient(90deg, #a5d665, #d3e98a); }
.trait-opt.color-b .trait-opt-tag { background: linear-gradient(90deg, #3f9bd9, #79cff0); }
.trait-opt.color-p .trait-opt-tag { background: linear-gradient(90deg, #9a5ce0, #6a3fd0); }
.trait-opt.color-y .trait-opt-tag { background: linear-gradient(90deg, #f0b64d, #d8872e); }
.trait-opt.color-g .trait-opt-name { color: #c6e8a5; }
.trait-opt.color-b .trait-opt-name { color: #a4d9f2; }
.trait-opt.color-p .trait-opt-name { color: #d0b3f2; }
.trait-opt.color-y .trait-opt-name { color: #f7d89a; }
.trait-opt.sel { border-color: #ffe9ae; box-shadow: 0 0 0 2px rgba(255, 230, 160, .35), 0 0 14px rgba(255, 210, 110, .25); }
.trait-opt.sel .trait-opt-desc { color: #ffe9b0; }

/* 量劫抉择弹窗按钮 */
#jie-mask .btn { text-align: left; justify-content: flex-start; }

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

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