/* 0.5.6 – the user's illustrated resources throughout the command deck.
 * One responsive image system; original button semantics and action attributes stay intact.
 */
:root{--resource-art-radius:9px}
.resource-art-icon{
 display:inline-grid;place-items:center;
 width:33px;height:33px;min-width:33px;
 border:1px solid #80afcd85;
 border-radius:7px;
 overflow:hidden;
 vertical-align:middle;
 background:#142e47;
 box-shadow:0 2px 8px #0009;
}
.resource-art-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.resource-art-icon img{max-width:100%}
.resource-photo-background{
 position:absolute;inset:0;
 display:block;width:100%;height:100%;
 object-fit:cover;
 object-position:center 49%;
 pointer-events:none;
 opacity:.9;
 z-index:0;
 filter:brightness(.68) saturate(1.06);
}
.resource-tile{
 isolation:isolate;
 position:relative;
 background:#0c1b31!important;
 border-color:color-mix(in srgb,var(--resource-color,#7adcec) 66%,#324259)!important;
}
.resource-tile::after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:linear-gradient(180deg,#06132842 0%,#07182b79 29%,#061322d8 82%,#060d19e9 100%);
 border-radius:inherit;
}
.resource-tile::before{z-index:3}
.resource-tile>.res-symbol{display:none!important}
.resource-tile>.res-data{
 position:relative;z-index:2;
 width:100%;min-width:0;
 align-items:center;
 text-align:center;
 text-shadow:0 1px 4px #000,0 2px 8px #000;
 gap:1px;
}
.resource-tile .res-name{color:#f4f7fc!important;font-weight:850!important}
.resource-tile .res-amount{
 color:#fff!important;
 letter-spacing:-.2px;
 font-weight:950!important;
 overflow:hidden;
 max-width:100%;
 text-overflow:clip;
}
.resource-tile .res-rate{font-weight:850!important}
.resource-tile:hover .resource-photo-background,
.resource-tile:focus-visible .resource-photo-background{filter:brightness(.92) saturate(1.12)}
.resource-tile:focus-visible,.resources-fit-card:focus-visible,.overview-resource-card:focus-visible,
.planet-production-card:focus-visible,.resource-summary-row:focus-visible{
 outline:2px solid #a9e9f7;outline-offset:2px;
}
/* Resource center: photo backgrounds inside the very same clickable cards. */
.resources-fit-card{
 position:relative;
 isolation:isolate;
 overflow:hidden;
 background:#101e34!important;
}
.resources-fit-card>.resource-photo-background{
 opacity:.90;
 object-position:center 40%;
 filter:brightness(.68) saturate(1.06);
}
.resources-fit-card::after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:linear-gradient(180deg,#08182a33 0%,#061527a3 43%,#081626ed 100%);
}
.resources-fit-card> :not(.resource-photo-background){
 position:relative;z-index:2;
 text-shadow:0 2px 5px #000;
}
.resources-fit-card .resources-fit-label{gap:7px}
.resources-fit-card .resource-art-icon{
 width:25px;height:25px;min-width:25px;flex:none;
}
.resources-fit-card .resources-fit-stock{font-weight:950;white-space:nowrap;overflow:hidden}
.resources-fit-card .resources-fit-breakdown{color:#d8e6f5}
.resources-fit-card:hover>.resource-photo-background{filter:brightness(.9) saturate(1.08)}
/* Detail popups: preserve detailed metrics while displaying supplied artwork. */
.resource-detail-hero{
 display:grid!important;
 grid-template-columns:minmax(170px,40%) minmax(0,1fr);
 align-items:center;
 gap:18px!important;
 padding:12px!important;
}
.resource-detail-art{
 height:clamp(140px,25vh,230px);
 border-radius:11px;
 border:1px solid #6685ad;
 background:#101a32;
 overflow:hidden;
 box-shadow:0 5px 21px #0008;
}
.resource-detail-image{
 width:100%;height:100%;object-fit:cover;display:block;
}
.resource-detail-data{min-width:0}
.resource-detail-hero h2{line-height:1.12;overflow-wrap:anywhere}
.resource-detail-hero p{max-width:65ch}
.resource-summary-row>.resource-art-icon{
 width:27px;height:27px;min-width:27px;
}
.resource-world-name>.resource-art-icon{width:28px;height:28px;min-width:28px}
.resource-overview-grid .overview-resource-card,
.planet-production-grid .planet-production-card{
 position:relative;isolation:isolate;overflow:hidden;
 background:#10213a!important;
}
.overview-resource-card>.resource-photo-background,
.planet-production-card>.resource-photo-background{
 opacity:.65;
 filter:brightness(.63) saturate(1.07);
 object-position:center 45%;
}
.overview-resource-card::after,.planet-production-card::after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:linear-gradient(95deg,#061324e2,#071329a9 65%,#07132b75);
}
.overview-resource-card>:not(.resource-photo-background),
.planet-production-card>:not(.resource-photo-background){
 z-index:2;position:relative;
 text-shadow:0 1px 6px #000;
}
.overview-resource-icon{min-width:0;filter:none}
.overview-resource-icon .resource-art-icon{width:42px;height:42px;min-width:42px}
.planet-production-head{
 display:flex;align-items:center;gap:9px;
}
.planet-production-head .resource-art-icon{width:36px;height:36px;min-width:36px}
.planet-production-values,.planet-production-net{position:relative;z-index:2}
.resource-line-label{display:flex;align-items:center;gap:8px;min-width:0}
.resource-line-label>.resource-art-icon{width:26px;height:26px;min-width:26px}
.resource-cost-chip{display:inline-flex;align-items:center;gap:5px;vertical-align:middle}
.resource-cost-chip>.resource-art-icon{
 display:inline-grid;width:22px;height:22px;min-width:22px;
 padding:0!important;border-radius:5px;
}
.tycoon-cost-bits .resource-cost-chip>.resource-art-icon{width:18px;height:18px;min-width:18px}
.resource-market-row{gap:10px}
.resource-market-row>.resource-art-icon{width:52px;height:40px;min-width:52px}
.resource-market-row>div{flex:1;min-width:0}
.trade-resource-preview .resource-detail-art{height:170px;max-width:400px}
.trade-resource-preview{width:100%;margin:0 auto 6px}
.resource-summary-row{cursor:pointer}
.resource-summary-row .resource-art-icon,.resource-cost-chip .resource-art-icon{font-size:0}
/* Phone layout: keep all ten resources on screen in a readable 5 × 2 grid.
   The cards act as buttons with live stock and per-minute production over the image. */
@media(max-width:760px){
 .game .resource-strip{padding:5px 6px 5px!important;gap:4px!important}
 .game .resource-rail{gap:3px!important;min-width:0!important}
 .game .resource-tile{
   border-radius:7px!important;
   display:flex!important;
   flex-direction:column!important;
   justify-content:flex-end!important;
   align-items:center!important;
   gap:0!important;
   padding:2px 1px 3px!important;
   min-width:0!important;
   min-height:0!important;
   overflow:hidden!important;
 }
 .game .resource-tile>.resource-photo-background{
   object-position:center 34%;
   opacity:.92;
   filter:brightness(.77) saturate(1.14);
 }
 .game .resource-tile::after{
   background:linear-gradient(180deg,#0711252e 0%,#06112670 22%,#06101dc9 51%,#050d1cef 100%);
 }
 .game .resource-tile>.res-data{
   gap:1px!important;
   display:flex!important;
   flex-direction:column!important;
   align-items:center!important;
   justify-content:flex-end!important;
   min-width:0!important;
   width:100%!important;
 }
 .game .resource-tile .res-name{
   display:block!important;
   width:100%!important;
   font-size:clamp(7.5px,2.18vw,9.4px)!important;
   line-height:1.05!important;
   overflow:hidden!important;
   white-space:nowrap!important;
   text-overflow:ellipsis!important;
 }
 .game .resource-tile .res-amount{
   font-size:clamp(9px,2.65vw,11.2px)!important;
   line-height:1.08!important;
   letter-spacing:-.28px!important;
   max-width:100%!important;
   white-space:nowrap!important;
 }
 .game .resource-tile .res-rate{
   font-size:clamp(7.3px,2.05vw,9.2px)!important;
   line-height:1.08!important;
   white-space:nowrap!important;
   max-width:100%!important;
 }
 .resource-detail-hero{
   grid-template-columns:1fr!important;gap:8px!important;
   padding:10px!important;
 }
 .resource-detail-art{height:clamp(128px,23vh,205px)}
 .resource-detail-data{padding:1px 3px}
 .resource-detail-hero h2{font-size:clamp(19px,5vw,25px)!important}
 .resource-detail-stats{gap:4px}
 .resource-detail-stats>div{padding:8px 5px}
 .resource-detail-stats small{font-size:9px}
 .resource-detail-stats strong{font-size:clamp(11px,3.2vw,14px)}
 .resources-fit-card>.resource-photo-background{filter:brightness(.58) saturate(1.08)}
 .resources-fit-card .resource-art-icon{width:20px;height:20px;min-width:20px}
 .resources-fit-card{gap:3px!important}
 .resources-fit-stock{font-size:clamp(13px,3.9vw,19px)!important}
 .resource-market-row>.resource-art-icon{width:39px;height:33px;min-width:39px}
 .resource-overview-grid .overview-resource-card{gap:6px;padding:7px}
 .overview-resource-icon .resource-art-icon{width:32px;height:32px;min-width:32px}
 .planet-production-grid .planet-production-card{gap:6px}
 .planet-production-head .resource-art-icon{width:29px;height:29px;min-width:29px}
 .resource-line-label .resource-art-icon{width:23px;height:23px;min-width:23px}
 .resource-line-label{font-size:11px}
 .resource-cost-chip .resource-art-icon{width:18px;height:18px;min-width:18px}
 .resource-cost-chip{gap:4px}
 .trade-resource-preview .resource-detail-art{height:140px}
}
@media(max-width:370px){
 .game .resource-tile .res-name{font-size:8px!important}
 .game .resource-tile .res-amount{font-size:9px!important}
 .game .resource-tile .res-rate{font-size:7.5px!important}
 .resource-detail-art{height:132px}
}
@media(max-width:760px) and (max-height:700px){
 .game .resource-strip{height:130px!important;min-height:130px!important;max-height:130px!important;flex-basis:130px!important}
}
@media(max-width:760px) and (max-height:530px){
 .game .resource-strip{height:110px!important;min-height:110px!important;max-height:110px!important;flex-basis:110px!important}
}
