:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: #0d0c0f;
  --line: #332b2e;
  --muted: #a49b96;
  --text: #e4ddd0;
  --mint: #c5aa76;
  --amber: #c99862;
  --red: #f58d7e;
  --radius: 12px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: #1a1417;
  border-radius: 7px;
  padding: 11px 14px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover:not(:disabled) {
  background: #2b1d22;
  border-color: #795448;
}
.primary {
  background: var(--mint);
  color: #15100a;
  border-color: var(--mint);
  font-weight: 700;
}
.primary:hover:not(:disabled) {
  background: #e1c994;
  border-color: #e1c994;
}
.danger {
  color: var(--red);
  border-color: #624139;
}
.ghost {
  background: transparent;
}
.small {
  padding: 7px 10px;
  font-size: 12px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-weight: 500;
  letter-spacing: -1.7px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 550;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
p {
  line-height: 1.65;
}
svg {
  display: block;
}
.muted {
  color: var(--muted);
}
.eyebrow,
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 500;
}
.tag {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  padding: 5px 7px;
  border-radius: 4px;
  border: 1px solid #33453f;
  color: var(--mint);
  background: #152923;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
  margin-right: 7px;
}
.topbar {
  height: 77px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #09080b;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brandmark {
  width: 31px;
  height: 31px;
}
.wordmark {
  font-size: 20px;
  letter-spacing: 5px;
  font-weight: 650;
}
.brand .eyebrow {
  font-size: 8px;
  letter-spacing: 2.3px;
  margin-top: 6px;
}
.header-right {
  display: flex;
  gap: 24px;
  align-items: center;
}
.header-right .mono {
  font-size: 11px;
  color: var(--muted);
}
.pilot-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #3d5455;
  background: #213233;
  color: var(--mint);
  border-radius: 50%;
  font-family: monospace;
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  height: 56px;
}
.nav button {
  border: 0;
  background: none;
  border-radius: 0;
  height: 56px;
  padding: 0 17px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.nav button.active {
  color: var(--mint);
  border-bottom-color: var(--mint);
}
.nav .right {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
}
.shell {
  max-width: 1700px;
  margin: auto;
  padding: 29px 34px;
}
.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 23px;
}
.page-title h1 {
  font-size: 30px;
  margin-top: 8px;
}
.page-title p {
  font-size: 12px;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: 218px minmax(360px, 1fr) 282px;
  gap: 18px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-body {
  padding: 19px;
}
.stack {
  display: grid;
  gap: 18px;
}
.ship-display {
  padding: 24px 20px;
  background: radial-gradient(ellipse at 50% 65%, #431b2555, transparent 70%);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.ship-display svg {
  width: 130px;
  height: 105px;
  margin: 0 auto 12px;
  color: #9bb6b8;
  filter: drop-shadow(0 8px 18px #70dfb622);
}
.ship-display h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
.ship-display p {
  font-size: 11px;
  color: var(--muted);
}
.stat-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
}
.stat-line span:first-child {
  color: var(--muted);
}
.meter {
  height: 4px;
  background: #2a3540;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.meter > i {
  display: block;
  height: 100%;
  background: var(--mint);
  border-radius: 8px;
}
.meter.amber > i {
  background: var(--amber);
}
.meter.red > i {
  background: var(--red);
}
.ship-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 15px 0;
}
.ship-stat span {
  color: var(--muted);
}
.mini-caption {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.credit {
  font-size: 25px;
  letter-spacing: -1px;
  color: var(--amber);
}
.credit small {
  font-size: 10px;
  letter-spacing: 1px;
  margin-left: 5px;
}
.cargo-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 18px;
}
.cargo-row span:first-child {
  color: var(--muted);
}
:is(.chart, .galaxy-map) {
  position: relative;
  height: 470px;
  background:
    radial-gradient(ellipse at 57% 35%, #4b152a45, transparent 45%),
    radial-gradient(ellipse at 25% 80%, #38211c66, transparent 50%), #070609;
  overflow: hidden;
}
:is(.chart, .galaxy-map):after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#b2cfdf06 1px, transparent 1px),
    linear-gradient(90deg, #b2cfdf06 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}
:is(.chart, .galaxy-map) canvas,
:is(.chart, .galaxy-map) .routes {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}
.chart-top {
  position: absolute;
  left: 20px;
  top: 19px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.chart-top .eyebrow {
  font-size: 9px;
}
.chart-label {
  position: absolute;
  left: 20px;
  bottom: 19px;
  font-size: 9px;
  color: #68828c;
  z-index: 2;
}
:is(.sector, .system-star) {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: visible;
}
:is(.sector, .system-star):hover:not(:disabled) {
  background: #7591a222;
  border: 0;
}
.node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #afb4c5;
  border: 2px solid #070609;
  outline: 1px solid #9ba1b5;
  box-shadow: 0 0 20px #a3a4ca28;
}
:is(.sector, .system-star).station .node {
  background: var(--mint);
  outline-color: var(--mint);
  border-radius: 2px;
  transform: rotate(45deg);
}
:is(.sector, .system-star).hostile .node {
  background: var(--red);
  outline-color: #9e706b;
}
:is(.sector, .system-star).current {
  outline: 1px solid var(--mint);
  box-shadow:
    0 0 0 7px #c5aa7611,
    0 0 28px #c5aa7626;
}
:is(.sector, .system-star).selected:not(.current) {
  outline: 1px dashed #c99862aa;
  outline-offset: 4px;
}
.sector-label {
  position: absolute;
  top: 37px;
  white-space: nowrap;
  font-size: 10px;
  color: #acbaca;
  letter-spacing: 0.15px;
}
:is(.sector, .system-star).current .sector-label {
  color: var(--mint);
}
:is(.sector, .system-star) small {
  position: absolute;
  top: 53px;
  font-size: 7px;
  letter-spacing: 1px;
  white-space: nowrap;
  color: #758592;
}
:is(.sector, .system-star).current small {
  color: var(--mint);
}
.map-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
  background: #110d12;
}
.legend {
  display: flex;
  gap: 16px;
}
.legend b {
  color: var(--mint);
  font-weight: 400;
}
.legend .hostile {
  color: var(--red);
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.contract {
  padding: 21px;
}
.contract h2 {
  font-size: 19px;
  margin: 9px 0;
}
.contract p {
  font-size: 12px;
  color: var(--muted);
}
.goals {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.goal {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.goal .check {
  color: var(--muted);
  border: 1px solid #40505e;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 10px;
}
.goal.done .check {
  background: var(--mint);
  color: #0a231c;
  border-color: var(--mint);
}
.goal .count {
  margin-left: auto;
  font-family: monospace;
  color: var(--muted);
}
.contract-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.reward {
  font:
    11px ui-monospace,
    monospace;
  color: var(--amber);
}
.sector-detail {
  min-height: 354px;
}
.sector-detail .panel-body {
  padding-top: 21px;
}
.sector-detail h2 {
  margin: 13px 0 9px;
  font-size: 25px;
}
.sector-detail p {
  font-size: 12px;
  color: var(--muted);
}
.sector-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin: 20px 0;
}
.actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}
.actions button {
  font-size: 12px;
}
.detail-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.65;
}
.danger-text {
  color: var(--red) !important;
}
.activity {
  padding: 18px;
}
.log-entry {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  border-left: 1px solid #3b4856;
  padding-left: 11px;
  margin-top: 17px;
}
.log-entry.good {
  border-color: var(--mint);
}
.log-entry.danger {
  border-color: var(--red);
}
.log-number {
  display: block;
  font: 8px monospace;
  color: #677889;
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.bottom-status {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  font:
    9px ui-monospace,
    monospace;
  color: #627384;
  letter-spacing: 0.7px;
}
.full-panel {
  grid-column: 2/4;
  min-height: 610px;
  padding: 28px;
}
.full-panel h2 {
  margin: 10px 0;
}
.full-panel > p {
  font-size: 13px;
  color: var(--muted);
  max-width: 620px;
}
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 25px;
}
.module {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c090e;
}
.module h3 {
  font-size: 18px;
  margin: 15px 0;
}
.module p {
  font-size: 12px;
  color: var(--muted);
  min-height: 66px;
}
.module button {
  width: 100%;
  margin-top: 22px;
}
.module-number {
  font:
    32px ui-monospace,
    monospace;
  color: var(--mint);
}
.services {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.mission-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 25px;
}
.mission-list .contract {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
.mission-list .contract-bottom {
  margin-top: auto;
  padding-top: 18px;
}
.mission-list .goals {
  margin-bottom: 24px;
}
.combat-panel {
  border-color: #71423c;
}
.enemy-heading {
  color: var(--red);
}
.intent {
  padding: 12px;
  background: #2b2225;
  border: 1px solid #593731;
  border-radius: 6px;
  font-size: 11px;
  color: #f3b2a5;
  margin: 17px 0;
  line-height: 1.6;
}
.battle-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.battle-buttons button {
  font-size: 11px;
  padding: 11px 5px;
}
.battle-buttons small {
  display: block;
  opacity: 0.6;
  font-size: 9px;
  margin-top: 5px;
}
.battle-buttons .wide {
  grid-column: 1/-1;
}
.intro {
  min-height: calc(100vh - 77px);
  display: grid;
  place-items: center;
  padding: 35px;
  background:
    radial-gradient(ellipse at 65% 30%, #3e315344, transparent 55%),
    radial-gradient(ellipse at 15% 80%, #164a4455, transparent 45%), var(--bg);
}
.intro-card {
  width: min(670px, 100%);
  padding: 50px;
  border: 1px solid #354449;
  border-radius: 16px;
  background: #0c151deb;
  box-shadow: 0 30px 100px #0005;
}
.intro h1 {
  font-size: 64px;
  line-height: 1.02;
  margin: 25px 0;
}
.intro h1 span {
  color: var(--mint);
}
.intro p {
  font-size: 14px;
  color: #a4b2c0;
  max-width: 480px;
}
.intro .tag {
  display: inline-block;
  margin-bottom: 15px;
}
.intro form {
  margin-top: 34px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.intro label {
  display: block;
  width: 100%;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.intro input {
  background: #111f2b;
  border: 1px solid #3b4c58;
  color: var(--text);
  border-radius: 7px;
  padding: 14px;
  flex: 1;
  min-width: 150px;
}
.intro button {
  padding: 14px 22px;
}
.intro-footer {
  margin-top: 23px;
  font-size: 10px;
  color: #748694;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.boot {
  padding: 15vh 10vw;
}
.boot h1 {
  margin-top: 20px;
}
.blink {
  animation: blink 1s infinite;
}
.loading-bar {
  height: 2px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--mint);
  animation: blink 0.6s infinite;
}
#notice {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: #21372f;
  color: #d4f9e9;
  border: 1px solid #508775;
  padding: 14px 20px;
  border-radius: 9px;
  font-size: 12px;
  max-width: min(90vw, 560px);
  box-shadow: 0 8px 40px #0005;
  display: none;
}
#notice.show {
  display: block;
}
#notice.error {
  background: #36231f;
  border-color: #9d5d50;
  color: #ffcfbf;
}
dialog {
  background: #111d28;
  border: 1px solid #42535f;
  border-radius: 14px;
  color: var(--text);
  max-width: 590px;
  padding: 32px;
}
dialog::backdrop {
  background: #020810bb;
  backdrop-filter: blur(5px);
}
dialog h2 {
  margin: 15px 0;
}
dialog p,
dialog li {
  font-size: 13px;
  line-height: 1.7;
  margin: 15px 0;
}
dialog button {
  width: 100%;
  margin-top: 10px;
}
#help {
  width: min(820px, calc(100vw - 32px));
  max-width: 820px;
  max-height: min(88vh, 920px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.how-to-play {
  padding: 32px;
}
.guide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.guide-header h2 {
  margin: 10px 0 6px;
  font-size: clamp(25px, 4vw, 38px);
}
.guide-header .guide-lede {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
}
#help .guide-close {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}
.guide-contents {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.guide-contents a {
  padding: 8px 10px;
  border: 1px solid #314653;
  border-radius: 6px;
  color: var(--mint);
  font: 10px ui-monospace, monospace;
  letter-spacing: .7px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
.guide-contents a:hover,
.guide-contents a:focus-visible {
  border-color: var(--mint);
  background: #18322d;
}
.guide-section {
  scroll-margin-top: 18px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.guide-section:last-of-type {
  border-bottom: 0;
}
.guide-section h3 {
  margin: 8px 0 12px;
  font-size: 20px;
}
.guide-section h4 {
  margin: 22px 0 8px;
  color: var(--mint);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#help .guide-section p,
#help .guide-section li {
  margin: 8px 0;
  line-height: 1.65;
}
#help .guide-section ul,
#help .guide-section ol {
  padding-left: 22px;
}
.guide-steps {
  counter-reset: guide-step;
  list-style: none;
  padding-left: 0 !important;
}
.guide-steps li {
  position: relative;
  min-height: 28px;
  padding-left: 42px;
}
.guide-steps li::before {
  counter-increment: guide-step;
  content: counter(guide-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--mint);
  font: 11px ui-monospace, monospace;
}
.guide-tip,
.guide-danger {
  margin-top: 18px !important;
  padding: 14px 16px;
  border-left: 3px solid var(--mint);
  background: #162923;
}
.guide-danger {
  border-color: #d6826e;
  background: #32201f;
  color: #ffd8ce;
}
.guide-footer {
  padding-top: 6px;
}
.guide-footer button {
  margin-top: 18px;
}
.victory {
  padding: 24px;
  background: linear-gradient(110deg, #20362b, #1b2836);
  border: 1px solid #41644e;
  border-radius: 12px;
  margin-bottom: 20px;
}
.victory h2 {
  color: var(--mint);
  margin: 9px 0;
}
.victory p {
  font-size: 12px;
  color: #acbfb8;
}
@keyframes blink {
  50% {
    opacity: 0.4;
  }
}
@media (min-width: 1550px) {
  :is(.chart, .galaxy-map) {
    height: 560px;
  }
}
@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 185px minmax(310px, 1fr) 245px;
    gap: 12px;
  }
  .shell {
    padding: 24px 20px;
  }
  .panel-body,
  .panel-header {
    padding: 15px;
  }
  :is(.chart, .galaxy-map) {
    height: 440px;
  }
  .topbar,
  .nav {
    padding-left: 20px;
    padding-right: 20px;
  }
  .legend {
    gap: 8px;
  }
  .mission-list {
    grid-template-columns: 1fr;
  }
  .mission-list .contract-bottom {
    margin-top: 15px;
  }
}
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 185px 1fr;
  }
  .right-column {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .right-column .stack {
    display: contents;
  }
  .full-panel {
    grid-column: 2;
  }
  .header-right > .mono,
  .nav .right {
    display: none;
  }
  .sector-detail {
    min-height: 0;
  }
  :is(.chart, .galaxy-map) {
    height: 460px;
  }
  .mission-list {
    grid-template-columns: 1fr;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .map-footer {
    font-size: 8px;
  }
}
@media (max-width: 640px) {
  .topbar {
    height: 68px;
    padding: 0 17px;
  }
  .wordmark {
    font-size: 16px;
  }
  .brand .eyebrow {
    font-size: 7px;
  }
  .header-right {
    gap: 8px;
  }
  #help {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .how-to-play {
    padding: 20px;
  }
  .guide-header {
    display: block;
    padding-bottom: 18px;
  }
  #help .guide-close {
    margin-top: 14px;
  }
  .guide-contents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-section {
    padding: 23px 0;
  }
  .pilot-badge > span:last-child {
    display: none;
  }
  .nav {
    padding: 0 8px;
    justify-content: space-between;
  }
  .nav button {
    padding: 0 12px;
    font-size: 11px;
  }
  .shell {
    padding: 24px 14px;
  }
  .page-title h1 {
    font-size: 27px;
  }
  .page-title > p {
    display: none;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .left-column {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .left-column > .stack {
    display: contents;
  }
  .ship-display {
    padding: 14px;
  }
  .ship-display svg {
    height: 55px;
    margin-bottom: 8px;
  }
  .ship-display h2 {
    font-size: 17px;
  }
  :is(.chart, .galaxy-map) {
    height: 430px;
  }
  .main-column {
    order: 0;
  }
  .right-column {
    order: 1;
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .full-panel {
    grid-column: auto;
    padding: 20px;
    min-height: 0;
  }
  .bottom-status span:last-child {
    display: none;
  }
  .sector-label {
    font-size: 9px;
  }
  :is(.sector, .system-star) small {
    font-size: 6px;
  }
  .map-footer {
    padding: 12px;
    font-size: 8px;
  }
  .legend {
    gap: 10px;
  }
  .map-footer > span:last-child {
    display: none;
  }
  .intro-card {
    padding: 30px 24px;
  }
  .intro h1 {
    font-size: 48px;
  }
  .intro-footer {
    display: block;
    line-height: 2;
  }
  .full-panel + .right-column {
    display: none;
  }
  .credit {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Expanded fleet, registry, inventory and regional navigation. */
.nav {
  overflow-x: auto;
  height: auto;
  min-height: 56px;
}
.nav button {
  flex-shrink: 0;
  white-space: nowrap;
}
.nav button .mono {
  opacity: 0.45;
  margin-right: 4px;
}
.region-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.region-tabs button {
  flex-shrink: 0;
  font-size: 10px;
  padding: 8px 10px;
}
.region-tabs button.active {
  color: var(--mint);
  border-color: var(--mint);
  background: #1b342e;
}
.gateway-list {
  padding: 18px;
  border-top: 1px solid var(--line);
}
.gate-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.chart-label {
  max-width: calc(100% - 40px);
  line-height: 1.5;
}
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 18px 0;
}
.specs div {
  min-width: 0;
}
.specs dt {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.specs dd {
  margin: 0;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 22px;
}
.item-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c090e;
  min-width: 0;
}
.item-card h3 {
  font-size: 19px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.item-card p {
  font-size: 12px;
  color: var(--muted);
}
.item-card > button {
  margin-top: 12px;
}
.subheading {
  font-size: 19px;
  padding-top: 26px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.subheading .muted {
  font-size: 12px;
  font-weight: 400;
}
.toolbar,
.inline-form,
.profile-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 22px 0;
}
.toolbar label,
.inline-form label,
.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  flex: 1;
  min-width: 150px;
}
input,
select {
  width: 100%;
  background: #111f2b;
  color: var(--text);
  border: 1px solid #3b4c58;
  border-radius: 7px;
  padding: 11px;
  font: inherit;
  min-width: 0;
}
select {
  text-overflow: ellipsis;
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
.profile-form {
  max-width: 850px;
}
.profile-form button {
  flex-shrink: 0;
}
.empty-state {
  padding: 26px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.cargo-preview {
  margin-bottom: 24px;
}
.inventory-meter {
  max-width: 460px;
  margin-top: 24px;
}
details {
  margin-top: 20px;
}
summary {
  cursor: pointer;
  color: var(--mint);
  font-size: 12px;
  padding: 10px 0;
}
details > p {
  margin-top: 12px;
}
.combat-banner {
  padding: 15px 20px;
  margin-bottom: 20px;
  background: #2b2225;
  border: 1px solid #71423c;
  border-radius: 8px;
  font-size: 12px;
}
.contract-bottom {
  gap: 8px;
  flex-wrap: wrap;
}
.mission-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.sector-detail .services {
  margin: 0;
  display: grid;
}
.sector-detail .specs {
  grid-template-columns: 1fr 1fr;
}
.sandbox-tools {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 30px;
}
.sandbox-tools > button {
  margin-top: 16px;
}
@media (max-width: 1180px) {
  .nav button {
    padding: 0 12px;
  }
}
@media (max-width: 960px) {
  .right-column {
    grid-template-columns: 1fr;
  }
  :is(.chart, .galaxy-map) {
    height: 510px;
  }
}
@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .toolbar,
  .profile-form {
    align-items: stretch;
  }
  .profile-form label {
    flex-basis: 100%;
  }
  .header-right .tag {
    display: none;
  }
  :is(.chart, .galaxy-map) {
    height: 450px;
  }
  .sector-label {
    max-width: 100px;
    white-space: normal;
    text-align: center;
  }
  :is(.sector, .system-star) small {
    display: none;
  }
  .chart-label {
    font-size: 8px;
  }
  .page-title h1 {
    font-size: 25px;
  }
}
.layout > * {
  min-width: 0;
}
@media (max-width: 640px) {
  .header-right > button[data-view="registry"] {
    display: none;
  }
}
.waypoint-panel {
  border-color: #57674d;
}
.waypoint-panel h2 {
  font-size: 21px;
}
.waypoint-panel button small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 400;
}

/* Location references share one keyboard- and touch-accessible destination menu. */
button.location-reference {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  line-height: inherit;
  white-space: normal;
  cursor: pointer;
}
button.location-reference:hover:not(:disabled),
button.location-reference:focus-visible {
  background: transparent;
  border: 0;
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:is(.sector, .system-star):hover .sector-label,
:is(.sector, .system-star):focus-visible .sector-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
#location-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(300px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 22px;
  background: #13212d;
  color: var(--text);
  border: 1px solid #526c73;
  border-radius: 10px;
  box-shadow: 0 15px 55px #0009;
  max-height: calc(100vh - 24px);
  overflow: auto;
}
#location-menu h2 {
  font-size: 21px;
  margin: 10px 0;
}
#location-menu p {
  color: var(--muted);
  font-size: 12px;
}
#location-menu .location-identifier {
  font-family: ui-monospace, monospace;
  color: var(--mint);
  margin-bottom: 10px;
}
#location-menu .actions {
  margin-top: 16px;
}

/* Planet actions stay in the right column while the captain changes stations. */
.full-panel {
  grid-column: 2;
}
.right-column {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.planet-actions {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.planet-actions > h3 {
  margin-bottom: 16px;
  font-size: 17px;
}
.planet-actions > button {
  width: 100%;
}
.vein-card,
.frontier-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-top: 16px;
}
.vein-card h3,
.frontier-action h3 {
  margin: 10px 0;
  font-size: 16px;
}
.vein-card p,
.frontier-action p {
  font-size: 11px;
}
.vein-card button,
.frontier-action button {
  width: 100%;
  margin-top: 12px;
}
.frontier-action {
  border-color: #6b6650;
  background: #24231a44;
}
.requirement {
  font-size: 11px;
  color: var(--amber);
  line-height: 1.6;
  margin-top: 10px;
}
.ingredients {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
}
.ingredients .available {
  color: var(--mint);
}
.ingredients .missing {
  color: var(--amber);
}
@media (max-width: 960px) {
  .right-column {
    position: static;
    max-height: none;
    grid-column: 2;
  }
}
@media (max-width: 640px) {
  .full-panel {
    grid-column: auto;
  }
  .right-column {
    grid-column: auto;
  }
  .full-panel + .right-column {
    display: grid;
  }
}

.arrival-event {
  border: 1px solid #c6a263;
  padding: 14px;
  border-radius: 8px;
  margin: 12px 0 20px;
  background: #a7791b11;
}
.arrival-event h3 {
  margin: 12px 0;
  font-size: 16px;
}
.arrival-event button {
  width: 100%;
  margin-top: 10px;
}
.planet-intelligence {
  margin-top: 24px;
}
.vein-card > .eyebrow {
  display: block;
  margin-bottom: 10px;
}

/* Galaxy and planet charts share the grid, stars, route lines and node renderer. */
.galaxy-overview {
  border-bottom: 1px solid var(--line);
}
.galaxy-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.galaxy-caption {
  padding: 12px 20px;
}
.system-star.player-system .node {
  border-color: #a7bbff;
  background: #9baff3;
}
.system-star.player-system .sector-label,
.player-key {
  color: #a7bbff;
}
.system-star:hover .sector-label {
  text-decoration: underline;
}
.resolved-event {
  padding: 12px;
}
.resolved-event summary {
  font-size: 11px;
}

.shell > .waypoint-panel {
  margin-bottom: 20px;
}

.galaxy-scroll {
  --galaxy-height: 470px;
  height: var(--galaxy-height);
  overflow: auto;
  cursor: grab;
}
.galaxy-scroll.panning {
  cursor: grabbing;
  user-select: none;
}
.galaxy-map {
  height: calc(
    var(--galaxy-height) * var(--galaxy-rows, 1) * var(--galaxy-zoom, 1)
  );
}
.galaxy-zoom-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.galaxy-zoom-controls output {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
}
.galaxy-overview .map-footer {
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 640px) {
  .galaxy-scroll {
    --galaxy-height: 360px;
  }
}

.ship-accordion {
  padding: 0;
}
.ship-accordion > summary {
  padding: 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}
.ship-accordion > summary .muted {
  float: right;
  font-size: 12px;
  font-weight: 400;
}
.ship-accordion > summary:hover {
  color: var(--accent);
}
.accordion-body {
  padding: 0 20px 20px;
}
.ship-accordion .ship-accordion {
  margin-top: 12px;
}
@media (max-width: 640px) {
  .ship-accordion > summary .muted {
    float: none;
    display: block;
    margin-top: 6px;
  }
}

.ship-management > section.panel {
  padding: 20px;
}

[data-difficulty="safe"] {
  --difficulty-color: #68c9c2;
}
[data-difficulty="low"] {
  --difficulty-color: #91d9ab;
}
[data-difficulty="moderate"] {
  --difficulty-color: #e3ce78;
}
[data-difficulty="high"] {
  --difficulty-color: #efa566;
}
[data-difficulty="severe"] {
  --difficulty-color: #ff7878;
}
[data-difficulty="extreme"] {
  --difficulty-color: #ca8aff;
}
.sector[data-difficulty] .node,
.system-star[data-difficulty]:not(.player-system) .node {
  border-color: var(--difficulty-color);
  background: var(--difficulty-color);
}
.difficulty-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  font-size: 11px;
  color: var(--muted);
}
.difficulty-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--difficulty-color);
  margin-right: 5px;
}

.damage-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.damage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0.75rem 0;
}
.damage-table th,
.damage-table td {
  padding: 0.45rem;
  text-align: left;
  border-bottom: 1px solid #26323d;
}
.damage-table th {
  color: #bfd2dc;
}
.damage-details,
.defense-details {
  min-width: 0;
}
.enemy-ship-stats {
  margin: 16px 0;
  padding: 0 12px;
  border: 1px solid #26323d;
  border-radius: 8px;
  min-width: 0;
}
.enemy-ship-stats > summary {
  font-weight: 600;
}
.enemy-ship-stats h3 {
  margin-top: 16px;
  font-size: 0.85rem;
}
.command-resistances {
  margin: 18px 0;
  min-width: 0;
}
.command-resistances h3 {
  font-size: 0.8rem;
}
.command-resistances .damage-table {
  font-size: 0.625rem;
  table-layout: fixed;
}
.command-resistances .damage-table th:first-child {
  width: 44%;
}
.command-resistances .damage-table th,
.command-resistances .damage-table td {
  padding: 0.4rem 0;
}
.item-sale { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line, #28333d); }
.item-sale label { display: block; }
.item-sale input { width: 100%; max-width: 9rem; }
.item-sale .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
#market-list-dialog { width: min(34rem, calc(100vw - 2rem)); padding: 1.5rem; color: #e4edf3; background: #111b24; border: 1px solid #435364; border-radius: 12px; }
#market-list-dialog::backdrop { background: #000b; }
#market-list-dialog label { display: block; margin: 1rem 0; }
#market-list-dialog input { display: block; width: 100%; margin-top: .4rem; }
.marketplace { margin-bottom: 2rem; }

/* Keep flight tabs visible and consolidate route actions beside destination entry. */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #09080b;
  box-shadow: 0 5px 16px #0004;
}
.navigation-pane { padding: 18px; }
.navigation-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.navigation-toolbar #travel-form { flex: 1 1 260px; min-width: 0; }
.waypoint-controls { margin-left: auto; max-width: 100%; }
.navigation-toolbar .waypoint-controls { flex: 0 1 570px; }
.waypoint-controls > .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-top: 0; }
.waypoint-controls > .actions button { padding: 10px; }
.waypoint-controls > p { margin: 8px 0 0; font-size: 12px; text-align: right; }
.shell > .waypoint-controls { margin-bottom: 20px; }
html { scroll-padding-top: 76px; }
@media (max-width: 760px) {
  .navigation-toolbar { flex-direction: column; }
  .navigation-toolbar #travel-form, .navigation-toolbar .waypoint-controls { flex: auto; width: 100%; }
  .waypoint-controls > .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .waypoint-controls > .actions button { width: 100%; min-width: 0; }
  .waypoint-controls > p { text-align: left; }
}

