/* City overview: broad city-stage view, compact build inspector and five-card selector. */
.module-city .ref-workspace-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(400px, 470px);
  gap: 16px;
}

.module-city .ref-city-page .ref-workspace-main {
  grid-template-rows: minmax(640px, 1fr) auto;
  gap: 16px;
}

.ref-city-hero {
  position: relative;
  height: clamp(520px, 60vh, 700px);
  min-height: 520px;
  contain: layout paint;
  overflow: hidden;
}

.ref-city-hero .ref-hero-image,
.ref-city-hero .ref-hero-image picture,
.ref-city-hero .ref-hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ref-city-hero .ref-hero-image picture {
  overflow: hidden;
}

.ref-city-hero .ref-hero-image img {
  max-width: none;
  object-fit: cover;
  object-position: center center;
  aspect-ratio: 16 / 9;
}

.ref-city-hero .ref-hero-gradient {
  background: linear-gradient(90deg, rgba(4,10,19,.91) 0%, rgba(4,10,19,.5) 46%, rgba(4,10,19,.08) 78%), linear-gradient(0deg, rgba(4,10,19,.9), transparent 58%);
}

.module-city .ref-hero-copy {
  max-width: 780px;
}

.module-city .ref-hero-copy h1 {
  margin: 10px 0 8px;
  font-size: clamp(52px, 4vw, 74px);
}

.module-city .ref-hero-copy p {
  font-size: 16px;
  line-height: 1.45;
}

.ref-city-selected-building-label {
  max-width: 860px;
  color: #b9cad8 !important;
  font-size: 15px !important;
}

.ref-city-selected-building-label strong {
  color: #eef8ff;
}

.module-city .ref-inline-tags {
  gap: 10px;
  margin-top: 14px;
}

.module-city .ref-inline-tags span {
  padding: 7px 12px;
  font-size: 13px;
}

.module-city .ref-queue-banner {
  max-width: 700px;
  min-height: 78px;
  padding: 14px 18px;
}

.module-city .ref-queue-banner span { font-size: 13px; }
.module-city .ref-queue-banner strong { font-size: 22px; }
.module-city .ref-queue-banner small { font-size: 13px; }
.module-city .ref-queue-banner em { font-size: 38px; }

