/* ===== 自然图鉴 · 极光主题（style5_aurora）=====
   卡面样式在 card.css（锁定，不在此修改）。这里只管页面外壳。 */
@font-face { font-family: 'NSans'; src: url(/fonts/sans.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --ink: rgba(255,255,255,.9); --ink2: rgba(255,255,255,.78); --mute: rgba(214,224,242,.66);
  --gold: #ffd77a; --ok: #6ee7b7; --bad: #f08a96;
  --a1: #3ee6c1; --a2: #5aa8ff; --a3: #a77bff;            /* 极光：青 → 蓝 → 紫 */
  --aurora: linear-gradient(100deg, #2fd3b4 0%, #3f9bea 45%, #8d6cf2 80%, #b48cff 100%);
  --glass: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.07) 55%, rgba(255,255,255,.10));
  --glass-base: rgba(22,34,70,.38);
  --edge: rgba(255,255,255,.22);
  --iri: linear-gradient(135deg, rgba(120,255,220,.55), rgba(255,255,255,.12) 35%, rgba(170,140,255,.55) 70%, rgba(110,200,255,.45));
  --line: rgba(255,255,255,.12);
  --sans: 'NSans', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; font-synthesis: none; }
html { background: #0b1430; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: var(--sans); font-weight: 400; }
body { background: transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
/* 卡面保持原样：恢复它原来继承的字体与颜色 */
.card { font-family: 'NSerif', 'Noto Serif SC', 'Songti SC', serif; color: #eef3ff; }

/* ---------- 背景：极光夜空 + 雪山（固定），星光闪烁与极光漂移 ---------- */
body::before { content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(6,12,32,.10) 0%, rgba(6,12,32,0) 30%, rgba(8,16,42,.18) 55%, rgba(10,20,50,.55) 70%, rgba(10,18,46,.72) 85%, rgba(9,16,40,.82) 100%),
    url(/img/aurora_bg.webp) center 40% / cover no-repeat, #0b1430; }
body::after { content: ''; position: fixed; inset: -10% -20% 30%; z-index: -2; pointer-events: none; opacity: .55; mix-blend-mode: screen;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent 60%), radial-gradient(1px 1px at 33% 8%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 58% 22%, #fff, transparent 60%), radial-gradient(1px 1px at 76% 12%, #fff, transparent 60%),
    radial-gradient(1.3px 1.3px at 88% 30%, #fff, transparent 60%), radial-gradient(1px 1px at 22% 38%, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 47% 44%, #fff, transparent 60%), radial-gradient(1px 1px at 68% 36%, #fff, transparent 60%),
    radial-gradient(60% 18% at 40% 78%, rgba(80,255,190,.10), transparent 70%),
    radial-gradient(50% 14% at 70% 70%, rgba(170,120,255,.10), transparent 70%);
  animation: twinkle 7s ease-in-out infinite alternate, drift 38s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }
@keyframes drift { from { transform: translate3d(-2%, 0, 0); } to { transform: translate3d(2%, 1%, 0); } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* ---------- 玻璃 ---------- */
.glass, .panel, .tile, .chip, .mvbtn, .offer, .filters button, .log, #nav, .top-pill, .daily, .close-x, #toast, .banner,
input[type=text], input[type=password], select, .btn.ghost, .btn.blue, .btn.red {
  background: var(--glass), var(--glass-base);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(4,10,30,.28);
}
/* 极淡的虹彩描边（用 mask 叠一层渐变边） */
.iri, .tile, .panel, .top-pill, .mvbtn, .offer, #nav, .banner, .daily { position: relative; }
.iri::before, .tile::before, .panel::before, .top-pill::before, .mvbtn::before, .offer::before, #nav::before, .banner::before, .daily::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--iri); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* ---------- 版式 ---------- */
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 64px 0 96px; }
#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 60px; max-width: 480px; margin: 0 auto; padding: 10px 16px 0; pointer-events: none; }
#topStats { display: flex; justify-content: space-between; align-items: center; pointer-events: auto; }
.top-pill { display: inline-flex; align-items: center; gap: 8px; min-width: 104px; height: 38px; padding: 0 14px 0 10px; border-radius: 99px; font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.top-pill svg { width: 22px; height: 22px; flex: none; }
.top-pill b { margin-left: auto; font-weight: 600; }
.top-pill small { font-size: 12px; font-weight: 500; color: var(--mute); }
#view { padding: 8px 16px 24px; }

h2 { font-family: 'Brush', serif; font-weight: 400; font-size: 34px; line-height: 1.15; margin: 6px 0 12px; color: #fff; letter-spacing: .04em;
  text-shadow: 0 0 14px rgba(150,230,255,.45), 0 0 2px rgba(255,255,255,.6); }
h3 { font-family: var(--sans); font-weight: 600; font-size: 15px; margin: 18px 0 8px; color: var(--ink); letter-spacing: .04em; }
h3::before { content: ''; display: inline-block; width: 3px; height: 13px; margin-right: 8px; border-radius: 3px; background: var(--aurora); vertical-align: -1px; }
.muted { color: var(--mute); font-size: 13px; line-height: 1.6; }
.row { display: flex; gap: 10px; align-items: center; }
.grid { display: grid; gap: 8px; }
.g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g2 { grid-template-columns: repeat(2, 1fr); }
.panel { border-radius: 18px; padding: 14px; }
label { font-size: 13px; color: var(--mute); display: block; margin: 12px 0 6px; font-weight: 500; }
input[type=text], input[type=password], select { width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; color: #fff; outline: none; font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
input::placeholder { color: rgba(214,224,242,.45); }
input:focus, select:focus { border-color: rgba(120,240,210,.7); box-shadow: 0 0 0 3px rgba(80,220,200,.18), inset 0 1px 0 rgba(255,255,255,.18); }
select option { background: #16264f; color: #fff; }
.tnum { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 按钮：极光药丸 / 玻璃药丸 ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 99px; padding: 0 22px; height: 46px; cursor: pointer;
  color: #fff; font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: .08em; white-space: nowrap; overflow: hidden; isolation: isolate;
  background: var(--aurora);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 1px 0 rgba(255,255,255,.55) inset, 0 6px 22px rgba(80,170,255,.35), 0 0 18px rgba(120,255,220,.22);
  text-shadow: 0 1px 2px rgba(10,20,60,.35); }
.btn::after { content: ''; position: absolute; left: 6%; right: 6%; top: 2px; height: 45%; border-radius: 99px; z-index: -1; background: linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,0)); pointer-events: none; }
.btn:active { transform: translateY(1px) scale(.99); filter: brightness(1.05); }
.btn.blue, .btn.ghost, .btn.red { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 18px rgba(4,10,30,.25); text-shadow: none; }
.btn.blue { border-color: rgba(120,230,220,.45); background: linear-gradient(100deg, rgba(47,211,180,.22), rgba(141,108,242,.22)), var(--glass-base); }
.btn.ghost::after, .btn.blue::after, .btn.red::after { opacity: .35; }
.btn.red { color: #ffd6db; border-color: rgba(240,120,140,.42); background: linear-gradient(160deg, rgba(240,110,130,.22), rgba(150,40,70,.18)), var(--glass-base); }
.btn[disabled] { opacity: .42; pointer-events: none; filter: saturate(.5); }
.btn small { font-weight: 500; font-size: 12px; opacity: .9; letter-spacing: 0; display: inline-flex; align-items: center; gap: 2px; }
.btn small svg { width: 13px; height: 13px; }
.btn.big { height: 58px; font-size: 22px; letter-spacing: .18em; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 99px; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.chip b { font-weight: 600; }
.ico { width: 24px; height: 24px; flex: none; }
.ico-aur { stroke: url(#aurG); }

/* ---------- 底部导航 ---------- */
#nav { position: fixed; bottom: 10px; left: 12px; right: 12px; z-index: 20; height: 66px; max-width: 456px; margin: 0 auto; border-radius: 24px;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4px; margin-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.07)), rgba(18,28,62,.55); }
#nav a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--mute); letter-spacing: .06em; }
#nav a svg { width: 24px; height: 24px; transition: transform .2s; }
#nav a.on { color: #fff; font-weight: 600; }
#nav a.on svg { stroke: url(#aurG); filter: drop-shadow(0 0 6px rgba(110,240,210,.75)); transform: translateY(-1px); }
#nav a.on::before { content: ''; position: absolute; inset: 7px 10%; border-radius: 16px; z-index: -1;
  background: radial-gradient(80% 90% at 50% 40%, rgba(90,230,200,.28), rgba(150,110,255,.16) 60%, transparent 85%); box-shadow: inset 0 0 0 1px rgba(150,240,230,.22); }
#nav a.on::after { content: ''; position: absolute; bottom: 4px; width: 18px; height: 3px; border-radius: 3px; background: var(--aurora); box-shadow: 0 0 8px rgba(110,240,210,.8); }

/* ---------- 登录 ---------- */
.auth { padding-top: 0; }
.auth .title { margin-top: 2px; }
.auth .hero { width: 50%; max-width: 220px; margin: 2px auto 18px; filter: drop-shadow(0 18px 30px rgba(2,8,30,.55)); }
.auth .tabs { display: flex; gap: 10px; margin: 16px 0 4px; }
.auth .tabs button { flex: 1; }

/* ---------- 首页 ---------- */
.title { font-family: 'Brush', serif; font-weight: 400; text-align: center; font-size: 62px; line-height: 1; margin: 4px 0 18px; letter-spacing: .06em; color: #fff;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 55%, #cfe3f6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(160,230,255,.45)) drop-shadow(0 2px 4px rgba(4,10,30,.5)); }
.home-hero { width: 54%; max-width: 230px; margin: 0 auto; filter: drop-shadow(0 20px 34px rgba(2,8,30,.6)) drop-shadow(0 0 22px rgba(120,220,255,.18)); }
.home-hero .card { cursor: pointer; }
.home-cta { display: flex; width: 74%; max-width: 300px; margin: 20px auto 0; }
.home-meta { text-align: center; margin: 10px 0 0; font-size: 12.5px; color: var(--mute); }
.home-meta b { color: #fff; font-weight: 600; }
.home-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 16px; }
.tile { grid-column: span 3; border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; min-height: 76px; color: var(--ink); }
.tile.sm { grid-column: span 2; flex-direction: column; justify-content: center; gap: 4px; text-align: center; padding: 14px 6px 12px; min-height: 104px; }
.tile svg { width: 34px; height: 34px; stroke: rgba(240,248,255,.92); filter: drop-shadow(0 0 6px rgba(120,230,255,.25)); }
.tile.sm svg { width: 32px; height: 32px; margin-bottom: 2px; }
.tile b { display: block; font-size: 17px; font-weight: 600; letter-spacing: .12em; color: #fff; }
.tile span { display: block; font-size: 11.5px; color: var(--mute); margin-top: 2px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile .tx { min-width: 0; }
.tile:not(.sm) span { white-space: normal; line-height: 1.4; }
.tile:active { transform: scale(.985); }
.daily { margin-top: 12px; padding: 10px 14px; border-radius: 16px; font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.daily svg { width: 18px; height: 18px; flex: none; }
.home-links { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.home-links .btn { height: 38px; font-size: 13px; padding: 0 16px; letter-spacing: .06em; }

/* ---------- 抽卡 ---------- */
.banner { border-radius: 22px; overflow: hidden; min-height: 210px; padding: 18px; }
.banner .bimg { position: absolute; right: -6%; top: 0; bottom: 0; width: 64%; background: url(/img/art/panda.webp) 50% 25% / cover no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%); mask: linear-gradient(90deg, transparent, #000 45%); opacity: .95; }
.banner > :not(.bimg) { position: relative; }
.banner .kick { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .14em; padding: 3px 10px; border-radius: 99px; background: var(--aurora); color: #fff; }
.banner h2 { margin: 8px 0 0; font-size: 34px; }
.banner .rates { margin-top: 6px; font-size: 12px; color: var(--ink2); line-height: 1.75; text-shadow: 0 1px 4px rgba(4,10,30,.7); }
.banner .chip { margin-top: 10px; }
.pull-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pull-btns .btn { height: 52px; font-size: 17px; }
.pity-bar { height: 8px; border-radius: 9px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 10px; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.pity-bar i { display: block; height: 100%; border-radius: 9px; background: var(--aurora); box-shadow: 0 0 10px rgba(110,240,210,.7); }
.reveal { position: fixed; inset: 0; z-index: 50; overflow-y: auto; padding: 22px 14px 28px;
  background: radial-gradient(90% 60% at 50% 30%, rgba(60,200,180,.20), transparent 70%), radial-gradient(80% 50% at 60% 70%, rgba(150,110,255,.22), transparent 70%), rgba(6,12,34,.62);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.reveal.gold { background: radial-gradient(90% 60% at 50% 32%, rgba(255,205,110,.34), transparent 70%), radial-gradient(80% 50% at 60% 70%, rgba(150,110,255,.22), transparent 70%), rgba(10,12,30,.62); }
.reveal h2 { text-align: center; margin-bottom: 16px; }
.rv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; max-width: 480px; margin: 0 auto; padding: 12px 10px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.rv-grid.one { grid-template-columns: 1fr; max-width: 260px; padding: 18px; }
.flip { perspective: 900px; position: relative; }
.flip-in { position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); transform: rotateY(180deg); }
.flip.open .flip-in { transform: rotateY(0deg); }
.flip .face, .flip .bk { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .bk { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip::after { content: ''; position: absolute; inset: -6%; border-radius: 12%; z-index: -1; opacity: 0; transition: opacity .6s; background: radial-gradient(closest-side, var(--glow), transparent); }
.flip.open::after { opacity: .9; animation: pulse 1.6s ease-in-out infinite; }
.flip.big.open::after { inset: -16%; }
@keyframes pulse { 50% { opacity: .45; } }
.flip .tag { position: absolute; top: -7px; right: -5px; z-index: 3; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 99px; background: var(--aurora); color: #fff; opacity: 0; transition: opacity .3s .6s; box-shadow: 0 0 8px rgba(110,240,210,.6); }
.flip.open .tag { opacity: 1; }
.flip .tag.shard { background: rgba(30,44,86,.85); border: 1px solid rgba(255,255,255,.3); box-shadow: none; font-weight: 500; }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 60; background: radial-gradient(circle, rgba(255,225,150,.85), rgba(120,240,210,.25) 35%, transparent 62%); animation: burst 1s ease-out forwards; }
@keyframes burst { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(2.2); } }
.rv-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.rv-actions .btn { min-width: 130px; }

/* ---------- 图鉴 ---------- */
.dex-head { display: flex; justify-content: space-between; align-items: center; }
.dex-head .chip { font-size: 13px; }
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.dex-item { position: relative; cursor: pointer; }
.dex-item .star-chip { position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; z-index: 2; font-size: 10px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--aurora); color: #fff; white-space: nowrap; box-shadow: 0 0 8px rgba(110,240,210,.5); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px 2px; padding-left: 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13px; color: var(--ink2); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.filters button.on { color: #fff; font-weight: 600; border-color: rgba(160,250,230,.6); background: linear-gradient(100deg, rgba(47,211,180,.55), rgba(141,108,242,.55)); box-shadow: 0 0 14px rgba(110,240,210,.35), inset 0 1px 0 rgba(255,255,255,.35); }

/* ---------- 弹窗 / 卡片详情 ---------- */
#modal { position: fixed; inset: 0; z-index: 70; overflow-y: auto; padding: 14px 14px 32px; background: rgba(5,10,28,.62); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.detail { max-width: 420px; margin: 0 auto; }
.detail .card { margin: 0 auto; width: 100%; }
.detail > .card { filter: drop-shadow(0 18px 30px rgba(2,8,30,.55)); }
.info { margin-top: 14px; }
.info table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.info td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.info tr:last-child td { border-bottom: 0; }
.info td:first-child { color: var(--mute); width: 30%; white-space: nowrap; }
.info .btn { height: 36px; font-size: 14px; padding: 0 18px; }
.badge-iucn { display: inline-block; padding: 1px 8px; border-radius: 99px; font-weight: 700; font-size: 11px; color: #fff; }
.iucn-LC { background: #3f9a6a; } .iucn-NT { background: #82a83e; } .iucn-VU { background: #c99520; } .iucn-EN { background: #d8692b; } .iucn-CR { background: #cc3a4a; } .iucn-EW, .iucn-EX { background: #444; }
.close-x { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.src { font-size: 11px; color: var(--mute); line-height: 1.6; margin-bottom: 0; }

/* ---------- 编队 ---------- */
.team-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.slot { aspect-ratio: 1062/1482; border-radius: 14px; border: 1.5px dashed rgba(180,240,240,.35); display: grid; place-items: center; color: var(--mute); font-size: 12px; position: relative; background: rgba(255,255,255,.05); }
.slot .card { position: absolute; inset: 0; }
.slot .n { position: absolute; top: -9px; left: -6px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; background: var(--aurora); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; box-shadow: 0 0 8px rgba(110,240,210,.6); }
.pick { opacity: .5; transition: opacity .2s; } .pick.sel { opacity: 1; outline: 2px solid rgba(140,250,225,.9); outline-offset: 2px; border-radius: 8px; box-shadow: 0 0 14px rgba(110,240,210,.5); }

/* ---------- 对战 ---------- */
.lobby .btn { width: 100%; margin-top: 10px; }
.lobby .row .btn { width: auto; margin-top: 0; flex: none; }
.code-big { font-weight: 700; font-size: 40px; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums;
  background: var(--aurora); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px rgba(110,240,210,.4)); }
.bt { display: grid; gap: 7px; }
.side { display: grid; grid-template-columns: 25% 1fr; gap: 12px; align-items: start; padding: 8px 10px; border-radius: 18px; background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), rgba(18,28,62,.30); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.side.me { grid-template-columns: 1fr 27%; }
.side .card { width: 100%; }
.binfo { font-size: 12px; min-width: 0; }
.binfo .nm { font-family: 'Brush', serif; font-size: 24px; line-height: 1.1; color: #fff; text-shadow: 0 0 10px rgba(150,230,255,.4); }
.binfo .hpn { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink); }
.hpbar { height: 9px; border-radius: 9px; background: rgba(255,255,255,.12); overflow: hidden; margin: 6px 0 4px; box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.hpbar i { display: block; height: 100%; border-radius: 9px; background: var(--aurora); box-shadow: 0 0 8px rgba(110,240,210,.6); transition: width .5s; }
.hpbar i.mid { background: linear-gradient(90deg, #f3c96b, #c49bff); box-shadow: 0 0 8px rgba(243,201,107,.5); } .hpbar i.low { background: linear-gradient(90deg, #f06a7e, #b47cff); box-shadow: 0 0 8px rgba(240,106,126,.55); }
.pips { display: flex; gap: 4px; margin: 4px 0; }
.pips span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.pips span.on { background: radial-gradient(circle at 35% 30%, #fff, #6ff0d2 55%, #7b8cff); border-color: rgba(180,255,240,.9); box-shadow: 0 0 6px rgba(110,240,210,.8); }
.status { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.status em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); }
.status em.poi { background: rgba(140,70,190,.55); } .status em.stn { background: rgba(190,140,40,.55); } .status em.shd { background: rgba(50,120,190,.55); } .status em.wk { background: rgba(170,60,70,.55); }
.bench { display: flex; gap: 6px; margin-top: 8px; }
.bench .bm { width: 34px; border-radius: 9px; overflow: hidden; position: relative; border: 1.5px solid rgba(255,255,255,.3); }
.bench .bm img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.bench .bm .bhp { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.5); }
.bench .bm .bhp i { display: block; height: 100%; background: var(--aurora); }
.bench .bm.ko { filter: grayscale(1) brightness(.5); }
.bench .bm.can { border-color: rgba(140,250,225,.95); box-shadow: 0 0 10px rgba(110,240,210,.6); cursor: pointer; }
.log { height: 76px; overflow-y: auto; font-size: 12px; line-height: 1.6; padding: 9px 12px; border-radius: 16px; color: var(--ink2); }
.log p { margin: 0; } .log p.turn { color: #9ff3dd; font-weight: 600; }
.turnbar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink2); padding: 0 2px; }
.timer { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; padding: 3px 12px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #b9fbe9; }
.timer:empty { display: none; }
.timer.warn { color: #ffd0d6; border-color: rgba(240,120,140,.5); background: rgba(240,110,130,.2); }
.acts { display: grid; gap: 8px; padding: 10px; }
.mvbtn { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 6px 14px; border-radius: 16px; color: var(--ink); cursor: pointer; min-height: 50px; }
.mvbtn:not([disabled]):active { transform: scale(.99); }
.mvbtn:not([disabled]) { border-color: rgba(140,240,225,.45); }
.mvbtn .mn { font-family: 'Brush', serif; font-size: 22px; line-height: 1.05; color: #fff; }
.mvbtn .mt { font-size: 11px; color: var(--mute); line-height: 1.45; margin-top: 2px; }
.mvbtn .md { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, #9ff3dd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mvbtn .cost { display: flex; gap: 3px; } .mvbtn .cost span { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #6ff0d2 55%, #7b8cff); box-shadow: 0 0 5px rgba(110,240,210,.6); }
.mvbtn[disabled] { opacity: .5; }
.acts .row .btn { flex: 1; padding: 0 8px; height: 42px; font-size: 14px; letter-spacing: .04em; }
.result { text-align: center; padding: 18px 0; }
.result .big { font-family: 'Brush', serif; font-size: 64px; line-height: 1.2; }
.result .big.win { background: linear-gradient(180deg, #fff6d6, #ffd36a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 16px rgba(255,205,90,.6)); }
.result .big.lose { color: #c9d6f0; text-shadow: 0 0 14px rgba(150,180,255,.4); }
.result .btn { min-width: 160px; }

/* ---------- 交易 ---------- */
.offer { display: grid; grid-template-columns: 46px auto 46px 1fr auto; gap: 8px; align-items: center; padding: 10px; border-radius: 18px; margin-bottom: 10px; }
.offer img { width: 46px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; border: 2px solid var(--tc, #8b9ab3); }
.offer .arrow { display: grid; place-items: center; } .offer .arrow svg { width: 18px; height: 18px; }
.offer .who { font-size: 12px; line-height: 1.5; min-width: 0; color: var(--ink2); } .offer .who b { font-family: 'Brush', serif; font-weight: 400; font-size: 18px; color: #fff; }
.offer .btn { height: 36px; padding: 0 14px; font-size: 13px; letter-spacing: .04em; }
.tc-N { --tc: #aab4c3; } .tc-R { --tc: #50c882; } .tc-SR { --tc: #6ebeff; } .tc-SSR { --tc: #f0b43c; } .tc-UR { --tc: #eb3c46; }
.hist { padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); margin-bottom: 6px; font-size: 12.5px; color: var(--mute); }

/* ---------- 排行 & 概率 ---------- */
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rank td, table.rank th { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.rank tr:last-child td { border-bottom: 0; }
table.rank th { color: var(--mute); font-weight: 500; font-size: 12px; }
table.rank td.n { font-weight: 700; font-variant-numeric: tabular-nums; }
table.rank .me td { color: #fff; } table.rank .me td.n:first-child { color: #9ff3dd; }
table.rank tr.me { background: linear-gradient(90deg, rgba(47,211,180,.18), rgba(141,108,242,.14)); }
.rk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.rk.r1 { background: var(--aurora); border-color: rgba(255,255,255,.5); box-shadow: 0 0 10px rgba(110,240,210,.55); }
.odds { width: 100%; border-collapse: collapse; }
.odds td, .odds th { padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; vertical-align: top; line-height: 1.55; }
.odds th { color: var(--mute); font-weight: 500; font-size: 12px; }
.odds td:nth-child(2) { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: #b9fbe9; }
.odds td:first-child { white-space: nowrap; }
.odds .muted { font-size: 11.5px; }

#toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 90; padding: 10px 18px; border-radius: 99px; font-size: 14px; max-width: 86%; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.07)), rgba(14,22,52,.75); }
#toast[hidden], #modal[hidden] { display: none; }

@media (min-width: 700px) {
  #view { padding-top: 16px; }
  .title { font-size: 72px; }
}

/* 对战信息区：替补缩略图放在右侧，压缩高度，让招式与认输按钮在一屏内 */
.binfo { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; }
.binfo > :nth-child(-n+3) { grid-column: 1 / -1; }
.binfo .bench { grid-column: 2; grid-row: 4 / span 3; margin-top: 0; align-self: start; }
.binfo .bench:empty { display: none; }
@media (min-aspect-ratio: 1/1) { body::before { background-position: 0 0, center 78%; } }
