/* 0.3.2 – slimmer visible resource command + taller cinematic colony */
@media (min-width: 1361px) {
  :root { --resource-strip-height: 94px; }
  .resource-strip {
    grid-template-columns: 238px minmax(0,1fr);
    gap: 12px;
    height: var(--resource-strip-height);
    min-height: var(--resource-strip-height);
    padding: 8px 15px;
    align-items: stretch;
  }
  .resource-strip-head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    justify-content: start;
    align-content: center;
    column-gap: 7px;
    row-gap: 5px;
    min-width: 0;
    padding: 0 9px 0 2px;
  }
  .resource-strip-head .strip-heading {
    grid-column: 1/-1;
    grid-row: 1;
    min-width:0;
    gap: 7px;
    align-items: center;
  }
  .resource-strip-head .strip-heading strong {
    font-size: 12px;
    letter-spacing: .055em;
    white-space:nowrap;
  }
  .resource-strip-head .strip-heading small {
    display: block;
    width: 100%;
    max-width: 207px;
    font-size: 9px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    letter-spacing: .025em;
  }
  .resource-strip-head .resource-orbit {font-size: 22px;flex: none;}
  .resource-strip-head .resource-scope {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
    padding: 2px;
  }
  .resource-strip-head .resource-scope button { font-size: 10px; padding: 4px 6px; }
  .resource-strip-head .resource-expand {
    position: static;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    height: auto;
    min-width: 31px;
    margin: 0;
    padding: 3px 7px;
    font-size: 14px;
    border-color:#9976b5;
  }
  .resource-strip-head .resource-expand span { display: none; }
  .resource-rail {
    display: grid;
    grid-template-columns: repeat(10,minmax(0,1fr));
    gap: 5px;
    width:100%;
    min-width:0;
    padding: 0;
    align-items: stretch;
    overflow: visible;
  }
  .resource-rail .resource-tile {
    width: 100%;
    min-width: 0;
    max-width: 135px;
    min-height: 0;
    height: 76px;
    align-self:center;
    justify-self: center;
    display: flex;
    flex-direction:column;
    gap: 2px;
    align-items:center;
    justify-content:center;
    padding: 4px 2px 5px;
    text-align:center;
  }
  .resource-tile .res-symbol { font-size: 17px; min-width:0;line-height:1.05; }
  .resource-tile .res-data {min-width:0;width:100%;gap:3px;align-items:center;}
  .resource-tile .res-name {font-size:10px;max-width:100%;line-height:1.1;}
  .resource-tile .res-amount {font-size:clamp(11px,.82vw,14px);line-height:1.1;}
  .resource-tile .res-rate {font-size:clamp(10px,.72vw,12px);line-height:1.1;}
}
@media (min-width:761px) and (max-width:1360px) {
  .resource-strip {
    --resource-strip-height: 120px;
    grid-template-columns: 210px minmax(0,1fr);
    min-height: var(--resource-strip-height);
    height: var(--resource-strip-height);
    gap: 9px;
    padding: 7px 12px;
  }
  .resource-strip-head { display:flex;flex-direction:column;justify-content:center;gap:7px;min-width:0; }
  .resource-strip-head .strip-heading {min-width:0;}
  .resource-strip-head .strip-heading strong {font-size:11px;white-space:nowrap;}
  .resource-strip-head .strip-heading small {width:170px;max-width:100%;font-size:9px;white-space:nowrap;text-overflow:ellipsis;}
  .resource-strip-head .resource-expand {
    position:static;align-self:flex-start;min-width:0;height:23px;font-size:12px;padding:2px 8px;
  }
  .resource-strip-head .resource-expand span {display:inline;font-size:10px;}
  .resource-rail {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:4px;overflow:hidden;align-content:stretch;}
  .resource-rail .resource-tile {width:100%;height:100%;min-width:0;min-height:0;flex-direction:row;padding:4px 6px;gap:6px;}
  .resource-tile .res-symbol {font-size:15px;}
  .resource-tile .res-name {font-size:9px;}
  .resource-tile .res-amount {font-size:12px;}
  .resource-tile .res-rate {font-size:10px;}
}
@media (min-width:761px) {
  .colony-scene {
    height:clamp(465px,56vh,650px);
    min-height:465px;
    max-height:none;
  }
  .colony-scene canvas {height:100%;width:100%;}
}
@media (max-width:760px) {
  /* keep all ten resource tiles in their existing 5x2 grid */
  .colony-scene {height:clamp(335px,48vh,460px);}
  .planet-heading-actions {width:100%;justify-content:flex-start;}
  .rename-planet-btn {font-size:11px;padding:9px 12px;}
  .section-head:has(.planet-heading-actions) {align-items:start;flex-wrap:wrap;}
  .section-head:has(.planet-heading-actions) > div:first-child {width:100%;}
}
.planet-heading-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px;}
.rename-planet-btn {
  white-space:nowrap;
  border-color:#a588d2;
  background:linear-gradient(110deg,#38234f,#203c5d);
  color:#f4d7ff;
  font-weight:800;
  box-shadow:0 0 16px #8d50c125;
}
.rename-planet-btn:hover {border-color:#e5a5ff;background:#4b2e66;}
