.theater-name { color: var(--muted); font: 11px var(--mono); margin-inline-end: 4px; }
.selection-hud { width: min(410px, calc(100% - 275px)); }
.selection-card { max-height: min(460px, 52dvh); }
#selection-preview { height: 95px; }
.selection-card .command-actions button { padding-inline: 7px; }
#combat-roster { display: grid; gap: 4px; max-height: 190px; overflow-y: auto; padding: 2px; }
.combat-ship { display: grid; grid-template-columns: minmax(85px, 1fr) minmax(68px, .8fr) minmax(84px, 1.13fr); gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line-soft); border-radius: 4px; background: #0b1522; }
.combat-ship-heading { display: grid; gap: 1px; min-width: 0; font-size: 11px; line-height: 1.2; }
.combat-ship-heading strong, .combat-ship-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combat-ship-heading span { color: var(--muted); }
.combat-meters { display: grid; gap: 3px; }
.combat-meter-row { --bar-color: #86cd9b; display: grid; grid-template-columns: 8px minmax(0, 1fr) 22px; gap: 4px; align-items: center; color: var(--bar-color); font: 10px var(--mono); }
.combat-meter-row.energy { --bar-color: #7bb9f6; }
.combat-meter-row.fuel { --bar-color: #f3c083; }
.combat-meter-row progress { width: 100%; height: 5px; appearance: none; border: 0; }
.combat-meter-row progress::-webkit-progress-bar { background: #223045; border-radius: 2px; }
.combat-meter-row progress::-webkit-progress-value { background: var(--bar-color); border-radius: 2px; }
.combat-meter-row progress::-moz-progress-bar { background: var(--bar-color); border-radius: 2px; }
.combat-meter-row b { text-align: right; font-weight: 500; }
.combat-abilities { display: flex; flex-wrap: wrap; justify-content: end; gap: 3px; }
.combat-ability { min-height: 28px; padding: 2px 6px; color: var(--cyan); border-color: #285466; font-size: 11px; }
.combat-ability[aria-disabled="true"] { color: var(--muted); opacity: .7; }
.combat-ability-tooltip { position: fixed; z-index: 1000; width: min(280px, calc(100vw - 16px)); padding: 8px 9px; border: 1px solid #466b79; border-radius: 5px; background: #09131f; color: var(--text); box-shadow: 0 8px 24px #0009; font-size: 11px; line-height: 1.35; pointer-events: none; }
.combat-ability-tooltip strong { display: block; color: var(--cyan); font-size: 12px; }
.combat-ability-tooltip p { margin: 4px 0 0; }
.combat-ability-tooltip .tooltip-availability { color: #ffb1a3; }
.combat-ability-tooltip .tooltip-availability.ready { color: #86cd9b; }
#combat-intent { display: grid; gap: 5px; margin-top: 6px; padding: 7px; border: 1px solid #466b79; border-radius: 4px; background: #0d202b; }
#combat-prompt { color: var(--cyan); font-size: 11px; line-height: 1.35; }
.fleet-controls, .diplomacy-controls { display: grid; align-content: start; gap: 7px; min-width: 0; overflow: auto; }
.fleet-controls { grid-auto-rows: max-content; }
.fleet-controls h2, .diplomacy-controls h2 { font-size: 17px; }
.fleet-list, .diplomacy-list, .hostile-list { display: grid; gap: 4px; }
.fleet-block { border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
.fleet-header { display: grid; grid-template-columns: 1fr auto; gap: 3px; }
.fleet-select { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; padding: 7px; text-align: left; border: 0; background: #101d2c; }
.fleet-select[aria-pressed="true"] { color: var(--cyan); background: #142c38; }
.fleet-select small, .fleet-members small, .hostile-list small { color: var(--muted); font: 9px var(--mono); }
.fleet-select small { justify-self: end; }
.fleet-members { display: grid; gap: 1px; padding: 3px 5px 4px 25px; }
.fleet-members button, .hostile-list button { display: flex; justify-content: space-between; gap: 6px; min-width: 0; padding: 4px 5px; text-align: left; border-color: transparent; background: transparent; font-size: 10px; }
.fleet-members button:hover, .hostile-list button:hover { border-color: var(--line-soft); background: #122333; }
.diplomacy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px 7px; border: 1px solid var(--line-soft); border-radius: 4px; }
.diplomacy-row > span { display: flex; min-width: 0; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.diplomacy-row i { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.faction-red i { background: #ef806f; }.faction-green i { background: #80d29a; }.faction-blue i { background: #79b9ff; }
.diplomacy-toggle { display: inline-flex; gap: 2px; }
.diplomacy-toggle button { padding: 3px 5px; border: 1px solid var(--line-soft); border-radius: 3px; color: var(--muted); background: #0b1522; font: 9px var(--mono); }
.diplomacy-toggle button[aria-pressed="true"] { border-color: #63dbcc; color: #07131d; background: #63dbcc; font-weight: 700; }
.hostile-list button { color: #ffb1a3; }
.combat-drill { display: grid; align-content: start; gap: 9px; }
.combat-drill ol { margin: 0; padding-inline-start: 19px; }
.combat-drill li + li { margin-top: 5px; }
@media (max-width: 580px) {
  .tool-buttons > button > span[aria-hidden="true"] { display: none; }
  .selection-hud { width: min(410px, calc(100% - 105px)); }
  .combat-ship { grid-template-columns: minmax(72px, 1fr) minmax(60px, .75fr); gap: 3px 7px; }
  .combat-abilities { grid-column: 1 / -1; justify-content: start; }
  #combat-roster { max-height: 145px; }
  #selection-preview { height: 72px; }
  .fleet-controls, .diplomacy-controls { max-height: 55vh; }
}

#industry-actions { display: grid; gap: 4px; }
.industry-status { color: #ffd091; font: 11px var(--mono); }
#industry-actions .command-actions { align-items: center; }
#industry-actions .command-actions span { color: var(--muted); font-size: 11px; }
.shipyard-panel { display: grid; gap: 11px; min-width: 0; }
.yard-heading { display: grid; gap: 3px; }
.yard-heading :is(h3, p), .yard-stock, .yard-stock dd, .yard-group h4, .yard-card h5, .yard-card p { margin: 0; }
.yard-stock { padding: 7px 8px; border: 1px solid var(--line-soft); border-radius: 5px; background: #0b1522; }
.yard-stock dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.yard-stock dd, .yard-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.yard-material { display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 0 3px; border-color: transparent; background: transparent; cursor: help; font: 11px var(--mono); }
button.yard-material:is(:hover, :focus-visible) { background: var(--surface); border-color: var(--line); }
.yard-material-tooltip { position: fixed; z-index: 1000; padding: 4px 7px; border: 1px solid #466b79; border-radius: 4px; background: #09131f; color: var(--text); box-shadow: 0 3px 9px #0008; font-size: 12px; line-height: 1.4; }
.yard-material b { font-weight: 600; }
.material-icon { width: 18px; height: 18px; flex: none; }
.yard-filters { display: flex; gap: 5px; }
.yard-filters button { flex: 1; }
.yard-filters button[aria-pressed="true"] { color: var(--cyan); background: #142c38; border-color: #3f6776; }
.yard-group + .yard-group { margin-top: 13px; }
.yard-group h4 { margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.yard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr)); gap: 8px; }
.yard-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 6px; background: #0b1522; overflow: hidden; }
.yard-art { position: relative; height: 58px; display: grid; place-items: center; background: radial-gradient(ellipse at center, #172b40, #090f18 83%); border-bottom: 1px solid var(--line-soft); }
.yard-art canvas { width: 94px; height: 58px; }
.yard-eye { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; min-width: 31px; min-height: 31px; padding: 0; color: var(--cyan); }
.yard-kit-icon { width: 31px; height: 31px; color: #adbed2; }
.yard-card-info { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 7px; }
.yard-card h5 { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.yard-card small { font-size: 10px; color: var(--muted); }
.yard-blocked { font-size: 10px; color: var(--warning); }
.yard-card-info [data-build] { margin-top: auto; min-height: 30px; }
@media (pointer: coarse) {
  .yard-filters button, .yard-card-info [data-build] { min-height: 44px; }
  .yard-eye { min-width: 44px; min-height: 44px; }
}

.region-content, .region-site { display: grid; justify-items: start; gap: 6px; }
.region-content { padding-top: 9px; }
.region-site { width: 100%; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.region-site small { color: var(--muted); }
.regional-project { display: grid; width: 100%; gap: 5px; padding: 8px; border: 1px solid #936e4e; border-radius: 4px; background: #241d1b; }
.regional-project small, .region-site.regional-risk small { color: #f5b981; }
.regional-supplies { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.logistics-panel, .logistics-section, .logistics-form, [data-routes] { display: grid; gap: 8px; }
.logistics-section + .logistics-section { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.logistics-operation { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 5px; }
.logistics-operation span, .logistics-operation small { color: var(--muted); }
.logistics-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.logistics-form label { display: grid; gap: 3px; color: var(--muted); }
.logistics-form :is(select, input) { min-width: 0; }
.logistics-form .logistics-check { display: flex; align-items: end; gap: 5px; }
#warp-fuel { font-size: 11px; color: #f3c083; }
#warp-fuel summary { cursor: pointer; }
#warp-fuel ul { margin-block: 4px; padding-inline-start: 20px; }
#warp-fuel li > button, #warp-fuel li > small { margin-inline-start: 7px; }
[data-fuel-requests] { display: grid; gap: 6px; }
.senate-panel, .senate-content, .senate-card, .senate-brief { display: grid; gap: 7px; min-width: 0; }
.senate-card, .senate-catalog { padding: 8px; border: 1px solid var(--line-soft); border-radius: 5px; }
.senate-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.senate-card form, .senate-card label { display: grid; gap: 5px; min-width: 0; }
.senate-card form button, .senate-card > button { justify-self: start; }
.senate-card :is(small, label), .senate-brief :is(small, span) { color: var(--muted); }
.senate-card select { width: 100%; }
.senate-brief { gap: 3px; padding-block: 6px; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.senate-catalog summary { cursor: pointer; }
.senate-panel button[aria-pressed="true"] { color: var(--cyan); border-color: currentColor; }
.gate-panel { display: grid; gap: 8px; }
.gate-panel > button { justify-self: start; }
.gate-traffic { display: grid; gap: 4px; padding: 7px 8px; background: #0b1523; border: 1px solid var(--line-soft); border-radius: 4px; }
.gate-reading { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.gate-traffic meter { width: 100%; height: 10px; accent-color: var(--cyan); }
.gate-traffic.is-overheated .gate-reading:first-child { color: #ffb1a3; }
.gate-traffic.is-overheated meter:first-of-type { accent-color: #e97965; }
.gate-service, .gate-journeys { display: grid; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 7px; }
.gate-journeys article { display: grid; gap: 4px; padding: 7px 8px; background: #0b1523; border-radius: 4px; }
.gate-journeys article button { justify-self: start; }

.environment-project { border-color: #446761; }
.environment-project small, .dust-status { color: #d9ba90; }
.dust-status { grid-column: 1 / -1; display: block; font: 10px var(--mono); }
.effect-presets { margin-block: 4px; }
.effect-presets > summary { cursor: pointer; color: var(--muted); }

.mining-route-fuel {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.mining-route-fuel .logistics-check { align-items: center; }
.mining-route-fuel input { min-height: 0; margin: 0; }
.mining-route-fuel legend { padding-inline: 4px; color: var(--muted); font-size: 12px; }
