.planet-command-header{
  position:relative;
  z-index:8;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px 16px;
  margin:-2px 0 16px;
  padding:0 0 13px;
  border-bottom:1px solid rgba(74,103,190,.28);
}

.planet-command-identity,
.planet-command-name-row{
  min-width:0;
}

.planet-command-name-row{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.planet-page-title{
  margin:0;
  color:#f5f7ff;
  font-size:30px;
  line-height:1.05;
  letter-spacing:.01em;
  overflow-wrap:anywhere;
}

.planet-coordinate{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 10px;
  border:1px solid rgba(89,126,221,.42);
  border-radius:9px;
  background:rgba(18,32,78,.70);
  color:#b9c9f3;
  font-size:10px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.planet-rename-toggle,
.planet-rename-cancel{
  appearance:none;
  min-height:34px;
  border:1px solid rgba(89,126,221,.42);
  border-radius:9px;
  background:rgba(18,32,78,.70);
  color:#b9c9f3;
  font:inherit;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}

.planet-rename-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 9px;
}

.planet-rename-toggle > span[aria-hidden="true"]{
  color:#72e8ff;
  font-size:15px;
  line-height:1;
}

.planet-rename-toggle:hover,
.planet-rename-toggle[aria-expanded="true"]{
  border-color:rgba(101,175,255,.72);
  background:rgba(28,58,126,.70);
  color:#fff;
}

.planet-switch-menu{
  position:relative;
  justify-self:end;
}

.planet-switch-menu > summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 32px 0 10px;
  border:1px solid rgba(89,126,221,.42);
  border-radius:9px;
  background:rgba(18,32,78,.70);
  color:#b9c9f3;
  font-size:10px;
  font-weight:900;
  list-style:none;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}

.planet-switch-menu > summary::-webkit-details-marker{
  display:none;
}

.planet-switch-menu > summary::after{
  content:"▾";
  position:absolute;
  right:12px;
  color:#83caff;
  transition:transform .16s ease;
}

.planet-switch-menu[open] > summary::after{
  transform:rotate(180deg);
}

.planet-switch-menu-list{
  position:absolute;
  z-index:30;
  top:calc(100% + 7px);
  right:0;
  width:min(320px,calc(100vw - 32px));
  max-height:min(360px,60vh);
  padding:7px;
  overflow:auto;
  border:1px solid rgba(83,127,235,.66);
  border-radius:12px;
  background:#080f29;
  box-shadow:0 18px 44px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.04);
}

.planet-menu-form{
  margin:0;
}

.planet-menu-option{
  appearance:none;
  width:100%;
  min-height:50px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#eef3ff;
  font:inherit;
  text-align:left;
  cursor:pointer;
}

.planet-menu-option:hover{
  border-color:rgba(84,136,246,.40);
  background:rgba(38,72,151,.34);
}

.planet-menu-option small{
  color:#91a7d9;
  font-size:10px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

.planet-menu-option b{
  color:#67f2bd;
}

.planet-menu-option.is-current,
.planet-menu-option.is-current:disabled{
  border-color:rgba(84,226,181,.35);
  background:rgba(18,91,75,.27);
  color:#fff;
  opacity:1;
  cursor:default;
}

.planet-rename-form{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:auto minmax(180px,340px) auto auto;
  align-items:center;
  justify-content:start;
  gap:8px;
  padding:10px;
  border:1px solid rgba(72,109,204,.42);
  border-radius:11px;
  background:rgba(8,17,46,.80);
}

.planet-rename-form[hidden]{
  display:none;
}

.planet-rename-form label{
  color:#9eb0dd;
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.planet-rename-form input{
  min-width:0;
  min-height:38px;
  padding:8px 10px;
  border:1px solid rgba(91,137,244,.48);
  border-radius:9px;
  outline:none;
  background:#080f2a;
  color:#fff;
  font:inherit;
  font-size:13px;
  font-weight:850;
}

.planet-rename-form input:focus{
  border-color:#62cfff;
  box-shadow:0 0 0 3px rgba(63,184,255,.12);
}

.planet-rename-form .btn,
.planet-rename-cancel{
  min-height:38px;
  margin:0;
  padding:0 12px;
}

.planet-ui-busy #planet-overview-region,
.planet-ui-busy #planet-buildings-region{
  opacity:.72;
  transition:opacity .12s ease;
}

.planet-img{
  width:320px;
  max-width:100%;
  aspect-ratio:1/1;
  border-radius:10px;
  border:1px solid var(--line);
  object-fit:cover;
  background:#050a18;
}

.planet-top{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:22px;
  align-items:start;
}

.planet-side{
  min-width:0;
}

.planet-media-col{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.planet-traits-card{
  background:
    radial-gradient(circle at top left, rgba(61,130,255,.10), transparent 42%),
    linear-gradient(180deg,rgba(12,25,63,.78),rgba(8,16,39,.92));
  border:1px solid rgba(58,88,172,.60);
  border-radius:16px;
  padding:14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 6px 18px rgba(0,0,0,.18);
}

.planet-traits-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px 16px;
  align-items:start;
}

.planet-traits-stat{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.planet-traits-stat-right{
  align-items:flex-end;
  text-align:right;
}

.planet-traits-stat-wide{
  grid-column:1 / -1;
}

.planet-traits-stat-mineral{
  padding-top:10px;
  margin-top:2px;
  border-top:1px solid rgba(255,255,255,.07);
}

.planet-traits-key{
  font-size:11px;
  font-weight:900;
  color:var(--muted);
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}

.planet-traits-val{
  font-size:15px;
  font-weight:900;
  color:var(--text);
  line-height:1.2;
  min-width:0;
}

.planet-traits-muted{
  font-size:14px;
  font-weight:800;
  color:var(--muted);
}

.planet-rarity-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.planet-rarity-badge.common{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
}

.planet-rarity-badge.rare{
  border-color:rgba(125,211,252,.30);
  background:rgba(125,211,252,.10);
  color:#c9f0ff;
}

.planet-rarity-badge.epic{
  border-color:rgba(167,139,250,.38);
  background:rgba(167,139,250,.14);
  color:#e8ddff;
}

.planet-rarity-badge.legendary{
  border-color:rgba(255,215,89,.38);
  background:rgba(255,215,89,.15);
  color:#ffe8a1;
}

.planet-mineral-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(94,234,212,.26);
  background:linear-gradient(180deg,rgba(45,212,191,.14),rgba(17,103,96,.12));
  color:var(--text);
  font-size:13px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.planet-resource-tags{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}

.planet-resource-tag{
  --resource-color:116,205,255;
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:3px 8px;
  border:1px solid rgba(var(--resource-color),.38);
  border-radius:7px;
  background:rgba(var(--resource-color),.09);
  color:rgb(var(--resource-color));
  font-size:10px;
  font-weight:950;
  line-height:1;
  white-space:nowrap;
}

.planet-resource-tag.resource-pyronit{--resource-color:255,132,77}
.planet-resource-tag.resource-xenite{--resource-color:83,229,191}
.planet-resource-tag.resource-darkstone{--resource-color:177,119,255}
.planet-resource-tag.resource-cryonite{--resource-color:117,211,255}
.planet-resource-tag.resource-iridium{--resource-color:212,220,235}
.planet-resource-tag.resource-voidcrystal{--resource-color:222,105,255}
.planet-resource-tag.resource-lythan{--resource-color:146,238,111}
.planet-resource-tag.resource-quantium{--resource-color:255,202,83}

.planet-traits-section-label{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:11px;
  font-weight:900;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.10em;
}

.planet-combat-snapshot{
  display:grid;
  gap:5px;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid rgba(255,255,255,.08);
}

.planet-combat-snapshot-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#93a5d4;
  font-size:9px;
  font-weight:950;
  letter-spacing:.08em;
  text-decoration:none;
}

.planet-combat-snapshot-head small{
  color:#75dcff;
  font-size:8px;
  font-weight:900;
  letter-spacing:0;
}

.planet-combat-snapshot-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}

