body {
  min-height: 100svh;
  background: #0a0a0c;
}
.fl-header {
  height: 68px;
  max-width: 1240px;
  margin: auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.fl-header .brand {
  font-size: 21px;
}
.back {
  font: 12px var(--mono);
  color: #a8abb2;
  padding: 14px 0;
}
.back:hover {
  color: var(--accent);
}
.fl-layout {
  max-width: 1060px;
  margin: 12px auto 20px;
  display: grid;
  grid-template-columns: 1fr 420px;
  column-gap: 100px;
  align-items: center;
  padding: 0 36px;
  position: relative;
}
.briefing {
  grid-column: 1;
  grid-row: 1;
}
.eyebrow {
  font: 10px var(--mono);
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 24px;
}
.briefing h1 {
  font-size: clamp(60px, 6vw, 90px);
  letter-spacing: -0.065em;
  line-height: 0.86;
  font-weight: 900;
}
.briefing h1 span {
  color: var(--accent);
}
.lede {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 30px 0 16px;
}
.description {
  max-width: 300px;
  font-size: 14px;
  color: #8a909c;
  line-height: 1.7;
}
.field-notes {
  margin: 30px 0;
  border-top: 1px solid #ffffff14;
  padding-top: 18px;
}
.field-notes p {
  font-size: 12px;
  color: #a4acb7;
  margin: 12px 0;
  max-width: 310px;
  display: flex;
  gap: 16px;
}
.field-notes b {
  font: 10px var(--mono);
  color: var(--accent);
  padding-top: 3px;
}
.keyboard-note,
.edition {
  font: 10px/1.9 var(--mono);
  letter-spacing: 0.08em;
  color: #737e8e;
}
.edition {
  margin-top: 36px;
  font-size: 9px;
  color: #495564;
}
.game-shell {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 420/760;
  border: 1px solid #394453;
  border-radius: 15px;
  overflow: hidden;
  background: #222c3c;
  box-shadow: 0 22px 90px #0008;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  color: #e4f5ff;
}
.hud-stats {
  padding: 9px 12px;
  background: #0b1525dd;
  border: 1px solid #4e728444;
  border-radius: 9px;
  min-width: 99px;
}
.hud span {
  font: 8px var(--mono);
  letter-spacing: 0.08em;
  display: block;
  color: #a5bed0;
}
.hud strong {
  font-size: 25px;
  line-height: 1.1;
  display: block;
  margin-top: 3px;
}
.hud small {
  font: 8px var(--mono);
  color: #a5bed0;
}
.hud-center {
  flex: 1;
  text-align: center;
  background: #0b1525dc;
  border-radius: 8px;
  padding: 9px 3px;
}
.hud-center strong {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #80e8fa;
  margin-top: 5px;
}
.progress {
  height: 3px;
  background: #63758944;
  max-width: 120px;
  margin: 7px auto 0;
  border-radius: 3px;
  overflow: hidden;
}
.progress i {
  display: block;
  background: #66def4;
  height: 100%;
  width: 0;
}
.icon-button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  background: #101a29de;
  border: 1px solid #78879570;
  border-radius: 9px;
  color: #eff6ff;
  font-size: 22px;
  cursor: pointer;
}
.game-foot {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 9px var(--mono);
  letter-spacing: 0.05em;
  color: #778697;
  min-height: 42px;
}
.game-foot button {
  background: none;
  border: 0;
  color: #b7c3c9;
  font: 10px var(--mono);
  min-height: 44px;
  padding: 0 6px;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid #c9f44d;
  outline-offset: 3px;
}
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #0a142bd9 0%,
    #0b1527d4 42%,
    #0b142aeb 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 25px;
  overflow: auto;
}
.overlay[hidden] {
  display: none;
}
.panel {
  width: 100%;
  text-align: center;
}
.panel .eyebrow {
  color: #90d7e9;
  margin-bottom: 12px;
  font-size: 9px;
}
.panel h2 {
  font-size: 45px;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
}
.panel h2 span {
  color: #8ce9f8;
}
.panel .sub {
  color: #bbc9d9;
  font-size: 13px;
  line-height: 1.6;
  max-width: 290px;
  margin: 17px auto 24px;
}
.panel .mission {
  border: 1px solid #94c8e433;
  background: #152337bd;
  border-radius: 9px;
  margin: 24px 0 14px;
  padding: 15px;
  text-align: left;
}
.mission small {
  color: #90d7e9;
  font: 9px var(--mono);
  letter-spacing: 0.08em;
}
.mission strong {
  display: block;
  margin: 5px 0;
  font-size: 19px;
}
.mission p {
  font-size: 11px;
  color: #a6b8c9;
}
.primary,
.secondary {
  min-height: 48px;
  display: block;
  width: 100%;
  border-radius: 6px;
  font: 700 12px var(--mono);
  letter-spacing: 0.03em;
  cursor: pointer;
}
.primary {
  color: #102029;
  background: #c9f44d;
  border: 1px solid #d8ff76;
  box-shadow: 0 4px 0 #66852a;
  margin: 10px 0 14px;
}
.primary:hover {
  background: #dafb8b;
}
.secondary {
  background: #19283dd9;
  color: #d2e5f2;
  border: 1px solid #52718a88;
  margin: 9px 0;
}
.secondary:hover {
  background: #263b54;
}
.small-copy {
  font: 9px/1.7 var(--mono);
  color: #a3b4c8;
  margin: 18px 0 0;
}
.results {
  display: flex;
  justify-content: space-evenly;
  padding: 20px 0;
  margin: 8px 0;
  border-block: 1px solid #9bb9cc33;
}
.results strong {
  font-size: 25px;
  display: block;
}
.results span {
  font: 9px var(--mono);
  color: #9cbed1;
}
.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin: 20px 0;
}
.level-grid button {
  min-height: 47px;
  border: 1px solid #587086;
  border-radius: 5px;
  color: #dff7ff;
  background: #1c3048;
  font: 13px var(--mono);
  cursor: pointer;
}
.level-grid button:disabled {
  opacity: 0.4;
  cursor: default;
}
.level-grid button.done {
  border-color: #bde97d;
  color: #c9f44d;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 800px) and (max-height: 880px) {
  .fl-layout {
    grid-template-columns: 1fr min(420px, calc((100svh - 134px) * 0.55263));
    max-width: 980px;
    margin-top: 0;
  }
  .briefing h1 {
    font-size: 72px;
  }
  .edition {
    margin-top: 18px;
  }
  .field-notes {
    margin: 22px 0;
  }
}
@media (max-width: 799px) {
  .fl-header {
    height: 49px;
    padding: 0 17px;
  }
  .fl-header .brand {
    font-size: 17px;
  }
  .back {
    font-size: 11px;
  }
  .briefing {
    display: none;
  }
  .fl-layout {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 auto;
    width: min(100%, calc((100svh - 93px) * 0.55263));
    max-width: 430px;
    gap: 0;
  }
  .game-shell {
    border-radius: 10px;
    width: 100%;
    flex-shrink: 0;
  }
  .game-foot {
    width: 100%;
    padding: 0 9px;
    flex-shrink: 0;
    font-size: 8px;
  }
  .overlay {
    padding: 24px 22px;
  }
  .panel h2 {
    font-size: 40px;
  }
  .panel .sub {
    font-size: 12px;
  }
  .hud {
    top: 9px;
    left: 9px;
    right: 9px;
  }
  .hud-stats {
    padding: 7px 9px;
    min-width: 88px;
  }
  .hud strong {
    font-size: 22px;
  }
  .hud-center strong {
    font-size: 10px;
  }
  .hud span {
    font-size: 7px;
  }
  .panel .mission {
    margin-top: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (max-height: 590px) and (orientation: landscape) {
  .fl-header {
    height: 44px;
  }
  .fl-layout {
    width: calc((100svh - 88px) * 0.55263);
  }
  .panel h2 {
    font-size: 25px;
  }
  .panel .sub,
  .panel .small-copy {
    display: none;
  }
  .panel .mission {
    padding: 7px;
    margin: 9px 0;
  }
  .primary,
  .secondary {
    min-height: 38px;
  }
}
.menu-links {
  display: flex;
  justify-content: space-between;
  margin: -2px 0 12px;
}
.menu-links button {
  border: 0;
  background: none;
  color: #b5cadb;
  font: 10px var(--mono);
  padding: 8px 0;
  min-height: 44px;
  cursor: pointer;
}
.endless-button {
  padding: 13px 4px;
  color: #b3eff7;
  border-color: #64a1b699;
}
.endless-button span {
  display: block;
  margin-top: 8px;
  font: 9px var(--mono);
  color: #9bafc4;
}
.icon-button:disabled {
  opacity: 0.3;
  cursor: default;
}
.panel .level-grid + .secondary {
  margin-top: 24px;
}

.mission .mastery {
  color: #c9f44d;
  font: 9px var(--mono);
  margin-top: 9px;
}
