/* STELLAR EMPIRE 0.6.0 – accepted design B:
   1. Planet / user / credits / energy / colonies / fleets
   2. Resource cards with actual stock and net/min
   3. Lalonde panorama, then the five original command buttons.

   Non-home resources remain available in their original location for
   compatibility. All original resource/button click actions are preserved.
*/
/* Stop dedicating a full-width row above the sidebar on the home dashboard. */
.game:has(.screen.empire-dashboard){
 --resource-strip-height:0px!important;
}
.game:has(.screen.empire-dashboard)>#resourceStrip{
 display:none!important;
 height:0!important;min-height:0!important;max-height:0!important;
 padding:0!important;margin:0!important;border:0!important;
 flex:0 0 0!important;
}
/* Base resource bar inside the game, immediately after live status chips. */
.game .screen.empire-dashboard>#resourceStripInline{
 --resource-strip-height:109px;
 box-sizing:border-box!important;
 display:flex!important;
 flex-direction:column!important;
 align-items:stretch!important;
 width:100%!important;
 height:109px!important;
 min-height:109px!important;
 max-height:109px!important;
 flex:0 0 109px!important;
 margin:0!important;
 padding:4px 7px 6px!important;
 gap:4px!important;
 border:1px solid #415e86!important;
 border-radius:11px!important;
 background:linear-gradient(105deg,#0d2137ed,#132240ef 62%,#111b36ed)!important;
 box-shadow:inset 0 1px #bbebff19,0 6px 16px #0005!important;
 overflow:hidden!important;
 position:relative!important;
 z-index:2!important;
}
.game .screen.empire-dashboard>#resourceStripInline:after{display:none!important}
.game .screen.empire-dashboard>#resourceStripInline>.resource-strip-head{
 box-sizing:border-box!important;
 flex:0 0 19px!important;
 display:flex!important;
 flex-direction:row!important;
 justify-content:space-between!important;
 align-items:center!important;
 width:100%!important;
 min-width:0!important;
 min-height:19px!important;
 height:19px!important;
 max-height:19px!important;
 gap:7px!important;
 margin:0!important;padding:0!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading{
 display:flex!important;flex:1 1 auto!important;min-width:0!important;
 flex-direction:row!important;gap:5px!important;
 align-items:center!important;justify-content:flex-start!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading>.resource-orbit{
 font-size:14px!important;line-height:1!important;color:#7ce8f1!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading>span:last-child{
 display:flex!important;
 flex-direction:row!important;
 align-items:baseline!important;
 gap:9px!important;
 min-width:0!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading strong{
 font-size:10px!important;line-height:1.1!important;
 font-weight:900!important;white-space:nowrap!important;
 color:#d8eaf9!important;letter-spacing:.09em!important;
}
.game .screen.empire-dashboard>#resourceStripInline .strip-heading small{
 display:block!important;
 font-size:9px!important;line-height:1.1!important;
 margin:0!important;padding:0!important;
 width:auto!important;max-width:none!important;
 color:#86a8c5!important;
 overflow:hidden!important;
 white-space:nowrap!important;
 text-overflow:ellipsis!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-scope{
 display:flex!important;
 flex:0 0 auto!important;
 gap:2px!important;
 width:auto!important;
 min-width:0!important;
 max-width:none!important;
 height:19px!important;
 padding:1px!important;
 margin:0!important;
 align-items:stretch!important;
 border:1px solid #5e7993!important;
 border-radius:6px!important;
 background:#09172c80!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-scope button{
 display:flex!important;align-items:center!important;justify-content:center!important;
 min-width:0!important;max-width:none!important;
 padding:1px 7px!important;
 font-size:9px!important;line-height:1.1!important;
 font-weight:750!important;
 border-radius:5px!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-expand{
 display:grid!important;place-items:center!important;
 flex:0 0 auto!important;
 position:static!important;
 height:19px!important;min-height:19px!important;
 min-width:29px!important;
 padding:1px 7px!important;
 font-size:13px!important;line-height:1!important;
 border:1px solid #587999!important;
 border-radius:6px!important;
 color:#c9e6fc!important;
 background:#172c48!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-expand span{
 display:inline!important;
 font-size:9px!important;
 margin-left:4px!important;
}
.game .screen.empire-dashboard>#resourceStripInline>.resource-rail{
 box-sizing:border-box!important;
 display:grid!important;
 grid-template-columns:repeat(10,minmax(0,1fr))!important;
 grid-template-rows:minmax(0,1fr)!important;
 flex:1 1 auto!important;
 width:100%!important;
 min-width:0!important;min-height:0!important;
 height:auto!important;max-height:none!important;
 overflow:hidden!important;
 align-items:stretch!important;
 justify-items:stretch!important;
 align-content:stretch!important;
 gap:5px!important;
 padding:0!important;
 margin:0!important;
 scroll-snap-type:none!important;
}
/* Fully clickable button: icon (cropped from user's original art), name, stock, rate.
   No painted-in text from the source image competes with the live figures. */
.game .screen.empire-dashboard>#resourceStripInline .resource-tile{
 box-sizing:border-box!important;
 isolation:isolate!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 align-items:center!important;
 flex:1 1 auto!important;
 width:100%!important;
 min-width:0!important;
 max-width:100%!important;
 height:100%!important;
 min-height:0!important;
 max-height:100%!important;
 padding:3px 2px 2px!important;
 gap:1px!important;
 overflow:hidden!important;
 border:1px solid color-mix(in srgb,var(--resource-color) 46%,#385371)!important;
 border-radius:8px!important;
 color:#f1f9ff!important;
 background:linear-gradient(165deg,#11233de5,#091629ed)!important;
 box-shadow:inset 0 1px #c5e8ff20!important;
 text-align:center!important;
 transform:none;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile:after{
 content:none!important;display:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.resource-photo-background{
 display:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-symbol{
 display:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
 display:flex!important;
 align-items:center!important;justify-content:center!important;
 position:relative!important;z-index:2!important;
 flex:0 0 34px!important;
 min-height:0!important;max-height:34px!important;
 width:41px!important;height:34px!important;
 background:transparent!important;
 border:0!important;
 overflow:hidden!important;
 pointer-events:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-v060-iconwrap img{
 display:block!important;
 width:100%!important;height:100%!important;
 object-fit:contain!important;
 border-radius:5px!important;
 filter:drop-shadow(0 0 5px color-mix(in srgb,var(--resource-color) 30%,transparent));
 pointer-events:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
 display:flex!important;
 flex:0 0 auto!important;
 flex-direction:column!important;
 align-items:center!important;
 justify-content:center!important;
 min-width:0!important;
 width:100%!important;
 height:auto!important;min-height:0!important;max-height:none!important;
 margin:0!important;padding:0!important;gap:1px!important;
 background:none!important;border:0!important;
 z-index:2!important;position:relative!important;
 text-align:center!important;text-shadow:none!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-name{
 display:block!important;
 font-size:9px!important;font-weight:750!important;
 line-height:10px!important;
 letter-spacing:0!important;
 color:#b8cfe2!important;
 white-space:nowrap!important;
 width:100%!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-amount{
 display:block!important;
 font-size:clamp(11px,.85vw,15px)!important;
 font-weight:900!important;
 line-height:15px!important;
 letter-spacing:0!important;
 color:#f7fbff!important;
 font-variant-numeric:tabular-nums!important;
 width:100%!important;
 max-width:100%!important;
 white-space:nowrap!important;
 overflow:hidden!important;
}
.game .screen.empire-dashboard>#resourceStripInline .res-rate{
 display:block!important;
 font-size:10px!important;font-weight:820!important;
 line-height:11px!important;letter-spacing:0!important;
 white-space:nowrap!important;
 max-width:100%!important;
 overflow:hidden!important;
}
.game .screen.empire-dashboard>#resourceStripInline .resource-tile:hover,
.game .screen.empire-dashboard>#resourceStripInline .resource-tile:focus-visible{
 border-color:var(--resource-color)!important;
 background:linear-gradient(160deg,#1e3755,#0c2338)!important;
 box-shadow:0 0 13px color-mix(in srgb,var(--resource-color) 32%,transparent)!important;
 transform:translateY(-1px)!important;
 outline-offset:-2px;
}
/* Keep 5x2 cards on small laptops/tablets so amounts stay readable. */
@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-rail{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  gap:3px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile{
  flex-direction:row!important;
  text-align:left!important;
  justify-content:center!important;
  gap:5px!important;
  padding:2px 4px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
  flex:0 0 33px!important;width:33px!important;height:33px!important;max-height:33px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
  align-items:flex-start!important;
  width:auto!important;flex:1 1 auto!important;
  text-align:left!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-name{
  font-size:9px!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:9px!important;text-align:left!important;
 }
}
/* Mobile: status, 5x2 resources, panorama, five functional action tiles.
   No sideways scrolling or resource ribbon at top of entire app. */
@media(max-width:760px){
 .game:has(.screen.empire-dashboard){
  --resource-strip-height:0px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline{
  box-sizing:border-box!important;
  height:148px!important;
  min-height:148px!important;max-height:148px!important;
  flex:0 0 148px!important;
  padding:3px 5px 4px!important;
  gap:3px!important;
  border-radius:9px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline>.resource-strip-head{
  height:20px!important;min-height:20px!important;
  max-height:20px!important;flex-basis:20px!important;
  gap:3px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .strip-heading{
  gap:3px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .strip-heading strong{
  font-size:9px!important;letter-spacing:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .strip-heading small{
  display:none!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-orbit{
  font-size:12px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-scope{
  height:19px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-scope button{
  padding:0 5px!important;font-size:8px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-expand{
  height:20px!important;min-height:20px!important;
  width:25px!important;min-width:25px!important;
  font-size:13px!important;padding:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-expand span{
  display:none!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline>.resource-rail{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  width:100%!important;max-width:100%!important;
  gap:3px!important;
  padding:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile{
  display:flex!important;
  flex-direction:column!important;
  padding:2px 1px!important;
  justify-content:center!important;
  align-items:center!important;
  gap:0!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
  flex:0 0 21px!important;width:28px!important;
  height:21px!important;max-height:21px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
  width:100%!important;align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:1px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-name{
  font-size:clamp(7px,2vw,9px)!important;
  line-height:8px!important;
  font-weight:750!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-amount{
  font-size:clamp(8.7px,2.7vw,11px)!important;
  line-height:12px!important;
  font-weight:900!important;
  letter-spacing:-.2px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .res-rate{
  font-size:clamp(7.5px,2.05vw,9px)!important;
  line-height:10px!important;
 }
 .game .screen.empire-dashboard>.colony-scene{
  flex:1 1 0!important;min-height:70px!important;
 }
}
/* Keep the original 5 buttons reachable on short phones. */
@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{
  height:17px!important;max-height:17px!important;flex-basis:17px!important;
  width:25px!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;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-data{
  flex:1!important;
 }
}
/* Dense desktop: do not let the resources consume the last part of the panorama. */
@media(min-width:761px) and (max-height:680px){
 .game .screen.empire-dashboard>#resourceStripInline{
  height:96px!important;min-height:96px!important;
  max-height:96px!important;flex-basis:96px!important;
 }
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile>.res-v060-iconwrap{
  height:25px!important;max-height:25px!important;flex-basis:25px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 .game .screen.empire-dashboard>#resourceStripInline .resource-tile{
  transition:none!important;
 }
}
