/* Stellar Empire v0.6.70: readable compact shipyard, true trained stats. */
#overlay .dialog:has(.shipyard-compact-view){
 width:min(100%,77rem)!important;max-width:min(100%,77rem)!important;
}
#overlay .shipyard-compact-view{width:100%;min-width:0;display:grid;gap:10px}
#overlay .shipyard-compact-view>.popup-section-blurb{margin:0}
#overlay .shipyard-compact-grid.grid3{
 display:grid!important;
 grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))!important;
 grid-auto-rows:auto!important;
 gap:9px!important;align-items:stretch!important;min-width:0!important;
}
#overlay .shipyard-compact-card{
 box-sizing:border-box;
 display:flex!important;flex-direction:column!important;
 gap:7px!important;min-width:0!important;min-height:0!important;
 padding:9px!important;border-radius:11px;
}
#overlay .shipyard-compact-card>.stellar-picture,
#overlay .shipyard-compact-card>.stellar-ship-art{
 box-sizing:border-box;
 display:block!important;
 width:100%!important;min-width:0!important;
 height:112px!important;min-height:112px!important;max-height:112px!important;
 flex:0 0 112px!important;overflow:hidden!important;
 border-radius:9px!important;
 background:radial-gradient(ellipse at center,#284d6c,#0a1a2c 78%)!important;
}
#overlay .shipyard-compact-card>.stellar-picture img,
#overlay .shipyard-compact-card>.stellar-ship-art img,
#overlay .shipyard-compact-card>.stellar-ship-art svg{
 display:block!important;width:100%!important;height:100%!important;
 object-fit:contain!important;object-position:center!important;
}
#overlay .shipyard-compact-heading{
 display:flex;align-items:baseline;justify-content:space-between;
 gap:7px;min-width:0;flex-wrap:wrap;
}
#overlay .shipyard-compact-heading h3{
 margin:0;font-size:clamp(13px,1.5vw,17px);line-height:1.25;
 font-weight:850;overflow-wrap:anywhere;
}
#overlay .shipyard-compact-heading>small{
 color:#9bc5df;font-size:10px;line-height:1.3;
}
#overlay .shipyard-compact-description{
 margin:0!important;color:#bed3e7;font-size:11px;line-height:1.4;
 white-space:normal!important;overflow-wrap:anywhere;
}
#overlay .shipyard-compact-card .shipyard-stats{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:5px!important;margin:0!important;
}
#overlay .shipyard-compact-card .shipyard-stats>div{
 box-sizing:border-box;
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;
 gap:3px!important;align-content:start;
 min-width:0!important;margin:0!important;padding:7px 8px!important;
 border:1px solid #466985!important;
 background:rgba(12,37,61,.83);border-radius:8px;
}
#overlay .shipyard-compact-card .shipyard-stats dt{
 font-size:11px!important;line-height:1.25!important;color:#bcd9ed;
}
#overlay .shipyard-compact-card .shipyard-stats dd{
 margin:0!important;min-width:0!important;
 font-variant-numeric:tabular-nums;font-size:17px!important;
 font-weight:850!important;line-height:1.2!important;
 color:#eefaff;overflow-wrap:anywhere;
}
#overlay .shipyard-compact-card .shipyard-stats>div.shipyard-stat-boosted{
 border-color:#3b987a!important;
 background:linear-gradient(135deg,rgba(13,71,53,.65),rgba(10,45,55,.83));
}
#overlay .shipyard-compact-card .shipyard-stats dd:has(.shipyard-research-bonus){
 color:#79ffb4!important;text-shadow:0 0 10px #4af39a34;
}
#overlay .shipyard-compact-card .shipyard-research-bonus{
 display:block;font-size:10px;font-weight:750;line-height:1.35;
 color:#a4ffce!important;letter-spacing:0;
}
#overlay .shipyard-compact-requirements,
#overlay .shipyard-compact-cost{
 display:grid;gap:5px;min-width:0;
}
#overlay .shipyard-compact-requirements>strong,
#overlay .shipyard-compact-cost>strong{
 font-size:11px!important;color:#c6dfef;line-height:1.25;
}
#overlay .shipyard-compact-requirements ul{
 display:flex!important;flex-wrap:wrap!important;
 padding:0!important;margin:0!important;gap:4px!important;list-style:none!important;
}
#overlay .shipyard-compact-requirements li{
 display:inline-flex!important;align-items:center;
 margin:0!important;padding:4px 6px!important;
 border:1px solid rgba(96,156,194,.5);border-radius:5px;
 background:rgba(14,36,58,.8);
 font-size:10px!important;line-height:1.3;min-width:0;
 overflow-wrap:anywhere;
}
#overlay .shipyard-compact-requirements li.success{
 border-color:#478b74;background:rgba(11,66,46,.65);
}
#overlay .shipyard-compact-requirements li.shipyard-requirement-missing{
 border-color:#ae666e;color:#ffd4d5;background:rgba(78,25,38,.55);
}
#overlay .shipyard-compact-cost .shipyard-costs{margin:0!important;min-width:0}
#overlay .shipyard-compact-cost .modal-cost{
 display:flex!important;flex-wrap:wrap!important;gap:5px!important;
 margin:0!important;padding:0!important;min-width:0;
}
#overlay .shipyard-compact-cost .modal-cost>span,
#overlay .shipyard-compact-cost .resource-cost-chip{
 margin:0!important;font-size:10px!important;
 line-height:1.3!important;
}
#overlay .shipyard-compact-card .shipyard-actions{
 display:flex!important;align-items:center!important;gap:6px!important;
 flex-wrap:wrap!important; margin-top:auto!important;padding-top:6px!important;
}
#overlay .shipyard-compact-card .shipyard-actions>button{
 min-height:36px!important;padding:7px 10px!important;
 flex:1 1 105px;font-size:12px;white-space:normal;
}
#overlay .population-housing-banner{
 display:grid;gap:6px;min-width:0;
 padding:11px 13px;margin:9px 0;
 border:1px solid #508d9a;border-radius:10px;
 background:linear-gradient(120deg,#153746,#122b3f);
 font-size:12px;line-height:1.55;color:#e5f5ff;
}
#overlay .population-housing-banner>strong{font-size:14px}
#overlay .population-housing-banner.housing-grace{
 border-color:#ce995d;background:linear-gradient(120deg,#3e301d,#282941);
}
#overlay .population-housing-banner.housing-danger{
 border-color:#d5767c;background:linear-gradient(120deg,#502438,#291d3e);
}
#overlay .population-housing-banner.housing-ok{
 border-color:#488a75;
}
@media(max-width:760px){
 #overlay .shipyard-compact-grid.grid3{
  grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr))!important;
  gap:7px!important;
 }
 #overlay .shipyard-compact-card{padding:7px!important;gap:6px!important}
 #overlay .shipyard-compact-card>.stellar-picture,
 #overlay .shipyard-compact-card>.stellar-ship-art{
  height:100px!important;min-height:100px!important;max-height:100px!important;
  flex-basis:100px!important;
 }
 #overlay .shipyard-compact-heading h3{font-size:14px}
 #overlay .shipyard-compact-card .shipyard-stats dd{font-size:16px!important}
 #overlay .shipyard-compact-card .shipyard-actions>button{font-size:11px}
}
@media(max-width:440px){
 #overlay .shipyard-compact-grid.grid3{grid-template-columns:1fr!important}
 #overlay .shipyard-compact-card>.stellar-picture,
 #overlay .shipyard-compact-card>.stellar-ship-art{
  height:116px!important;min-height:116px!important;max-height:116px!important;
  flex-basis:116px!important;
 }
}