.planet-combat-snapshot-grid > div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  min-width:0;
  min-height:34px;
  padding:5px 7px;
  border:1px solid rgba(63,122,190,.34);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(14,50,83,.48),rgba(7,18,43,.72));
}

.planet-combat-snapshot-grid span{
  min-width:0;
  color:#9eafd2;
  font-size:9px;
  font-weight:850;
  line-height:1.15;
}

.planet-combat-snapshot-grid strong{
  flex:0 0 auto;
  color:#eaf8ff;
  font-size:13px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}

.planet-combat-snapshot-meta{
  display:flex;
  align-items:center;
  gap:4px 8px;
  flex-wrap:wrap;
  color:#8197c2;
  font-size:8px;
  font-weight:800;
}

.planet-combat-snapshot-meta b{
  padding:2px 5px;
  border:1px solid rgba(93,223,183,.28);
  border-radius:999px;
  background:rgba(28,114,91,.22);
  color:#87f4d0;
  font-size:8px;
}

.planet-bonus-details{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid rgba(255,255,255,.08);
}

.planet-bonus-details > summary{
  list-style:none;
}

.planet-bonus-details > summary::-webkit-details-marker{
  display:none;
}

.planet-bonus-details > summary::marker{
  content:"";
}

.planet-bonus-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:38px;
  padding:7px 9px;
  border:1px solid rgba(73,102,192,.48);
  border-radius:12px;
  background:
    radial-gradient(circle at 12% 0%,rgba(67,123,255,.10),transparent 42%),
    linear-gradient(180deg,rgba(18,31,77,.76),rgba(11,21,54,.82));
  cursor:pointer;
  user-select:none;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.planet-bonus-summary:hover{
  border-color:rgba(91,137,255,.68);
  background:
    radial-gradient(circle at 12% 0%,rgba(67,123,255,.14),transparent 42%),
    linear-gradient(180deg,rgba(21,37,89,.82),rgba(12,23,59,.88));
}

.planet-bonus-details[open] .planet-bonus-summary{
  border-color:rgba(91,137,255,.72);
  box-shadow:0 0 0 1px rgba(91,137,255,.08);
}

.planet-bonus-summary-main,
.planet-bonus-summary-action{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.planet-bonus-summary-title{
  color:var(--text);
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.09em;
}

.planet-bonus-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  border:1px solid rgba(94,234,212,.28);
  background:rgba(45,212,191,.10);
  color:#dffef8;
  font-size:10px;
  font-weight:900;
}

.planet-bonus-summary-action{
  flex:0 0 auto;
  color:#aebde3;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}

.planet-bonus-action-open{
  display:none;
}


.planet-bonus-details[open] .planet-bonus-action-closed{
  display:none;
}

.planet-bonus-details[open] .planet-bonus-action-open{
  display:inline;
}


.planet-bonus-content{
  padding-top:8px;
}

.planet-bonus-mineral{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,.07);
}

.planet-bonus-mineral .planet-traits-val{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.planet-bonus-section{
  display:grid;
  gap:5px;
  margin-top:7px;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.07);
}

.planet-bonus-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.planet-bonus-section-head > span{
  color:#93a5d4;
  font-size:9px;
  font-weight:950;
  letter-spacing:.09em;
}

.planet-bonus-section-head > small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:21px;
  height:21px;
  border-radius:999px;
  background:rgba(92,129,226,.17);
  color:#cbd7fb;
  font-size:9px;
  font-weight:950;
}

.planet-bonus-section-head > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 8px;
  border:1px solid rgba(83,170,255,.48);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(30,91,172,.62),rgba(17,52,119,.72));
  color:#eaf7ff;
  font-size:8px;
  font-weight:950;
  text-decoration:none;
  white-space:nowrap;
}

.planet-bonus-data-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
}

.planet-bonus-data-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  min-height:48px;
  padding:8px 9px;
  border:1px solid rgba(65,91,166,.46);
  border-radius:9px;
  background:rgba(6,14,38,.68);
}

.planet-bonus-data-card > span{
  color:#96a6cf;
  font-size:9px;
  font-weight:850;
  line-height:1.25;
}

.planet-bonus-data-card > strong{
  color:#f0f5ff;
  font-size:11px;
  line-height:1.3;
}

.planet-bonus-data-card.rare{
  border-color:rgba(81,224,196,.32);
  background:linear-gradient(180deg,rgba(19,74,73,.36),rgba(8,35,39,.42));
}

.planet-bonus-data-card.technology > strong{
  color:#7dffc3;
  text-shadow:0 0 8px rgba(71,244,176,.25);
}

.planet-bonus-data-card.anomaly{
  border-color:rgba(191,104,255,.36);
  background:linear-gradient(180deg,rgba(64,29,96,.36),rgba(30,14,59,.43));
}