/* Flight stations and route controls share one frozen pane. */
.flight-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0 24px;
  background: #09080b;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 5px 16px #0004;
}
.flight-toolbar > .nav {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  overflow-x: auto;
}
.flight-toolbar > .waypoint-controls {
  flex: 0 1 580px;
  min-width: 0;
  margin-left: auto;
  padding: 8px 0;
}
.flight-toolbar .waypoint-controls > .actions { flex-wrap: nowrap; gap: 6px; }
.flight-toolbar .waypoint-controls > .actions button { padding: 8px; font-size: 11px; }
.flight-toolbar .waypoint-controls > p { margin-top: 4px; font-size: 11px; }
@media (max-width: 1100px) {
  .flight-toolbar { flex-wrap: wrap; gap: 0; padding: 0 12px; }
  .flight-toolbar > .nav { flex-basis: 100%; }
  .flight-toolbar > .waypoint-controls { flex-basis: auto; }
}
@media (max-width: 760px) {
  .flight-toolbar > .waypoint-controls { width: 100%; }
  .flight-toolbar .waypoint-controls > .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html { scroll-padding-top: 190px; }
}
@media (min-width: 1101px) {
  .flight-toolbar > .nav { gap: 0; }
  .flight-toolbar > .nav button { padding: 0 9px; font-size: 11px; }
}

