.ground-visual-v2 {
  --ground-border: rgba(116, 188, 229, 0.16);
  --ground-border-strong: rgba(88, 202, 255, 0.38);
  --ground-panel: rgba(5, 19, 30, 0.94);
  --ground-panel-2: rgba(7, 27, 42, 0.94);
  --ground-soft: rgba(106, 186, 225, 0.08);
  --ground-cyan: #6dd7ff;
  --ground-text-soft: rgba(224, 238, 247, 0.72);
  display: grid;
  gap: 10px;
  min-height: calc(var(--novaris-layout-height, 100vh) - 118px);
}

.ground-command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.72fr);
  gap: 14px;
  align-items: stretch;
  padding: 4px 6px 2px;
}

.ground-command-title {
  align-self: center;
}

.ground-command-title h1 {
  margin: 3px 0 2px;
  font-size: clamp(1.3rem, 1.9vw, 2rem);
  line-height: 1.05;
}

.ground-command-title p {
  margin: 0;
  max-width: 760px;
  color: var(--ground-text-soft);
}

.ground-command-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ground-border);
  background: linear-gradient(180deg, rgba(3, 18, 29, 0.92), rgba(2, 12, 20, 0.96));
  min-height: 70px;
}

.ground-command-metrics > span {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 18px;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.ground-command-metrics > span:first-child {
  border-left: 0;
}

.ground-command-metrics small,
.ground-command-metrics em {
  color: var(--ground-text-soft);
  font-style: normal;
}

.ground-command-metrics strong {
  font-size: 1.35rem;
  line-height: 1;
}

.ground-tabbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.ground-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ground-border);
  background: rgba(7, 24, 38, 0.88);
  color: var(--ground-text-soft);
  cursor: pointer;
  border-radius: 4px;
  font-weight: 700;
}

.ground-tab:hover,
.ground-tab.active {
  color: #f5fbff;
  border-color: var(--ground-border-strong);
  background: linear-gradient(180deg, rgba(18, 75, 104, 0.8), rgba(7, 39, 59, 0.95));
  box-shadow: inset 0 -2px 0 rgba(81, 211, 255, 0.58);
}

.ground-facility-workspace {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(280px, 1fr);
  grid-template-areas:
    "hero queue"
    "units garrison";
  gap: 10px;
  align-items: stretch;
}

.ground-hero-column { grid-area: hero; min-width: 0; }
.ground-production-rail { grid-area: queue; }
.ground-lower-left { grid-area: units; min-width: 0; }
.ground-lower-right { grid-area: garrison; min-width: 0; }

.ground-facility-hero,
.ground-production-rail,
.ground-unit-library,
.ground-garrison-panel,
.ground-overview-hero,
.ground-overview-facility,
.ground-overview-bottom > * {
  border: 1px solid var(--ground-border);
  background: var(--ground-panel);
  overflow: hidden;
}

.ground-facility-hero {
  position: relative;
  min-height: 385px;
}

.ground-art-placeholder {
  position: relative;
  min-height: 385px;
  display: grid;
  place-content: center;
  text-align: center;
  color: rgba(221, 240, 249, 0.9);
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 42%, rgba(89, 174, 201, 0.16), transparent 31%),
    radial-gradient(circle at 28% 78%, rgba(26, 89, 117, 0.26), transparent 30%),
    linear-gradient(145deg, #132631 0%, #0c1a24 44%, #07111a 100%);
}

.ground-art-placeholder::before,
.ground-art-placeholder::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background:
    linear-gradient(160deg, transparent 0 28%, rgba(111, 150, 162, 0.11) 28% 32%, transparent 32% 100%),
    linear-gradient(20deg, transparent 0 38%, rgba(111, 150, 162, 0.08) 38% 43%, transparent 43% 100%);
}

.ground-art-placeholder::after {
  inset: 0;
  height: auto;
  border: 1px dashed rgba(125, 204, 236, 0.16);
  margin: 14px;
  pointer-events: none;
}

.ground-art-placeholder-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(120, 205, 236, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 205, 236, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 88%);
}

.ground-art-placeholder > span,
.ground-art-placeholder > strong,
.ground-art-placeholder > small {
  position: relative;
  z-index: 2;
}

.ground-art-placeholder-kicker {
  color: var(--ground-cyan);
  font-size: .73rem;
  letter-spacing: .16em;
}