.planet-bonus-data-card.anomaly > strong{
  color:#e7c3ff;
}

.planet-bonus-total-list{
  display:grid;
  gap:4px;
}

.planet-bonus-total-row{
  display:grid;
  gap:4px;
  padding:6px 7px;
  border:1px solid rgba(66,96,177,.46);
  border-radius:9px;
  background:rgba(6,14,38,.68);
}

.planet-bonus-total-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}

.planet-bonus-total-head > span{
  color:#f0f5ff;
  font-size:10px;
  font-weight:900;
}

.planet-bonus-total-head > strong{
  flex:0 0 auto;
  color:#7ce8ff;
  font-size:12px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}

.planet-bonus-source-list{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}

.planet-bonus-source-row{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:18px;
  padding:2px 5px;
  border:1px solid rgba(112,137,204,.24);
  border-radius:6px;
  background:rgba(30,48,94,.36);
  color:#9eb0db;
  font-size:8px;
  font-weight:900;
}

.planet-bonus-source-row b{
  color:#dce7ff;
  font-size:9px;
  font-variant-numeric:tabular-nums;
}

.planet-bonus-source-row.source-planet{
  border-color:rgba(95,140,255,.32);
}

.planet-bonus-source-row.source-research{
  border-color:rgba(76,224,255,.32);
  color:#9beeff;
}

.planet-bonus-source-row.source-inventory{
  border-color:rgba(202,128,255,.38);
  color:#e3bdff;
}

.planet-bonus-links{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:7px;
}

.planet-bonus-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:0 8px;
  border:1px solid rgba(83,170,255,.40);
  border-radius:8px;
  background:rgba(20,57,124,.58);
  color:#dff3ff;
  font-size:8px;
  font-weight:950;
  text-decoration:none;
}

.planet-bonus-active-research{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  padding:8px 9px;
  border:1px solid rgba(74,238,174,.30);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(16,83,65,.35),rgba(8,42,38,.45));
}

.planet-bonus-active-research > span{
  color:#62ddff;
  font-size:8px;
  font-weight:950;
  letter-spacing:.08em;
}

.planet-bonus-active-research > strong{
  color:#e8fff7;
  font-size:9px;
}

.planet-bonus-active-research > em{
  color:#9dffdc;
  font-size:11px;
  font-style:normal;
  font-weight:950;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.planet-bonus-content-label{
  margin-top:12px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.09em;
}

.planet-traits-chip-row{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.planet-trait-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(73,102,192,.78);
  background:linear-gradient(180deg,rgba(18,31,77,.92),rgba(12,21,56,.92));
  color:var(--text);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 2px 8px rgba(0,0,0,.12);
}

.planet-trait-chip.rare{
  border-color:rgba(94,234,212,.30);
  background:linear-gradient(180deg,rgba(26,92,88,.26),rgba(14,53,51,.18));
}

.planet-traits-empty{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
}

.res-card{
  background:rgba(10,18,48,.38);
  border:1px solid rgba(34,48,90,.55);
  border-radius:14px;
  padding:8px 10px 10px 10px;
}

.planet-research-card{
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(78,118,213,.52);
  border-radius:14px;
  background:
    radial-gradient(circle at 8% 0%,rgba(64,184,255,.09),transparent 34%),
    linear-gradient(180deg,rgba(11,24,61,.86),rgba(7,15,40,.92));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}

.planet-research-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.planet-research-head > div{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.planet-research-head span,
.planet-research-active span{
  color:#62ddff;
  font-size:8px;
  font-weight:950;
  letter-spacing:.11em;
}

.planet-research-head strong{
  color:#f5f8ff;
  font-size:13px;
}

.planet-research-head a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:31px;
  padding:0 10px;
  border:1px solid rgba(83,170,255,.55);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(30,91,172,.76),rgba(17,52,119,.86));
  color:#eaf7ff;
  font-size:9px;
  font-weight:950;
  text-decoration:none;
  text-shadow:0 0 8px rgba(137,220,255,.36);
}

.planet-research-head a:hover{
  filter:brightness(1.12);
  text-decoration:none;
}

.planet-research-bonus-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.planet-research-bonus-row{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-height:48px;
  padding:8px 9px;
  border:1px solid rgba(65,91,166,.46);
  border-radius:9px;
  background:rgba(6,14,38,.68);
}

.planet-research-bonus-row span{
  color:#96a6cf;
  font-size:9px;
  font-weight:850;
}

.planet-research-bonus-row strong{
  color:#7dffc3;
  font-size:11px;
  text-shadow:0 0 8px rgba(71,244,176,.25);
}

.planet-research-empty{
  margin-top:10px;
  padding:9px 10px;
  border:1px dashed rgba(77,105,185,.42);
  border-radius:9px;
  color:#8f9dc3;
  font-size:10px;
  font-weight:800;
}

.planet-research-active{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid rgba(74,238,174,.30);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(16,83,65,.35),rgba(8,42,38,.45));
}

.planet-research-active strong{
  color:#e8fff7;
  font-size:10px;
}

.planet-research-active em{
  color:#9dffdc;
  font-size:12px;
  font-style:normal;
  font-weight:950;
  text-shadow:0 0 9px rgba(76,255,194,.40);
}

.inventory-shell,
.inventory-guide{
  margin-top:14px;
  padding:16px;
  border-color:rgba(62,94,178,.56);
  background:
    radial-gradient(circle at 8% 0%,rgba(58,129,255,.09),transparent 32%),
    linear-gradient(180deg,rgba(11,23,59,.92),rgba(7,15,39,.96));
}

.inventory-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.inventory-header > div,
.inventory-guide-head{
  display:grid;
  gap:4px;
}

.inventory-header span,
.inventory-guide-head > span{
  color:#65dcff;
  font-size:9px;
  font-weight:950;
  letter-spacing:.11em;
}

.inventory-header h2,
.inventory-guide-head h3{
  margin:0;
  color:#f4f7ff;
}

.inventory-header h2{font-size:20px}
.inventory-guide-head h3{font-size:16px}

.inventory-header p,
.inventory-guide-head p,
.inventory-guide-note{
  max-width:800px;
  margin:0;
  color:#9cadd8;
  font-size:11px;
  line-height:1.55;
}

.inventory-header > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 11px;
  border:1px solid rgba(83,170,255,.55);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(30,91,172,.76),rgba(17,52,119,.86));
  color:#eaf7ff;
  font-size:9px;
  font-weight:950;
  text-decoration:none;
  white-space:nowrap;
}

