/* -----------------------------------------------------------
   GLOBAL: tower is no longer a fake fullscreen page.
   The real game topbar (Gold / currencies / navigation) stays.
   ----------------------------------------------------------- */
body:has(#tower.active){
  overflow-x:hidden!important;
}
body:has(#tower.active) main{
  width:auto!important;
  max-width:none!important;
  margin:0!important;
}
body:has(#tower.active) #tower.active{
  width:min(100%,820px)!important;
  max-width:820px!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:calc(var(--v654-hud-bottom, 82px) + 8px) 0 22px!important;
  scroll-padding-top:calc(var(--v654-hud-bottom, 82px) + 8px)!important;
}

/* -----------------------------------------------------------
   HEADER: old absolute round buttons squeezed the title into
   one tiny grid cell. Reset them to real grid items.
   ----------------------------------------------------------- */
#tower .v6259-head{
  position:relative!important;
  top:auto!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr) 46px!important;
  align-items:center!important;
  gap:9px!important;
  min-height:76px!important;
  padding:9px 11px!important;
  margin:0 0 9px!important;
}
#tower .v6259-head-copy{
  grid-column:2!important;
  min-width:0!important;
  text-align:center!important;
  overflow:visible!important;
}
#tower .v6259-head h2{
  display:block!important;
  margin:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:21px!important;
  line-height:1.05!important;
  letter-spacing:.02em!important;
}
#tower .v6259-head span{
  display:block!important;
  margin-top:5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:8px!important;
}
#tower .v6259-round,
#tower .v6259-round:first-child,
#tower .v6259-round.crown{
  position:static!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;
  width:44px!important;
  height:44px!important;
  margin:0!important;
  justify-self:center!important;
}
#tower .v6259-round.crown{
  font-size:20px!important;
}

/* -----------------------------------------------------------
   LOBBY: undo old absolute overlay. Picture and run card are
   now two real columns. This also stops the card hiding tower.
   ----------------------------------------------------------- */
#tower .v6259-lobby{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr)!important;
  align-items:stretch!important;
  gap:8px!important;
  min-height:330px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding:0!important;
  margin:0!important;
}
#tower .v6259-lobby:after{
  display:none!important;
  content:none!important;
}
#tower .v6259-tower-picture{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:330px!important;
  max-height:none!important;
  margin:0!important;
  border-radius:16px!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  /* source artwork has the actual tower on the right side */
  background-position:72% center!important;
}
#tower .v6259-lobby-card{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  height:auto!important;
  min-height:330px!important;
  max-height:none!important;
  margin:0!important;
  align-self:stretch!important;
  padding:10px 9px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  overflow:visible!important;
}
#tower .v6259-lobby-card>small{
  font-size:7px!important;
}
#tower .v6259-lobby-card>strong{
  font-size:27px!important;
  margin:2px 0 4px!important;
}
#tower .v6259-lobby-row{
  min-height:25px!important;
  padding:4px 1px!important;
  font-size:7.4px!important;
}
#tower .v6259-lobby-card .v6259-hp{
  height:9px!important;
  margin:3px 0!important;
}
#tower .v6267-recovery-note{
  margin:4px 0 5px!important;
  font-size:6.4px!important;
  line-height:1.3!important;
}
#tower .v6267-recover-inline{
  min-height:42px!important;
  margin:5px 0 6px!important;
  padding:7px 5px!important;
  font-size:7.3px!important;
  line-height:1.25!important;
}
#tower .v6267-recover-inline small{
  margin-top:2px!important;
  font-size:6.2px!important;
}
#tower .v6259-lobby-card .v6259-main-btn{
  min-height:43px!important;
  margin-top:7px!important;
  font-size:9px!important;
}

/* Rankings stay scrollable. */
#tower .v6269-lobby-leader{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
}

@media(max-width:520px){
  #tower .vT-wrap{padding:0 6px 18px!important}
  #tower .v6259-head{
    grid-template-columns:42px minmax(0,1fr) 42px!important;
    min-height:70px!important;
    padding:8px!important;
    gap:6px!important;
  }
  #tower .v6259-round,
  #tower .v6259-round:first-child,
  #tower .v6259-round.crown{
    width:40px!important;height:40px!important;
  }
  #tower .v6259-head h2{font-size:18px!important}
  #tower .v6259-head span{font-size:6.8px!important}

  #tower .v6259-lobby{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:6px!important;
    min-height:305px!important;
  }
  #tower .v6259-tower-picture{
    min-height:305px!important;
    background-position:70% center!important;
  }
  #tower .v6259-lobby-card{
    min-height:305px!important;
    padding:8px 6px!important;
  }
  #tower .v6259-lobby-card>strong{font-size:24px!important}
  #tower .v6259-lobby-row{font-size:6.8px!important;min-height:23px!important}
  #tower .v6267-recovery-note{font-size:5.9px!important}
  #tower .v6267-recover-inline{font-size:6.8px!important;min-height:40px!important}
  #tower .v6259-lobby-card .v6259-main-btn{min-height:40px!important;font-size:8.2px!important}
}

@media(max-width:380px){
  #tower .v6259-head h2{font-size:16.5px!important}
  #tower .v6259-head span{font-size:6.2px!important}
  #tower .v6259-lobby{min-height:295px!important}
  #tower .v6259-tower-picture{min-height:295px!important;background-position:74% center!important}
  #tower .v6259-lobby-card{min-height:295px!important}
  #tower .v6259-lobby-row{font-size:6.3px!important}
}
