/* Shared controls and the original colony surface finish the outpost system. */
.topbar :is(.resource-plus, .arena-global-inbox, #save-button) {
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.topbar .resource-plus { width: 44px; height: 44px; line-height: 1; margin-left: 2px; }
.topbar .resource > div, .page-heading > div { min-width: 0; }
.resource strong, .page-heading h1, .page-heading p { overflow-wrap: anywhere; }
.page-heading-tools { gap: 12px; }
.heading-guide { min-height: 44px; }
.authority-status > div { min-width: 0; }
.authority-status :is(strong, p) { overflow-wrap: anywhere; }

.expansion-links :is(.primary-button, .secondary-button, .text-button) { min-height: 44px; line-height: 1.7; }

/* Side panels are operational controls, with the same legible spacing as the pages. */
.right-column > .panel { border-color: #55594b; border-radius: 2px; }
.right-column :is(.strategy-panel, .crew-panel, .policy-panel, .mission-panel) { padding: 20px; }
.right-column .side-heading { gap: 12px; }
.right-column .side-heading h2 { min-width: 0; font-size: 14px; line-height: 1.6; }
.right-column :is(.help-icon, .text-button, .recruit-button) { min-height: 44px; }
.right-column .help-icon { min-width: 44px; flex-shrink: 0; border-radius: 2px; }
.right-column :is(.strategy-options, .policy-options) button { min-height: 44px; height: auto; font-size: 12px; line-height: 1.7; }
.right-column :is(.strategy-panel, .policy-panel) > p { font-size: 12px; line-height: 1.9; }
.right-column :is(.strategy-footnote, .policy-trip-note) { font-size: 11px !important; line-height: 1.9; }
.right-column .route-label { align-items: flex-start; flex-wrap: wrap; font-size: 12px; line-height: 1.8; }
.right-column .route-label > span { font-size: 10px; }
.right-column #route-select { min-height: 44px; max-width: 100%; font-size: 12px; }
.right-column .policy-labels { gap: 12px; flex-wrap: wrap; line-height: 1.8; }
.right-column .crew-row { border-color: #4b5144; }
.right-column .crew-name { font-size: 12px; }
.right-column .activity-row { font-size: 11px; line-height: 1.9; }
.right-column .activity-row p { min-width: 0; overflow-wrap: anywhere; }
.right-column .activity-row time { font-size: 10px; }

/* Colony information keeps its original art, simulation and semantic status colors. */
#colony-view .section-heading { flex-wrap: wrap; gap: 10px 16px; }
#colony-view .section-heading h2 { flex: 1 1 120px; min-width: 0; font-size: 16px; line-height: 1.6; }
#colony-view .section-heading .text-button { min-height: 44px; font-size: 12px; line-height: 1.7; }
#colony-view .facility-links { flex-wrap: wrap; gap: 8px 16px; }
#colony-view .world-panel .panel-toolbar { flex-wrap: wrap; gap: 12px; }
#colony-view .world-panel .panel-toolbar h2 { min-width: 0; line-height: 1.8; }
#colony-view .simulation-controls button { min-width: 44px; min-height: 44px; }
#colony-view .map-zoom-button { min-width: 44px; min-height: 44px; }
#colony-view .world-status { flex-wrap: wrap; font-size: 10px; line-height: 1.8; }
#colony-view .world-status > div { min-width: 0; }
#colony-view .world-weather { max-width: 48%; white-space: normal; line-height: 1.6; }
#colony-view .world-hint { max-width: calc(100% - 24px); white-space: normal; line-height: 1.7; text-align: center; }
#colony-view .field-summary { gap: 10px 18px; border-radius: 2px; }
#colony-view .field-summary > :is(span, button) { font-size: 11px; line-height: 1.8; }
#colony-view .field-summary > button { min-height: 44px; }
#colony-view .battle-card { border-radius: 2px; }
#colony-view .battle-reason { font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
#colony-view .battle-cargo { font-size: 11px; line-height: 1.8; }
#colony-view .battle-cargo i { font-size: 10px; }
#colony-view .building-card { padding: 16px; border-color: #555b4a; border-radius: 2px; }
#colony-view .building-card .building-card-top { min-height: 44px; }
#colony-view .building-card .building-art { background: #2b3028; border-radius: 2px; }
#colony-view .building-card h3 { font-size: 14px; line-height: 1.7; }
#colony-view .building-card .level-label { font-size: 10px; }
#colony-view .building-card .building-upgrade-summary { color: #d0c3a5; font-size: 12px; line-height: 1.85; }
#colony-view .building-card .upgrade-button { min-height: 44px; font-size: 11px; line-height: 1.8; }
#colony-view .welcome-strip { flex-wrap: wrap; gap: 12px; }
#colony-view .welcome-strip > div:nth-child(2) { min-width: 0; flex: 1 1 180px; }
#colony-view .welcome-strip strong { font-size: 13px; line-height: 1.8; }
#colony-view .welcome-strip p { font-size: 12px; line-height: 1.85; }
#colony-view .welcome-strip > .text-button { min-height: 44px; font-size: 12px; }
.footer { flex-wrap: wrap; gap: 10px 20px; border-color: #454a3e; font-size: 10px; line-height: 1.8; }
.footer > span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  #colony-view .building-card { padding: 14px; }
  .topbar .resources { gap: 16px; }
  .topbar .topbar-end { gap: 10px; }
}
@media (max-width: 700px) {
  /* Normal flow separates large values and notifications without covering the wordmark. */
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: start;
    align-content: center;
    height: auto;
    min-height: 222px;
    padding: 20px 16px;
    gap: 24px 12px;
  }
  .topbar .wordmark { margin-top: 0; max-width: none; min-width: 0; }
  .topbar .wordmark strong { font-size: 29px; }
  .topbar .topbar-end {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: 96px;
    max-width: 96px;
    padding: 0;
    margin: 0;
    align-content: flex-start;
    gap: 7px;
  }
  .topbar .resources {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
    gap: 12px 16px;
    align-items: flex-start;
  }
  .topbar .resource { min-width: 0; max-width: 100%; }
  .topbar .resource strong { font-size: 17px; }
  .topbar .resource-plus { margin-left: 0; }
  .page-heading { flex-wrap: wrap; gap: 16px; }
  .page-heading > div:first-child { flex: 1 1 100%; }
  .page-heading .page-heading-tools { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
  .page-heading h1 { line-height: 1.5; }
  .page-heading .heading-guide { min-height: 44px; padding: 8px 12px; font-size: 11px; }
  .page-heading .colony-clock strong { font-size: 11px; }
  .page-heading .colony-clock small { font-size: 10px; }
  .right-column #route-select { font-size: 16px; }
  .right-column :is(.strategy-panel, .crew-panel, .policy-panel, .mission-panel) { padding: 18px; }
  #colony-view .world-panel .panel-toolbar { padding: 10px; gap: 8px; }
  #colony-view .world-panel .panel-toolbar h2 { font-size: 12px; }
  #colony-view .world-panel .sector-switcher { flex-wrap: wrap; }
  #colony-view .world-panel .sector-switcher button { flex: 1 1 40%; min-height: 44px; font-size: 11px; }
  #colony-view .world-weather { font-size: 9px; }
  #colony-view .field-summary { padding: 12px; gap: 8px 14px; }
  #colony-view .field-summary > button { margin-left: 0; }
  #colony-view .building-card { padding: 12px; }
  #colony-view .building-card h3 { font-size: 13px; }
  #colony-view .building-card .building-upgrade-summary { font-size: 11px; }
  #colony-view .welcome-strip > .text-button { margin-left: 0; }
  .footer > span:last-child { font-size: 10px; letter-spacing: .04em; }
}
@media (max-width: 380px) {
  .topbar .wordmark strong { font-size: 26px; }
  .topbar .wordmark-sub { font-size: 11px; letter-spacing: 3px; }
  #colony-view .section-heading { gap: 8px 12px; }
  #colony-view .section-heading > .text-button { flex: 1 1 auto; }
  #colony-view .battle-card-top { flex-wrap: wrap; }
}
