/* ============ 宝可梦·宝石 UI ============ */
:root {
  --ruby: #e63946; --ruby-d: #c1121f;
  --ink: #1d2430; --ink2: #48536b;
  --paper: rgba(255,255,255,.92);
  --glass: rgba(252,254,255,.88);
  --line: rgba(29,36,48,.10);
  --gold: #f4b942;
  --r-lg: 22px; --r-md: 14px; --r-sm: 9px;
  --shadow: 0 12px 40px rgba(20,30,60,.18), 0 2px 8px rgba(20,30,60,.10);
  font-size: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a1020; }
body { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif; color: var(--ink); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

/* ---------- 载入 ---------- */
#boot { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg,#8fd3ff 0%,#cfeaff 38%,#eafff2 70%,#fff8e8 100%); transition: opacity .6s; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; }
.boot-ball { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; position: relative;
  background: linear-gradient(180deg, var(--ruby) 0 46%, #222 46% 54%, #fff 54% 100%);
  box-shadow: 0 14px 34px rgba(30,60,120,.25); animation: ballspin 1.6s ease-in-out infinite; }
.boot-ball-core { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%,-50%);
  background: #fff; border: 5px solid #222; border-radius: 50%; }
@keyframes ballspin { 0%,100% { transform: rotate(-14deg) translateY(0); } 50% { transform: rotate(14deg) translateY(-10px); } }
#boot h1 { font-size: 44px; letter-spacing: 10px; color: var(--ink); font-weight: 800; }
#boot h1 span { color: var(--ruby); }
.boot-sub { margin-top: 6px; letter-spacing: 5px; font-size: 12px; color: var(--ink2); }
.boot-bar { width: 300px; height: 8px; margin: 26px auto 10px; background: rgba(255,255,255,.7); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.12); }
#boot-fill { width: 0%; height: 100%; border-radius: 6px; background: linear-gradient(90deg,var(--ruby),#ff8fa3); transition: width .25s; }
#boot-tip { font-size: 13px; color: var(--ink2); }

/* ---------- 标题 ---------- */
#title { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7vh;
  background: linear-gradient(180deg, rgba(10,20,40,0) 55%, rgba(10,20,40,.34) 100%); }
