/* ============================================================
   闪杀对决 · 清新浅色 / 竖屏 H5
   ============================================================ */
:root {
  --blue: #3D7EFF;
  --blue-deep: #2558D8;
  --blue-soft: #EAF2FF;
  --ink: #182742;
  --ink-2: #3D4F6E;
  --muted: #7C8BA5;
  --muted-2: #A3B0C5;
  --bg: #F2F6FD;
  --card: #FFFFFF;
  --line: #E3EBF8;
  --line-2: #D3E0F5;
  --red: #EF5B5B;
  --green: #2FB98A;
  --gold: #E8A23A;
  --purple: #8B6CF6;
  --shadow-s: 0 4px 14px rgba(37, 66, 120, .07);
  --shadow-m: 0 10px 28px rgba(37, 66, 120, .10);
  --shadow-l: 0 18px 42px rgba(37, 66, 120, .16);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 15% 0%, #DCE9FF 0%, transparent 55%),
    radial-gradient(700px 500px at 100% 100%, #E8E2FF 0%, transparent 50%),
    #E9EFF9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button:disabled { cursor: default; }
h1, h2, h3, h4, p { margin: 0; }
i { font-style: normal; }

#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(34, 62, 118, .18);
  isolation: isolate;
}
@media (min-width: 520px) {
  #app { height: min(920px, 100dvh); border-radius: 30px; }
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.995);
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
  background: var(--bg);
  z-index: 1;
}
.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  z-index: 2;
}
.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 16px calc(24px + var(--safe-bottom));
}
.screen-scroll::-webkit-scrollbar { display: none; }
.dot { color: var(--muted-2); margin: 0 4px; }

/* ================= 首页 ================= */
#screen-home {
  background:
    radial-gradient(340px 260px at 88% 2%, rgba(120, 170, 255, .28), transparent 65%),
    radial-gradient(280px 240px at 0% 34%, rgba(178, 205, 255, .30), transparent 70%),
    linear-gradient(180deg, #F4F8FF 0%, #F1F6FE 48%, #F6F9FF 100%);
}
.home-scroll { padding-top: calc(12px + var(--safe-top)); }

