@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap");
:root {
  color-scheme: dark;
  --bg: #080e18;
  --panel: #101925;
  --line: #ffffff12;
  --muted: #778898;
  --mint: #7af4d1;
  --orange: #ff9c5a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 45% 30%, #16223250, transparent 65%), var(--bg);
  color: #e7ecef;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13px;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
button {
  color: inherit;
}
header {
  height: 100px;
  margin: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  color: #f1f5f5;
  display: flex;
  align-items: center;
  font:
    800 27px "Barlow Condensed",
    sans-serif;
  letter-spacing: 2px;
  gap: 4px;
}
.brand > span:not(.brandmark) {
  font-weight: 500;
  color: #b4c2cd;
}
.brandmark {
  display: inline-grid;
  place-items: center;
  color: var(--mint);
  font-size: 45px;
  margin-right: 11px;
  transform: scaleX(1.2);
}
.brand small {
  font:
    9px "Noto Sans KR",
    sans-serif;
  color: var(--muted);
  letter-spacing: 2px;
  margin-left: 19px;
  padding-left: 20px;
  border-left: 1px solid #ffffff26;
}
.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  font: 9px monospace;
  letter-spacing: 1.5px;
  color: #92a3af;
}
.live-dot,
.arena-label i {
  width: 5px;
  height: 5px;
  background: var(--mint);
  border-radius: 100%;
  box-shadow: 0 0 8px #7af4d166;
  display: inline-block;
}
.icon-btn {
  background: #121c29;
  border: 1px solid #ffffff14;
  border-radius: 50%;
  width: 33px;
  height: 33px;
  font-size: 17px;
  margin-left: 5px;
}
.icon-btn.active {
  color: var(--mint);
  border-color: #7af4d155;
}
main {
  max-width: 1440px;
  margin: 36px auto 0;
  padding: 0 4%;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(340px, 520px) minmax(
      220px,
      1fr
    );
  gap: 40px;
  align-items: start;
}
.eyebrow {
  font: 10px monospace;
  letter-spacing: 2px;
  color: var(--mint);
}
.brief {
  padding-top: 19px;
}
h1 {
  font-size: 30px;
  line-height: 1.6;
  letter-spacing: -1.5px;
  font-weight: 800;
  margin: 19px 0;
}
h1 em {
  font-style: normal;
  color: #8499a8;
  font-weight: 500;
}
.intro {
  color: #7e90a0;
  line-height: 2;
  font-size: 12px;
}
.mission-card {
  margin: 29px 0 27px;
  border-top: 1px solid #7af4d144;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.mission-card > .eyebrow {
  color: #8395a4;
  font-size: 9px;
}
.mission-num {
  font:
    700 74px/1.15 "Barlow Condensed",
    sans-serif;
  letter-spacing: -2px;
}
.mission-num span {
  font:
    500 15px "Barlow Condensed",
    sans-serif;
  letter-spacing: 2px;
  margin-left: 10px;
  color: var(--mint);
}
.mission-card p {
  color: #91a3b1;
  font-size: 11px;
}
.brief-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  font: 9px monospace;
  color: #6d7c8c;
}
.brief-stats b {
  display: block;
  color: #c0cbd3;
  font-size: 10px;
  font-weight: 400;
  margin-top: 8px;
}
.controls h3 {
  font: 10px monospace;
  letter-spacing: 1px;
  color: #aebac4;
  display: flex;
  justify-content: space-between;
}
.controls h3 span {
  font: 10px "Noto Sans KR";
  color: #62798a;
}
.controls p {
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 15px 0;
}
.controls p > span {
  margin-left: auto;
  color: #8b9da9;
  font-size: 11px;
}
kbd {
  border: 1px solid #ffffff22;
  border-radius: 3px;
  background: #182231;
  padding: 3px 6px;
  font: 10px monospace;
  color: #bcc8d2;
}
.touch-guide {
  font-size: 10px;
  color: #6d8191;
  line-height: 1.9;
  padding-top: 9px;
}
.side-footer {
  font: 10px/2 monospace;
  color: #b2c2ce;
  letter-spacing: 1px;
  margin-top: 29px;
}
.side-footer span {
  font: 10px "Noto Sans KR";
  letter-spacing: 0;
  color: #586f80;
}
.arena-label {
  display: flex;
  justify-content: space-between;
  color: #617888;
  font: 9px monospace;
  letter-spacing: 1px;
  margin: 0 0 11px;
}
.arena-label > span:first-child {
  color: #b6c7cf;
}
.arena-label i {
  margin-right: 6px;
}
.arena {
  aspect-ratio: 520/694;
  position: relative;
  overflow: hidden;
  border: 1px solid #45637875;
  border-radius: 10px;
  background: #060e19;
  box-shadow:
    0 20px 100px #0008,
    0 0 50px #53c6be07;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.hud {
  position: absolute;
  top: 23px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.hud small {
  display: block;
  font: 8px monospace;
  color: #8198a9;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
}
.hud strong {
  font: 600 24px "Barlow Condensed";
  letter-spacing: 1px;
}
.hud-center {
  text-align: center;
}
.hud-center strong {
  font-size: 23px;
}
.hull {
  text-align: right;
}
.hull strong {
  font: 15px monospace;
  color: var(--mint);
  letter-spacing: 3px;
}
.flight-line {
  position: absolute;
  bottom: 17px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  color: #678292;
  pointer-events: none;
  font: 8px monospace;
  letter-spacing: 1px;
}
.flight-line i {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--mint);
  border-radius: 50%;
  margin-left: 4px;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #030b1433, #04101c80 45%, #06111be8);
  z-index: 3;
  backdrop-filter: blur(1px);
}
.overlay-content {
  width: 75%;
  max-width: 340px;
  text-align: center;
  padding-top: 20px;
}
.overlay-content > .eyebrow {
  font-size: 8px;
  letter-spacing: 2.5px;
  color: #b4c7d3;
}
.hero-title {
  font:
    800 clamp(58px, 7.8vw, 105px) / 0.81 "Barlow Condensed",
    Impact,
    sans-serif;
  letter-spacing: 8px;
  margin-top: 26px;
  text-shadow: 0 4px 35px #82e4e127;
  transform: skew(-5deg);
}
.hero-title span {
  color: var(--mint);
}
.hero-subtitle {
  font-size: 12px;
  letter-spacing: 7px;
  margin: 18px 0;
  color: #9bb2be;
}
.hero-rule {
  width: 30px;
  height: 1px;
  background: var(--mint);
  margin: 22px auto;
}
.lobby-copy {
  color: #c0ced5;
  font-size: 11px;
  margin-bottom: 23px;
}
form {
  text-align: left;
}
label {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}
label span {
  color: #657f90;
  font-size: 9px;
}
input {
  width: 100%;
  background: #081420ce;
  border: 1px solid #344959;
  border-radius: 5px;
  height: 45px;
  padding: 0 14px;
  color: white;
  font-size: 12px;
  outline: none;
}
input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px #7af4d111;
}
.stage-select {
  display: flex;
  gap: 7px;
  margin: 10px 0 13px;
}
.stage-select button {
  flex: 1;
  background: #10223080;
  border: 1px solid #293f4f;
  border-radius: 4px;
  padding: 10px 5px;
  font: 12px monospace;
  color: #728f9f;
}
.stage-select button span {
  font: 10px "Noto Sans KR";
  margin-left: 4px;
}
.stage-select button.selected {
  color: var(--mint);
  background: #1a453944;
  border-color: #7af4d177;
}
.primary {
  width: 100%;
  background: var(--mint);
  color: #072923;
  border: 0;
  border-radius: 4px;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary:hover {
  background: #abffe5;
  transform: translateY(-1px);
}
.primary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.primary span {
  font: 22px monospace;
}
.small-print {
  color: #658391;
  font-size: 9px;
  margin-top: 15px;
}
.weapon-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.weapon-bar button {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  border: 1px solid #30414b;
  background: linear-gradient(110deg, #182b2c, #101c28);
  padding: 16px 14px;
  border-radius: 6px;
  transition: 0.2s;
}
.weapon-bar button:nth-child(2) {
  background: linear-gradient(110deg, #2a2223, #171c26);
  border-color: #4e3930;
}
.weapon-bar button:hover:enabled {
  border-color: var(--mint);
  transform: translateY(-2px);
}
.weapon-bar button:disabled {
  opacity: 0.45;
  cursor: default;
}
.weapon-symbol {
  font-size: 32px;
  color: var(--mint);
}
.carrier-symbol {
  color: var(--orange);
}
.weapon-bar b {
  font-size: 12px;
  display: block;
  font-weight: 600;
  white-space: nowrap;
}
.weapon-bar small {
  font: 7px monospace;
  letter-spacing: 0.4px;
  color: #8496a1;
  display: block;
  margin-top: 5px;
  white-space: nowrap;
}
.weapon-bar kbd {
  border: 0;
  background: none;
  font-size: 8px;
  padding: 0;
}
.weapon-bar strong {
  margin-left: auto;
  font: 25px "Barlow Condensed";
  color: var(--mint);
}
.weapon-bar button:nth-child(2) strong {
  color: var(--orange);
}
.arena-caption {
  display: flex;
  justify-content: space-between;
  font: 8px monospace;
  letter-spacing: 1px;
  color: #4e687c;
  margin: 13px 0;
}
.rank-panel {
  padding-top: 19px;
}
.rank-panel > .eyebrow {
  font-size: 9px;
}
.rank-panel h2 {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 700;
  margin: 15px 0 9px;
  letter-spacing: -1px;
}
.rank-panel h2 span {
  color: var(--mint);
  font-size: 24px;
}
.rank-intro {
  color: #6b8395;
  font-size: 11px;
}
.rank-tabs {
  display: flex;
  border-bottom: 1px solid #ffffff15;
  margin-top: 25px;
}
.rank-tabs button {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #718797;
  font-size: 11px;
}
.rank-tabs button.selected {
  color: var(--mint);
  border-bottom-color: var(--mint);
}
.rank-head {
  display: flex;
  justify-content: space-between;
  font: 8px monospace;
  letter-spacing: 1px;
  color: #4f6a7c;
  margin: 21px 0 8px;
}
ol {
  padding: 0;
  margin: 0;
  list-style: none;
  min-height: 145px;
}
ol li {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #ffffff08;
  padding: 14px 0;
  font-size: 11px;
}
ol li .place {
  font: 18px "Barlow Condensed";
  color: #637787;
  width: 18px;
}
ol li:first-child .place,
ol li:first-child .rank-score {
  color: var(--mint);
}
.rank-score {
  margin-left: auto;
  font: 16px "Barlow Condensed";
  letter-spacing: 0.5px;
}
.empty-rank {
  display: block;
  color: #637b8d;
  line-height: 1.9;
  text-align: center;
  padding: 28px 8px;
  font-size: 11px;
}
.text-btn {
  border: 0;
  background: none;
  font-size: 10px;
  color: #8298a8;
  margin-top: 15px;
  padding: 0;
}
.intel {
  margin-top: 32px;
  background: linear-gradient(135deg, #17263480, #101a24);
  border: 1px solid #ffffff0b;
  border-radius: 6px;
  padding: 20px;
}
.intel .eyebrow {
  font-size: 8px;
  color: #809aaa;
}
.intel-icon {
  font-size: 34px;
  color: var(--orange);
  margin-top: 15px;
}
.intel h3 {
  font-size: 15px;
  margin: 7px 0 11px;
}
.intel p {
  font-size: 11px;
  line-height: 1.9;
  color: #849ba9;
}
.intel-bottom {
  font-size: 10px;
  line-height: 1.9;
  border-top: 1px solid #ffffff10;
  padding-top: 14px;
  margin-top: 18px;
  color: #687f91;
}
.intel-bottom b {
  font-weight: 400;
  color: #c5d1d8;
}
.rank-note {
  color: #526d7e;
  font-size: 9px;
  line-height: 1.9;
  margin-top: 23px;
}
footer {
  max-width: 1440px;
  margin: 35px auto 0;
  padding: 22px 4%;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font: 8px monospace;
  letter-spacing: 1.5px;
  color: #425c70;
}
.hidden {
  display: none !important;
}
.dialog {
  width: 78%;
  text-align: center;
  padding: 30px 0;
}
.dialog h2 {
  font-size: 24px;
  letter-spacing: -1px;
}
.dialog p {
  font-size: 12px;
  line-height: 1.8;
  color: #9bb0be;
}
.dialog .primary {
  justify-content: center;
  margin-top: 22px;
}
.secondary {
  width: 100%;
  background: #122332;
  border: 1px solid #344c5d;
  border-radius: 4px;
  padding: 12px;
  margin-top: 10px;
  font-size: 12px;
}
.result-score {
  font: 700 70px "Barlow Condensed";
  color: var(--mint);
}
#saveStatus {
  min-height: 25px;
  font-size: 10px;
}
.pause-btn {
  position: absolute;
  right: 17px;
  top: 94px;
  z-index: 2;
  background: #112838aa;
  border: 1px solid #58748455;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #b3c9d3;
}
.drag-pad {
  position: absolute;
  bottom: 39px;
  left: 50%;
  transform: translateX(-50%);
  width: 175px;
  height: 38px;
  border: 1px solid #7af4d13a;
  background: #0a2b3155;
  border-radius: 25px;
  color: #7af4d1aa;
  display: flex;
  align-items: center;
  justify-content: space-around;
  touch-action: none;
  user-select: none;
  font-size: 22px;
}
.drag-pad span {
  font: 8px monospace;
  letter-spacing: 2px;
}
#callout {
  position: absolute;
  top: 33%;
  width: 100%;
  text-align: center;
  color: var(--mint);
  font: 700 26px "Barlow Condensed";
  letter-spacing: 4px;
  pointer-events: none;
  white-space: pre-line;
  text-shadow: 0 0 25px #7af4d1;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #193143;
  border: 1px solid #597284;
  color: #dfecf1;
  padding: 12px 22px;
  border-radius: 6px;
  display: none;
  z-index: 10;
  font-size: 12px;
}
.reduce-motion * {
  scroll-behavior: auto !important;
  transition: none !important;
}
@media (min-width: 1500px) {
  main {
    gap: 50px;
  }
  h1 {
    font-size: 33px;
  }
}
@media (max-width: 1150px) {
  main {
    gap: 23px;
    grid-template-columns: minmax(180px, 1fr) minmax(340px, 480px) minmax(
        175px,
        1fr
      );
  }
  h1 {
    font-size: 23px;
  }
  .weapon-bar button {
    padding: 13px 10px;
    gap: 8px;
  }
  .weapon-bar small {
    font-size: 6px;
  }
  .brief-stats {
    font-size: 8px;
  }
  .header-right > span:not(.live-dot) {
    display: none;
  }
}
@media (max-width: 960px) {
  main {
    grid-template-columns: minmax(330px, 520px) 230px;
    justify-content: center;
  }
  .brief {
    display: none;
  }
  .brand small {
    display: none;
  }
  .hero-title {
    font-size: 95px;
  }
  .arena-section {
    min-width: 0;
  }
}
@media (max-width: 650px) {
  header {
    height: 62px;
    margin: 0 5%;
  }
  .brand {
    font-size: 22px;
  }
  .brandmark {
    font-size: 32px;
  }
  .header-right {
    gap: 4px;
  }
  .icon-btn {
    width: 29px;
    height: 29px;
  }
  main {
    display: block;
    padding: 0 4%;
    margin-top: 17px;
  }
  .arena-section {
    max-width: 480px;
    margin: auto;
  }
  .arena {
    border-radius: 7px;
    aspect-ratio: 520/710;
    max-height: calc(100svh - 185px);
    min-height: 410px;
  }
  .hero-title {
    font-size: 76px;
    margin-top: 18px;
  }
  .overlay-content {
    padding-top: 20px;
    width: 76%;
  }
  .overlay-content > .eyebrow {
    font-size: 7px;
  }
  .hero-subtitle {
    margin: 13px 0;
    font-size: 10px;
  }
  .hero-rule {
    margin: 14px auto;
  }
  .lobby-copy {
    margin: 0 0 16px;
    font-size: 10px;
  }
  .small-print {
    font-size: 8px;
    margin-top: 10px;
  }
  .hud {
    top: 17px;
    left: 16px;
    right: 16px;
  }
  .hud strong {
    font-size: 22px;
  }
  .hud small {
    font-size: 7px;
  }
  .hull strong {
    font-size: 12px;
  }
  .weapon-bar {
    gap: 8px;
    margin-top: 9px;
  }
  .weapon-bar button {
    padding: 10px;
    gap: 8px;
  }
  .weapon-symbol {
    font-size: 25px;
  }
  .weapon-bar b {
    font-size: 11px;
  }
  .weapon-bar strong {
    font-size: 22px;
  }
  .weapon-bar small {
    font-size: 6px;
  }
  .arena-caption {
    font-size: 6px;
  }
  .rank-panel {
    max-width: 480px;
    margin: 28px auto 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
  }
  .intel {
    display: none;
  }
  .rank-panel h2 {
    font-size: 20px;
  }
  .rank-intro {
    font-size: 10px;
  }
  .rank-tabs {
    margin-top: 15px;
  }
  .rank-note {
    margin-top: 15px;
  }
  footer {
    margin-top: 20px;
    padding: 20px 4%;
    font-size: 7px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  .dialog h2 {
    font-size: 21px;
  }
  .result-score {
    font-size: 56px;
  }
  .pause-btn {
    top: 75px;
  }
}
@media (max-height: 720px) and (max-width: 650px) {
  .hero-title {
    font-size: 59px;
    margin-top: 12px;
  }
  .hero-rule {
    margin: 10px auto;
  }
  .hero-subtitle {
    font-size: 8px;
  }
  .lobby-copy {
    margin-bottom: 12px;
  }
  .stage-select button {
    padding: 8px 5px;
  }
  input {
    height: 39px;
  }
  .primary {
    padding: 12px;
  }
  .small-print {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* Game-first viewport: no marketing panels or scrolling during flight. */
body {
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 35%, #17354b44, transparent 60%), #030812;
}
header {
  height: 50px;
  max-width: 620px;
  margin: auto;
  padding: 0 15px;
  border: 0;
}
.brand {
  font-size: 21px;
}
.brandmark {
  font-size: 31px;
  margin-right: 5px;
}
.header-right {
  gap: 5px;
}
.icon-btn {
  width: 29px;
  height: 29px;
  font-size: 18px;
  border-color: #ffffff12;
  background: #101b29aa;
  margin: 0;
}
main {
  display: block;
  width: min(100%, calc((100svh - 50px) * 0.84));
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  height: calc(100svh - 50px);
}
.arena-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
  margin: 0;
}
.arena {
  aspect-ratio: auto;
  flex: 1;
  min-height: 0;
  max-height: none;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #49738940;
  box-shadow: 0 0 100px #4ca5ac12;
}
.weapon-bar {
  height: 70px;
  flex: 0 0 70px;
  padding: 7px 8px 9px;
  margin: 0;
  gap: 8px;
  background: #070e1a;
}
.weapon-bar button {
  padding: 5px 18px;
  gap: 12px;
  border-radius: 5px;
}
.weapon-symbol {
  font-size: 31px;
}
.weapon-bar b {
  font-size: 12px;
  letter-spacing: 2px;
}
.weapon-bar small {
  font: 9px monospace;
  margin-top: 3px;
  color: #73909c;
}
.weapon-bar strong {
  font-size: 29px;
}
.hero-title {
  font-size: clamp(70px, 12vh, 110px);
  margin: 0 0 14px;
  letter-spacing: 10px;
}
.hero-subtitle {
  font-size: 11px;
  letter-spacing: 8px;
  margin: 18px 0 0;
}
.overlay-content {
  width: 70%;
  padding: 0;
  max-width: 340px;
}
#startForm {
  margin-top: 96px;
}
.overlay {
  background: linear-gradient(
    180deg,
    #040d1510,
    #07111b22 35%,
    #04101bbc 70%,
    #04101bea
  );
  backdrop-filter: none;
}
.overlay:not(#lobby) {
  background: #03101ce8;
  backdrop-filter: blur(8px);
}
input {
  background: #081622e0;
  height: 45px;
}
.primary {
  font-size: 15px;
  padding: 14px 18px;
}
.stage-select {
  margin: 9px 0 12px;
}
.stage-select button {
  padding: 11px 5px;
}
.control-hint {
  font-size: 10px;
  color: #7897a5;
  margin-top: 18px;
  line-height: 2;
}
.control-hint span {
  padding: 0 7px;
  color: #385669;
}
.flight-line {
  font-size: 7px;
  bottom: 10px;
}
.hud {
  top: 19px;
  left: 18px;
  right: 18px;
}
.pause-btn {
  top: 79px;
}
.drag-pad {
  bottom: 35px;
  width: 150px;
  height: 35px;
  background: #0a2b3122;
  border-color: #7af4d12a;
  opacity: 0.7;
}
.drag-pad span {
  font-size: 12px;
}
.rank-dialog {
  position: relative;
  padding: 20px 0;
}
.rank-dialog h2 {
  font: 700 42px "Barlow Condensed";
  letter-spacing: 4px;
  margin: 12px 0;
}
.rank-dialog ol {
  max-height: 48vh;
  overflow: auto;
  min-height: 120px;
  margin-top: 15px;
}
.rank-dialog li {
  text-align: left;
  padding: 12px 4px;
}
.close-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  background: none;
  color: #9db5c4;
  font: 30px monospace;
  padding: 0 8px;
}
.rank-tabs {
  margin-top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dialog h2 {
  font-weight: 800;
}
.text-btn {
  padding: 8px;
}
#toast {
  max-width: 90%;
  width: max-content;
  text-align: center;
}
.hud-center small {
  font-size: 7px;
}
@media (max-width: 650px) {
  header {
    margin: auto;
    height: 44px;
    padding: 0 12px;
  }
  main {
    width: 100%;
    height: calc(100svh - 44px);
    padding: 0;
    margin: 0;
  }
  .arena {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .arena-section {
    max-width: none;
  }
  .hero-title {
    font-size: clamp(63px, 11vh, 90px);
  }
  .hero-subtitle {
    margin-top: 15px;
  }
  #startForm {
    margin-top: 75px;
  }
  .overlay-content {
    width: 73%;
  }
  .weapon-bar {
    height: 66px;
    flex-basis: 66px;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
  .weapon-bar button {
    padding: 4px 17px;
  }
  .weapon-bar b {
    font-size: 12px;
  }
  .weapon-bar small {
    font-size: 8px;
  }
  .weapon-bar strong {
    font-size: 26px;
  }
  .weapon-symbol {
    font-size: 28px;
  }
  .hud {
    top: 17px;
  }
  .hud strong {
    font-size: 23px;
  }
  .hull strong {
    font-size: 13px;
  }
  .pause-btn {
    top: 72px;
  }
  .rank-dialog {
    width: 79%;
  }
  .control-hint {
    font-size: 9px;
    white-space: nowrap;
  }
  .dialog .control-hint {
    white-space: normal;
  }
}
@media (max-height: 680px) {
  #startForm {
    margin-top: 40px;
  }
  .hero-title {
    font-size: 65px;
  }
  .hero-subtitle {
    margin-top: 12px;
  }
  .control-hint {
    margin-top: 11px;
  }
  .stage-select button {
    padding: 8px 5px;
  }
  input {
    height: 39px;
  }
  .primary {
    padding: 12px 16px;
  }
  .hud {
    top: 12px;
  }
  .pause-btn {
    top: 65px;
  }
}
/* Combat HUD and optional flight-log drawer. */
.boss-hud {
  position: absolute;
  top: 75px;
  left: 20px;
  right: 66px;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font: 9px monospace;
  letter-spacing: 1px;
  color: #ffb68b;
  text-shadow: 0 1px 3px #000;
}
.boss-hud > div {
  width: 100%;
  height: 4px;
  background: #482633aa;
  margin-top: 8px;
  border-radius: 3px;
  overflow: hidden;
}
.boss-hud i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff6c6c, #ffc17b);
  box-shadow: 0 0 10px #ff794e;
}
.flight-progress {
  position: absolute;
  top: 75px;
  left: 20px;
  right: 66px;
  height: 2px;
  opacity: 0.35;
  pointer-events: none;
}
.flight-progress i {
  display: block;
  height: 100%;
  background: #70f4cd;
}
.urgent {
  color: #ff9e78;
}
.personal-best {
  color: #7ee6c7;
  font: 10px monospace;
  letter-spacing: 2px;
  text-align: center;
  margin: 15px 0 0;
}
.personal-best:empty {
  display: none;
}
.result-rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
}
.result-rewards span {
  font-size: 10px;
  color: #ffe0a6;
  background: #47381c55;
  border: 1px solid #b19a5938;
  border-radius: 3px;
  padding: 6px 8px;
}
.hangar-dialog {
  width: 82%;
  max-height: 87%;
  overflow: auto;
  padding: 24px 3px 15px;
  scrollbar-width: thin;
}
.hangar-dialog h2 {
  font: 700 38px "Barlow Condensed";
  letter-spacing: 5px;
  margin: 12px 0;
}
.hangar-dialog .close-btn {
  top: 10px;
  right: 3px;
}
.hangar-label {
  text-align: left;
  color: #c4d4df;
  font-size: 11px;
  margin: 18px 0 9px;
}
.log-stats {
  font: 9px monospace;
  color: #6f95a6;
  letter-spacing: 1px;
}
.daily-goals {
  display: grid;
  gap: 7px;
}
.daily-goals > div {
  display: flex;
  position: relative;
  justify-content: space-between;
  overflow: hidden;
  background: #0d2331;
  border-radius: 3px;
  padding: 9px 10px;
  font-size: 10px;
  color: #8ba6b4;
}
.daily-goals b {
  font: 10px monospace;
}
.daily-goals i {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #73edc9;
}
.daily-goals .complete {
  color: #8bf7d6;
}
.medal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.medal-grid span {
  display: grid;
  place-items: center;
  min-height: 37px;
  border: 1px solid #38556b44;
  color: #527285;
  font-size: 9px;
  border-radius: 4px;
  padding: 5px;
}
.medal-grid .earned {
  color: #f7d290;
  border-color: #bd965b66;
  background: #b98c2a11;
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.skin-grid button {
  padding: 10px 5px;
  border: 1px solid #345365;
  background: #102330;
  color: var(--skin);
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
}
.skin-grid button:before {
  content: "⋀";
  padding-right: 7px;
}
.skin-grid button.selected {
  border-color: var(--skin);
  background: #25423355;
}
.skin-grid button:disabled {
  opacity: 0.4;
  cursor: default;
}
.audio-controls {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
  margin: 20px 0 5px;
  text-align: left;
}
.audio-controls label {
  font-size: 10px;
  color: #89a4b1;
  margin: 0;
}
.audio-controls input {
  height: 20px;
  padding: 0;
  accent-color: #7af4d1;
  border: 0;
  background: none;
  box-shadow: none;
}
.local-note {
  font-size: 9px !important;
  color: #58788b !important;
  margin: 12px 0 0;
}
.hangar-dialog {
  position: relative;
}
.hero-subtitle {
  margin-bottom: 0;
}
#resultScreen .dialog {
  max-height: 90%;
  overflow: auto;
  scrollbar-width: thin;
}
#resultScreen .dialog h2 {
  margin-bottom: 6px;
}
#resultScreen .result-score {
  line-height: 1.15;
}
@media (max-height: 680px) {
  .hangar-dialog {
    max-height: 90%;
    padding-top: 8px;
  }
  .hangar-dialog h2 {
    font-size: 28px;
    margin: 7px 0;
  }
  .hangar-label {
    margin-top: 12px;
  }
  .medal-grid span {
    min-height: 28px;
  }
  .daily-goals > div {
    padding: 7px 10px;
  }
  .audio-controls {
    margin-top: 12px;
  }
  .boss-hud,
  .flight-progress {
    top: 64px;
  }
}
.hangar-dialog .close-btn {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  background: #0b1924e8;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 25px;
}
.hangar-dialog > .eyebrow {
  clear: both;
}
.hangar-dialog {
  overflow-x: hidden;
}
.hangar-dialog .close-btn {
  padding: 0;
  overflow: hidden;
}
.audio-controls input {
  margin: 0;
  min-width: 0;
  width: 100%;
}
.audio-controls {
  grid-template-columns: 44px minmax(0, 1fr);
}