.title-card { text-align: center; animation: rise .8s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.title-logo { font-size: 64px; font-weight: 900; letter-spacing: 6px; color: #fff;
  text-shadow: 0 4px 0 rgba(180,30,50,.9), 0 10px 34px rgba(10,30,70,.5); }
.title-logo .gem { background: linear-gradient(135deg,#ff5d73,#ffb26b 55%,#ffe37e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 0 rgba(120,20,40,.85)); }
.title-sub { margin: 8px 0 26px; color: rgba(255,255,255,.92); letter-spacing: 10px; font-size: 14px; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.title-buttons { display: flex; flex-direction: column; gap: 12px; width: 320px; margin: 0 auto; }
.tbtn { padding: 14px 20px; border-radius: 999px; font-size: 17px; letter-spacing: 4px; font-weight: 700;
  background: var(--glass); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(10px); transition: transform .15s, box-shadow .15s; }
.tbtn:hover { transform: translateY(-2px) scale(1.02); }
.tbtn.primary { background: linear-gradient(135deg,var(--ruby),#ff5d73); color: #fff; }
.title-hint { margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.85); letter-spacing: 1px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* ---------- HUD 通用 ---------- */
#ui-root { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
#ui-root > * { pointer-events: auto; }
.hud-chip { background: var(--glass); border-radius: var(--r-md); box-shadow: var(--shadow); backdrop-filter: blur(12px); }

/* 左上: 时间/天气/位置 */
#hud-env { position: absolute; top: 16px; left: 16px; padding: 10px 16px; display: flex; align-items: center; gap: 12px; pointer-events: none !important; }
#hud-env .env-icon { font-size: 24px; line-height: 1; }
#hud-env .env-main { font-size: 15px; font-weight: 800; letter-spacing: 1px; }
#hud-env .env-sub { font-size: 11.5px; color: var(--ink2); margin-top: 2px; letter-spacing: .5px; }

/* 左下: 队伍栏 */
#hud-party { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 7px; pointer-events: none !important; }
.pslot { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--glass); box-shadow: 0 4px 16px rgba(20,30,60,.14); backdrop-filter: blur(10px); width: 172px; transition: transform .2s; }
.pslot.lead { outline: 2.5px solid var(--gold); }
.pslot.fainted { filter: grayscale(1); opacity: .65; }
.pslot img { width: 34px; height: 34px; image-rendering: pixelated; }
.pslot .pmeta { flex: 1; min-width: 0; }
.pslot .pname { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; display: flex; justify-content: space-between; }
.pslot .pname .plv { color: var(--ink2); font-weight: 600; margin-left: 4px; }
.pslot .pbar { height: 5px; margin-top: 3px; background: rgba(29,36,48,.12); border-radius: 4px; overflow: hidden; }
.pslot .pbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg,#37d67a,#7ff0ae); transition: width .3s; }
.pslot .pbar i.mid { background: linear-gradient(90deg,#f4b942,#ffe37e); }
.pslot .pbar i.low { background: linear-gradient(90deg,#e63946,#ff8fa3); }

/* 右上: 任务追踪 */
#hud-quest { position: absolute; top: 16px; right: 16px; width: 252px; padding: 12px 16px; pointer-events: none !important; }
#hud-quest .q-tag { font-size: 10.5px; letter-spacing: 2px; color: var(--ruby); font-weight: 800; }
#hud-quest .q-name { font-size: 14.5px; font-weight: 800; margin: 3px 0 2px; }
#hud-quest .q-desc { font-size: 12px; color: var(--ink2); line-height: 1.5; }

/* 底部中央: 交互提示 */
#hud-prompt { position: absolute; left: 50%; bottom: 130px; transform: translateX(-50%); padding: 10px 22px;
  font-size: 15px; font-weight: 700; letter-spacing: 1px; pointer-events: none !important; }
#hud-prompt b { color: var(--ruby); font-weight: 900; margin: 0 2px; }
/* 按键胶囊 */
kbd { display: inline-block; min-width: 22px; text-align: center; padding: 2px 7px; margin: 0 3px; border-radius: 7px;
  background: var(--ink); color: #fff; font-family: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 2px 0 rgba(0,0,0,.35); }

/* 右下: 控制提示 */
#hud-keys { position: absolute; right: 16px; bottom: 16px; padding: 10px 14px; font-size: 11.5px; color: var(--ink2); line-height: 1.9; pointer-events: none !important; }

/* 目标精灵信息板 */
#hud-target { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
#hud-target .t-name { font-size: 16px; font-weight: 800; }
#hud-target .t-name .shiny { color: var(--gold); }
#hud-target .t-lv { font-size: 13px; color: var(--ink2); font-weight: 700; }

/* 准星 */
#reticle { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; pointer-events: none !important; opacity: 0; transition: opacity .15s; }
#reticle.on { opacity: 1; }
#reticle svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 4px rgba(0,0,0,.4)); }

/* 体力环 */
#stamina { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); width: 52px; height: 52px; pointer-events: none !important; opacity: 0; transition: opacity .25s; }
#stamina.on { opacity: 1; }

/* ---------- 吐司/公告 ---------- */
#toasts { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none !important; }
.toast { padding: 10px 24px; border-radius: 999px; background: rgba(23,30,45,.88); color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: 1px; box-shadow: var(--shadow); animation: toastin .3s ease both; backdrop-filter: blur(8px); }
.toast.gold { background: linear-gradient(135deg,#b8860b,#f4b942); }
@keyframes toastin { from { opacity: 0; transform: translateY(-12px) scale(.92); } }
.announce { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); font-size: 34px; font-weight: 900; letter-spacing: 8px;
  color: #fff; text-shadow: 0 3px 0 rgba(150,30,50,.8), 0 10px 30px rgba(0,0,0,.45); animation: annc 2.6s ease both; pointer-events: none !important; white-space: nowrap; }
@keyframes annc { 0% { opacity: 0; transform: translateX(-50%) scale(.8); } 12% { opacity: 1; transform: translateX(-50%) scale(1.06); } 20% { transform: translateX(-50%) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 对话框 ---------- */
#dialog { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(720px, 92vw);
  padding: 18px 26px 16px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
#dialog .d-name { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--ruby); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: 2px; margin-bottom: 8px; }
#dialog .d-text { font-size: 16.5px; line-height: 1.75; min-height: 56px; letter-spacing: .4px; }
#dialog .d-next { position: absolute; right: 22px; bottom: 12px; font-size: 12px; color: var(--ink2); animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
#dialog .d-opts { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.d-opt { padding: 9px 20px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-size: 14.5px; font-weight: 700; transition: all .15s; }
.d-opt:hover, .d-opt.sel { border-color: var(--ruby); background: #fff2f3; color: var(--ruby-d); }

/* ---------- 大菜单 ---------- */
#menu { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(16,24,40,.42); backdrop-filter: blur(6px); }
.menu-panel { width: min(1060px, 94vw); height: min(660px, 88vh); border-radius: 26px; background: linear-gradient(165deg,#fdfeff 0%,#f2f7ff 100%);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: menuin .28s ease both; }
@keyframes menuin { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.menu-tabs { display: flex; gap: 4px; padding: 14px 18px 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.6); }
.mtab { padding: 11px 22px; border-radius: 14px 14px 0 0; font-size: 15px; font-weight: 800; letter-spacing: 2px; color: var(--ink2); background: transparent; }
.mtab.on { color: var(--ruby-d); background: #fff; box-shadow: 0 -4px 14px rgba(20,30,60,.06); }
.menu-body { flex: 1; overflow: auto; padding: 20px 24px; }
.menu-foot { padding: 10px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink2); background: rgba(255,255,255,.65); }

/* 队伍页 */
.party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pcard { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 4px 18px rgba(20,30,60,.08); border: 2px solid transparent; cursor: pointer; transition: all .15s; position: relative; }
.pcard:hover { border-color: #ffb3bc; transform: translateY(-2px); }
.pcard.lead::after { content: '首发'; position: absolute; top: -9px; left: 14px; background: var(--gold); color: #5a3a00; font-size: 11px; font-weight: 900; padding: 2px 10px; border-radius: 999px; letter-spacing: 2px; }
.pcard.fainted { opacity: .6; }
.pcard img { width: 74px; height: 74px; image-rendering: pixelated; align-self: center; }
.pcard .pc-body { flex: 1; }
.pcard .pc-top { display: flex; justify-content: space-between; align-items: baseline; }
.pcard .pc-name { font-size: 17px; font-weight: 800; }
.pcard .pc-name .shiny { color: var(--gold); }
.pcard .pc-lv { font-size: 13px; font-weight: 800; color: var(--ink2); }
.pcard .pc-hpbar { height: 8px; margin: 8px 0 4px; background: rgba(29,36,48,.1); border-radius: 6px; overflow: hidden; }
.pcard .pc-hpbar i { display: block; height: 100%; background: linear-gradient(90deg,#37d67a,#7ff0ae); border-radius: 6px; }
.pcard .pc-hpbar i.mid { background: linear-gradient(90deg,#f4b942,#ffe37e); }
.pcard .pc-hpbar i.low { background: linear-gradient(90deg,#e63946,#ff8fa3); }
.pcard .pc-hptext { font-size: 11.5px; color: var(--ink2); display: flex; justify-content: space-between; }
.pcard .pc-status { font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 6px; color: #fff; margin-left: 6px; }

/* 属性徽章 */
.tt { display: inline-block; padding: 2.5px 11px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px; margin-right: 5px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }

/* 图鉴 */
.dex-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dex-stats { font-size: 13.5px; color: var(--ink2); font-weight: 700; }
.dex-stats b { color: var(--ruby-d); font-size: 17px; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px,1fr)); gap: 10px; }
.dcell { border-radius: var(--r-md); background: #fff; padding: 8px 6px 7px; text-align: center; box-shadow: 0 3px 10px rgba(20,30,60,.07); cursor: pointer; transition: transform .12s; position: relative; }
.dcell:hover { transform: translateY(-3px); }
.dcell img { width: 58px; height: 58px; image-rendering: pixelated; }
.dcell.unseen img { filter: brightness(0) opacity(.22); }
.dcell .dc-no { font-size: 10px; color: var(--ink2); font-weight: 700; }
.dcell .dc-name { font-size: 12px; font-weight: 800; }
.dcell.unseen .dc-name { color: rgba(29,36,48,.35); }
.dcell .dc-ball { position: absolute; top: 5px; right: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: linear-gradient(180deg,var(--ruby) 0 46%,#222 46% 54%,#fff 54% 100%); }
.dcell .dc-shiny { position: absolute; top: 4px; left: 6px; font-size: 12px; }

/* 背包 */
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 12px; }
.icard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: #fff; box-shadow: 0 3px 12px rgba(20,30,60,.07); cursor: pointer; border: 2px solid transparent; transition: all .13s; }
.icard:hover { border-color: #ffb3bc; }
.icard .i-emoji { font-size: 30px; width: 40px; text-align: center; }
.icard .i-name { font-size: 15px; font-weight: 800; }
.icard .i-desc { font-size: 11.5px; color: var(--ink2); margin-top: 2px; line-height: 1.45; }
.icard .i-count { margin-left: auto; font-size: 16px; font-weight: 900; color: var(--ruby-d); }

/* 任务页 */
.quest-list { display: flex; flex-direction: column; gap: 12px; }
.qcard { padding: 14px 18px; border-radius: var(--r-md); background: #fff; box-shadow: 0 3px 12px rgba(20,30,60,.07); border-left: 5px solid var(--ruby); }
.qcard.done { border-left-color: #37d67a; opacity: .72; }
.qcard.side { border-left-color: #4d96ff; }
.qcard .q-title { font-size: 15.5px; font-weight: 800; display: flex; justify-content: space-between; }
.qcard .q-reward { font-size: 12px; color: #b8860b; font-weight: 800; }
.qcard .q-body { font-size: 13px; color: var(--ink2); margin-top: 4px; line-height: 1.55; }
.qcard .q-prog { font-size: 12px; font-weight: 800; color: var(--ruby-d); margin-top: 4px; }

/* 精灵详情 (summary) */
.sum-wrap { display: flex; gap: 22px; }
.sum-left { width: 300px; text-align: center; }
.sum-left .sum-img { width: 200px; height: 200px; image-rendering: pixelated; }
.sum-left h2 { font-size: 22px; font-weight: 900; margin-top: 2px; }
.sum-left .sum-genus { font-size: 12.5px; color: var(--ink2); margin: 4px 0 8px; }
.sum-dex { font-size: 13px; color: var(--ink2); line-height: 1.7; text-align: left; margin-top: 12px; background: #fff; padding: 12px 14px; border-radius: var(--r-md); }
.sum-right { flex: 1; }
.stat-rows { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 16px; }
.strow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.strow .st-k { width: 64px; color: var(--ink2); font-weight: 800; }
.strow .st-v { width: 44px; font-weight: 900; text-align: right; }
.strow .st-bar { flex: 1; height: 9px; background: rgba(29,36,48,.08); border-radius: 6px; overflow: hidden; }
.strow .st-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg,#4d96ff,#7fc4ff); }
.move-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mcard { padding: 10px 13px; border-radius: var(--r-md); background: #fff; box-shadow: 0 2px 8px rgba(20,30,60,.06); }
.mcard .m-top { display: flex; justify-content: space-between; align-items: center; }
.mcard .m-name { font-size: 14.5px; font-weight: 800; }
.mcard .m-sub { font-size: 11px; color: var(--ink2); margin-top: 3px; display: flex; justify-content: space-between; }

/* ---------- 战斗 UI ---------- */
#battle-ui { position: absolute; inset: 0; pointer-events: none !important; }
#battle-ui > * { pointer-events: auto; }
.bplate { position: absolute; padding: 12px 18px 12px; border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(12px); min-width: 250px; }
.bplate .bp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.bplate .bp-name { font-size: 16.5px; font-weight: 900; }
.bplate .bp-name .shiny { color: var(--gold); }
.bplate .bp-lv { font-size: 13px; font-weight: 800; color: var(--ink2); }
.bplate .bp-hpbar { height: 10px; margin-top: 8px; background: rgba(29,36,48,.12); border-radius: 6px; overflow: hidden; }
.bplate .bp-hpbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg,#37d67a,#7ff0ae); transition: width .45s cubic-bezier(.3,.9,.3,1); }
.bplate .bp-hpbar i.mid { background: linear-gradient(90deg,#f4b942,#ffe37e); }
.bplate .bp-hpbar i.low { background: linear-gradient(90deg,#e63946,#ff8fa3); }
.bplate .bp-sub { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11.5px; color: var(--ink2); font-weight: 700; }
.bplate .bp-xpbar { height: 4px; margin-top: 6px; background: rgba(29,36,48,.1); border-radius: 4px; overflow: hidden; }
.bplate .bp-xpbar i { display: block; height: 100%; background: linear-gradient(90deg,#4d96ff,#9ad0ff); border-radius: 4px; transition: width .4s; }
#bp-enemy { top: 26px; left: 26px; }
#bp-ally { bottom: 200px; right: 26px; }
.st-badge { font-size: 10px; font-weight: 900; padding: 1.5px 8px; border-radius: 6px; color: #fff; }

/* 战斗消息 */
#bmsg { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); max-width: 640px; padding: 12px 26px; border-radius: 999px;
  background: rgba(23,30,45,.88); color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .6px; text-align: center; backdrop-filter: blur(8px); box-shadow: var(--shadow); }

/* 指令面板 */
#bcmd { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 12px; }
.bcmd-btn { width: 128px; padding: 15px 0 13px; border-radius: 18px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(12px);
  font-size: 16px; font-weight: 900; letter-spacing: 3px; color: var(--ink); transition: all .14s; border-bottom: 4px solid rgba(29,36,48,.14); }
.bcmd-btn:hover { transform: translateY(-3px); }
.bcmd-btn .ico { display: block; font-size: 22px; margin-bottom: 4px; }
.bcmd-btn.fight { background: linear-gradient(150deg,#ff6b7d,var(--ruby)); color: #fff; border-bottom-color: var(--ruby-d); }
/* 技能面板 */
#bmoves { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, 250px); gap: 10px; }
.bmove { padding: 12px 16px 10px; border-radius: 16px; color: #fff; text-align: left; box-shadow: var(--shadow); transition: transform .13s; border-bottom: 4px solid rgba(0,0,0,.25); position: relative; overflow: hidden; }
.bmove:hover { transform: translateY(-3px) scale(1.02); }
.bmove:disabled { filter: grayscale(.8) brightness(.75); cursor: not-allowed; }
.bmove .bm-name { font-size: 16px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.bmove .bm-sub { display: flex; justify-content: space-between; font-size: 11.5px; opacity: .95; margin-top: 4px; font-weight: 700; }
.bmove .bm-eff { position: absolute; top: 8px; right: 12px; font-size: 10.5px; font-weight: 900; padding: 1px 8px; border-radius: 6px; background: rgba(255,255,255,.25); }
#bback { position: absolute; left: 50%; bottom: -4px; transform: translate(-50%, 100%); }
.pill-btn { padding: 8px 26px; border-radius: 999px; background: rgba(23,30,45,.82); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 2px; backdrop-filter: blur(6px); }

/* 捕捉飘字 */
.float-num { position: absolute; font-size: 26px; font-weight: 900; pointer-events: none; text-shadow: 0 2px 0 rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.3); animation: floatup 1s ease-out both; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%,0) scale(.7); } 15% { opacity: 1; transform: translate(-50%,-14px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%,-64px) scale(1); } }

/* ---------- 联机 ---------- */
.online-card { width: 420px; padding: 26px; border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.online-card h2 { font-size: 20px; font-weight: 900; letter-spacing: 3px; margin-bottom: 4px; }
.online-card .o-sub { font-size: 12.5px; color: var(--ink2); margin-bottom: 18px; }
.o-row { display: flex; gap: 10px; margin-bottom: 12px; }
.o-input { flex: 1; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); font-size: 16px; font-family: inherit; letter-spacing: 4px; font-weight: 800; text-transform: uppercase; outline: none; }
.o-input:focus { border-color: var(--ruby); }
.o-btn { padding: 12px 22px; border-radius: 14px; background: var(--ruby); color: #fff; font-size: 14.5px; font-weight: 800; letter-spacing: 2px; }
.o-btn.alt { background: #4d96ff; }
.o-btn.ghost { background: #eef2f9; color: var(--ink); }
.o-status { font-size: 13px; font-weight: 700; color: var(--ink2); min-height: 20px; margin-top: 6px; }
.o-code { font-size: 34px; font-weight: 900; letter-spacing: 10px; color: var(--ruby-d); text-align: center; padding: 10px; }

/* 交换面板 */
.trade-cols { display: flex; gap: 18px; }
.trade-col { flex: 1; }
.trade-col h3 { font-size: 14px; letter-spacing: 2px; margin-bottom: 8px; color: var(--ink2); }
.trade-pick { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.tp-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 2px solid transparent; cursor: pointer; }
.tp-item.sel { border-color: var(--ruby); background: #fff2f3; }
.tp-item img { width: 36px; height: 36px; image-rendering: pixelated; }
.tp-item .tp-name { font-size: 13.5px; font-weight: 800; }

/* 结算横幅 */
#result-banner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  background: radial-gradient(ellipse at center, rgba(20,30,55,.55), rgba(20,30,55,.8)); backdrop-filter: blur(4px); }
#result-banner h1 { font-size: 54px; font-weight: 900; letter-spacing: 12px; color: #fff; text-shadow: 0 4px 0 rgba(180,30,50,.9), 0 12px 40px rgba(0,0,0,.6); animation: rise .5s ease both; }
#result-banner p { color: rgba(255,255,255,.9); font-size: 16px; letter-spacing: 2px; }

/* 屏幕闪光 */
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none !important; z-index: 60; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(29,36,48,.18); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }
