/* 0.6.1: enlarged desktop navigation, clearer resource names,
   and non-overlapping resource detail controls. No change to game logic. */

/* The freed left sidebar height should be used for the buttons, NOT a scrollbar. */
@media (min-width:761px){
  .game .sidebar{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    overflow:visible!important;
    padding:8px 10px 9px!important;
    gap:0!important;
  }
  .game .sidebar .command-tools{
    flex:0 0 auto!important;
    margin:0 0 8px!important;
    gap:6px!important;
  }
  .game .sidebar .command-tools .icon-btn{
    height:36px!important;
    min-height:36px!important;
  }
  .game .sidebar .sidebar-head{
    flex:0 0 auto!important;
    margin:0!important;
    padding:4px 9px 9px!important;
    line-height:1.25!important;
    font-size:11px!important;
    letter-spacing:.15em!important;
  }
  .game .sidebar .nav-main{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    grid-auto-rows:minmax(0,1fr)!important;
    flex:1 1 0%!important;
    min-height:0!important;
    min-width:0!important;
    margin:0!important;
    padding:0 0 9px!important;
    gap:clamp(3px,.65dvh,8px)!important;
    align-items:stretch!important;
    align-content:stretch!important;
    overflow:visible!important;
  }
  .game .sidebar .nav-main>.nav-btn{
    box-sizing:border-box!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    border-radius:9px!important;
    padding:3px 11px!important;
    font-size:clamp(11px,.76vw,13px)!important;
    font-weight:850!important;
    line-height:1.12!important;
    letter-spacing:.005em!important;
    color:#e1f1fc!important;
    text-align:left!important;
    text-shadow:0 1px 1px #071020a8!important;
  }
  .game .sidebar .nav-main>.nav-btn .nav-icon{
    display:inline-flex!important;
    flex:0 0 22px!important;
    align-items:center!important;
    justify-content:center!important;
    width:22px!important;
    min-width:22px!important;
    font-size:19px!important;
    line-height:1!important;
  }
  .game .sidebar .nav-main>.nav-btn.selected{
    border-color:#7ecce6!important;
    box-shadow:inset 3px 0 #8ce9fe,0 2px 8px #0005!important;
  }
  .game .sidebar .sidebar-bottom{
    flex:0 0 auto!important;
    margin:0!important;
    padding:9px 7px!important;
    min-height:49px!important;
    gap:8px!important;
  }
  .game .sidebar .sidebar-bottom strong{font-size:11px!important}
  .game .sidebar .sidebar-bottom small{font-size:9px!important}
}
/* In exceptionally short desktop windows, let the same twelve
   rows adapt without introducing a scrollbar. */
@media (min-width:761px) and (max-height:680px){
  .game .sidebar{padding:5px 7px 6px!important}
  .game .sidebar .command-tools{margin-bottom:3px!important}
  .game .sidebar .command-tools .icon-btn{height:30px!important;min-height:30px!important}
  .game .sidebar .sidebar-head{padding:2px 6px 5px!important}
  .game .sidebar .nav-main{gap:3px!important;padding-bottom:5px!important}
  .game .sidebar .nav-main>.nav-btn{
    padding:1px 7px!important;
    gap:6px!important;
    font-size:11px!important;
  }
  .game .sidebar .nav-main>.nav-btn .nav-icon{
    font-size:15px!important;
    flex-basis:19px!important;width:19px!important;min-width:19px!important;
  }
  .game .sidebar .sidebar-bottom{min-height:43px!important;padding:5px!important}
}
/* Reserve a real horizontal header row for all three controls; previously the
   grid-styled "Details" button stacked its icon and text into the tiles below. */