#market-buy-dialog { width: min(540px, calc(100vw - 32px)); padding: 24px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
#market-buy-dialog::backdrop { background: #000a; }
#market-filters input[type="checkbox"] { width: auto; }

/* Long route intelligence expands below the toolbar without resizing it. */
.route-details { position: relative; min-width: 0; flex: 0 1 170px; }
.route-details > summary { padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; cursor: pointer; overflow-wrap: anywhere; }
.route-details-body { position: absolute; top: calc(100% + 8px); right: 0; width: min(520px, calc(100vw - 32px)); max-height: min(55vh, 420px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 10px 30px #0008; }
.route-details-body p + p { margin-top: 12px; }
.route-details-body p { font-size: 12px; }
@media (max-width: 760px) {
  .flight-toolbar .waypoint-controls > .actions { position: relative; }
  .route-details { position: static; grid-column: 2; }
  .route-details-body { top: calc(100% + 8px); }
}

.auto-refuel { position: relative; flex-shrink: 0; }
.auto-refuel > summary { cursor: pointer; padding: 8px; font-size: 11px; border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
.auto-refuel-body { position: absolute; top: calc(100% + 8px); left: 0; width: min(320px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 10px 30px #0008; z-index: 2; display: grid; gap: 14px; }
.auto-refuel-body label { display: block; font-size: 12px; }
.auto-refuel-body input[type="checkbox"] { width: auto; margin-right: 6px; }
.auto-refuel-body p { font-size: 12px; margin: 0; }
@media(max-width:760px) { .auto-refuel { position: static; } .auto-refuel-body { left: 0; top: 100%; } }

.pvp-battle { border: 1px solid var(--mint); padding: 18px; border-radius: 10px; margin-bottom: 20px; }
[data-pvp-clock] { font-size: 24px; color: var(--mint); font-variant-numeric: tabular-nums; }
.shared-frontier > .actions { display: flex; flex-wrap: wrap; }

/* PvP boundaries use explicit labels as well as colour. */
.pvp-notice, .pvp-discovery {display:flex;align-items:center;gap:16px;padding:14px 18px;margin:12px 0;border:1px solid;border-radius:8px;}
.pvp-notice strong {white-space:nowrap;}
.pvp-notice span, .pvp-discovery span {font-size:13px;line-height:1.5;}
.pvp-danger {color:#ffb49d;background:#351e20;border-color:#ee8867;}
.pvp-safe {color:#c5aa76;background:#132d29;border-color:#367a67;}
.pvp-discovery {border-color:#96604f;background:#281f23;justify-content:space-between;margin:16px;}
.pvp-discovery span {display:block;margin-top:5px;}
.pvp-key, .pvp-route-warning {color:#ffb49d;}
.pvp-route-warning {margin:0 0 8px;font-size:12px;}
.sector.pvp-sector .node {border-color:#ff9873;box-shadow:0 0 0 5px #ff987325;}
.sector.pvp-sector small, .sector.pvp-sector .sector-label {color:#ffb49d;}
.sector.safe-sector small {color:#c5aa76;}
.nav button[data-view="shared"] {color:#ffb49d;}
@media(max-width:600px) {.pvp-notice,.pvp-discovery {align-items:flex-start;flex-direction:column;gap:8px;}}

.shared-system-overview .galaxy-scroll {height:300px;overflow:hidden;cursor:default;}
.shared-system-overview .galaxy-map {height:300px;min-height:0;width:100%;}
.shared-chart-help {margin:12px 18px;}
.shared-system-overview .sector-label {white-space:normal;width:150px;text-align:center;}
.shared-warp-actions {display:flex;flex-wrap:wrap;gap:8px;padding:16px;}
.return-zone {display:flex;align-items:center;gap:12px;margin-bottom:8px;}
.return-zone span {font-size:12px;color:var(--muted);}
.sector-detail .pvp-notice {flex-direction:column;align-items:flex-start;}
@media(max-width:600px){.shared-system-overview .sector-label{width:95px;font-size:11px;}.shared-system-overview .system-star small{width:95px;white-space:normal;}.return-zone{flex-wrap:wrap;gap:4px;}}

/* Dead-star industrial gothic: coal, dried blood, tarnished brass and bone. */
body {background:radial-gradient(ellipse at 75% 0%,#33101966,transparent 48%),#050506;}
h1,h2,.wordmark {font-family:Georgia,'Times New Roman',serif;letter-spacing:.015em;}
.topbar,.flight-toolbar {background:#08070a;border-color:#442c31;}
.panel,.item-card,.contract {box-shadow:inset 0 1px 0 #79554416,0 8px 28px #0004;}
.panel-header {background:linear-gradient(90deg,#211218,#0d0c0f);border-color:#3b292e;}
.eyebrow {color:#b6a48c;}
.intro-card {border-top:2px solid #863c3c;background:radial-gradient(ellipse at 85% 5%,#5c172744,transparent 65%),#0b090c;}
.intro-card h1 span {color:#c5aa76;}
.pvp-danger {background:#230b12;border-color:#94483d;color:#edbaa7;}
.pvp-discovery {background:#180e13;border-color:#674134;}
.pvp-safe {background:#101814;border-color:#405747;color:#afc3ae;}
.pvp-battle {border-color:#a84843;background:#190b10;}
.shared-frontier>p,.contract>p {line-height:1.65;}

.forbidden-recipe {border-color:#76423e;background:linear-gradient(145deg,#25121b,#0d0c0f 65%);}

.flight-toolbar {flex-wrap:wrap;row-gap:0;}
.mission-tracker {flex:0 0 100%;min-width:0;display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid #3b292e;}
.mission-tracker>label {flex:0 1 220px;min-width:0;font-size:10px;color:#b6a48c;}
.mission-tracker select {width:100%;font-size:11px;padding:6px;margin-top:3px;}
.mission-destinations {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px;margin:12px 0;}
.mission-tracker .mission-destinations {flex:1;min-width:0;margin:0;}
.mission-destinations button {padding:7px;text-align:left;min-width:0;}
.mission-destinations button span,.mission-destinations button small {display:block;overflow-wrap:anywhere;}
.mission-destinations button small {font-size:10px;color:#b6a48c;}
.mission-destinations button span {font-size:12px;line-height:1.4;}
@media(max-width:640px){.mission-tracker{flex-wrap:wrap;gap:4px;}.mission-tracker>label{flex-basis:100%;}.mission-tracker .mission-destinations{flex-basis:100%;grid-template-columns:repeat(2,minmax(0,1fr));}.mission-destinations{grid-template-columns:repeat(2,minmax(0,1fr));}}

.arrival-alerts{max-height:34vh;overflow:auto;border-top:1px solid #6f3535;background:#180e10;padding:8px 16px}
.arrival-alerts article{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:6px 0}
.arrival-alerts article+article{border-top:1px solid #45282d}
.arrival-alerts strong{color:#ffc8af}.arrival-alerts span{font-size:12px;color:#c3b2b2}
.arrival-alerts .actions{margin:0}.arrival-alerts button{padding:6px 12px}

.frontier-safety{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:4px 16px;background:#150e10;font-size:12px;color:#e5c09d}
.frontier-safety:empty{display:none}.frontier-safety button{padding:5px 10px}
.signal-status,.reinforcement-callout{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin:10px 0;border:1px solid #59434a;border-radius:7px;background:#100d11}
.signal-status span,.reinforcement-callout span{font-size:12px;color:#c3b2b2}.signal-status.exposed{border-color:#a84843;background:#210d12;color:#ffb49d}.signal-status.suppressed{border-color:#405747;background:#101814;color:#afc3ae}
.hunt-brief{margin:12px 0;border:1px solid #593132;border-radius:8px;background:#100b0e}.hunt-brief>summary{cursor:pointer;padding:12px;color:#e5c09d;font-weight:700}.hunt-brief-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 12px 12px}.hunt-brief article{padding:12px;border:1px solid #3b292e;border-radius:7px}.hunt-brief h4{margin-top:0}.hunt-brief li{margin:8px 0;line-height:1.45}
.reinforcement-callout{border-color:#a84843;background:#210d12}.reinforcement-callout>div:first-child{display:grid;gap:4px}.reinforcement-callout .actions{margin:0}
.contested-frontier{margin:22px 0;border-top:1px solid #593132;padding-top:16px}
.pvp-battle select{max-width:100%;min-width:160px}.pvp-battle .actions{gap:8px}
.pvp-battle .actions button{white-space:normal}.frontier-safety strong{max-width:100%;overflow-wrap:anywhere}

.in-pvp .shell>.pvp-notice{display:none}
.in-pvp .mission-tracker{padding:4px 0}
.in-pvp .frontier-safety{width:100%;padding:6px 0}
@media(max-width:640px){
  .signal-status,.reinforcement-callout{align-items:flex-start;flex-direction:column}.hunt-brief-grid{grid-template-columns:1fr}
  .in-pvp .mission-tracker .mission-destinations{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .in-pvp .mission-destinations button{padding:4px}
  .in-pvp .mission-destinations button span{font-size:10px;line-height:1.2}
  .in-pvp .mission-destinations button small{font-size:9px;line-height:1.2}
  .in-pvp .mission-tracker>label{font-size:9px}
  .in-pvp .mission-tracker select{padding:3px;margin-top:0}
  .in-pvp .page-title{margin:10px 0}.in-pvp .page-title h1{font-size:22px}
}

/* Extended flight stations: readable forms and bounded nested detail. */
.feature-section { margin: 1rem 0; padding: 1rem; border: 1px solid #50636a; border-radius: 6px; }
.feature-section > summary { cursor: pointer; font-weight: 700; }
.feature-section[open] > summary { margin-bottom: 1rem; }
[data-feature-form], [data-map-filters], [data-plan-quantity] { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0; }
[data-feature-form] label, [data-map-filters] label { flex: 1 1 180px; min-width: 0; display: grid; gap: .35rem; }
[data-feature-form] input, [data-feature-form] select, [data-feature-form] textarea, [data-map-filters] input, [data-map-filters] select { width: 100%; min-width: 0; box-sizing: border-box; }
[data-feature-form] .check-option { display: flex; align-items: center; }
.check-option input { width: auto; }
.feature-dialog { width: min(800px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; background: #14232b; color: #edf1ed; border: 1px solid #9ab4bc; border-radius: 8px; padding: 1.25rem; box-sizing: border-box; }
.feature-dialog::backdrop { background: #000b; }
.recipe-tree, .recipe-tree ul { padding-left: 1.25rem; }
.recipe-tree li { margin: .8rem 0; overflow-wrap: anywhere; }
.map-search, .environment-note, .advanced-battle { padding: 1rem; }
.map-results { display: grid; gap: .7rem; max-height: 420px; overflow: auto; }
.sector.map-dim { opacity: .3; }
.sector.map-dim.current, .sector.map-dim.selected { opacity: 1; }
.combat-replay { max-height: 520px; overflow: auto; padding-left: 1.3rem; }
.table-scroll { overflow-x: auto; }
.table-scroll th,.table-scroll td { text-align: left; padding: .5rem; }
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
[data-motion="reduced"] [data-starfield] { display: none; }
[data-contrast="high"] { --muted: #e1e7e8; --text: #fff; }
[data-contrast="high"] .panel { background: #080f14; color: white; border-color: #b2c9d1; }
[data-contrast="high"] p, [data-contrast="high"] small { color: #e8ecef; }
[data-symbols="on"] .sector.hostile .sector-label::before { content: "⚠ "; }
[data-symbols="on"] .sector.station .sector-label::before { content: "◇ "; }
[data-text-size="large"] { font-size: 18px; }
[data-text-size="largest"] { font-size: 20px; }
[data-text-size="large"] p, [data-text-size="large"] button, [data-text-size="large"] label { font-size: max(1rem, 16px); }
[data-text-size="largest"] p, [data-text-size="largest"] button, [data-text-size="largest"] label { font-size: max(1rem, 18px); }
@media (max-width: 640px) { .feature-section { padding: .65rem; } .feature-dialog { padding: .8rem; } .feature-section .specs { overflow-wrap: anywhere; } }

@keyframes flight-pulse { 0% { filter: brightness(1.12); } 100% { filter: brightness(1); } }
.flight-pulse { animation: flight-pulse .45s ease-out; }

.gate-controls {padding: 24px; min-width: 0;}
.gate-controls p {line-height: 1.6; overflow-wrap: anywhere;}
.gate-controls form {display: grid; gap: 12px; max-width: 680px;}
.gate-controls button {white-space: normal; max-width: 100%; margin: 4px 4px 4px 0;}
.gate-controls select {max-width: 100%; min-width: 0;}
@media(max-width:600px) {.gate-controls {padding: 14px;} .gate-controls .feature-section {padding: 12px;}}

/* Progressive disclosure and bounded multiplayer collections. */
.command-deck .primary-actions button{font-size:15px;padding:12px 16px}
.activity-chain{padding:12px;border-left:3px solid #c5aa76;background:#171317}
.mining-methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.chat-line{padding:8px 10px;margin:4px 0;background:#0d1114;border-left:2px solid #50636a;overflow-wrap:anywhere}
.item-card{content-visibility:auto;contain-intrinsic-size:180px}
.station-directory{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
@media(max-width:640px){
  .nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
  .nav button{min-width:0;padding:9px 5px;font-size:10px;white-space:normal}
  .nav button .mono{display:none}
  .mining-methods{grid-template-columns:1fr}
  .primary-actions{position:sticky;bottom:8px;z-index:4;background:#08070aee;padding:8px;border:1px solid #442c31}
  .feature-section:not([open]){padding:.8rem}
}

/* Nightmare Space identity */
.wordmark{font-size:17px;letter-spacing:.13em}.intro{background:linear-gradient(90deg,#080909ed,#08090977),url('/static/art/nightmare-cathedral.png') center/cover}.intro-card{background:#0a0d10ed}.topbar{background:#080b0eea}.brand .eyebrow{color:#c3604b}

.trial-limit-note{padding:8px 18px;background:#23150f;border-bottom:1px solid #683329;color:#e5b39e;font:11px/1.6 monospace}.trial-limit-note span{margin-left:14px;color:#bfb3a4}@media(max-width:600px){.trial-limit-note span{display:block;margin-left:0;font-size:10px}}
