:root {
  --ink:#172927;
  --muted:#667c77;
  --cream:#f7f3e9;
  --paper:#fffdf6;
  --green:#176b55;
  --green-dark:#0d493c;
  --mint:#dcebdc;
  --yellow:#f2c94c;
  --red:#d95042;
  --line:#cdd9cf;
  --type:#82936c;
  --type-dark:#304934;
  --type-light:#e2e9cd;
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
html { background:#e8eee8; }
body { margin:0; color:var(--ink); font:14px/1.5 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif; min-height:100vh; background:radial-gradient(circle at 20% 0,#f7f8ed 0,transparent 38%),#e8eee8; }
button,input { font:inherit; }
button { border:0; border-radius:8px; padding:10px 18px; font-weight:700; cursor:pointer; color:var(--green-dark); background:#e2ece3; transition:transform .15s,filter .15s; }
button:hover { filter:brightness(1.06); transform:translateY(-1px); }
button:disabled { opacity:.42; cursor:not-allowed; transform:none; }
.topbar { min-height:76px; padding:13px 30px; display:flex; align-items:center; justify-content:space-between; gap:20px; color:#f4f5dc; background:#123e39; border-bottom:4px solid #d7b649; }
.brand { display:flex; align-items:center; gap:13px; }
.brand h1 { font-size:23px; line-height:1.2; letter-spacing:3px; margin:0 0 4px; }
.brand span:not(.brand-mark) { color:#a8c6b8; font-size:10px; letter-spacing:2px; }
.brand-mark { width:41px; height:41px; display:block; position:relative; border:3px solid #f4e8b6; border-radius:50%; background:linear-gradient(#d96c4a 0 43%,#263f37 43% 56%,#f3efd8 56%); }
.brand-mark:before { content:""; position:absolute; left:-3px; right:-3px; top:16px; height:4px; background:#263f37; }
.brand-mark i { position:absolute; width:12px; height:12px; border:3px solid #263f37; border-radius:50%; background:#f4e8b6; top:11px; left:11px; z-index:1; }
.topbar-right { display:flex; align-items:center; gap:8px; color:#b4cbbf; font-size:12px; }
.online-dot { width:7px; height:7px; background:#9bce89; border-radius:50%; }
#room-info { border-left:1px solid #42635a; padding-left:17px; margin-left:10px; color:#f3d578; font-weight:700; }
main { max-width:1660px; margin:auto; padding:22px; }
.footer { padding:12px 24px 24px; color:#7c8a83; text-align:center; font-size:11px; }
/* 大厅 */
.lobby { min-height:calc(100vh - 185px); display:grid; grid-template-columns:minmax(400px,1fr) 460px; gap:70px; align-items:center; max-width:1200px; margin:auto; padding:40px 20px; }
.lobby-showcase { height:400px; position:relative; perspective:900px; }
.showcase-card { position:absolute; width:205px; height:285px; border:9px solid #e6bd4d; border-radius:13px; padding:12px; background:#e8e0b6; box-shadow:0 18px 30px #153c3626; }
.showcase-left { left:10%; top:58px; transform:rotate(-17deg); }
.showcase-center { left:35%; top:15px; z-index:2; transform:rotate(-3deg); }
.showcase-right { left:60%; top:76px; transform:rotate(14deg); background:#cee1e5; }
.showcase-card img { width:100%; height:160px; object-fit:contain; image-rendering:pixelated; background:linear-gradient(#cbdba9,#edf0d1); border:3px solid #927839; }
.showcase-right img { background:linear-gradient(#9eced6,#d6e7e3); }
.mini-card-title { display:flex; justify-content:space-between; font-size:12px; margin-bottom:8px; }
.mini-card-title span { color:#aa3d2e; font-weight:800; }
.mini-attack { margin-top:16px; border-top:1px solid #998958; padding-top:10px; display:flex; justify-content:space-between; }
.card-back { background:#173f68; border-color:#e7bd54; display:grid; place-items:center; overflow:hidden; }
.card-back:before { content:""; position:absolute; inset:8px; border:2px solid #e8ca71; border-radius:6px; }
.back-orbit { position:absolute; width:165px; height:85px; border:10px solid #e7b940; border-radius:50%; transform:rotate(-36deg); }
.back-ball { width:74px; height:74px; border:7px solid #e7d99b; border-radius:50%; background:linear-gradient(#c65344 0 43%,#182f42 43% 56%,#f4f0d8 56%); position:relative; }
.back-ball:after { content:""; position:absolute; width:22px; height:22px; border:6px solid #e7d99b; border-radius:50%; background:#f7f2df; left:19px; top:19px; }
.lobby-card { background:var(--paper); border:1px solid #d4dfd2; border-radius:18px; padding:38px; box-shadow:0 12px 40px #214b3d12; }
.eyebrow,.section-kicker { color:var(--green); font-size:11px; letter-spacing:2px; font-weight:800; }
.lobby-card h2 { font-size:28px; line-height:1.35; margin:12px 0; }
.lobby-card p { color:var(--muted); line-height:1.8; }
.primary-button { display:flex; width:100%; justify-content:space-between; align-items:center; margin-top:24px; padding:14px 20px; background:var(--green); color:white; }
.primary-button span,.end-turn span { font-size:20px; }
.divider { display:flex; align-items:center; gap:10px; color:#87948d; font-size:11px; margin:22px 0 14px; }
.divider:before,.divider:after { content:""; height:1px; background:#dce3da; flex:1; }
.join { display:flex; gap:8px; }
.join input { flex:1; min-width:0; border:1px solid #c8d5cb; border-radius:8px; padding:12px; background:white; color:var(--ink); text-transform:uppercase; letter-spacing:2px; outline:none; }
.join input:focus { border-color:var(--green); box-shadow:0 0 0 3px #176b5514; }
.join button { background:#e9d89b; }
.hint { font-size:11px; }
.waiting { padding:12px; background:#edf3e6; border-radius:8px; color:var(--green)!important; }
.loading-dot { display:inline-block; width:7px; height:7px; background:var(--green); border-radius:50%; margin-right:8px; animation:pulse 1s infinite alternate; }
@keyframes pulse { to { opacity:.25; } }
/* 对战桌面 */
.game-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:16px; align-items:start; }
.table-column { min-width:0; }
.playmat { position:relative; padding:14px 20px; border:7px solid #e3c879; border-radius:20px; background:radial-gradient(ellipse at center,#377b61 0,#1f5d49 55%,#164a3b 100%); box-shadow:inset 0 0 0 2px #806d35,0 8px 22px #153c3624; }
.playmat:before { content:""; pointer-events:none; position:absolute; inset:7px; border:1px solid #ffffff16; border-radius:10px; }
.player { display:flex; align-items:center; gap:16px; color:#e7eddf; position:relative; z-index:1; padding:0 3px 9px; font-size:12px; }
.player-avatar { width:29px; height:29px; display:grid; place-items:center; border-radius:50%; background:#e6cc83; color:#234c3b; font-weight:900; }
.player-name { font-size:14px; font-weight:800; margin-right:5px; }
.player .stats { margin-left:auto; color:#c6d8c6; }
.turn-badge { padding:3px 8px; border-radius:12px; background:#f3d067; color:#274334; font-size:10px; font-weight:800; }
.supply-row { display:flex; justify-content:space-between; align-items:center; min-height:36px; position:relative; padding:2px 0; }
.prize-zone { display:flex; align-items:center; gap:5px; }
.prize-stack { display:grid; grid-template-columns:repeat(6,18px); gap:3px; }
.prize-card,.deck-card { display:block; width:18px; height:26px; border:2px solid #d5b759; border-radius:2px; background:repeating-linear-gradient(45deg,#214b69 0 3px,#173a59 3px 6px); }
.prize-card.taken { opacity:.18; border-style:dashed; background:transparent; }
.zone-caption { color:#d7e1cb; font-size:10px; min-width:34px; }
.pile-zone { display:flex; align-items:center; gap:8px; color:#e5e9d6; font-size:11px; }
.deck-card { width:33px; height:46px; border-width:3px; border-radius:4px; box-shadow:-3px 3px 0 #183b38,-5px 5px 0 #d5b759; }
.my-supply { margin-top:1px; }
.bench { display:flex; gap:9px; align-items:center; min-height:104px; overflow-x:auto; padding:7px 76px; position:relative; }
.bench:has(.card) { align-items:stretch; }
.bench .card { width:100px; min-width:100px; height:110px; min-height:110px; padding:5px; border-width:4px; border-radius:6px; }
.bench .card-art { height:43px; min-height:43px; border-width:1px; }
.bench .card-art img { width:65px; }
.bench .card-head { font-size:9px; }
.bench .card-head .name { font-size:11px; }
.bench .card-head .hp { font-size:9px; }
.bench .evolution,.bench .card-kind,.bench .attack-list,.bench .rules-text,.bench .card-footer,.bench .damage-detail,.bench .hp { display:none; }
.bench .stats-line { position:absolute; bottom:4px; left:5px; right:5px; font-size:9px; padding:0; }
.bench .attached { position:absolute; top:50px; left:6px; font-size:8px; padding:1px 3px; }
.bench .status { position:absolute; right:2px; top:47px; font-size:8px; }
.bench .actions { position:absolute; inset:0; background:#153e34dc; align-content:center; justify-content:center; opacity:0; padding:6px; }
.bench .card:hover .actions,.bench .card:focus-within .actions { opacity:1; }
.bench .actions button { padding:6px; font-size:10px; }
.zone-label { display:flex; align-items:center; gap:4px; color:#d3dfce; min-width:58px; padding:0; font-size:11px; white-space:nowrap; }
.zone-label:before { content:""; width:3px; height:20px; background:#e1c46e; border-radius:2px; }
.zone-empty { width:100%; border:1px dashed #bad0b43b; border-radius:8px; text-align:center; padding:17px; color:#b5cbb74d; font-size:11px; }
.arena-row { display:grid; grid-template-columns:1fr 90px 1fr; align-items:center; min-height:302px; padding:8px 78px; position:relative; }
.arena-row:before { content:""; position:absolute; left:10%; right:10%; top:50%; height:1px; background:#e9d89235; }
.active-zone { position:relative; text-align:center; min-width:0; }
.active-zone>label { display:block; color:#d9e3cd; font-size:10px; letter-spacing:1px; margin-bottom:6px; }
#my-active,#opp-active { position:relative; display:flex; justify-content:center; }
#my-active .card,#opp-active .card { width:180px; height:250px; padding:8px; border-width:6px; }
#my-active .card-art,#opp-active .card-art { height:104px; }
#my-active .card-art img,#opp-active .card-art img { width:128px; }
#my-active .attack-name,#opp-active .attack-name { font-size:10px; }
#my-active .rules-text,#opp-active .rules-text { display:none; }
#my-active .card-footer,#opp-active .card-footer { margin-top:4px; padding-top:4px; }
.arena-center { position:relative; z-index:1; text-align:center; }
.versus { display:grid; place-items:center; margin:auto; width:43px; height:43px; background:#e5c56a; color:#244b39; border:5px solid #285d46; border-radius:50%; outline:1px solid #e5c56a; font-weight:900; font-style:italic; }
.stadium-slot { margin:25px auto 0; width:76px; padding:8px 5px; border:1px dashed #d5debb70; border-radius:6px; color:#c3d0b3; font-size:9px; }
.stadium-slot.active { border-style:solid; background:#ecdfae; color:#3d4931; }
.empty { color:#c2d2b7; padding:30px 0; }
/* 实体卡 */
.card { --type:#82936c; --type-dark:#304934; --type-light:#e2e9cd; position:relative; width:140px; min-width:140px; height:202px; padding:7px; display:flex; flex-direction:column; gap:3px; overflow:hidden; text-align:left; color:#25322c; background:var(--type-light); border:6px solid var(--type); border-radius:9px; box-shadow:0 3px 7px #102b2340; }
.card[data-type="fire"],.energy-card[data-type="fire"] { --type:#db7147; --type-dark:#7d3424; --type-light:#f1d0a7; }
.card[data-type="water"],.energy-card[data-type="water"] { --type:#599db6; --type-dark:#285369; --type-light:#c5e2e7; }
.card[data-type="grass"],.energy-card[data-type="grass"] { --type:#78a65b; --type-dark:#3e6133; --type-light:#d9e7b6; }
.card[data-type="lightning"],.energy-card[data-type="lightning"] { --type:#dfb936; --type-dark:#765c1f; --type-light:#f5e9ac; }
.card[data-type="psychic"],.energy-card[data-type="psychic"] { --type:#a77da9; --type-dark:#5d3c6b; --type-light:#e6d4e6; }
.card[data-type="fighting"],.energy-card[data-type="fighting"] { --type:#b88659; --type-dark:#63472e; --type-light:#e8d2b1; }
.card.trainer { --type:#62948b; --type-dark:#315c56; --type-light:#d9e6da; }
.card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:4px; line-height:1.1; min-height:24px; }
.card-head>div { min-width:0; }
.card-kind { display:block; color:var(--type-dark); font-size:7px; letter-spacing:.5px; margin-bottom:2px; }
.name { display:block; font-size:13px; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hp { white-space:nowrap; color:#a7372b; font-size:10px; font-weight:900; }
.hp b { font-size:15px; }
.evolution { position:absolute; top:24px; left:7px; z-index:2; padding:1px 4px; border-radius:3px; background:#f8f0d6; border:1px solid var(--type-dark); color:var(--type-dark); font-size:7px; }
.card-art { position:relative; min-height:73px; height:73px; display:flex; align-items:center; justify-content:center; overflow:hidden; border:2px solid var(--type-dark); background:linear-gradient(160deg,#ffffff80,#ffffff15),var(--type); }
.card-art:before { content:""; position:absolute; width:90px; height:90px; border:1px solid #ffffff60; border-radius:50%; }
.card-art:after { content:""; position:absolute; width:60px; height:60px; border:1px solid #ffffff45; transform:rotate(45deg); }
.card-art img { position:relative; z-index:1; width:82px; height:64px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(2px 3px 0 #233b3030); }
.trainer-art .item-glyph { position:relative; z-index:1; width:47px; height:47px; display:grid; place-items:center; border:3px solid #f7efd1; border-radius:50%; color:#fff9df; background:var(--type-dark); font-size:18px; font-weight:900; }
.stats-line { display:flex; align-items:center; gap:4px; color:var(--type-dark); font-size:9px; font-weight:800; min-height:14px; }
.damage-meter { height:4px; flex:1; background:#ffffff80; border-radius:3px; overflow:hidden; }
.damage-meter i { display:block; height:100%; background:#c5543f; }
.attached { position:absolute; right:7px; top:113px; z-index:2; padding:1px 4px; border-radius:6px; background:#234c3cdd; color:#f5ecc6; font-size:8px; }
.status { position:absolute; top:114px; left:7px; z-index:2; color:#9f312d; background:#f8dfc7; padding:1px 4px; border-radius:4px; font-size:8px; font-weight:800; }
.attack-list { display:flex; flex-direction:column; gap:2px; margin-top:1px; }
.attack-row { display:flex; justify-content:space-between; align-items:center; gap:3px; border-top:1px solid #4e583533; padding-top:3px; }
.attack-info { min-width:0; }
.attack-name { display:block; font-size:9px; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.energy-cost { display:flex; gap:1px; margin-top:2px; }
.energy-symbol { display:inline-grid; place-items:center; width:13px; height:13px; flex:0 0 13px; border-radius:50%; border:1px solid #493b2860; background:#e4e3d4; color:#414238; font-size:7px; font-style:normal; font-weight:900; }
.energy-symbol.fire { background:#df744a; color:white; }
.energy-symbol.water { background:#66a9c4; color:white; }
.energy-symbol.grass { background:#7aa95e; color:white; }
.energy-symbol.lightning { background:#e5c443; color:#66521e; }
.energy-symbol.psychic { background:#aa80ac; color:white; }
.energy-symbol.fighting { background:#b88960; color:white; }
.attack-damage { font-size:16px; font-weight:900; }
.rules-text { display:block; color:#405348; font-size:8px; line-height:1.4; }
.card-footer { display:flex; justify-content:space-between; gap:4px; border-top:1px solid #4e533c55; padding-top:3px; margin-top:auto; font-size:7px; color:var(--type-dark); }
.weakness { white-space:nowrap; }
.actions { display:flex; flex-wrap:wrap; gap:3px; margin-top:auto; position:relative; z-index:3; }
.actions:empty { display:none; }
.actions button { flex:1; min-width:42px; padding:5px 6px; border-radius:4px; background:var(--type-dark); color:#fff9e7; font-size:10px; line-height:1.2; }
.actions .attack-button { flex-basis:100%; display:flex; justify-content:space-between; align-items:center; text-align:left; }
.energy-card { justify-content:flex-start; text-align:center; }
.energy-card .card-head { display:block; text-align:left; }
.energy-card .card-art { height:105px; min-height:105px; margin-top:4px; border-radius:50%; border:5px solid #f8edc780; }
.energy-orb { position:relative; z-index:1; width:60px; height:60px; border-radius:50%; background:var(--type-dark); border:4px solid #fff4c4; display:grid; place-items:center; color:#fff6d2; font-size:27px; font-weight:900; }
.energy-card .rules-text { text-align:center; margin-top:5px; }
/* 手牌与侧边栏 */
.hand-dock { margin-top:12px; padding:13px 16px 16px; background:#f7f4e9; border:1px solid #d5decf; border-radius:13px; }
.hand-title { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.hand-title>div { display:flex; align-items:center; gap:12px; }
.hand-title b { font-size:15px; }
#counts { color:var(--muted); font-size:11px; }
.hand { display:flex; gap:11px; overflow-x:auto; padding:2px 2px 9px; min-height:214px; }
.hand .card:hover { transform:translateY(-4px); }
.control-panel { position:sticky; top:14px; padding:18px; background:var(--paper); border:1px solid #d4dfd2; border-radius:14px; box-shadow:0 5px 20px #153c3610; }
.turn-panel { padding-bottom:15px; border-bottom:1px solid #dce3d8; }
.turn-panel>span:first-child { display:block; color:var(--green); font-size:10px; letter-spacing:1px; }
#turn { display:block; margin:5px 0; font-size:20px; }
#winner { color:#b14536; font-size:12px; }
.message { min-height:55px; padding:14px 0; color:var(--muted); font-size:12px; }
.end-turn { display:flex; width:100%; justify-content:space-between; align-items:center; padding:12px 16px; background:var(--green); color:white; }
.panel-section { margin-top:20px; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; font-weight:800; }
.panel-heading small { color:#91a096; font-size:9px; font-weight:400; }
#log { margin-top:9px; height:255px; overflow-y:auto; border-top:1px solid #e0e6dc; }
.log-entry { display:flex; gap:8px; padding:9px 0; border-bottom:1px solid #e6eadf; font-size:11px; color:#607369; }
.log-seq { min-width:20px; color:#a3afa4; font-size:9px; }
.rules-note { margin-top:16px; padding:12px; background:#edf1e5; border-radius:8px; color:#62705d; font-size:10px; }
.rules-note b { color:#3d5847; }
.rules-note p { margin:5px 0 0; line-height:1.7; }
.concede { width:100%; margin-top:8px; padding:9px; color:#8f3a2e; background:#fff5f1; border:1px solid #dcb0a4; border-radius:8px; font-size:12px; font-weight:600; letter-spacing:.6px; cursor:pointer; }
.concede:hover { background:#fbe6df; border-color:#c98b7b; }
.concede:active { transform:translateY(1px); }
.concede-confirm { background:#b04a37; color:#fff; border:1px solid #963d2c; }
.concede-confirm:hover { background:#9c3f2d; }
#toast { display:none; position:fixed; bottom:28px; left:50%; transform:translateX(-50%); background:#243e35; color:#fff3d3; border:1px solid #d4c179; padding:12px 24px; border-radius:8px; z-index:30; max-width:90%; box-shadow:0 8px 25px #142a2440; }
#target-picker .card { cursor:pointer; }
.target-dialog { background:var(--paper); border:1px solid #a7bda8; border-radius:14px; padding:24px; max-width:90%; max-height:80%; overflow:auto; }
.target-list { display:flex; flex-wrap:wrap; gap:12px; }
.target-option { width:140px; padding:18px; border:1px solid #cbd7c7; border-radius:10px; background:#eef2e5; cursor:pointer; }
.target-option img { width:90px; height:70px; object-fit:contain; image-rendering:pixelated; }
@media (max-width:1150px) {
  main { padding:14px; }
  .game-layout { grid-template-columns:1fr; }
  .control-panel { position:static; display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; }
  .turn-panel { grid-column:1; }
  .message { grid-column:1; padding:0; }
  .end-turn { grid-column:1; }
  .panel-section { grid-column:2; grid-row:1/5; margin:0; }
  #log { height:165px; }
  .rules-note { display:none; }
  .concede { grid-column:1; margin:0; }
  .lobby { gap:25px; }
  .showcase-card { width:175px; height:250px; }
  .showcase-card img { height:135px; }
}
/* 服务端事件驱动的战斗演出；不影响权威卡面状态 */
.battle-banner { display:flex; align-items:center; justify-content:center; gap:7px; min-height:25px; margin:-7px 0 7px; color:#f4e6ac; font-size:11px; letter-spacing:1px; }
.battle-dot { width:6px; height:6px; border-radius:50%; background:#f0ce6e; box-shadow:0 0 8px #f0ce6e; }
#battle-effects { position:fixed; inset:0; z-index:25; pointer-events:none; overflow:hidden; }
.flying-card { position:fixed; width:70px; height:98px; border:4px solid #e7bd54; border-radius:7px; perspective:600px; }
.flying-card .back-orbit { width:55px; height:28px; border-width:4px; }
.flying-card .back-ball { width:28px; height:28px; border-width:3px; }
.flying-card .back-ball:after { width:8px; height:8px; border-width:2px; left:7px; top:7px; }
.battle-float { position:fixed; transform:translate(-50%,-50%); padding:5px 10px; border-radius:8px; font-size:25px; font-weight:1000; color:white; text-shadow:0 2px 0 #51251d,0 0 10px #0008; animation:float-away .95s ease-out forwards; }
.damage-float { color:#fff2bb; background:#c44332e8; border:2px solid #ffd98a; }
.energy-float { color:#fff9cf; background:#26755be8; border:2px solid #e9d887; font-size:17px; }
.evolve-float { color:#fff; background:#a37b27dd; border:2px solid white; }
@keyframes float-away { 0% { opacity:0; transform:translate(-50%,-20%) scale(.6); } 18% { opacity:1; transform:translate(-50%,-60%) scale(1.15); } 70% { opacity:1; } 100% { opacity:0; transform:translate(-50%,-150%) scale(.9); } }
#my-active .card,#opp-active .card { transform-origin:center; }
.battle-enter { animation:pokemon-enter .65s cubic-bezier(.17,.84,.35,1.35); }
@keyframes pokemon-enter { from { opacity:0; transform:translateY(35px) scale(.35) rotateY(90deg); } to { opacity:1; transform:none; } }
.energy-charged { animation:energy-charge .75s ease-out; }
@keyframes energy-charge { 0%,100% { filter:none; } 35% { filter:drop-shadow(0 0 20px #ffe582) brightness(1.4); transform:translateY(-8px); } }
.battle-lunge-up { animation:lunge-up .72s ease-in-out; }
.battle-lunge-down { animation:lunge-down .72s ease-in-out; }
@keyframes lunge-up { 0%,100% { transform:none; } 25%,50% { transform:translateY(-40px) scale(1.06); filter:brightness(1.25); } }
@keyframes lunge-down { 0%,100% { transform:none; } 25%,50% { transform:translateY(40px) scale(1.06); filter:brightness(1.25); } }
.battle-hit { animation:hit-flash .65s linear; }
@keyframes hit-flash { 0%,100% { filter:none; transform:translateX(0); } 15%,45%,75% { filter:brightness(3) saturate(0); transform:translateX(-8px); } 30%,60% { filter:brightness(.6); transform:translateX(8px); } }
.battle-evolve { animation:evolve-flash .9s ease-in-out; }
@keyframes evolve-flash { 0%,100% { filter:none; transform:scale(1); } 45% { filter:brightness(4) drop-shadow(0 0 25px white); transform:scale(1.12); } }
.battle-knockout { animation:knockout .5s ease-in forwards; }
@keyframes knockout { to { opacity:.15; transform:translateY(30px) rotate(8deg) scale(.65); filter:grayscale(1); } }
.card-art.original-art { background:#ede7d6; }
.card-art.original-art img { width:100%; height:100%; object-fit:contain; image-rendering:auto; }
/* 持续异常状态：不是一次性提示 */
.card[data-status~="poisoned"] .card-art { box-shadow:inset 0 0 22px #65be56; }
.card[data-status~="poisoned"] .card-art:before { content:""; z-index:2; width:90%; height:75%; border:0; border-radius:50%; background:radial-gradient(ellipse at 20% 70%,#55e877bb 0 14%,transparent 43%),radial-gradient(ellipse at 75% 30%,#36ad58aa 0 17%,transparent 46%),radial-gradient(ellipse at 60% 85%,#83ed68cc 0 14%,transparent 43%); filter:blur(2px); animation:poison-mist 2.2s ease-in-out infinite alternate; }
.card[data-status~="poisoned"] .card-art img { opacity:.9; }
@keyframes poison-mist { from { transform:translate(-10px,10px) scale(.75); opacity:.45; } to { transform:translate(10px,-9px) scale(1.2); opacity:.85; } }
.card[data-status~="burned"] .card-art { box-shadow:inset 0 -10px 24px #ed5b25; }
.card[data-status~="burned"] .card-art:after { content:"♨"; z-index:2; width:auto; height:auto; border:0; color:#ff7438; font-size:55px; text-shadow:10px 5px 0 #ffc43f; transform:none; animation:burn-ember .75s ease-in-out infinite alternate; }
@keyframes burn-ember { from { transform:translateY(14px) scale(.85); opacity:.55; } to { transform:translateY(-8px) scale(1.05); opacity:.9; } }
.card[data-status~="paralyzed"] .card-art:before { content:"ϟ"; position:absolute; right:4px; top:0; z-index:2; width:auto; height:auto; border:0; color:#fff04c; font-size:45px; font-weight:900; text-shadow:8px 5px 0 #ffce32,-55px 15px 0 #fff48b; animation:paralyze-arc .35s steps(2) infinite; }
@keyframes paralyze-arc { 50% { transform:translate(5px,-3px) rotate(7deg); opacity:.55; } }
.card[data-status~="poisoned"][data-status~="burned"] .card-art:after { content:"♨"; }
.card[data-status~="poisoned"] .card-art .item-glyph:after { content:""; }
.card[data-status~="poisoned"] .card-art { background-image:radial-gradient(circle at 20% 75%,#61dd7766,transparent 45%),linear-gradient(160deg,#ffffff80,#ffffff15); }
@media (prefers-reduced-motion:reduce) {
  .battle-enter,.energy-charged,.battle-lunge-up,.battle-lunge-down,.battle-hit,.battle-evolve,.battle-knockout,.battle-float,.card-art:before,.card-art:after { animation-duration:.03s!important; animation-iteration-count:1!important; }
}
@media (max-width:1150px) {
  .topbar { padding:12px 14px; }
  .brand h1 { font-size:17px; }
  .brand span:not(.brand-mark) { font-size:8px; letter-spacing:1px; }
  .brand-mark { width:34px; height:34px; }
  .brand-mark i { top:8px; left:8px; }
  .topbar-right>span:not(.online-dot) { display:none; }
  #room-info { font-size:10px; margin-left:0; padding-left:8px; }
  main { padding:8px; }
  .lobby { grid-template-columns:1fr; padding:20px 5px; gap:10px; }
  .lobby-showcase { height:260px; transform:scale(.7); transform-origin:top center; margin-bottom:-65px; }
  .showcase-center { left:30%; }
  .showcase-right { left:53%; }
  .lobby-card { padding:25px; }
  .lobby-card h2 { font-size:23px; }
  .playmat { padding:10px 6px; border-width:4px; }
  .player { flex-wrap:wrap; gap:5px 10px; }
  .player .stats { width:100%; margin-left:39px; }
  .supply-row { display:none; }
  .bench { padding:6px; min-height:103px; }
  .zone-label { min-width:47px; font-size:9px; }
  .arena-row { grid-template-columns:1fr 42px 1fr; padding:10px 5px; min-height:260px; }
  #my-active .card,#opp-active .card { width:145px; height:220px; }
  #my-active .card-art,#opp-active .card-art { height:90px; }
  #my-active .rules-text,#opp-active .rules-text,#my-active .card-footer,#opp-active .card-footer { display:none; }
  .stadium-slot { width:40px; font-size:7px; }
  .versus { width:33px; height:33px; font-size:11px; }
  .hand-dock { padding:10px; }
  .hand-title>div { gap:7px; }
  .section-kicker { display:none; }
  #counts { font-size:9px; }
  .control-panel { grid-template-columns:1fr; padding:15px; }
  .panel-section { grid-column:1; grid-row:auto; }
  #log { height:150px; }
  .footer { font-size:9px; }
}


/* ============ 打斗演出强化：冲击 / 异常状态 / 眩晕 / 冰冻 ============ */
.status-float { color:#eaffd6; background:#4f7a3ce8; border:2px solid #b6f07a; font-size:17px; }
.poison-float { color:#e6ffdc; background:#5d1d6de8; border:2px solid #9dff86; }
.burn-float { color:#fff2d6; background:#a3320de8; border:2px solid #ffb066; }
.recover-float { color:#eaf6ff; background:#1f6d8ee8; border:2px solid #a7e5ff; font-size:17px; }
.sealed-float { color:#fff6cf; background:#4a4a4ae8; border:2px solid #ffe066; font-size:16px; }

.impact-ring { position:fixed; width:54px; height:54px; margin:-27px 0 0 -27px; border-radius:50%; border:4px solid var(--fx,#ffe9c4); box-shadow:0 0 20px var(--fx,#ffe9c4),inset 0 0 22px var(--fx,#ffe9c4); animation:impact-ring .52s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes impact-ring { 0% { transform:scale(.25); opacity:1; } 100% { transform:scale(3.6); opacity:0; } }

.fx-spark { position:fixed; width:9px; height:9px; margin:-4px 0 0 -4px; border-radius:50%; background:var(--fx,#fff); box-shadow:0 0 12px var(--fx,#fff); animation:fx-spark .64s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes fx-spark { 0% { transform:translate(0,0) scale(.35); opacity:1; } 100% { transform:translate(var(--dx,0),var(--dy,0)) scale(1.15); opacity:0; } }

.screen-shake { animation:screen-shake .36s ease-in-out; }
@keyframes screen-shake { 0%,100% { transform:translate(0,0); } 20% { transform:translate(-8px,3px); } 40% { transform:translate(7px,-4px); } 60% { transform:translate(-5px,-2px); } 80% { transform:translate(4px,3px); } }

.status-burst { position:fixed; width:64px; height:64px; margin:-32px 0 0 -32px; display:grid; place-items:center; font-size:46px; font-weight:900; line-height:1; color:var(--fx,#fff); text-shadow:0 0 16px var(--fx,#fff),0 0 34px var(--fx,#fff),0 2px 0 #0009; animation:status-pop .95s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes status-pop { 0% { transform:scale(.25) rotate(-12deg); opacity:0; } 22% { transform:scale(1.3) rotate(4deg); opacity:1; } 55% { transform:scale(1) rotate(0); opacity:.95; } 100% { transform:scale(1.45); opacity:0; } }

.status-particle { position:fixed; width:7px; height:7px; margin:-3px 0 0 -3px; border-radius:50%; background:var(--fx,#fff); box-shadow:0 0 10px var(--fx,#fff); animation:status-rise 1.1s ease-out forwards; }
@keyframes status-rise { 0% { transform:translate(0,0) scale(.4); opacity:0; } 25% { opacity:1; } 100% { transform:translate(var(--dx,0),var(--dy,-60px)) scale(.9); opacity:0; } }

.stun-orbit { position:fixed; width:0; height:0; margin:-22px 0 0 0; }
.stun-orbit i { position:absolute; left:-11px; top:-11px; width:22px; height:22px; display:grid; place-items:center; font-style:normal; font-size:18px; color:#ffe066; text-shadow:0 0 10px #ffd34d,0 0 20px #ff9d2b; animation:stun-orbit 1.05s linear infinite; }
.stun-orbit i:nth-child(2) { animation-delay:-.35s; color:#fff3b0; font-size:18px; }
.stun-orbit i:nth-child(3) { animation-delay:-.7s; }
@keyframes stun-orbit { from { transform:rotate(0deg) translateX(30px) rotate(0deg); opacity:.55; } 50% { opacity:1; } to { transform:rotate(360deg) translateX(30px) rotate(-360deg); opacity:.55; } }

.frost-cover { position:fixed; border-radius:12px; background:linear-gradient(135deg,#d7f3ffcc,#8fd2ff70 42%,#eefaffd9); box-shadow:inset 0 0 30px #fff,inset 0 0 60px #6fc9ff,0 0 26px #7fd4ff; animation:frost-out 1.2s ease-out forwards; }
@keyframes frost-out { 0% { opacity:0; transform:scale(.9); } 15% { opacity:.78; } 55% { opacity:.42; } 100% { opacity:0; transform:scale(1.03); } }
.frost-shard { position:fixed; width:10px; height:10px; margin:-5px 0 0 -5px; background:#dff6ff; clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); box-shadow:0 0 10px #9fe4ff; animation:frost-shard .95s ease-out forwards; }
@keyframes frost-shard { 0% { transform:scale(.4) rotate(0); opacity:1; } 100% { transform:translate(0,-26px) scale(1.3) rotate(160deg); opacity:0; } }

.status-poison-tick { animation:poison-tick .6s ease-out; }
@keyframes poison-tick { 0%,100% { filter:none; transform:none; } 30% { filter:hue-rotate(55deg) saturate(2.4) brightness(1.15); transform:translateX(-5px); } 65% { filter:hue-rotate(20deg) brightness(1.05); transform:translateX(4px); } }
.status-burn-tick { animation:burn-tick .6s ease-out; }
@keyframes burn-tick { 0%,100% { filter:none; transform:none; } 30% { filter:sepia(.55) saturate(2.6) brightness(1.3); transform:translateY(-6px) scale(1.02); } 65% { filter:sepia(.2) brightness(1.08); transform:translateY(2px); } }

/* 静态持续状态：睡眠 / 混乱 / 冰冻（与中毒、灼伤、麻痹一致） */
.card[data-status~="asleep"] .card-art { box-shadow:inset 0 0 26px #6f9fd8; filter:saturate(.8); }
.card[data-status~="asleep"] .card-art:before { content:"Z"; position:absolute; right:8px; top:-4px; z-index:2; width:auto; height:auto; border:0; background:none; box-shadow:none; color:#cfe6ff; font-size:34px; font-weight:900; text-shadow:0 0 12px #4f8fd8; filter:none; animation:sleep-drift 1.7s ease-in-out infinite; }
@keyframes sleep-drift { from { transform:translate(0,6px) scale(.9); opacity:.5; } to { transform:translate(-6px,-10px) scale(1.1); opacity:.95; } }
.card[data-status~="confused"] .card-art { box-shadow:inset 0 0 26px #b26bff; }
.card[data-status~="confused"] .card-art:before { content:"✦"; position:absolute; left:50%; top:-6px; z-index:2; width:auto; height:auto; border:0; background:none; box-shadow:none; color:#e6b8ff; font-size:30px; text-shadow:0 0 12px #b26bff; filter:none; animation:confused-spin 1.3s linear infinite; }
@keyframes confused-spin { from { transform:rotate(0) translateX(-16px) rotate(0); } to { transform:rotate(360deg) translateX(-16px) rotate(-360deg); } }
.card[data-status~="frozen"] .card-art { box-shadow:inset 0 0 34px #79d6ff; }
.card[data-status~="frozen"] .card-art:after { content:"❄"; position:absolute; right:6px; bottom:4px; z-index:2; width:auto; height:auto; border:0; background:none; color:#d8f5ff; font-size:38px; text-shadow:0 0 14px #63c8ff,0 0 26px #2f9fd8; transform:none; animation:frost-glow 1.6s ease-in-out infinite alternate; }
@keyframes frost-glow { from { opacity:.55; transform:scale(.9); } to { opacity:1; transform:scale(1.05); } }
@media (prefers-reduced-motion:reduce) {
  .impact-ring,.fx-spark,.screen-shake,.status-burst,.status-particle,.stun-orbit,.stun-orbit i,.frost-cover,.frost-shard,.status-poison-tick,.status-burn-tick,.card[data-status~="asleep"] .card-art:before,.card[data-status~="confused"] .card-art:before,.card[data-status~="frozen"] .card-art:after { animation-duration:.02s!important; animation-iteration-count:1!important; }
}
.battle-dizzy { animation:dizzy-wobble .78s ease-in-out; }
@keyframes dizzy-wobble { 0%,100% { transform:rotate(0) translateY(0); } 20% { transform:rotate(-6deg) translateY(3px); } 40% { transform:rotate(5deg) translateY(-2px); } 60% { transform:rotate(-4deg) translateY(1px); } 80% { transform:rotate(3deg); } }

/* ---------- 硬币 / 判定提示横幅 ---------- */
#judge-banner{
  position:fixed; left:50%; top:92px; z-index:70; pointer-events:none; min-width:220px;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:11px 26px; border-radius:14px; text-align:center;
  transform:translate(-50%,-16px) scale(.96); opacity:0;
  transition:opacity .22s ease, transform .22s ease;
}
#judge-banner.show{opacity:1; transform:translate(-50%,0) scale(1)}
#judge-banner.good{
  background:linear-gradient(165deg,rgba(18,62,57,.97),rgba(9,36,32,.98));
  border:2px solid #d7b649; color:#f6efd0;
  box-shadow:0 0 26px rgba(215,182,73,.35),0 12px 28px rgba(0,0,0,.35);
}
#judge-banner.bad{
  background:linear-gradient(165deg,rgba(74,26,24,.97),rgba(38,12,11,.98));
  border:2px solid #d95042; color:#ffe2dc;
  box-shadow:0 0 26px rgba(217,80,66,.32),0 12px 28px rgba(0,0,0,.35);
}
.judge-title{font-size:16px;font-weight:800;letter-spacing:.06em}
.judge-text{font-size:12.5px;opacity:.88}
