/* Combat depth: ゴゴゴ gauge, team-ups, battlefield objects, hazard banner, unit animations (js/teamups.js, js/fieldobjects.js,
   js/battle-ui.js). Unit animations move .uc-frame / .uc-art only: .unit-card keeps its own idle / active / lunge transforms. */

/* ---------------- ゴゴゴ gauge ---------------- */
.gogo-gauge { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 150px; cursor: help; position: relative; }
.gg-kana { font-family: var(--f-jp); font-weight: 900; font-size: 20px; color: #b070e0; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 2px 2px 0 var(--ink); transform: rotate(-6deg); white-space: nowrap; }
.gg-bar { position: relative; flex: 1; height: 16px; border: 3px solid var(--ink); background: rgba(26, 16, 32, .75); transform: skewX(-18deg); box-shadow: 3px 3px 0 var(--ink); overflow: hidden; min-width: 70px; }
.gg-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #5b3a8c, #b070e0 60%, #e8508a); transition: width .35s cubic-bezier(.2, 1.2, .4, 1); }
.gg-fill::after { content: ''; position: absolute; inset: 0; background: radial-gradient(rgba(26, 16, 32, .35) 1px, transparent 1.3px) 0 0 / 5px 5px; }
.gg-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 2px), var(--ink) calc(25% - 2px) 25%); opacity: .7; }
.gg-state { font-family: var(--f-sfx); font-size: 16px; letter-spacing: .05em; color: var(--paper); -webkit-text-stroke: .6px var(--ink); text-shadow: 2px 2px 0 var(--ink); white-space: nowrap; min-width: 38px; }
.gg-state .ux-kbd { font-size: 10px; }
.gogo-gauge.gain .gg-bar { animation: ggGain .35s ease-out; }
@keyframes ggGain { 40% { box-shadow: 0 0 0 3px #b070e0, 3px 3px 0 var(--ink); } }
.gogo-gauge.full .gg-fill { background: linear-gradient(90deg, #f2c14e, #fff3a0 50%, #f2c14e); background-size: 200% 100%; animation: ggShine 1s linear infinite; }
.gogo-gauge.full .gg-bar { box-shadow: 0 0 0 3px var(--gold), 0 0 16px 4px rgba(242, 193, 78, .7), 3px 3px 0 var(--ink); }
.gogo-gauge.full .gg-state { color: var(--gold); }
.gogo-gauge.full .gg-kana { animation: menaceBob .45s ease-in-out infinite alternate; color: #d890ff; }
@keyframes ggShine { to { background-position: -200% 0; } }

/* ---------------- team-up button and tray ---------------- */
.btn-teamup { font-size: 13px; padding: 8px 12px; white-space: nowrap; background: #e8dcf6; }
.btn-teamup b { background: var(--ink); color: #d890ff; padding: 0 5px; margin-right: 4px; }
.btn-teamup small { font-size: 11px; opacity: .7; }
.btn-teamup em { font-style: normal; font-family: var(--f-jp); font-weight: 900; color: #5b3a8c; }
.btn-teamup.disabled { opacity: .55; filter: grayscale(.6); }
.btn-teamup.ready { background: var(--gold); animation: tuReady 1s ease-in-out infinite; }
@keyframes tuReady { 50% { box-shadow: 0 0 0 3px #b070e0, 0 0 14px 4px rgba(176, 112, 224, .7); } }
.tu-tray { position: absolute; bottom: 105%; right: 0; background: var(--paper); border: 3px solid var(--ink); box-shadow: var(--shadow-s); padding: 10px; display: flex; flex-direction: column; gap: 6px; animation: zoomIn .25s; min-width: 290px; max-width: 92vw; z-index: 3; }
.tu-head { font-family: var(--f-sfx); font-size: 20px; letter-spacing: .06em; color: var(--ink); }
.tu-head b { color: #5b3a8c; } .tu-head span { font-family: var(--f-ui); font-size: 12px; opacity: .7; letter-spacing: 0; }
.tu-empty { font-size: 13px; opacity: .7; }
.tu-pick { display: flex; align-items: center; gap: 10px; text-align: left; border: 3px solid var(--ink); background: #fff8e6; padding: 6px 10px 6px 6px; cursor: pointer; font-family: var(--f-ui); box-shadow: 3px 3px 0 var(--ink); transition: transform .1s; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.tu-pick:hover { transform: translate(-2px, -2px); background: #fff3c4; }
.tu-pick.disabled { opacity: .5; filter: grayscale(.7); cursor: not-allowed; }
.tu-pick.generic .tu-txt b { color: #6a5a4a; }
.tu-ports { display: flex; }
.tu-ports i { width: 38px; height: 38px; border: 2px solid var(--ink); overflow: hidden; background: var(--ink); display: block; transform: skewX(-8deg); }
.tu-ports i + i { margin-left: -8px; }
.tu-ports svg { width: 100%; height: 100%; }
.tu-txt { display: flex; flex-direction: column; flex: 1; line-height: 1.1; }
.tu-txt b { font-family: var(--f-sfx); font-size: 19px; letter-spacing: .04em; color: #5b3a8c; font-weight: 400; }
.tu-txt small { font-size: 11px; opacity: .75; }
.tu-key { background: var(--ink); color: var(--gold); font-weight: 700; font-size: 12px; padding: 1px 6px; }
.tip-no { color: #c8323c; }

/* both riders lunge in together */
.unit-card.tu-lunge .uc-frame { animation: tuLunge .65s cubic-bezier(.3, 1.4, .4, 1); }
@keyframes tuLunge { 0% { transform: none; } 35% { transform: translateX(46px) scale(1.12) rotate(3deg); filter: drop-shadow(0 0 12px #f2c14e) brightness(1.2); } 60% { transform: translateX(30px) scale(1.08); } 100% { transform: none; } }

/* ---------------- dual cut-in ---------------- */
.cutin.dual .ci-band { background: linear-gradient(100deg, var(--cc) 0 48%, var(--ink) 48% 49%, var(--cc2, var(--cc)) 49% 100%); }
.cutin.dual .ci-port { left: 5%; width: 19%; }
.cutin.dual .ci-port2 { left: 24%; top: -4%; z-index: 1; animation-delay: .22s; box-shadow: -6px 8px 0 var(--ink); }
.cutin.dual .ci-text { left: 46%; }
.cutin.dual .ci-name { font-size: clamp(30px, 4.8vw, 70px); }
.cutin.dual .ci-kana { color: #f2c14e; }
@media (max-width: 700px) { .cutin.dual .ci-port { width: 24%; } .cutin.dual .ci-port2 { left: 22%; } .cutin.dual .ci-text { left: 44%; } }

/* ---------------- battlefield objects ---------------- */
.field-rack { position: absolute; bottom: 64px; display: flex; gap: 10px; align-items: flex-end; z-index: 2; pointer-events: none; }
.field-rack > * { pointer-events: auto; }
.field-rack.near-party { right: 50%; margin-right: 14px; flex-direction: row-reverse; }
.field-rack.near-enemy { left: 50%; margin-left: 14px; }
@media (max-height: 640px) { .field-rack { bottom: 20px; } }
.unit-card.field-card { width: 84px; animation: none; }
.unit-card.field-card .uc-frame { height: 66px; border-width: 3px; background: radial-gradient(rgba(26, 16, 32, .14) 1px, transparent 1.3px) 0 0 / 5px 5px, #efe0bf; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink), 4px 4px 0 3px var(--ink); border-radius: 3px; }
.unit-card.field-card.near-party .uc-frame { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #c8323c, 4px 4px 0 3px var(--ink); }
.unit-card.field-card .uc-art svg { width: 100%; height: 100%; }
.unit-card.field-card .uc-name { font-size: 12px; margin-top: 4px; text-align: center; }
.unit-card.field-card .hpbar { height: 11px; }
.unit-card.field-card .hptext { font-size: 9px; }
.unit-card.field-card .energy-pips { display: none; }
.unit-card.field-card .uc-status { min-height: 0; }
.unit-card.field-card .uc-frame::before { content: '⚠'; position: absolute; top: 1px; left: 3px; z-index: 3; font-size: 12px; color: #e8742a; -webkit-text-stroke: .6px var(--ink); }
.unit-card.field-card .fo-art { animation: foIdle 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.unit-card.field-card .fo-lamp, .unit-card.field-card .fo-dynamite { animation-duration: 1.1s; }
@keyframes foIdle { 50% { transform: rotate(1.5deg) translateY(-1px); } }
.battle.targeting .unit-card.field-card.targetable .uc-frame { box-shadow: 0 0 0 3px var(--pink), 4px 4px 0 var(--ink); animation: tgt .8s infinite; }
.unit-card.field-card.fo-broken .uc-art { animation: foBreak .45s ease-out forwards; }
@keyframes foBreak { 30% { transform: scale(1.3) rotate(-6deg); filter: brightness(2.2); } 100% { transform: scale(.4) rotate(20deg); opacity: 0; } }
.unit-card.fo-blasted .uc-frame { animation: foBlast .6s ease-out; }
@keyframes foBlast { 0% { filter: brightness(2.4) sepia(1) saturate(3) hue-rotate(-20deg); } 20% { transform: translateY(-10px) rotate(-3deg); } 100% { filter: none; transform: none; } }

/* ---------------- hazard chip + banner ---------------- */
.hazard-chip { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; background: #e8742a; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: skewX(-10deg); font-family: var(--f-ui); font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; cursor: help; }
.hazard-chip b { background: var(--ink); color: #ffd84a; padding: 0 5px; border-radius: 2px; }
.hazard-chip.hz-blizzard { background: #9fd0f0; } .hazard-chip.hz-cramped { background: #d87060; } .hazard-chip.hz-cavein { background: #b0a090; } .hazard-chip.hz-sunless { background: #8a6aa0; color: #fff; }
.hazard-banner { position: absolute; top: 66px; left: 0; z-index: 8; display: flex; align-items: baseline; gap: 14px; padding: 10px 40px 10px 22px; max-width: 78vw; background: #e8742a; border: 4px solid var(--ink); border-left: none; box-shadow: 6px 6px 0 var(--ink); clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%); animation: hbIn .45s cubic-bezier(.2, 1.3, .4, 1) both; pointer-events: none; }
.hazard-banner.hz-blizzard { background: #9fd0f0; } .hazard-banner.hz-cramped { background: #d87060; } .hazard-banner.hz-cavein { background: #b0a090; } .hazard-banner.hz-sunless { background: #8a6aa0; }
.hazard-banner.out { animation: hbOut .4s ease-in forwards; }
.hb-kick { font-family: var(--f-ui); font-weight: 700; font-size: 12px; letter-spacing: .2em; background: var(--ink); color: #ffd84a; padding: 2px 8px; }
.hb-name { font-family: var(--f-sfx); font-size: 30px; letter-spacing: .05em; color: #fff; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.hb-desc { font-size: 13px; color: var(--ink); font-weight: 600; max-width: 460px; line-height: 1.2; }
@keyframes hbIn { from { transform: translateX(-105%); } }
@keyframes hbOut { to { transform: translateX(-105%); opacity: 0; } }
@media (max-width: 1000px) { .gogo-gauge { flex-basis: 150px; min-width: 110px; gap: 5px; } .gg-kana { display: none; } .gg-state { font-size: 13px; } .gogo-gauge.full .gg-state { font-size: 0; } .gogo-gauge.full .gg-state .ux-kbd { font-size: 10px; } .hazard-chip span { display: none; } }
@media (max-width: 700px) {
  .field-rack { top: 50%; bottom: auto; transform: translateY(-50%); gap: 6px; }
  .field-rack.near-party { right: auto; left: 8px; margin: 0; flex-direction: row; }
  .field-rack.near-enemy { left: auto; right: 8px; margin: 0; }
  .unit-card.field-card { width: 54px; } .unit-card.field-card .uc-frame { height: 42px; } .unit-card.field-card .uc-name { display: none; } .unit-card.field-card .hpbar { height: 8px; } .unit-card.field-card .hptext { display: none; }
}
@media (max-width: 700px) { .hazard-banner { top: 52px; max-width: 94vw; flex-wrap: wrap; gap: 4px 10px; padding: 8px 30px 8px 14px; } .hb-name { font-size: 22px; } .hb-desc { font-size: 11px; } .hazard-chip span { display: none; } .gogo-gauge { min-width: 110px; } .gg-kana { display: none; } }

/* ---------------- per-type idles (on the art, inside the frame) ---------------- */
.uc-art { transform-origin: 50% 100%; }
.unit-card.idle-breathe .uc-art { animation: idBreathe 3.2s ease-in-out infinite; }
.unit-card.idle-sway .uc-art { animation: idSway 3.6s ease-in-out infinite; }
.unit-card.idle-prowl .uc-art { animation: idProwl 2.6s ease-in-out infinite; }
.unit-card.idle-boss .uc-art { animation: idBoss 4.2s ease-in-out infinite; }
.unit-card.idle-summon .uc-art { animation: idFloat 2.2s ease-in-out infinite; }
.unit-card:nth-child(2) .uc-art { animation-delay: -.9s; } .unit-card:nth-child(3) .uc-art { animation-delay: -1.7s; } .unit-card:nth-child(4) .uc-art { animation-delay: -2.4s; }
@keyframes idBreathe { 0%, 100% { transform: scale(1.02, 1.02); } 50% { transform: scale(1.02, 1.05) translateY(-1px); } }
@keyframes idSway { 0%, 100% { transform: scale(1.04) rotate(-1.2deg); } 50% { transform: scale(1.04) rotate(1.2deg) translateY(-1px); } }
@keyframes idProwl { 0%, 100% { transform: scale(1.06) translateX(-3px); } 25% { transform: scale(1.06, 1.03) translateX(0) translateY(1px); } 50% { transform: scale(1.06) translateX(3px); } 75% { transform: scale(1.06, 1.03) translateX(0) translateY(1px); } }
@keyframes idBoss { 0%, 100% { transform: scale(1.03); filter: none; } 50% { transform: scale(1.06, 1.08) translateY(-2px); filter: drop-shadow(0 0 6px rgba(200, 50, 60, .7)) contrast(1.08); } }
@keyframes idFloat { 50% { transform: translateY(-3px) scale(1.03); } }
/* Stands hover behind their users, a little restless */
.unit-card.stand-user .uc-stand, .unit-card.party .uc-stand { animation: c2Stand 3.4s ease-in-out infinite; }
@keyframes c2Stand { 0%, 100% { transform: translate(0, 0) rotate(0); filter: drop-shadow(0 0 8px rgba(255, 255, 255, .45)); } 40% { transform: translate(-3px, -9px) rotate(-2deg); filter: drop-shadow(0 0 12px rgba(216, 144, 255, .7)); } 70% { transform: translate(2px, -5px) rotate(1.5deg); } }
.uc-stand.strike { animation: standStrike .5s ease-out !important; }

/* ---------------- hit reactions ---------------- */
.uc-vfx { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.unit-card.kb-l.kb-light .uc-art { animation: kbArtL .32s ease-out; } .unit-card.kb-r.kb-light .uc-art { animation: kbArtR .32s ease-out; }
@keyframes kbArtL { 30% { transform: scale(1.08) translateX(-9px) rotate(-3deg); } }
@keyframes kbArtR { 30% { transform: scale(1.08) translateX(9px) rotate(3deg); } }
.unit-card.kb-l.kb-heavy .uc-frame { animation: kbHeavyL .5s cubic-bezier(.2, .9, .3, 1); } .unit-card.kb-r.kb-heavy .uc-frame { animation: kbHeavyR .5s cubic-bezier(.2, .9, .3, 1); }
.unit-card.kb-heavy .uc-art { animation: kbSquash .5s ease-out; }
@keyframes kbHeavyL { 0% { transform: none; } 18% { transform: translateX(-22px) rotate(-7deg); } 45% { transform: translateX(-10px) rotate(-3deg); } 70% { transform: translateX(4px) rotate(1deg); } 100% { transform: none; } }
@keyframes kbHeavyR { 0% { transform: none; } 18% { transform: translateX(22px) rotate(7deg); } 45% { transform: translateX(10px) rotate(3deg); } 70% { transform: translateX(-4px) rotate(-1deg); } 100% { transform: none; } }
@keyframes kbSquash { 15% { transform: scale(1.14, .9); } 40% { transform: scale(.96, 1.06); } }
/* crit: the frame freezes on an inverted beat before it flies */
.unit-card.hitstop.kb-l .uc-frame { animation: kbStopL .6s cubic-bezier(.2, .9, .3, 1); } .unit-card.hitstop.kb-r .uc-frame { animation: kbStopR .6s cubic-bezier(.2, .9, .3, 1); }
@keyframes kbStopL { 0%, 16% { transform: translateX(-4px) scale(1.06); filter: invert(1) contrast(1.6); } 17% { filter: none; } 34% { transform: translateX(-26px) rotate(-9deg); } 65% { transform: translateX(3px) rotate(1deg); } 100% { transform: none; } }
@keyframes kbStopR { 0%, 16% { transform: translateX(4px) scale(1.06); filter: invert(1) contrast(1.6); } 17% { filter: none; } 34% { transform: translateX(26px) rotate(9deg); } 65% { transform: translateX(-3px) rotate(-1deg); } 100% { transform: none; } }
/* the damage type tints the art for a moment */
.unit-card.tinted .uc-vfx { background: var(--dmgc, #fff); mix-blend-mode: hard-light; animation: tint .45s ease-out forwards; }
@keyframes tint { 0% { opacity: .6; } 100% { opacity: 0; } }
/* dodge: a quick sidestep with an afterimage */
.unit-card.dodge-l .uc-frame { animation: dodgeL .5s cubic-bezier(.2, 1.2, .4, 1); } .unit-card.dodge-r .uc-frame { animation: dodgeR .5s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes dodgeL { 30% { transform: translateX(-30px) skewX(10deg); opacity: .75; box-shadow: 26px 0 0 rgba(246, 236, 216, .35), 0 0 0 5px var(--ink); } 60% { transform: translateX(-20px); } }
@keyframes dodgeR { 30% { transform: translateX(30px) skewX(-10deg); opacity: .75; box-shadow: -26px 0 0 rgba(246, 236, 216, .35), 0 0 0 5px var(--ink); } 60% { transform: translateX(20px); } }
/* buff / debuff pulses in the status colour */
.unit-card.pulse-buff .uc-vfx { animation: pulseBuff .65s ease-out; }
.unit-card.pulse-debuff .uc-vfx { animation: pulseDebuff .65s ease-out; }
@keyframes pulseBuff { 0% { box-shadow: inset 0 0 0 0 var(--pc, #f2c14e); background: transparent; } 35% { box-shadow: inset 0 0 26px 8px var(--pc, #f2c14e); background: linear-gradient(0deg, color-mix(in srgb, var(--pc, #f2c14e) 35%, transparent), transparent 70%); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
@keyframes pulseDebuff { 0% { box-shadow: inset 0 0 0 0 var(--pc, #7a7a8a); } 30% { box-shadow: inset 0 0 30px 10px var(--pc, #7a7a8a); filter: saturate(1.4); } 60% { transform: translateY(2px); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
/* low HP: laboured breathing and a red edge */
.unit-card.low-hp .uc-art { animation: pant 1s ease-in-out infinite; filter: saturate(.75); }
.unit-card.low-hp .uc-vfx { background: radial-gradient(ellipse at center, transparent 50%, rgba(200, 50, 60, .5)); animation: lowPulse 1.1s ease-in-out infinite; }
@keyframes pant { 0%, 100% { transform: scale(1.03) rotate(-1deg) translateY(2px); } 50% { transform: scale(1.03, 1.06) rotate(1deg) translateY(1px); } }
@keyframes lowPulse { 50% { opacity: .4; } }
.unit-card.low-hp.tinted .uc-vfx { background: var(--dmgc, #fff); animation: tint .45s ease-out forwards; }

/* ---------------- deaths ---------------- */
.unit-card.die-fly.enemy .uc-frame { animation: dieFlyR .7s cubic-bezier(.3, .2, .6, 1) forwards; }
.unit-card.die-fly.party .uc-frame { animation: dieFlyL .7s cubic-bezier(.3, .2, .6, 1) forwards; }
@keyframes dieFlyR { 20% { transform: translateX(-6px) scale(1.05); filter: brightness(2); } 100% { transform: translate(90px, -70px) rotate(200deg) scale(.5); opacity: 0; } }
@keyframes dieFlyL { 20% { transform: translateX(6px) scale(1.05); filter: brightness(2); } 100% { transform: translate(-90px, -70px) rotate(-200deg) scale(.5); opacity: 0; } }
.unit-card.die-dissolve .uc-art { animation: dieDissolve .75s ease-in forwards; }
.unit-card.die-dissolve .uc-stand { animation: dieStand .7s ease-in forwards !important; }
@keyframes dieDissolve { 0% { filter: none; } 30% { filter: brightness(1.8) hue-rotate(40deg); transform: scale(1.06); } 100% { filter: blur(6px) brightness(2) saturate(0); opacity: 0; transform: scale(1.2) translateY(-18px); } }
@keyframes dieStand { 100% { transform: translateY(-40px) scale(1.3); opacity: 0; filter: blur(4px); } }
.unit-card.die-retire .uc-frame { animation: dieRetire .7s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes dieRetire { 25% { transform: translateY(-8px) rotate(4deg); filter: brightness(1.6); } 100% { transform: translateY(10px) rotate(-10deg); filter: grayscale(1); } }
.unit-card.die-boss .uc-frame { animation: dieBoss 1.5s ease-in forwards; }
.unit-card.die-boss .uc-art { animation: dieBossArt 1.5s ease-in forwards; }
@keyframes dieBoss { 0% { transform: none; } 8%, 24%, 40% { transform: translateX(-6px) rotate(-2deg); } 16%, 32%, 48% { transform: translateX(6px) rotate(2deg); } 60% { transform: scale(1.08); filter: brightness(3) contrast(1.4); } 100% { transform: scale(.85) translateY(30px) rotate(-8deg); filter: grayscale(1) brightness(.6); opacity: 0; } }
@keyframes dieBossArt { 55% { filter: invert(1); } 70% { filter: none; } 100% { transform: scale(1.1) translateY(12px); filter: blur(3px); } }
.unit-card.die-break .uc-art { animation: foBreak .45s ease-out forwards; }
.battle.slowmo .battle-bg { filter: grayscale(.8) contrast(1.25) brightness(.8); transition: filter .2s; }
.battle.slowmo .battle-vignette { background: radial-gradient(ellipse at center, transparent 30%, rgba(26, 16, 32, .8)); }
.boss-kill-kana { position: absolute; inset: 0; z-index: 14; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; animation: bkIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.boss-kill-kana b { font-family: var(--f-jp); font-weight: 900; font-size: clamp(64px, 11vw, 150px); color: #c8323c; -webkit-text-stroke: 4px var(--ink); text-shadow: 8px 8px 0 var(--ink), 0 0 30px rgba(255, 255, 255, .6); transform: rotate(-6deg); letter-spacing: .04em; }
.boss-kill-kana span { font-family: var(--f-sfx); font-size: clamp(26px, 3.4vw, 44px); color: var(--paper); -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--ink); letter-spacing: .3em; margin-top: -6px; transform: rotate(-6deg); }
.boss-kill-kana.out { opacity: 0; transform: scale(1.15); transition: opacity .45s, transform .45s; }
@keyframes bkIn { from { transform: scale(2.2); opacity: 0; filter: blur(6px); } }

/* ---------------- victory + level up ---------------- */
.unit-card.victory .uc-frame { animation: victoryJump .9s cubic-bezier(.2, 1.5, .4, 1) both; }
.unit-card.victory .uc-art { animation: victoryPose 1.4s ease-out forwards; }
.unit-card.victory:nth-child(2) .uc-frame { animation-delay: .12s; } .unit-card.victory:nth-child(3) .uc-frame { animation-delay: .24s; } .unit-card.victory:nth-child(4) .uc-frame { animation-delay: .36s; }
@keyframes victoryJump { 0% { transform: none; } 30% { transform: translateY(-26px) rotate(-5deg) scale(1.06); } 60% { transform: translateY(-6px) rotate(3deg); } 100% { transform: rotate(-3deg) translateY(-4px); } }
@keyframes victoryPose { 0% { transform: none; } 40% { transform: scale(1.12) rotate(-4deg) skewX(-6deg); filter: contrast(1.2) drop-shadow(0 0 8px #f2c14e); } 100% { transform: scale(1.08) rotate(-3deg) skewX(-4deg); filter: contrast(1.1); } }
.unit-card.lvl-burst .uc-frame { box-shadow: 0 0 0 3px var(--gold), 0 0 26px 8px rgba(242, 193, 78, .85), 7px 7px 0 4px var(--ink); }
.lvl-up-tag { position: absolute; left: 50%; top: 10%; z-index: 5; transform: translateX(-50%) rotate(-8deg); font-family: var(--f-sfx); font-size: 22px; letter-spacing: .06em; white-space: nowrap; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 3px 0 var(--ink); animation: lvlTag .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lvlTag { from { transform: translateX(-50%) scale(0) rotate(-30deg); } }

/* ---------------- reduced motion ---------------- */
body.reduced .unit-card .uc-art, body.reduced .unit-card .uc-frame, body.reduced .uc-stand, body.reduced .fo-art, body.reduced .gogo-gauge .gg-kana, body.reduced .btn-teamup.ready { animation: none !important; }
body.reduced .unit-card.low-hp .uc-vfx { animation: none; opacity: .6; }
body.reduced .hazard-banner, body.reduced .boss-kill-kana { animation-duration: .01s; }
@media (prefers-reduced-motion: reduce) {
  .unit-card .uc-art, .uc-stand, .fo-art, .gg-kana { animation: none !important; }
  .hazard-banner, .boss-kill-kana { animation-duration: .01s; }
}