.inventory-artifact-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.inventory-artifact-card{
  --rarity-rgb:183,194,216;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(170px,220px) auto;
  align-items:center;
  gap:12px;
  padding:11px;
  border:1px solid rgba(var(--rarity-rgb),.34);
  border-radius:11px;
  background:linear-gradient(100deg,rgba(var(--rarity-rgb),.08),rgba(7,15,40,.76) 38%);
}

.inventory-artifact-card.is-saving{
  border-color:rgba(101,183,255,.58);
}

.inventory-artifact-card.is-saving .inventory-artifact-copy,
.inventory-artifact-card.is-saving .inventory-stationing,
.inventory-artifact-card.is-saving .inventory-target-menu{
  opacity:.62;
  pointer-events:none;
}

.inventory-artifact-card.rarity-uncommon,
.inventory-tier-card.rarity-uncommon{--rarity-rgb:104,230,166}
.inventory-artifact-card.rarity-rare,
.inventory-tier-card.rarity-rare{--rarity-rgb:99,199,255}
.inventory-artifact-card.rarity-epic,
.inventory-tier-card.rarity-epic{--rarity-rgb:187,140,255}
.inventory-artifact-card.rarity-legendary,
.inventory-tier-card.rarity-legendary{--rarity-rgb:255,202,98}
.inventory-artifact-card.rarity-mythic,
.inventory-tier-card.rarity-mythic{--rarity-rgb:255,115,159}

.inventory-artifact-copy{
  min-width:0;
  display:grid;
  gap:5px;
}

.inventory-artifact-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.inventory-artifact-title-row > strong{
  color:#f4f7ff;
  font-size:13px;
}

.inventory-rarity-badge{
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:3px 7px;
  border:1px solid rgba(var(--rarity-rgb),.42);
  border-radius:999px;
  background:rgba(var(--rarity-rgb),.10);
  color:rgb(var(--rarity-rgb));
  font-size:8px;
  font-weight:950;
}

.inventory-effect-row{
  display:flex;
  align-items:center;
  gap:7px;
}

.inventory-effect-row > span,
.inventory-stationing > span{
  color:#8194c3;
  font-size:8px;
  font-weight:950;
  letter-spacing:.08em;
}

.inventory-effect-row > b{
  color:rgb(var(--rarity-rgb));
  font-size:11px;
}

.inventory-artifact-copy > small,
.inventory-stationing > small{
  color:#8799c3;
  font-size:9px;
  line-height:1.35;
}

.inventory-stationing{
  display:grid;
  gap:3px;
  padding-left:12px;
  border-left:1px solid rgba(87,111,177,.26);
}

.inventory-stationing > strong{
  color:#edf3ff;
  font-size:11px;
}

.inventory-stationing > strong.is-unassigned{
  color:#a9b8dd;
}

.inventory-target-menu{
  position:relative;
  justify-self:end;
}

.inventory-target-menu > summary{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 31px 0 11px;
  border:1px solid rgba(89,140,244,.46);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(29,60,132,.76),rgba(14,31,78,.88));
  color:#eef5ff;
  font-size:9px;
  font-weight:950;
  list-style:none;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}

.inventory-target-menu > summary::-webkit-details-marker{display:none}

.inventory-target-menu > summary::after{
  content:"▾";
  position:absolute;
  right:11px;
  color:#83caff;
  transition:transform .16s ease;
}

.inventory-target-menu[open] > summary::after{transform:rotate(180deg)}

.inventory-target-menu-list{
  position:absolute;
  z-index:35;
  top:calc(100% + 7px);
  right:0;
  width:min(320px,calc(100vw - 32px));
  max-height:min(360px,60vh);
  padding:7px;
  overflow:auto;
  border:1px solid rgba(83,127,235,.66);
  border-radius:12px;
  background:#080f29;
  box-shadow:0 18px 44px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.04);
}

.inventory-target-form{margin:0}

.inventory-target-option{
  appearance:none;
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#eef3ff;
  font:inherit;
  font-size:11px;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}

.inventory-target-option:hover{
  border-color:rgba(84,136,246,.40);
  background:rgba(38,72,151,.34);
}