.ref-city-queue-slots {
  position: absolute;
  right: 18px;
  bottom: 108px;
  z-index: 4;
  width: min(430px, 44%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ref-city-queue-slots > div {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(105,184,239,.18);
  border-radius: 10px;
  background: rgba(4,13,24,.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.ref-city-queue-slots > div.active {
  border-color: rgba(244,189,88,.45);
  background: linear-gradient(135deg, rgba(69,48,16,.84), rgba(7,18,30,.82));
}

.ref-city-queue-slots span,
.ref-city-queue-slots strong,
.ref-city-queue-slots small {
  display: block;
}

.ref-city-queue-slots span {
  color: #7da1bf;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ref-city-queue-slots strong {
  margin-top: 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-city-queue-slots small {
  margin-top: 4px;
  color: var(--amber);
  font-size: 13px;
}

.ref-city-resource-bar {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: -64px;
  padding: 0 14px 12px;
}

.ref-city-resource-bar .ref-resource-chip {
  min-height: 72px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(5,15,27,.92);
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
}

.ref-city-resource-bar .ref-resource-chip .nv-icon {
  width: 18px;
  height: 18px;
  padding: 5px;
  border-radius: 8px;
  color: #83d8ff;
  background: rgba(94,203,255,.08);
  flex: 0 0 auto;
}

.ref-city-resource-bar .ref-resource-chip > span {
  display: grid;
  gap: 6px;
  width: 100%;
}

.ref-city-resource-bar .ref-resource-chip small {
  font-size: 13px;
}

.ref-city-resource-bar .ref-resource-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ref-city-resource-bar .ref-resource-chip strong {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.ref-city-resource-bar .ref-resource-chip em {
  margin: 0;
  font-size: 13px;
  line-height: 1;
  text-align: right;
}

.ref-city-resource-bar .ref-resource-chip:nth-child(1) .nv-icon { color:#78dfa8; background:rgba(77,224,170,.09); }
.ref-city-resource-bar .ref-resource-chip:nth-child(2) .nv-icon { color:#63cfff; background:rgba(94,203,255,.09); }
.ref-city-resource-bar .ref-resource-chip:nth-child(3) .nv-icon { color:#b8cad8; background:rgba(184,202,216,.08); }
.ref-city-resource-bar .ref-resource-chip:nth-child(4) .nv-icon { color:#f0ba65; background:rgba(244,189,88,.09); }
.ref-city-resource-bar .ref-resource-chip:nth-child(5) .nv-icon { color:#80b9ff; background:rgba(100,160,255,.09); }
.ref-city-resource-bar .ref-resource-chip:nth-child(6) .nv-icon { color:#a9d3e8; background:rgba(120,185,220,.08); }
.ref-city-resource-bar .ref-resource-chip:nth-child(7) .nv-icon { color:#b98cff; background:rgba(155,120,255,.1); }
.ref-city-resource-bar .ref-resource-chip:nth-child(8) .nv-icon { color:#e9c46a; background:rgba(233,196,106,.1); }

.ref-city-page .ref-selection-rail {
  overflow: hidden;
  padding: 14px;
}

.ref-city-page .ref-rail-head h2 {
  font-size: 30px;
}

.ref-city-page .ref-selection-grid {
  grid-template-columns: repeat(5, minmax(215px, 1fr));
  gap: 12px;
  overflow: hidden;
}

.ref-building-window {
  overflow: hidden;
  outline: 0;
}

.ref-building-window:focus-visible {
  box-shadow: 0 0 0 2px rgba(94,203,255,.34);
  border-radius: 10px;
}

.ref-building-window,
.ref-building-window .ref-selection-grid,
.ref-building-selector {
  box-sizing: border-box;
}

.ref-building-selector {
  overflow: hidden;
}

.ref-primary-button[aria-busy="true"] {
  cursor: wait;
  opacity: .78;
}

.ref-building-selector {
  min-height: 118px;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.ref-building-selector > div,
.ref-building-selector > div picture,
.ref-building-selector > div img {
  width: 100%;
  height: 100%;
  display: block;
}

.ref-building-selector > div {
  height: 88px;
  overflow: hidden;
}

.ref-building-selector > div img {
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.ref-building-selector strong { font-size: 15px; }
.ref-building-selector small { font-size: 13px; }
.ref-building-selector em { font-size: 13px; }

.ref-rail-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.ref-building-pager {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
}

.ref-building-pager button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(94,203,255,.2);
  border-radius: 8px;
  background: #09192a;
  color: #dff2ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ref-building-pager button:hover:not(:disabled) {
  border-color: rgba(94,203,255,.52);
  background: #0d2940;
}

.ref-building-pager button:disabled {
  opacity: .32;
  cursor: default;
}

.ref-building-pager strong,
.ref-city-select {
  font-size: 13px;
}

.ref-city-select select {
  min-width: 180px;
  height: 38px;
  font-size: 13px;
}


.ref-city-inspector-art {
  position: relative;
  height: 176px;
  contain: layout paint;
  overflow: hidden;
  border: 1px solid rgba(105,184,239,.17);
  border-radius: 11px;
  background: #07111d;
}

.ref-city-inspector-art picture,
.ref-city-inspector-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ref-city-inspector-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4,10,19,.92), transparent 65%);
}

.ref-city-inspector-art > div {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 2;
}

.ref-city-inspector-art span,
.ref-city-inspector-art strong,
.ref-city-inspector-art small {
  display: block;
}

.ref-city-inspector-art span { color: var(--cyan); font-size: 13px; letter-spacing: .12em; }
.ref-city-inspector-art strong { margin-top: 3px; font-size: 22px; }
.ref-city-inspector-art small { margin-top: 2px; color: #91a4b6; font-size: 13px; }

.ref-city-inspector-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ref-city-inspector-summary > div {
  padding: 12px;
  border: 1px solid rgba(105,184,239,.14);
  border-radius: 10px;
  background: rgba(12,26,43,.75);
}

.ref-city-inspector-summary span,
.ref-city-inspector-summary strong {
  display: block;
}

.ref-city-inspector-summary span {
  color: #7390aa;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.ref-city-inspector-summary strong {
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.35;
}

.ref-building-inspector .ref-inspector-action {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(0deg, rgba(5,13,24,.98) 72%, transparent);
}

.ref-building-inspector .ref-cost-row strong small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 1500px) {
  .ref-city-resource-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -40px;
  }

  .ref-city-queue-slots {
    bottom: 88px;
    width: min(380px, 46%);
  }
}

@media (max-width: 1100px) {
  .module-city .ref-workspace-grid {
    grid-template-columns: 1fr;
  }

  .ref-city-hero {
    height: 520px;
    min-height: 480px;
  }

  .ref-city-resource-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
    padding-top: 10px;
  }

  .ref-city-queue-slots {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 18px;
  }
}

@media (max-width: 760px) {
  .module-city .ref-hero-copy h1 {
    font-size: 42px;
  }

  .ref-city-resource-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ref-city-page .ref-selection-grid {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }
}


/* Server-backed queue controls. */
.ref-city-queue-slots > div.status-paused {
  border-color: rgba(244,189,88,.48);
}
.ref-city-queue-slots > div.status-queued {
  border-color: rgba(126,154,183,.26);
  background: rgba(8,18,30,.88);
}
.ref-city-queue-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.ref-city-queue-actions button {
  min-width: 0;
  flex: 1 1 0;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(94,203,255,.24);
  border-radius: 7px;
  background: rgba(14,43,66,.92);
  color: #dff4ff;
  font-size: 13px;
  cursor: pointer;
}
.ref-city-queue-actions button:hover:not(:disabled) {
  border-color: rgba(94,203,255,.58);
}
.ref-city-queue-actions button.danger {
  border-color: rgba(255,112,123,.22);
  background: rgba(77,24,32,.76);
  color: #ffc2c8;
}
.ref-city-queue-actions button:disabled {
  opacity: .55;
  cursor: wait;
}
.ref-queue-banner.status-paused {
  border-color: rgba(244,189,88,.44);
}
.ref-queue-banner.status-queued {
  border-color: rgba(126,154,183,.28);
}