.game .screen.empire-dashboard>#resourceStripInline{
  height:120px!important;
  min-height:120px!important;
  max-height:120px!important;
  flex:0 0 120px!important;
  padding:5px 7px 6px!important;
  gap:4px!important;
}
.game .screen.empire-dashboard>#resourceStripInline>.resource-strip-head{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  box-sizing:border-box!important;
  flex:0 0 25px!important;
  min-height:25px!important;
  height:25px!important;
  max-height:25px!important;
  gap:9px!important;
  position:relative!important;
  z-index:3!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading{
  flex:1 1 auto!important;
  overflow:hidden!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading strong{
  font-size:11px!important;
  letter-spacing:.07em!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading small{
  font-size:10px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-scope{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  height:24px!important;
  min-height:24px!important;
  align-items:center!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-scope button{
  height:21px!important;
  padding:2px 9px!important;
  font-size:10px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-expand{
  box-sizing:border-box!important;
  position:static!important;
  display:inline-flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  height:25px!important;
  min-height:25px!important;
  max-height:25px!important;
  min-width:88px!important;
  width:auto!important;
  padding:2px 11px!important;
  margin:0!important;
  gap:6px!important;
  line-height:1!important;
  font-size:15px!important;
  font-weight:850!important;
  white-space:nowrap!important;
  border-radius:7px!important;
  z-index:3!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-expand span{
  display:inline-block!important;
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  color:#e3f5ff!important;
}
.game .screen.empire-dashboard>#resourceStripInline>.resource-rail{
  z-index:1!important;
  position:relative!important;
  min-height:0!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile{
  padding:4px 3px 3px!important;
  gap:1px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
  flex:0 0 32px!important;
  height:32px!important;
  max-height:32px!important;
  width:42px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
  gap:2px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-name{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  padding:1px 4px!important;
  margin:0!important;
  border-radius:4px!important;
  background:rgba(3,12,28,.90)!important;
  border:1px solid #9fc5db25!important;
  color:#f4faff!important;
  font-size:clamp(10px,.70vw,12px)!important;
  line-height:13px!important;
  font-weight:900!important;
  letter-spacing:0!important;
  text-shadow:0 1px 2px #000!important;
  text-align:center!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-amount{
  font-size:clamp(12px,.9vw,15px)!important;
  line-height:15px!important;
  font-weight:900!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-rate{
  font-size:clamp(9px,.68vw,11px)!important;
  line-height:11px!important;
  font-weight:850!important;
}
/* Narrow desktop and tablets retain a 5x2 grid and enlarged labels,
   without allowing the row to become taller than in v060. */
@media (min-width:761px) and (max-width:1270px){
 .game .screen.empire-dashboard>#resourceStripInline{
   height:133px!important;min-height:133px!important;
   max-height:133px!important;flex-basis:133px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile{
   flex-direction:row!important;
   align-items:center!important;
   padding:2px 4px!important;
   gap:5px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
   width:34px!important;height:34px!important;max-height:34px!important;flex-basis:34px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
   gap:1px!important;align-items:flex-start!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-name{
   font-size:11px!important;line-height:12px!important;
   text-align:left!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-amount{
   font-size:12px!important;text-align:left!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-rate{
   font-size:10px!important;text-align:left!important;
 }
}
/* Smartphone: resource bar uses five cards x two rows, not tiny horizontal
   scrolling. Keep the existing total height and readable name chips. */
@media (max-width:760px){
 .game .screen.empire-dashboard>#resourceStripInline{
   height:148px!important;min-height:148px!important;max-height:148px!important;
   flex:0 0 148px!important;
   padding:4px 5px 5px!important;
   gap:3px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline>.resource-strip-head{
   flex:0 0 23px!important;
   height:23px!important;min-height:23px!important;max-height:23px!important;
   gap:4px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-scope{
   height:22px!important;min-height:22px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-scope button{
   height:20px!important;
   padding:1px 5px!important;
   font-size:9px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-expand{
   display:flex!important;
   min-width:29px!important;width:29px!important;
   height:23px!important;min-height:23px!important;max-height:23px!important;
   padding:0!important;
   font-size:16px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-expand span{
   display:none!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile{
   flex-direction:column!important;
   align-items:center!important;
   padding:2px 1px!important;
   gap:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
   width:29px!important;height:21px!important;max-height:21px!important;flex-basis:21px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
   align-items:center!important;gap:1px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-name{
   font-size:clamp(8px,2.25vw,10px)!important;
   line-height:11px!important;
   padding:0 1px!important;
   border:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-amount{
   font-size:clamp(9px,2.8vw,11px)!important;
   line-height:12px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-rate{
   font-size:clamp(8px,2.12vw,9px)!important;
   line-height:10px!important;
 }
}
@media(max-width:760px) and (max-height:700px){
 .game .screen.empire-dashboard>#resourceStripInline{
   height:131px!important;min-height:131px!important;max-height:131px!important;
   flex-basis:131px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
   width:24px!important;height:17px!important;max-height:17px!important;flex-basis:17px!important;
 }
}
@media(max-width:760px) and (max-height:570px){
 .game .screen.empire-dashboard>#resourceStripInline{
   height:111px!important;min-height:111px!important;max-height:111px!important;
   flex-basis:111px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{display:none!important}
}
@media(min-width:761px) and (max-height:680px){
 .game .screen.empire-dashboard>#resourceStripInline{
   height:99px!important;min-height:99px!important;max-height:99px!important;
   flex-basis:99px!important;
   padding:3px 5px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline>.resource-strip-head{
   flex-basis:23px!important;height:23px!important;min-height:23px!important;max-height:23px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
   height:23px!important;max-height:23px!important;flex-basis:23px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-name{
   font-size:10px!important;line-height:11px!important;padding:0 1px!important;
 }
}
