:root {
  color-scheme: dark;
  --ink: #101d24;
  --paper: #f4e5bd;
  --muted: #9aa69e;
  --gold: #f5be57;
  --red: #dc604e;
  --line: #62736a55;
  font-family: "Share Tech Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101b22;
  color: var(--paper);
  overflow: hidden;
  overscroll-behavior: none;
  height: 100dvh;
  background-image: radial-gradient(
    ellipse at 50% 40%,
    #344a45 0%,
    #15252a 48%,
    #0c161d 100%
  );
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button {
  color: var(--paper);
  background: #15272b;
  border: 1px solid var(--line);
  padding: 12px 16px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled) {
  background: #30453d;
  transform: translateY(-1px);
}
button.primary {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 2px;
}
button.primary:hover {
  background: #ffcf74;
}
.flight-deck {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 18px;
}
.briefing {
  width: 120px;
  height: min(800px, 94dvh);
  display: flex;
  flex-direction: column;
  position: relative;
}
.brand {
  color: var(--paper);
  text-decoration: none;
  font:
    bold 58px "Barlow Condensed",
    sans-serif;
  line-height: 0.85;
  border-top: 4px solid var(--gold);
  padding-top: 15px;
  width: 80px;
}
.brand span {
  display: block;
  font-size: 25px;
  letter-spacing: 5px;
  margin-top: 10px;
  color: var(--gold);
}
.vertical-label {
  writing-mode: vertical-rl;
  letter-spacing: 3px;
  font-size: 10px;
  margin-top: 55px;
  color: var(--muted);
}
.briefing-bottom {
  margin-top: auto;
  line-height: 2;
  font-size: 9px;
  white-space: nowrap;
}
.briefing-bottom small {
  font-size: 8px;
  color: #77897e;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8ad7a5;
  margin-right: 5px;
  box-shadow: 0 0 9px #8ad7a5;
}
.mission-notes {
  width: 210px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
}
h2 {
  font:
    800 48px/0.95 "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  margin: 20px 0;
}
.mission-notes p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.rule {
  height: 1px;
  background: var(--line);
  margin: 30px 0;
}
dl {
  font-size: 10px;
}
dt {
  color: var(--muted);
  margin-top: 18px;
  letter-spacing: 1px;
}
dd {
  margin: 5px 0;
  line-height: 1.8;
}
.mission-stamp {
  border: 2px solid #bfa87366;
  color: #c9b780;
  font-size: 9px;
  text-align: center;
  line-height: 1.8;
  padding: 10px;
  transform: rotate(-7deg);
  width: 150px;
  margin: 35px 0;
}
.mission-stamp b {
  font:
    700 23px "Barlow Condensed",
    sans-serif;
}
.mission-notes > small {
  color: var(--muted);
  font-size: 9px;
}
#cabinet {
  position: relative;
  height: min(800px, calc(100dvh - 36px));
  aspect-ratio: 3/5;
  overflow: hidden;
  border: 1px solid #a9ad7c55;
  box-shadow:
    0 0 0 7px #09171b,
    0 25px 80px #0008;
  background: #12313c;
  touch-action: none;
  container-type: inline-size;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7%;
  background: linear-gradient(180deg, #10262aee, #152d2cbb 60%, #101c23ee);
  overflow-y: auto;
  scrollbar-width: thin;
}
#overlay:empty {
  display: none;
}
.menu-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 28px;
}
.seal {
  font:
    600 11px "Barlow Condensed",
    sans-serif;
  letter-spacing: 3px;
  text-align: center;
  color: var(--gold);
}
h1 {
  font:
    800 clamp(52px, 15cqw, 78px)/0.88 "Barlow Condensed",
    sans-serif;
  text-align: center;
  letter-spacing: 3px;
  margin: 16px 0 9px;
  text-shadow: 3px 4px 0 #0a171a;
}
h1 span {
  display: block;
  font-size: 0.65em;
  color: var(--gold);
  letter-spacing: 12px;
  margin-left: 12px;
  margin-top: 9px;
}
.subtitle {
  text-align: center;
  color: #adc0ae;
  font-size: 10px;
  letter-spacing: 3px;
  margin-bottom: 22px;
}
.hero-plane {
  display: block;
  width: 200px;
  height: 128px;
  margin: 0 auto 6px;
}
.menu-actions {
  display: grid;
  gap: 9px;
}
.menu-actions .secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.menu-actions button {
  font-size: 12px;
  letter-spacing: 1px;
}
.menu-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
  margin-top: 24px;
}
.badge {
  border: 1px solid #b5ae7255;
  padding: 4px 7px;
  color: var(--gold);
  font-size: 9px;
}
.panel-title {
  font:
    800 36px "Barlow Condensed",
    sans-serif;
  margin: 0 0 5px;
  letter-spacing: 2px;
}
.panel-sub {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.plane-tabs {
  display: flex;
  gap: 6px;
}
.plane-tabs button {
  flex: 1;
  padding: 9px 3px;
  font-size: 10px;
}
.plane-tabs .selected {
  border-color: var(--gold);
  color: var(--gold);
}
.plane-name {
  font:
    700 30px "Barlow Condensed",
    sans-serif;
  margin: 6px 0;
}
.plane-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.stat-grid > div {
  border: 1px solid var(--line);
  padding: 9px;
  font-size: 9px;
  color: var(--muted);
}
.stat-grid strong {
  display: block;
  font:
    700 22px "Barlow Condensed",
    sans-serif;
  color: var(--paper);
  margin-top: 4px;
}
.upgrades {
  display: grid;
  gap: 6px;
  margin: 15px 0;
}
.upgrade {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}
.upgrade button {
  font-size: 10px;
  padding: 7px 9px;
}
.levels {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 2px;
}
.back {
  width: 100%;
  margin-top: 12px;
  font-size: 11px;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 17px 0;
  font-size: 12px;
  gap: 15px;
}
.setting input[type="range"] {
  width: 130px;
  accent-color: var(--gold);
}
select {
  background: #1b3030;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 8px;
}
.danger {
  color: #f18d76;
}
.scores {
  list-style: none;
  padding: 0;
}
.scores li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
}
.result-rank {
  font:
    800 100px "Barlow Condensed",
    sans-serif;
  color: var(--gold);
  text-align: center;
  line-height: 1.2;
}
.center {
  text-align: center;
}
.results {
  display: grid;
  gap: 12px;
  font-size: 12px;
  margin: 18px 0;
}
.results div {
  display: flex;
  justify-content: space-between;
}
.notice {
  font-size: 10px;
  min-height: 16px;
  color: var(--gold);
  line-height: 1.5;
}
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  pointer-events: none;
  background: linear-gradient(#081b22d9, transparent);
  font-size: 10px;
  text-shadow: 1px 2px #102029;
}
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hud-score {
  font-size: 20px;
  letter-spacing: 1px;
}
.hud-label {
  font-size: 8px;
  color: #d1cdac;
  letter-spacing: 2px;
}
.hud-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 10px;
}
.hp-track {
  width: 105px;
  background: #071921aa;
  border: 1px solid #f5e4b955;
  height: 6px;
}
.hp-track i {
  display: block;
  height: 100%;
  background: #9cdbad;
}
.boss-hud {
  margin-top: 20px;
  text-align: center;
  font-size: 10px;
  color: #ffb294;
}
.boss-track {
  height: 8px;
  border: 1px solid #ff937d88;
  background: #201824;
  margin-top: 5px;
}
.boss-track i {
  display: block;
  height: 100%;
  background: #e86859;
}
.stage-label {
  font-size: 9px;
  color: var(--gold);
  margin-top: 9px;
  letter-spacing: 1px;
}
#touch-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
#touch-controls[hidden],
#hud[hidden],
#debug[hidden] {
  display: none;
}
#touch-controls button {
  pointer-events: auto;
  font-size: 10px;
  background: #102931c9;
  border-color: #e4dba555;
  padding: 10px;
}
#touch-controls span {
  display: block;
  font-size: 7px;
  opacity: 0.6;
  margin-top: 3px;
}
#pause-button {
  margin-left: auto;
}
#debug {
  position: absolute;
  top: 110px;
  left: 9px;
  right: 9px;
  padding: 9px;
  background: #07111eee;
  color: #a7eeb2;
  font-size: 10px;
}
#debug button {
  padding: 5px;
  font-size: 9px;
  margin: 4px 2px;
}
.debug-controls {
  display: flex;
  flex-wrap: wrap;
}
.check {
  accent-color: var(--gold);
}
@media (max-width: 1000px) {
  .flight-deck {
    gap: 25px;
  }
  .briefing {
    width: 70px;
  }
  .mission-notes {
    width: 160px;
  }
  .mission-notes h2 {
    font-size: 36px;
  }
  .briefing-bottom {
    display: none;
  }
}
@media (max-width: 750px) {
  .briefing,
  .mission-notes {
    display: none;
  }
  .flight-deck {
    padding: 0;
  }
  #cabinet {
    height: 100dvh;
    max-width: 100vw;
    max-height: 166.6667vw;
    border: none;
    box-shadow: none;
  }
  .menu-top {
    margin-bottom: 14px;
  }
  #overlay {
    padding: 6%;
  }
}
@media (max-height: 620px) {
  .hero-plane {
    height: 70px;
    width: 130px;
  }
  .menu-top,
  .menu-foot {
    margin: 8px 0;
  }
  .subtitle {
    margin-bottom: 8px;
  }
  #overlay {
    padding: 4%;
  }
  .menu-actions {
    gap: 5px;
  }
  .menu-actions button {
    padding: 8px;
  }
  .panel-sub {
    margin-bottom: 8px;
  }
  .upgrades {
    margin: 8px 0;
  }
}