.ground-art-placeholder > strong {
  margin-top: 7px;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.ground-art-placeholder > small {
  margin-top: 5px;
  color: rgba(220, 236, 243, 0.52);
}

.ground-art-placeholder.compact {
  min-height: 92px;
  height: 92px;
  place-content: center;
}

.ground-art-placeholder.compact::after { margin: 7px; }
.ground-art-placeholder.compact .ground-art-placeholder-kicker { display: none; }
.ground-art-placeholder.compact > strong { font-size: .82rem; margin: 0; }
.ground-art-placeholder.compact > small { font-size: .7rem; }

.ground-facility-summary {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(34%, 390px);
  min-width: 300px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(3, 14, 22, .98) 0%, rgba(4, 18, 29, .94) 70%, rgba(4, 18, 29, .42) 100%);
}

.ground-facility-summary h2 {
  margin: 4px 0;
  font-size: 1.55rem;
}

.ground-facility-summary p {
  margin: 14px 0;
  color: var(--ground-text-soft);
  line-height: 1.48;
}

.ground-level {
  font-size: .92rem;
}

.ground-level-progress,
.ground-progress,
.ground-garrison-row > i {
  height: 5px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.ground-level-progress {
  margin-top: 6px;
  width: 72%;
}

.ground-level-progress i,
.ground-progress i,
.ground-garrison-row > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3bb5e6, #66dcff);
}

.ground-benefit-list {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.ground-benefit-list span {
  color: rgba(235, 244, 249, 0.82);
  font-size: .88rem;
}

.ground-benefit-list i {
  font-style: normal;
  color: #7ee9b0;
  margin-right: 6px;
}

.ground-facility-cost {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.ground-facility-cost > div,
.ground-unit-cost {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ground-facility-cost span,
.ground-unit-cost span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 4px 6px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.05);
}

.ground-facility-cost span small,
.ground-unit-cost span small {
  color: var(--ground-text-soft);
  font-size: .72rem;
}

.ground-facility-cost span strong,
.ground-unit-cost span strong {
  font-size: .8rem;
}

.ground-hero-status {
  position: absolute;
  z-index: 5;
  top: 15px;
  right: 15px;
}

.ground-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(5, 16, 24, .84);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ground-status.good { color: #79f0b5; border-color: rgba(95, 227, 169, .26); }
.ground-status.warning { color: #ffd683; border-color: rgba(255, 198, 83, .28); }
.ground-status.neutral { color: rgba(230,240,245,.72); }

.ground-production-rail,
.ground-unit-library,
.ground-garrison-panel {
  padding: 12px;
}

.ground-section-title {
  min-height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: rgba(226, 242, 249, .82);
  font-size: .8rem;
  letter-spacing: .05em;
}

.ground-section-title strong {
  font-size: .78rem;
  color: var(--ground-cyan);
}

.ground-production-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 10px;
}

.ground-production-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 24px;
  gap: 9px;
  align-items: center;
  padding: 8px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
}

.ground-production-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ground-production-copy strong,
.ground-production-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ground-production-copy small,
.ground-production-copy span {
  color: var(--ground-text-soft);
  font-size: .76rem;
}

.ground-production-empty,
.ground-garrison-empty {
  min-height: 108px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 4px;
  color: var(--ground-text-soft);
  border: 1px dashed rgba(255,255,255,.1);
  background: rgba(255,255,255,.018);
}

.ground-icon-button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  color: rgba(235,245,250,.76);
  cursor: pointer;
}

.ground-button,
.ground-unit-build {
  border: 1px solid rgba(95, 189, 231, .24);
  color: #eefaff;
  background: rgba(15, 51, 72, .9);
  min-height: 34px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 700;
}

.ground-button.primary,
.ground-unit-build {
  background: linear-gradient(180deg, rgba(30, 107, 143, .96), rgba(12, 61, 88, .96));
  border-color: rgba(91, 209, 255, .4);
}

.ground-button.secondary {
  background: rgba(9, 34, 51, .9);
}

.ground-button.wide { width: 100%; }
.ground-button:disabled,
.ground-unit-build:disabled { opacity: .38; cursor: default; }

.ground-unit-library {
  min-height: 260px;
}

.ground-unit-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ground-unit-tile {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.022);
}

.ground-unit-tile.locked { opacity: .68; }

.ground-unit-tile-copy {
  padding: 9px;
  display: grid;
  gap: 4px;
}

.ground-unit-tile-copy > strong,
.ground-unit-tile-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ground-unit-tile-copy > small,
.ground-unit-tile-bottom > span {
  color: var(--ground-text-soft);
  font-size: .73rem;
}

.ground-unit-tile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 3px;
}

.ground-unit-tile-bottom > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ground-unit-build {
  min-height: 28px;
  padding: 5px 9px;
  flex: 0 0 auto;
}

.ground-unit-build.locked {
  background: rgba(20, 30, 38, .9);
}

.ground-garrison-list {
  display: grid;
  gap: 7px;
  margin: 4px 0 10px;
}

.ground-garrison-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas:
    "emblem text count"
    "emblem bar bar";
  gap: 3px 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.022);
}

