/* Number Rivals — isolated Level Up layout repair.
   Keep badge, reward and Continue action visible without changing regular battles. */
#playRoot > .uprank-stage.nr163-rankup {
 box-sizing:border-box;
 flex:0 0 auto;
 height:auto;
 min-height:0;
 max-height:min(540px,calc(100dvh - 190px));
 padding:clamp(9px,1.5vh,15px) clamp(10px,2vw,18px);
 gap:clamp(4px,.8vh,8px);
 justify-content:flex-start;
 overflow-x:hidden;
 overflow-y:auto;
 scrollbar-gutter:stable;
}
#playRoot > .uprank-stage.nr163-rankup > :not(.uprank-backglow){flex-shrink:0}
#playRoot > .uprank-stage.nr163-rankup .uprank-backglow{inset:0;pointer-events:none}
#playRoot > .uprank-stage.nr163-rankup .uprank-kicker{font-size:10px;line-height:1.2;letter-spacing:.16em}
#playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{
 width:min(122px,27vh);height:112px;min-height:0;flex:0 0 112px;margin:0
}
#playRoot > .uprank-stage.nr163-rankup .uprank-shield-new svg{max-height:85px}
#playRoot > .uprank-stage.nr163-rankup .uprank-shield-new span{font-size:10px;line-height:1.1}
#playRoot > .uprank-stage.nr163-rankup .uprank-announcement{
 font-size:clamp(32px,4.5vw,54px);line-height:1.05;margin:0
}
#playRoot > .uprank-stage.nr163-rankup .uprank-subline{font-size:clamp(14px,1.8vw,19px);margin:0}
#playRoot > .uprank-stage.nr163-rankup .nr163-promotion-focus{font-size:11px;line-height:1.3;margin:0}
#playRoot > .uprank-stage.nr163-rankup .nr196-rank-spark{
 max-width:min(660px,100%);padding:7px 12px;margin:1px auto;
 font-size:clamp(10px,1.1vw,12px);line-height:1.3
}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards{
 grid-template-columns:minmax(0,1fr);width:min(310px,100%);margin:2px auto;gap:0
}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards > div{padding:6px 10px;gap:2px}
#playRoot > .uprank-stage.nr163-rankup .nr143-gold-coin{width:35px;height:35px;font-size:14px}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards strong{font-size:18px;line-height:1.1}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards small{font-size:9px}
#playRoot > .uprank-stage.nr163-rankup .uprank-explain{
 max-width:min(540px,100%);font-size:11px;line-height:1.3;margin:1px 0;letter-spacing:.025em
}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-actions{
 position:sticky;bottom:0;z-index:5;display:flex;justify-content:center;
 width:min(350px,100%);padding:4px 3px;margin:1px auto 0;
 border-radius:10px;background:linear-gradient(180deg,#102c4a00,#102c4acc 35%)
}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-actions .uprank-go{
 min-height:44px;width:min(100%,300px);min-width:0;padding:9px 15px;
 font-size:12px;line-height:1.2
}
@media(max-height:760px){
 #playRoot > .uprank-stage.nr163-rankup{gap:4px;padding-block:7px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{width:94px;height:90px;flex-basis:90px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-new svg{max-height:66px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-announcement{font-size:clamp(30px,4vw,45px)}
 #playRoot > .uprank-stage.nr163-rankup .nr196-rank-spark{padding:5px 9px}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards > div{padding:4px 9px}
 #playRoot > .uprank-stage.nr163-rankup .nr143-gold-coin{width:31px;height:31px}
}
@media(max-width:600px){
 /* The phone navigation may wrap to seven rows (including Inbox and Train Cards).
    Use the existing compact spacing at every phone height so Continue remains
    visible; retain the same content, button size and short-screen scrolling. */
 #playRoot > .uprank-stage.nr163-rankup{padding:7px 8px;gap:4px;max-height:calc(100dvh - 155px)}
 #playRoot > .uprank-stage.nr163-rankup .uprank-kicker{font-size:9px;letter-spacing:.1em}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{width:100px;height:94px;flex-basis:94px}
 #playRoot > .uprank-stage.nr163-rankup .nr196-rank-spark{font-size:10px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-explain{font-size:10px}
}
@media(max-height:560px){
 #playRoot > .uprank-stage.nr163-rankup{max-height:calc(100dvh - 140px)}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{width:68px;height:66px;flex-basis:66px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-new svg{max-height:47px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-announcement{font-size:30px}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards strong{font-size:15px}
}



/* Promotion content uses horizontal space on wide screens. A closed roadmap
   stays readable in the panel; opening it can scroll without hiding Continue. */
#playRoot > .uprank-stage.nr163-rankup .uprank-backglow{
 background:none;
 animation:none;
 overflow:clip;
}
#playRoot > .uprank-stage.nr163-rankup .uprank-backglow::before{
 content:"";
 position:absolute;
 inset:-40%;
 background:conic-gradient(from 20deg,#ffe9a900 0 8%,#f9d27b15 8% 9%,#7ad7ff00 9% 20%,#78baff25 20% 22%,transparent 22% 100%);
 animation:rankRays 10s linear infinite;
}
@media(prefers-reduced-motion:reduce){
 #playRoot > .uprank-stage.nr163-rankup .uprank-backglow::before{animation:none}
}
#playRoot > .uprank-stage.nr163-rankup .nr-deck-journey{
 box-sizing:border-box;
 width:min(540px,100%);
 gap:4px;
 margin:2px 0;
 padding:8px 11px;
}
#playRoot > .uprank-stage.nr163-rankup .nr-deck-journey strong{font-size:clamp(15px,2vw,18px);line-height:1.2}
#playRoot > .uprank-stage.nr163-rankup .nr-deck-journey small{margin-bottom:3px}
#playRoot > .uprank-stage.nr163-rankup .nr-deck-journey p{margin-top:4px;line-height:1.35}
#playRoot > .uprank-stage.nr163-rankup .nr-deck-journey summary{padding:4px 0}
#playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards > div{
 display:grid;
 grid-template-columns:auto minmax(0,1fr);
 column-gap:8px;
 align-items:center;
 justify-items:start;
 padding:5px 9px;
 text-align:left;
}
#playRoot > .uprank-stage.nr163-rankup .nr143-gold-coin{grid-row:span 2}
@media(min-width:340px){
 #playRoot > .uprank-stage.nr163-rankup {
  display:grid;
  grid-template-columns:minmax(115px,150px) minmax(0,410px);
  grid-template-areas:
   "kicker kicker"
   "shield announcement"
   "shield levels"
   "shield focus"
   "reward spark"
   "journey journey"
   "note note"
   "continue continue";
  align-content:start;
  justify-content:center;
  justify-items:center;
  align-items:center;
  column-gap:clamp(8px,1.15vw,16px);
 }
 #playRoot > .uprank-stage.nr163-rankup .uprank-kicker{grid-area:kicker}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{grid-area:shield;align-self:center}
 #playRoot > .uprank-stage.nr163-rankup .uprank-announcement{grid-area:announcement;font-size:clamp(32px,5vw,52px)}
 #playRoot > .uprank-stage.nr163-rankup .uprank-subline{grid-area:levels}
 #playRoot > .uprank-stage.nr163-rankup .nr163-promotion-focus{grid-area:focus}
 #playRoot > .uprank-stage.nr163-rankup .nr196-rank-spark{grid-area:spark;margin:0}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards{grid-area:reward;min-width:0;width:100%;margin:0}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards strong{font-size:15px}
 #playRoot > .uprank-stage.nr163-rankup .nr-deck-journey{grid-area:journey}
 #playRoot > .uprank-stage.nr163-rankup .uprank-explain{grid-area:note}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-actions{grid-area:continue}
}


@media(min-width:340px) and (max-width:759px){
 #playRoot > .uprank-stage.nr163-rankup {
  grid-template-columns:minmax(82px,110px) minmax(0,1fr);
  column-gap:8px;
 }
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-theatre{width:76px;height:78px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-shield-new svg{max-height:57px}
 #playRoot > .uprank-stage.nr163-rankup .uprank-subline{font-size:13px;letter-spacing:.04em}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards > div{column-gap:5px;padding:5px}
 #playRoot > .uprank-stage.nr163-rankup .nr143-rank-rewards strong{font-size:13px}
 #playRoot > .uprank-stage.nr163-rankup .nr143-gold-coin{width:27px;height:27px;font-size:10px}
}

