/* ============================================================
 * CSGO 模拟器 · 样式（移动优先，兼容电脑 480px 容器）
 * 主题：CS2 竞技终端 —— 近黑灰底 + CS 亮橙 + CT 蓝 + 切角面板（事件日志保持原有分档色）
 * 背景为纯色底（长列表滚动不出现上下分层）；网格与辉光是 fixed，不参与滚动
 * ============================================================ */
[hidden] { display: none !important; }

:root {
  --bg:          #30080c;
  --bg-deep:     #26060a;
  --panel:       #3a0c10;
  --panel-2:     #4a1014;
  --panel-3:     #5c161b;
  --line:        #8c2a2f;
  --line-soft:   #6b1f24;
  --gold:        #f5c542;
  --gold-dim:    #c99427;
  --gold-bright: #ffe89a;
  --teal:        #ffce6a;
  --teal-dim:    #b8862a;
  --danger:      #c8281f;
  --danger-text: #ff9aa2;
  --text:        #ffece0;
  --text-dim:    #d9a9a2;
  --text-mute:   #9a6a68;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  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(90% 55% at 50% 0%, rgba(245,197,66,.10), transparent 62%),
    radial-gradient(120% 70% at 50% 110%, rgba(255,208,106,.09), transparent 66%),
    repeating-linear-gradient(0deg, rgba(245,197,66,.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(245,197,66,.05) 0 1px, transparent 1px 34px);
  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 var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  border-radius: 4px;
  padding: 11px 20px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.btn:active { transform: scale(.97); filter: brightness(1.25); }
.btn-primary {
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #8a5a16, #d09a2a);
  color: #fff1c9;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(245,197,66,.30), inset 0 0 14px rgba(245,197,66,.14);
  text-shadow: 0 0 8px rgba(255,224,170,.55);
}
.btn-big { width: 100%; padding: 14px 20px; font-size: 17px; border-radius: 6px; }
.btn-danger { border-color: #5a1f1a; color: var(--danger-text); }
.btn-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  clip-path: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  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 的伪元素 + flex 行内排列 → 与标题**同一行**，
 * 尺寸 1em 跟着字号走（和「世界杯模拟器」一样大）。SVG 数据见文件末尾的说明 */
.home-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(90deg, #e0a02a, #ffcf5c, #ffe89a, #ffcf5c, #e0a02a);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: rainbowShift 3s linear infinite;
  filter: drop-shadow(0 0 14px rgba(255,195,87,.45));
}
.home-title::before, .home-title::after {
  content: '';
  flex: none;
  width: 1em; height: 1em;        /* 1em = 标题字号，球和字一样大 */
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%3E%3Cdefs%3E%3CclipPath%20id='b'%3E%3Ccircle%20cx='32'%20cy='32'%20r='29'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle%20cx='32'%20cy='32'%20r='29'%20fill='%23ffffff'%20stroke='%231b1b1b'%20stroke-width='3'/%3E%3Cg%20clip-path='url(%23b)'%3E%3Cpolygon%20fill='%231b1b1b'%20points='32,21%2042.5,28.6%2038.5,40.9%2025.5,40.9%2021.5,28.6'/%3E%3Cg%20fill='%231b1b1b'%3E%3Cpolygon%20points='32,16.2%2024.2,10.5%2027.2,1.4%2036.8,1.4%2039.8,10.5'/%3E%3Cpolygon%20points='32,16.2%2024.2,10.5%2027.2,1.4%2036.8,1.4%2039.8,10.5'%20transform='rotate(72%2032%2032)'/%3E%3Cpolygon%20points='32,16.2%2024.2,10.5%2027.2,1.4%2036.8,1.4%2039.8,10.5'%20transform='rotate(144%2032%2032)'/%3E%3Cpolygon%20points='32,16.2%2024.2,10.5%2027.2,1.4%2036.8,1.4%2039.8,10.5'%20transform='rotate(216%2032%2032)'/%3E%3Cpolygon%20points='32,16.2%2024.2,10.5%2027.2,1.4%2036.8,1.4%2039.8,10.5'%20transform='rotate(288%2032%2032)'/%3E%3C/g%3E%3Cg%20stroke='%231b1b1b'%20stroke-width='2'%3E%3Cline%20x1='32'%20y1='21'%20x2='32'%20y2='-2'%20stroke='%231b1b1b'%20stroke-width='2'/%3E%3Cline%20x1='32'%20y1='21'%20x2='32'%20y2='-2'%20stroke='%231b1b1b'%20stroke-width='2'%20transform='rotate(72%2032%2032)'/%3E%3Cline%20x1='32'%20y1='21'%20x2='32'%20y2='-2'%20stroke='%231b1b1b'%20stroke-width='2'%20transform='rotate(144%2032%2032)'/%3E%3Cline%20x1='32'%20y1='21'%20x2='32'%20y2='-2'%20stroke='%231b1b1b'%20stroke-width='2'%20transform='rotate(216%2032%2032)'/%3E%3Cline%20x1='32'%20y1='21'%20x2='32'%20y2='-2'%20stroke='%231b1b1b'%20stroke-width='2'%20transform='rotate(288%2032%2032)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.home-sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; letter-spacing: 1px; }
.home-count {
  background: rgba(245,197,66,.07);
  border: 1px solid rgba(245,197,66,.22);
  border-radius: 3px;
  padding: 8px 14px;
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.home-count b { font-size: 13px; }
.home-lv {
  width: 100%;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  padding: 12px 16px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-name { color: var(--text-dim); font-size: 13px; }
.lv-lv { color: var(--gold-bright); font-size: 16px; font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lv-bonus { color: var(--gold); font-size: 11px; white-space: nowrap; margin-left: 4px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lv-exp-line { margin-top: 7px; color: var(--text-dim); font-size: 12px; text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* 经验条：轨道必须比卡片底色更暗（此前轨道与 .home-lv 同色 #3a0c10，导致只看得见进度、看不出「满」在哪） */
.lv-bar {
  height: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.lv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold) 55%, var(--teal));
  box-shadow: 0 0 10px rgba(245,197,66,.55);
  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: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  padding: 12px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.set-card .set-row { justify-content: space-between; }
.set-card .speed-label { margin-bottom: 4px; }
.about-body { width: 100%; padding: 14px; }
.about-text {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--teal-dim);
  border-radius: 4px;
  padding: 16px;
  font-size: 14px;
  line-height: 2;
  color: #f0d8cf;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.about-text b { color: var(--gold-bright); }
.home-sound { width: 100%; display: flex; justify-content: center; margin-top: 4px; }
.btn-sound {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text);
  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.25); }
.home-speed {
  width: 100%;
  max-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  padding: 8px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.speed-label { display: flex; justify-content: space-between; align-items: center; color: var(--text-dim); font-size: 13px; }
.speed-label b { color: var(--gold); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.speed-range { width: 100%; margin-top: 6px; accent-color: var(--gold-dim); }
.home-tip {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 10px 12px;
  margin-top: 4px;
}
/* 分区小标题：小号、加字距、下细分割线 */
.tip-title {
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 3px;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.tip-text { color: var(--text-dim); font-size: 12px; line-height: 1.8; text-align: left; }
.qr-area { width: 100%; text-align: center; margin-top: 10px; }
.qr-text { color: var(--text-dim); font-size: 12.5px; margin-bottom: 6px; }
.qr-img { width: 132px; height: 132px; border-radius: 4px; background: #fff; padding: 5px; }

/* ---------- 开关 ---------- */
.set-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.set-label { font-size: 15px; color: #f0d8cf; }
.set-label2 { font-size: 15px; color: #f0d8cf; margin-bottom: 8px; }
.set-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 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: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: background .2s;
}
.track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text-mute);
  transition: transform .2s, background .2s;
}
.set-switch input:checked + .track { background: #8a5a16; border-color: var(--gold); }
.set-switch input:checked + .track::after { transform: translateX(22px); background: var(--gold); box-shadow: 0 0 10px rgba(245,197,66,.85); }

/* ---------- 游戏 ---------- */
#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: 18px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
  padding: 0 50px 0 4px;   /* 右侧留出绝对定位的暂停按钮，正文靠左 */
  overflow: hidden;
  text-align: left;
  text-shadow: 0 0 10px rgba(255,208,106,.30), 0 0 22px rgba(245,197,66,.30);
}
.btn-pause {
  position: absolute;
  right: 4px; top: 10px;
  width: 42px; height: 42px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--gold);
  font-size: 17px;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-pause:active { transform: scale(.94); }

.attr-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.attr-card {
  background: linear-gradient(180deg, rgba(74,16,20,.92), rgba(58,12,16,.92));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.attr-name { color: var(--text-mute); font-size: 11.5px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-rank { color: var(--gold); font-weight: 700; font-size: 12px; }
.attr-val {
  color: var(--gold-bright);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(245,197,66,.30);
}
.attr-coef { color: var(--gold-bright); font-size: 19px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.attr-sub { color: var(--text-dim); font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 队友栏 / 荣誉栏（游戏页属性区下）：已收服的队友与 S 赛荣誉，各占一行 */
.huan-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(58,12,16,.82);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 20px;
  max-height: 96px;
  overflow-y: auto;
}
.huan-label { color: var(--text-dim); 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;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
/* 档位配色：F→EX 由钢灰渐入黄金，最后落在赤金 */
.hc-t1  { background: #7a2a2f; color: #ffece0; }                              /* F */
.hc-t2  { background: #b8862a; color: #e6f4ff; }                              /* E */
.hc-t3  { background: #4a7fb5; color: #e6f2ff; }                              /* D */
.hc-t4  { background: #2f9e6e; color: #eafff5; }                              /* C */
.hc-t5  { background: #6a9a3f; color: #f4ffe8; }                              /* B */
.hc-t6  { background: #c98a2e; color: #fff8dd; }                              /* A */
.hc-t7  { background: #c99427; color: #fff4d6; }                              /* S */
.hc-t8  { background: #f5b04a; color: #40280a; }                              /* SS */
.hc-t9  { background: #e8a52a; color: #fff4e2; }                              /* SSS */
.hc-t10 { background: #c8281f; color: #ffe4e0; box-shadow: 0 0 6px rgba(200,40,31,.65); } /* EX */
/* 恶魔果实胶囊：档位底色 + 金色描边区分于势力 */
.frt-chip { box-shadow: inset 0 0 0 1px rgba(245,197,66,.75); }
.settle-huan { justify-content: center; margin-top: 10px; }

.log-box {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(38,6,10,.86);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  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: 3px;
  border-left: 2px solid transparent;
  background: rgba(120,30,36,.45);
  color: #f0d8cf;
}
/* 日志配色（按类型）：
 *   修炼 = 默认 · 突破 = 绿 · 事件 = 蓝/紫/金/红 · 排位 = 按对手品级（FDE 蓝 / BCA 紫 / S·SS 金 / SSS·EX 红）
 *   诞生 = 七彩 · 全球总决赛 = 七彩 · 生涯落幕 = 红 */
.log-item.year { background: rgba(120,30,36,.32); color: #e8cdc6; }
.log-item.brk { background: rgba(47,158,110,.16); border-left-color: rgba(47,158,110,.85); border-top: 1px solid rgba(47,158,110,.5); border-right: 1px solid rgba(47,158,110,.5); border-bottom: 1px solid rgba(47,158,110,.5); color: #a8e6c8; }
.log-item.ev1, .log-item.pk1 { background: rgba(255,208,106,.14); border-left-color: rgba(255,208,106,.85); border-top: 1px solid rgba(255,208,106,.45); border-right: 1px solid rgba(255,208,106,.45); border-bottom: 1px solid rgba(255,208,106,.45); color: #a8d4f5; }
.log-item.ev2, .log-item.pk2 { background: rgba(160,107,212,.14); border-left-color: rgba(160,107,212,.85); border-top: 1px solid rgba(160,107,212,.48); border-right: 1px solid rgba(160,107,212,.48); border-bottom: 1px solid rgba(160,107,212,.48); color: #d8c8f0; }
.log-item.ev3, .log-item.pk3 { background: rgba(200,170,110,.15); border-left-color: rgba(200,170,110,.9); border-top: 1px solid rgba(200,170,110,.5); border-right: 1px solid rgba(200,170,110,.5); border-bottom: 1px solid rgba(200,170,110,.5); color: #f0dcae; }
.log-item.ev4, .log-item.pk4 { background: rgba(200,40,31,.16); border-left-color: rgba(200,40,31,.9); border-top: 1px solid rgba(200,40,31,.52); border-right: 1px solid rgba(200,40,31,.52); border-bottom: 1px solid rgba(200,40,31,.52); color: #f0a8a8; }
/* 转会期：红色（独立一档） */
.log-item.trans { background: rgba(200,40,31,.14); border-left-color: rgba(200,40,31,.9); border-top: 1px solid rgba(200,40,31,.5); border-right: 1px solid rgba(200,40,31,.5); border-bottom: 1px solid rgba(200,40,31,.5); color: #ff9c9c; font-weight: 700; }
/* 俱乐部等级 / 段位突破：紫色 */
.log-item.club { background: rgba(160,107,212,.16); border-left-color: rgba(160,107,212,.9); border-top: 1px solid rgba(160,107,212,.5); border-right: 1px solid rgba(160,107,212,.5); border-bottom: 1px solid rgba(160,107,212,.5); color: #dcc6f5; font-weight: 700; }
/* 诞生与全球总决赛：七彩渐变流动 */
.log-item.rb, .log-item.born {
  background: linear-gradient(90deg, rgba(232,84,47,.26), rgba(224,170,44,.26), rgba(240,192,74,.28), rgba(255,208,106,.26), rgba(160,107,212,.26));
  background-size: 400% 100%;
  border: 1px solid rgba(200,170,110,.7);
  color: #fff6dc;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(200,170,110,.28);
  animation: rainbowShift 1.2s linear infinite;
}
@keyframes rainbowShift { 0% { background-position: 0% 0; } 100% { background-position: 400% 0; } }
.log-item.dead { background: rgba(150,40,50,.15); border-left-color: rgba(170,50,60,.85); border-top: 1px solid rgba(170,50,60,.4); border-right: 1px solid rgba(170,50,60,.4); border-bottom: 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: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.settle-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--gold-bright); letter-spacing: 2px; }
.settle-title.god { color: #eaf6ff; text-shadow: 0 0 24px rgba(245,197,66,.65); }
.settle-wuhun { text-align: center; color: var(--text-dim); font-size: 13.5px; }
.settle-wuhun b { color: var(--gold-bright); }
.settle-rows { display: flex; flex-direction: column; }
.s-row {
  display: flex; justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}
.s-row:last-child { border-bottom: none; }
.s-row span { color: var(--text-dim); }
.s-row b { color: var(--gold-bright); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.settle-god {
  text-align: center;
  font-size: 14px;
  color: #eaf6ff;
  background: linear-gradient(180deg, rgba(245,197,66,.18), rgba(245,197,66,.06));
  border: 1px solid rgba(245,197,66,.45);
  border-radius: 4px;
  padding: 10px;
  letter-spacing: 1px;
}
.settle-xinwu { font-size: 12.5px; color: #f2e3c8; line-height: 1.6; text-align: center; }
.settle-rank {
  background: rgba(245,197,66,.07);
  border: 1px solid rgba(245,197,66,.22);
  border-radius: 4px;
  padding: 7px;
  color: var(--gold);
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.settle-note {
  background: rgba(200,40,31,.08);
  border: 1px solid rgba(200,40,31,.35);
  border-radius: 4px;
  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: 4px; }

/* ---------- 子页通用（标题绝对居中，✕ 固定右上角） ---------- */
.page-view { padding: 0 !important; }
.page-head {
  width: 100%;
  position: relative;
  padding: 14px 14px 10px;
  background: rgba(38,6,10,.96);
  border-bottom: 1px solid var(--line);
  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: var(--gold);
  letter-spacing: 2px;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(245,197,66,.40);
}
.btn-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  clip-path: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  flex: none;
}
.btn-close:active { transform: scale(.92); border-color: var(--gold); color: var(--gold); }
.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: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 8px 0;
  background: var(--panel-2);
  color: var(--text-mute);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.tab.active {
  background: linear-gradient(180deg, #d09a2a, #8a5a16);
  border-color: var(--gold);
  color: #fff1c9;
  box-shadow: 0 0 12px rgba(245,197,66,.35);
}
.lb-note { padding: 6px 14px 0; font-size: 12px; color: var(--gold); width: 100%; letter-spacing: 1px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lb-body { padding: 8px 14px 30px; width: 100%; }
.lb-tip { text-align: center; color: var(--text-mute); padding: 30px 0; font-size: 14px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.lb-row.me { box-shadow: 0 0 0 1px var(--gold) inset; background: rgba(245,197,66,.12); }
.lb-rank {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.lb-rank.top { background: #6b551c; color: #ffe9bd; }
.lb-rank.top.r1 { background: #c0143c; color: #fff; }
.lb-rank.top.r2 { background: #c05a3f; color: #fff; }
.lb-rank.top.r3 { background: var(--gold-dim); color: #fff1c9; }
.lb-user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-avatar { width: 28px; height: 28px; border-radius: 3px; flex: none; }
.lb-name { font-size: 14px; color: #f0d8cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 15px; font-weight: 700; color: var(--gold-bright); flex: none; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lb-time { font-size: 11px; color: var(--text-dim); flex: none; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 图鉴 ---------- */
.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: 3px;
  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(245,197,66,.22), rgba(245,197,66,.08));
  border: 1px solid rgba(245,197,66,.5);
  color: var(--gold-bright);
}
.dex-item.lack {
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  color: #7a2a2f;
}

/* ---------- 暂停遮罩 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(48,8,12,.86);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mask-box {
  width: 300px;
  max-width: 86vw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.8), 0 0 40px rgba(245,197,66,.08);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.mask-title { text-align: center; font-size: 20px; color: var(--gold); font-weight: 700; letter-spacing: 2px; text-shadow: 0 0 14px rgba(245,197,66,.35); }
.mask-info { text-align: center; color: var(--text-dim); font-size: 13px; }
.mask-box .set-row { justify-content: center; padding: 4px 0; }
.review-box { width: 320px; max-width: 88vw; max-height: 80vh; }
/* 与游戏内 .log-box 完全同一套样式：回顾生涯里的颜色/底色/边框和进程日志一模一样 */
.review-log {
  flex: 1;
  min-height: 200px;
  max-height: 55vh;
  overflow-y: auto;
  background: rgba(38,6,10,.86);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 电脑端 ---------- */
@media (min-width: 520px) {
  body { background: var(--bg-deep); }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 高阶天赋增益（点赞/投币/关注） ---------- */
.btn-follow {
  border-color: var(--gold-dim);
  color: var(--gold);
  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: #f2e3c8; 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: #ffe2b0; }
.fb-state.todo { color: var(--text-mute); }
.fb-total { font-size: 15px; color: var(--gold); font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 成就系统 ---------- */
.home-ach-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.ach-tip { text-align: center; color: var(--gold); font-size: 12px; margin-bottom: 12px; }
.ach-total {
  text-align: center; color: var(--gold); font-size: 16px; font-weight: 700;
  margin: 6px 14px 10px; padding: 9px;
  width: calc(100% - 28px);
  background: rgba(245,197,66,.07);
  border: 1px solid rgba(245,197,66,.22);
  border-radius: 4px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ach-list {
  display: flex; flex-direction: column; gap: 12px;
  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: var(--gold-dim); border-radius: 3px; }
.ach-list::-webkit-scrollbar-track { background: var(--panel-2); border-radius: 3px; }
.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.ach-item.done { border-color: var(--gold-dim); background: linear-gradient(180deg, #252c33, var(--panel)); box-shadow: 0 0 16px rgba(245,197,66,.18); }
.ach-name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.ach-item.done .ach-name { color: var(--gold-bright); }
.ach-item.todo .ach-name { color: var(--text-dim); }
.ach-bonus { font-size: 13px; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ach-item.done .ach-bonus { color: #ffe2b0; }
.ach-item.todo .ach-bonus { color: #7a2a2f; }

/* ---------- 成就达成面包屑提示 ---------- */
.ach-toast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #d09a2a, #8a5a16);
  border-bottom: 1px solid var(--gold);
  color: #fff1c9;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: translateY(-100%);
  transition: transform .35s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.7), 0 0 24px rgba(245,197,66,.25);
}
.ach-toast.show { transform: translateY(0); }

/* 成就按钮：标题+小字两行居中 */
#btn-ach, #btn-rank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 9px 14px; }
#btn-ach > span:first-child, #btn-rank > span:first-child { font-size: 17px; line-height: 1.3; }
.ach-btn-tip { font-size: 10px; color: var(--gold); white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* 排行榜页内的榜单名次加成说明（参考新三国模拟器） */
.rank-fate-note { width: 100%; text-align: center; color: var(--gold); font-size: 12px; padding: 2px 0 4px; font-variant-numeric: tabular-nums; }

/* ---------- 手动模式 ---------- */
.manual-tip {
  width: 100%;
  text-align: center;
  color: var(--gold);
  font-size: 13px;
  padding: 6px 0 2px;
  letter-spacing: 2px;
}
.set-tip { margin-top: 6px; color: var(--text-mute); font-size: 12px; line-height: 1.6; }

/* 设置页：智能参战的阈值行（仅在选「智能参战」时显示）
 * ⚠ select 是「替换元素」，在老 WebKit / B站 WebView 里会按「最长 option 的宽度」当固有最小宽度，
 *   即便写了 min-width:0 也可能穿透 flex 容器把页面撑宽。
 *   修法：外层包一个可收缩的普通块级容器（min-width:0），select 在里面用 width:100%，
 *   由外层负责收缩，select 不再参与 flex 的固有宽度计算。 */
.set-min-row { margin-top: 10px; flex-wrap: wrap; }
.set-min-row .set-label { flex: none; white-space: nowrap; }
.set-min-wrap { flex: 1 1 110px; min-width: 0; display: block; }
.set-select-inline { width: 100%; max-width: 100%; min-width: 0; padding: 8px 10px; font-size: 14px; }

/* ---------- 开局抽俱乐部（不可关闭） ---------- */
#view-club { justify-content: center; }
.wake-box {
  width: 100%;
  max-width: 440px;
  margin: auto 0;   /* 上下居中；内容超过一屏时自动归零，不会裁掉顶部 */
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--teal);
  border-radius: 4px;
  padding: 22px 16px 18px;
  text-align: center;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.wake-title { font-size: 24px; color: var(--gold-bright); letter-spacing: 3px; font-weight: 700; text-shadow: 0 0 18px rgba(245,197,66,.35); }
.wake-sub { color: var(--gold); font-size: 14px; margin: 6px 0 4px; font-weight: 700; }
.wake-hint { color: var(--text-mute); font-size: 12px; margin-bottom: 14px; }
.wake-list { display: flex; flex-direction: column; gap: 8px; }
/* 整卡单行、各段同格式：选手卡1（Peanut）【SS】天赋：73 意识：79 电竞点：98  【保底】
 * 沿用原有深色卡片与主题文字色；超宽由脚本缩字号，绝不折行 */
.wake-card {
  position: relative;
  /* 两栏网格：左栏「选手卡N」贴最左，右栏放属性组并居中，两栏互不侵占。
   * ⚠ 单行绝不换行：内容放不下时由 game.js 的 fitCard() 整卡缩字号（9-12px），
   *   不靠 scrollWidth 判断（居中溢出测不到左半），也不要靠 flex 自动换行 */
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-left: 2px solid var(--gold-dim);
  border-radius: 4px;
  padding: 12px 14px;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.wake-card:active { transform: scale(.98); border-color: var(--gold); filter: brightness(1.12); }
.wake-card.guard { border-color: var(--teal); box-shadow: 0 0 12px rgba(255,208,106,.35); }
.wake-card-txt { font-size: 1em; font-weight: 700; color: var(--text); letter-spacing: 0; flex: none; white-space: nowrap; }
/* 「选手卡N」贴最左，用金色与属性区分开 */
.wake-card-no { justify-self: start; color: var(--gold); }
/* 属性组：横向排列、永不换行，宽度不够时靠整卡缩字号解决 */
.wake-card-attrs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
}

/* ---------- 遭遇敌对势力弹窗（可拖动、可收起） ---------- */
#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: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.decision-x:active { transform: scale(.9); }
.decision-tip { text-align: center; color: var(--text-mute); font-size: 11px; line-height: 1.5; }
/* 信息单行不折行（超宽由脚本缩字号适配） */
.decision-info { text-align: center; color: var(--text); font-size: 15px; line-height: 1.6; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.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: var(--bg);
  font-weight: 700;
  border-radius: 4px;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
/* 迎战：红；脱身：绿（文字统一黑色） */
.opt-fight { border: 1px solid var(--danger); background: linear-gradient(180deg, #ff7a4a, var(--danger)); color: #14080a; box-shadow: 0 0 14px rgba(200,40,31,.30); }
.opt-flee  { border: 1px solid #8a6a20; background: linear-gradient(180deg, #f5b04a, #8a6a20); color: #33220a; box-shadow: 0 0 14px rgba(245,176,74,.25); }
/* 首页 高光+保底 双按钮同排各占 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: var(--gold); white-space: nowrap; }
#btn-guard.on { border-color: var(--gold); background: linear-gradient(180deg, #33280f, var(--panel)); box-shadow: 0 0 18px rgba(245,197,66,.30); }
#btn-guard.on .ach-btn-tip { color: var(--gold-bright); }

/* 首页「图鉴」按钮：标题 + 加成小字两行（与排行榜 / 成就按钮同款） */
#btn-dex { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; }
#btn-dex .ach-btn-tip { font-size: 10px; color: var(--gold); white-space: nowrap; }

/* 高光列表 / 图片预览 / 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, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-dim);
  border-radius: 4px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;                 /* 点条目即导出结算卡 */
  flex: none;
}
.hl-item:active { transform: scale(.99); filter: brightness(1.2); border-color: var(--gold); }
.hl-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hl-top b { color: var(--gold-bright); font-size: 14.5px; }
.hl-innate { color: #f2e3c8; font-size: 11.5px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hl-sect { color: var(--gold); font-size: 11.5px; }
.hl-end { margin-left: auto; color: #ffb0b8; font-size: 11.5px; }
.hl-mid { margin-top: 3px; color: var(--text-dim); font-size: 11.5px; line-height: 1.45; }
.hl-mid b { color: var(--gold-bright); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.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: var(--text-mute); 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: var(--bg); border-radius: 4px; }
.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: linear-gradient(180deg, #d09a2a, #8a5a16); border: 1px solid var(--gold);
  color: #fff1c9; font-weight: 700; font-size: 14px;
  border-radius: 4px; padding: 10px 18px; box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 24px rgba(245,197,66,.25);
  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(74,16,20,.85); border-radius: 3px; padding: 6px 10px; text-align: left; color: #f0d8cf; font-size: 13px; line-height: 1.6; }
.guard-row b { color: var(--gold-bright); }
.guard-pts { text-align: center; color: var(--gold); font-size: 15px; font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.guard-pts b { color: var(--gold-bright); font-size: 18px; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 遭遇收起后底部召唤按钮 */
.decision-recall {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 70;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #d09a2a, #8a5a16);
  color: #fff1c9;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
  padding: 10px 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 22px rgba(245,197,66,.25);
}
.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: var(--text-mute); font-size: 11.5px; letter-spacing: 1px; }
.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;
}

/* ============ 风格补充：职业赛事高光日志 / 荣誉胶囊 / 青蓝点缀 ============ */
/* 荣誉胶囊：S3 入围 / S8 冠军 …（逐级递进，冠军最华丽） */
.honor-chip.hz1 { background: #7a2a2f; color: #ffece0; }
.honor-chip.hz2 { background: #b8862a; color: #e6f4ff; }
.honor-chip.hz3 { background: #4a7fb5; color: #e6f2ff; }
.honor-chip.hz4 { background: #2f9e6e; color: #eafff5; }
.honor-chip.hz5 { background: #c98a2e; color: #fff8dd; }
.honor-chip.hz6 { background: #c3ccd6; color: #22282e; }
.honor-chip.hz7 { background: linear-gradient(180deg, #ffd07a, #f5c542); color: #33220a; box-shadow: 0 0 8px rgba(245,197,66,.75); }

/* ============================================================
 * 电竞经理模拟器 · 新增样式
 * 首发五人列表 · 选秀页 · S赛弹窗补充 · 战队图鉴分组
 * ============================================================ */

/* ---------- 首发五人（游戏页 / 结算页共用） ---------- */
.roster-box {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 30vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.settle-roster { max-height: none; margin-top: 4px; }
.roster-row {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  padding: 7px 9px;
  border-radius: 3px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold-dim);
  background: linear-gradient(90deg, rgba(74,16,20,.92), rgba(58,12,16,.72));
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.roster-pos {
  flex: none;
  color: var(--gold);
  font-weight: 700;
  font-size: .92em;   /* 用 em 而非 px：整行缩字号时跟着一起缩 */
  min-width: 30px;
}
.roster-name { flex: none; color: var(--gold-bright); font-weight: 700; }
.roster-lv { flex: none; color: var(--teal); font-family: var(--mono); font-weight: 700; }
.roster-attr { flex: none; color: #e0bcb4; font-family: var(--mono); }
.roster-power { flex: 1; text-align: right; color: var(--gold-bright); font-family: var(--mono); font-weight: 700; }

/* ---------- 选秀页 ---------- */
#view-draft { height: 100vh; overflow: hidden; }
.draft-box {
  width: 100%;
  max-width: 560px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 14px;
}
.draft-head { flex: none; padding: 18px 0 10px; text-align: center; }
.draft-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(245,197,66,.35);
}
.draft-sub { margin-top: 6px; font-size: 11.5px; color: var(--text-mute); letter-spacing: .5px; }
.draft-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}
.draft-sec { margin-bottom: 12px; }
.draft-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 5px;
}
.draft-sec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.draft-refresh {
  flex: none;
  margin-left: auto;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid rgba(245,197,66,.55);
  background: rgba(245,197,66,.10);
  color: var(--gold);
  cursor: pointer;
}
.draft-refresh.on { box-shadow: 0 0 8px rgba(245,197,66,.35); }
/* 「⇧ TOP11」：一键选回综合属性最高的 11 人（与刷新按钮并排，靠右） */
.draft-top {
  flex: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid rgba(245,197,66,.85);
  background: rgba(245,197,66,.22);
  color: var(--gold-bright);
  cursor: pointer;
}
.draft-top:hover { background: rgba(245,197,66,.34); }
.draft-top + .draft-refresh { margin-left: 0; }
.draft-refresh.used, .draft-refresh.used:hover {
  border-color: var(--line-soft);
  background: rgba(200,150,145,.10);
  color: var(--text-mute);
  box-shadow: none;
  cursor: default;
}
/* 未关注 / 额度用完时的悬浮提示（fixed 定位，不会被滚动容器裁掉） */
.draft-tip-float {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  max-width: min(236px, calc(100vw - 16px));
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(48,8,12,.97);
  border: 1px solid rgba(245,197,66,.55);
  color: var(--gold-bright);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: .5px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s;
}
.draft-tip-float.show { opacity: 1; visibility: visible; }
.draft-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 3px;
  border: 1px solid var(--line-soft);
  background: rgba(58,12,16,.72);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.draft-row.picked {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(245,197,66,.20), rgba(245,197,66,.05));
  box-shadow: 0 0 10px rgba(245,197,66,.20) inset;
}
.draft-row.picked::after {
  content: '✓';
  flex: none;
  color: var(--gold);
  font-weight: 700;
}
.draft-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 6px;
  font-family: var(--mono);
}
.draft-name { flex: none; color: var(--gold-bright); font-weight: 700; }
.draft-attr { flex: none; color: #e0bcb4; font-family: var(--mono); font-size: 12px; }
.draft-guard { flex: none; color: var(--teal); font-size: 11px; }
.draft-foot {
  flex: none;
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(48,8,12,0), rgba(48,8,12,.96) 40%);
}
.draft-foot .btn { width: 100%; }

/* ---------- 全球总决赛弹窗 ---------- */
.dec-line { font-size: 13.5px; line-height: 1.7; color: #f0d8cf; }
#decision-info { display: flex; flex-direction: column; gap: 2px; text-align: center; }
#decision-info b { color: var(--gold-bright); font-size: 15px; }

/* ---------- 图鉴分组 ---------- */
.dex-sec {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  padding: 10px 2px 6px;
}
.dex-bonus { color: var(--gold); font-size: 12px; letter-spacing: .5px; }

/* ============================================================
 * 世界杯模拟器 · 追加样式（中国红 + 五角星黄 / 足球元素）
 * ============================================================ */


/* 选秀页：已选计数 */
.draft-count {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: .5px;
}
/* 未选满 11 人时「开始游戏」置灰 */
.btn[disabled], .btn.disabled {
  opacity: .42;
  filter: grayscale(.65);
  cursor: not-allowed;
  pointer-events: none;
}

/* 世界杯弹窗：出战阵容三选一 */
.decision-lineup { margin: 10px 0 4px; }
.lineup-cap {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.lineup-grid { display: flex; gap: 6px; }
.lineup-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(74,16,20,.85);
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.lineup-btn .lineup-name { font-weight: 700; white-space: nowrap; }
.lineup-btn .lineup-power { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.lineup-btn.on {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(245,197,66,.22), rgba(245,197,66,.06));
  box-shadow: 0 0 10px rgba(245,197,66,.22) inset;
}
.lineup-btn.on .lineup-name { color: var(--gold-bright); }
.lineup-btn.on .lineup-power { color: var(--gold); }