.ground-garrison-emblem {
  grid-area: emblem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 192, 237, .22);
  background: rgba(30, 81, 104, .18);
}

.ground-garrison-row > div:nth-child(2) {
  grid-area: text;
  min-width: 0;
  display: grid;
}

.ground-garrison-row > div:nth-child(2) small {
  color: var(--ground-text-soft);
}

.ground-garrison-row > span {
  grid-area: count;
  font-weight: 700;
}

.ground-garrison-row > i {
  grid-area: bar;
}

.ground-overview-command {
  display: grid;
  gap: 10px;
}

.ground-overview-hero {
  position: relative;
  min-height: 300px;
}

.ground-overview-hero .ground-art-placeholder {
  min-height: 300px;
}

.ground-overview-hero-copy {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(43%, 540px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(3,14,22,.98), rgba(5,21,32,.86), transparent);
}

.ground-overview-hero-copy h2 {
  margin: 5px 0;
  font-size: 1.7rem;
}

.ground-overview-hero-copy p {
  color: var(--ground-text-soft);
  max-width: 520px;
  line-height: 1.5;
}

.ground-overview-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.ground-overview-hero-metrics span {
  display: grid;
  gap: 2px;
  padding: 9px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

.ground-overview-hero-metrics small { color: var(--ground-text-soft); }
.ground-overview-hero-metrics strong { font-size: 1.15rem; }

.ground-overview-facility-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ground-overview-facility {
  min-width: 0;
}

.ground-overview-facility.locked { opacity: .72; }

.ground-overview-facility .ground-art-placeholder.compact {
  height: 125px;
}

.ground-overview-facility-copy {
  padding: 11px;
  display: grid;
  gap: 8px;
}

.ground-overview-facility-copy h3 {
  margin: 2px 0 0;
}

.ground-overview-facility-copy p {
  margin: 0;
  color: var(--ground-text-soft);
  font-size: .8rem;
  line-height: 1.42;
  min-height: 3.4em;
}

.ground-overview-facility-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ground-text-soft);
  font-size: .75rem;
}

.ground-overview-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 1380px) {
  .ground-command-header { grid-template-columns: 1fr; }
  .ground-unit-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ground-overview-facility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .ground-facility-workspace {
    grid-template-columns: 1fr;
    grid-template-areas: "hero" "queue" "units" "garrison";
  }
  .ground-facility-summary {
    position: relative;
    width: auto;
    min-width: 0;
    background: rgba(3,14,22,.96);
  }
  .ground-facility-hero > .ground-art-placeholder { min-height: 260px; }
  .ground-hero-status { top: 12px; right: 12px; }
  .ground-unit-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .ground-command-metrics,
  .ground-tabbar,
  .ground-overview-hero-metrics,
  .ground-overview-facility-grid,
  .ground-overview-bottom,
  .ground-unit-tile-grid {
    grid-template-columns: 1fr;
  }
  .ground-overview-hero-copy {
    position: relative;
    width: auto;
    background: rgba(3,14,22,.96);
  }
  .ground-overview-hero .ground-art-placeholder { min-height: 220px; }
}

/* v0.33.55 - final individual artwork for all nine planetary unit types. */
.ground-unit-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #07111a;
  border-bottom: 1px solid rgba(116, 188, 229, 0.12);
}

.ground-unit-art.compact {
  width: 92px;
  height: 92px;
  aspect-ratio: auto;
  border: 1px solid rgba(116, 188, 229, 0.12);
}

.ground-unit-picture,
.ground-unit-picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.ground-unit-picture img {
  object-fit: cover;
  object-position: center;
}

.ground-unit-art.compact .ground-unit-picture img {
  object-position: center;
}


/* v0.33.56 - final artwork for planetary command center and four military facilities. */
.ground-command-art,
.ground-facility-art {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #07111a;
}

.ground-command-art {
  min-height: 300px;
  height: 300px;
}

.ground-facility-art.hero {
  min-height: 385px;
  height: 385px;
}

.ground-facility-art.compact {
  height: 125px;
}

.ground-command-picture,
.ground-command-picture img,
.ground-facility-picture,
.ground-facility-picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.ground-command-picture img,
.ground-facility-picture img {
  object-fit: cover;
  object-position: center;
}

.ground-command-art::after,
.ground-facility-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 10, 17, 0.04), rgba(2, 10, 17, 0.24));
}

.ground-overview-facility.locked .ground-facility-art {
  filter: saturate(.78) brightness(.82);
}

@media (max-width: 1080px) {
  .ground-facility-art.hero {
    min-height: 260px;
    height: 260px;
  }
}

@media (max-width: 760px) {
  .ground-command-art {
    min-height: 220px;
    height: 220px;
  }
}