.inventory-target-option small{
  color:#91a7d9;
  font-size:9px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

.inventory-target-option b{color:#67f2bd}

.inventory-target-option.is-current,
.inventory-target-option.is-current:disabled{
  border-color:rgba(84,226,181,.35);
  background:rgba(18,91,75,.27);
  color:#fff;
}

.inventory-action-state{
  grid-column:1 / -1;
  min-height:0;
  color:#91a4d2;
  font-size:9px;
  font-weight:900;
  line-height:1.2;
}

.inventory-action-state:empty{
  display:none;
}

.inventory-action-state.is-success{
  color:#78e8bd;
}

.inventory-action-state.is-error{
  color:#ff9cac;
}

.inventory-empty{
  margin-top:14px;
  padding:12px;
  border:1px dashed rgba(77,105,185,.42);
  border-radius:9px;
  color:#9badd8;
  font-size:11px;
  line-height:1.5;
}

.inventory-tier-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:7px;
  margin-top:12px;
}

.inventory-tier-card{
  --rarity-rgb:183,194,216;
  display:grid;
  gap:3px;
  padding:9px;
  border:1px solid rgba(var(--rarity-rgb),.34);
  border-radius:9px;
  background:rgba(var(--rarity-rgb),.07);
}

.inventory-tier-card > span{
  color:rgb(var(--rarity-rgb));
  font-size:9px;
  font-weight:950;
}

.inventory-tier-card > strong{
  color:#f4f7ff;
  font-size:14px;
}

.inventory-tier-card > small{
  color:#92a3cd;
  font-size:8px;
  font-weight:850;
}

.inventory-guide-note{
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid rgba(85,108,170,.24);
}

@media (max-width:700px){
  .planet-research-bonus-grid{
    grid-template-columns:1fr;
  }

  .planet-research-active{
    grid-template-columns:1fr;
    gap:4px;
  }

  .inventory-header{
    flex-direction:column;
  }

  .inventory-artifact-card{
    grid-template-columns:1fr;
  }

  .inventory-stationing{
    padding:8px 0 0;
    border-top:1px solid rgba(87,111,177,.26);
    border-left:0;
  }

  .inventory-target-menu{
    width:100%;
    justify-self:stretch;
  }

  .inventory-target-menu > summary{
    width:100%;
  }

  .inventory-target-menu-list{
    left:0;
    right:auto;
    width:100%;
  }

  .inventory-tier-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

.res-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.res-table colgroup col:nth-child(1){width:25%}
.res-table colgroup col:nth-child(2){width:25%}
.res-table colgroup col:nth-child(3){width:22%}
.res-table colgroup col:nth-child(4){width:28%}

.res-table th{
  text-align:left;
  color:var(--text);
  font-size:13px;
  font-weight:800;
  padding:8px 10px;
  border-bottom:2px solid rgba(42,98,185,.75);
  white-space:nowrap;
}

.res-table td{
  padding:8px 10px;
  font-size:14px;
  vertical-align:middle;
  border-bottom:1px solid rgba(34,48,90,.35);
}

.res-table tbody tr:last-child td{
  border-bottom:none;
}

.res-head-accent{
  color:#14f1ff;
  font-weight:900;
}

.res-name{
  color:var(--text);
  font-weight:800;
}

.res-level{
  color:var(--good);
  font-weight:900;
}

.res-rate{
  color:#46e8ff;
  font-weight:900;
}

.res-stored{
  color:var(--text);
  font-weight:900;
}

.res-cap{
  color:var(--text);
  font-weight:800;
}

.energy-block{
  margin-top:14px;
}

.energy-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.energy-table colgroup col:nth-child(1){width:25%}
.energy-table colgroup col:nth-child(2){width:25%}
.energy-table colgroup col:nth-child(3){width:22%}
.energy-table colgroup col:nth-child(4){width:28%}

.energy-table th{
  text-align:left;
  color:var(--text);
  font-size:13px;
  font-weight:800;
  padding:8px 10px;
  border-bottom:2px solid rgba(42,98,185,.75);
  white-space:nowrap;
}

.energy-table td{
  padding:10px 10px 2px 10px;
  font-size:14px;
  vertical-align:middle;
}

.energy-name{
  color:var(--text);
  font-size:15px;
  font-weight:500;
}

.energy-generate{
  color:var(--text);
  font-weight:900;
}

.energy-eff{
  font-weight:900;
  color:var(--good);
}

.energy-eff.bad{
  color:#ff5a7a;
}

.energy-note{
  margin-top:12px;
}

.resource-layout-panel[hidden]{
  display:none !important;
}

.resource-layout-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-height:28px;
  margin:0 2px 4px;
}

.resource-layout-toolbar > span{
  color:#8297c7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.resource-layout-options{
  display:inline-grid;
  grid-template-columns:repeat(3,max-content);
  gap:4px;
}

.resource-layout-options button{
  display:grid;
  place-items:center;
  width:auto;
  min-width:44px;
  height:26px;
  padding:0 8px;
  border:1px solid rgba(75,104,184,.6);
  border-radius:7px;
  background:rgba(10,21,54,.86);
  color:#a9b9df;
  font-family:inherit;
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}

.resource-layout-options button:hover,
.resource-layout-options button[aria-pressed="true"]{
  border-color:#52dcff;
  background:linear-gradient(180deg,rgba(24,108,165,.84),rgba(19,59,118,.9));
  color:#fff;
  box-shadow:0 0 10px rgba(53,205,255,.2);
}

.res-loot-badge{
  display:inline-flex;
  align-items:center;
  min-height:17px;
  margin-left:5px;
  padding:2px 5px;
  border:1px solid rgba(223,158,75,.5);
  border-radius:999px;
  background:rgba(100,57,9,.34);
  color:#ffd68f;
  font-size:7px;
  font-weight:950;
  letter-spacing:.08em;
  vertical-align:middle;
}

.res-row-loot{
  background:linear-gradient(90deg,rgba(149,91,21,.08),transparent 70%);
}

.res-row-loot.is-loot-group-start td{
  border-top-color:rgba(237,173,76,.48);
}

.resource-layout-strips{
  display:grid;
  gap:5px;
}

.resource-strip-head,
.resource-strip{
  display:grid;
  grid-template-columns:minmax(130px,1.25fr) repeat(3,minmax(75px,.75fr));
  align-items:center;
  gap:8px;
}

.resource-strip-head{
  padding:0 10px 5px;
  color:#8598c4;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}

.resource-strip{
  --resource-color:#60b8ff;
  min-height:44px;
  padding:6px 10px;
  border:1px solid rgba(64,91,158,.34);
  border-radius:10px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--resource-color) 8%,transparent),rgba(7,15,38,.76) 34%);
}

.resource-strip.is-loot{
  border-color:color-mix(in srgb,var(--resource-color) 48%,#32446f);
}

.resource-strip.is-loot-group-start{margin-top:4px}

.resource-strip-name{
  display:flex;
  align-items:center;
  min-width:0;
  gap:8px;
}

.resource-strip-name > i{
  width:6px;
  height:22px;
  flex:0 0 auto;
  border-radius:999px;
  background:var(--resource-color);
  box-shadow:0 0 7px color-mix(in srgb,var(--resource-color) 68%,transparent);
}

.resource-strip-name > span{
  display:grid;
  min-width:0;
  gap:1px;
}

.resource-strip-name strong{
  overflow:hidden;
  color:#eef4ff;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.resource-strip-name small{
  overflow:hidden;
  color:#8499c6;
  font-size:9px;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.resource-strip-rate,
.resource-strip-stock,
.resource-strip-cap{
  font-size:12px;
  font-variant-numeric:tabular-nums;
}

.resource-strip-rate{color:#45e6ff}
.resource-strip-stock{color:#f2f5ff}
.resource-strip-cap{color:#a7b6d8;font-weight:800}

.resource-energy-strip{
  --resource-color:#64ffc8;
  margin-top:4px;
  border-color:rgba(73,205,164,.32);
}

.resource-layout-tiles{
  display:block;
}

.resource-tile-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}

.resource-tile{
  --resource-color:#60b8ff;
  display:grid;
  gap:6px;
  min-width:0;
  min-height:92px;
  padding:10px;
  border:1px solid color-mix(in srgb,var(--resource-color) 38%,#2d416e);
  border-radius:11px;
  background:
    radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--resource-color) 13%,transparent),transparent 52%),
    rgba(7,15,38,.78);
}

.resource-tile header,
.resource-tile footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-width:0;
  gap:6px;
}

.resource-tile header span{
  overflow:hidden;
  color:#eaf1ff;
  font-size:12px;
  font-weight:900;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.resource-tile header small{
  flex:0 0 auto;
  padding:3px 6px;
  border-radius:999px;
  background:color-mix(in srgb,var(--resource-color) 18%,transparent);
  color:color-mix(in srgb,var(--resource-color) 75%,white);
  font-size:9px;
  font-weight:950;
}

.resource-tile > strong{
  color:#fff;
  font-size:21px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  line-height:1;
}

.resource-tile footer{
  align-items:flex-end;
  color:#8ea4cf;
  font-size:10px;
  font-weight:800;
}

.resource-tile footer span:last-child{
  text-align:right;
}

.resource-tile.is-loot{
  background:
    radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--resource-color) 18%,transparent),transparent 55%),
    linear-gradient(145deg,rgba(72,42,8,.3),rgba(7,15,38,.84));
}

