/* PokéBattle V13.19 — VS-only intro, compact lobby mode, stable x1/x2/x3/x5 speed. */

/* Normal / Underdog sits directly below Product, without becoming a sixth large fact card. */
#page-battle #pbLobbyStable46 .pb46Fact:nth-child(2){overflow:visible!important}
#page-battle #pbLobbyStable46 .pb46ModeInline{
  min-width:0!important;margin-top:6px!important;padding-top:6px!important;
  border-top:1px solid rgba(255,255,255,.07)!important;background:transparent!important
}
#page-battle #pbLobbyStable46 .pb46ModeInline>small{display:none!important}
#page-battle #pbLobbyStable46 .pb46ModeInline .pb46ModeBtns{display:flex!important;gap:4px!important;flex-wrap:nowrap!important;margin:0!important}
#page-battle #pbLobbyStable46 .pb46ModeInline .pb46ModeBtns button{
  min-height:24px!important;padding:3px 6px!important;border-radius:7px!important;font-size:8px!important;line-height:1!important;white-space:nowrap!important
}

/* Battle setup is a lobby-only UI. Once the actual battle is running it stays out of the way. */
#page-battle #lobby.hidden{display:none!important}

/* Speed = x1, x2, x3, x5. Keep the segment compact and deterministic. */
#battleSpeedButtonsV118{gap:3px!important}
#battleSpeedButtonsV118 button{min-width:42px!important;padding:7px 8px!important}

/* VS intro — no 3,2,1 and no OPEN. */
#pb1319Vs{
  position:fixed;inset:0;z-index:5000;display:none;align-items:center;justify-content:center;
  padding:18px;background:rgba(4,7,13,.56);backdrop-filter:blur(15px);pointer-events:none
}
#pb1319Vs.show{display:flex}
.pb1319VsStage{
  width:min(1220px,calc(100vw - 32px));min-height:330px;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;padding:30px 24px;border-radius:24px;
  border:1px solid rgba(255,255,255,.12);background:linear-gradient(135deg,rgba(16,23,37,.98),rgba(7,11,19,.98));
  box-shadow:0 30px 90px rgba(0,0,0,.55)
}
.pb1319VsStage:before{
  content:"";position:absolute;inset:-30%;background:linear-gradient(115deg,transparent 36%,rgba(89,91,255,.12) 44%,transparent 51%,rgba(255,65,80,.12) 59%,transparent 67%);
  transform:translateX(-32%);animation:pb1319Slash 1.9s ease both;pointer-events:none
}
@keyframes pb1319Slash{to{transform:translateX(32%)}}
.pb1319Mode{position:absolute;top:17px;left:50%;transform:translateX(-50%);z-index:3;color:#ffd43e;font-size:10px;font-weight:1000;letter-spacing:.1em;text-transform:uppercase}
.pb1319Chain,.pb1319Teams{position:relative;z-index:2;width:100%;display:flex;align-items:center;justify-content:center;gap:10px}
.pb1319Teams{display:grid;grid-template-columns:1fr 125px 1fr;gap:16px}
.pb1319Team{display:flex;align-items:center;justify-content:center;gap:10px}
.pb1319Fighter{
  width:155px;min-width:0;padding:12px 10px;border:1px solid #394760;border-radius:17px;background:#151d2d;text-align:center;
  opacity:0;transform:translateY(24px) scale(.82);box-shadow:0 16px 30px rgba(0,0,0,.26)
}
.pb1319Team.blue .pb1319Fighter{border-color:#3e72c7;background:linear-gradient(180deg,#15213a,#111827)}
.pb1319Team.red .pb1319Fighter{border-color:#b94c5b;background:linear-gradient(180deg,#311923,#17131c)}
.pb1319Fighter.go{animation:pb1319Fighter .34s cubic-bezier(.2,.95,.2,1) forwards}
@keyframes pb1319Fighter{to{opacity:1;transform:none}}
.pb1319Avatar{width:78px;height:78px;margin:0 auto 8px;display:grid;place-items:center;overflow:hidden;border:1px solid #40506b;border-radius:17px;background:#0c1320;font-size:34px;font-weight:1000}
.pb1319Avatar img{width:100%;height:100%;object-fit:cover}
.pb1319Fighter b{display:block;color:#fff;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pb1319Fighter small{display:block;margin-top:3px;color:#9ba6ba;font-size:8px;font-weight:900;letter-spacing:.05em}
.pb1319VsSep{width:82px;height:82px;object-fit:contain;flex:0 0 auto;opacity:0;transform:scale(.3) rotate(-10deg);filter:drop-shadow(0 12px 18px rgba(0,0,0,.38))}
.pb1319VsSep.go{animation:pb1319VsPop .3s cubic-bezier(.2,1.25,.2,1) forwards}
@keyframes pb1319VsPop{to{opacity:1;transform:scale(1) rotate(0)}}

@media(max-width:760px){
  #page-battle #pbLobbyStable46 .pb46ModeInline .pb46ModeBtns{grid-template-columns:none!important}
  .pb1319VsStage{min-height:260px;padding:42px 7px 18px;border-radius:18px}
  .pb1319Chain{gap:3px}
  .pb1319Fighter{width:59px;padding:7px 3px;border-radius:11px}
  .pb1319Avatar{width:42px;height:42px;border-radius:10px;font-size:20px;margin-bottom:5px}
  .pb1319Fighter b{font-size:8px}.pb1319Fighter small{font-size:6px}
  .pb1319VsSep{width:29px;height:29px}
  .pb1319Teams{grid-template-columns:1fr 45px 1fr;gap:4px}
  .pb1319Team{gap:4px}.pb1319Team .pb1319Fighter{width:70px}
  .pb1319Mode{top:13px;font-size:8px}
}
