/* ============================================================
 * 神奇宝贝模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：深色底 + 宝可梦红 / 皮卡丘黄
 * 背景使用纯色（长列表滚动不出现上下分层）
 * ============================================================ */
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #101520;
  color: #dde3ea;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #101520;
  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 #2e3646;
  background: linear-gradient(180deg, #1b2029, #171b24);
  color: #dde3ea;
  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 #d8a800;
  background: linear-gradient(180deg, #f7c600, #b58a00);
  color: #2a2200;
  font-weight: 700;
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn-danger { border-color: #6b3a26; color: #ffb6a0; }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #2e3646;
  background: linear-gradient(180deg, #1b2029, #171b24);
  color: #dde3ea;
  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, #fff8d8, #f7c600 55%, #7a5c00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(247,198,0,.28);
}
.home-sub { color: #74839a; font-size: 13px; margin-top: 4px; letter-spacing: 1px; }
.home-count {
  background: rgba(247,198,0,.07);
  border: 1px solid rgba(247,198,0,.22);
  border-radius: 20px;
  padding: 8px 14px;
  color: #f7c600;
  font-size: 12px;
  white-space: nowrap;
}
.home-count b { font-size: 13px; }
.home-lv {
  width: 100%;
  background: #1a1f29;
  border: 1px solid #2e3646;
  border-radius: 12px;
  padding: 12px 16px;
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: #74839a; font-size: 13px; }
.lv-lv { color: #fff0b8; font-size: 16px; font-weight: 700; }
.lv-bonus { color: #e8b23f; font-size: 11px; white-space: nowrap; margin-left: 4px; }
.lv-exp-line { margin-top: 7px; color: #8592a3; font-size: 12px; text-align: center; }
/* 经验条：轨道必须比卡片底色更暗（此前轨道与 .home-lv 同色 #1a1f29，导致只看得见进度、看不出「满」在哪） */
.lv-bar {
  height: 10px;
  background: #0b0d12;
  border: 1px solid #2e3646;
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
  overflow: hidden;
  margin-top: 8px;
}
.lv-bar-fill { height: 100%; background: linear-gradient(90deg, #b58a00, #f7c600); 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: #1a1f29; border: 1px solid #2e3646; 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: #1a1f29;
  border: 1px solid #2e3646;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 2;
  color: #c2ccd8;
}
.about-text b { color: #fff0b8; }
.home-sound { width: 100%; display: flex; justify-content: center; margin-top: 4px; }
.btn-sound {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid #2e3646;
  background: linear-gradient(180deg, #1b2029, #171b24);
  color: #dde3ea;
  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: #1a1f29;
  border: 1px solid #2e3646;
  border-radius: 12px;
  padding: 8px 14px;
}
.speed-label { display: flex; justify-content: space-between; align-items: center; color: #74839a; font-size: 13px; }
.speed-label b { color: #f7c600; }
.speed-range { width: 100%; margin-top: 6px; accent-color: #d8a800; }
.home-tip {
  width: 100%;
  background: #1a1f29;
  border: 1px solid #1f2632;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}
.tip-title { color: #f7c600; font-size: 13px; margin-bottom: 6px; letter-spacing: 2px; text-align: center; }
.tip-text { color: #74839a; font-size: 12px; line-height: 1.8; text-align: left; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: #8592a3; 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: #c2ccd8; }
.set-label2 { font-size: 15px; color: #c2ccd8; margin-bottom: 8px; }
.set-select {
  width: 100%;
  background: #171b24;
  color: #dde3ea;
  border: 1px solid #2e3646;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8592a3 50%), linear-gradient(135deg, #8592a3 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: #1c212b;
  border: 1px solid #2e3646;
  border-radius: 13px;
  transition: background .2s;
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #74839a;
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track { background: #d8a800; border-color: #d8a800; }
.set-switch input:checked + .track::after { transform: translateX(22px); background: #eef4ff; }

/* ---------- 游戏 ---------- */
#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: #f7c600;
  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 #2e3646;
  background: linear-gradient(180deg, #1b2029, #171b24);
  color: #dde3ea;
  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;
}
/* 宝可梦战力 / 总战力 / 评级：三张各占 1/3 */
.attr-grid3 { grid-template-columns: repeat(3, 1fr); }
.attr-card {
  background: linear-gradient(180deg, #171b24, #171b24);
  border: 1px solid #2e3646;
  border-radius: 12px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.attr-name { color: #74839a; font-size: 11.5px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-rank { color: #f7c600; font-weight: 700; font-size: 12px; }
.attr-val { color: #fff0b8; font-size: 24px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.attr-coef { color: #fff0b8; font-size: 19px; }
.attr-sub { color: #8592a3; 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(26,31,41,.72);
  border: 1px solid #2e3646;
  border-radius: 10px;
  min-height: 20px;
  max-height: 96px;
  overflow-y: auto;
}
.huan-label { color: #8592a3; 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: #3b4250; color: #dfe6ef; }                              /* F */
.hc-t2  { background: #3f6f9e; color: #e8f3ff; }                              /* E */
.hc-t3  { background: #2f8f8a; color: #e6fffd; }                              /* D */
.hc-t4  { background: #2f9e5e; color: #eafff2; }                              /* C */
.hc-t5  { background: #7aa03c; color: #f6ffe8; }                              /* B */
.hc-t6  { background: #c9a227; color: #fff8dd; }                              /* A */
.hc-t7  { background: #dba800; color: #fff4d6; }                              /* S */
.hc-t8  { background: #f7c600; color: #2a2200; }                              /* SS */
.hc-t9  { background: #f0621f; color: #fff2e0; }                              /* SSS */
.hc-t10 { background: #ee1515; color: #ffe6e6; box-shadow: 0 0 6px rgba(238,21,21,.65); } /* EX */
/* 初始宝可梦胶囊：档位底色 + 皮卡丘黄描边，与后续收服的伙伴区分开 */
.init-chip { box-shadow: inset 0 0 0 1px rgba(247,198,0,.85); }
.settle-huan { justify-content: center; margin-top: 10px; }

.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(16,21,32,.78);
  border: 1px solid #1f2632;
  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(31,38,50,.55);
  color: #c2ccd8;
}
.log-item.year{ background: rgba(31,38,50,.25); color: #8592a3; font-size: 12.5px; }
.log-item.brk { background: rgba(247,198,0,.12); border: 1px solid rgba(247,198,0,.35); color: #ffefbb; }
.log-item.ev1 { background: rgba(90,130,150,.12); border: 1px solid rgba(90,130,150,.3); color: #c3cdd8; }
.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(232,40,60,.15); border: 1px solid rgba(232,40,60,.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(216,168,0,.13); border: 1px solid rgba(216,168,0,.35); color: #e0c69a; }
.log-item.red {
  background: rgba(238,21,21,.16);
  border: 1px solid rgba(242,40,40,.5);
  color: #ff8a8a;
  font-weight: 700;
}
.log-item.rainbow {
  background: linear-gradient(90deg, rgba(190,40,70,.28), rgba(180,140,40,.28), rgba(247,198,0,.28), rgba(60,130,190,.28), rgba(140,90,200,.28));
  background-size: 400% 100%;
  border: 1px solid rgba(230,240,255,.35);
  color: #eef4ff;
  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(247,198,0,.16); border: 1px solid rgba(247,198,0,.5); color: #fff8d8; 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: #1a1f29;
  border: 1px solid #2e3646;
  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: #fff0b8; }
.settle-title.god { color: #eef4ff; text-shadow: 0 0 24px rgba(247,198,0,.6); }
.settle-wuhun { text-align: center; color: #8592a3; font-size: 13.5px; }
.settle-wuhun b { color: #ffefbb; }
.settle-rows { display: flex; flex-direction: column; }
.s-row {
  display: flex; justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed #1f2632;
  font-size: 14px;
}
.s-row:last-child { border-bottom: none; }
.s-row span { color: #74839a; }
.s-row b { color: #dde3ea; }
.settle-god {
  text-align: center;
  font-size: 14px;
  color: #eef4ff;
  background: linear-gradient(180deg, rgba(247,198,0,.18), rgba(247,198,0,.06));
  border: 1px solid rgba(247,198,0,.45);
  border-radius: 10px;
  padding: 10px;
  letter-spacing: 1px;
}
.settle-xinwu { font-size: 12.5px; color: #ffefbb; line-height: 1.6; text-align: center; }
.settle-rank {
  background: rgba(247,198,0,.07);
  border: 1px solid rgba(247,198,0,.22);
  border-radius: 10px;
  padding: 7px;
  color: #f7c600;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.settle-note {
  background: rgba(232,40,60,.08);
  border: 1px solid rgba(232,40,60,.35);
  border-radius: 10px;
  padding: 8px 10px;
  color: #ffb0b8;
  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: #141821;
  border-bottom: 1px solid #1f2632;
  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: #f7c600;
  letter-spacing: 2px;
  white-space: nowrap;
}
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #2e3646;
  background: #1c212b;
  color: #8592a3;
  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: #1c212b;
  color: #74839a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: linear-gradient(180deg, #f7c600, #b58a00); color: #2a2200; }
.lb-note { padding: 6px 14px 0; font-size: 12px; color: #f7c600; width: 100%; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: #8592a3; padding: 30px 0; font-size: 14px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1f29;
  border: 1px solid #1f2632;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.lb-row.me { box-shadow: 0 0 0 2px #d8a800 inset; background: rgba(216,168,0,.12); }
.lb-rank {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1c212b;
  color: #8592a3;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
}
.lb-rank.top { background: #c0563f; color: #fff; }
.lb-rank.top.r1 { background: #d81f3c; }
.lb-rank.top.r2 { background: #c0563f; }
.lb-rank.top.r3 { background: #d8a800; }
.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: #c2ccd8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: #fff0b8; flex: none; white-space: nowrap; }
.lb-time { font-size: 11px; color: #8592a3; 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(216,168,0,.22), rgba(216,168,0,.08));
  border: 1px solid rgba(247,198,0,.5);
  color: #fff0b8;
}
.dex-item.lack {
  background: #141821;
  border: 1px solid #1f2632;
  color: #394152;
}

/* ---------- 暂停遮罩 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(13,16,22,.8);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: #1a1f29;
  border: 1px solid #2e3646;
  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: #f7c600; font-weight: 700; letter-spacing: 2px; }
.mask-info { text-align: center; color: #8592a3; 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(16,21,32,.82);
  border: 1px solid #1f2632;
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #c2ccd8;
  -webkit-overflow-scrolling: touch;
}
.review-log .rv-brk { color: #ffefbb; }
.review-log .rv-ev1 { color: #c3cdd8; }
.review-log .rv-ev2 { color: #d8c8f0; }
.review-log .rv-ev3 { color: #e6d9a8; }
.review-log .rv-ev4 { color: #f0b0b8; }
.review-log .rv-god { color: #eef4ff; 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, #f04b2c, #f2b900, #f7c600, #4a7fe0, #a06bd4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.review-log .rv-year { color: #74839a; }

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

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

/* ---------- 高阶初始宝可梦增益（点赞/投币/关注） ---------- */
.btn-follow {
  border-color: #d8a800;
  color: #f7c600;
  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: #ffefbb; 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: #ffdc5e; }
.fb-state.todo { color: #55647a; }
.fb-total { font-size: 15px; color: #f7c600; 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: #f7c600; font-size: 12px; margin-bottom: 12px; }
.ach-total {
  text-align: center; color: #f7c600; font-size: 16px; font-weight: 700;
  margin: 6px 14px 10px; padding: 9px;
  width: calc(100% - 28px);
  background: rgba(247,198,0,.07);
  border: 1px solid rgba(247,198,0,.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: #d8a800; border-radius: 3px; }
.ach-list::-webkit-scrollbar-track { background: #1c212b; border-radius: 3px; }
.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2e3646;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #1c212b, #141821);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.ach-item.done { border-color: #d8a800; background: linear-gradient(180deg, #232833, #1a1f29); box-shadow: 0 2px 14px rgba(216,168,0,.2); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: #fff0b8; }
.ach-item.todo .ach-name { color: #74839a; }
.ach-bonus { font-size: 13px; white-space: nowrap; }
.ach-item.done .ach-bonus { color: #ffdc5e; }
.ach-item.todo .ach-bonus { color: #394152; }

/* ---------- 成就达成面包屑提示 ---------- */
.ach-toast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f7c600, #b58a00);
  color: #2a2200;
  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: #f7c600; white-space: nowrap; }

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

/* ---------- 遭遇野生宝可梦弹窗（可拖动、可收起） ---------- */
#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 #2e3646;
  background: #1c212b;
  color: #8592a3;
  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: #556677; font-size: 11px; line-height: 1.5; }
/* 信息单行不折行（超宽由脚本缩字号适配） */
.decision-info { text-align: center; color: #dde3ea; 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: #141821;
  font-weight: 700;
}
/* 迎战：红；脱身：绿（文字统一黑色） */
.opt-fight { border: 1px solid #ee1515; background: linear-gradient(180deg, #ff8a52, #ee1515); color: #14080a; }
.opt-flee  { border: 1px solid #7a5c00; background: linear-gradient(180deg, #f2b900, #7a5c00); color: #2a2200; }
/* 首页 高光+保底 双按钮同排各占 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: #f7c600; white-space: nowrap; }
#btn-guard.on { border-color: #d8a800; background: linear-gradient(180deg, #232833, #1a1f29); box-shadow: 0 2px 14px rgba(216,168,0,.28); }
#btn-guard.on .ach-btn-tip { color: #fff0b8; }

/* 高光列表 / 图片预览 / 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, #1c212b, #141821);
  border: 1px solid #2e3646;
  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: #d8a800; }
.hl-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hl-top b { color: #fff0b8; font-size: 14.5px; }
.hl-innate { color: #ffefbb; font-size: 11.5px; }
.hl-sect { color: #f7c600; font-size: 11.5px; }
.hl-end { margin-left: auto; color: #ffb0b8; font-size: 11.5px; }
.hl-mid { margin-top: 3px; color: #74839a; font-size: 11.5px; line-height: 1.45; }
.hl-mid b { color: #dde3ea; }
.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-ring-cap { color: #74839a; font-size: 9.5px; margin-right: 2px; }
/* 结算卡预览：图片限制在视口内（生成图很高，按宽度等比缩放会撑出屏幕把按钮顶飞） */
#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: #0d1016; 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: #d8a800; color: #2a2200; 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(27,32,41,.82); border-radius: 8px; padding: 6px 10px; text-align: left; color: #c2ccd8; font-size: 13px; line-height: 1.6; }
.guard-row b { color: #fff0b8; }
.guard-pts { text-align: center; color: #f7c600; font-size: 15px; font-weight: 700; }
.guard-pts b { color: #ffefbb; 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 #d8a800;
  background: linear-gradient(180deg, #f7c600, #b58a00);
  color: #2a2200;
  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: #74839a; 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;
}
