/* Continuous working surfaces; selected routes and consequential actions keep their edges. */

/* Mission desk: one current objective, with figures and supporting notes around it. */
#command-view :is(.command-header, .command-chapters, .command-advice-panel,
  .command-contracts-panel, .command-ranks-panel, .command-history-panel) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
#command-view .command-header {
  padding: 16px 0;
  background-image: none;
  border-top: 1px solid var(--command-edge);
}
#command-view .command-header h2 { font-size: 24px; }
#command-view .command-header .command-rank-card {
  padding: 12px 16px;
  border-left: 1px solid var(--command-edge);
  background: transparent;
}
#command-view > .expansion-links {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--command-edge);
  background: transparent;
}
#command-view > .expansion-links h2 { font-size: 19px; }
#command-view .command-metrics {
  gap: 0;
  padding: 0;
  border: 0;
  border-block: 1px solid var(--command-edge);
  background: transparent;
}
#command-view .command-metrics > div {
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}
#command-view .command-metrics > div:nth-child(even) { background: transparent; }
#command-view .command-metrics > div:last-child { border-right: 0; }
#command-view .command-metrics strong { font-size: 28px; margin: 6px 0; }
#command-view .first-loop-steps { gap: 0 16px; }
#command-view .first-loop-steps li {
  padding: 12px;
  border-bottom: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}
#command-view .first-loop-steps li.current { background: #c5ad7210; }
#command-view .first-loop-steps li.done { background: transparent; }
#command-view .command-logistics {
  border: 0;
  border-block: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}
#command-view .command-empty-shipment { padding: 16px 0; background: transparent; }
#command-view .command-chapters { border-top: 2px solid var(--mission-brass); }
#command-view .chapter-selector { gap: 0; background: transparent; }
#command-view .chapter-step {
  min-height: 80px;
  border-bottom: 1px solid var(--command-edge);
  background: transparent;
}
#command-view .chapter-step.locked { background: transparent; }
#command-view .chapter-step.selected { background: #c5ad7214; }
#command-view .chapter-step:hover { background: #c5ad721c; }
#command-view .command-advice-panel { padding: 24px 0; border-top: 1px solid var(--command-edge); }
#command-view .command-advice { padding: 16px 0; }
#command-view .command-advice > span {
  border: 0;
  border-radius: 0;
  background: transparent;
}
#command-view :is(.command-contracts-panel, .command-ranks-panel, .command-history-panel) { padding: 24px 0; }
#command-view .contract-offers { gap: 0 28px; }
#command-view .contract-offer,
#command-view .contract-offer.locked {
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}
#command-view .command-rank-current > section,
#command-view .command-rank-paths > section {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}
#command-view :is(.decoration-intro, .decoration-inventory, .decoration-catalog-panel,
  .decoration-growth-panel, .decoration-history-panel) {
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--command-edge);
  border-radius: 0;
  background: transparent;
}

/* Live colony: the map stays framed; telemetry and facilities become a working register. */
#colony-view .field-summary {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
#colony-view .field-summary > button { min-height: 44px; }
#colony-view .battle-board { gap: 0 24px; }
#colony-view .battle-card {
  padding: 20px 12px;
  border: 0;
  border-left: 2px solid #738c6b;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#colony-view .battle-card.fighting { border-left-color: var(--amber); }
#colony-view .battle-card.rescued { border-left-color: var(--danger); }
#colony-view .battle-card:hover { background: #738c6b12; }
#colony-view #building-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
#colony-view #building-list > .building-card {
  grid-column: auto;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#colony-view #building-list > .building-card p { min-height: 0; margin: 8px 0; }
#colony-view #building-list .building-card-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
#colony-view #building-list .building-art { flex: 0 0 112px; width: 112px; margin: 0; }
#colony-view #building-list .building-card-top > span:last-child { min-width: 0; }
#colony-view #building-list .upgrade-button {
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-left: 2px solid var(--facility-signal);
  background: #ffffff04;
}
#colony-view .welcome-strip {
  padding-inline: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

/* Flight chart: keep the route and departure instrument, open the supporting surface. */
#expeditions-view > .expansion-links {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--flight-line);
  background: transparent;
}
#expeditions-view > .expansion-links h2 { font-size: 23px; }
#expeditions-view :is(.exp-idle, .exp-preparation, .exp-history, .exp-history-empty) {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--flight-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#expeditions-view .exp-preparation { border-top: 0; padding-top: 0; }
#expeditions-view .exp-crew-list { gap: 0; }
#expeditions-view .exp-hero {
  border: 0;
  border-left: 3px solid #5f715b;
  border-bottom: 1px solid var(--flight-line);
  border-radius: 0;
  background: transparent;
}
#expeditions-view .exp-hero.selected { border-left-color: var(--flight-accent); background: #d2a46c12; }
#expeditions-view .exp-hero:hover { background: #d2a46c1c; }
#expeditions-view .exp-estimated {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--flight-line);
  border-radius: 0;
  background: transparent;
}
#expeditions-view .exp-locked-crew > div {
  border: 0;
  border-bottom: 1px solid var(--flight-line);
  border-radius: 0;
  background: transparent;
}
#expeditions-view .exp-history-entry > .exp-report {
  padding: 16px 0;
  border-radius: 0;
  background: transparent;
}

/* Journal: dates belong to a continuous record, without another frame around each stamp. */
#log-view .section-panel { padding: 24px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#log-view .section-intro { border-bottom: 1px solid var(--border); }
#log-view .full-log { border-bottom: 0; }
#log-view .activity-row { padding: 18px 0; border-top: 0; border-bottom: 1px solid var(--border); }
#log-view .activity-row:nth-child(even) { background: transparent; }
#log-view .activity-row time { padding: 3px 0; border: 0; background: transparent; color: var(--muted); }
#log-view .small-tag { border: 0; padding-inline: 0; background: transparent; }

@media (min-width: 851px) {
  #colony-view #building-list > .building-card {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    column-gap: 32px;
    align-items: start;
  }
  #colony-view #building-list .building-card-top { grid-row: span 3; }
  #colony-view #building-list .upgrade-button { justify-self: start; min-width: 220px; }
}
@media (min-width: 1200px) {
  #command-view:has(> .first-loop-panel:not([hidden])) > .command-header { padding: 20px 0 20px 20px; }
  #command-view:has(> .first-loop-panel:not([hidden])) > .expansion-links { padding: 16px 0 16px 20px; }
  #expeditions-view :is(.exp-preparation, .exp-history) { padding-inline: 0; }
}
@media (max-width: 650px) {
  #command-view .command-metrics > div { padding: 12px; border-bottom: 1px solid var(--command-edge); }
  #command-view .command-metrics > div:nth-child(2n) { border-right: 0; }
  #command-view .command-metrics > div:nth-last-child(-n + 2) { border-bottom: 0; }
  #command-view .command-header .command-rank-card { padding: 12px 0; border-left: 0; border-top: 1px solid var(--command-edge); }
  #command-view .chapter-detail { padding-inline: 0; }
  #command-view .contract-offers { grid-template-columns: minmax(0, 1fr); }
  #colony-view .battle-board { grid-template-columns: minmax(0, 1fr); }
  #colony-view #building-list > .building-card { padding-block: 20px; }
  #colony-view #building-list .building-art { flex-basis: 96px; width: 96px; }
  #colony-view #building-list .upgrade-button { width: 100%; }
  #expeditions-view :is(.exp-preparation, .exp-history, .exp-history-empty) { padding-inline: 0; }
  #log-view .section-panel { padding-inline: 0; }
}
