:root {
  color-scheme: dark;
  font: 16px system-ui;
  background: #10181e;
  color: #d5dedc;
}
body {
  max-width: 1220px;
  margin: auto;
  padding: 24px;
}
header {
  border-bottom: 1px solid #3c514f;
  margin-bottom: 24px;
}
small {
  letter-spacing: 0.18em;
  color: #ecb765;
}
h1 {
  font-size: clamp(32px, 6vw, 64px);
  margin: 8px 0;
}
p {
  color: #94aaa9;
  line-height: 1.5;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 800px) 300px;
  gap: 28px;
}
canvas {
  width: 100%;
  background: #0b1118;
  display: block;
  touch-action: none;
  border: 1px solid #39504f;
}
progress {
  width: 100%;
  height: 14px;
  accent-color: #ecb765;
}
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
button {
  background: #203633;
  border: 1px solid #5b8276;
  color: #e3ece5;
  padding: 12px;
  cursor: pointer;
  border-radius: 3px;
}
button:hover {
  background: #31504a;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
aside button {
  display: block;
  width: 100%;
  margin: 12px 0;
}
aside {
  padding: 20px;
  background: #162126;
  border-top: 3px solid #ecb765;
}
#status {
  color: #ecb765;
  min-height: 2em;
}
@media (max-width: 850px) {
  main {
    grid-template-columns: 1fr;
  }
  body {
    padding: 12px;
  }
}
[hidden] {
  display: none !important;
}
#station {
  padding: 0;
  min-height: 420px;
}
#station h2 {
  font-size: 32px;
}
.station-art {
  font-size: clamp(22px, 5vw, 64px);
  text-align: center;
  color: #8edcc2;
  padding: 40px 0;
  text-shadow: 0 0 30px #70e3c7;
}
.destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.destinations button {
  flex: 1;
  min-width: 180px;
  padding: 24px;
}
.destinations small {
  display: block;
  margin-top: 10px;
  font-size: 10px;
}
#workshop {
  padding: 0;
  margin: 20px 0;
}
#workshop button {
  margin: 8px;
}
#launch {
  background: #bd8748;
  color: #10181e;
  font-weight: bold;
  min-width: 200px;
}
#game {
  width: auto;
  max-width: 100%;
  height: min(948px, calc(100vh - 72px));
  max-height: calc(100vh - 72px);
  margin: auto;
  object-fit: contain;
}
#result {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #080e16dd;
  padding: 20px;
}
.result-card {
  max-width: 560px;
  text-align: center;
  padding: 40px;
  background: #17242d;
  border: 2px solid #f3b463;
  box-shadow: 0 0 70px #dd80213d;
  animation: arrive 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.result-card h2 {
  font-size: clamp(42px, 9vw, 80px);
  color: #ffc172;
  margin: 16px 0;
  text-shadow: 0 0 24px #f58542;
  animation: glow 1.5s ease-in-out 2 alternate;
}
.result-card button {
  margin: 8px;
}
#status {
  margin-top: 20px;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(-90px) scale(1.35);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes glow {
  from {
    text-shadow: 0 0 5px #f58542;
  }
  to {
    text-shadow: 0 0 35px #f58542;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result-card,
  .result-card h2 {
    animation: none;
  }
}
:root {
  background: #090d15;
  font-family: "Courier New", monospace;
  color: #d8d9c3;
}
body {
  background: repeating-linear-gradient(
    0deg,
    #10192555 0px,
    #10192555 1px,
    transparent 1px,
    transparent 4px
  );
}
header {
  border: 0;
  padding: 8px 0;
  margin-bottom: 18px;
}
header p {
  margin: 0;
  font-size: 13px;
}
h1 {
  font-weight: 900;
  letter-spacing: -0.055em;
  color: #d3d1b7;
  text-shadow:
    0 2px #fff3,
    0 4px #656857,
    0 7px #000,
    3px 8px 0 #000;
  font-size: clamp(36px, 6vw, 66px);
}
button {
  font:
    bold 15px "Courier New",
    monospace;
  border: 3px solid;
  border-color: #8e9b99 #18222b #0b111b #647474;
  border-radius: 2px;
  background: linear-gradient(#47565c, #26343d 50%, #1c2832 51%, #33434a);
  box-shadow:
    0 4px 0 #03070d,
    inset 0 0 0 1px #0b141d;
  text-shadow: 0 2px #000;
  transition:
    filter 0.15s,
    transform 0.15s;
  position: relative;
}
button:hover:not(:disabled) {
  filter: brightness(1.3);
  background: linear-gradient(#576b70, #2f454d);
}
button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px #000;
}
aside,
.result-card {
  border: 6px solid;
  border-color: #63787c #18232e #080f18 #475e67;
  background:
    repeating-linear-gradient(
      0deg,
      #ffffff03 0px,
      #ffffff03 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(130deg, #263541, #121c28);
  box-shadow:
    inset 0 0 0 2px #060d18,
    0 12px 30px #0008;
}
#station {
  position: relative;
  overflow: hidden;
}
.station-art {
  height: 200px;
  margin: 22px 0 30px;
  padding: 0;
  position: relative;
  overflow: hidden;
  font-size: 0;
  border: 7px solid;
  border-color: #070e19 #44545e #596e76 #0b1521;
  background:
    radial-gradient(
      circle at 77% 35%,
      #be9b71 0 20px,
      #665a5f 21px 25px,
      transparent 26px
    ),
    radial-gradient(ellipse at 30% 85%, #304762, transparent 60%), #090f20;
  box-shadow: inset 0 0 40px #000;
}
.station-art:before {
  content: "";
  position: absolute;
  width: 240px;
  height: 100px;
  left: calc(50% - 120px);
  top: 45px;
  border: 18px ridge #6c808a;
  border-radius: 50%;
  background: repeating-linear-gradient(
    90deg,
    #132334 0 18px,
    #e1b768 19px 22px,
    #1c3244 23px 35px
  );
  box-shadow:
    0 0 0 6px #0a1420,
    0 12px 0 #050c18,
    0 0 50px #70b9e535;
  transform: rotate(-12deg);
  animation: station-float 7s ease-in-out infinite alternate;
}
.station-art:after {
  content: "KEPLER // DOCK 07     •     PRESSURISED";
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #85cbab;
  text-shadow: 0 0 8px #74ffd4;
}
.destinations button {
  min-height: 125px;
  border-top: 5px solid #a18551;
}
.destinations button:before {
  content: "●";
  display: block;
  color: #7ddfc0;
  text-shadow: 0 0 10px #67ffc7;
  font-size: 12px;
  margin-bottom: 12px;
}
.destinations button:disabled:before {
  color: #8b5649;
  text-shadow: none;
}
#station-coins,
.hud {
  background: #080f16;
  color: #a4e2b2;
  border: 3px inset #445761;
  padding: 14px;
  text-shadow: 0 0 8px #71e6a14a;
}
.hud {
  font-size: 13px;
}
.hud button {
  padding: 6px;
}
#launch {
  background:
    repeating-linear-gradient(135deg, #0001 0 8px, transparent 8px 16px),
    linear-gradient(#e7b86d, #8c5428);
  border-color: #ffe0a1 #694020 #3e281c #d3a161;
  text-shadow: 0 1px #fff5;
  color: #1c1713;
  letter-spacing: 2px;
  padding: 18px;
}
#game {
  border: 8px ridge #526771;
  box-shadow:
    0 0 0 3px #080e17,
    0 0 35px #000;
  box-sizing: border-box;
}
progress {
  height: 22px;
  border: 3px inset #586975;
  background: #070f16;
  margin: 10px 0;
  appearance: none;
}
progress::-webkit-progress-bar {
  background: #080e16;
}
progress::-webkit-progress-value {
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, #091812 12px 15px),
    linear-gradient(#e9da8e, #b68937);
  transition: width 0.1s;
}
progress::-moz-progress-bar {
  background: repeating-linear-gradient(
    90deg,
    #cfa14f 0 12px,
    #091812 12px 15px
  );
}
aside small {
  display: block;
  border-bottom: 2px groove #5a6d76;
  padding-bottom: 16px;
}
aside label {
  font-size: 11px;
  color: #718997;
}
.result-card {
  border-top: 10px solid #b78a47;
}
#result-label {
  color: #ff9b63;
}
@keyframes station-float {
  to {
    transform: translateY(8px) rotate(-9deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .station-art:before {
    animation: none;
  }
  button {
    transition: none;
  }
}

.dps-meter {
  color: #9bb6c6;
  white-space: nowrap;
}
.dps-meter strong {
  color: #ffe09b;
  font-variant-numeric: tabular-nums;
  font-size: 1.2em;
}