.home-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 1px 15px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-seal {
  position: relative;
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 23px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, #5B96FF 0%, #3D7EFF 45%, #2254D4 100%);
  box-shadow: 0 7px 16px rgba(61, 126, 255, .34), inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
}
.brand-seal::after {
  content: ""; position: absolute; width: 58px; height: 9px; right: -18px; bottom: 8px;
  background: rgba(255, 255, 255, .22); transform: rotate(-38deg);
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong { font-family: var(--serif); font-size: 18px; letter-spacing: .12em; color: #17335F; }
.brand-text span { font-size: 7.5px; letter-spacing: .23em; color: #90A3C0; font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.coin-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid #F0E2BE;
  border-radius: 999px;
  padding: 6px 10px 6px 7px;
  box-shadow: var(--shadow-s);
  font-size: 12px; color: #9A6B12;
}
.coin-chip .mp-icon { width: 17px; height: 17px; color: #E8A23A; }
.coin-chip b { font-weight: 700; }
.avatar-btn { position: relative; display: flex; flex-direction: column; align-items: center; }
.avatar-ring {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #D9E8FF, #A9C6FF);
  border: 2px solid #fff;
  box-shadow: 0 5px 12px rgba(52, 91, 163, .18);
}
.avatar-face {
  width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #3D7EFF, #244EBE);
  color: #fff; font-family: var(--serif); font-size: 15px;
}
.avatar-lv {
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  font-size: 8px; line-height: 1; color: #3B5A8C; background: #fff;
  border: 1px solid #E0EAF9; padding: 2px 5px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 2px 5px rgba(34, 62, 118, .08);
}

.hero {
  position: relative;
  border-radius: 26px;
  min-height: 238px;
  padding: 22px 20px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 92% 8%, rgba(141, 188, 255, .95) 0%, rgba(141, 188, 255, 0) 55%),
    linear-gradient(152deg, #4C8CFF 0%, #3D7EFF 38%, #2A5FDD 74%, #2049B5 100%);
  box-shadow: 0 18px 34px rgba(51, 108, 229, .30);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 17px 17px;
  opacity: .34;
  mask-image: linear-gradient(120deg, #000 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(120deg, #000 10%, transparent 70%);
}
.hero::after {
  content: ""; position: absolute; width: 210px; height: 210px; right: -98px; top: -92px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .05), 0 0 0 52px rgba(255, 255, 255, .035);
}
.hero-copy { position: relative; z-index: 4; width: 64%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 999px;
  font-size: 9.5px; letter-spacing: .05em; font-weight: 600;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.eyebrow .mp-icon { width: 13px; height: 13px; color: #FFE29A; }
.hero h1 {
  margin: 13px 0 9px;
  font-family: var(--serif);
  font-size: 35px; line-height: 1.16; letter-spacing: .02em;
  text-shadow: 0 3px 14px rgba(14, 41, 100, .25);
}
.hero h1 span { color: #FFE7A8; position: relative; }
.hero h1 span::after {
  content: ""; position: absolute; left: 2px; right: 3px; bottom: 1px;
  height: 7px; border-radius: 99px;
  background: rgba(255, 220, 130, .27);
  transform: rotate(-1.6deg);
}
.hero p { font-size: 11.5px; line-height: 1.72; color: rgba(255, 255, 255, .82); letter-spacing: .01em; }
.hero-tags { display: flex; gap: 6px; margin-top: 13px; }
.hero-tags span {
  font-size: 8.5px; color: rgba(255, 255, 255, .8);
  padding: 3px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .1);
}
.hero-art { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-halo {
  position: absolute; right: 20px; bottom: -64px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%);
}
.slash { position: absolute; height: 2px; border-radius: 99px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); transform: rotate(-34deg); }
.slash-a { width: 130px; right: -22px; top: 84px; }
.slash-b { width: 90px; right: 12px; top: 120px; opacity: .5; }
.hero-card {
  position: absolute; width: 92px; height: 132px; border-radius: 12px;
  background: linear-gradient(163deg, #FFFEF9 0%, #F3F7FF 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 16px 26px rgba(12, 37, 94, .28);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.hero-card b { font-family: var(--serif); font-size: 41px; line-height: 1; }
.hero-card em { font-style: normal; font-size: 9px; color: #93A0B5; letter-spacing: .14em; }
.hero-card::before {
  content: ""; position: absolute; top: 7px; left: 7px; right: 7px; height: 3px; border-radius: 99px;
  background: currentColor; opacity: .16;
}
.hero-card-red { right: 6px; top: 52px; color: #EF5B5B; transform: rotate(13deg); z-index: 3; }
.hero-card-blue { right: 70px; top: 100px; color: #3D7EFF; transform: rotate(-13deg); z-index: 2; }
.hero-seal {
  position: absolute; right: 25px; top: 24px; width: 52px; height: 52px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  color: rgba(255, 255, 255, .86);
  font-family: var(--serif); font-size: 20px;
  transform: rotate(-13deg);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .08);
}

.stats-row {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin: -22px 12px 14px;
  padding: 12px 6px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(38, 71, 134, .12);
  backdrop-filter: blur(10px);
}
.stat { text-align: center; display: flex; flex-direction: column; gap: 2px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(transparent, #E6EDF9, transparent);
}
.stat span { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; }
.stat strong { font-size: 19px; line-height: 1.2; letter-spacing: -.01em; color: #1C3763; }

.panel {
  background: var(--card);
  border: 1px solid rgba(227, 235, 248, .9);
  border-radius: 20px;
  box-shadow: var(--shadow-s);
  padding: 15px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-kicker { font-size: 8px; font-weight: 700; letter-spacing: .2em; color: var(--blue); }
.panel-head h2 { font-size: 14.5px; margin-top: 3px; letter-spacing: .01em; }
.mini-help {
  height: 27px; padding: 0 11px; border-radius: 999px;
  background: #F0F5FE; color: #5F7CA8; font-size: 10px; font-weight: 600;
  border: 1px solid #E1EAF8;
}
.mode-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.mode-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 13px;
  background: #F9FBFF; text-align: left;
  transition: border-color .18s, background .18s, transform .12s, box-shadow .18s;
}
.mode-item:active { transform: scale(.988); }
.mode-icon {
  width: 33px; height: 33px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #EEF4FF; color: #5D8BE8;
}
.mode-icon .mp-icon { width: 18px; height: 18px; }
.mode-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mode-copy strong { font-size: 12.5px; }
.mode-copy small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-tag {
  flex: 0 0 auto; font-size: 8px; color: #6C86AB;
  background: #EDF3FC; padding: 2px 7px; border-radius: 99px;
}
.mode-item.is-active {
  border-color: rgba(61, 126, 255, .55);
  background: linear-gradient(120deg, #F3F8FF, #EBF3FF);
  box-shadow: 0 5px 14px rgba(61, 126, 255, .12);
}
.mode-item.is-active .mode-icon { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(61, 126, 255, .3); }
.mode-item.is-active .mode-copy strong { color: #2454C4; }
.mode-item.is-active .mode-tag { background: var(--blue); color: #fff; }

.cta {
  position: relative;
  width: 100%; min-height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px 12px 19px;
  margin-top: 13px;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #4C8CFF 0%, #3D7EFF 46%, #2459D9 100%);
  box-shadow: 0 13px 26px rgba(55, 113, 232, .32);
  transition: transform .12s, box-shadow .18s;
}
.cta::after {
  content: ""; position: absolute; top: -30px; left: -40%; width: 46%; height: 150%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .19), transparent);
  transform: skewX(-22deg);
}
.cta:active { transform: scale(.988); box-shadow: 0 7px 16px rgba(55, 113, 232, .25); }
.cta-text { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.cta-text small { font-size: 9.5px; color: rgba(255, 255, 255, .72); letter-spacing: .03em; }
.cta-text small b { color: #FFE5A2; font-weight: 600; }
.cta-text strong { font-size: 17px; letter-spacing: .04em; }
.cta-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .23);
}
.cta-icon .mp-icon { width: 19px; height: 19px; color: #fff; }
.cta-slim { min-height: 58px; margin-top: 0; padding: 10px 14px 10px 18px; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.quick-card {
  display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 11px 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 15px; box-shadow: var(--shadow-s);
  transition: transform .12s, box-shadow .18s;
}
.quick-card:active { transform: scale(.975); box-shadow: 0 3px 8px rgba(37, 66, 120, .06); }
.quick-ic {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #EEF4FF; color: var(--blue);
}
.quick-ic .mp-icon { width: 17px; height: 17px; }
.quick-ic.purple { background: #F2EEFF; color: var(--purple); }
.quick-ic.gold { background: #FFF6E5; color: var(--gold); }
.quick-ic.green { background: #E9FAF3; color: var(--green); }
.quick-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-tx strong { font-size: 11.5px; white-space: nowrap; }
.quick-tx small { font-size: 8.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-card { position: relative; }
.quick-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px;
  border: 1.5px solid #fff;
  background: #EF5B5B; color: #fff;
  font-size: 8px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 3px 7px rgba(239, 91, 91, .35);
}
.quick-badge[hidden] { display: none; }

.daily-card {
  display: flex;
  width: 100%;
  text-align: left; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px 13px;
  border-radius: 16px;
  background: linear-gradient(115deg, #FFF8E8, #FFFDF7 70%);
  border: 1px solid #F2E3BC;
  box-shadow: 0 6px 16px rgba(184, 146, 63, .08);
}
.daily-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #FFEFC9; color: #C4861D;
}
.daily-icon .mp-icon { width: 18px; height: 18px; }
.daily-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.daily-tx strong { font-size: 11.5px; color: #8A6018; }
.daily-tx small { font-size: 9px; color: #B09155; }
.daily-card > .mp-icon { color: #C6AA70; width: 18px; height: 18px; }
.home-foot { text-align: center; margin: 15px 0 2px; font-size: 8.5px; color: #A9B5C8; letter-spacing: .08em; }

.tabbar {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 7px 12px calc(8px + var(--safe-bottom));
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid rgba(226, 235, 248, .9);
  box-shadow: 0 -6px 20px rgba(37, 66, 120, .05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
}
.tab-btn {
  position: relative;
  min-height: 46px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #94A3BA; font-size: 9px; font-weight: 500;
  border-radius: 12px;
  transition: color .18s, transform .12s;
}
.tab-btn .mp-icon { width: 21px; height: 21px; }
.tab-btn:active { transform: scale(.94); }
.tab-btn.is-active { color: var(--blue); font-weight: 700; }
.tab-btn.is-active::before {
  content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 99px; background: var(--blue);
  box-shadow: 0 2px 7px rgba(61, 126, 255, .5);
}

/* ================= 通用二级页 ================= */
.subhead {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: calc(11px + var(--safe-top)) 16px 9px;
}
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-s); color: #4E6B96;
  transition: transform .12s;
}
.icon-btn:active { transform: scale(.93); }
.icon-btn .mp-icon { width: 20px; height: 20px; }
.icon-btn.tiny { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.tiny .mp-icon { width: 17px; height: 17px; }
.subhead-title { flex: 1; min-width: 0; }
.subhead-title span { font-size: 7.5px; letter-spacing: .2em; font-weight: 700; color: #9AAAC2; }
.subhead-title h1 { font-size: 19px; letter-spacing: .02em; line-height: 1.25; margin-top: 1px; }
.mode-badge, .codex-count {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 600; color: #356AD8;
  background: #EAF2FF; border: 1px solid #D8E6FF;
  padding: 5px 10px; border-radius: 999px;
}
.codex-count { color: #6D84A7; background: #fff; border-color: var(--line); }

/* ================= 选将 ================= */
#screen-select {
  background:
    radial-gradient(320px 220px at 100% 0%, rgba(124, 170, 255, .26), transparent 65%),
    linear-gradient(180deg, #F4F8FF, #F2F6FD 60%, #F7FAFF);
}
.select-scroll { padding-top: 2px; padding-bottom: 14px; }
.select-tip {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 11px; margin-bottom: 11px;
  border-radius: 12px; background: #EAF2FF; color: #5578AE;
  font-size: 10px; line-height: 1.5;
}
.select-tip .mp-icon { width: 15px; height: 15px; flex: 0 0 auto; color: #4C86EE; }
.general-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.general-card {
  position: relative;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 17px;
  box-shadow: var(--shadow-s);
  transition: transform .14s, border-color .18s, box-shadow .18s;
  overflow: hidden;
}
.general-card:active { transform: scale(.975); }
.general-card::after {
  content: ""; position: absolute; right: -26px; top: -26px; width: 72px; height: 72px;
  border-radius: 50%; background: var(--g1, #3D7EFF); opacity: .06;
}
.general-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 9px 22px rgba(61, 126, 255, .18);
  transform: translateY(-1px);
}
.general-top { display: flex; align-items: center; gap: 9px; }
.hero-avatar {
  position: relative;
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 21px; color: #fff;
  background: linear-gradient(145deg, var(--g1, #5B96FF), var(--g2, #2254D4));
  box-shadow: 0 6px 12px color-mix(in srgb, var(--g2, #2254D4) 30%, transparent);
  overflow: hidden;
}
.hero-avatar::after {
  content: ""; position: absolute; width: 48px; height: 8px; right: -14px; bottom: 8px;
  background: rgba(255, 255, 255, .22); transform: rotate(-38deg);
}
.general-name { min-width: 0; }
.general-name strong { display: block; font-size: 13.5px; letter-spacing: .02em; }
.general-name span { display: inline-block; margin-top: 3px; font-size: 8px; color: var(--g2, #3D7EFF); background: #EEF4FF; padding: 1px 5px; border-radius: 4px; }
.general-skill { margin-top: 8px; font-size: 9px; font-weight: 600; color: #54729F; }
.general-skill b { color: var(--blue); font-weight: 700; }
.general-desc { margin-top: 3px; font-size: 9px; line-height: 1.48; color: var(--muted); height: 27px; overflow: hidden; }
.general-check {
  position: absolute; right: 8px; top: 8px; width: 18px; height: 18px; border-radius: 50%;
  display: none; place-items: center;
  background: var(--blue); color: #fff; box-shadow: 0 3px 7px rgba(61, 126, 255, .35);
}
.general-check .mp-icon { width: 12px; height: 12px; }
.general-card.is-selected .general-check { display: grid; }
.select-note {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 12px; padding: 11px 12px;
  border-radius: 13px; background: rgba(255, 255, 255, .7);
  border: 1px dashed #D9E5F7;
}
.select-note .mp-icon { width: 15px; height: 15px; flex: 0 0 auto; color: #E8A23A; margin-top: 1px; }
.select-note p { font-size: 9.5px; line-height: 1.65; color: #7D8DA5; }
.select-dock {
  flex: 0 0 auto;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 26px rgba(37, 66, 120, .08);
  backdrop-filter: blur(12px);
}
.pick-summary { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.pick-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  font-family: var(--serif); font-size: 16px;
  background: linear-gradient(145deg, #5B96FF, #2254D4);
  box-shadow: 0 4px 10px rgba(61, 126, 255, .24);
}
.pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-info strong { font-size: 12px; }
.pick-info span { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-vs { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.pick-vs span { font-family: var(--serif); font-size: 13px; color: #9CADC6; font-weight: 700; letter-spacing: .06em; }
.pick-vs small { font-size: 7.5px; color: #B7C3D5; }

/* ================= 对局 ================= */
#screen-battle {
  background:
    radial-gradient(300px 240px at 90% 4%, rgba(120, 170, 255, .22), transparent 65%),
    radial-gradient(260px 200px at 0% 42%, rgba(172, 198, 255, .20), transparent 70%),
    linear-gradient(180deg, #EFF5FF 0%, #EAF1FD 52%, #F5F9FF 100%);
}
.battle-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(9px + var(--safe-top)) 16px 7px;
}
.battle-head .icon-btn { width: 37px; height: 37px; border-radius: 12px; background: rgba(255, 255, 255, .78); }
.round-pill {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 112px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(37, 66, 120, .06);
}
.round-pill span { font-size: 8px; color: #93A5C0; letter-spacing: .06em; }
.round-pill em { font-style: normal; font-size: 11px; font-weight: 700; color: #2A4C80; }

.opponent-zone { flex: 0 0 auto; padding: 2px 16px 0; }
.fighter {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .96);
  box-shadow: 0 7px 18px rgba(37, 66, 120, .07);
  backdrop-filter: blur(9px);
  transition: box-shadow .2s, border-color .2s;
}
.fighter.is-hit { animation: shake .38s ease; border-color: rgba(239, 91, 91, .4); }
.fighter-avatar {
  position: relative;
  width: 50px; height: 50px; border-radius: 15px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .9);
  font-family: var(--serif); font-size: 23px; color: #fff;
  background: linear-gradient(145deg, var(--g1, #5B96FF), var(--g2, #2254D4));
  box-shadow: 0 6px 13px rgba(34, 62, 118, .18);
  overflow: hidden;
}
.fighter-avatar::after {
  content: ""; position: absolute; width: 56px; height: 8px; right: -16px; bottom: 10px;
  background: rgba(255, 255, 255, .2); transform: rotate(-38deg);
}
.fighter-avatar.small { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; border-width: 1.5px; }
.fighter-avatar.big { width: 68px; height: 68px; border-radius: 20px; font-size: 32px; }
.fighter-avatar.ai { --g1: #A98BFF; --g2: #6142C9; }
.fighter-meta { flex: 1; min-width: 0; }
.name-row { display: flex; align-items: center; gap: 5px; }
.name-row strong { font-size: 13.5px; letter-spacing: .02em; }
.kingdom-tag {
  font-size: 7.5px; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 4px;
  color: #3D7EFF; background: #EAF2FF;
}
.skill-tag {
  font-size: 7.5px; font-weight: 600; line-height: 1;
  padding: 2px 5px; border-radius: 4px;
  color: #8A6AD9; background: #F2EEFF;
}
.hp-row { display: flex; align-items: center; gap: 3px; margin: 2px 0 1px; }
.hp-hearts { display: flex; gap: 1px; }
.hp-hearts .mp-icon { width: 13px; height: 13px; color: #F2646E; filter: drop-shadow(0 1px 1px rgba(222, 66, 80, .18)); }
.hp-hearts .mp-icon.lost { color: #DCE4F2; filter: none; }
.hp-text { font-size: 8.5px; color: #9AA9C0; margin-left: 3px; }
.fighter-sub { display: flex; align-items: center; font-size: 8.5px; color: #8495AF; white-space: nowrap; overflow: hidden; }
.opponent-hand { position: relative; width: 36px; height: 49px; flex: 0 0 auto; margin-left: 2px; }
.back-card {
  position: absolute; top: 2px; right: 0; width: 27px; height: 40px; border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 5px),
    linear-gradient(150deg, #4D86F2, #234DBD);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 3px 7px rgba(28, 55, 118, .18);
}
.back-card:nth-child(2) { transform: rotate(7deg) translate(3px, 1px); }
.back-card:nth-child(3) { transform: rotate(13deg) translate(6px, 2px); }
.back-card::after {
  content: "闪"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 10px; color: rgba(255, 255, 255, .7);
}
.back-empty { font-size: 8px; color: #B3C0D4; position: absolute; right: 4px; top: 17px; }

.battle-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 108px;
  margin: 7px 16px 0;
  border-radius: 21px;
  overflow: hidden;
  border: 1px solid rgba(224, 234, 249, .95);
  background:
    radial-gradient(circle at 50% 44%, #FFFFFF 0%, #F5F9FF 48%, #EDF4FF 100%);
  box-shadow: inset 0 1px 0 #fff, 0 7px 20px rgba(37, 66, 120, .06);
}
.battle-stage::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(61, 126, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 126, 255, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 80%);
}
.battle-stage::after {
  content: "决";
  position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: 168px; line-height: 1;
  color: rgba(61, 126, 255, .032);
  pointer-events: none;
}
.stage-ring {
  position: absolute; left: 50%; top: 48%; width: 150px; height: 150px;
  border: 1px solid rgba(61, 126, 255, .10); border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 22px rgba(61, 126, 255, .035);
}
.stage-ring.ring-b { width: 92px; height: 92px; border-style: dashed; opacity: .8; }
.turn-banner {
  position: absolute; top: 9px; left: 50%; transform: translate(-50%, -6px);
  padding: 4px 12px; border-radius: 999px;
  background: rgba(61, 126, 255, .10); color: #4074D6;
  font-size: 9.5px; font-weight: 700; letter-spacing: .05em;
  opacity: 0; transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.turn-banner.show { opacity: 1; transform: translate(-50%, 0); }
.turn-banner.ai { background: rgba(139, 108, 246, .11); color: #7556CF; }
.turn-banner.danger { background: rgba(239, 91, 91, .12); color: #D34D56; }
.phase-rail {
  position: absolute; top: 34px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 3px;
  padding: 3px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(223, 233, 248, .88);
  box-shadow: 0 3px 9px rgba(37, 66, 120, .04);
  white-space: nowrap;
  z-index: 3;
}
.phase-rail span {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px 2px 3px;
  border-radius: 999px;
  font-size: 7.5px; color: #A3B2C8;
  transition: background .18s, color .18s;
}
.phase-rail i {
  width: 13px; height: 13px; border-radius: 50%;
  display: grid; place-items: center;
  font-style: normal; font-size: 6.5px;
  background: #EEF3FB; color: #8FA3BE;
  transition: background .18s, color .18s, box-shadow .18s;
}
.phase-rail span.is-done { color: #62B295; }
.phase-rail span.is-done i { background: #E7F9F1; color: #2FB98A; }
.phase-rail span.is-active {
  color: #2C5BB5; font-weight: 700;
  background: #EAF2FF;
}
.phase-rail span.is-active i {
  background: #3D7EFF; color: #fff;
  box-shadow: 0 2px 5px rgba(61, 126, 255, .35);
}
.stage-hint {
  position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%);
  text-align: center; font-size: 10.5px; line-height: 1.6; color: #A7B5CA;
  transition: opacity .2s;
}
.stage-log {
  position: absolute; left: 10px; right: 10px; bottom: 8px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  pointer-events: none;
}
.log-line {
  max-width: 96%;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(226, 235, 248, .8);
  font-size: 9px; line-height: 1.45; color: #637A9C;
  animation: logIn .22s ease both;
}
.log-line.strong { color: #31548C; font-weight: 600; }
.log-line.danger { color: #C6535D; background: rgba(255, 243, 244, .9); border-color: #F7DADD; }
.log-line.good { color: #23866A; background: rgba(238, 253, 247, .9); border-color: #CFF1E5; }
.play-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 8; }
.flash-card .game-card {
  width: 82px; height: 115px;
  box-shadow: 0 18px 34px rgba(25, 51, 105, .3);
  animation: playPop .7s cubic-bezier(.22, .8, .3, 1) forwards;
}

.player-zone {
  flex: 0 0 auto;
  position: relative; z-index: 6;
  margin-top: 8px;
  padding: 10px 16px calc(9px + var(--safe-bottom));
  background: rgba(255, 255, 255, .97);
  border-radius: 23px 23px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 -11px 30px rgba(30, 60, 120, .09);
}
.player-strip { display: flex; align-items: center; gap: 9px; }
.deck-count {
  display: flex; align-items: center; gap: 3px;
  padding: 4px 7px; border-radius: 8px;
  background: #F2F6FD; color: #7C90AD; font-size: 9px;
}
.deck-count .mp-icon { width: 14px; height: 14px; color: #90A4C2; }
.hand {
  display: flex; align-items: flex-end;
  min-height: 112px;
  padding: 15px 4px 2px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hand::-webkit-scrollbar { display: none; }
.hand-empty { width: 100%; text-align: center; font-size: 10px; color: #B1BFD3; padding: 28px 0; }
.hand .game-card:not(:first-child) { margin-left: -10px; }
.hand .game-card { width: 71px; height: 100px; }
.hand .game-card .gc-desc, .hand .game-card .gc-type { display: none; }
.hand .game-card .gc-name { top: 37px; font-size: 32px; }
.hand .game-card .gc-name.long { top: 40px; font-size: 17px; left: 7px; right: 5px; text-align: left; }
.hand .game-card .gc-name.longer { top: 42px; left: 7px; right: 5px; font-size: 13px; letter-spacing: -.05em; text-align: left; }
.game-card {
  --accent: #5B8DEF;
  position: relative;
  flex: 0 0 auto;
  width: 74px; height: 104px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #D9E3F4;
  background: linear-gradient(165deg, #FFFFFF 0%, #FBFCFF 62%, #F1F6FF 100%);
  box-shadow: 0 5px 12px rgba(34, 62, 118, .13);
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  transition: transform .17s cubic-bezier(.2, .8, .3, 1), box-shadow .17s, border-color .17s;
}
.game-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--accent); opacity: .9;
}
.game-card::after {
  content: ""; position: absolute; width: 54px; height: 54px; right: -27px; bottom: -27px;
  border-radius: 50%; background: var(--accent); opacity: .055;
}
.game-card:active { transform: translateY(-6px); }
.game-card.is-selected {
  transform: translateY(-13px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 13px 23px rgba(34, 62, 118, .22);
  z-index: 4;
}
.game-card.is-selected::before { height: 4px; }
.gc-corner {
  position: absolute; top: 7px; left: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  font-size: 8.5px; line-height: 1.05; font-weight: 700;
}
.gc-corner.red { color: #E95C64; }
.gc-corner.black { color: #33445F; }
.gc-type {
  position: absolute; top: 7px; right: 5px;
  padding: 1px 4px; border-radius: 3px;
  background: #F0F4FC; color: #98A7BC;
  font-size: 6.5px; line-height: 1.45; letter-spacing: .02em;
}
.gc-name {
  position: absolute; top: 29px; left: 0; right: 0;
  text-align: center;
  font-family: var(--serif); font-size: 31px; line-height: 1;
  color: var(--accent); letter-spacing: -.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.gc-name.long { font-size: 18px; letter-spacing: .01em; top: 35px; }
.gc-name.longer { font-size: 15px; top: 36px; letter-spacing: -.02em; }
.gc-desc {
  position: absolute; left: 6px; right: 6px; bottom: 6px;
  font-size: 6.8px; line-height: 1.35; color: #8D9CB2;
  text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-desc.one { -webkit-line-clamp: 1; }
.game-card.disabled { opacity: .62; }
.hand .game-card.disabled:active { transform: none; }

.action-bar {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  margin-top: 1px;
}
.ghost-btn {
  height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 12px;
  border: 1px solid #DCE6F6;
  background: #F7FAFF;
  color: #4C678E; font-size: 11px; font-weight: 600;
  transition: transform .12s, background .18s;
}
.ghost-btn:active { transform: scale(.97); background: #EDF3FD; }
.ghost-btn .mp-icon { width: 15px; height: 15px; }
.ghost-btn.wide { width: 100%; height: 46px; font-size: 12px; }
.use-btn {
  height: 42px; min-width: 82px; padding: 0 17px;
  border-radius: 12px;
  background: linear-gradient(120deg, #4C8CFF, #2C63DF);
  color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  box-shadow: 0 7px 14px rgba(61, 126, 255, .28);
  transition: transform .12s, opacity .18s, box-shadow .18s;
}
.use-btn:active { transform: scale(.96); }
.use-btn:disabled { opacity: .34; box-shadow: none; }
.use-btn.full { width: 100%; height: 48px; margin-top: 12px; }
.selected-info {
  text-align: center; font-size: 9px; line-height: 1.32; color: #94A3BA;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  max-height: 25px;
}
.selected-info span { color: #8A9BB5; }
.selected-info b { color: #385785; font-weight: 700; }
.selected-info em { font-style: normal; color: #D06868; }

/* ================= 结算 ================= */
#screen-result {
  background:
    radial-gradient(360px 300px at 50% 6%, rgba(120, 170, 255, .34), transparent 70%),
    radial-gradient(300px 260px at 100% 80%, rgba(255, 210, 130, .18), transparent 70%),
    linear-gradient(180deg, #F4F8FF 0%, #F2F6FD 55%, #F8FAFF 100%);
  overflow-y: auto;
}
.result-wrap {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(34px + var(--safe-top)) 24px calc(22px + var(--safe-bottom));
  width: 100%;
  min-height: 100%;
}
.result-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti {
  position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 2px; opacity: .55;
  animation: confettiFall 3.2s linear infinite;
}
.result-badge {
  position: relative;
  width: 74px; height: 74px; border-radius: 24px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #5B96FF, #2C63DF);
  box-shadow: 0 16px 30px rgba(51, 108, 229, .30);
  transform: rotate(-4deg);
  margin-bottom: 15px;
}
.result-badge::after {
  content: ""; position: absolute; inset: -7px; border-radius: 30px;
  border: 1px solid rgba(61, 126, 255, .25);
}
.result-badge .mp-icon { width: 38px; height: 38px; color: #fff; }
.result-badge.lose { background: linear-gradient(145deg, #AAB8CD, #7386A5); box-shadow: 0 16px 30px rgba(92, 108, 136, .25); }
.result-badge.lose::after { border-color: rgba(115, 134, 165, .25); }
.result-kicker { font-size: 8px; letter-spacing: .28em; font-weight: 700; color: #8FA2BF; }
.result-wrap h1 {
  margin-top: 5px;
  font-family: var(--serif); font-size: 36px; letter-spacing: .05em; color: #2355C7;
}
.result-wrap h1.lose { color: #677B9B; }
.result-desc { margin-top: 5px; font-size: 11px; color: #8495AF; }
.result-duel {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 20px 0 18px;
}
.result-fighter { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 82px; }
.result-fighter strong { font-size: 12px; margin-top: 3px; }
.result-fighter small { font-size: 9px; color: #99A8BF; }
.result-vs { font-family: var(--serif); font-size: 15px; color: #A3B2C9; font-weight: 700; letter-spacing: .08em; }
.result-stats {
  width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: 17px;
  box-shadow: var(--shadow-s); padding: 13px 4px;
}
.result-stats div { text-align: center; display: flex; flex-direction: column; gap: 2px; position: relative; }
.result-stats div + div::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: linear-gradient(transparent, #E6EDF9, transparent);
}
.result-stats span { font-size: 8.5px; color: #96A5BC; }
.result-stats strong { font-size: 18px; color: #244577; }
.reward-card {
  width: 100%; margin-top: 11px; padding: 6px 14px;
  background: linear-gradient(120deg, #FFF9EC, #FFFDF8 60%);
  border: 1px solid #F2E3BC; border-radius: 17px;
}
.reward-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.reward-line + .reward-line { border-top: 1px dashed #F0E2C3; }
.reward-ic {
  width: 31px; height: 31px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; background: #FFEFC9; color: #C4861D;
}
.reward-ic.blue { background: #EAF2FF; color: var(--blue); }
.reward-ic .mp-icon { width: 17px; height: 17px; }
.reward-line > div { display: flex; flex-direction: column; gap: 2px; }
.reward-line strong { font-size: 12.5px; color: #7C5714; }
.reward-line .blue + div strong { color: #2C5BB5; }
.reward-line small { font-size: 8.5px; color: #B19155; }
.reward-line .blue + div small { color: #8DA1C1; }
.result-wrap .cta { margin-top: 15px; }
.result-wrap .ghost-btn.wide { margin-top: 9px; background: rgba(255, 255, 255, .7); }

/* ================= 图鉴 ================= */
#screen-codex, #screen-records, #screen-settings {
  background:
    radial-gradient(320px 220px at 100% 0%, rgba(124, 170, 255, .20), transparent 65%),
    linear-gradient(180deg, #F4F8FF, #F2F6FD 55%, #F7FAFF);
}
.codex-tabs {
  flex: 0 0 auto;
  display: flex; gap: 5px;
  margin: 2px 16px 10px;
  padding: 4px;
  border-radius: 13px;
  background: #E8F0FC;
  border: 1px solid #DFE9F8;
}
.codex-tab {
  flex: 1; height: 34px; border-radius: 10px;
  font-size: 11.5px; font-weight: 600; color: #7890B2;
  transition: background .18s, color .18s, box-shadow .18s;
}
.codex-tab.is-active { background: #fff; color: var(--blue); box-shadow: 0 3px 9px rgba(37, 66, 120, .10); }
.codex-scroll { padding-top: 0; }
.codex-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 2px 8px;
}
.codex-section-head h2 { font-size: 12.5px; }
.codex-section-head span { font-size: 8.5px; color: #9AAAC2; }
.codex-general {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 11px;
  text-align: left;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-s);
  margin-bottom: 8px;
  transition: transform .12s;
}
.codex-general:active { transform: scale(.985); }
.codex-general .hero-avatar { width: 48px; height: 48px; border-radius: 14px; }
.codex-general-info { flex: 1; min-width: 0; }
.codex-general-info h3 { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.codex-general-info h3 span { font-size: 7.5px; font-weight: 600; color: var(--blue); background: #EAF2FF; padding: 1px 4px; border-radius: 4px; }
.codex-general-info p { font-size: 9.5px; line-height: 1.5; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.codex-general-info small { display: inline-block; margin-top: 4px; font-size: 8.5px; color: #A4B2C7; }
.codex-general > .mp-icon { width: 17px; height: 17px; color: #C3CEE0; flex: 0 0 auto; }
.codex-card-group { margin-bottom: 14px; }
.codex-card-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 3px 9px rgba(37, 66, 120, .05);
  margin-bottom: 7px;
}
.mini-card {
  position: relative; flex: 0 0 auto;
  width: 42px; height: 54px; border-radius: 7px;
  background: linear-gradient(165deg, #fff, #F3F7FF);
  border: 1px solid #DCE5F4;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 17px; color: var(--accent, #3D7EFF);
  box-shadow: 0 3px 7px rgba(37, 66, 120, .09);
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -.04em;
}
.mini-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent, #3D7EFF); }
.mini-card .mini-suit { position: absolute; top: 4px; right: 4px; font-size: 6.5px; color: #97A8C0; font-family: var(--font); }
.codex-card-info { flex: 1; min-width: 0; }
.codex-card-info h3 { font-size: 12px; display: flex; align-items: center; gap: 5px; }
.codex-card-info h3 span { font-size: 7.5px; padding: 1px 4px; border-radius: 4px; background: #F1F5FC; color: #8FA1BA; font-weight: 500; }
.codex-card-info p { margin-top: 2px; font-size: 9px; line-height: 1.45; color: var(--muted); }
.codex-card-count { flex: 0 0 auto; font-size: 9px; color: #9CABC0; }

/* ================= 战绩 ================= */
.records-scroll { padding-top: 0; }
.record-hero {
  position: relative;
  padding: 17px 16px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 90% 0%, rgba(140, 184, 255, .85), transparent 55%),
    linear-gradient(130deg, #4C8CFF, #2B60DA);
  box-shadow: 0 14px 28px rgba(51, 108, 229, .25);
  overflow: hidden;
}
.record-hero::after {
  content: ""; position: absolute; right: -30px; bottom: -50px; width: 130px; height: 130px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, .06);
}
.record-hero h2 { font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.record-hero p { font-size: 9.5px; color: rgba(255, 255, 255, .7); margin-top: 3px; }
.record-rate { display: flex; align-items: baseline; gap: 5px; margin-top: 12px; position: relative; z-index: 2; }
.record-rate strong { font-size: 32px; line-height: 1; letter-spacing: -.02em; }
.record-rate span { font-size: 11px; color: rgba(255, 255, 255, .75); }
.record-metrics { display: flex; gap: 16px; margin-top: 12px; position: relative; z-index: 2; }
.record-metrics div { display: flex; flex-direction: column; gap: 1px; }
.record-metrics b { font-size: 13px; }
.record-metrics small { font-size: 8px; color: rgba(255, 255, 255, .66); }
.record-list-head { display: flex; align-items: center; justify-content: space-between; margin: 15px 3px 8px; }
.record-list-head h2 { font-size: 12.5px; }
.record-list-head span { font-size: 8.5px; color: #9AAAC2; }
.record-tip { margin-top: 11px; }
.record-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; margin-bottom: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 3px 9px rgba(37, 66, 120, .05);
}
.record-result {
  width: 37px; height: 37px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px; font-weight: 700;
}
.record-result.win { color: #237D62; background: #E7F9F1; }
.record-result.lose { color: #8B99AE; background: #F1F4FA; }
.record-info { flex: 1; min-width: 0; }
.record-info h3 { font-size: 11.5px; display: flex; align-items: center; gap: 4px; }
.record-info h3 em { font-style: normal; color: #A2B0C5; font-weight: 500; }
.record-info p { font-size: 8.5px; color: #94A3BA; margin-top: 2px; }
.record-mode { font-size: 8px; color: #6A86AE; background: #EEF4FF; padding: 3px 7px; border-radius: 999px; flex: 0 0 auto; }
.empty-state {
  padding: 46px 24px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.empty-ic {
  width: 66px; height: 66px; border-radius: 22px;
  display: grid; place-items: center;
  background: #EAF2FF; color: #7FA5E8;
  margin-bottom: 4px;
}
.empty-ic .mp-icon { width: 31px; height: 31px; }
.empty-state h3 { font-size: 13px; }
.empty-state p { font-size: 9.5px; line-height: 1.6; color: var(--muted); max-width: 230px; }
.empty-state .use-btn { margin-top: 8px; height: 40px; }

/* ================= 任务中心 ================= */
.missions-scroll { padding-top: 0; }
.mission-hero {
  position: relative;
  padding: 17px 16px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 92% 0%, rgba(150, 192, 255, .9), transparent 55%),
    linear-gradient(130deg, #4C8CFF, #2B60DA);
  box-shadow: 0 14px 28px rgba(51, 108, 229, .25);
  overflow: hidden;
}
.mission-hero::after {
  content: ""; position: absolute; right: -32px; bottom: -52px; width: 132px; height: 132px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, .06);
}
.mission-kicker {
  position: relative; z-index: 2;
  font-size: 7.5px; font-weight: 700; letter-spacing: .24em;
  color: rgba(255, 255, 255, .62);
}
.mission-hero h2 { position: relative; z-index: 2; font-family: var(--serif); font-size: 22px; letter-spacing: .04em; margin-top: 2px; }
.mission-hero p { position: relative; z-index: 2; font-size: 9px; line-height: 1.6; color: rgba(255, 255, 255, .72); margin-top: 3px; max-width: 255px; }
.mission-hero-stats { display: flex; gap: 18px; margin-top: 13px; position: relative; z-index: 2; }
.mission-hero-stats div { display: flex; flex-direction: column; gap: 1px; }
.mission-hero-stats b { font-size: 17px; line-height: 1; }
.mission-hero-stats small { font-size: 8px; color: rgba(255, 255, 255, .66); }
.mission-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px;
  margin-top: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(37, 66, 120, .05);
  transition: border-color .18s, box-shadow .18s;
}
.mission-card.is-ready { border-color: #C9DDFF; box-shadow: 0 6px 16px rgba(61, 126, 255, .09); }
.mission-card.is-done { background: #FAFCFF; }
.mission-ic {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #EEF4FF; color: #5D8BE8;
}
.mission-ic .mp-icon { width: 18px; height: 18px; }
.mission-ic.won { background: #FFF6E5; color: #E8A23A; }
.mission-main { flex: 1; min-width: 0; }
.mission-main h3 { font-size: 11.5px; }
.mission-main p {
  font-size: 8.5px; line-height: 1.45; color: #93A3BA; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mission-progress {
  height: 4px; border-radius: 99px; background: #EEF3FB;
  overflow: hidden; margin-top: 6px;
}
.mission-progress span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #5B96FF, #3D7EFF);
  box-shadow: 0 0 6px rgba(61, 126, 255, .35);
}
.mission-sub { display: block; font-size: 7.5px; color: #9AAAC2; margin-top: 3px; }
.mission-claim {
  flex: 0 0 auto; height: 34px; padding: 0 11px;
  border-radius: 10px;
  background: linear-gradient(120deg, #4C8CFF, #2C63DF);
  color: #fff; font-size: 9.5px; font-weight: 700;
  box-shadow: 0 5px 11px rgba(61, 126, 255, .25);
  transition: transform .12s;
}
.mission-claim:active { transform: scale(.95); }
.mission-state {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 3px;
  height: 28px; padding: 0 8px;
  border-radius: 8px;
  background: #F3F6FC; color: #A0AFC5;
  font-size: 8px;
}
.mission-state .mp-icon { width: 12px; height: 12px; }
.mission-state.done { background: #E7F9F1; color: #2C9B78; }
.mission-foot {
  text-align: center; font-size: 8px; line-height: 1.6;
  color: #A9B5C8; margin: 14px 0 4px;
}

/* ================= 我的 ================= */
.settings-scroll { padding-top: 0; }
.profile-card {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 15px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  overflow: hidden;
}
.profile-card::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(61, 126, 255, .10), transparent 68%);
}
.profile-card .fighter-avatar { width: 54px; height: 54px; border-radius: 17px; font-size: 25px; }
.profile-info { flex: 1; min-width: 0; }
.profile-info h2 { font-size: 15px; }
.profile-info p { font-size: 9px; color: var(--muted); margin-top: 2px; }
.profile-coins { display: flex; align-items: center; gap: 3px; color: #A26F12; font-size: 13px; font-weight: 700; position: relative; z-index: 2; }
.profile-coins .mp-icon { width: 18px; height: 18px; color: #E8A23A; }
.xp-wrap { margin: 9px 3px 15px; }
.xp-meta { display: flex; justify-content: space-between; font-size: 8.5px; color: #94A3BA; margin-bottom: 4px; }
.xp-meta b { color: #5C7DA8; }
.xp-bar { height: 6px; border-radius: 99px; background: #E3ECFA; overflow: hidden; }
.xp-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5B96FF, #3D7EFF); box-shadow: 0 0 8px rgba(61, 126, 255, .4); }
.settings-group { margin-bottom: 12px; }
.settings-group-title { font-size: 8.5px; letter-spacing: .14em; font-weight: 700; color: #A2B0C4; margin: 0 4px 6px; }
.settings-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 3px 10px rgba(37, 66, 120, .05);
  overflow: hidden;
}
.setting-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 52px; padding: 9px 13px;
  text-align: left;
  border-bottom: 1px solid #F0F4FB;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row:active { background: #F8FAFE; }
.setting-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #EEF4FF; color: #5D8BE8;
}
.setting-ic .mp-icon { width: 16px; height: 16px; }
.setting-ic.gold { background: #FFF6E5; color: var(--gold); }
.setting-ic.red { background: #FFF0F0; color: #E66A6A; }
.setting-ic.green { background: #E9FAF3; color: var(--green); }
.setting-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting-tx strong { font-size: 11.5px; font-weight: 600; }
.setting-tx small { font-size: 8.5px; color: #9AA9C0; }
.setting-row > .mp-icon { width: 17px; height: 17px; color: #C2CCDC; }
.setting-value { font-size: 9.5px; color: #93A3BB; margin-right: 2px; }
.switch {
  position: relative; width: 40px; height: 23px; flex: 0 0 auto;
  border-radius: 99px; background: #DCE5F2; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(37, 66, 120, .2);
  transition: transform .2s;
}
.switch.on { background: var(--blue); }
.switch.on::after { transform: translateX(17px); }
.seg {
  display: flex; padding: 3px; gap: 3px; background: #EEF3FB; border-radius: 9px;
}
.seg button { padding: 4px 9px; border-radius: 6px; font-size: 8.5px; color: #8194B2; }
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 5px rgba(37, 66, 120, .10); font-weight: 700; }
.danger-btn {
  width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid #F6DADA; background: #FFF6F6; color: #D35A5A;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: transform .12s, background .18s;
}
.danger-btn:active { transform: scale(.98); background: #FFEDED; }
.danger-btn .mp-icon { width: 16px; height: 16px; }
.settings-foot { text-align: center; margin: 16px 0 4px; font-size: 8.5px; color: #A9B5C8; line-height: 1.7; }

/* ================= 弹层 ================= */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center; }
.modal.is-open { display: flex; }
.modal.center { align-items: center; padding: 20px; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(16, 28, 50, .46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
.response-sheet {
  position: relative; z-index: 2;
  width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  padding: 19px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 -18px 50px rgba(10, 24, 50, .25);
  animation: sheetUp .28s cubic-bezier(.2, .8, .3, 1);
}
.resp-head { display: flex; gap: 12px; align-items: flex-start; }
.resp-icon {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #FFF0F0; color: #E05E66;
  border: 1px solid #F9DFE1;
}
.resp-icon .mp-icon { width: 22px; height: 22px; }
.resp-copy { flex: 1; min-width: 0; }
.resp-kicker { font-size: 8px; letter-spacing: .16em; font-weight: 700; color: #E05E66; }
.resp-copy h3 { font-size: 16px; margin-top: 2px; letter-spacing: .01em; }
.resp-copy p { font-size: 10px; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.countdown { height: 4px; border-radius: 99px; background: #EEF3FB; overflow: hidden; margin: 13px 0; }
.countdown span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #5B96FF, #3D7EFF); }
.resp-cards { display: flex; gap: 7px; flex-wrap: wrap; min-height: 58px; margin-bottom: 13px; }
.resp-cards .game-card { width: 42px; height: 58px; border-radius: 7px; }
.resp-cards .game-card .gc-name { font-size: 17px; top: 18px; }
.resp-cards .game-card .gc-name.long { font-size: 10px; top: 21px; }
.resp-cards .game-card .gc-desc, .resp-cards .game-card .gc-type, .resp-cards .game-card .gc-corner { display: none; }
.resp-empty { font-size: 9.5px; color: #ABB8CB; align-self: center; }
.resp-card-count {
  align-self: center; margin-left: auto; font-size: 9.5px; color: #7A8DA9;
  background: #F2F6FD; padding: 4px 8px; border-radius: 7px;
}
.resp-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 9px; }
.resp-actions .ghost-btn, .resp-actions .use-btn { height: 48px; }

.modal-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  padding: 21px 18px;
  background: #fff; border-radius: 22px;
  box-shadow: 0 24px 60px rgba(10, 24, 50, .3);
  animation: cardIn .24s cubic-bezier(.2, .8, .3, 1);
}
.pause-card { text-align: center; }
.pause-seal {
  width: 58px; height: 58px; margin: 0 auto 11px; border-radius: 18px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 27px; color: #fff;
  background: linear-gradient(145deg, #5B96FF, #2C63DF);
  box-shadow: 0 9px 18px rgba(61, 126, 255, .28);
  transform: rotate(-4deg);
}
.pause-card h3 { font-size: 17px; }
.pause-card p { font-size: 10px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.pause-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.pause-actions .use-btn { height: 46px; }

.rules-sheet {
  position: relative; z-index: 2;
  width: 100%; max-width: 480px; max-height: 82dvh;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 -18px 50px rgba(10, 24, 50, .25);
  animation: sheetUp .28s cubic-bezier(.2, .8, .3, 1);
}
.sheet-handle { width: 34px; height: 4px; border-radius: 99px; background: #E2E9F4; margin: 0 auto 12px; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.sheet-head h3 { font-size: 17px; margin-top: 2px; }
.rules-body { overflow-y: auto; margin: 13px 0 6px; padding-right: 2px; scrollbar-width: none; }
.rules-body::-webkit-scrollbar { display: none; }
.rule-block { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #EEF2F9; }
.rule-block:last-of-type { border-bottom: 0; }
.rule-no {
  flex: 0 0 auto; width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 8.5px; font-weight: 700; color: var(--blue);
  background: #EEF4FF;
}
.rule-block h4 { font-size: 11.5px; margin-bottom: 2px; }
.rule-block p { font-size: 9.5px; line-height: 1.62; color: #7C8DA6; }
.rules-tip {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 10px 11px; margin: 9px 0 4px;
  border-radius: 11px; background: #FFF9EC; border: 1px solid #F4E7C5;
}
.rules-tip .mp-icon { width: 15px; height: 15px; color: #D09A2F; flex: 0 0 auto; margin-top: 1px; }
.rules-tip span { font-size: 9px; line-height: 1.6; color: #9B7A38; }
.confirm-card { text-align: center; }
.confirm-icon {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 11px;
  display: grid; place-items: center;
  background: #EEF4FF; color: #5D8BE8;
}
.confirm-icon .mp-icon { width: 26px; height: 26px; }
.confirm-icon.danger { background: #FFF0F0; color: #E05E66; }
.confirm-card h3 { font-size: 16px; }
.confirm-card p { font-size: 10px; line-height: 1.6; color: var(--muted); margin-top: 5px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.confirm-actions button { height: 44px; }

/* 复活选择 */
.revive-card { text-align: center; }
.revive-icon {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 10px;
  display: grid; place-items: center;
  background: #FFF0F0; color: #E05E66;
  border: 1px solid #F9DFE1;
}
.revive-icon .mp-icon { width: 26px; height: 26px; }
.revive-card h3 { font-size: 17px; }
.revive-card > p { font-size: 9.5px; line-height: 1.55; color: var(--muted); margin-top: 4px; }
.revive-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 11px;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid #DCE6F6;
  background: #F7FAFF;
  text-align: left;
  transition: transform .12s, background .18s;
}
.revive-opt:active { transform: scale(.985); background: #EDF3FD; }
.revive-opt.ad { background: linear-gradient(120deg, #EFF5FF, #F8FBFF); border-color: #C9DDFF; }
.revive-opt.coin { background: linear-gradient(120deg, #FFF9EC, #FFFDF7); border-color: #F0E1B8; }
.revive-opt:disabled { opacity: .56; }
.revive-opt-ic {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #EAF2FF; color: #3D7EFF;
}
.revive-opt-ic .mp-icon { width: 18px; height: 18px; }
.revive-opt.coin .revive-opt-ic { background: #FFF0C9; color: #C4861D; }
.revive-opt-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.revive-opt-tx strong { font-size: 11.5px; color: var(--ink); }
.revive-opt-tx small { font-size: 8.5px; color: #8DA1C1; }
.revive-opt-tx b { color: #B37A12; }
.revive-opt-tag {
  flex: 0 0 auto; padding: 3px 6px; border-radius: 6px;
  background: #EAF2FF; color: #3D7EFF;
  font-size: 8.5px; font-weight: 700;
}
.revive-opt.coin .revive-opt-tag { background: #FFF0C9; color: #A26F12; }
.revive-note { text-align: center; font-size: 8px; line-height: 1.5; color: #A9B5C8; margin-top: 10px; }
.revive-card .ghost-btn.wide { margin-top: 8px; }

.toast {
  position: fixed; top: calc(58px + var(--safe-top)); left: 50%;
  transform: translate(-50%, -8px);
  z-index: 120;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(23, 38, 64, .93);
  color: #fff; font-size: 10.5px; letter-spacing: .02em;
  box-shadow: 0 8px 22px rgba(10, 24, 50, .25);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 80%;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.result-tip {
  width: 100%;
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 12px; padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .68);
  border: 1px dashed #D9E5F7;
}
.result-tip .mp-icon { width: 15px; height: 15px; flex: 0 0 auto; color: #D09A2F; margin-top: 1px; }
.result-tip p { font-size: 9px; line-height: 1.6; color: #8495AF; }

/* ================= 激励视频 ================= */
.result-ad {
  width: 100%; margin-top: 11px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px dashed #C9D9F4;
  background: linear-gradient(120deg, #F5F9FF, #EDF4FF 65%, #F7F3FF);
  box-shadow: 0 4px 14px rgba(37, 66, 120, .07);
  text-align: left;
  transition: transform .12s, background .18s;
}
.result-ad:active { transform: scale(.985); background: #E9F1FF; }
.result-ad-ic {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #5B96FF, #2C63DF);
  box-shadow: 0 5px 12px rgba(61, 126, 255, .28);
}
.result-ad-ic .mp-icon { width: 18px; height: 18px; }
.result-ad-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.result-ad-tx strong { font-size: 11.5px; color: #2C5BB5; }
.result-ad-tx small { font-size: 8.5px; color: #8DA1C1; }
.result-ad-tag {
  flex: 0 0 auto; font-size: 7px; font-weight: 800; letter-spacing: .08em;
  color: #8A6AD9; background: #F2EEFF; border: 1px solid #E4DBFF;
  border-radius: 5px; padding: 2px 4px;
}

.ad-modal .modal-mask {
  background: rgba(8, 16, 32, .74);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.ad-card {
  width: 100%; max-width: 360px;
  padding: 14px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(180deg, #10203D, #172B4D 58%, #132444);
  border: 1px solid rgba(120, 170, 255, .24);
  box-shadow: 0 26px 70px rgba(4, 12, 28, .55);
}
.ad-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  font-size: 8.5px; color: rgba(255, 255, 255, .72);
  letter-spacing: .04em;
}
.ad-tag .mp-icon { width: 13px; height: 13px; color: #8FBBFF; }
.ad-head .icon-btn.tiny {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .82);
  box-shadow: none;
}
.ad-screen {
  position: relative; overflow: hidden;
  padding: 23px 16px 18px;
  border-radius: 17px;
  border: 1px solid rgba(120, 170, 255, .18);
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 140, 255, .55), transparent 62%),
    radial-gradient(circle at 100% 100%, rgba(139, 108, 246, .22), transparent 58%),
    linear-gradient(160deg, #183A78, #0E2144 70%);
  text-align: center;
}
.ad-aura {
  position: absolute; left: 50%; top: -110px; width: 260px; height: 260px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 178, 255, .35), transparent 65%);
  pointer-events: none;
}
.ad-sword {
  position: absolute; left: 50%; top: -6px; width: 2px; height: 150px;
  background: linear-gradient(transparent, rgba(170, 206, 255, .7), transparent);
  transform: rotate(38deg); opacity: .45; pointer-events: none;
}
.ad-brand { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ad-logo {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 24px;
  background: linear-gradient(145deg, #6BA0FF, #2C63DF);
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: 0 10px 22px rgba(12, 40, 100, .45);
  transform: rotate(-4deg);
}
.ad-brand strong { font-family: var(--serif); font-size: 20px; letter-spacing: .06em; margin-top: 3px; }
.ad-brand small { font-size: 8px; letter-spacing: .2em; color: rgba(255, 255, 255, .55); }
.ad-cards { display: flex; justify-content: center; gap: 7px; margin: 15px 0 11px; position: relative; }
.ad-mini-card {
  width: 38px; height: 52px; border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 20px;
  background: linear-gradient(165deg, #fff, #E8F1FF);
  box-shadow: 0 7px 16px rgba(3, 10, 24, .4);
  border-top: 2px solid currentColor;
}
.ad-mini-card.sha { color: #EF5B5B; transform: rotate(-7deg) translateY(2px); }
.ad-mini-card.shan { color: #3D7EFF; }
.ad-mini-card.tao { color: #2FB98A; transform: rotate(7deg) translateY(2px); }
.ad-slogan { font-size: 9px; color: rgba(255, 255, 255, .62); letter-spacing: .06em; }
.ad-progress {
  height: 6px; margin: 13px 2px 7px;
  border-radius: 99px; background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.ad-progress span {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5B96FF, #8FD0FF);
  transition: width .1s linear;
}
.ad-meta {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 0 2px; font-size: 8.5px; color: rgba(255, 255, 255, .56);
}
.ad-meta b { color: #FFD36E; font-weight: 600; text-align: right; }
.ad-card .use-btn {
  margin-top: 10px;
  background: linear-gradient(120deg, #4C8CFF, #2C63DF);
  box-shadow: 0 8px 18px rgba(40, 100, 230, .34);
}
.ad-card .use-btn:disabled { opacity: .4; box-shadow: none; }
.ad-skip {
  display: block; width: 100%;
  padding: 10px 0 2px;
  font-size: 9px; color: rgba(255, 255, 255, .45);
  text-align: center;
}
.ad-note { text-align: center; font-size: 8px; line-height: 1.5; color: rgba(255, 255, 255, .30); margin-top: 2px; }

/* ================= 动画 ================= */
@keyframes logIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes playPop {
  0% { opacity: 0; transform: translateY(30px) scale(.72) rotate(-4deg); }
  24% { opacity: 1; transform: translateY(-4px) scale(1.06) rotate(0deg); }
  68% { opacity: 1; transform: translateY(-9px) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-32px) scale(.94) rotate(2deg); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px) rotate(-.4deg); }
  36% { transform: translateX(5px) rotate(.4deg); }
  54% { transform: translateX(-3px); }
  72% { transform: translateX(3px); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); }
  22% { opacity: 1; transform: translate(-50%, -8px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes cardIn { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes confettiFall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  12% { opacity: .65; }
  100% { transform: translate3d(var(--drift, 20px), 105vh, 0) rotate(520deg); opacity: 0; }
}
@keyframes pulseRing {
  0% { transform: translate(-50%, -50%) scale(.9); opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}

/* ================= 小屏适配 ================= */
@media (max-height: 720px) {
  .hero { min-height: 210px; padding: 18px; }
  .hero h1 { font-size: 31px; margin: 10px 0 7px; }
  .hero p { font-size: 10.5px; }
  .hero-card { width: 82px; height: 118px; }
  .hero-card b { font-size: 36px; }
  .hero-card-red { top: 48px; }
  .hero-card-blue { top: 80px; }
  .mode-item { padding: 7px 9px; }
  .mode-icon { width: 30px; height: 30px; }
  .cta { min-height: 56px; }
  .battle-stage { min-height: 86px; }
  .hand { min-height: 100px; padding-top: 12px; }
  .game-card { width: 68px; height: 96px; }
  .gc-name { font-size: 28px; top: 26px; }
  .gc-desc { font-size: 6.2px; }
  .player-zone { padding-top: 8px; }
  .fighter { padding: 7px 9px; }
  .fighter-avatar { width: 44px; height: 44px; font-size: 20px; }
  .result-wrap { padding-top: calc(20px + var(--safe-top)); }
  .result-badge { width: 62px; height: 62px; border-radius: 20px; margin-bottom: 11px; }
  .result-badge .mp-icon { width: 32px; height: 32px; }
  .result-wrap h1 { font-size: 31px; }
  .result-duel { margin: 13px 0 12px; }
  .fighter-avatar.big { width: 58px; height: 58px; font-size: 27px; }
}
@media (max-width: 360px) {
  .hero-copy { width: 70%; }
  .hero-card { width: 78px; height: 112px; }
  .hero-card-red { right: -4px; }
  .hero-card-blue { right: 56px; top: 92px; }
  .hero-card b { font-size: 34px; }
  .hero-seal { right: 14px; width: 44px; height: 44px; font-size: 17px; }
  .quick-tx small { display: none; }
  .home-head .coin-chip { padding-right: 7px; }
  .brand-text strong { font-size: 16px; }
  .brand-text span { font-size: 6.5px; }
  .hand .game-card:not(:first-child) { margin-left: -12px; }
  .game-card { width: 68px; height: 96px; }
  .hand .game-card { width: 68px; height: 96px; }
  .hand .game-card .gc-name.long { font-size: 15px; }
  .hand .game-card .gc-name.longer { font-size: 12px; }
  .action-bar { gap: 6px; }
  .ghost-btn { padding: 0 9px; }
  .use-btn { min-width: 72px; padding: 0 13px; }
}

/* 战斗浮字与受击 */
.float-fx {
  position: fixed;
  z-index: 110;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .01em;
  animation: floatUp 1.02s cubic-bezier(.2, .8, .3, 1) forwards;
  text-shadow: 0 2px 8px rgba(255, 255, 255, .9), 0 4px 16px rgba(27, 53, 105, .22);
}
.float-fx.damage { color: #ED575F; }
.float-fx.heal { color: #23A97C; }
.player-strip.is-hit { animation: shake .38s ease; }

@media (max-width: 360px) {
  .hero-card-blue { display: none; }
  .hero-copy { width: 76%; }
}
