/* ============================================================
 * 宇宙征服模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：深空·星云 蓝金
 * ============================================================ */
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #060b18;
  color: #cfd9ea;
  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 440px at 50% -8%, rgba(90, 200, 230, .16), transparent 62%),
    radial-gradient(600px 300px at 100% 20%, rgba(120, 90, 255, .1), transparent 60%),
    linear-gradient(180deg, #0a1526 0%, #070f1e 48%, #050a16 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% 12%, rgba(190,220,255,.75), transparent),
    radial-gradient(1px 1px at 72% 22%, rgba(150,200,255,.6), transparent),
    radial-gradient(1.4px 1.4px at 45% 62%, rgba(220,230,255,.5), transparent),
    radial-gradient(1px 1px at 68% 78%, rgba(200,180,255,.55), transparent),
    radial-gradient(1px 1px at 12% 86%, rgba(255,225,170,.4), transparent),
    radial-gradient(1px 1px at 88% 48%, rgba(170,220,255,.5), 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 #33507a;
  background: linear-gradient(180deg, #15253e, #0d1830);
  color: #cfd9ea;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.btn:active { transform: scale(.97); filter: brightness(1.2); }
.btn-primary {
  border: 1px solid #6ec6e8;
  background: linear-gradient(180deg, #bcebff, #59b4dc);
  color: #07222f;
  font-weight: 700;
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-danger { border-color: #9c3a3a; color: #ffb3ad; }
.btn-back {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #33507a;
  background: linear-gradient(180deg, #15253e, #0d1830);
  color: #cfd9ea; 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: -12px; }
.home-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: 3px;
  white-space: nowrap;
  background: linear-gradient(180deg, #eaf6ff 0%, #a8dcf5 45%, #5f9fd0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 26px rgba(120, 200, 255, .35);
}
.home-sub { color: #8fa6c2; font-size: 12.5px; margin-top: 6px; letter-spacing: 1px; white-space: nowrap; }
.home-inherit {
  background: linear-gradient(90deg, rgba(190,120,255,.12), rgba(120,180,255,.12));
  border: 1px solid rgba(150,130,255,.4);
  border-radius: 20px;
  padding: 7px 14px;
  color: #d6ccff;
  font-size: 12.5px;
  white-space: nowrap;
  text-align: center;
}
.home-inherit b { color: #fff; }
.home-count {
  background: rgba(90, 200, 230, .1);
  border: 1px solid rgba(90, 200, 230, .28);
  border-radius: 20px;
  padding: 8px 14px;
  color: #6cc7e6;
  font-size: 12px;
  white-space: nowrap;
}
.home-count b { font-size: 13px; }
.home-lv { width: 100%; background: rgba(10, 20, 36, .85); border: 1px solid #33507a; border-radius: 12px; padding: 12px 16px; }
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: #8fa0bc; font-size: 13px; }
.lv-lv { color: #bcebff; font-size: 16px; font-weight: 700; }
.lv-bonus { color: #e8a06b; font-size: 10px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.lv-exp-line { margin-top: 7px; color: #8fa0bc; font-size: 12px; text-align: center; }
.lv-bar { height: 10px; background: #12233c; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #59b4dc, #a5e4ff); 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(10, 20, 36, .85); border: 1px solid #33507a; 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(10, 20, 36, .85); border: 1px solid #33507a; border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.9; color: #c4d2e6; }
.about-text b { color: #8fd6f0; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: #8fa0bc; 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: #c4d2e6; }
.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: #14243c; border: 1px solid #33507a; border-radius: 13px; transition: background .2s; }
.track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #6f86a8; transition: transform .2s, background .2s; }
.set-switch input:checked + .track { background: #59b4dc; border-color: #59b4dc; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #fff; }
.set-tip { margin-top: 6px; color: #73879f; 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: #8fa0bc; font-size: 13px; }
.speed-label b { color: #6cc7e6; }
.speed-range { width: 100%; margin-top: 6px; accent-color: #59b4dc; }

/* 抉择方式分段选择（6 项） */
.mode-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.mode-seg .seg {
  border: 1px solid #33507a;
  background: #0d1830;
  color: #b0c3dc;
  border-radius: 9px;
  padding: 9px 2px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-seg .seg.on { background: linear-gradient(180deg, #bcebff, #59b4dc); color: #07222f; border-color: #8fd6f0; 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: 2px; color: #6cc7e6; 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 #33507a; background: linear-gradient(180deg, #15253e, #0d1830); color: #cfd9ea; font-size: 17px; cursor: pointer; }
.btn-pause:active { transform: scale(.94); }

.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(3, minmax(0, 1fr)); gap: 5px; }
.attr-card { background: rgba(255, 255, 255, .035); border: 1px solid rgba(110, 180, 240, .16); border-radius: 10px; padding: 7px 4px; display: flex; flex-direction: column; justify-content: center; gap: 1px; text-align: center; }
.attr-name { color: #8fa0bc; font-size: 10px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; }
.attr-rank { color: #8fd6f0; font-weight: 700; font-size: 12px; }
.attr-val { color: #e6f0ff; font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.attr-mini { font-size: 14px; letter-spacing: -.2px; }
#attr-strategy { font-size: 13px; white-space: nowrap; }
.attr-card { overflow: hidden; }
.hud-line2 .attr-card:first-child .attr-val { font-size: 16px; letter-spacing: 0; }

.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(110, 180, 240, .16); 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: #8fa0bc; 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: #071018; font-weight: 800; }
.chip.color-g { background: linear-gradient(90deg,#6fbf8a,#9fe0b4); }
.chip.color-b { background: linear-gradient(90deg,#4aa3dd,#8fd0f2); }
.chip.color-p { background: linear-gradient(90deg,#a26bdf,#7a4cd0); }
.chip.color-y { background: linear-gradient(90deg,#f2c05a,#e09a2e); }

.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(8, 16, 30, .74);
  border: 1px solid #20334f;
  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(52, 84, 128, .28); color: #c8d6ea; }
.log-item.year { background: rgba(52, 84, 128, .15); color: #8fa0bc; font-size: 12.5px; }
.log-item.brk, .log-item.up { background: rgba(90, 200, 230, .16); border: 1px solid rgba(90, 200, 230, .55); color: #d9f4ff; font-weight: 700; }
.log-item.up { font-weight: 600; }
.log-item.ev1 { background: rgba(90, 150, 230, .12); border: 1px solid rgba(90, 150, 230, .3); color: #cfe0f5; }
.log-item.ev2 { background: rgba(160, 120, 235, .12); border: 1px solid rgba(160, 120, 235, .35); color: #e0d2f5; }
.log-item.ev3 { background: rgba(240, 190, 90, .13); border: 1px solid rgba(240, 190, 90, .4); color: #f6e3ae; }
.log-item.ev4 { background: rgba(235, 120, 95, .16); border: 1px solid rgba(235, 120, 95, .45); color: #ffc6b5; }
.log-item.dw { background: rgba(150, 110, 255, .14); border: 1px solid rgba(150, 110, 255, .45); color: #e2d2ff; }
.log-item.red { background: rgba(255, 70, 45, .16); border: 1px solid rgba(255, 80, 55, .5); color: #ffa290; 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(200, 60, 45, .16); border: 1px solid rgba(200, 60, 45, .4); color: #ffb5a5; }
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(255, 90, 60, .3), rgba(255, 200, 80, .3), rgba(110, 230, 200, .3), rgba(90, 170, 255, .3), rgba(190, 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; } }

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.settle-box { width: 100%; background: rgba(10, 20, 36, .9); border: 1px solid #33507a; 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: #bcebff; letter-spacing: 3px; }
.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: #8fa0bc; font-size: 13.5px; }
.settle-wuhun b { color: #8fd6f0; }
.settle-rows { display: flex; flex-direction: column; }
.s-row { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px dashed #20334f; font-size: 14px; }
.s-row:last-child { border-bottom: none; }
.s-row span { color: #8fa0bc; }
.s-row b { color: #e6f0ff; }
.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: #8fd6f0; line-height: 1.6; text-align: center; }
.settle-xinwu.warn { color: #ff8a80; font-weight: 700; }
.settle-rank { background: rgba(90, 200, 230, .1); border: 1px solid rgba(90, 200, 230, .3); border-radius: 10px; padding: 7px; color: #6cc7e6; font-size: 13px; text-align: center; line-height: 1.5; }
.settle-traits { margin-top: 6px; color: #6cc7e6; 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: #07101f; border-bottom: 1px solid #20334f; position: sticky; top: 0; z-index: 5; }
.page-title { flex: 1; text-align: center; font-size: 19px; color: #6cc7e6; margin: 0; letter-spacing: 2px; }
.btn-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #33507a; background: #0d1830; color: #b0c3dc; 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: #0d1830; color: #8fa0bc; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab.active { background: linear-gradient(180deg, #bcebff, #59b4dc); color: #07222f; }
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #6cc7e6; width: 100%; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: #73879f; padding: 30px 0; font-size: 14px; }
.lb-row { display: flex; align-items: center; gap: 8px; background: #0c1830; border: 1px solid #20334f; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.lb-row.me { box-shadow: 0 0 0 2px #59b4dc inset; background: rgba(89, 180, 220, .12); }
.lb-rank { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #1c304c; color: #8fa0bc; font-size: 13px; font-weight: 700; text-align: center; line-height: 26px; }
.lb-rank.top { background: #4c7fb0; color: #fff; }
.lb-rank.top.r1 { background: #d85a4a; }
.lb-rank.top.r2 { background: #c98a3a; }
.lb-rank.top.r3 { background: #b8a44a; }
.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: #c8d6ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: #bcebff; flex: none; white-space: nowrap; }
.lb-time { font-size: 11px; color: #73879f; flex: none; }

/* ---------- 遮罩 / 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(3, 8, 18, .78); z-index: 50; display: flex; align-items: center; justify-content: center; }
.mask-box { width: 300px; max-width: 86vw; background: #0c1730; border: 1px solid #33507a; 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: #6cc7e6; font-weight: 700; letter-spacing: 2px; }
.mask-info { text-align: center; color: #a8bcd6; 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(8, 16, 30, .72); border: 1px solid #20334f; border-radius: 10px; padding: 10px; font-size: 12.5px; line-height: 1.7; color: #c4d2e6; -webkit-overflow-scrolling: touch; }
.review-log .rv-brk, .review-log .rv-up { color: #d9f4ff; font-weight: 700; }
.review-log .rv-ev1 { color: #cfe0f5; }
.review-log .rv-ev2 { color: #e0d2f5; }
.review-log .rv-ev3 { color: #f6e3ae; }
.review-log .rv-ev4 { color: #ffc6b5; }
.review-log .rv-dw { color: #e2d2ff; }
.review-log .rv-god { color: #fff3cc; font-weight: 700; }
.review-log .rv-dead { color: #ffb5a5; }
.review-log .rv-red { color: #ff9a8a; font-weight: 700; }
.review-log .rv-year { color: #8fa0bc; }
.review-log .rv-rainbow { background: linear-gradient(90deg, #ff6b6b, #ffd166, #7adbb2, #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: #73879f; text-align: center; padding: 40px 10px; font-size: 13px; line-height: 1.8; }
.hl-row { width: 100%; background: rgba(10, 20, 36, .9); border: 1px solid #33507a; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.hl-row:active { background: rgba(22, 40, 66, .95); }
.hl-top { display: flex; align-items: center; gap: 8px; }
.hl-time { color: #8fa0bc; font-size: 12px; white-space: nowrap; }
.hl-title { color: #bcebff; 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(120, 150, 190, .15); color: #b6c8e0; border: 1px solid rgba(120, 150, 190, .35); }
.hl-sub { margin-top: 0; color: #a3b4cc; font-size: 12px; line-height: 1.6; }
.hl-sub b { color: #d9f4ff; }
.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 #3a5a86; background: rgba(120, 160, 255, .14); color: #c2d5ff; 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(10, 20, 36, .96); border: 1px solid #3a5a86; border-radius: 20px; color: #e6f0ff; 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(4, 8, 16, .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: #c8d6ea; font-size: 13px; padding: 2px 0; }
.guard-row { background: rgba(24, 46, 78, .6); border-radius: 8px; padding: 5px 10px; text-align: left; }
.guard-row b { color: #ffe9ae; }

/* 关注 / 三连 */
.btn-follow { border-color: #59b4dc; color: #8fd6f0; 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: #73879f; }
.fb-total { font-size: 15px; color: #6cc7e6; font-weight: 700; }
.follow-grp { color: #8fd6f0; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 4px 0 0; }

/* 成就 */
.ach-tip { text-align: center; color: #6cc7e6; font-size: 12px; margin-bottom: 12px; }
.ach-total { text-align: center; color: #6cc7e6; font-size: 16px; font-weight: 700; margin: 6px 14px 10px; padding: 9px; width: calc(100% - 28px); background: rgba(90, 200, 230, .1); border: 1px solid rgba(90, 200, 230, .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 #33507a; border-radius: 14px; padding: 16px 18px; background: linear-gradient(180deg, #13243c, #0c1830); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.ach-item.done { border-color: #6cc7e6; background: linear-gradient(180deg, #14344e, #0c2540); box-shadow: 0 2px 14px rgba(90, 200, 230, .18); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #a5e4ff; }
.ach-item.todo .ach-name { color: #8fa0bc; }
.ach-bonus { font-size: 13px; white-space: nowrap; }
.ach-item.done .ach-bonus { color: #8fe0a2; }
.ach-item.todo .ach-bonus { color: #546a86; }
.ach-toast { position: fixed; top: 0; left: 0; right: 0; z-index: 99; text-align: center; padding: 12px 16px; background: linear-gradient(180deg, #bcebff, #59b4dc); color: #06202c; 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: #6cc7e6; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#btn-guard { opacity: .85; }
#btn-guard.on { opacity: 1; border-color: #ffe9ae; color: #ffe9ae; background: linear-gradient(180deg, #4c6a22, #344813); box-shadow: 0 0 12px rgba(233, 255, 140, .3); }

/* 特质特质选择弹层 */
.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); white-space: nowrap; overflow: hidden; max-width: 100%; }
.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: #071018; font-weight: 800; }
.trait-opt-desc { font-size: 12px; color: #a8bcd6; line-height: 1.5; }
.trait-opt.color-g .trait-opt-tag { background: linear-gradient(90deg,#6fbf8a,#9fe0b4); }
.trait-opt.color-b .trait-opt-tag { background: linear-gradient(90deg,#4aa3dd,#8fd0f2); }
.trait-opt.color-p .trait-opt-tag { background: linear-gradient(90deg,#a26bdf,#7a4cd0); }
.trait-opt.color-y .trait-opt-tag { background: linear-gradient(90deg,#f2c05a,#e09a2e); }
.trait-opt.color-g .trait-opt-name { color: #a4e0bc; }
.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; }

/* 文明抉择弹窗 */
#decide-mask .btn { text-align: left; justify-content: flex-start; }
.decide-box { position: relative; }
.decide-close { position: absolute; top: 8px; right: 8px; z-index: 2; }
.decide-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.decide-btn span.decide-sub { font-size: 11px; color: #8fd6f0; font-weight: 400; white-space: normal; }
.decide-btn:disabled span.decide-sub { color: #5a6f8a; }

/* 文明抉择收起后的悬浮提示条 */
.decide-bar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 440px);
  z-index: 40;
  background: rgba(10, 22, 40, .96);
  border: 1px solid #59b4dc;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.decide-bar-tip { color: #cfe7f5; font-size: 12.5px; line-height: 1.5; text-align: center; }
.decide-bar .btn { padding: 10px 12px; font-size: 15px; }

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

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

.trait-line .chip.rainbow { background: linear-gradient(90deg,#ff6b6b,#ffd166,#7adbb2,#6ab4ff,#b488ff); }
