/* Stellar Empire v112 – the seven-planet selector must never clip its cards.
   It scrolls horizontally, so Chromium reserves space for a horizontal
   scrollbar. The old 52 / 41 / 39 px max-heights were smaller than a card
   plus the scrollbar and cropped the top/bottom of planet pills. */
.game .screen.empire-dashboard > .planet-tabs {
  box-sizing:border-box;
  flex:0 0 80px !important;
  height:80px !important;
  min-height:80px !important;
  max-height:none !important;
  padding:5px 4px 13px !important;
  margin:0 !important;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:#7e92b1 #0b1a32;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.game .screen.empire-dashboard > .planet-tabs .planet-pill {
  box-sizing:border-box;
  flex-shrink:0;
  height:43px !important;
  min-height:43px !important;
  max-height:43px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px !important;
  white-space:nowrap;
  overflow:hidden;
}
.game .screen.empire-dashboard > .planet-tabs .planet-tab-title {
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.25;
}
.game .screen.empire-dashboard > .planet-tabs .planet-tab-title small {
  display:block;
  font-size:9px;
  line-height:1.2;
  margin-top:2px;
}
/* Short laptop windows: keep the full text and reserve scrollbar room. */
@media (max-height:820px) and (min-width:761px) {
  .game .screen.empire-dashboard > .planet-tabs {
    flex-basis:70px !important;
    height:70px !important;
    min-height:70px !important;
    padding:4px 3px 12px !important;
  }
  .game .screen.empire-dashboard > .planet-tabs .planet-pill {
    height:35px !important;
    min-height:35px !important;
    max-height:35px;
    padding:3px 8px !important;
  }
  .game .screen.empire-dashboard > .planet-tabs .planet-tab-title small {
    font-size:8px;
    margin-top:1px;
  }
}
/* Smartphone / installed PWA: keep all planet names legible while leaving
   enough space for touch scrolling and the horizontal scrollbar. */
@media (max-width:760px) {
  .game .screen.empire-dashboard > .planet-tabs {
    flex-basis:68px !important;
    height:68px !important;
    min-height:68px !important;
    padding:4px 3px 12px !important;
    gap:6px;
    touch-action:pan-x;
  }
  .game .screen.empire-dashboard > .planet-tabs .planet-pill {
    height:34px !important;
    min-height:34px !important;
    max-height:34px;
    padding:3px 8px !important;
  }
  .game .screen.empire-dashboard > .planet-tabs .planet-tab-title small {
    display:none;
  }
}