/* Same authoritative researched values also appear in the single-ship
   construction dialog and gallery detail, not only the compact catalog. */
#overlay .shipyard-build-stats .shipyard-stats,
#overlay .shipyard-gallery-stats .shipyard-stats{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:7px!important;margin:8px 0 12px!important;
}
#overlay .shipyard-build-stats .shipyard-stats>div,
#overlay .shipyard-gallery-stats .shipyard-stats>div{
 display:grid!important;grid-template-columns:1fr!important;gap:4px!important;
 border:1px solid #466985;border-radius:8px;
 padding:9px;background:rgba(14,40,62,.88);min-width:0;
}
#overlay .shipyard-build-stats .shipyard-stats dt,
#overlay .shipyard-gallery-stats .shipyard-stats dt{
 color:#bdd8e8;font-size:11px;line-height:1.3;
}
#overlay .shipyard-build-stats .shipyard-stats dd,
#overlay .shipyard-gallery-stats .shipyard-stats dd{
 font-size:20px;color:#eafbff;font-weight:850;margin:0;line-height:1.25;
 font-variant-numeric:tabular-nums;
}
#overlay .shipyard-build-stats .shipyard-stats>.shipyard-stat-boosted,
#overlay .shipyard-gallery-stats .shipyard-stats>.shipyard-stat-boosted{
 border-color:#419d7b;background:#103e36;
}
#overlay .shipyard-build-stats .shipyard-stats>.shipyard-stat-boosted dd,
#overlay .shipyard-gallery-stats .shipyard-stats>.shipyard-stat-boosted dd{
 color:#79ffb4!important;
}
#overlay .shipyard-build-stats .shipyard-research-bonus,
#overlay .shipyard-gallery-stats .shipyard-research-bonus{
 display:block;font-size:11px;line-height:1.3;color:#a4ffce;
}
@media(max-width:600px){
 #overlay .shipyard-build-stats .shipyard-stats,
 #overlay .shipyard-gallery-stats .shipyard-stats{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;
 }
 #overlay .shipyard-build-stats .shipyard-stats dd,
 #overlay .shipyard-gallery-stats .shipyard-stats dd{font-size:16px}
}