.resource-energy-tile{--resource-color:#64ffc8}
.resource-tone-metal{--resource-color:#70a8ff}
.resource-tone-crystal{--resource-color:#5ee7ff}
.resource-tone-deuterium{--resource-color:#bb8cff}
.resource-tone-darkstone{--resource-color:#db65ff}
.resource-tone-pyronit{--resource-color:#ff725f}
.resource-tone-xenite{--resource-color:#72ffb2}
.resource-tone-cryonite{--resource-color:#8fe8ff}
.resource-tone-iridium{--resource-color:#7cf3db}
.resource-tone-voidcrystal{--resource-color:#9b7dff}
.resource-tone-lythan{--resource-color:#ffce62}
.resource-tone-quantium{--resource-color:#f58dff}

@media (max-width:700px){
  .resource-layout-toolbar{
    margin:0 3px 5px;
  }

  .resource-strip-head{
    display:none;
  }

  .resource-strip{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px 8px;
    min-height:54px;
    padding:6px 9px;
  }

  .resource-strip-name{
    grid-column:1 / -1;
  }

  .resource-strip-rate,
  .resource-strip-stock,
  .resource-strip-cap{
    font-size:11px;
  }

  .resource-strip-cap{
    text-align:right;
  }

  .resource-tile-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }

  .resource-tile{
    min-height:86px;
    padding:9px;
  }

  .resource-tile > strong{
    font-size:19px;
  }
}

@media (max-width:400px){
  .resource-layout-options{
    grid-template-columns:repeat(3,max-content);
  }

  .resource-layout-options button{
    width:auto;
    min-width:40px;
    height:24px;
    padding:0 6px;
    font-size:9px;
  }

  .resource-tile header span{
    font-size:11px;
  }

  .resource-tile footer{
    display:grid;
    gap:2px;
  }

  .resource-tile footer span:last-child{
    text-align:left;
  }
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:stretch;
}

.building-grid{
  gap:10px 14px;
}

.building-group-heading{
  grid-column:1 / -1;
  min-height:24px;
  margin:4px 0 -2px;
  display:grid;
  grid-template-columns:auto auto minmax(28px,1fr);
  align-items:center;
  gap:8px;
  color:#dce8ff;
}

.building-group-heading.is-first{
  margin-top:0;
}

.building-group-heading span{
  min-width:24px;
  box-sizing:border-box;
  padding:3px 5px;
  border:1px solid rgba(83,126,220,.58);
  border-radius:7px;
  background:rgba(24,48,106,.52);
  color:#8fb6ff;
  font-size:9px;
  font-weight:950;
  line-height:1;
  text-align:center;
}

.building-group-heading strong{
  font-size:11px;
  font-weight:950;
  line-height:1;
  letter-spacing:.75px;
  text-transform:uppercase;
}

.building-group-heading i{
  height:1px;
  background:linear-gradient(90deg,rgba(83,126,220,.62),rgba(83,126,220,.05));
}

.bcard{
  --building-accent:#7dd3fc;
  --building-accent-rgb:125,211,252;
  min-width:0;
  min-height:152px;
  box-sizing:border-box;
  background:
    linear-gradient(135deg,rgba(69,104,188,.075),transparent 42%),
    rgba(12,18,45,.78);
  border:1px solid rgba(83,126,220,.58);
  border-radius:16px;
  padding:9px;
  display:grid;
  grid-template-columns:132px minmax(0,1fr);
  gap:10px;
  align-items:center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 18px rgba(44,85,181,.055);
}

.bcard-metal{
  --building-accent:#c7d2e6;
  --building-accent-rgb:199,210,230;
}

.bcard-crystal{
  --building-accent:#67dcff;
  --building-accent-rgb:103,220,255;
}

.bcard-astrium{
  --building-accent:#c58aff;
  --building-accent-rgb:197,138,255;
}

.bcard-darkstone{
  --building-accent:#e16bff;
  --building-accent-rgb:225,107,255;
}

.bcard-energy{
  --building-accent:#ffc85b;
  --building-accent-rgb:255,200,91;
}

.bcard-industry{
  --building-accent:#ff9b62;
  --building-accent-rgb:255,155,98;
}

.bcard-scanner{
  --building-accent:#66a8ff;
  --building-accent-rgb:102,168,255;
}

.bmedia{
  appearance:none;
  position:relative;
  width:132px;
  height:132px;
  box-sizing:border-box;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:12px;
  background:#050a18;
  box-shadow:0 0 16px rgba(var(--building-accent-rgb),.11);
  cursor:pointer;
}

.bimg{
  width:132px;
  height:132px;
  box-sizing:border-box;
  border-radius:12px;
  border:1px solid rgba(var(--building-accent-rgb),.42);
  object-fit:cover;
  background:#050a18;
  display:block;
  transition:transform .18s ease;
}

.bmedia:hover .bimg{
  transform:scale(1.025);
}

.bmedia:focus-visible{
  outline:2px solid var(--building-accent);
  outline-offset:2px;
}

.bmedia:disabled{
  opacity:1;
  cursor:not-allowed;
}

.bbuild-state-icon{
  position:absolute;
  right:7px;
  bottom:7px;
  z-index:2;
  min-height:39px;
  max-width:118px;
  box-sizing:border-box;
  padding:2px 7px 2px 2px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:2px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(4,10,27,.82);
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.48));
  pointer-events:none;
}

.bbuild-state-icon img{
  flex:0 0 38px;
  width:38px;
  height:38px;
  display:block;
}

.bbuild-state-icon strong{
  min-width:0;
  color:#66ffad;
  font-size:9px;
  font-weight:950;
  line-height:1.05;
  text-align:left;
  text-shadow:0 0 7px rgba(43,255,146,.45);
}

.bbuild-state-icon.is-ready{
  filter:drop-shadow(0 0 8px rgba(31,255,120,.38));
}

.bbuild-state-icon.is-blocked{
  filter:drop-shadow(0 0 7px rgba(255,64,92,.34));
}

.bbuild-state-icon.is-blocked strong{
  color:#ff91a4;
  text-shadow:0 0 7px rgba(255,61,94,.40);
}

.bmeta{
  min-width:0;
  height:132px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  overflow:hidden;
}

.btitle{
  margin:0;
  color:#f6f8ff;
  font-size:17px;
  font-weight:950;
  line-height:1.08;
  text-shadow:0 0 10px rgba(var(--building-accent-rgb),.18);
}

.btitle-level{
  color:var(--building-accent);
  font-weight:950;
  text-shadow:0 0 9px rgba(var(--building-accent-rgb),.32);
}

.bmetric{
  min-width:0;
  margin-top:5px;
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:3px;
  color:#d8e2ff;
  font-size:12px;
  font-weight:850;
  line-height:1.15;
}

.bmetric-now{
  color:#eef4ff;
}

.bmetric-arrow{
  color:var(--building-accent);
  font-size:14px;
  text-shadow:0 0 8px rgba(var(--building-accent-rgb),.45);
}

.bmetric-next{
  color:#59ffb0;
  font-weight:950;
  text-shadow:0 0 8px rgba(40,255,155,.34);
}

.bmetric-target{
  color:#aebbdd;
  font-size:9px;
  font-weight:800;
}

.upform{
  margin:0;
  width:132px;
  height:132px;
  display:flex;
}

.queue-overview-card{
  margin-top:14px;
}

.queue-overview-title{
  margin:0;
  color:var(--text);
  font-size:14px;
  font-weight:950;
  letter-spacing:.2px;
}

.queue-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.queue-card{
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 116px 44px;
  grid-template-areas:"media copy timer cancel";
  align-items:center;
  gap:12px;
  min-height:74px;
  padding:9px 11px;
  border:1px solid rgba(55,78,150,.85);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(35,49,103,.58),rgba(22,33,72,.72));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.queue-media{
  grid-area:media;
  display:flex;
  align-items:center;
  justify-content:center;
}

.queue-image{
  width:52px;
  height:52px;
  display:block;
  object-fit:cover;
  border:1px solid rgba(110,130,190,.28);
  border-radius:12px;
  background:rgba(10,18,45,.55);
}

.queue-image-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--accent2);
  font-size:20px;
  font-weight:950;
}

.queue-copy{
  grid-area:copy;
  min-width:0;
}

.queue-name{
  overflow:hidden;
  color:var(--text);
  font-size:16px;
  font-weight:950;
  line-height:1.12;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.queue-finish{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
}

.queue-finish b{
  color:var(--text);
}

.queue-timer.op-time-panel{
  grid-area:timer;
  min-width:116px;
  justify-self:end;
}

.queue-cancel-form{
  grid-area:cancel;
  margin:0;
  justify-self:end;
}

.queue-cancel-button{
  appearance:none;
  width:44px;
  height:44px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(165,55,55,.7);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(98,20,20,.98),rgba(60,10,10,1));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  color:#fff;
  font:inherit;
  font-size:26px;
  font-weight:950;
  line-height:1;
  cursor:pointer;
}

.queue-cancel-button span{
  transform:translateY(-1px);
}

.queue-cancel-button:hover{
  filter:brightness(1.12);
}

.queue-cancel-button:disabled{
  opacity:.58;
  cursor:wait;
}

.queue-refresh-note{
  margin-top:10px;
  color:var(--muted);
  font-size:11px;
}

.countdown{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  white-space:nowrap;
  text-align:center;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1, "lnum" 1;
}

.patchnote-entry{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(52,79,156,.38);
  background:linear-gradient(180deg,rgba(12,25,63,.45),rgba(8,16,39,.72));
}

.patchnote-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(74,112,255,.4);
  background:rgba(47,96,255,.12);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
  font-size:12px;
}

.patchnote-toggle[aria-expanded="true"]{
  background:rgba(47,96,255,.24);
}

.patchnote-details{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.patchnote-detail-line{
  font-size:13px;
  line-height:1.45;
  color:var(--text);
}

.patchnote-detail-line + .patchnote-detail-line{
  margin-top:6px;
}

.bcost-list{
  width:100%;
  min-width:0;
  margin-top:auto;
  display:grid;
  grid-auto-rows:22px;
  gap:3px;
}

.bcost-row{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border:1px solid rgba(42,62,122,.72);
  border-radius:7px;
  background:linear-gradient(180deg,rgba(14,24,58,.80),rgba(9,17,43,.84));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  overflow:hidden;
}

.bcost-row.resource-metal{
  border-color:rgba(199,210,230,.30);
  background:linear-gradient(90deg,rgba(199,210,230,.085),rgba(9,17,43,.86) 68%);
}

.bcost-row.resource-crystal{
  border-color:rgba(103,220,255,.31);
  background:linear-gradient(90deg,rgba(62,198,255,.09),rgba(9,17,43,.86) 68%);
}

.bcost-row.resource-astrium{
  border-color:rgba(197,138,255,.31);
  background:linear-gradient(90deg,rgba(178,92,255,.10),rgba(9,17,43,.86) 68%);
}

.bcost-row.resource-darkstone{
  border-color:rgba(225,107,255,.34);
  background:linear-gradient(90deg,rgba(206,65,255,.11),rgba(9,17,43,.86) 68%);
}

.bcost-label{
  min-width:0;
  overflow:hidden;
  color:#c9d3eb;
  font-size:10.5px;
  line-height:1.15;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.resource-metal .bcost-label{
  color:#d6dfef;
  text-shadow:0 0 7px rgba(199,210,230,.28);
}

.resource-crystal .bcost-label{
  color:#80e2ff;
  text-shadow:0 0 7px rgba(64,205,255,.34);
}

.resource-astrium .bcost-label{
  color:#d2a0ff;
  text-shadow:0 0 7px rgba(183,95,255,.35);
}

.resource-darkstone .bcost-label{
  color:#ee9cff;
  text-shadow:0 0 7px rgba(225,79,255,.38);
}

.bcost-value{
  color:#f4f8ff;
  font-size:12px;
  line-height:1;
  font-weight:950;
  text-align:right;
  white-space:nowrap;
}

.bcost-row.status-enough .bcost-value{
  color:#5dffae;
  text-shadow:0 0 8px rgba(39,255,151,.48);
}

.bcost-row.status-missing{
  border-color:rgba(255,85,116,.52);
  background:linear-gradient(90deg,rgba(255,56,94,.10),rgba(9,17,43,.88) 70%);
}

.bcost-row.status-missing .bcost-value{
  color:#ff6d87;
  text-shadow:0 0 8px rgba(255,49,91,.48);
}

.bmetric{
  line-height:1.15;
}

/* ================================
   RETURN MISSIONS (Rückflüge UI)
   ================================ */

.return-strip-card{
  padding:12px 14px;
  border:1px solid rgba(67,93,176,.62);
  background:linear-gradient(180deg,rgba(11,21,54,.88),rgba(8,14,35,.95));
}

.return-strip-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.return-strip-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.return-strip-item{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.return-strip-row{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(10,16,39,.72);
  border:1px solid rgba(52,79,156,.54);
}

button.return-strip-row{
  cursor:pointer;
  text-align:left;
  color:inherit;
}

.return-strip-toggle{
  appearance:none;
  -webkit-appearance:none;
}

.return-strip-toggle:hover{
  border-color:rgba(110,195,255,.55);
  box-shadow:0 0 0 1px rgba(110,195,255,.14);
}

.return-strip-toggle[aria-expanded="true"]{
  border-color:rgba(110,195,255,.72);
  box-shadow:0 0 0 1px rgba(110,195,255,.18);
}

.return-strip-main{
  min-width:0;
}

.return-strip-title{
  font-size:14px;
  font-weight:900;
  color:var(--text);
  line-height:1.2;
}

.return-strip-sub{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.return-strip-time{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
  white-space:nowrap;
}

.return-strip-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
  color:var(--muted);
}

.return-strip-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:82px;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  color:var(--text);
  background:rgba(110,195,255,.14);
  border:1px solid rgba(110,195,255,.35);
  font-variant-numeric:tabular-nums;
}

.return-strip-details{
  padding:12px;
  border-radius:12px;
  background:rgba(7,12,28,.72);
  border:1px solid rgba(52,79,156,.42);
}

.return-details-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.return-details-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.return-details-card{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(10,16,39,.72);
  border:1px solid rgba(52,79,156,.54);
}

.return-details-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
  color:var(--muted);
}

.return-details-value{
  font-size:14px;
  font-weight:900;
  color:var(--text);
  line-height:1.3;
}

.return-cargo-box{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
}

.return-cargo-title{
  font-size:13px;
  font-weight:900;
  color:var(--text);
  margin-bottom:10px;
}

.return-cargo-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

.return-cargo-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}

.return-cargo-name{
  font-size:12px;
  font-weight:800;
  color:var(--text);
}

.return-cargo-amount{
  font-size:12px;
  font-weight:900;
  color:var(--accent2);
}

.return-cargo-empty{
  font-size:12px;
  color:var(--muted);
}

@media (max-width: 900px){
  .grid{
    grid-template-columns:1fr;
  }

  .planet-top{
    grid-template-columns:1fr;
  }

  .planet-traits-grid{
    grid-template-columns:1fr;
  }

  .planet-traits-stat,
  .planet-traits-stat-right,
  .planet-traits-stat-wide{
    align-items:flex-start;
    text-align:left;
  }
}

@media (max-width: 800px){
  .return-details-grid,
  .return-details-grid.compact{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .res-table,
  .energy-table{
    table-layout:auto;
  }

  .res-table th,
  .res-table td,
  .energy-table th,
  .energy-table td{
    padding:7px 6px;
    font-size:12px;
  }
}

@media (max-width: 640px){
  .planet-bonus-summary{
    align-items:center;
    flex-direction:row;
    gap:6px;
  }

  .planet-bonus-summary-action{
    width:auto;
    justify-content:flex-end;
    font-size:9px;
  }

  .planet-bonus-summary-main{flex:1;gap:6px}
  .planet-bonus-summary-title{font-size:10px;letter-spacing:.06em}
  .planet-bonus-count{min-width:22px;height:22px;padding:0 6px}

  .grid{
    grid-template-columns:1fr;
  }

  .countdown{
    min-width:68px;
  }

  .queue-card{
    grid-template-columns:46px minmax(0,1fr) 42px;
    grid-template-areas:
      "media copy cancel"
      "timer timer timer";
    gap:9px;
    min-height:0;
    padding:9px;
  }

  .queue-image{
    width:46px;
    height:46px;
  }

  .queue-name{
    font-size:14px;
  }

  .queue-timer.op-time-panel{
    width:100%;
    min-width:0;
    padding:7px 0 0;
    border-top:1px solid rgba(107,133,202,.20);
    border-left:0;
    flex-direction:row;
    align-items:baseline;
    justify-content:flex-end;
    gap:8px;
    text-align:right;
  }

  .queue-timer .op-time-value{
    margin-top:0;
    font-size:18px;
  }

  .queue-cancel-button{
    width:42px;
    height:42px;
  }

  .patchnote-toggle{
    width:100%;
  }

  .bcost-list{
    width:100%;
  }

  .bcost-row{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }

  .return-strip-row{
    grid-template-columns:1fr;
  }

  .return-strip-time{
    align-items:flex-start;
  }
}

@media (max-width: 480px){
  .bcard{
    min-height:0;
    grid-template-columns:108px minmax(0,1fr);
    padding:9px;
    gap:10px;
    align-items:start;
  }

  .upform,
  .bmedia{
    width:108px;
    height:108px;
  }

  .bimg{
    width:108px;
    height:108px;
  }

  .bbuild-state-icon{
    right:5px;
    bottom:5px;
    min-height:32px;
    max-width:98px;
    padding-right:5px;
  }

  .bbuild-state-icon img{
    flex-basis:30px;
    width:30px;
    height:30px;
  }

  .bbuild-state-icon strong{
    font-size:8px;
  }

  .bmeta{
    height:132px;
    min-height:132px;
    overflow:visible;
  }

  .btitle{
    font-size:16px;
  }

  .bcost-list{
    margin-top:7px;
  }
}
