/* ============================================================
 * 诡异世界模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：阴森幽暗 · 墨黑底色 + 幽绿荧光 + 血红警讯
 * 背景使用纯色（长列表滚动不出现上下分层）
 * ============================================================ */
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #0a0e0c;
  color: #cfd8d2;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #0a0e0c;
  position: relative;
}
/* 四角暗角，制造压迫感（fixed，不参与滚动） */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 50%;
  width: 480px; max-width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(0,0,0,.72) 100%);
  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 #2b3b34;
  background: linear-gradient(180deg, #1c2723, #141d19);
  color: #cfd8d2;
  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 #3f8f6f;
  background: linear-gradient(180deg, #56b98d, #2e7457);
  color: #04231a;
  font-weight: 700;
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-danger { border-color: #6b2b2b; color: #ff9a9a; }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #2b3b34;
  background: linear-gradient(180deg, #1c2723, #141d19);
  color: #cfd8d2;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 首页 ---------- */
#view-home { justify-content: center; gap: 12px; }
.home-hero { text-align: center; margin-top: -16px; }
.home-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 4px;
  white-space: nowrap;
  background: linear-gradient(180deg, #d6fff0, #6fc99b 55%, #2f6f56);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(111,201,155,.28);
}
.home-sub { color: #6b7d74; font-size: 13px; margin-top: 4px; letter-spacing: 1px; }
.home-count {
  background: rgba(111,201,155,.07);
  border: 1px solid rgba(111,201,155,.22);
  border-radius: 20px;
  padding: 8px 14px;
  color: #7fc9a4;
  font-size: 12px;
  white-space: nowrap;
}
.home-count b { font-size: 13px; }
.home-lv {
  width: 100%;
  background: #121a17;
  border: 1px solid #2b3b34;
  border-radius: 12px;
  padding: 12px 16px;
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: #6b7d74; font-size: 13px; }
.lv-lv { color: #b9f2d5; font-size: 16px; font-weight: 700; }
.lv-bonus { color: #d98c6b; font-size: 11px; white-space: nowrap; margin-left: 4px; }
.lv-exp-line { margin-top: 7px; color: #7d8f86; font-size: 12px; text-align: center; }
.lv-bar { height: 10px; background: #18211d; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #2e7457, #6fc99b); border-radius: 5px; width: 0%; transition: width .3s; }
.home-btns { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.home-link-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-link-btns3 { grid-template-columns: 1fr 1fr 1fr; }
.home-link-btns3 .btn-big { padding: 12px 4px; font-size: 15px; }
.settings-body { width: 100%; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.set-card { background: #121a17; border: 1px solid #2b3b34; 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: #121a17;
  border: 1px solid #2b3b34;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 2;
  color: #b6c2bc;
}
.about-text b { color: #b9f2d5; }
.home-sound { width: 100%; display: flex; justify-content: center; margin-top: 4px; }
.btn-sound {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid #2b3b34;
  background: linear-gradient(180deg, #1c2723, #141d19);
  color: #cfd8d2;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-sound:active { transform: scale(.92); filter: brightness(1.2); }
.home-speed {
  width: 100%;
  max-width: 260px;
  background: #121a17;
  border: 1px solid #2b3b34;
  border-radius: 12px;
  padding: 8px 14px;
}
.speed-label { display: flex; justify-content: space-between; align-items: center; color: #6b7d74; font-size: 13px; }
.speed-label b { color: #7fc9a4; }
.speed-range { width: 100%; margin-top: 6px; accent-color: #3f8f6f; }
.home-tip {
  width: 100%;
  background: #121a17;
  border: 1px solid #212d28;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}
.tip-title { color: #7fc9a4; font-size: 13px; margin-bottom: 6px; letter-spacing: 2px; text-align: center; }
.tip-text { color: #6b7d74; font-size: 12px; line-height: 1.8; text-align: left; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: #7d8f86; 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: #b6c2bc; }
.set-label2 { font-size: 15px; color: #b6c2bc; margin-bottom: 8px; }
.set-select {
  width: 100%;
  background: #141d19;
  color: #cfd8d2;
  border: 1px solid #2b3b34;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7d8f86 50%), linear-gradient(135deg, #7d8f86 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.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: #1b2622;
  border: 1px solid #2b3b34;
  border-radius: 13px;
  transition: background .2s;
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6b7d74;
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track { background: #3f8f6f; border-color: #3f8f6f; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #eafff5; }

/* ---------- 游戏 ---------- */
#view-game { padding-top: 0; padding-bottom: 20px; }
.game-top {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px 4px;
}
.game-title {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  letter-spacing: 3px;
  color: #7fc9a4;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 46px;
  overflow: hidden;
  text-align: center;
}
.btn-pause {
  position: absolute;
  right: 4px; top: 10px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid #2b3b34;
  background: linear-gradient(180deg, #1c2723, #141d19);
  color: #cfd8d2;
  font-size: 17px;
  cursor: pointer;
}
.btn-pause:active { transform: scale(.94); }

.attr-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.attr-span2 { grid-column: span 2; }
.attr-card {
  background: linear-gradient(180deg, #141d19, #101815);
  border: 1px solid #2b3b34;
  border-radius: 12px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.attr-name { color: #6b7d74; font-size: 11.5px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-rank { color: #7fc9a4; font-weight: 700; font-size: 12px; }
.attr-val { color: #b9f2d5; font-size: 24px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.attr-coef { color: #c9e8b8; font-size: 19px; }
.attr-sub { color: #7d8f86; font-size: 12px; }

/* 诡异栏（游戏页属性区下）：已收服的诡异，同一行 */
.huan-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(18,26,23,.7);
  border: 1px solid #2b3b34;
  border-radius: 10px;
  min-height: 20px;
  max-height: 96px;
  overflow-y: auto;
}
.huan-label { color: #7d8f86; font-size: 12px; margin-right: 2px; }
.huan-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px;
  font-size: 10px; font-weight: 700; padding: 0 6px; line-height: 1;
}
/* 诡异档位配色：F→EX 由灰暗到血紫 */
.hc-t1  { background: #4a5750; color: #dfe8e2; }                              /* F */
.hc-t2  { background: #6f8f6a; color: #f0fff0; }                              /* E */
.hc-t3  { background: #3f8f6f; color: #eafff5; }                              /* D */
.hc-t4  { background: #2f6f9c; color: #eaf6ff; }                              /* C */
.hc-t5  { background: #7a5bbf; color: #f3ecff; }                              /* B */
.hc-t6  { background: #b4553f; color: #fff2ec; }                              /* A */
.hc-t7  { background: #a03a56; color: #ffeaf1; }                              /* S */
.hc-t8  { background: #8c2b4a; color: #ffd9e6; }                              /* SS */
.hc-t9  { background: #6b1f3a; color: #ffc8dd; }                              /* SSS */
.hc-t10 { background: #c0143c; color: #fff; box-shadow: 0 0 6px rgba(192,20,60,.7); } /* EX */
.hc-xinwu  {                                                                     /* 诡界本源 */
  background: linear-gradient(90deg, #1f6b52, #3f8f6f, #6fc99b, #3f8f6f, #1f6b52);
  color: #eafff5;
  text-shadow: 0 0 3px rgba(0,0,0,.45);
}
.settle-huan { justify-content: center; margin-top: 10px; }

.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(10,14,12,.75);
  border: 1px solid #212d28;
  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(28,39,35,.5);
  color: #b6c2bc;
}
.log-item.year{ background: rgba(28,39,35,.22); color: #7d8f86; font-size: 12.5px; }
.log-item.brk { background: rgba(79,175,124,.12); border: 1px solid rgba(79,175,124,.35); color: #9ee0bb; }
.log-item.ev1 { background: rgba(90,130,150,.12); border: 1px solid rgba(90,130,150,.3); color: #bcd3dd; }
.log-item.ev2 { background: rgba(140,110,190,.12); border: 1px solid rgba(140,110,190,.35); color: #d8c8f0; }
.log-item.ev3 { background: rgba(180,160,90,.12); border: 1px solid rgba(180,160,90,.35); color: #e6d9a8; }
.log-item.ev4 { background: rgba(190,60,70,.15); border: 1px solid rgba(190,60,70,.45); color: #f0b0b8; }
.log-item.huan{ background: rgba(150,90,200,.18); border: 1px solid rgba(160,100,210,.55); color: #e0c8ff; }  /* 收服诡异：幽紫 */
.log-item.rare{ background: rgba(200,150,80,.13); border: 1px solid rgba(200,150,80,.35); color: #e0c69a; }
.log-item.red {
  background: rgba(200,40,40,.16);
  border: 1px solid rgba(210,50,50,.5);
  color: #ff8a8a;
  font-weight: 700;
}
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(190,40,70,.28), rgba(180,140,40,.28), rgba(70,170,120,.28), rgba(60,130,190,.28), rgba(140,90,200,.28));
  background-size: 400% 100%;
  border: 1px solid rgba(220,240,230,.35);
  color: #eafff5;
  font-weight: 700;
  animation: rainbowShift 1.2s linear infinite;
}
@keyframes rainbowShift { 0% { background-position: 0% 0; } 100% { background-position: 400% 0; } }
.log-item.god { background: rgba(110,220,170,.16); border: 1px solid rgba(110,220,170,.5); color: #d6fff0; font-weight: 700; }
.log-item.dead{ background: rgba(150,40,50,.15); border: 1px solid rgba(170,50,60,.4); color: #ffb0b8; }

/* ---------- 结算 ---------- */
#view-settle { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.settle-box {
  width: 100%;
  background: #121a17;
  border: 1px solid #2b3b34;
  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: #b9f2d5; }
.settle-title.god { color: #e6fff4; text-shadow: 0 0 24px rgba(110,220,170,.6); }
.settle-wuhun { text-align: center; color: #7d8f86; font-size: 13.5px; }
.settle-wuhun b { color: #9ee0bb; }
.settle-rows { display: flex; flex-direction: column; }
.s-row {
  display: flex; justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed #212d28;
  font-size: 14px;
}
.s-row:last-child { border-bottom: none; }
.s-row span { color: #6b7d74; }
.s-row b { color: #cfd8d2; }
.settle-god {
  text-align: center;
  font-size: 14px;
  color: #e6fff4;
  background: linear-gradient(180deg, rgba(110,220,170,.18), rgba(110,220,170,.06));
  border: 1px solid rgba(110,220,170,.45);
  border-radius: 10px;
  padding: 10px;
  letter-spacing: 1px;
}
.settle-xinwu { font-size: 12.5px; color: #9ee0bb; line-height: 1.6; text-align: center; }
.settle-rank {
  background: rgba(111,201,155,.07);
  border: 1px solid rgba(111,201,155,.22);
  border-radius: 10px;
  padding: 7px;
  color: #7fc9a4;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.settle-note {
  background: rgba(190,60,70,.08);
  border: 1px solid rgba(190,60,70,.35);
  border-radius: 10px;
  padding: 8px 10px;
  color: #f0a0a8;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}
.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; }

/* ---------- 子页通用（标题绝对居中，✕ 固定右上角） ---------- */
.page-view { padding: 0 !important; }
.page-head {
  width: 100%;
  position: relative;
  padding: 14px 14px 10px;
  background: #0f1512;
  border-bottom: 1px solid #212d28;
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 58px;
  display: flex;
  align-items: center;
}
.page-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 19px;
  color: #7fc9a4;
  letter-spacing: 2px;
  white-space: nowrap;
}
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #2b3b34;
  background: #16201c;
  color: #7d8f86;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  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; }
.tabs-wrap { flex-wrap: wrap; gap: 6px; }
.tabs-wrap .tab { flex: 0 0 calc((100% - 24px) / 5); font-size: 12px; padding: 7px 0; }
.tab {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 8px 0;
  background: #16201c;
  color: #6b7d74;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: linear-gradient(180deg, #56b98d, #2e7457); color: #04231a; }
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #7fc9a4; width: 100%; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: #7d8f86; padding: 30px 0; font-size: 14px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #121a17;
  border: 1px solid #212d28;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.lb-row.me { box-shadow: 0 0 0 2px #3f8f6f inset; background: rgba(63,143,111,.12); }
.lb-rank {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1b2622;
  color: #7d8f86;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
}
.lb-rank.top { background: #b4553f; color: #fff; }
.lb-rank.top.r1 { background: #c0143c; }
.lb-rank.top.r2 { background: #b4553f; }
.lb-rank.top.r3 { background: #b09246; }
.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: #b6c2bc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: #b9f2d5; flex: none; white-space: nowrap; }
.lb-time { font-size: 11px; color: #7d8f86; flex: none; }

/* ---------- 图鉴 ---------- */
.dex-body { width: 100%; padding: 8px 14px 30px; }
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dex-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 9px;
  padding: 9px 4px;
  font-size: 12.5px;
  line-height: 1.3;
  min-height: 40px;
  word-break: break-all;
}
.dex-item.have {
  background: linear-gradient(180deg, rgba(63,143,111,.22), rgba(63,143,111,.08));
  border: 1px solid rgba(111,201,155,.5);
  color: #c8f5dd;
}
.dex-item.lack {
  background: #101714;
  border: 1px solid #1e2a25;
  color: #46564e;
}

/* ---------- 暂停遮罩 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(4,7,6,.78);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: #121a17;
  border: 1px solid #2b3b34;
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.7);
}
.mask-title { text-align: center; font-size: 20px; color: #7fc9a4; font-weight: 700; letter-spacing: 2px; }
.mask-info { text-align: center; color: #7d8f86; font-size: 13px; }
.mask-box .set-row { justify-content: center; padding: 4px 0; }
.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(10,14,12,.8);
  border: 1px solid #212d28;
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #b6c2bc;
  -webkit-overflow-scrolling: touch;
}
.review-log .rv-brk { color: #9ee0bb; }
.review-log .rv-ev1 { color: #bcd3dd; }
.review-log .rv-ev2 { color: #d8c8f0; }
.review-log .rv-ev3 { color: #e6d9a8; }
.review-log .rv-ev4 { color: #f0b0b8; }
.review-log .rv-god { color: #e6fff4; font-weight: 700; }
.review-log .rv-dead { color: #ffb0b8; }
.review-log .rv-rare { color: #e0c69a; }
.review-log .rv-red { color: #ff8a8a; font-weight: 700; }
.review-log .rv-huan { color: #e0c8ff; }
.review-log .rv-rainbow {
  background: linear-gradient(90deg, #d4526f, #d4b86a, #6fc99b, #5a9fd4, #a06bd4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.review-log .rv-year { color: #6b7d74; }

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

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

/* ---------- 高阶天赋增益（点赞/投币/关注） ---------- */
.btn-follow {
  border-color: #3f8f6f;
  color: #7fc9a4;
  margin-bottom: 12px;
  font-size: 14px;
  padding: 12px 16px;
}
.follow-box { width: 350px; max-width: 90vw; max-height: 86vh; overflow-y: auto; }
.follow-rows { display: flex; flex-direction: column; gap: 10px; }
.follow-video { color: #9ee0bb; font-size: 12px; margin: 4px 0 0; text-align: left; line-height: 1.5; }
.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: #6cdb8a; }
.fb-state.todo { color: #5f716a; }
.fb-total { font-size: 15px; color: #7fc9a4; font-weight: 700; }

/* ---------- 成就系统 ---------- */
.home-ach-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.ach-tip { text-align: center; color: #7fc9a4; font-size: 12px; margin-bottom: 12px; }
.ach-total {
  text-align: center; color: #7fc9a4; font-size: 16px; font-weight: 700;
  margin: 6px 14px 10px; padding: 9px;
  width: calc(100% - 28px);
  background: rgba(111,201,155,.07);
  border: 1px solid rgba(111,201,155,.22);
  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-list::-webkit-scrollbar { width: 6px; }
.ach-list::-webkit-scrollbar-thumb { background: #3f8f6f; border-radius: 3px; }
.ach-list::-webkit-scrollbar-track { background: #16201c; border-radius: 3px; }
.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2b3b34;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #16201c, #111916);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.ach-item.done { border-color: #3f8f6f; background: linear-gradient(180deg, #17332a, #102420); box-shadow: 0 2px 14px rgba(63,143,111,.2); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #b9f2d5; }
.ach-item.todo .ach-name { color: #6b7d74; }
.ach-bonus { font-size: 13px; white-space: nowrap; }
.ach-item.done .ach-bonus { color: #6cdb8a; }
.ach-item.todo .ach-bonus { color: #4a5a53; }

/* ---------- 成就达成面包屑提示 ---------- */
.ach-toast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #56b98d, #2e7457);
  color: #04231a;
  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,.55);
}
.ach-toast.show { transform: translateY(0); }

/* 成就按钮：标题+小字两行居中 */
#btn-ach { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 14px; }
#btn-ach > span:first-child { font-size: 17px; line-height: 1.3; }
.ach-btn-tip { font-size: 10px; color: #7fc9a4; white-space: nowrap; }

/* ---------- 手动模式 ---------- */
.manual-tip {
  width: 100%;
  text-align: center;
  color: #d98c6b;
  font-size: 13px;
  padding: 6px 0 2px;
}
.set-tip { margin-top: 6px; color: #5f716a; font-size: 12px; line-height: 1.6; }

/* ---------- 开局五选一（不可关闭） ---------- */
#view-wake { justify-content: center; }
.wake-box {
  width: 100%;
  max-width: 440px;
  background: #121a17;
  border: 1px solid #2b3b34;
  border-radius: 16px;
  padding: 22px 16px 18px;
  text-align: center;
}
.wake-title { font-size: 24px; color: #b9f2d5; letter-spacing: 3px; font-weight: 700; text-shadow: 0 0 18px rgba(111,201,155,.35); }
.wake-sub { color: #7fc9a4; font-size: 14px; margin: 6px 0 4px; font-weight: 700; }
.wake-hint { color: #5f716a; font-size: 12px; margin-bottom: 14px; }
.wake-list { display: flex; flex-direction: column; gap: 8px; }
/* 整卡单行、各段同格式：人物卡1  天赋：A/57  寿命：106岁  【保底】
 * 沿用原有深色卡片与主题文字色；超宽由脚本缩字号，绝不折行 */
.wake-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid #2b3b34;
  background: linear-gradient(180deg, #16201c, #111916);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.wake-card:active { transform: scale(.98); border-color: #3f8f6f; filter: brightness(1.12); }
.wake-card.guard { border-color: #3f8f6f; box-shadow: 0 0 12px rgba(63,143,111,.28); }
.wake-card-txt { font-size: 1em; font-weight: 700; color: #cfd8d2; letter-spacing: 0; flex: none; }
/* 人物卡N 贴最左（脱离居中流），属性一组居中 */
.wake-card-no { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.wake-card-attrs { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* ---------- 遭遇诡异弹窗（可拖动、可收起） ---------- */
#decision-mask { align-items: flex-start; padding-top: 7vh; }
.decision-box { width: 330px; max-width: 90vw; position: relative; cursor: grab; touch-action: none; user-select: none; }
.decision-x {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid #2b3b34;
  background: #16201c;
  color: #7d8f86;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.decision-x:active { transform: scale(.9); }
.decision-tip { text-align: center; color: #4e5f58; font-size: 11px; line-height: 1.5; }
/* 信息单行不折行（超宽由脚本缩字号适配） */
.decision-info { text-align: center; color: #cfd8d2; font-size: 15px; line-height: 1.6; white-space: nowrap; }
.decision-opts { display: flex; flex-direction: column; gap: 10px; }
/* 选择按钮：文案单行不换行，超宽时缩字号 */
.decision-opt {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  color: #101010;
  font-weight: 700;
}
/* 迎战：红；脱身：绿（文字统一黑色） */
.opt-fight { border: 1px solid #8f241e; background: linear-gradient(180deg, #e2604f, #bd3a2c); color: #140604; }
.opt-flee  { border: 1px solid #245c45; background: linear-gradient(180deg, #61c295, #33795c); color: #04231a; }
/* 首页 高光+保底 双按钮同排各占 50% */
.home-duo { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-duo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 6px; }
.btn-duo > span:first-child { font-size: 17px; line-height: 1.3; }
.btn-duo .ach-btn-tip { font-size: 10px; color: #7fc9a4; white-space: nowrap; }
#btn-guard.on { border-color: #3f8f6f; background: linear-gradient(180deg, #17332a, #102420); box-shadow: 0 2px 14px rgba(63,143,111,.28); }
#btn-guard.on .ach-btn-tip { color: #b9f2d5; }

/* 高光列表 / 图片预览 / toast */
.hl-box { width: 340px; max-width: 90vw; max-height: 84vh; }
.hl-list { flex: 1; min-height: 120px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.hl-item {
  background: linear-gradient(180deg, #16201c, #111916);
  border: 1px solid #2b3b34;
  border-radius: 11px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;                 /* 点条目即导出结算卡 */
  flex: none;
}
.hl-item:active { transform: scale(.99); filter: brightness(1.15); border-color: #3f8f6f; }
.hl-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hl-top b { color: #b9f2d5; font-size: 14.5px; }
.hl-innate { color: #9ee0bb; font-size: 11.5px; }
.hl-sect { color: #7fc9a4; font-size: 11.5px; }
.hl-end { margin-left: auto; color: #f0a0a8; font-size: 11.5px; }
.hl-mid { margin-top: 3px; color: #6b7d74; font-size: 11.5px; line-height: 1.45; }
.hl-mid b { color: #cfd8d2; }
.hl-ring { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.hl-ring .huan-chip { min-width: 16px; height: 15px; border-radius: 8px; font-size: 9px; padding: 0 5px; }
/* 结算卡预览：图片限制在视口内（生成图很高，按宽度等比缩放会撑出屏幕把按钮顶飞） */
#hl-img-mask { align-items: flex-start; overflow-y: auto; padding: 14px 0 calc(20px + env(safe-area-inset-bottom)); }
.hl-img-box { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 92vw; }
.hl-img { width: auto; height: auto; max-width: min(92vw, 400px); max-height: 60vh; background: #060807; border-radius: 12px; }
.hl-btns { display: flex; gap: 8px; width: 100%; }
.hl-btns .btn { flex: 1; padding: 9px 4px; font-size: 13.5px; }
.hl-toast {
  position: fixed; left: 50%; top: 16%; transform: translateX(-50%);
  z-index: 98; background: #3f8f6f; color: #04231a; font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 10px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.6);
  white-space: nowrap;
}
.guard-box { width: 320px; max-width: 88vw; }
.guard-rows { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.guard-row { background: rgba(24,33,29,.8); border-radius: 8px; padding: 6px 10px; text-align: left; color: #b6c2bc; font-size: 13px; line-height: 1.6; }
.guard-row b { color: #b9f2d5; }
.guard-pts { text-align: center; color: #7fc9a4; font-size: 15px; font-weight: 700; }
.guard-pts b { color: #9ee0bb; font-size: 18px; }

/* 遭遇收起后底部召唤按钮 */
.decision-recall {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 70;
  border: 1px solid #3f8f6f;
  background: linear-gradient(180deg, #56b98d, #2e7457);
  color: #04231a;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
}
.decision-recall:active { transform: translateX(-50%) scale(.96); }

/* 高光独立页 */
/* 高光页：页头固定，只有列表滚动（整页撑高会滚不动/把内容顶出视口） */
#view-hl { height: 100vh; overflow: hidden; }
#view-hl .page-head { flex: none; }
.hl-note { width: 100%; padding: 8px 16px 2px; color: #6b7d74; font-size: 11.5px; }
.hl-list-page {
  width: 100%;
  flex: 1;
  min-height: 0;             /* flex 子容器可滚动的必要条件 */
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
  margin: 0;
}
