.tactical-arena,.tactical-preview{--enemy-line:#ffab89;--my-line:#a2e7d2;--field-gold:#ffe5a4;--field-ink:#faf1dc;--field-muted:#c8d6de;--strike:#ffc271;--guard:#92c8ff;--heal:#a0f2b7}
.tactical-arena{scroll-margin-top:94px;background:#101b2a;color:var(--field-ink);overflow:hidden}
.workspace:has(.tactical-arena){overflow-anchor:none}
.tactical-arena .arena-top{padding:13px 23px;background:#142239}
.arena-round{border:1px solid #786844;padding:6px 11px;border-radius:4px;font-variant-numeric:tabular-nums}
.battlefield{position:relative;isolation:isolate;background:linear-gradient(180deg,#302638 0%,#15253a 45%,#14293a 70%,#18383d 100%);padding:4px clamp(16px,4vw,45px)}
.battlefield:before{content:'';position:absolute;inset:18px 18px 12px;z-index:-1;border:1px solid #8295a840;border-radius:16px;pointer-events:none}
.field-team{--lane:var(--my-line);display:grid;align-items:center;grid-template-columns:minmax(155px,1fr) minmax(0,3fr);gap:18px;padding:15px 0}
.field-enemy{--lane:var(--enemy-line)}
.field-team-meta{min-width:0}
.field-team-label{display:block;margin:0 0 8px;color:var(--lane);font-size:12px;font-weight:700;letter-spacing:.06em}
.field-team .fighter,.field-team .fighter.enemy{display:flex;flex-direction:row;align-items:center;gap:8px;text-align:left}
.field-team .fighter-avatar,.field-team .fighter.enemy .fighter-avatar{width:42px;height:42px;margin:0;border-color:var(--lane);font-size:17px;background:#23354b}
.field-team .fighter .fighter-info>strong,.field-team .fighter.enemy .fighter-info>strong{font-size:14px;text-align:left;margin:0 0 5px;line-height:1.35}
.field-team .hp-track{height:9px}
.field-team .hp-track>span,.field-team .fighter.enemy .hp-track>span{background:var(--lane)}
.field-team .fighter p{margin:4px 0 0;font-size:10px}
.field-team .fighter p span{float:none;display:inline;margin:0 0 0 3px;white-space:nowrap}
.field-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.field-card{--skill:var(--field-gold);display:grid;grid-template-rows:minmax(60px,1fr) auto;position:relative;isolation:isolate;min-width:0;min-height:112px;padding:0;border:1px solid var(--theme);border-radius:9px;overflow:hidden;text-align:left;color:var(--field-ink);background:#132034;box-shadow:0 5px 0 #0a111d,0 9px 12px #080c17a0}
.field-card .field-art{display:block;min-width:0;overflow:hidden;border-radius:8px 8px 0 0;border-bottom:1px solid var(--theme);background:#233650}
.field-art .pokemon-atlas{top:56%}
.field-card-body{display:grid;gap:4px;padding:7px 8px 8px}
.field-card-body strong{font-size:12px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.field-card-body>span{color:var(--skill);font-size:11px;line-height:1.3;white-space:nowrap;display:flex;align-items:center;gap:4px}
.field-card svg{width:13px;height:13px;flex:none}
.skill-strike{--skill:var(--strike)}.skill-guard{--skill:var(--guard)}.skill-heal{--skill:var(--heal)}
button.field-card{cursor:pointer;transition:transform .18s,border-color .18s}
button.field-card:not(:disabled):hover{transform:translateY(-5px);border-color:var(--field-gold)}
button.field-card:focus-visible{outline:3px solid var(--field-gold);outline-offset:3px}
.field-card.field-selected{outline:2px solid var(--skill);outline-offset:2px}
.field-card.field-cooling{opacity:.54;cursor:not-allowed}
.field-card-state{position:absolute;top:6px;right:6px;padding:3px 5px;border-radius:3px;background:#102037;color:var(--field-gold);font-size:10px;line-height:1.2}
.is-resolving button.field-card{pointer-events:none}
.field-card.field-casting{transform:translateY(-9px) scale(1.04);outline:2px solid var(--skill);outline-offset:2px;z-index:2}
.field-center{position:relative;min-height:132px;display:flex;flex-direction:column;justify-content:center;gap:8px;padding:10px 0;border-block:1px solid #8395a865}
.field-center:before{content:'';position:absolute;inset:0 24%;z-index:-1;background:repeating-linear-gradient(120deg,#9bb2ca17 0 1px,transparent 1px 15px);mask-image:linear-gradient(90deg,transparent,#000 22% 78%,transparent);pointer-events:none}
.field-status{display:flex;align-items:center;justify-content:center;gap:8px 14px;flex-wrap:wrap;text-align:center}
.field-status strong{font-size:18px;color:var(--field-gold);line-height:1.2}
.field-status>span{font-size:12px;color:var(--field-muted)}
.round-moves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.round-move{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:8px;align-items:center;min-height:57px;padding:8px;border:1px solid color-mix(in srgb,var(--skill) 69%,#203748);border-radius:7px;background:#18293c;color:var(--skill)}
.round-icon{display:grid;place-items:center;border:1px solid var(--skill);border-radius:5px;width:32px;height:32px}
.round-icon svg{width:21px;height:21px}
.round-name{min-width:0}
.round-name small{display:block;color:var(--field-muted);font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.round-name strong{display:block;font-size:14px;line-height:1.3;margin-top:3px}
.round-numbers{display:grid;gap:3px;text-align:right;font-variant-numeric:tabular-nums;font-size:11px}
.round-damage{color:#ffc2a2}
.round-bonus{color:var(--skill)}
.round-fx,.round-fx i,.round-fx svg{position:absolute;pointer-events:none}
.round-fx{inset:0;opacity:0;z-index:2}
.round-fx svg{left:50%;top:50%;width:42px;height:42px;transform:translate(-50%,-50%);color:var(--skill)}
.round-fx i{left:50%;top:50%;width:64px;height:64px;border:2px solid var(--skill);border-radius:50%;opacity:0;transform:translate(-50%,-50%)}
.round-resolved .round-fx{animation:round-glyph .58s ease-out both}
.round-resolved .round-move:first-child{animation:enemy-reveal .28s cubic-bezier(.16,1,.3,1) both}
.round-resolved .round-move:last-child{animation:my-reveal .28s cubic-bezier(.16,1,.3,1) both}
.round-resolved .field-selected:not(.field-cooling){animation:field-pulse .62s ease-out}
.round-resolved .skill-strike .round-fx i{width:95%;height:4px;border:0;border-radius:50%;background:var(--strike);transform:translate(-50%,-50%) rotate(-23deg);animation:strike-cut .58s ease-out both}
.round-resolved .skill-strike .round-fx i:nth-child(2){transform:translate(-50%,190%) rotate(-11deg);animation-delay:.06s}
.round-resolved .skill-guard .round-fx i{width:104px;height:61px;border-radius:20px 20px 40px 40px;animation:guard-wave .72s ease-out both}
.round-resolved .skill-guard .round-fx i:nth-child(2){animation-delay:.13s}
.round-resolved .skill-heal .round-fx i{width:18px;height:18px;left:25%;border:0;transform:translate(-50%,18px);animation:heal-rise .68s ease-out both}
.round-resolved .skill-heal .round-fx i:before,.round-resolved .skill-heal .round-fx i:after{content:'';position:absolute;background:var(--heal);border-radius:2px;inset:7px 0}
.round-resolved .skill-heal .round-fx i:after{inset:0 7px}
.round-resolved .skill-heal .round-fx i:nth-child(2){left:68%;animation-delay:.08s}
.round-resolved .skill-heal .round-fx i:nth-child(3){left:80%;animation-delay:.17s}
.round-resolved .round-numbers{animation:reveal-delta .52s cubic-bezier(.16,1,.3,1) both}
.round-resolved .field-hit .fighter-avatar{animation:hit-jolt .38s ease-out}
.round-resolved .hp-track>span{animation:hp-change .55s cubic-bezier(.16,1,.3,1)}
.arena-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 22px;color:#c8d6de;font-size:12px}
.arena-footer .arena-exit{margin:0}
.tactical-arena .combat-log{padding:0 22px 16px}
.tactical-preview{margin:16px 30px 8px;padding:0 15px;background:#292838;border:1px solid #735947;border-radius:8px;color:var(--field-ink)}
.tactical-preview>p{color:var(--field-muted)}
.tactical-preview .field-team{grid-template-columns:minmax(130px,1fr) minmax(0,3fr)}
.formation-label{display:flex;align-items:baseline;gap:8px 13px;padding:12px 30px 0;color:#dce2ed}
.formation-label strong{color:#a2e7d2}
.formation-label span{font-size:12px}
.formation-label+.lobby-copy{padding-top:6px}
@keyframes round-glyph{0%{opacity:0;transform:scale(.82)}20%{opacity:1}100%{opacity:0;transform:scale(1.16)}}
@keyframes enemy-reveal{from{opacity:.55;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes my-reveal{from{opacity:.55;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes field-pulse{28%{transform:translateY(3px);outline-offset:5px}to{transform:none;outline-offset:2px}}
@keyframes strike-cut{0%{opacity:0;clip-path:inset(0 100% 0 0)}28%{opacity:1;clip-path:inset(0)}100%{opacity:0;clip-path:inset(0 0 0 100%)}}
@keyframes guard-wave{0%{opacity:0;scale:.65}25%{opacity:1}100%{opacity:0;scale:1.65}}
@keyframes heal-rise{0%{opacity:0;transform:translate(-50%,24px) scale(.5)}30%{opacity:1}100%{opacity:0;transform:translate(-50%,-34px) scale(1.1)}}
@keyframes reveal-delta{0%{opacity:.25;transform:translateY(8px)}100%{opacity:1;transform:none}}
@media(max-width:760px){
 .tactical-arena{scroll-margin-top:74px}
 .tactical-arena .arena-top{padding:10px 12px;gap:7px}
 .tactical-arena .arena-top>strong{font-size:17px}
 .arena-round{padding:4px 6px;font-size:10px}
 .battlefield{padding:2px 10px}.battlefield:before{display:none}
 .field-team,.tactical-preview .field-team{grid-template-columns:1fr;gap:7px;padding:11px 0}
 .field-team-meta{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px}
 .field-team-label{font-size:10px;margin:0;white-space:nowrap}
 .field-team .fighter-avatar,.field-team .fighter.enemy .fighter-avatar{width:29px;height:29px;font-size:13px}
 .field-team .fighter .fighter-info>strong,.field-team .fighter.enemy .fighter-info>strong{font-size:12px;margin:1px 0 3px}
 .field-team .hp-track{height:6px}
 .field-team .fighter p,.field-team .fighter p b{font-size:9px}
 .field-cards{gap:6px}
 .field-card{min-height:95px;grid-template-rows:50px auto;border-radius:7px}
 .field-card-body{padding:5px 4px 6px;gap:3px}
 .field-card-body strong{font-size:10px}.field-card-body>span{font-size:9px;gap:2px}
 .field-card svg{width:11px;height:11px}
 .field-card-state{font-size:8px;top:3px;right:3px;padding:2px 4px}
 .field-center{min-height:108px;padding:8px 0;gap:6px}
 .field-status{gap:3px 7px}.field-status strong{font-size:14px}.field-status>span{font-size:10px}
 .round-moves{gap:6px}
 .round-move{grid-template-columns:18px minmax(0,1fr);min-height:0;gap:3px 5px;padding:5px}
 .round-icon{width:18px;height:18px}.round-icon svg{width:12px;height:12px}
 .round-name small{font-size:9px}.round-name strong{font-size:11px;margin:2px 0 0}
 .round-numbers{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:2px 5px;font-size:10px}
 .arena-footer{padding:9px 12px}.tactical-arena .combat-log{padding:0 12px 12px}
 .tactical-preview{margin:12px 14px 6px;padding:0 8px}.formation-label{padding:10px 15px 0}
}
@media(prefers-reduced-motion:reduce){
 .tactical-arena .field-card{transition:none;transform:none!important}
 .round-resolved .round-fx,.round-resolved .round-fx i,.round-resolved .round-numbers,.round-resolved .fighter-avatar,.round-resolved .hp-track>span,.round-resolved .round-move,.round-resolved .field-selected{animation:none!important}
 .round-resolved .round-move{outline:1px solid var(--skill)}
}