.flight-timer { position:absolute; transform:translateX(-50%); pointer-events:none; color:#9effe9; background:#071a28d9; border:1px solid #73f4d96b; border-radius:16px; padding:4px 11px; font:700 13px monospace; white-space:nowrap; box-shadow:0 0 18px #53dfd327; }
.flight-timer.expiring { color:#ffc27a; border-color:#ffc27a88; }

.rank-tabs { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.hud-center small { font-size:8px; letter-spacing:1px; white-space:nowrap; }

.weapon-bar { grid-template-columns:repeat(3,minmax(0,1fr)); }
.weapon-bar button { min-width:0; padding:5px 10px; gap:8px; }
.weapon-bar button:nth-child(3) { background:linear-gradient(110deg,#142d3c,#121d2c); border-color:#315568; }
.wingman-symbol,.weapon-bar button:nth-child(3) strong { color:#8bdaff; }
@media(max-width:600px){.weapon-bar{gap:5px;padding-left:5px;padding-right:5px}.weapon-bar button{padding:4px 6px;gap:5px}.weapon-symbol{font-size:23px}.weapon-bar b{font-size:11px;letter-spacing:0}.weapon-bar strong{font-size:23px}.weapon-bar small{font-size:8px;letter-spacing:0}}

/* v3.2 compact cockpit crew ribbon */
.crew-strip{position:absolute;top:12px;left:14px;right:14px;display:flex;justify-content:space-between;gap:8px;z-index:2;pointer-events:none}
.commander{display:flex;align-items:center;gap:8px;min-width:0;color:#edf7ff;text-shadow:0 2px 4px #000}
.commander-photo,.photo-square{width:48px;height:48px;flex-shrink:0;border:1px solid #9bdfef88;border-radius:12px;overflow:hidden;background:linear-gradient(145deg,#244859,#08121d);display:grid;place-items:center;color:#ffe2a0;font-size:25px}
.commander-photo img,.photo-square img{width:100%;height:100%;object-fit:cover}
.commander b{display:block;max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.commander small{font-size:9px;color:#ffe2a0;display:block;margin-bottom:5px}
.crew-hud{display:flex;gap:7px;flex-shrink:0}.crew-tile{width:72px;position:relative;text-align:center;background:#071523bb;border:1px solid #5b91aa55;border-radius:10px;padding:3px 3px 7px;overflow:hidden}
.crew-tile img{width:44px;height:44px;object-fit:cover;border-radius:7px;display:block;margin:0 auto 3px}
.crew-tile b{font-size:9px;display:block;white-space:nowrap;color:#f1f7ff;line-height:13px}.crew-tile small{font:8px monospace;color:var(--crew-color);display:block;line-height:12px}
.crew-tile i{position:absolute;bottom:0;left:0;height:2px;background:var(--crew-color);transition:width .15s}
.crew-tile.fallen{border-color:#ed4555;background:#4a081abb}.crew-tile.fallen img{filter:grayscale(1) sepia(1) saturate(5) hue-rotate(310deg);opacity:.55}.crew-tile.fallen small,.crew-tile.fallen b{color:#ff627a}
.hud{top:107px}.boss-hud{top:163px}.pause-btn{top:163px}.flight-progress{top:158px}
.photo-entry{display:flex;gap:12px;align-items:center;justify-content:center;margin:0 0 14px}.photo-square{width:66px;height:66px}.photo-actions{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.photo-actions button,.photo-upload{background:none;border:0;color:#b9d5e5;font-family:inherit;font-size:11px;cursor:pointer;padding:2px 0;white-space:nowrap}.photo-upload{font-size:11px}.photo-actions button:hover,.photo-upload:hover{color:#73f4de}
#cameraDialog{border:1px solid #75cfc5;border-radius:18px;background:#091522;color:#fff;padding:14px;max-width:min(90vw,400px)}#cameraDialog::backdrop{background:#000c}#cameraPreview{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;transform:scaleX(-1)}#cameraDialog>div{display:flex;gap:10px;margin-top:12px}#cameraDialog button{flex:1}
@media(max-width:480px){.crew-strip{left:10px;right:10px}.commander{gap:6px}.commander b{max-width:98px;font-size:10px}.crew-tile{width:63px}.crew-hud{gap:4px}.commander-photo{width:44px;height:44px}.hud{top:106px}.boss-hud{top:157px}.pause-btn{top:161px}.flight-progress{top:154px}}

.arena[data-mode="lobby"]>.hud,.arena[data-mode="lobby"]>.crew-strip{visibility:hidden}

/* v3.8 lobby: isolated title / unobstructed craft / compact launch console. */
@font-face{font-family:Orbitron;src:url('/assets/fonts/orbitron-900.ttf') format('truetype');font-weight:900;font-style:normal;font-display:swap}
#lobby{background:linear-gradient(180deg,#020a16a8 0%,#03101b12 23%,transparent 52%,#020c1680 73%,#020b15e6 100%)}
#lobby .overlay-content{position:relative;width:100%;max-width:none;height:100%;padding:0;text-align:center}
#lobby .lobby-heading{position:absolute;top:6%;left:5%;right:5%}
#lobby .hero-title{display:flex;justify-content:center;align-items:baseline;gap:.32em;margin:0;font:900 clamp(26px,5.5vw,42px)/1.15 Orbitron,sans-serif;letter-spacing:.065em;transform:skewX(-7deg);white-space:nowrap;color:#eaf5ff;text-shadow:0 2px 0 #51728b,0 8px 25px #0009}
#lobby .hero-title span{color:#9af8e2;background:linear-gradient(180deg,#e3fff6 10%,#96f6dc 48%,#38bdc3 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 3px 10px #46ddc52b)}
#lobby .lobby-heading::before,#lobby .lobby-heading::after{content:'';display:block;width:36px;height:2px;background:linear-gradient(90deg,transparent,#8cead8,transparent);margin:0 auto 12px}
#lobby .lobby-heading::after{width:86px;height:1px;margin:12px auto 0;background:linear-gradient(90deg,transparent,#89b8c25c,transparent)}
#lobby .hero-subtitle{font-size:9px;line-height:1.5;letter-spacing:5px;margin:10px 0 0 5px;color:#b2cbd6;text-shadow:0 2px 6px #000}
#lobby #startForm{position:absolute;left:50%;bottom:10.5%;transform:translateX(-50%);width:min(79%,328px);margin:0;padding:13px;display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:10px 7px;border:1px solid #769caf5c;border-top-color:#b1e9e27d;border-radius:13px;background:linear-gradient(125deg,#183343db,#07121fe8 60%);box-shadow:0 12px 35px #0005,inset 0 1px 0 #b0fbe80e;backdrop-filter:blur(12px)}
#lobby .photo-entry{grid-column:1/-1;justify-content:flex-start;gap:10px;margin:0;min-width:0}
#lobby .photo-square{width:36px;height:36px;border-radius:9px;font-size:20px;border-color:#9bddd65e;background:linear-gradient(135deg,#2d4b59,#0d1c28)}
#lobby .photo-actions{flex-direction:row;flex-wrap:wrap;gap:2px 12px;align-items:center;text-align:left}
#lobby .photo-actions button{font-size:10px;line-height:1.6;padding:3px 0;color:#b8d0dd}
#lobby .photo-actions button:hover{color:#a3ffe6}
#lobby #pilot{height:41px;min-width:0;margin:0;padding:0 11px;border:1px solid #5d7a8b80;border-radius:6px;background:#030e19b3;font-size:12px;color:#e6f7fc}
#lobby #pilot::placeholder{color:#92aab9}
#lobby #launch{display:flex;align-items:center;justify-content:space-between;gap:8px;height:41px;width:100%;margin:0;padding:0 12px;border:1px solid #b9ffe6c9;border-radius:6px;background:linear-gradient(125deg,#b7ffe7,#72ddc7);box-shadow:0 0 18px #68e9c912,inset 0 1px 0 #fff5;color:#07312f;font-size:13px;font-weight:900;letter-spacing:1px;white-space:nowrap}
#lobby #launch span{font-size:18px;font-weight:500}
#lobby #launch:hover{background:linear-gradient(125deg,#dcfff3,#91f5d8);box-shadow:0 0 20px #6de5ce33}
#lobby #launch:disabled{font-size:11px;letter-spacing:0;opacity:.7}
#lobby .personal-best{position:absolute;bottom:5.6%;left:5%;right:5%;margin:0;color:#99c6c9;font:10px/1.4 monospace;letter-spacing:2px}
#lobby .control-hint{position:absolute;bottom:1.6%;left:2%;right:2%;margin:0;font-size:8px;line-height:1.5;letter-spacing:.2px;color:#809dac;white-space:nowrap}
#lobby .control-hint span{padding:0 5px}
.arena[data-mode="lobby"]>.flight-line{visibility:hidden}
@media(max-width:400px){#lobby .hero-title{font-size:26px;letter-spacing:.025em}#lobby #startForm{width:84%;padding:11px;grid-template-columns:minmax(0,1fr) 77px}#lobby #launch{padding:0 10px}#lobby .photo-actions{gap:2px 9px}}
@media(max-height:560px){#lobby .lobby-heading{top:4%}#lobby .lobby-heading::before{display:none}#lobby .lobby-heading::after{margin-top:7px}#lobby .hero-title{font-size:26px}#lobby .hero-subtitle{margin-top:5px;font-size:8px}#lobby #startForm{padding:9px;gap:7px;bottom:10%;width:min(79%,310px)}#lobby .photo-square{width:28px;height:28px;font-size:16px}#lobby #pilot,#lobby #launch{height:35px}#lobby .personal-best{bottom:4.6%;font-size:8px}#lobby .control-hint{bottom:1%;font-size:7px}}

/* Player armor and the three-airframe fleet. */
.hull{min-width:80px}.hull small{display:flex;align-items:center;justify-content:space-between;gap:5px}.hull small span{font:8px monospace;color:#c4e6df;letter-spacing:0}
#playerHealth{height:6px;width:80px;border:1px solid #72c8b34d;border-radius:2px;background:#08151ee6;overflow:hidden;margin:5px 0 6px auto;box-shadow:0 0 9px #73dec714}
#healthFill{display:block;width:100%;height:100%;background:linear-gradient(90deg,#36aeab,#abffe0);box-shadow:0 0 7px #7af4d16b;transition:width .22s ease-out}
#playerHealth.critical{border-color:#ff8c6666}#playerHealth.critical #healthFill{background:linear-gradient(90deg,#d85347,#ffb276)}
.hull #lives{font:900 10px/1.2 Orbitron,sans-serif;letter-spacing:2px;color:#b6e9e1}
#lobby .hero-title span{text-shadow:none}
#resultScreen.is-gameover .dialog{overflow-x:hidden;border-top:1px solid #ee9c745c;padding-top:24px}
#resultScreen.is-gameover #resultTitle{display:inline-block;max-width:100%;font:900 clamp(25px,5vw,35px)/1.25 Orbitron,sans-serif;letter-spacing:1px;color:#ffb69c;text-shadow:0 2px 0 #673936,0 0 27px #f2705740;white-space:nowrap;margin:17px 0 20px;transform:skewX(-5deg)}
@media(max-width:400px){.hull{min-width:68px}#playerHealth{width:68px}.hull #lives{font-size:9px}#resultScreen.is-gameover #resultTitle{font-size:25px}}
@media(prefers-reduced-motion:reduce){#healthFill{transition:none}}
/* Four tactile weapon keys, including the per-level active defense. */
.weapon-bar{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.weapon-bar button{padding:5px 8px;gap:6px}.weapon-bar strong{font-size:24px}.weapon-symbol{font-size:27px}
.weapon-bar button:nth-child(4){background:linear-gradient(120deg,#172d3b,#102b2a);border-color:#467e7c}.defense-symbol,.weapon-bar button:nth-child(4) strong{color:#a2f0e6}
@media(max-width:600px){.weapon-bar{gap:4px}.weapon-bar button{padding:4px 5px;gap:4px}.weapon-symbol{font-size:20px}.weapon-bar b{font-size:10px}.weapon-bar small{font-size:8px}.weapon-bar strong,.weapon-bar button:nth-child(3) strong{font-size:19px}}
@media(max-width:380px){.weapon-bar button{padding:4px;gap:3px}.weapon-symbol{font-size:17px}.weapon-bar strong,.weapon-bar button:nth-child(3) strong{font-size:18px}.weapon-bar b{font-size:9px}}
