@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap");
:root {
  color-scheme: dark;
  --bg: #0b1320;
  --panel: #152233;
  --muted: #8192a7;
  --line: #2b394a;
  --lime: #e1f58b;
  --ink: #e9eef5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 30%, #1a293b 0%, #0c1421 70%);
  color: var(--ink);
  font:
    13px "DM Sans",
    system-ui,
    sans-serif;
  display: grid;
  place-items: center;
}
.shell {
  width: min(1220px, 94vw);
  padding: 25px 0;
}
.masthead {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 25px;
}
.brand {
  font:
    800 32px "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: var(--lime);
  font-size: 26px;
}
.edition,
.live,
.eyebrow,
.under,
.brief-help {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
}
.edition {
  color: var(--muted);
}
.edition span {
  margin: 0 14px;
  color: #445468;
}
.live {
  margin-left: auto;
  color: #b5c3ce;
}
.live i,
.under i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  margin-right: 9px;
}
.game {
  border: 1px solid #394557;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 100px #0006;
}
.hud {
  display: flex;
  align-items: center;
  background: var(--panel);
  height: 88px;
  padding: 0 30px;
  gap: 20px;
}
.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 9px;
}
.eyebrow b {
  color: #a8b9ca;
  font-weight: 500;
}
.mission > div {
  font:
    600 21px "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  margin-top: 5px;
}
.mission strong {
  color: var(--lime);
  margin-left: 9px;
  font-size: 28px;
}
.score {
  margin-left: auto;
  min-width: 160px;
}
.score strong,
.record strong {
  display: block;
  font:
    600 28px "Barlow Condensed",
    monospace;
  letter-spacing: 3px;
  margin-top: 4px;
}
.record {
  border-left: 1px solid var(--line);
  padding-left: 26px;
  margin-right: 12px;
}
.record strong {
  color: #9dafc2;
  font-size: 23px;
}
.icon {
  background: transparent;
  border: 1px solid #3a4859;
  color: #b5c4d4;
  width: 37px;
  height: 37px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 20px;
}
.viewport {
  position: relative;
  aspect-ratio: 1120/520;
  background: #111d32;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}
.flight-label,
.weather {
  position: absolute;
  top: 22px;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8397b2;
  pointer-events: none;
}
.flight-label {
  left: 29px;
}
.cross {
  color: var(--lime);
  margin-right: 10px;
}
.weather {
  right: 29px;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 5% 7%;
  background: linear-gradient(90deg, #0e1929f5 10%, #102039aa 57%, #10203900);
}
.overlay.hidden {
  display: none;
}
.brief {
  max-width: 570px;
}
.brief > .eyebrow {
  color: var(--lime);
  font-size: 10px;
}
h1 {
  font:
    700 clamp(30px, 4.7vw, 64px)/1.02 "Barlow Condensed",
    Impact,
    sans-serif;
  letter-spacing: -0.6px;
  margin: 18px 0;
}
h1 em {
  font-style: normal;
  color: var(--lime);
}
.brief p {
  color: #a5b6ca;
  font-size: 13px;
  line-height: 1.8;
}
.primary {
  background: var(--lime);
  color: #202a26;
  border: 0;
  border-radius: 6px;
  padding: 17px 25px;
  font:
    800 12px "DM Sans",
    sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  margin: 15px 0;
}
.primary span {
  margin-left: 48px;
  font-size: 18px;
}
.brief-help {
  font-size: 8px;
  color: #8193aa;
  margin-top: 7px;
}
.cockpit {
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 20px 30px;
  background: var(--panel);
  height: 101px;
}
.ammo > div {
  margin: 7px 0;
  font-size: 11px;
  letter-spacing: 1px;
}
.ammo > span:last-child {
  font-size: 10px;
  color: #879bb1;
}
.ammo #ammo-dot {
  color: var(--lime);
  margin-right: 8px;
}
.badges {
  border-left: 1px solid var(--line);
  padding-left: 35px;
}
.badges > div {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}
.badges > div > span {
  border: 1px solid #405166;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #677d95;
  font-size: 19px;
}
.badges > div > span.earned {
  color: var(--lime);
  border-color: #a2b563;
  background: #e1f58b12;
}
.drop {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--lime);
  border: 0;
  padding: 17px 22px;
  border-radius: 7px;
  color: #253021;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
}
.drop > span {
  font-size: 23px;
}
.drop:disabled {
  background: #2a3948;
  color: #8192a5;
  cursor: default;
}
kbd {
  font:
    9px "DM Sans",
    sans-serif;
  border: 1px solid #25302140;
  border-radius: 3px;
  padding: 5px 7px;
  margin-left: 12px;
}
.under {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: #63758b;
  font-size: 8px;
  letter-spacing: 1.3px;
}
.under b {
  margin: 0 12px;
  color: #c7d2da;
}
.under i {
  width: 4px;
  height: 4px;
  background: #80996a;
}
.toast {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  background: #152335e8;
  border: 1px solid #b9d77766;
  padding: 10px 18px;
  border-radius: 6px;
  color: var(--lime);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
button:not(:disabled):hover {
  filter: brightness(1.12);
}
@media (max-width: 750px), (max-height: 540px) and (orientation: landscape) {
  .shell {
    width: 98vw;
    padding: 5px 0;
  }
  .masthead {
    margin: 0 6px 7px;
  }
  .brand {
    font-size: 22px;
  }
  .edition {
    font-size: 7px;
  }
  .live {
    display: none;
  }
  .hud {
    height: 57px;
    padding: 0 14px;
    gap: 10px;
  }
  .score {
    min-width: 90px;
  }
  .score strong {
    font-size: 22px;
  }
  .record {
    padding-left: 12px;
    margin-right: 0;
  }
  .record strong {
    font-size: 20px;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .mission > div {
    font-size: 16px;
  }
  .mission strong {
    font-size: 21px;
  }
  .icon {
    width: 30px;
    height: 30px;
  }
  .cockpit {
    height: 73px;
    padding: 10px 14px;
    gap: 15px;
  }
  .badges {
    padding-left: 15px;
  }
  .drop {
    padding: 9px 13px;
    gap: 8px;
    font-size: 9px;
  }
  kbd {
    display: none;
  }
  .ammo > div {
    font-size: 9px;
  }
  .under {
    margin: 9px 6px 0;
    font-size: 6px;
  }
  .under > span:last-child {
    display: none;
  }
  h1 {
    font-size: 36px;
    margin: 10px 0;
  }
  .brief p {
    font-size: 10px;
    margin: 8px 0;
  }
  .primary {
    padding: 9px 16px;
    margin: 5px 0;
    font-size: 10px;
  }
  .brief-help {
    font-size: 6px;
  }
  .weather,
  .flight-label {
    font-size: 7px;
    top: 12px;
  }
  .overlay {
    padding: 4% 6%;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .shell {
    width: min(940px, calc((100svh - 125px) * 2.154));
    padding: 3px 0;
  }
  .masthead {
    display: none;
  }
  .hud {
    height: 48px;
  }
  .cockpit {
    height: 65px;
    padding-block: 6px;
  }
  .under {
    display: none;
  }
  .game {
    border-radius: 8px;
  }
  .brief p {
    font-size: 10px;
  }
  .brief-help {
    display: none;
  }
  h1 {
    font-size: 32px;
    margin: 8px 0;
  }
  .primary {
    padding: 8px 15px;
    margin: 3px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.drop.reloading { background: linear-gradient(90deg, #64753f var(--reload), #2a3948 var(--reload)); color: #e9eef5; }
.ammo { min-width: 170px; }
#power { display: block; max-width: 270px; }
@media (max-width: 750px), (max-height: 540px) and (orientation: landscape) { .ammo { min-width: 115px; } #power { max-width: 170px; font-size: 8px; } }
