/* Tower visual emphasis: desktop and mobile. The book stack remains data-driven. */
#towerView .tower-layout{
  grid-template-columns:minmax(0,1.27fr) minmax(0,1fr);
  gap:20px;
}
#towerView .tower-card{
  min-height:610px;
  padding:25px 20px 28px;
}
#towerView .tower-meta{
  top:25px;
  left:24px;
  right:24px;
}
#towerView .tower{
  width:min(480px,99%) !important;
  max-width:100%;
  gap:4px;
  margin-top:145px;
}
#towerView .tower .spine{
  min-height:19px !important;
  height:19px !important;
  font-size:10px !important;
  letter-spacing:0.01em;
  padding-inline:8px;
  line-height:1;
}
#towerView .floor-shadow{
  width:88%;
}
/* Keep the illustration near its caption rather than marooned at the bottom
   of a tall card. This is independent of whichever tower comparison runtime
   supplies the books and chair. */
#towerView .tower-card:before{
  background:linear-gradient(to bottom,#f9f4e9 0,#f9f4e9 49%,#e8ddca 49%,#e8ddca 50.5%,#f3eadc 50.5%);
}
#towerView .tower-meta .big{font-size:clamp(30px,3.6vw,39px)}

/* Keep tall stacks from being cropped inside the illustration card. */
#towerView .tower:has(.spine:nth-child(n+31)){gap:3px}
#towerView .tower:has(.spine:nth-child(n+31)) .spine{
  height:14px !important;
  min-height:14px !important;
  font-size:9px !important;
}
#towerView .tower-card:has(.tower .spine:nth-child(n+31)){min-height:760px}
#towerView .tower:has(.spine:nth-child(n+46)) .spine{
  height:11px !important;
  min-height:11px !important;
  font-size:8px !important;
}
#towerView .tower-card:has(.tower .spine:nth-child(n+46)){min-height:850px}
#towerView .tower:has(.spine:nth-child(n+61)){gap:2px}
#towerView .tower:has(.spine:nth-child(n+61)) .spine{
  height:9px !important;
  min-height:9px !important;
  font-size:8px !important;
}
#towerView .tower-card:has(.tower .spine:nth-child(n+61)){min-height:1080px}
@media (max-width:900px){
  #towerView .tower-layout{
    grid-template-columns:minmax(0,1fr);
  }
  #towerView .tower-card{
    min-height:610px;
  }
  #towerView .tower{
    width:min(450px,96%) !important;
  }
}
@media (max-width:520px){
  #towerView .tower-card{
    min-height:560px;
    padding:22px 10px 26px;
  }
  #towerView .tower-meta{
    left:20px;
    right:20px;
  }
  #towerView .tower{
    width:min(350px,93%) !important;
    gap:3px;
  }
  #towerView .tower .spine{
    min-height:15px !important;
    height:15px !important;
    font-size:9px !important;
  }
}
@media (max-width:380px){
  #towerView .tower{
    width:min(300px,90%) !important;
  }
}
