:root {
  color-scheme: dark;
  font-family: Barlow, Arial, sans-serif;
  background: #090f14;
  color: #e6ecec;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 28px 36px 14px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-left: max(36px, env(safe-area-inset-left));
  padding-right: max(36px, env(safe-area-inset-right));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  overscroll-behavior: none;
}
[hidden] {
  display: none !important;
}
#app-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  color: #91a4ad;
  font-size: 11px;
}
#app-tools button {
  min-height: 44px;
}
.touch button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
button {
  font:
    600 13px Barlow,
    Arial;
  cursor: pointer;
  color: #cbd9dd;
  background: #18232b;
  border: 1px solid #35444c;
  border-radius: 4px;
  padding: 12px 20px;
}
button:hover {
  background: #2a3b45;
}
header {
  display: flex;
  align-items: center;
  gap: 35px;
  padding-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #879ba5;
}
h1 {
  font:
    700 34px "Barlow Condensed",
    Arial;
  margin: 5px 0 0;
  letter-spacing: 2px;
}
h1 span {
  color: #d5f673;
}
.mission {
  margin-left: auto;
  display: grid;
  gap: 8px;
}
.mission strong {
  font-size: 12px;
  letter-spacing: 1px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  border: 1px solid #2d3c45;
  border-radius: 8px;
  overflow: hidden;
}
.viewport {
  position: relative;
  min-height: 600px;
  height: calc(100dvh - 175px);
  background: #080f18;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.sector {
  position: absolute;
  top: 23px;
  left: 25px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #adc1c9;
  pointer-events: none;
  line-height: 2;
}
.sector span {
  font-size: 9px;
  color: #536b79;
}
.sector i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #d5f673;
  border-radius: 50%;
  margin-left: 7px;
}
aside {
  background: #101a22;
  padding: 27px 24px;
  border-left: 1px solid #2d3c45;
}
.hull {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.hull strong {
  font-size: 30px;
}
.hull span {
  font-size: 9px;
  color: #8da1ac;
  letter-spacing: 1px;
}
.bar {
  height: 4px;
  background: #263540;
}
.bar div {
  height: 100%;
  background: #d5f673;
  width: 100%;
  transition: width 0.2s;
}
.cargohead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 38px;
}
.cargohead h2 {
  font-size: 17px;
}
.cargohead span {
  font-size: 9px;
  color: #91a4ad;
}
.mineral {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #29353e;
  padding: 17px 0;
}
.mineral i {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
}
.mineral strong {
  font-size: 13px;
}
.mineral small {
  display: block;
  color: #8298a5;
  font-size: 10px;
  margin-top: 4px;
}
.mineral b {
  font-size: 21px;
  font-weight: 500;
}
.brief {
  border-top: 1px solid #29353e;
  margin-top: 12px;
  padding-top: 25px;
}
.brief p {
  font-size: 12px;
  line-height: 1.6;
  color: #92a6b1;
}
.session {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}
.session strong {
  font-size: 32px;
  color: #d5f673;
}
.session small {
  font-size: 11px;
}
.session > span:last-child {
  color: #667e8b;
  font-size: 10px;
}
footer {
  display: flex;
  gap: 25px;
  align-items: center;
  color: #647b88;
  font-size: 10px;
  letter-spacing: 1px;
  padding-top: 12px;
}
footer button {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 10px;
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 8%;
  background: linear-gradient(90deg, #08101af5, #08101a55);
}
#overlay h2 {
  font:
    600 clamp(38px, 5vw, 72px)/1.02 "Barlow Condensed",
    Arial;
  letter-spacing: 1px;
  margin: 20px 0;
}
#overlay p {
  max-width: 330px;
  color: #9db1bf;
  font-size: 14px;
  line-height: 1.7;
}
#overlay button {
  background: #d5f673;
  color: #182019;
  border: 0;
  margin: 20px 0;
  padding: 16px 24px;
}
#overlay small {
  color: #76909e;
  font-size: 10px;
}
#notice {
  position: absolute;
  bottom: 25px;
  left: 25px;
  font-size: 12px;
  color: #d5f673;
  pointer-events: none;
}
.touch {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: none;
  gap: 8px;
}
.touch button {
  touch-action: none;
  user-select: none;
  min-height: 52px;
  flex: 1;
  background: #182933bd;
}
.touch button:active {
  background: #617548;
}
@media (pointer: coarse) {
  .touch {
    display: flex;
  }
  #notice {
    bottom: 85px;
  }
}
@media (max-width: 760px) {
  body {
    padding: 14px;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  header {
    padding-bottom: 14px;
    gap: 10px;
  }
  .mission {
    display: none;
  }
  header > button {
    margin-left: auto;
  }
  h1 {
    font-size: 27px;
  }
  main {
    grid-template-columns: 1fr;
  }
  .viewport {
    height: 64dvh;
    min-height: 390px;
  }
  aside {
    border-left: 0;
    border-top: 1px solid #2d3c45;
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  aside > .eyebrow,
  .bar,
  .cargohead,
  .brief,
  .session {
    display: none;
  }
  .hull {
    margin: 0;
  }
  .hull strong {
    font-size: 22px;
  }
  .hull span {
    max-width: 55px;
  }
  .mineral {
    border: 0;
    padding: 0 10px;
    gap: 8px;
  }
  .mineral small {
    display: none;
  }
  #cargo {
    display: flex;
    flex: 1;
    justify-content: space-around;
  }
  .mineral b {
    font-size: 18px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  #overlay small {
    max-width: 260px;
    line-height: 1.8;
  }
  .eyebrow {
    font-size: 8px;
  }
}
