/* Stellar Empire v113: explicit private colony management entry on smartphones. */
@media (max-width:760px){
 .game .screen.empire-dashboard > .home-planetline:has(> .colony-control-status-btn){
   display:grid!important;
   grid-template-columns:minmax(0,1fr)!important;
   grid-template-rows:auto auto!important;
   grid-template-areas:"colony" "hud"!important;
   max-height:none!important;
   overflow:visible!important;
   gap:4px!important;
   padding:5px 7px!important;
 }
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn{
   display:flex!important;
   grid-area:colony!important;
   width:100%!important;
   min-width:0!important;
   height:44px!important;
   min-height:44px!important;
   max-height:44px!important;
   align-items:center!important;
   justify-content:center!important;
   gap:9px!important;
   padding:4px 12px!important;
   font-size:13px!important;
   border-radius:9px!important;
 }
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn .compact-planet-icon{
   display:flex!important;
   flex:0 0 25px!important;
   width:25px!important;
   height:25px!important;
 }
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn .home-planet-copy h2{
   display:block!important;
   font-size:14px!important;
   line-height:1.15!important;
   text-align:left;
 }
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn .home-planet-copy small{
   display:block!important;
   font-size:10px!important;
   line-height:1.15!important;
   text-align:left;
 }
 .game .screen.empire-dashboard > .home-planetline:has(> .colony-control-status-btn) > .home-command-hud{
   grid-area:hud!important;
   margin:0!important;
 }
 #overlay .mobile-menu-grid .colony-menu-mobile{
   grid-column:1 / -1;
   min-height:55px!important;
   border:1px solid #6ac0e3!important;
   border-radius:10px!important;
   background:linear-gradient(105deg,#1a5675,#1b3658)!important;
   color:#f0fbff!important;
   font-weight:800!important;
   line-height:1.3!important;
 }
}
@media(max-width:370px){
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn{
   height:42px!important;min-height:42px!important;max-height:42px!important;
 }
 .game .screen.empire-dashboard > .home-planetline > .colony-control-status-btn .home-planet-copy small{
   font-size:9px!important;
 }
}
/* Click a planet AFTER checking its build/research/ship/template eligibility. */
#overlay .cc-root .cc-readiness-toggle{
 display:grid;
 gap:8px;
 width:100%;
 min-width:0;
 min-height:115px;
 font:inherit;
 text-align:left;
 color:#edf8ff;
 cursor:pointer;
 touch-action:manipulation;
 appearance:none;
 -webkit-appearance:none;
 transition:background .14s ease,border-color .14s ease,box-shadow .14s ease;
}
#overlay .cc-root .cc-readiness-toggle.cc-picked{
 border:2px solid #68dfb8;
 background:linear-gradient(110deg,#173f46,#172d45);
 box-shadow:inset 0 0 0 1px #4f997e;
}
#overlay .cc-root .cc-readiness-toggle.cc-unpicked{
 border:2px dashed #6b8499;
 background:linear-gradient(110deg,#1e293e,#17243c);
 color:#c4d2df;
 opacity:.77;
}
#overlay .cc-root .cc-readiness-toggle:hover,
#overlay .cc-root .cc-readiness-toggle:focus-visible{
 border-color:#b3f1ff;
 background:#264660;
 opacity:1;
 outline:2px solid #c6eeff;
 outline-offset:2px;
}
#overlay .cc-root .cc-readiness-toggle:active{transform:scale(.99)}
#overlay .cc-root .cc-readiness-toggle.cc-picked .cc-readiness-header span{
 color:#adffce;
}
#overlay .cc-root .cc-readiness-toggle.cc-unpicked .cc-readiness-header span{
 color:#bfd3e2;
}
#overlay .cc-root .cc-readiness.cc-locked{
 border:1px solid #9c6574;
 background:#372635;
 opacity:.65;
 cursor:not-allowed;
}
#overlay .cc-root .cc-readiness-toggle .cc-cost-pills{
 flex-wrap:wrap;
}
#overlay .cc-root .cc-preview-summary strong{
 white-space:nowrap;
}
@media(max-width:760px){
 #overlay .cc-root .cc-readiness-toggle{
  min-height:105px;
  padding:12px;
 }
 #overlay .cc-root .cc-readiness-header{
  align-items:center;
 }
 #overlay .cc-root .cc-preview-summary{
  align-items:flex-start;
 }
}
/* Smaller screens: the newly visible command card may add one row.  Allow
   scrolling rather than cutting off the planet scene or bottom actions. */
@media(max-width:760px){
 .game .screen.empire-dashboard:has(.colony-control-status-btn){
   overflow-y:auto!important;
   overflow-x:hidden!important;
   overscroll-behavior-y:contain;
   -webkit-overflow-scrolling:touch;
 }
}
